From c58157dc953755673c47d545ed25fe698f5a3c2f Mon Sep 17 00:00:00 2001 From: OscarL Date: Fri, 25 Aug 2023 03:54:04 -0300 Subject: [PATCH] python3.8: update to version 3.8.18 (#9280) * python3.8: update to version 3.8.18 * python3.8: recipe improvements "backported" from newer versions. --- ....16.patchset => python3.8-3.8.18.patchset} | 0 ...patchset => python3.8_x86-3.8.18.patchset} | 0 ...-3.8.16.recipe => python3.8-3.8.18.recipe} | 30 +++++++++++++------ 3 files changed, 21 insertions(+), 9 deletions(-) rename dev-lang/python/patches/{python3.8-3.8.16.patchset => python3.8-3.8.18.patchset} (100%) rename dev-lang/python/patches/{python3.8_x86-3.8.16.patchset => python3.8_x86-3.8.18.patchset} (100%) rename dev-lang/python/{python3.8-3.8.16.recipe => python3.8-3.8.18.recipe} (83%) diff --git a/dev-lang/python/patches/python3.8-3.8.16.patchset b/dev-lang/python/patches/python3.8-3.8.18.patchset similarity index 100% rename from dev-lang/python/patches/python3.8-3.8.16.patchset rename to dev-lang/python/patches/python3.8-3.8.18.patchset diff --git a/dev-lang/python/patches/python3.8_x86-3.8.16.patchset b/dev-lang/python/patches/python3.8_x86-3.8.18.patchset similarity index 100% rename from dev-lang/python/patches/python3.8_x86-3.8.16.patchset rename to dev-lang/python/patches/python3.8_x86-3.8.18.patchset diff --git a/dev-lang/python/python3.8-3.8.16.recipe b/dev-lang/python/python3.8-3.8.18.recipe similarity index 83% rename from dev-lang/python/python3.8-3.8.16.recipe rename to dev-lang/python/python3.8-3.8.18.recipe index e845389e0..8018fac1d 100644 --- a/dev-lang/python/python3.8-3.8.16.recipe +++ b/dev-lang/python/python3.8-3.8.18.recipe @@ -8,10 +8,10 @@ Python is free to use, even for commercial products, because of its \ OSI-approved open source license." HOMEPAGE="https://www.python.org" LICENSE="Python" -COPYRIGHT="1990-2022 Python Software Foundation" +COPYRIGHT="1990-2023 Python Software Foundation" REVISION="1" SOURCE_URI="https://www.python.org/ftp/python/$portVersion/Python-$portVersion.tar.xz" -CHECKSUM_SHA256="d85dbb3774132473d8081dcb158f34a10ccad7a90b96c7e50ea4bb61f5ce4562" +CHECKSUM_SHA256="3ffb71cd349a326ba7b2fadc7e7df86ba577dd9c4917e52a8401adbda7405e3f" SOURCE_DIR="Python-$portVersion" PATCHES="python3.8-$portVersion.patchset" if [ "$secondaryArchSuffix" = _x86 ] ; then @@ -91,15 +91,28 @@ GLOBAL_WRITABLE_FILES=" BUILD() { - export CFLAGS="-D_BSD_SOURCE" rm -Rf Modules/expat autoreconf -fi - export OPT="" + + # From ./configure: + # "compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just + # for debug/optimization stuff. BASECFLAGS is for flags that are required + # just to get things to compile and link." + export BASECFLAGS="-D_BSD_SOURCE" + + # Not exporting OPT ends up with "-g -fwrapv -O3 -Wall" being used, + # and using OPT="" means the build ends up being "-O0". + export OPT="-fwrapv -O3 -Wall" runConfigure --omit-dirs binDir,includeDir ./configure \ - --enable-shared --without-ensurepip --with-system-ffi \ - --with-system-expat --bindir=$commandBinDir --includedir=$developDir/headers + --bindir=$commandBinDir \ + --includedir=$developDir/headers \ + --enable-optimizations \ + --enable-shared \ + --with-ensurepip=no \ + --with-system-expat \ + --with-system-ffi # prevent make from rebuilding stuff that requires python touch Parser/asdl* Python/Python-ast.c Include/Python-ast.h @@ -111,7 +124,8 @@ BUILD() INSTALL() { - make install + # altinstall avoids clobbering $prefix/bin/{2to3,idle3,pydoc3,python3,python3-config} + make altinstall rm $libDir/libpython3.so @@ -137,8 +151,6 @@ INSTALL() cd $prefix/lib/python3.8 rm -rf ctypes/test distutils/tests idlelib/idle_test lib2to3/tests \ sqlite3/test test tkinter/test unittest/test - - rm -f $prefix/bin/{2to3,idle3,pydoc3,python3,python3-config} } TEST()