From bcee5c2b00bcd5f00f1e69670dd3bf890e17bb8f Mon Sep 17 00:00:00 2001 From: nia Date: Wed, 20 Apr 2022 17:56:29 +0000 Subject: devel: add libmpack libmpack is a small binary serialization/RPC library that implements both the msgpack and msgpack-rpc specifications. --- devel/Makefile | 3 ++- devel/libmpack/DESCR | 2 ++ devel/libmpack/Makefile | 17 +++++++++++++++++ devel/libmpack/PLIST | 4 ++++ devel/libmpack/buildlink3.mk | 12 ++++++++++++ devel/libmpack/distinfo | 6 ++++++ devel/libmpack/patches/patch-test_deps_tap_tap.c | 21 +++++++++++++++++++++ 7 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 devel/libmpack/DESCR create mode 100644 devel/libmpack/Makefile create mode 100644 devel/libmpack/PLIST create mode 100644 devel/libmpack/buildlink3.mk create mode 100644 devel/libmpack/distinfo create mode 100644 devel/libmpack/patches/patch-test_deps_tap_tap.c (limited to 'devel') diff --git a/devel/Makefile b/devel/Makefile index 68c31e9d066..8bb002b1423 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.3717 2022/04/20 17:41:08 nia Exp $ +# $NetBSD: Makefile,v 1.3718 2022/04/20 17:56:29 nia Exp $ # COMMENT= Development utilities @@ -893,6 +893,7 @@ SUBDIR+= libmemmgr SUBDIR+= libmimedir SUBDIR+= libmm SUBDIR+= libmowgli +SUBDIR+= libmpack SUBDIR+= libmtp SUBDIR+= libnet SUBDIR+= libnet10 diff --git a/devel/libmpack/DESCR b/devel/libmpack/DESCR new file mode 100644 index 00000000000..b3949e7933c --- /dev/null +++ b/devel/libmpack/DESCR @@ -0,0 +1,2 @@ +libmpack is a small binary serialization/RPC library that implements both +the msgpack and msgpack-rpc specifications. diff --git a/devel/libmpack/Makefile b/devel/libmpack/Makefile new file mode 100644 index 00000000000..c7d169653f1 --- /dev/null +++ b/devel/libmpack/Makefile @@ -0,0 +1,17 @@ +# $NetBSD: Makefile,v 1.1 2022/04/20 17:56:29 nia Exp $ + +DISTNAME= libmpack-1.0.5 +CATEGORIES= devel +MASTER_SITES= ${MASTER_SITE_GITHUB:=libmpack/} + +MAINTAINER= pkgsrc-users@NetBSD.org +HOMEPAGE= https://github.com/libmpack/libmpack +COMMENT= Simple implementation of msgpack in C +LICENSE= mit + +USE_LIBTOOL= yes +USE_TOOLS+= gmake + +PKGCONFIG_OVERRIDE+= mpack.pc.in + +.include "../../mk/bsd.pkg.mk" diff --git a/devel/libmpack/PLIST b/devel/libmpack/PLIST new file mode 100644 index 00000000000..19731dff55f --- /dev/null +++ b/devel/libmpack/PLIST @@ -0,0 +1,4 @@ +@comment $NetBSD: PLIST,v 1.1 2022/04/20 17:56:29 nia Exp $ +include/mpack.h +lib/libmpack.la +lib/pkgconfig/mpack.pc diff --git a/devel/libmpack/buildlink3.mk b/devel/libmpack/buildlink3.mk new file mode 100644 index 00000000000..d233d7595c5 --- /dev/null +++ b/devel/libmpack/buildlink3.mk @@ -0,0 +1,12 @@ +# $NetBSD: buildlink3.mk,v 1.1 2022/04/20 17:56:29 nia Exp $ + +BUILDLINK_TREE+= libmpack + +.if !defined(LIBMPACK_BUILDLINK3_MK) +LIBMPACK_BUILDLINK3_MK:= + +BUILDLINK_API_DEPENDS.libmpack+= libmpack>=1.0.0 +BUILDLINK_PKGSRCDIR.libmpack?= ../../devel/libmpack +.endif # LIBMPACK_BUILDLINK3_MK + +BUILDLINK_TREE+= -libmpack diff --git a/devel/libmpack/distinfo b/devel/libmpack/distinfo new file mode 100644 index 00000000000..82c81088e1e --- /dev/null +++ b/devel/libmpack/distinfo @@ -0,0 +1,6 @@ +$NetBSD: distinfo,v 1.1 2022/04/20 17:56:29 nia Exp $ + +RMD160 (libmpack-1.0.5.tar.gz) = 9fe75c368af72d7b96fc6ea03b07ef8daeb41d87 +SHA512 (libmpack-1.0.5.tar.gz) = 6e30edafcacfb580b410bc6749ed7fe8f18b3be0cb98959339853e77bc3ec0cda6df08a0f1f22768cfc773458a2ea6bcef4f0421eea55cf56c58981d13711a04 +Size (libmpack-1.0.5.tar.gz) = 32966 bytes +SHA1 (patch-test_deps_tap_tap.c) = fd935cbc243e54ef02d692fd9d514923cc61de15 diff --git a/devel/libmpack/patches/patch-test_deps_tap_tap.c b/devel/libmpack/patches/patch-test_deps_tap_tap.c new file mode 100644 index 00000000000..aab09762600 --- /dev/null +++ b/devel/libmpack/patches/patch-test_deps_tap_tap.c @@ -0,0 +1,21 @@ +$NetBSD: patch-test_deps_tap_tap.c,v 1.1 2022/04/20 17:56:29 nia Exp $ + +Fix redefinition of MAP_ANONYMOUS +https://github.com/libmpack/libmpack/issues/42 + +--- test/deps/tap/tap.c.orig 2017-03-19 21:48:19.000000000 +0100 ++++ test/deps/tap/tap.c 2020-06-16 19:33:41.583771997 +0200 +@@ -298,8 +298,12 @@ + #include + #include + +-#if defined __APPLE__ || defined BSD ++#ifndef MAP_ANONYMOUS ++#ifdef MAP_ANON + #define MAP_ANONYMOUS MAP_ANON ++#else ++#error "System does not support mapping anonymous pages" ++#endif + #endif + + /* Create a shared memory int to keep track of whether a piece of code executed -- cgit v1.2.3