SecBSD's official ports repository
This commit is contained in:
commit
2c0afcbbf3
64331 changed files with 5339189 additions and 0 deletions
32
devel/lua-cmsgpack/Makefile
Normal file
32
devel/lua-cmsgpack/Makefile
Normal file
|
@ -0,0 +1,32 @@
|
|||
COMMENT= MessagePack implementation and bindings for Lua
|
||||
|
||||
DISTNAME= lua-cmsgpack-0.3.0
|
||||
REVISION= 1
|
||||
CATEGORIES= devel
|
||||
|
||||
HOMEPAGE= https://github.com/antirez/lua-cmsgpack
|
||||
|
||||
# BSD
|
||||
PERMIT_PACKAGE= Yes
|
||||
|
||||
MASTER_SITES= https://distfiles.sigtrap.nl/
|
||||
|
||||
MODULES= lang/lua
|
||||
|
||||
FLAVORS= lua52
|
||||
FLAVOR?=
|
||||
|
||||
TEST_DEPENDS=${BUILD_PKGPATH}
|
||||
|
||||
do-build:
|
||||
cd ${WRKSRC} && ${CC} ${CFLAGS} -fPIC -I${MODLUA_INCL_DIR} -shared \
|
||||
${WRKSRC}/lua_cmsgpack.c -o ${WRKSRC}/cmsgpack.so
|
||||
|
||||
do-install:
|
||||
${INSTALL_DATA_DIR} ${MODLUA_LIBDIR}
|
||||
${INSTALL_DATA} ${WRKSRC}/cmsgpack.so ${MODLUA_LIBDIR}
|
||||
|
||||
do-test:
|
||||
cd ${WRKSRC} && ${MODLUA_BIN} test.lua
|
||||
|
||||
.include <bsd.port.mk>
|
2
devel/lua-cmsgpack/distinfo
Normal file
2
devel/lua-cmsgpack/distinfo
Normal file
|
@ -0,0 +1,2 @@
|
|||
SHA256 (lua-cmsgpack-0.3.0.tar.gz) = 1YSGUqbpaL0KRh+Yh8UYrODmnOFz8E5dC7zkqkKvhAg=
|
||||
SIZE (lua-cmsgpack-0.3.0.tar.gz) = 138961
|
31
devel/lua-cmsgpack/patches/patch-lua_cmsgpack_c
Normal file
31
devel/lua-cmsgpack/patches/patch-lua_cmsgpack_c
Normal file
|
@ -0,0 +1,31 @@
|
|||
--- lua_cmsgpack.c.orig Mon Nov 5 20:14:43 2012
|
||||
+++ lua_cmsgpack.c Tue May 17 09:15:56 2016
|
||||
@@ -328,7 +328,11 @@ static void mp_encode_lua_type(lua_State *L, mp_buf *b
|
||||
|
||||
/* Convert a lua table into a message pack list. */
|
||||
static void mp_encode_lua_table_as_array(lua_State *L, mp_buf *buf, int level) {
|
||||
+#if LUA_VERSION_NUM <= 501
|
||||
size_t len = lua_objlen(L,-1), j;
|
||||
+#else
|
||||
+ size_t len = lua_rawlen(L,-1), j;
|
||||
+#endif
|
||||
|
||||
mp_encode_array(buf,len);
|
||||
for (j = 1; j <= len; j++) {
|
||||
@@ -687,14 +691,14 @@ static int mp_unpack(lua_State *L) {
|
||||
|
||||
/* ---------------------------------------------------------------------------- */
|
||||
|
||||
-static const struct luaL_reg thislib[] = {
|
||||
+static const struct luaL_Reg thislib[] = {
|
||||
{"pack", mp_pack},
|
||||
{"unpack", mp_unpack},
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
||||
LUALIB_API int luaopen_cmsgpack (lua_State *L) {
|
||||
- luaL_register(L, "cmsgpack", thislib);
|
||||
+ luaL_openlib(L, "cmsgpack", thislib, 0);
|
||||
|
||||
lua_pushliteral(L, LUACMSGPACK_VERSION);
|
||||
lua_setfield(L, -2, "_VERSION");
|
11
devel/lua-cmsgpack/patches/patch-test_lua
Normal file
11
devel/lua-cmsgpack/patches/patch-test_lua
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- test.lua.orig Mon Nov 5 20:26:45 2012
|
||||
+++ test.lua Mon Nov 5 20:27:36 2012
|
||||
@@ -2,6 +2,8 @@
|
||||
-- Copyright(C) 2012 Salvatore Sanfilippo, All Rights Reserved.
|
||||
-- See the copyright notice at the end of lua_cmsgpack.c for more information.
|
||||
|
||||
+local cmsgpack = require 'cmsgpack'
|
||||
+
|
||||
passed = 0
|
||||
failed = 0
|
||||
|
1
devel/lua-cmsgpack/pkg/DESCR
Normal file
1
devel/lua-cmsgpack/pkg/DESCR
Normal file
|
@ -0,0 +1 @@
|
|||
Lua-cmsgpack is a MessagePack implementation and bindings for Lua.
|
1
devel/lua-cmsgpack/pkg/PLIST
Normal file
1
devel/lua-cmsgpack/pkg/PLIST
Normal file
|
@ -0,0 +1 @@
|
|||
lib/lua/${MODLUA_VERSION}/cmsgpack.so
|
Loading…
Add table
Add a link
Reference in a new issue