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.
This commit is contained in:
OscarL
2023-08-25 03:54:04 -03:00
committed by GitHub
parent bda58345f7
commit c58157dc95
3 changed files with 21 additions and 9 deletions

View File

@@ -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()