SecBSD's official ports repository
This commit is contained in:
commit
2c0afcbbf3
64331 changed files with 5339189 additions and 0 deletions
10
devel/libmpack/Makefile
Normal file
10
devel/libmpack/Makefile
Normal file
|
@ -0,0 +1,10 @@
|
|||
# The SUBDIRs used here fetch the same distfile. Although we could have used a
|
||||
# single directory, the mix of SUBPACKAGES and Lua FLAVORS makes the port
|
||||
# somewhat complicated. We opted to keep it simple and split them out.
|
||||
|
||||
SUBDIR = main
|
||||
SUBDIR += lua
|
||||
SUBDIR += lua,lua52
|
||||
SUBDIR += lua,lua53
|
||||
|
||||
.include <bsd.port.subdir.mk>
|
15
devel/libmpack/Makefile.inc
Normal file
15
devel/libmpack/Makefile.inc
Normal file
|
@ -0,0 +1,15 @@
|
|||
V ?= 1.0.3
|
||||
|
||||
GH_ACCOUNT ?= tarruda
|
||||
GH_PROJECT ?= libmpack
|
||||
GH_TAGNAME ?= ${V}
|
||||
|
||||
CATEGORIES ?= devel
|
||||
HOMEPAGE ?= https://github.com/tarruda/libmpack
|
||||
|
||||
# MIT
|
||||
PERMIT_PACKAGE ?= Yes
|
||||
|
||||
USE_GMAKE ?= Yes
|
||||
|
||||
MAKE_FLAGS ?= config=release
|
28
devel/libmpack/lua/Makefile
Normal file
28
devel/libmpack/lua/Makefile
Normal 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>
|
2
devel/libmpack/lua/distinfo
Normal file
2
devel/libmpack/lua/distinfo
Normal file
|
@ -0,0 +1,2 @@
|
|||
SHA256 (libmpack-1.0.3.tar.gz) = Zeshz6kxMgSsUpbjswXXUrhCLHJLY3XK7MY4XwptbiI=
|
||||
SIZE (libmpack-1.0.3.tar.gz) = 45720
|
22
devel/libmpack/lua/files/test.lua
Normal file
22
devel/libmpack/lua/files/test.lua
Normal 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")
|
5
devel/libmpack/lua/patches/patch-_config_release_mk
Normal file
5
devel/libmpack/lua/patches/patch-_config_release_mk
Normal 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
|
13
devel/libmpack/lua/patches/patch-binding_lua_Makefile
Normal file
13
devel/libmpack/lua/patches/patch-binding_lua_Makefile
Normal 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)
|
||||
|
1
devel/libmpack/lua/pkg/DESCR
Normal file
1
devel/libmpack/lua/pkg/DESCR
Normal file
|
@ -0,0 +1 @@
|
|||
Lua bindings to libmpack.
|
1
devel/libmpack/lua/pkg/PLIST
Normal file
1
devel/libmpack/lua/pkg/PLIST
Normal file
|
@ -0,0 +1 @@
|
|||
lib/lua/${MODLUA_VERSION}/mpack.so
|
5
devel/libmpack/main/Makefile
Normal file
5
devel/libmpack/main/Makefile
Normal file
|
@ -0,0 +1,5 @@
|
|||
COMMENT = simple implementation of msgpack in C
|
||||
|
||||
SHARED_LIBS += mpack 0.0
|
||||
|
||||
.include <bsd.port.mk>
|
2
devel/libmpack/main/distinfo
Normal file
2
devel/libmpack/main/distinfo
Normal file
|
@ -0,0 +1,2 @@
|
|||
SHA256 (libmpack-1.0.3.tar.gz) = Zeshz6kxMgSsUpbjswXXUrhCLHJLY3XK7MY4XwptbiI=
|
||||
SIZE (libmpack-1.0.3.tar.gz) = 45720
|
45
devel/libmpack/main/patches/patch-Makefile
Normal file
45
devel/libmpack/main/patches/patch-Makefile
Normal file
|
@ -0,0 +1,45 @@
|
|||
--- Makefile.orig Sun Sep 18 21:09:16 2016
|
||||
+++ Makefile Thu Dec 29 15:48:41 2016
|
||||
@@ -68,8 +68,14 @@ PROFOUT := $(OUTDIR)/gprof.txt
|
||||
TEST_FILTER_OUT := --coverage -ansi -std=c99
|
||||
|
||||
.PHONY: all
|
||||
-all: lib-bin test-bin
|
||||
+all: dirs lib-bin test-bin
|
||||
|
||||
+.PHONY: dirs
|
||||
+dirs:
|
||||
+ mkdir -p $(BINDIR)/$(config)/src/.libs
|
||||
+ mkdir -p $(BINDIR)/$(config)/test/.libs
|
||||
+ mkdir -p $(BINDIR)/$(config)/test/deps/tap/.libs
|
||||
+
|
||||
include .config/$(config).mk
|
||||
|
||||
.PHONY: tools
|
||||
@@ -109,19 +115,19 @@ compile_commands.json:
|
||||
|
||||
.PHONY: install
|
||||
install: install-inc install-lib
|
||||
- $(LIBTOOL) --mode=finish '$(DESTDIR)$(LIBDIR)'
|
||||
+ $(LIBTOOL) --mode=finish '$(LIBDIR)'
|
||||
|
||||
.PHONY: install-inc
|
||||
install-inc: $(AMALG_H) mpack.pc.in
|
||||
- mkdir -p '$(DESTDIR)$(INCDIR)'
|
||||
- install -m644 $(AMALG_H) '$(DESTDIR)$(INCDIR)'
|
||||
- mkdir -p '$(DESTDIR)$(LIBDIR)/pkgconfig'
|
||||
- sed 's,@VERSION@,$(VERSION),;s,@LIBDIR@,$(LIBDIR),;s,@INCDIR@,$(INCDIR),' <mpack.pc.in >'$(DESTDIR)$(LIBDIR)/pkgconfig/mpack.pc'
|
||||
+ mkdir -p '$(INCDIR)'
|
||||
+ install -m644 $(AMALG_H) '$(INCDIR)'
|
||||
+ mkdir -p '$(LIBDIR)/pkgconfig'
|
||||
+ sed 's,@VERSION@,$(VERSION),;s,@LIBDIR@,$(LIBDIR),;s,@INCDIR@,$(INCDIR),' <mpack.pc.in >'$(LIBDIR)/pkgconfig/mpack.pc'
|
||||
|
||||
.PHONY: install-lib
|
||||
install-lib: $(LIB)
|
||||
- mkdir -p '$(DESTDIR)$(LIBDIR)'
|
||||
- $(LIBTOOL) --mode=install cp $(LIB) '$(DESTDIR)$(LIBDIR)/$(LIBRARY)'
|
||||
+ mkdir -p '$(LIBDIR)'
|
||||
+ $(LIBTOOL) --mode=install cp $(LIB) '$(LIBDIR)/$(LIBRARY)'
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
5
devel/libmpack/main/patches/patch-_config_release_mk
Normal file
5
devel/libmpack/main/patches/patch-_config_release_mk
Normal 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
|
2
devel/libmpack/main/pkg/DESCR
Normal file
2
devel/libmpack/main/pkg/DESCR
Normal file
|
@ -0,0 +1,2 @@
|
|||
libmpack is a small binary serialization/RPC library that implements both the
|
||||
msgpack and msgpack-rpc specifications.
|
5
devel/libmpack/main/pkg/PLIST
Normal file
5
devel/libmpack/main/pkg/PLIST
Normal file
|
@ -0,0 +1,5 @@
|
|||
include/mpack.h
|
||||
lib/libmpack.a
|
||||
lib/libmpack.la
|
||||
@lib lib/libmpack.so.${LIBmpack_VERSION}
|
||||
lib/pkgconfig/mpack.pc
|
Loading…
Add table
Add a link
Reference in a new issue