SecBSD's official ports repository
This commit is contained in:
commit
2c0afcbbf3
64331 changed files with 5339189 additions and 0 deletions
30
devel/luapack/Makefile
Normal file
30
devel/luapack/Makefile
Normal file
|
@ -0,0 +1,30 @@
|
|||
COMMENT= library for packing and unpacking binary data
|
||||
DISTNAME= luapack-20061124
|
||||
REVISION = 4
|
||||
CATEGORIES= devel
|
||||
|
||||
HOMEPAGE= http://www.tecgraf.puc-rio.br/~lhf/ftp/lua/
|
||||
|
||||
# PD
|
||||
PERMIT_PACKAGE= Yes
|
||||
|
||||
MODULES= lang/lua
|
||||
TEST_DEPENDS=${BUILD_PKGPATH}
|
||||
|
||||
FLAVORS= lua52
|
||||
FLAVOR?=
|
||||
|
||||
do-build:
|
||||
${CC} ${CFLAGS} -fPIC -I${MODLUA_INCL_DIR} -shared \
|
||||
${WRKSRC}/lpack.c -o ${WRKDIST}/pack.so
|
||||
|
||||
do-install:
|
||||
${INSTALL_DATA_DIR} ${MODLUA_LIBDIR} ${MODLUA_DOCDIR} ${MODLUA_EXAMPLEDIR}
|
||||
${INSTALL_DATA} ${WRKBUILD}/pack.so ${MODLUA_LIBDIR}
|
||||
${INSTALL_DATA} ${WRKSRC}/README ${MODLUA_DOCDIR}
|
||||
${INSTALL_DATA} ${WRKSRC}/test.lua ${MODLUA_EXAMPLEDIR}
|
||||
|
||||
do-test:
|
||||
${MODLUA_BIN} ${WRKSRC}/test.lua
|
||||
|
||||
.include <bsd.port.mk>
|
2
devel/luapack/distinfo
Normal file
2
devel/luapack/distinfo
Normal file
|
@ -0,0 +1,2 @@
|
|||
SHA256 (luapack-20061124.tar.gz) = GzcDiV9PH6dOHiLzhaThbuRukLip8ZbsaeHx1hCAKtA=
|
||||
SIZE (luapack-20061124.tar.gz) = 3885
|
25
devel/luapack/patches/patch-lpack_c
Normal file
25
devel/luapack/patches/patch-lpack_c
Normal file
|
@ -0,0 +1,25 @@
|
|||
Unbreak with lua 5.2.
|
||||
|
||||
--- lpack.c.orig Mon Jul 31 18:19:59 2006
|
||||
+++ lpack.c Tue May 17 09:18:25 2016
|
||||
@@ -100,7 +100,11 @@ static int l_unpack(lua_State *L) /** unpack(s,f,[in
|
||||
const char *s=luaL_checkstring(L,1);
|
||||
const char *f=luaL_checkstring(L,2);
|
||||
int i=luaL_optnumber(L,3,1)-1;
|
||||
+#if LUA_VERSION_NUM <= 501
|
||||
size_t len=lua_strlen(L,1);
|
||||
+#else
|
||||
+ size_t len=lua_rawlen(L,1);
|
||||
+#endif
|
||||
int n=0;
|
||||
int swap=0;
|
||||
lua_pushnil(L);
|
||||
@@ -251,7 +255,7 @@ static int l_pack(lua_State *L) /** pack(f,...) */
|
||||
return 1;
|
||||
}
|
||||
|
||||
-static const luaL_reg R[] =
|
||||
+static const luaL_Reg R[] =
|
||||
{
|
||||
{"pack", l_pack},
|
||||
{"unpack", l_unpack},
|
7
devel/luapack/patches/patch-test_lua
Normal file
7
devel/luapack/patches/patch-test_lua
Normal file
|
@ -0,0 +1,7 @@
|
|||
--- test.lua.orig Mon Apr 26 22:06:27 2004
|
||||
+++ test.lua Fri Nov 24 01:25:37 2006
|
||||
@@ -1,3 +1,4 @@
|
||||
+require("pack")
|
||||
bpack=string.pack
|
||||
bunpack=string.unpack
|
||||
|
1
devel/luapack/pkg/DESCR
Normal file
1
devel/luapack/pkg/DESCR
Normal file
|
@ -0,0 +1 @@
|
|||
luapack is a Lua library for packing and unpacking binary data.
|
5
devel/luapack/pkg/PLIST
Normal file
5
devel/luapack/pkg/PLIST
Normal file
|
@ -0,0 +1,5 @@
|
|||
lib/lua/${MODLUA_VERSION}/pack.so
|
||||
share/doc/${FULLPKGNAME}/
|
||||
share/doc/${FULLPKGNAME}/README
|
||||
share/examples/${FULLPKGNAME}/
|
||||
share/examples/${FULLPKGNAME}/test.lua
|
Loading…
Add table
Add a link
Reference in a new issue