SecBSD's official ports repository

This commit is contained in:
purplerain 2023-08-16 22:26:55 +00:00
commit 2c0afcbbf3
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
64331 changed files with 5339189 additions and 0 deletions

View file

@ -0,0 +1,28 @@
COMMENT = Lua bindings to libmsgpack
PKGNAME = lua-libmpack-${V}
FLAVORS = lua52 lua53
FLAVOR ?=
WANTLIB += ${MODLUA_WANTLIB} m
MODULES = lang/lua
RUN_DEPENDS += libmpack->=${V}:devel/libmpack/main
WRKSRC = ${WRKDIST}/binding/lua
MAKE_FLAGS += USE_SYSTEM_LUA=yes \
LUA_VERSION_MAJ_MIN=${MODLUA_VERSION:S/.//}
# The install target installs in the wrong place. Since it is just one file,
# it is easier to use a custom target than to patch and SUBST_CMD.
do-install:
${INSTALL_DATA_DIR} ${MODLUA_LIBDIR}
${INSTALL_DATA} ${WRKSRC}/mpack.so ${MODLUA_LIBDIR}
# There is a Lua binding test suite written in the "busted framework", which we
# don't yet have in-tree. Until it is, we have our own (minimal) test.
TEST_DEPENDS += ${FULLPKGNAME}:${BASE_PKGPATH}
do-test:
${MODLUA_BIN} ${FILESDIR}/test.lua
.include <bsd.port.mk>

View file

@ -0,0 +1,2 @@
SHA256 (libmpack-1.0.3.tar.gz) = Zeshz6kxMgSsUpbjswXXUrhCLHJLY3XK7MY4XwptbiI=
SIZE (libmpack-1.0.3.tar.gz) = 45720

View file

@ -0,0 +1,22 @@
-- Minimal test for lua bindings
local mpack = require('mpack')
local pack = mpack.Packer()
local unpack = mpack.Unpacker()
local input = {one=1, two=2, eleven=11, eighty=80}
local bdata = pack(input)
local output = unpack(bdata)
local n=0
for k,v in pairs(output) do
n=n+1
end
assert(n, 4)
assert(output["one"] == 1)
assert(output["two"] == 2)
assert(output["eleven"] == 11)
assert(output["eighty"] == 80)
print("Lua binding test passed")

View file

@ -0,0 +1,5 @@
--- .config/release.mk.orig Tue Jan 17 22:17:32 2017
+++ .config/release.mk Tue Jan 17 22:17:38 2017
@@ -1 +1 @@
-XCFLAGS += -O3 -DNDEBUG
+XCFLAGS += -DNDEBUG

View file

@ -0,0 +1,13 @@
--- binding/lua/Makefile.orig Sun Sep 18 21:09:16 2016
+++ binding/lua/Makefile Thu Dec 29 16:24:17 2016
@@ -33,8 +33,8 @@ CFLAGS ?= -ansi -O0 -g3 -Wall -Wextra -Werror -Wconver
-Wstrict-prototypes -Wno-unused-parameter -pedantic
CFLAGS += -fPIC -DMPACK_DEBUG_REGISTRY_LEAK
-LUA_INCLUDE := $(shell $(PKG_CONFIG) --cflags lua-$(LUA_VERSION_MAJ_MIN) 2>/dev/null || echo "-I/usr/include/lua$(LUA_VERSION_MAJ_MIN)")
-LUA_LIB := $(shell $(PKG_CONFIG) --libs lua-$(LUA_VERSION_MAJ_MIN) 2>/dev/null || echo "-llua$(LUA_VERSION_MAJ_MIN)")
+LUA_INCLUDE := $(shell $(PKG_CONFIG) --cflags lua$(LUA_VERSION_MAJ_MIN) 2>/dev/null || echo "-I/usr/include/lua$(LUA_VERSION_MAJ_MIN)")
+LUA_LIB := $(shell $(PKG_CONFIG) --libs lua$(LUA_VERSION_MAJ_MIN) 2>/dev/null || echo "-llua$(LUA_VERSION_MAJ_MIN)")
INCLUDES = $(LUA_INCLUDE)
LIBS = $(LUA_LIB)

View file

@ -0,0 +1 @@
Lua bindings to libmpack.

View file

@ -0,0 +1 @@
lib/lua/${MODLUA_VERSION}/mpack.so