Re: [update] lang/luajit 2.0.0 -> 2.0.1

2013-05-09 Thread Stuart Henderson
On 2013/05/09 15:35, Aaron Bieber wrote:
> On Thu, May 09, 2013 at 05:02:08PM -0400, Ted Unangst wrote:
> > On Thu, May 09, 2013 at 09:53, Aaron wrote:
> > > ping :D
> > 
> > There is also the hotfix #1 patch that should be incorporated.
> 
> Diff to apply the hotfix below.  Is this the correct way to do it, or
> should I add a patch to files and apply from the Makefile? 

Upstream has a clean patch, so we can just do this:

PATCHFILES =v2.0.1_hotfix1.patch
PATCH_DIST_STRIP = -p1



Re: [update] lang/luajit 2.0.0 -> 2.0.1

2013-05-09 Thread Aaron Bieber
On Thu, May 09, 2013 at 05:02:08PM -0400, Ted Unangst wrote:
> On Thu, May 09, 2013 at 09:53, Aaron wrote:
> > ping :D
> 
> There is also the hotfix #1 patch that should be incorporated.

Diff to apply the hotfix below.  Is this the correct way to do it, or
should I add a patch to files and apply from the Makefile? 

Index: Makefile
===
RCS file: /cvs/ports/lang/luajit/Makefile,v
retrieving revision 1.7
diff -u -p -r1.7 Makefile
--- Makefile9 May 2013 17:57:56 -   1.7
+++ Makefile9 May 2013 21:32:18 -
@@ -8,6 +8,7 @@ SHARED_LIBS +=  luajit-${MODLUA_VERSION} 
 
 COMMENT =  just-in-time compiler for Lua
 V =2.0.1
+REVISION = 0
 DISTNAME = LuaJIT-${V}
 PKGNAME =  ${DISTNAME:L}
 
Index: patches/patch-src_lib_io_c
===
RCS file: patches/patch-src_lib_io_c
diff -N patches/patch-src_lib_io_c
--- /dev/null   1 Jan 1970 00:00:00 -
+++ patches/patch-src_lib_io_c  9 May 2013 21:32:18 -
@@ -0,0 +1,35 @@
+$OpenBSD$
+--- src/lib_io.c.orig  Tue Feb 19 13:15:00 2013
 src/lib_io.c   Thu May  9 15:29:04 2013
