Update to release 31
Switch to lua 5.2
This commit is contained in:
parent
af23e9592e
commit
8b8b0a0bf8
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=339362
10 changed files with 44 additions and 121 deletions
|
@ -2,37 +2,43 @@
|
|||
# $FreeBSD$
|
||||
|
||||
PORTNAME= posix
|
||||
PORTVERSION= 5.0
|
||||
PORTVERSION= 31
|
||||
CATEGORIES= devel
|
||||
MASTER_SITES= http://www.tecgraf.puc-rio.br/~lhf/ftp/lua/5.0/
|
||||
PKGNAMEPREFIX= ${LUA_PKGNAMEPREFIX}
|
||||
DISTFILES= lposix.tar.gz
|
||||
|
||||
MAINTAINER= ports@FreeBSD.org
|
||||
COMMENT= A POSIX layer for Lua
|
||||
COMMENT= POSIX layer for Lua
|
||||
|
||||
USE_LUA?= 5.1
|
||||
WRKSRC= ${WRKDIR}/posix
|
||||
LICENSE= MIT
|
||||
|
||||
PLIST_FILES= %%LUA_MODSHAREDIR%%/posix.lua \
|
||||
%%LUA_MODLIBDIR%%/lposix.so
|
||||
USES= lua
|
||||
GNU_CONFIGURE= yes
|
||||
CONFIGURE_ENV= LUA_INCLUDE=-I${LUA_INCDIR} \
|
||||
LUA=${LOCALBASE}/bin/lua${LUA_VER_STR}
|
||||
|
||||
NO_STAGE= yes
|
||||
.include <bsd.port.pre.mk>
|
||||
USE_GITHUB= yes
|
||||
GH_PROJECT= luaposix
|
||||
GH_ACCOUNT= luaposix
|
||||
GH_TAGNAME= release-v31
|
||||
GH_COMMIT= 30b4b1e
|
||||
|
||||
.if ${USE_LUA} == 5.1
|
||||
EXTRA_PATCHES= ${FILESDIR}/extrapatch-51-lposix.c \
|
||||
${FILESDIR}/extrapatch-51-posix.lua \
|
||||
${FILESDIR}/extrapatch-51-test.lua
|
||||
.elif ${USE_LUA} == 5.0
|
||||
EXTRA_PATCHES= ${FILESDIR}/extrapatch-50-Makefile
|
||||
.if ${ARCH} == "powerpc"
|
||||
BROKEN= Does not compile on powerpc
|
||||
.endif
|
||||
.endif
|
||||
MAKE_ARGS= POSIX_EXTRA_CFLAGS="" POSIX_EXTRA_LDFLAGS=""
|
||||
|
||||
PLIST_FILES= %%LUA_MODSHAREDIR%%/curses.lua \
|
||||
%%LUA_MODLIBDIR%%/curses_c.so \
|
||||
%%LUA_MODSHAREDIR%%/posix.lua \
|
||||
%%LUA_MODLIBDIR%%/posix_c.so
|
||||
|
||||
PORTDOCS= *
|
||||
|
||||
do-install:
|
||||
@${INSTALL_DATA} ${WRKSRC}/posix.lua ${LUA_MODSHAREDIR}
|
||||
@${INSTALL_PROGRAM} ${WRKSRC}/lposix.so ${LUA_MODLIBDIR}
|
||||
@${MKDIR} ${STAGEDIR}${LUA_MODLIBDIR}
|
||||
${INSTALL_LIB} ${WRKSRC}/ext/posix/.libs/posix_c.so ${STAGEDIR}${LUA_MODLIBDIR}/
|
||||
${INSTALL_LIB} ${WRKSRC}/ext/curses/.libs/curses_c.so ${STAGEDIR}${LUA_MODLIBDIR}/
|
||||
@${MKDIR} ${STAGEDIR}${LUA_MODSHAREDIR}
|
||||
${INSTALL_SCRIPT} ${WRKSRC}/lib/curses.lua ${STAGEDIR}${LUA_MODSHAREDIR}/
|
||||
${INSTALL_SCRIPT} ${WRKSRC}/lib/posix.lua ${STAGEDIR}${LUA_MODSHAREDIR}/
|
||||
@${MKDIR} ${STAGEDIR}${DOCSDIR}
|
||||
cd ${WRKSRC}/doc ; ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}
|
||||
|
||||
.include <bsd.port.post.mk>
|
||||
.include <bsd.port.mk>
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
SHA256 (lposix.tar.gz) = e5140e19df90069b579be7983506e2461b6678e9e80b82545b6ca8070fd318a3
|
||||
SIZE (lposix.tar.gz) = 9651
|
||||
SHA256 (posix-31.tar.gz) = 147c983312f5bb1389b5f74433de7f4f8b8542239fee40e8d6bcfb0a78fb7a44
|
||||
SIZE (posix-31.tar.gz) = 529019
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
--- Makefile.orig Wed Nov 5 21:26:49 2003
|
||||
+++ Makefile Mon Aug 7 00:38:38 2006
|
||||
@@ -21,7 +21,7 @@
|
||||
all: test
|
||||
|
||||
test: $T
|
||||
- $(LUABIN)/lua -l$(MYNAME) test.lua
|
||||
+ LD_PRELOAD=${LUA_LIBDIR}/liblua.so:${LUA_LIBDIR}/liblualib.so $(LUABIN)/lua -l$(MYNAME) test.lua
|
||||
|
||||
$T: $(OBJS)
|
||||
$(CC) -o $@ -shared $(OBJS)
|
|
@ -1,11 +0,0 @@
|
|||
--- lposix.c.orig Thu Nov 2 11:08:39 2006
|
||||
+++ lposix.c Thu Nov 2 11:11:29 2006
|
||||
@@ -64,7 +64,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
- int j=luaL_findstring(luaL_checkstring(L, i), S);
|
||||
+ int j=luaL_checkoption(L, i, NULL, S);
|
||||
if (j==-1) luaL_argerror(L, i, "unknown selector");
|
||||
return F(L, j, data);
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
--- posix.lua.orig Thu Nov 2 12:52:39 2006
|
||||
+++ posix.lua Thu Nov 2 11:06:46 2006
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
local function so(x)
|
||||
local SOPATH= os.getenv"LUA_SOPATH" or "./"
|
||||
- assert(loadlib(SOPATH.."l"..x..".so","luaopen_"..x))()
|
||||
+ assert(package.loadlib(SOPATH.."l"..x..".so","luaopen_"..x))()
|
||||
end
|
||||
|
||||
so"posix"
|
|
@ -1,25 +0,0 @@
|
|||
--- test.lua.orig Thu Nov 2 11:13:00 2006
|
||||
+++ test.lua Thu Nov 2 11:14:54 2006
|
||||
@@ -41,7 +41,7 @@
|
||||
f"HOME"
|
||||
f"SHELL"
|
||||
f"absent"
|
||||
-for k in ox.getenv() do io.write(k,"\t") end io.write"\n"
|
||||
+for k,_ in pairs(ox.getenv()) do io.write(k,"\t") end io.write"\n"
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
testing"putenv"
|
||||
@@ -179,11 +179,11 @@
|
||||
------------------------------------------------------------------------------
|
||||
testing"times"
|
||||
a=ox.times()
|
||||
-for k,v in a do print(k,v) end
|
||||
+for k,v in pairs(a) do print(k,v) end
|
||||
print"sleeping 10 seconds..."
|
||||
ox.sleep(10)
|
||||
b=ox.times()
|
||||
-for k,v in b do print(k,v) end
|
||||
+for k,v in pairs(b) do print(k,v) end
|
||||
print""
|
||||
print("elapsed",b.elapsed-a.elapsed)
|
||||
print("clock",os.clock())
|
|
@ -1,21 +0,0 @@
|
|||
--- Makefile.orig Wed Nov 5 21:26:49 2003
|
||||
+++ Makefile Mon Aug 7 00:38:38 2006
|
||||
@@ -1,13 +1,13 @@
|
||||
# makefile for POSIX library for Lua
|
||||
|
||||
# change these to reflect your Lua installation
|
||||
-LUA= /tmp/lhf/lua-5.0
|
||||
-LUAINC= $(LUA)/include
|
||||
-LUALIB= $(LUA)/lib
|
||||
-LUABIN= $(LUA)/bin
|
||||
+LUA= ${PREFIX}
|
||||
+LUAINC= $(LUA_INCDIR)
|
||||
+LUALIB= $(LUA_LIBDIR)
|
||||
+LUABIN= $(LUA_BINDIR)
|
||||
|
||||
# no need to change anything below here
|
||||
-CFLAGS= -fPIC $(INCS) $(WARN) -O2 $G
|
||||
+CFLAGS+= -fPIC $(INCS) $(WARN) -O2 $G
|
||||
WARN= -pedantic -Wall
|
||||
INCS= -I$(LUAINC)
|
||||
|
13
devel/lua-posix/files/patch-ext__posix__posix.c
Normal file
13
devel/lua-posix/files/patch-ext__posix__posix.c
Normal file
|
@ -0,0 +1,13 @@
|
|||
--- ./ext/posix/posix.c.orig 2013-09-09 09:15:14.000000000 +0200
|
||||
+++ ./ext/posix/posix.c 2014-01-10 15:21:47.831554392 +0100
|
||||
@@ -68,6 +68,10 @@
|
||||
#include "lauxlib.h"
|
||||
#include "lua52compat.h"
|
||||
|
||||
+#ifdef __FreeBSD__
|
||||
+#define O_DSYNC O_SYNC
|
||||
+#endif
|
||||
+
|
||||
#ifndef STREQ
|
||||
# define STREQ(a, b) (strcmp (a, b) == 0)
|
||||
#endif
|
|
@ -1,8 +0,0 @@
|
|||
--- posix.lua.orig Tue Apr 11 23:59:52 2006
|
||||
+++ posix.lua Wed Apr 12 00:00:49 2006
|
||||
@@ -8,3 +8,5 @@
|
||||
end
|
||||
|
||||
so"posix"
|
||||
+
|
||||
+return posix
|
|
@ -1,9 +0,0 @@
|
|||
--- modemuncher.c 2003-11-05 19:14:10.000000000 -0500
|
||||
+++ modemuncher.c 2013-02-07 12:03:26.000000000 -0500
|
||||
@@ -36,5 +36,5 @@
|
||||
{'w', S_IWOTH},
|
||||
{'x', S_IXOTH},
|
||||
- {(char)NULL, (mode_t)-1} /* do not delete this line */
|
||||
+ {'\0', (mode_t)-1} /* do not delete this line */
|
||||
};
|
||||
|
Loading…
Reference in a new issue