diff options
author | bouyer <bouyer@pkgsrc.org> | 2021-05-22 11:36:01 +0000 |
---|---|---|
committer | bouyer <bouyer@pkgsrc.org> | 2021-05-22 11:36:01 +0000 |
commit | fb354c35059fd3a53f790efb9b76b782621afa90 (patch) | |
tree | 4a1c294ea3ae0e08534e75fcd0783b741f3f5108 | |
parent | 729530cfe91b902a6b24d00a76d8745429f47c7e (diff) | |
download | pkgsrc-fb354c35059fd3a53f790efb9b76b782621afa90.tar.gz |
Properly detect and use NetBSD's socketcan implementation.
Bump PKGREVISION
-rw-r--r-- | lang/python39/Makefile | 4 | ||||
-rw-r--r-- | lang/python39/distinfo | 8 | ||||
-rw-r--r-- | lang/python39/patches/patch-Modules_socketmodule.c | 17 | ||||
-rw-r--r-- | lang/python39/patches/patch-Modules_socketmodule.h | 24 | ||||
-rw-r--r-- | lang/python39/patches/patch-configure | 26 |
5 files changed, 48 insertions, 31 deletions
diff --git a/lang/python39/Makefile b/lang/python39/Makefile index a36694c3921..b2f870e87a8 100644 --- a/lang/python39/Makefile +++ b/lang/python39/Makefile @@ -1,9 +1,9 @@ -# $NetBSD: Makefile,v 1.7 2021/05/20 06:56:43 triaxx Exp $ +# $NetBSD: Makefile,v 1.8 2021/05/22 11:36:01 bouyer Exp $ .include "dist.mk" PKGNAME= python39-${PY_DISTVERSION} -PKGREVISION= 1 +PKGREVISION= 2 CATEGORIES= lang python MAINTAINER= pkgsrc-users@NetBSD.org diff --git a/lang/python39/distinfo b/lang/python39/distinfo index 804a8b9f4bb..15aec7a906b 100644 --- a/lang/python39/distinfo +++ b/lang/python39/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.10 2021/05/20 06:56:43 triaxx Exp $ +$NetBSD: distinfo,v 1.11 2021/05/22 11:36:01 bouyer Exp $ SHA1 (Python-3.9.5.tar.xz) = edc80e5e33fc3d3fae53e6b95ae4ca9277809b9b RMD160 (Python-3.9.5.tar.xz) = 3c7bf2d7bcea98a8a749ef19ce7da429a7ca2c08 @@ -14,9 +14,9 @@ SHA1 (patch-Makefile.pre.in) = d42f9f5bca1dd663f64122dc95b49111452fe6e8 SHA1 (patch-Modules___ssl.c) = f241ba148e4c244a641386be5ac07817b03f04f7 SHA1 (patch-Modules_makesetup) = a06786eebffadecedba5e3a50a9785fb47613567 SHA1 (patch-Modules_nismodule.c) = 1bafe9b06359586d027a77011b103877590d947d -SHA1 (patch-Modules_socketmodule.c) = 02c447f980a08e2185df78d2f13373574f414304 -SHA1 (patch-Modules_socketmodule.h) = 61fe96a79d4ccf3e7768eb79dd7e29a50a85328b +SHA1 (patch-Modules_socketmodule.c) = 98882462db1b1fe3141219206980aa9ae56ffce2 +SHA1 (patch-Modules_socketmodule.h) = 8761c7238bc74e45adefb6e647dc3b39b7bdd81c SHA1 (patch-Python_thread__pthread.h) = fb81eaa604b4ed7c1b64c3f4731d58a8aee257be -SHA1 (patch-configure) = e4e29932f2cc8e1cec1a657220562e6d43e4f55c +SHA1 (patch-configure) = d44439b22e8444141e2632b9fd9b1f343b38b712 SHA1 (patch-pyconfig.h.in) = 2f06af7358690b46eaff404226b898962b049a0e SHA1 (patch-setup.py) = 0ea2e4183f7c11ff893ca302aafe8bb9bea80d6c diff --git a/lang/python39/patches/patch-Modules_socketmodule.c b/lang/python39/patches/patch-Modules_socketmodule.c index 0cf18d12ec0..94734669c52 100644 --- a/lang/python39/patches/patch-Modules_socketmodule.c +++ b/lang/python39/patches/patch-Modules_socketmodule.c @@ -1,10 +1,19 @@ -$NetBSD: patch-Modules_socketmodule.c,v 1.1 2020/10/10 20:20:12 adam Exp $ +$NetBSD: patch-Modules_socketmodule.c,v 1.2 2021/05/22 11:36:01 bouyer Exp $ Support NetBSD's socketcan implementation ---- Modules/socketmodule.c.orig 2020-10-05 15:07:58.000000000 +0000 -+++ Modules/socketmodule.c -@@ -7826,6 +7826,20 @@ PyInit__socket(void) +--- Modules/socketmodule.c.orig 2021-05-03 16:54:42.000000000 +0200 ++++ Modules/socketmodule.c 2021-05-22 12:11:03.509965978 +0200 +@@ -2157,7 +2157,7 @@ + PyObject *interfaceName; + struct ifreq ifr; + Py_ssize_t len; +- struct sockaddr_can *addr = &addrbuf->can; ++ struct sockaddr_can *addr = (struct sockaddr_can *)addrbuf; + + if (!PyTuple_Check(args)) { + PyErr_Format(PyExc_TypeError, +@@ -7827,6 +7827,20 @@ PyModule_AddIntMacro(m, J1939_FILTER_MAX); #endif diff --git a/lang/python39/patches/patch-Modules_socketmodule.h b/lang/python39/patches/patch-Modules_socketmodule.h index e17f155dbc0..8e9db5db542 100644 --- a/lang/python39/patches/patch-Modules_socketmodule.h +++ b/lang/python39/patches/patch-Modules_socketmodule.h @@ -1,17 +1,15 @@ -$NetBSD: patch-Modules_socketmodule.h,v 1.1 2020/10/10 20:20:12 adam Exp $ +$NetBSD: patch-Modules_socketmodule.h,v 1.2 2021/05/22 11:36:01 bouyer Exp $ Support NetBSD's socketcan implementation ---- Modules/socketmodule.h.orig 2020-10-05 15:07:58.000000000 +0000 -+++ Modules/socketmodule.h -@@ -148,6 +148,10 @@ typedef int socklen_t; - #include <linux/can/j1939.h> - #endif +--- Modules/socketmodule.h.orig 2021-05-03 16:54:42.000000000 +0200 ++++ Modules/socketmodule.h 2021-05-22 11:52:19.072276647 +0200 +@@ -131,6 +131,8 @@ -+#ifdef HAVE_NETCAN_CAN_H -+#include <netcan/can.h> -+#endif -+ - #ifdef HAVE_SYS_SYS_DOMAIN_H - #include <sys/sys_domain.h> - #endif + #ifdef HAVE_LINUX_CAN_H + # include <linux/can.h> ++#elif defined(HAVE_NETCAN_CAN_H) ++# include <netcan/can.h> + #else + # undef AF_CAN + # undef PF_CAN diff --git a/lang/python39/patches/patch-configure b/lang/python39/patches/patch-configure index 9fa9860407e..d28f3841fe2 100644 --- a/lang/python39/patches/patch-configure +++ b/lang/python39/patches/patch-configure @@ -1,13 +1,14 @@ -$NetBSD: patch-configure,v 1.5 2021/04/03 06:23:13 adam Exp $ +$NetBSD: patch-configure,v 1.6 2021/05/22 11:36:01 bouyer Exp $ Use gnu99 instead of c99 to avoid "alloca() undefined" problems. Fix linking on Darwin; don't use -stack_size. Changes for consistency across pkgsrc platforms. Simplify _sysconfigdata to include only platform name. +detect netcan/can.h on NetBSD ---- configure.orig 2021-04-02 09:51:53.000000000 +0000 -+++ configure -@@ -6961,7 +6961,7 @@ UNIVERSAL_ARCH_FLAGS= +--- configure.orig 2021-05-03 16:54:42.000000000 +0200 ++++ configure 2021-05-22 11:50:33.365792903 +0200 +@@ -6964,7 +6964,7 @@ # tweak BASECFLAGS based on compiler and platform case $GCC in yes) @@ -16,7 +17,16 @@ Simplify _sysconfigdata to include only platform name. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5 $as_echo_n "checking for -Wextra... " >&6; } -@@ -9650,7 +9650,6 @@ then +@@ -8344,7 +8344,7 @@ + + + # On Linux, can.h, can/bcm.h, can/j1939.h, can/raw.h require sys/socket.h +-for ac_header in linux/can.h linux/can/bcm.h linux/can/j1939.h linux/can/raw.h ++for ac_header in linux/can.h linux/can/bcm.h linux/can/j1939.h linux/can/raw.h netcan/can.h + do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` + ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " +@@ -9655,7 +9655,6 @@ # to ensure that tests don't crash # Note: This matches the value of THREAD_STACK_SIZE in # thread_pthread.h @@ -24,7 +34,7 @@ Simplify _sysconfigdata to include only platform name. if test "$enable_framework" then -@@ -14495,10 +14494,10 @@ _ACEOF +@@ -14500,10 +14499,10 @@ if ac_fn_c_try_compile "$LINENO"; then : @@ -37,7 +47,7 @@ Simplify _sysconfigdata to include only platform name. if test "$ax_cv_c_float_words_bigendian" = unknown; then ax_cv_c_float_words_bigendian=no else -@@ -15383,7 +15382,7 @@ _ACEOF +@@ -15388,7 +15387,7 @@ fi @@ -46,7 +56,7 @@ Simplify _sysconfigdata to include only platform name. { $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5 $as_echo_n "checking LDVERSION... " >&6; } -@@ -15436,11 +15435,7 @@ fi +@@ -15441,11 +15440,7 @@ |