pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/net/py-pynng py-pynng: fix build on NetBSD
details: https://anonhg.NetBSD.org/pkgsrc/rev/88b5135ed4d6
branches: trunk
changeset: 452607:88b5135ed4d6
user: khorben <khorben%pkgsrc.org@localhost>
date: Thu May 13 19:35:54 2021 +0000
description:
py-pynng: fix build on NetBSD
Needs a PKGREVISION bump as missing dependencies were registered as well.
diffstat:
net/py-pynng/Makefile | 9 ++++-
net/py-pynng/distinfo | 6 ++-
net/py-pynng/patches/patch-build__pynng.py | 17 ++++++++
net/py-pynng/patches/patch-mbedtls_library_net__sockets.c | 17 ++++++++
net/py-pynng/patches/patch-nng_src_platform_posix_posix__thread.c | 19 ++++++++++
net/py-pynng/patches/patch-setup.py | 14 +++++++
6 files changed, 80 insertions(+), 2 deletions(-)
diffs (125 lines):
diff -r 8b6f67c9adc3 -r 88b5135ed4d6 net/py-pynng/Makefile
--- a/net/py-pynng/Makefile Thu May 13 18:57:27 2021 +0000
+++ b/net/py-pynng/Makefile Thu May 13 19:35:54 2021 +0000
@@ -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 @@
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 -r 8b6f67c9adc3 -r 88b5135ed4d6 net/py-pynng/distinfo
--- a/net/py-pynng/distinfo Thu May 13 18:57:27 2021 +0000
+++ b/net/py-pynng/distinfo Thu May 13 19:35:54 2021 +0000
@@ -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 -r 8b6f67c9adc3 -r 88b5135ed4d6 net/py-pynng/patches/patch-build__pynng.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/py-pynng/patches/patch-build__pynng.py Thu May 13 19:35:54 2021 +0000
@@ -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 -r 8b6f67c9adc3 -r 88b5135ed4d6 net/py-pynng/patches/patch-mbedtls_library_net__sockets.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/py-pynng/patches/patch-mbedtls_library_net__sockets.c Thu May 13 19:35:54 2021 +0000
@@ -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 -r 8b6f67c9adc3 -r 88b5135ed4d6 net/py-pynng/patches/patch-nng_src_platform_posix_posix__thread.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/py-pynng/patches/patch-nng_src_platform_posix_posix__thread.c Thu May 13 19:35:54 2021 +0000
@@ -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 -r 8b6f67c9adc3 -r 88b5135ed4d6 net/py-pynng/patches/patch-setup.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/py-pynng/patches/patch-setup.py Thu May 13 19:35:54 2021 +0000
@@ -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',
+ '..'
Home |
Main Index |
Thread Index |
Old Index