diff options
author | khorben <khorben@pkgsrc.org> | 2021-05-13 19:35:54 +0000 |
---|---|---|
committer | khorben <khorben@pkgsrc.org> | 2021-05-13 19:35:54 +0000 |
commit | f39072dc05424011dbf06507517a5d3a8bd5e423 (patch) | |
tree | 06f7ac4b45ced95bf6a32a68c66b89664fdf39a5 /net/py-pynng | |
parent | 944f990b5007590d3f1aace953ab186036c211a3 (diff) | |
download | pkgsrc-f39072dc05424011dbf06507517a5d3a8bd5e423.tar.gz |
py-pynng: fix build on NetBSD
Needs a PKGREVISION bump as missing dependencies were registered as well.
Diffstat (limited to 'net/py-pynng')
-rw-r--r-- | net/py-pynng/Makefile | 9 | ||||
-rw-r--r-- | net/py-pynng/distinfo | 6 | ||||
-rw-r--r-- | net/py-pynng/patches/patch-build__pynng.py | 17 | ||||
-rw-r--r-- | net/py-pynng/patches/patch-mbedtls_library_net__sockets.c | 17 | ||||
-rw-r--r-- | net/py-pynng/patches/patch-nng_src_platform_posix_posix__thread.c | 19 | ||||
-rw-r--r-- | net/py-pynng/patches/patch-setup.py | 14 |
6 files changed, 80 insertions, 2 deletions
diff --git a/net/py-pynng/Makefile b/net/py-pynng/Makefile index 2029d8112c2..13984925183 100644 --- a/net/py-pynng/Makefile +++ b/net/py-pynng/Makefile @@ -1,7 +1,8 @@ -# $NetBSD: Makefile,v 1.2 2021/05/11 21:06:15 khorben Exp $ +# $NetBSD: Makefile,v 1.3 2021/05/13 19:35:54 khorben Exp $ DISTNAME= pynng-0.7.1 PKGNAME= ${PYPKGPREFIX}-${DISTNAME} +PKGREVISION= 1 CATEGORIES= net python MASTER_SITES= ${MASTER_SITE_PYPI:=p/pynng/} @@ -10,7 +11,13 @@ HOMEPAGE= https://github.com/codypiersall/pynng COMMENT= Ergonomic bindings for nanomsg next generation (nng) in Python LICENSE= mit +USE_TOOLS+= cmake + +DEPENDS+= ${PYPKGPREFIX}-sniffio-[0-9]*:../../misc/py-sniffio + PYTHON_VERSIONS_INCOMPATIBLE= 27 .include "../../lang/python/egg.mk" +.include "../../mk/atomic64.mk" +.include "../../mk/pthread.buildlink3.mk" .include "../../mk/bsd.pkg.mk" diff --git a/net/py-pynng/distinfo b/net/py-pynng/distinfo index 475db45af71..68e9c620c8e 100644 --- a/net/py-pynng/distinfo +++ b/net/py-pynng/distinfo @@ -1,6 +1,10 @@ -$NetBSD: distinfo,v 1.1 2021/05/11 08:56:00 khorben Exp $ +$NetBSD: distinfo,v 1.2 2021/05/13 19:35:54 khorben Exp $ SHA1 (pynng-0.7.1.tar.gz) = 306806f168cc064f830e064b2b748550cb726bf9 RMD160 (pynng-0.7.1.tar.gz) = 79f7e542b2cf2db0c9b93ce67fe3d979a58f55a6 SHA512 (pynng-0.7.1.tar.gz) = 72fc89902474dee6b2ae31cf8e572cd15deead170d8eacba73716b0df0ae3a24611fc1be9d098910cbe4a47dfff1e4a5f98cf8aeca946c469d80a2ae24c35b5f Size (pynng-0.7.1.tar.gz) = 3815296 bytes +SHA1 (patch-build__pynng.py) = 9cb7216c90eb795934747272e0a9cf35d01aefee +SHA1 (patch-mbedtls_library_net__sockets.c) = d4edd8bb86b78254994f7505abd6155ccdd947ce +SHA1 (patch-nng_src_platform_posix_posix__thread.c) = e7df7ed999a4f9c9681f1456094a1e8dbff04547 +SHA1 (patch-setup.py) = c4dc8905bd304527b75ce53b39b70025be208714 diff --git a/net/py-pynng/patches/patch-build__pynng.py b/net/py-pynng/patches/patch-build__pynng.py new file mode 100644 index 00000000000..476801ad3dc --- /dev/null +++ b/net/py-pynng/patches/patch-build__pynng.py @@ -0,0 +1,17 @@ +$NetBSD: patch-build__pynng.py,v 1.1 2021/05/13 19:35:54 khorben Exp $ + +Fix build on NetBSD + +--- build_pynng.py.orig 2020-12-17 03:54:43.000000000 +0000 ++++ build_pynng.py +@@ -28,8 +28,8 @@ else: + machine = os.uname().machine + # this is a pretty heuristic... but let's go with it anyway. + # it would be better to get linker information from cmake somehow. +- if not ('x86' in machine or 'i386' in machine or 'i686' in machine): +- libraries.append('atomic') ++ #if not ('x86' in machine or 'i386' in machine or 'i686' in machine): ++ # libraries.append('atomic') + + + ffibuilder.set_source( diff --git a/net/py-pynng/patches/patch-mbedtls_library_net__sockets.c b/net/py-pynng/patches/patch-mbedtls_library_net__sockets.c new file mode 100644 index 00000000000..48b74fe6a71 --- /dev/null +++ b/net/py-pynng/patches/patch-mbedtls_library_net__sockets.c @@ -0,0 +1,17 @@ +$NetBSD: patch-mbedtls_library_net__sockets.c,v 1.1 2021/05/13 19:35:54 khorben Exp $ + +Fix build on NetBSD + +--- mbedtls/library/net_sockets.c.orig 2020-08-27 02:34:52.000000000 +0000 ++++ mbedtls/library/net_sockets.c +@@ -24,6 +24,10 @@ + * Harmless on other platforms. */ + #define _POSIX_C_SOURCE 200112L + ++#if defined(__NetBSD__) ++# define _NETBSD_SOURCE ++#endif ++ + #if !defined(MBEDTLS_CONFIG_FILE) + #include "mbedtls/config.h" + #else diff --git a/net/py-pynng/patches/patch-nng_src_platform_posix_posix__thread.c b/net/py-pynng/patches/patch-nng_src_platform_posix_posix__thread.c new file mode 100644 index 00000000000..11ee7ed7e2f --- /dev/null +++ b/net/py-pynng/patches/patch-nng_src_platform_posix_posix__thread.c @@ -0,0 +1,19 @@ +$NetBSD: patch-nng_src_platform_posix_posix__thread.c,v 1.1 2021/05/13 19:35:54 khorben Exp $ + +Fix build on NetBSD + +--- nng/src/platform/posix/posix_thread.c.orig 2020-08-27 02:35:02.000000000 +0000 ++++ nng/src/platform/posix/posix_thread.c +@@ -268,6 +268,12 @@ nni_plat_thr_set_name(nni_plat_thr *thr, + if ((thr == NULL) || (pthread_self() == thr->tid)) { + pthread_setname_np(name); + } ++#elif defined(__NetBSD__) ++ if (thr == NULL) { ++ pthread_setname_np(pthread_self(), "%s", name); ++ } else { ++ pthread_setname_np(thr->tid, "%s", name); ++ } + #else + if (thr == NULL) { + pthread_setname_np(pthread_self(), name); diff --git a/net/py-pynng/patches/patch-setup.py b/net/py-pynng/patches/patch-setup.py new file mode 100644 index 00000000000..bc35e4a5c35 --- /dev/null +++ b/net/py-pynng/patches/patch-setup.py @@ -0,0 +1,14 @@ +$NetBSD: patch-setup.py,v 1.1 2021/05/13 19:35:54 khorben Exp $ + +Fix build on NetBSD + +--- setup.py.orig 2021-03-27 21:43:27.000000000 +0000 ++++ setup.py +@@ -44,6 +44,7 @@ def build_mbedtls(cmake_args): + cmake_cmd = ['cmake'] + cmake_args + cmake_cmd += [ + '-DENABLE_PROGRAMS=OFF', ++ '-DENABLE_TESTING=OFF', + '-DCMAKE_BUILD_TYPE=Release', + '-DCMAKE_INSTALL_PREFIX=../prefix', + '..' |