summaryrefslogtreecommitdiff
path: root/Ports
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2021-04-01 18:33:22 +0200
committerAndreas Kling <kling@serenityos.org>2021-04-01 20:54:05 +0200
commit4e2d4b193aae8214c2dc7d1b86a5805094190cc2 (patch)
treebeeec35102d4bab9c7ece0446ce41f2d2f78e495 /Ports
parent86ecbd809fd5282b8d5a2bd37e98e7ed83a8df04 (diff)
downloadserenity-4e2d4b193aae8214c2dc7d1b86a5805094190cc2.zip
Ports: Get Python's --build value from config.guess
Diffstat (limited to 'Ports')
-rwxr-xr-xPorts/python3/package.sh11
1 files changed, 6 insertions, 5 deletions
diff --git a/Ports/python3/package.sh b/Ports/python3/package.sh
index f1d97c650f..c1b80a9c26 100755
--- a/Ports/python3/package.sh
+++ b/Ports/python3/package.sh
@@ -16,15 +16,16 @@ auth_opts="Python-${version}.tar.xz.asc Python-${version}.tar.xz"
# modules build at the moment even with those available, so it's pointless.
depends="libffi zlib"
-# FIXME: the --build value is detected correctly by the configure script (via config.guess in the Python source root),
-# but still needs to be set explicitly when cross compiling. Figure out how to not hardcode this.
-BUILD="x86_64-pc-linux-gnu"
-
# FIXME: --enable-optimizations results in lots of __gcov_* linker errors
-configopts="--build=${BUILD} --without-ensurepip ac_cv_file__dev_ptmx=no ac_cv_file__dev_ptc=no"
+configopts="--without-ensurepip ac_cv_file__dev_ptmx=no ac_cv_file__dev_ptc=no"
export BLDSHARED="${CC} -shared"
+pre_configure() {
+ build="$("${workdir}/config.guess")" # e.g. 'x86_64-pc-linux-gnu'
+ configopts="${configopts} --build=${build}"
+}
+
post_configure() {
run cp "${SERENITY_ROOT}/Ports/${port}/Setup.local" "Modules/Setup.local"
}