FreeBSD Bugzilla – Attachment 244066 Details for
Bug 273114
lang/python310: backport netlink support
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
lang/python3.10: backport netlink support
0001-lang-python3.10-backport-netlink-patch.patch (text/plain), 3.60 KB, created by
Mina Galić
on 2023-08-13 19:21:44 UTC
(
hide
)
Description:
lang/python3.10: backport netlink support
Filename:
MIME Type:
Creator:
Mina Galić
Created:
2023-08-13 19:21:44 UTC
Size:
3.60 KB
patch
obsolete
>From 6d94f11bbb5a8ad3388b6e944695510c442882c0 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Mina=20Gali=C4=87?= <freebsd@igalic.co> >Date: Sun, 13 Aug 2023 18:09:22 +0000 >Subject: [PATCH] lang/python3.10: backport netlink patch > >this patch backports GH-107812: extend socket's netlink support to FreeBSD >see https://github.com/python/cpython/pull/107813 >for the patch. > >see https://github.com/python/cpython/issues/107812 >for the discussion on the backport itself. >--- > lang/python310/Makefile | 1 + > .../files/patch-Modules__socketmodule.h | 11 ++++++++ > lang/python310/files/patch-configure | 26 +++++++++++++++++++ > lang/python310/files/patch-pyconfig.h.in | 12 +++++++++ > 4 files changed, 50 insertions(+) > create mode 100644 lang/python310/files/patch-Modules__socketmodule.h > create mode 100644 lang/python310/files/patch-pyconfig.h.in > >diff --git a/lang/python310/Makefile b/lang/python310/Makefile >index d6b858721..6c082e44c 100644 >--- a/lang/python310/Makefile >+++ b/lang/python310/Makefile >@@ -1,5 +1,6 @@ > PORTNAME= python > DISTVERSION= ${PYTHON_DISTVERSION} >+PORTREVISION= 1 > CATEGORIES= lang python > MASTER_SITES= PYTHON/ftp/python/${DISTVERSION:C/[a-z].*//} > PKGNAMESUFFIX= ${PYTHON_SUFFIX} >diff --git a/lang/python310/files/patch-Modules__socketmodule.h b/lang/python310/files/patch-Modules__socketmodule.h >new file mode 100644 >index 000000000..d26c8d95c >--- /dev/null >+++ b/lang/python310/files/patch-Modules__socketmodule.h >@@ -0,0 +1,11 @@ >+--- Modules/socketmodule.h.orig >++++ Modules/socketmodule.h >+@@ -91,6 +91,8 @@ typedef int socklen_t; >+ # include <asm/types.h> >+ # endif >+ # include <linux/netlink.h> >++#elif defined(HAVE_NETLINK_NETLINK_H) >++# include <netlink/netlink.h> >+ #else >+ # undef AF_NETLINK >+ #endif >diff --git a/lang/python310/files/patch-configure b/lang/python310/files/patch-configure >index 1890947cf..ee95b3ad7 100644 >--- a/lang/python310/files/patch-configure >+++ b/lang/python310/files/patch-configure >@@ -12,6 +12,32 @@ introduces hidden dependency and breaks build > > if test -n "$ac_tool_prefix"; then > # Extract the first word of "${ac_tool_prefix}llvm-ar", so it can be a program name with args. >+@@ -8370,9 +8370,11 @@ done >+ >+ >+ # On Linux, netlink.h requires asm/types.h >+-for ac_header in linux/netlink.h >++# On FreeBSD, netlink.h is located in netlink/netlink.h >++for ac_header in linux/netlink.h netlink/netlink.h >+ do : >+- ac_fn_c_check_header_compile "$LINENO" "linux/netlink.h" "ac_cv_header_linux_netlink_h" " >++ 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" " >+ #ifdef HAVE_ASM_TYPES_H >+ #include <asm/types.h> >+ #endif >+@@ -8381,9 +8383,9 @@ do : >+ #endif >+ >+ " >+-if test "x$ac_cv_header_linux_netlink_h" = xyes; then : >++if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : >+ cat >>confdefs.h <<_ACEOF >+-#define HAVE_LINUX_NETLINK_H 1 >++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 >+ _ACEOF >+ >+ fi > @@ -10123,7 +10123,7 @@ fi > # Dynamic linking for HP-UX > >diff --git a/lang/python310/files/patch-pyconfig.h.in b/lang/python310/files/patch-pyconfig.h.in >new file mode 100644 >index 000000000..9d97369d4 >--- /dev/null >+++ b/lang/python310/files/patch-pyconfig.h.in >@@ -0,0 +1,12 @@ >+--- pyconfig.h.in.orig >++++ pyconfig.h.in >+@@ -745,6 +745,9 @@ >+ /* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */ >+ #undef HAVE_NDIR_H >+ >++/* Define to 1 if you have the <netlink/netlink.h> header file. */ >++#undef HAVE_NETLINK_NETLINK_H >++ >+ /* Define to 1 if you have the <netpacket/packet.h> header file. */ >+ #undef HAVE_NETPACKET_PACKET_H >+ >-- >2.41.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 273114
:
244064
|
244066
|
245291