From 7e35125ec2cec95f176d09d67b0799403ef21961 Mon Sep 17 00:00:00 2001 From: "Andrew J. Hesford" Date: Sun, 18 Sep 2022 13:34:27 -0400 Subject: [PATCH 1/2] python3: update to 3.11.0. Also include bluez headers at build time to allow Bluetooth sockets in the Python stdlib. h/t: @sgn --- common/environment/setup/python.sh | 2 +- .../hooks/pre-configure/02-script-wrapper.sh | 2 +- common/shlibs | 2 +- srcpkgs/python3/files/cross.patch | 20 +++++++------- .../python3/patches/musl-find_library.patch | 2 +- srcpkgs/python3/patches/ppcle.patch | 11 ++------ ...eak-MULTIARCH-for-powerpc-linux-musl.patch | 10 +++---- srcpkgs/python3/template | 26 ++++++++++++++++--- 8 files changed, 43 insertions(+), 32 deletions(-) diff --git a/common/environment/setup/python.sh b/common/environment/setup/python.sh index 43ee4d08a54d..606a4bc6f9a8 100644 --- a/common/environment/setup/python.sh +++ b/common/environment/setup/python.sh @@ -7,7 +7,7 @@ py2_lib="usr/lib/python${py2_ver}" py2_sitelib="${py2_lib}/site-packages" py2_inc="usr/include/python${py2_ver}" -py3_ver="3.10" +py3_ver="3.11" py3_abiver="" py3_lib="usr/lib/python${py3_ver}" py3_sitelib="${py3_lib}/site-packages" diff --git a/common/hooks/pre-configure/02-script-wrapper.sh b/common/hooks/pre-configure/02-script-wrapper.sh index 09c796001ea3..641d7ab762c0 100644 --- a/common/hooks/pre-configure/02-script-wrapper.sh +++ b/common/hooks/pre-configure/02-script-wrapper.sh @@ -236,7 +236,7 @@ hook() { generic_wrapper3 libetpan-config generic_wrapper3 giblib-config python_wrapper python-config 2.7 - python_wrapper python3-config 3.10 + python_wrapper python3-config 3.11 apr_apu_wrapper apr-1-config apr_apu_wrapper apu-1-config } diff --git a/common/shlibs b/common/shlibs index a8013ef13c82..6767afdab2a1 100644 --- a/common/shlibs +++ b/common/shlibs @@ -1733,7 +1733,7 @@ libportaudiocpp.so.0 portaudio-cpp-19.20140130_1 libdar.so.6000 libdar-2.6.6_1 libdar64.so.6000 libdar-2.6.6_1 libpython3.so python3-3.9.2_2 -libpython3.10.so.1.0 python3-3.10.0_1 +libpython3.11.so.1.0 python3-3.11.0_1 libbrscandec2.so.1 brother-brscan3-0.2.11_2 libpyglib-2.0-python.so.0 python-gobject2-2.28.6_11 libxmlrpc_server_abyss.so.3 xmlrpc-c-1.51.06_2 diff --git a/srcpkgs/python3/files/cross.patch b/srcpkgs/python3/files/cross.patch index 4e2498ca221f..48f1461c6025 100644 --- a/srcpkgs/python3/files/cross.patch +++ b/srcpkgs/python3/files/cross.patch @@ -1,6 +1,6 @@ ---- setup.py.orig +--- setup.py +++ setup.py -@@ -38,7 +38,7 @@ +@@ -77,7 +77,7 @@ return sys.platform @@ -9,7 +9,7 @@ HOST_PLATFORM = get_platform() MS_WINDOWS = (HOST_PLATFORM == 'win32') CYGWIN = (HOST_PLATFORM == 'cygwin') -@@ -700,6 +700,10 @@ +@@ -898,6 +898,10 @@ if HOST_PLATFORM == 'hp-ux11': self.lib_dirs += ['/usr/lib/hpux64', '/usr/lib/hpux32'] @@ -20,9 +20,9 @@ if MACOS: # This should work on any unixy platform ;-) # If the user has bothered specifying additional -I and -L flags ---- Makefile.pre.in.orig 2017-07-08 05:33:27.000000000 +0200 -+++ Makefile.pre.in 2017-08-27 19:49:11.114893045 +0200 -@@ -1055,8 +1055,6 @@ +--- Makefile.pre.in ++++ Makefile.pre.in +@@ -1743,8 +1743,6 @@ upgrade) ensurepip="--upgrade" ;; \ install|*) ensurepip="" ;; \ esac; \ @@ -31,7 +31,7 @@ fi altinstall: commoninstall -@@ -1065,8 +1063,6 @@ +@@ -1753,8 +1751,6 @@ upgrade) ensurepip="--altinstall --upgrade" ;; \ install|*) ensurepip="--altinstall" ;; \ esac; \ @@ -39,11 +39,11 @@ - $$ensurepip --root=$(DESTDIR)/ ; \ fi - commoninstall: @FRAMEWORKALTINSTALLFIRST@ \ -@@ -1434,11 +1430,12 @@ + commoninstall: check-clean-src @FRAMEWORKALTINSTALLFIRST@ \ +@@ -2226,11 +2222,12 @@ # Install the dynamically loadable modules # This goes into $(exec_prefix) - sharedinstall: sharedmods + sharedinstall: all + CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \ $(RUNSHARED) $(PYTHON_FOR_BUILD) $(srcdir)/setup.py install \ --prefix=$(prefix) \ diff --git a/srcpkgs/python3/patches/musl-find_library.patch b/srcpkgs/python3/patches/musl-find_library.patch index 82f436b4072b..879f91246272 100644 --- a/srcpkgs/python3/patches/musl-find_library.patch +++ b/srcpkgs/python3/patches/musl-find_library.patch @@ -1,6 +1,6 @@ --- a/Lib/ctypes/util.py +++ b/Lib/ctypes/util.py -@@ -204,6 +204,41 @@ +@@ -265,6 +265,41 @@ def find_library(name, is64 = False): return _get_soname(_findLib_crle(name, is64) or _findLib_gcc(name)) diff --git a/srcpkgs/python3/patches/ppcle.patch b/srcpkgs/python3/patches/ppcle.patch index 9ed7b9cef4e8..f2a12596093c 100644 --- a/srcpkgs/python3/patches/ppcle.patch +++ b/srcpkgs/python3/patches/ppcle.patch @@ -8,11 +8,9 @@ Subject: [PATCH] add powerpcle triple configure.ac | 4 ++++ 2 files changed, 8 insertions(+) -diff --git configure configure -index 2d379fe..97d1f9b 100755 --- a/configure +++ b/configure -@@ -5302,7 +5302,11 @@ cat >> conftest.c <> conftest.c </dev/null) +@@ -5221,6 +5221,14 @@ + $as_echo "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" +if test x$MULTIARCH = xpowerpc-linux-musl +then @@ -13,5 +13,5 @@ + MULTIARCH="powerpcle-linux-gnu" +fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5 - $as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CC compiler name" >&5 diff --git a/srcpkgs/python3/template b/srcpkgs/python3/template index 3cb53a43f1bc..e6813ee8ce28 100644 --- a/srcpkgs/python3/template +++ b/srcpkgs/python3/template @@ -3,9 +3,9 @@ # THIS PACKAGE MUST BE SYNCHRONIZED WITH "srcpkgs/python3-tkinter". # pkgname=python3 -version=3.10.7 +version=3.11.0 revision=1 -wrksrc="Python-${version}" +wrksrc="Python-${version}rc2" build_style="gnu-configure" configure_args="--enable-shared --enable-ipv6 --enable-loadable-sqlite-extensions --with-computed-gotos @@ -21,8 +21,14 @@ short_desc="Python programming language (${version%.*} series)" maintainer="Andrew J. Hesford " license="Python-2.0" homepage="https://www.python.org" -distfiles="https://www.python.org/ftp/python/${version}/Python-${version}.tar.xz" -checksum=6eed8415b7516fb2f260906db5d48dd4c06acc0cb24a7d6cc15296a604dcdc48 +_bluez="bluez-5.64" +distfiles=" + https://www.python.org/ftp/python/${version}/Python-${version}rc2.tar.xz + ${KERNEL_SITE}/bluetooth/${_bluez}.tar.xz +" +checksum="25b35cc7d82c5ad34d867b179a1c1695d129be5ed14a21e46b6b7f2350a8b490 + ae437e65b6b3070c198bc5b0109fe9cdeb9eaa387380e2072f9de65fe8a1de34" +skip_extraction="${_bluez}.tar.xz" alternatives=" python:idle:/usr/bin/idle${version%.*} @@ -33,12 +39,20 @@ alternatives=" if [ "$CROSS_BUILD" ]; then hostmakedepends+=" python3" + configure_args+=" --with-build-python=python3.11" fi post_extract() { # Ensure that internal copies of expat and libffi are not used rm -rf Modules/expat rm -rf Modules/_ctypes/{darwin,libffi}* + + # Extract Bluetooth headers + local _srcdistdir="${XBPS_SRCDISTDIR}/${sourcepkg}-${version}" + mkdir External + bsdtar -C External --strip-components=1 -x \ + -f "${_srcdistdir}/${_bluez}.tar.xz" "${_bluez}/lib/*.h" + mv External/lib External/bluetooth } post_patch() { @@ -52,6 +66,10 @@ do_configure() { # `-R` to the compiler for every compiled extension that sets an # rpath rather than the '-Wl,-R' argument that GCC requires unset GCC CC CXX CPP LD AR AS RANLIB + + # Make sure configure can find Bluetooth headers + CFLAGS+=" -I./External" + CPPFLAGS+=" -I./External" ./configure ${configure_args} } From 544e4c1ecba9c006ba42fb0907f079931b44ad7f Mon Sep 17 00:00:00 2001 From: "Andrew J. Hesford" Date: Sun, 18 Sep 2022 13:34:44 -0400 Subject: [PATCH 2/2] python3-tkinter: update to 3.11.0. --- srcpkgs/python3-tkinter/template | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/srcpkgs/python3-tkinter/template b/srcpkgs/python3-tkinter/template index 89bca4de5bf2..6699439638cc 100644 --- a/srcpkgs/python3-tkinter/template +++ b/srcpkgs/python3-tkinter/template @@ -8,9 +8,9 @@ _desc="Python programming language" pkgname=python3-tkinter -version=3.10.7 +version=3.11.0 revision=1 -wrksrc="Python-${version}" +wrksrc="Python-${version}rc2" build_style="gnu-configure" configure_args="--enable-shared --enable-ipv6 --enable-loadable-sqlite-extensions --with-computed-gotos @@ -28,11 +28,12 @@ short_desc="${_desc} - GUI toolkit for Python3" maintainer="Andrew J. Hesford " homepage="https://www.python.org" license="Python-2.0" -distfiles="https://www.python.org/ftp/python/${version}/Python-${version}.tar.xz" -checksum=6eed8415b7516fb2f260906db5d48dd4c06acc0cb24a7d6cc15296a604dcdc48 +distfiles="https://www.python.org/ftp/python/${version}/Python-${version}rc2.tar.xz" +checksum=25b35cc7d82c5ad34d867b179a1c1695d129be5ed14a21e46b6b7f2350a8b490 if [ "$CROSS_BUILD" ]; then hostmakedepends+=" python3" + configure_args+=" --with-build-python=python3.11" fi post_extract() {