1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-08 09:27:35 +00:00
serenity/Ports/python3/patches/0002-Tweak-configure-and-configure.ac.patch
Linus Groh edf3aee4df Ports/python3: Update Python to 3.11.0
This now requires `--host` and `--with-build-python` to be passed to the
configure script when cross compiling; the former we simply do like in
many other package.sh scripts as well, the latter we point to `python3`,
which is expected to match the port's version anyway.
2022-10-25 13:11:42 +01:00

95 lines
3 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Linus Groh <mail@linusgroh.de>
Date: Fri, 14 Jan 2022 23:35:57 +0330
Subject: [PATCH] Tweak configure and configure.ac
As usual, make the `configure` script recognize Serenity. Also set
`MACHDEP` (which is used for `sys.platform`) to a version-less
`serenityos`, even when not cross-compiling.
---
configure | 9 ++++++++-
configure.ac | 9 ++++++++-
2 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/configure b/configure
index 784f8d306092afb980dc7730eccaac1b134c52df..143ff27f07a8605510bca258bee3e621c95d34b8 100755
--- a/configure
+++ b/configure
@@ -3811,6 +3811,9 @@ then
# a lot of different things including 'define_xopen_source'
# in the case statement below.
case "$host" in
+ *-*-serenity*)
+ ac_sys_system=SerenityOS
+ ;;
*-*-linux-android*)
ac_sys_system=Linux-android
;;
@@ -3855,6 +3858,7 @@ then
linux*) MACHDEP="linux";;
cygwin*) MACHDEP="cygwin";;
darwin*) MACHDEP="darwin";;
+ serenityos*) MACHDEP="serenityos";;
'') MACHDEP="unknown";;
esac
fi
@@ -3864,6 +3868,9 @@ $as_echo "\"$MACHDEP\"" >&6; }
if test "$cross_compiling" = yes; then
case "$host" in
+ *-*-serenity*)
+ _host_cpu=$host_cpu
+ ;;
*-*-linux*)
case "$host_cpu" in
arm*)
@@ -10834,7 +10841,7 @@ then
LINKFORSHARED="-Wl,-E -Wl,+s";;
# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
- Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
+ Linux*|GNU*|SerenityOS*) LINKFORSHARED="-Xlinker -export-dynamic";;
# -u libsys_s pulls in all symbols in libsys
Darwin/*)
LINKFORSHARED="$extra_undefs -framework CoreFoundation"
diff --git a/configure.ac b/configure.ac
index ab5e1de6fabd38ad468ad57392b232de2101011d..17f93fdf69007f322c29b4fbdb4fe16e75ca2520 100644
--- a/configure.ac
+++ b/configure.ac
@@ -536,6 +536,9 @@ then
# a lot of different things including 'define_xopen_source'
# in the case statement below.
case "$host" in
+ *-*-serenity*)
+ ac_sys_system=SerenityOS
+ ;;
*-*-linux-android*)
ac_sys_system=Linux-android
;;
@@ -580,6 +583,7 @@ then
linux*) MACHDEP="linux";;
cygwin*) MACHDEP="cygwin";;
darwin*) MACHDEP="darwin";;
+ serenityos*) MACHDEP="serenityos";;
'') MACHDEP="unknown";;
esac
fi
@@ -588,6 +592,9 @@ AC_MSG_RESULT("$MACHDEP")
AC_SUBST(_PYTHON_HOST_PLATFORM)
if test "$cross_compiling" = yes; then
case "$host" in
+ *-*-serenity*)
+ _host_cpu=$host_cpu
+ ;;
*-*-linux*)
case "$host_cpu" in
arm*)
@@ -3247,7 +3254,7 @@ then
LINKFORSHARED="-Wl,-E -Wl,+s";;
# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
- Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
+ Linux*|GNU*|SerenityOS*) LINKFORSHARED="-Xlinker -export-dynamic";;
# -u libsys_s pulls in all symbols in libsys
Darwin/*)
LINKFORSHARED="$extra_undefs -framework CoreFoundation"