+@@ -17,6 +17,7 @@
+ #include "lualib.h"
+ 
+ #include "lj_obj.h"
++#include "lj_gc.h"
+ #include "lj_err.h"
+ #include "lj_str.h"
+ #include "lj_state.h"
+@@ -152,6 +153,7 @@ static int io_file_readline(lua_State *L, FILE *fp, MS
+ if (n >= m - 64) m += m;
+   }
+   setstrV(L, L->top++, lj_str_new(L, buf, (size_t)n));
++  lj_gc_check(L);
+   return (int)ok;
+ }
+ 
+@@ -163,6 +165,7 @@ static void io_file_readall(lua_State *L, FILE *fp)
+ n += (MSize)fread(buf+n, 1, m-n, fp);
+ if (n != m) {
+   setstrV(L, L->top++, lj_str_new(L, buf, (size_t)n));
++  lj_gc_check(L);
+   return;
+ }
+   }
+@@ -174,6 +177,7 @@ static int io_file_readlen(lua_State *L, FILE *fp, MSi
+ char *buf = lj_str_needbuf(L, &G(L)->tmpbuf, m);
+ MSize n = (MSize)fread(buf, 1, m, fp);
+ setstrV(L, L->top++, lj_str_new(L, buf, (size_t)n));
++lj_gc_check(L);
+ return (n > 0 || m == 0);
+   } else {
+ int c = getc(fp);
Index: patches/patch-src_lj_asm_arm_h
===
RCS file: patches/patch-src_lj_asm_arm_h
diff -N patches/patch-src_lj_asm_arm_h
--- /dev/null   1 Jan 1970 00:00:00 -
+++ patches/patch-src_lj_asm_arm_h  9 May 2013 21:32:18 -
@@ -0,0 +1,11 @@
+$OpenBSD$
+--- src/lj_asm_arm.h.orig  Tue Feb 19 13:15:00 2013
 src/lj_asm_arm.h   Thu May  9 15:29:04 2013
+@@ -91,6 +91,7 @@ static MCode *asm_exitstub_gen(ASMState *as, ExitNo gr
+   *mxp++ = group*EXITSTUBS_PER_GROUP;
+   for (i = 0; i < EXITSTUBS_PER_GROUP; i++)
+ *mxp++ = ARMI_B|((-6-i)&0x00ffu);
++  lj_mcode_sync(as->mcbot, mxp);
+   lj_mcode_commitbot(as->J, mxp);
+   as->mcbot = mxp;
+   as->mclim = as->mcbot + MCLIM_REDZONE;
Index: patches/patch-src_lj_asm_mips_h
===
RCS file: patches/patch-src_lj_asm_mips_h
diff -N patches/patch-src_lj_asm_mips_h
--- /dev/null   1 Jan 1970 00:00:00 -
+++ patches/patch-src_lj_asm_mips_h 9 May 2013 21:32:18 -
@@ -0,0 +1,11 @@
+$OpenBSD$
+--- src/lj_asm_mips.h.orig Tue Feb 19 13:15:00 2013
 src/lj_asm_mips.h  Thu May  9 15:29:04 2013
+@@ -71,6 +71,7 @@ static void asm_sparejump_setup(ASMState *as)
+ memset(mxp+2, 0, MIPS_SPAREJUMP*8);
+ mxp += MIPS_SPAREJUMP*2;
+ lua_assert(mxp < as->mctop);
++lj_mcode_sync(as->mcbot, mxp);
+ lj_mcode_commitbot(as->J, mxp);
+ as->mcbot = mxp;
+ as->mclim = as->mcbot + MCLIM_REDZONE;
Index: patches/patch-src_lj_def_h
===
RCS file: patches/patch-src_lj_def_h
diff -N patches/patch-src_lj_def_h
--- /dev/null   1 Jan 1970 00:00:00 -
+++ patches/patch-src_lj_def_h  9 May 2013 21:32:18 -
@@ -0,0 +1,24 @@
+$OpenBSD$
+--- src/lj_def.h.orig  Tue Feb 19 13:15:00 2013
 src/lj_def.h   Thu May  9 15:29:04 2013
+@@ -243,17 +243,17 @@ static LJ_AINLINE uint32_t lj_getu32(const void *p)
+ #endif
+ 
+ #ifdef _M_PPC
+-#pragma intrinsic(_CountLeadingZeros)
+ unsigned int _CountLeadingZeros(long);
++#pragma intrinsic(_CountLeadingZeros)
+ static LJ_AINLINE uint32_t lj_fls(uint32_t x)
+ {
+   return _CountLeadingZeros(x) ^ 31;
+ }
+ #else
+-#pragma intrinsic(_BitScanForward)
+-#pragma intrinsic(_BitScanReverse)
+ unsigned char _BitScanForward(uint32_t *, unsigned long);
+ unsigned char _BitScanReverse(uint32_t *, unsigned long);
++#pragma intrinsic(_BitScanForward)
++#pragma intrinsic(_BitScanReverse)
+ 
+ static LJ_AINLINE uint32_t lj_ffs(uint32_t x)
+ {
Index: patches/patch-src_lj_str_c
===
RCS file: patches/patch-src_lj_str_c
diff -N patches/patch-src_lj_str_c
--- /dev/null   1 Jan 1970 00:00:00 -
+++ patches/patch-src_lj_str_c  9 May 2013 21:32:18 -
@@ -0,0 +1,21 

Re: [update] lang/luajit 2.0.0 -> 2.0.1

2013-05-09 Thread Ted Unangst
On Thu, May 09, 2013 at 09:53, Aaron wrote:
> ping :D

There is also the hotfix #1 patch that should be incorporated.

> 
> On Mon, Apr 29, 2013 at 10:50 AM, Aaron Bieber  wrote:
>> Hola,
>>
>> Here is a pretty trivial patch to bring luajit to 2.0.1
>>
>> Tested on amd64 with luakit and a few lua scripts.
>>
>> OK?
>>
>> Index: Makefile
>> ===
>> RCS file: /cvs/ports/lang/luajit/Makefile,v
>> retrieving revision 1.6
>> diff -u -p -r1.6 Makefile
>> --- Makefile11 Mar 2013 11:20:28 -  1.6
>> +++ Makefile29 Apr 2013 15:09:55 -
>> @@ -7,7 +7,7 @@ SHARED_ONLY =   Yes
>>  SHARED_LIBS += luajit-${MODLUA_VERSION} 0.0 # 2.0.0
>>
>>  COMMENT =  just-in-time compiler for Lua
>> -V =2.0.0
>> +V =2.0.1
>>  DISTNAME = LuaJIT-${V}
>>  PKGNAME =  ${DISTNAME:L}
>>
>> Index: distinfo
>> ===
>> RCS file: /cvs/ports/lang/luajit/distinfo,v
>> retrieving revision 1.2
>> diff -u -p -r1.2 distinfo
>> --- distinfo16 Nov 2012 15:06:57 -  1.2
>> +++ distinfo29 Apr 2013 15:09:55 -
>> @@ -1,2 +1,2 @@
>> -SHA256 (LuaJIT-2.0.0.tar.gz) =
> 3q7WRcSgk8X7JQwwyZM8kTHuBclLEyYtWPbgtgszjBU=
>> -SIZE (LuaJIT-2.0.0.tar.gz) = 837408
>> +SHA256 (LuaJIT-2.0.1.tar.gz) =
> I3HM61NFPYp7NkUeagzNtmI2kkVF1gQt3Uw06WaJkMA=
>> +SIZE (LuaJIT-2.0.1.tar.gz) = 841399



Re: [update] lang/luajit 2.0.0 -> 2.0.1

2013-05-09 Thread Aaron
ping :D

On Mon, Apr 29, 2013 at 10:50 AM, Aaron Bieber  wrote:
> Hola,
>
> Here is a pretty trivial patch to bring luajit to 2.0.1
>
> Tested on amd64 with luakit and a few lua scripts.
>
> OK?
>
> Index: Makefile
> ===
> RCS file: /cvs/ports/lang/luajit/Makefile,v
> retrieving revision 1.6
> diff -u -p -r1.6 Makefile
> --- Makefile11 Mar 2013 11:20:28 -  1.6
> +++ Makefile29 Apr 2013 15:09:55 -
> @@ -7,7 +7,7 @@ SHARED_ONLY =   Yes
>  SHARED_LIBS += luajit-${MODLUA_VERSION} 0.0 # 2.0.0
>
>  COMMENT =  just-in-time compiler for Lua
> -V =2.0.0
> +V =2.0.1
>  DISTNAME = LuaJIT-${V}
>  PKGNAME =  ${DISTNAME:L}
>
> Index: distinfo
> ===
> RCS file: /cvs/ports/lang/luajit/distinfo,v
> retrieving revision 1.2
> diff -u -p -r1.2 distinfo
> --- distinfo16 Nov 2012 15:06:57 -  1.2
> +++ distinfo29 Apr 2013 15:09:55 -
> @@ -1,2 +1,2 @@
> -SHA256 (LuaJIT-2.0.0.tar.gz) = 3q7WRcSgk8X7JQwwyZM8kTHuBclLEyYtWPbgtgszjBU=
> -SIZE (LuaJIT-2.0.0.tar.gz) = 837408
> +SHA256 (LuaJIT-2.0.1.tar.gz) = I3HM61NFPYp7NkUeagzNtmI2kkVF1gQt3Uw06WaJkMA=
> +SIZE (LuaJIT-2.0.1.tar.gz) = 841399



[update] lang/luajit 2.0.0 -> 2.0.1

2013-04-29 Thread Aaron Bieber
Hola,

Here is a pretty trivial patch to bring luajit to 2.0.1

Tested on amd64 with luakit and a few lua scripts.

OK? 

Index: Makefile
===
RCS file: /cvs/ports/lang/luajit/Makefile,v
retrieving revision 1.6
diff -u -p -r1.6 Makefile
--- Makefile11 Mar 2013 11:20:28 -  1.6
+++ Makefile29 Apr 2013 15:09:55 -
@@ -7,7 +7,7 @@ SHARED_ONLY =   Yes
 SHARED_LIBS += luajit-${MODLUA_VERSION} 0.0 # 2.0.0
 
 COMMENT =  just-in-time compiler for Lua
-V =2.0.0
+V =2.0.1
 DISTNAME = LuaJIT-${V}
 PKGNAME =  ${DISTNAME:L}
 
Index: distinfo
===
RCS file: /cvs/ports/lang/luajit/distinfo,v
retrieving revision 1.2
diff -u -p -r1.2 distinfo
--- distinfo16 Nov 2012 15:06:57 -  1.2
+++ distinfo29 Apr 2013 15:09:55 -
@@ -1,2 +1,2 @@
-SHA256 (LuaJIT-2.0.0.tar.gz) = 3q7WRcSgk8X7JQwwyZM8kTHuBclLEyYtWPbgtgszjBU=
-SIZE (LuaJIT-2.0.0.tar.gz) = 837408
+SHA256 (LuaJIT-2.0.1.tar.gz) = I3HM61NFPYp7NkUeagzNtmI2kkVF1gQt3Uw06WaJkMA=
+SIZE (LuaJIT-2.0.1.tar.gz) = 841399



[update] lang/luajit 2.0.0

2012-11-12 Thread Aaron Bieber
Hi,

This diff updates luajit to the latest release ( no more beta ).

Tested on amd64 with luakit.

Looking for two OKs.

Index: Makefile
===
RCS file: /cvs/ports/lang/luajit/Makefile,v
retrieving revision 1.2
diff -N -u -p Makefile
--- Makefile2 Nov 2012 02:08:38 -   1.2
+++ Makefile13 Nov 2012 01:23:56 -
@@ -6,9 +6,9 @@ SHARED_ONLY =   Yes
 SHARED_LIBS += luajit-${MODLUA_VERSION} 0.0 # 2.0.0
 
 COMMENT =  just-in-time compiler for Lua
-V =2.0.0-beta11
+V =2.0.0
 DISTNAME = LuaJIT-${V}
-PKGNAME =  ${DISTNAME:L:S/-beta/beta/}
+PKGNAME =  ${DISTNAME:L}
 
 CATEGORIES =   lang
 
Index: distinfo
===
RCS file: /cvs/ports/lang/luajit/distinfo,v
retrieving revision 1.1.1.1
diff -N -u -p distinfo
--- distinfo27 Oct 2012 14:05:33 -  1.1.1.1
+++ distinfo13 Nov 2012 01:23:56 -
@@ -1,2 +1,2 @@
-SHA256 (LuaJIT-2.0.0-beta11.tar.gz) = 
Hp4dZXd0sz8oesCDEMDeHon/e4+J7n3DHu+4bq2YFN4=
-SIZE (LuaJIT-2.0.0-beta11.tar.gz) = 836244
+SHA256 (LuaJIT-2.0.0.tar.gz) = 3q7WRcSgk8X7JQwwyZM8kTHuBclLEyYtWPbgtgszjBU=
+SIZE (LuaJIT-2.0.0.tar.gz) = 837408
Index: patches/patch-Makefile
===
RCS file: /cvs/ports/lang/luajit/patches/patch-Makefile,v
retrieving revision 1.1.1.1
diff -N -u -p patches/patch-Makefile
--- patches/patch-Makefile  27 Oct 2012 14:05:33 -  1.1.1.1
+++ patches/patch-Makefile  13 Nov 2012 01:23:56 -
@@ -1,9 +1,9 @@
 $OpenBSD: patch-Makefile,v 1.1.1.1 2012/10/27 14:05:33 abieber Exp $
 Makefile.orig  Tue Oct 16 12:30:00 2012
-+++ Makefile   Fri Oct 26 17:11:37 2012
-@@ -110,23 +110,13 @@ install: $(INSTALL_DEP)
+--- Makefile.orig  Mon Nov 12 17:59:02 2012
 Makefile   Mon Nov 12 18:00:24 2012
+@@ -109,10 +109,7 @@ install: $(INSTALL_DEP)
cd src && test -f $(FILE_A) && $(INSTALL_F) $(FILE_A) $(INSTALL_STATIC) 
|| :
-   $(RM) $(INSTALL_DYN) $(INSTALL_SHORT1) $(INSTALL_SHORT2)
+   $(RM) $(INSTALL_TSYM) $(INSTALL_DYN) $(INSTALL_SHORT1) $(INSTALL_SHORT2)
cd src && test -f $(FILE_SO) && \
 -$(INSTALL_X) $(FILE_SO) $(INSTALL_DYN) && \
 -$(LDCONFIG) $(INSTALL_LIB) && \
@@ -13,16 +13,11 @@ $OpenBSD: patch-Makefile,v 1.1.1.1 2012/10/27 14:05:33
cd etc && $(INSTALL_F) $(FILE_MAN) $(INSTALL_MAN)
cd etc && $(SED_PC) $(FILE_PC) > $(FILE_PC).tmp && \
  $(INSTALL_F) $(FILE_PC).tmp $(INSTALL_PC) && \
- $(RM) $(FILE_PC).tmp
+@@ -120,7 +117,6 @@ install: $(INSTALL_DEP)
cd src && $(INSTALL_F) $(FILES_INC) $(INSTALL_INC)
cd src/jit && $(INSTALL_F) $(FILES_JITLIB) $(INSTALL_JITLIB)
+   $(SYMLINK) $(INSTALL_TNAME) $(INSTALL_TSYM)
 -  @echo " Successfully installed LuaJIT $(VERSION) to $(PREFIX) "
--  @echo ""
--  @echo "Note: the beta releases deliberately do NOT install a symlink 
for luajit"
--  @echo "You can do this now by running this command (with sudo):"
--  @echo ""
--  @echo "  $(SYMLINK) $(INSTALL_TNAME) $(INSTALL_TSYM)"
--  @echo ""
  
  uninstall:
@echo " Uninstalling LuaJIT $(VERSION) from $(PREFIX) "
Index: pkg/PLIST
===
RCS file: /cvs/ports/lang/luajit/pkg/PLIST,v
retrieving revision 1.1.1.1
diff -N -u -p pkg/PLIST
--- pkg/PLIST   27 Oct 2012 14:05:33 -  1.1.1.1
+++ pkg/PLIST   13 Nov 2012 01:23:56 -
@@ -1,4 +1,5 @@
 @comment $OpenBSD: PLIST,v 1.1.1.1 2012/10/27 14:05:33 abieber Exp $
+bin/luajit
 @bin bin/luajit${MODLUA_DEP_VERSION}
 include/luajit-2.0/
 include/luajit-2.0/lauxlib.h