View | Details | Raw Unified | Return to bug 273132 | Differences between
and this patch

Collapse All | Expand All

(-)b/lang/python38/Makefile (-2 / +3 lines)
Lines 1-5 Link Here
1
PORTNAME=	python
1
PORTNAME=	python
2
DISTVERSION=	${PYTHON_DISTVERSION}
2
DISTVERSION=	${PYTHON_DISTVERSION}
3
PORTREVISION=	1
3
CATEGORIES=	lang python
4
CATEGORIES=	lang python
4
MASTER_SITES=	PYTHON/ftp/python/${DISTVERSION}
5
MASTER_SITES=	PYTHON/ftp/python/${DISTVERSION}
5
PKGNAMESUFFIX=	${PYTHON_SUFFIX}
6
PKGNAMESUFFIX=	${PYTHON_SUFFIX}
Lines 14-21 LICENSE= PSFL Link Here
14
15
15
LIB_DEPENDS=	libffi.so:devel/libffi
16
LIB_DEPENDS=	libffi.so:devel/libffi
16
17
17
USES=		cpe ncurses pathfix pkgconfig python:${PYTHON_DISTVERSION:R},env readline \
18
USES=		autoreconf:2.69 cpe ncurses pathfix pkgconfig python:${PYTHON_DISTVERSION:R},env \
18
		shebangfix ssl tar:xz
19
		readline shebangfix ssl tar:xz
19
PATHFIX_MAKEFILEIN=	Makefile.pre.in
20
PATHFIX_MAKEFILEIN=	Makefile.pre.in
20
USE_LDCONFIG=	yes
21
USE_LDCONFIG=	yes
21
GNU_CONFIGURE=	yes
22
GNU_CONFIGURE=	yes
(-)b/lang/python38/files/patch-0001-GH-107812-netlink-support (+74 lines)
Added Link Here
1
From 2571505b05f8f2970309927a8da29b94f97e7aeb Mon Sep 17 00:00:00 2001
2
From: =?UTF-8?q?Mina=20Gali=C4=87?= <freebsd@igalic.co>
3
Date: Wed, 27 Sep 2023 09:24:50 +0000
4
Subject: [PATCH] GH-107812: extend socket's netlink support to FreeBSD 3.8
5
6
backport GH-107812 to 3.8
7
---
8
 .../2023-08-09-15-37-20.gh-issue-107812.CflAXa.rst   |  1 +
9
 Modules/socketmodule.h                               |  2 ++
10
 configure.ac                                         |  3 ++-
11
 pyconfig.h.in                                        | 12 ++++++++++++
12
 4 files changed, 17 insertions(+), 1 deletion(-)
13
 create mode 100644 Misc/NEWS.d/next/Library/2023-08-09-15-37-20.gh-issue-107812.CflAXa.rst
14
15
diff --git Misc/NEWS.d/next/Library/2023-08-09-15-37-20.gh-issue-107812.CflAXa.rst Misc/NEWS.d/next/Library/2023-08-09-15-37-20.gh-issue-107812.CflAXa.rst
16
new file mode 100644
17
index 0000000000..0aac44fb41
18
--- /dev/null
19
+++ Misc/NEWS.d/next/Library/2023-08-09-15-37-20.gh-issue-107812.CflAXa.rst
20
@@ -0,0 +1 @@
21
+Extend socket's netlink support to the FreeBSD platform.
22
diff --git Modules/socketmodule.h Modules/socketmodule.h
23
index dff1f8f4e9..64dc88883a 100644
24
--- Modules/socketmodule.h
25
+++ Modules/socketmodule.h
26
@@ -50,6 +50,8 @@ typedef int socklen_t;
27
 #  include <asm/types.h>
28
 # endif
29
 # include <linux/netlink.h>
30
+#elif defined(HAVE_NETLINK_NETLINK_H)
31
+# include <netlink/netlink.h>
32
 #else
33
 #  undef AF_NETLINK
34
 #endif
35
diff --git configure.ac configure.ac
36
index de83332dd3..c04f2fb291 100644
37
--- configure.ac
38
+++ configure.ac
39
@@ -2204,7 +2204,8 @@ AC_CHECK_HEADERS([net/if.h], [], [],
40
 ])
41
 
42
 # On Linux, netlink.h requires asm/types.h
43
-AC_CHECK_HEADERS(linux/netlink.h,,,[
44
+# On FreeBSD, netlink.h is located in netlink/netlink.h
45
+AC_CHECK_HEADERS([linux/netlink.h netlink/netlink.h], [], [], [
46
 #ifdef HAVE_ASM_TYPES_H
47
 #include <asm/types.h>
48
 #endif
49
diff --git pyconfig.h.in pyconfig.h.in
50
index 41cfe07902..66e5d65788 100644
51
--- pyconfig.h.in
52
+++ pyconfig.h.in
53
@@ -715,6 +715,18 @@
54
 /* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
55
 #undef HAVE_NDIR_H
56
 
57
+/* Define to 1 if you have the <netcan/can.h> header file. */
58
+#undef HAVE_NETCAN_CAN_H
59
+
60
+/* Define to 1 if you have the <netdb.h> header file. */
61
+#undef HAVE_NETDB_H
62
+
63
+/* Define to 1 if you have the <netinet/in.h> header file. */
64
+#undef HAVE_NETINET_IN_H
65
+
66
+/* Define to 1 if you have the <netlink/netlink.h> header file. */
67
+#undef HAVE_NETLINK_NETLINK_H
68
+
69
 /* Define to 1 if you have the <netpacket/packet.h> header file. */
70
 #undef HAVE_NETPACKET_PACKET_H
71
 
72
-- 
73
2.42.0
74
(-)a/lang/python38/files/patch-configure (-11 lines)
Removed Link Here
1
--- configure.orig	2022-02-23 19:52:00 UTC
2
+++ configure
3
@@ -6625,7 +6625,7 @@ fi
4
 
5
 if test "$Py_LTO" = 'true' ; then
6
   case $CC in
7
-    *clang*)
8
+    *clang*|cc)
9
 
10
       if test -n "$ac_tool_prefix"; then
11
   # Extract the first word of "${ac_tool_prefix}llvm-ar", so it can be a program name with args.
(-)b/lang/python38/files/patch-configure.ac (-1 / +11 lines)
Added Link Here
0
- 
1
--- configure.ac.orig	2023-09-27 12:00:36 UTC
2
+++ configure.ac
3
@@ -1357,7 +1357,7 @@ fi],
4
 [AC_MSG_RESULT(no)])
5
 if test "$Py_LTO" = 'true' ; then
6
   case $CC in
7
-    *clang*)
8
+    *clang*|cc)
9
       AC_SUBST(LLVM_AR)
10
       AC_PATH_TOOL(LLVM_AR, llvm-ar, '', ${llvm_path})
11
       AC_SUBST(LLVM_AR_FOUND)

Return to bug 273132