mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 12:22:44 +00:00 
			
		
		
		
	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.
This commit is contained in:
		
							parent
							
								
									35ec636b5d
								
							
						
					
					
						commit
						edf3aee4df
					
				
					 9 changed files with 28 additions and 28 deletions
				
			
		|  | @ -205,7 +205,7 @@ This list is also available at [ports.serenityos.net](https://ports.serenityos.n | ||||||
| | [`printf`](printf/)                                 | printf (OpenBSD)                                                | 6.6                      | https://github.com/ibara/libpuffy                                              | | | [`printf`](printf/)                                 | printf (OpenBSD)                                                | 6.6                      | https://github.com/ibara/libpuffy                                              | | ||||||
| | [`pt2-clone`](pt2-clone/)                           | ProTracker 2 clone                                              | 1.49                     | https://github.com/8bitbubsy/pt2-clone                                         | | | [`pt2-clone`](pt2-clone/)                           | ProTracker 2 clone                                              | 1.49                     | https://github.com/8bitbubsy/pt2-clone                                         | | ||||||
| | [`pv`](pv/)                                         | Pipe Viewer                                                     | 1.6.20                   | http://www.ivarch.com/programs/pv.shtml                                        | | | [`pv`](pv/)                                         | Pipe Viewer                                                     | 1.6.20                   | http://www.ivarch.com/programs/pv.shtml                                        | | ||||||
| | [`python3`](python3/)                               | Python                                                          | 3.10.4                   | https://www.python.org/                                                        | | | [`python3`](python3/)                               | Python                                                          | 3.11.0                   | https://www.python.org/                                                        | | ||||||
| | [`qemu`](qemu/)                                     | QEMU                                                            | 7.0.0                    | https://qemu.org                                                               | | | [`qemu`](qemu/)                                     | QEMU                                                            | 7.0.0                    | https://qemu.org                                                               | | ||||||
| | [`qoi`](qoi/)                                       | Quite OK Image Format for fast, lossless image compression      | edb8d7b                  | https://github.com/phoboslab/qoi                                               | | | [`qoi`](qoi/)                                       | Quite OK Image Format for fast, lossless image compression      | edb8d7b                  | https://github.com/phoboslab/qoi                                               | | ||||||
| | [`qt6-qtbase`](qt6-qtbase/)                         | Qt6 QtBase                                                      | 6.2.3                    | https://qt.io                                                                  | | | [`qt6-qtbase`](qt6-qtbase/)                         | Qt6 QtBase                                                      | 6.2.3                    | https://qt.io                                                                  | | ||||||
|  |  | ||||||
|  | @ -31,15 +31,15 @@ depends=( | ||||||
| configopts=( | configopts=( | ||||||
|     '--disable-ipv6' |     '--disable-ipv6' | ||||||
|     '--without-ensurepip' |     '--without-ensurepip' | ||||||
|  |     '--with-build-python=python3' | ||||||
|     'ac_cv_file__dev_ptmx=no' |     'ac_cv_file__dev_ptmx=no' | ||||||
|     'ac_cv_file__dev_ptc=no' |     'ac_cv_file__dev_ptc=no' | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| export BLDSHARED="${CC} -shared" | export BLDSHARED="${CC} -shared" | ||||||
| 
 | 
 | ||||||
| pre_configure() { | configure() { | ||||||
|     build="$("${workdir}/config.guess")"  # e.g. 'x86_64-pc-linux-gnu' |     run ./configure --host="${SERENITY_ARCH}-pc-serenity" --build="$($workdir/config.guess)" "${configopts[@]}" | ||||||
|     configopts+=("--build=${build}") |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| # Note: The showproperty command is used when linting ports, we don't actually need python at this time. | # Note: The showproperty command is used when linting ports, we don't actually need python at this time. | ||||||
|  |  | ||||||
|  | @ -10,10 +10,10 @@ we can enforce UTF-8 as the encoding. | ||||||
|  1 file changed, 1 insertion(+), 1 deletion(-) |  1 file changed, 1 insertion(+), 1 deletion(-) | ||||||
| 
 | 
 | ||||||
| diff --git a/Include/pyport.h b/Include/pyport.h
 | diff --git a/Include/pyport.h b/Include/pyport.h
 | ||||||
| index 6ab0ae4..dffd616 100644
 | index 93250f4eb1d7a23ec05a312f97cae4236b64dc7c..33d1ca5f1d21751ca90670eabdc848ad68a12ef1 100644
 | ||||||
| --- a/Include/pyport.h
 | --- a/Include/pyport.h
 | ||||||
| +++ b/Include/pyport.h
 | +++ b/Include/pyport.h
 | ||||||
| @@ -843,7 +843,7 @@ extern _invalid_parameter_handler _Py_silent_invalid_parameter_handler;
 | @@ -678,7 +678,7 @@ extern char * _getpty(int *, int, mode_t, int);
 | ||||||
|  #  error "Py_TRACE_REFS ABI is not compatible with release and debug ABI" |  #  error "Py_TRACE_REFS ABI is not compatible with release and debug ABI" | ||||||
|  #endif |  #endif | ||||||
|   |   | ||||||
|  |  | ||||||
|  | @ -12,10 +12,10 @@ As usual, make the `configure` script recognize Serenity. Also set | ||||||
|  2 files changed, 16 insertions(+), 2 deletions(-) |  2 files changed, 16 insertions(+), 2 deletions(-) | ||||||
| 
 | 
 | ||||||
| diff --git a/configure b/configure
 | diff --git a/configure b/configure
 | ||||||
| index 19f1bd5..340e76e 100755
 | index 784f8d306092afb980dc7730eccaac1b134c52df..143ff27f07a8605510bca258bee3e621c95d34b8 100755
 | ||||||
| --- a/configure
 | --- a/configure
 | ||||||
| +++ b/configure
 | +++ b/configure
 | ||||||
| @@ -3335,6 +3335,9 @@ then
 | @@ -3811,6 +3811,9 @@ then
 | ||||||
|         # a lot of different things including 'define_xopen_source' |         # a lot of different things including 'define_xopen_source' | ||||||
|         # in the case statement below. |         # in the case statement below. | ||||||
|  	case "$host" in |  	case "$host" in | ||||||
|  | @ -25,7 +25,7 @@ index 19f1bd5..340e76e 100755 | ||||||
|  	*-*-linux-android*) |  	*-*-linux-android*) | ||||||
|  		ac_sys_system=Linux-android |  		ac_sys_system=Linux-android | ||||||
|  		;; |  		;; | ||||||
| @@ -3373,6 +3376,7 @@ then
 | @@ -3855,6 +3858,7 @@ then
 | ||||||
|  	linux*) MACHDEP="linux";; |  	linux*) MACHDEP="linux";; | ||||||
|  	cygwin*) MACHDEP="cygwin";; |  	cygwin*) MACHDEP="cygwin";; | ||||||
|  	darwin*) MACHDEP="darwin";; |  	darwin*) MACHDEP="darwin";; | ||||||
|  | @ -33,7 +33,7 @@ index 19f1bd5..340e76e 100755 | ||||||
|  	'')	MACHDEP="unknown";; |  	'')	MACHDEP="unknown";; | ||||||
|      esac |      esac | ||||||
|  fi |  fi | ||||||
| @@ -3382,6 +3386,9 @@ $as_echo "\"$MACHDEP\"" >&6; }
 | @@ -3864,6 +3868,9 @@ $as_echo "\"$MACHDEP\"" >&6; }
 | ||||||
|   |   | ||||||
|  if test "$cross_compiling" = yes; then |  if test "$cross_compiling" = yes; then | ||||||
|  	case "$host" in |  	case "$host" in | ||||||
|  | @ -43,7 +43,7 @@ index 19f1bd5..340e76e 100755 | ||||||
|  	*-*-linux*) |  	*-*-linux*) | ||||||
|  		case "$host_cpu" in |  		case "$host_cpu" in | ||||||
|  		arm*) |  		arm*) | ||||||
| @@ -9886,7 +9893,7 @@ then
 | @@ -10834,7 +10841,7 @@ then
 | ||||||
|  	    LINKFORSHARED="-Wl,-E -Wl,+s";; |  	    LINKFORSHARED="-Wl,-E -Wl,+s";; | ||||||
|  #	    LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";; |  #	    LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";; | ||||||
|  	Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";; |  	Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";; | ||||||
|  | @ -53,10 +53,10 @@ index 19f1bd5..340e76e 100755 | ||||||
|  	Darwin/*) |  	Darwin/*) | ||||||
|  		LINKFORSHARED="$extra_undefs -framework CoreFoundation" |  		LINKFORSHARED="$extra_undefs -framework CoreFoundation" | ||||||
| diff --git a/configure.ac b/configure.ac
 | diff --git a/configure.ac b/configure.ac
 | ||||||
| index 763fc69..8d4c0af 100644
 | index ab5e1de6fabd38ad468ad57392b232de2101011d..17f93fdf69007f322c29b4fbdb4fe16e75ca2520 100644
 | ||||||
| --- a/configure.ac
 | --- a/configure.ac
 | ||||||
| +++ b/configure.ac
 | +++ b/configure.ac
 | ||||||
| @@ -391,6 +391,9 @@ then
 | @@ -536,6 +536,9 @@ then
 | ||||||
|         # a lot of different things including 'define_xopen_source' |         # a lot of different things including 'define_xopen_source' | ||||||
|         # in the case statement below. |         # in the case statement below. | ||||||
|  	case "$host" in |  	case "$host" in | ||||||
|  | @ -66,7 +66,7 @@ index 763fc69..8d4c0af 100644 | ||||||
|  	*-*-linux-android*) |  	*-*-linux-android*) | ||||||
|  		ac_sys_system=Linux-android |  		ac_sys_system=Linux-android | ||||||
|  		;; |  		;; | ||||||
| @@ -429,6 +432,7 @@ then
 | @@ -580,6 +583,7 @@ then
 | ||||||
|  	linux*) MACHDEP="linux";; |  	linux*) MACHDEP="linux";; | ||||||
|  	cygwin*) MACHDEP="cygwin";; |  	cygwin*) MACHDEP="cygwin";; | ||||||
|  	darwin*) MACHDEP="darwin";; |  	darwin*) MACHDEP="darwin";; | ||||||
|  | @ -74,7 +74,7 @@ index 763fc69..8d4c0af 100644 | ||||||
|  	'')	MACHDEP="unknown";; |  	'')	MACHDEP="unknown";; | ||||||
|      esac |      esac | ||||||
|  fi |  fi | ||||||
| @@ -437,6 +441,9 @@ AC_MSG_RESULT("$MACHDEP")
 | @@ -588,6 +592,9 @@ AC_MSG_RESULT("$MACHDEP")
 | ||||||
|  AC_SUBST(_PYTHON_HOST_PLATFORM) |  AC_SUBST(_PYTHON_HOST_PLATFORM) | ||||||
|  if test "$cross_compiling" = yes; then |  if test "$cross_compiling" = yes; then | ||||||
|  	case "$host" in |  	case "$host" in | ||||||
|  | @ -84,7 +84,7 @@ index 763fc69..8d4c0af 100644 | ||||||
|  	*-*-linux*) |  	*-*-linux*) | ||||||
|  		case "$host_cpu" in |  		case "$host_cpu" in | ||||||
|  		arm*) |  		arm*) | ||||||
| @@ -2807,7 +2814,7 @@ then
 | @@ -3247,7 +3254,7 @@ then
 | ||||||
|  	    LINKFORSHARED="-Wl,-E -Wl,+s";; |  	    LINKFORSHARED="-Wl,-E -Wl,+s";; | ||||||
|  #	    LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";; |  #	    LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";; | ||||||
|  	Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";; |  	Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";; | ||||||
|  |  | ||||||
|  | @ -10,10 +10,10 @@ the `socket` module. | ||||||
|  1 file changed, 1 insertion(+), 1 deletion(-) |  1 file changed, 1 insertion(+), 1 deletion(-) | ||||||
| 
 | 
 | ||||||
| diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
 | diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
 | ||||||
| index ab8618b..0109d97 100644
 | index 14af496a45f4788dc55ec3d959c2de45147725bc..9dcad434af405f0a6f6233f36ef1e1062086050e 100644
 | ||||||
| --- a/Modules/socketmodule.c
 | --- a/Modules/socketmodule.c
 | ||||||
| +++ b/Modules/socketmodule.c
 | +++ b/Modules/socketmodule.c
 | ||||||
| @@ -168,7 +168,7 @@ shutdown(how) -- shut down traffic in one or both directions\n\
 | @@ -175,7 +175,7 @@ shutdown(how) -- shut down traffic in one or both directions\n\
 | ||||||
|  # undef HAVE_GETHOSTBYNAME_R_6_ARG |  # undef HAVE_GETHOSTBYNAME_R_6_ARG | ||||||
|  #endif |  #endif | ||||||
|   |   | ||||||
|  |  | ||||||
|  | @ -17,10 +17,10 @@ Make some tweaks to Python's `setup.py`: | ||||||
|  1 file changed, 8 insertions(+), 3 deletions(-) |  1 file changed, 8 insertions(+), 3 deletions(-) | ||||||
| 
 | 
 | ||||||
| diff --git a/setup.py b/setup.py
 | diff --git a/setup.py b/setup.py
 | ||||||
| index e74a275..acd7b05 100644
 | index 15d0d4576a4772e9920ac2d7c1a9dee75c29b341..e651ac7627e8b796f8b9b4d60f592bc9261b6540 100644
 | ||||||
| --- a/setup.py
 | --- a/setup.py
 | ||||||
| +++ b/setup.py
 | +++ b/setup.py
 | ||||||
| @@ -848,8 +848,8 @@ class PyBuildExt(build_ext):
 | @@ -868,8 +868,8 @@ class PyBuildExt(build_ext):
 | ||||||
|              add_dir_to_list(self.compiler.include_dirs, |              add_dir_to_list(self.compiler.include_dirs, | ||||||
|                              sysconfig.get_config_var("INCLUDEDIR")) |                              sysconfig.get_config_var("INCLUDEDIR")) | ||||||
|   |   | ||||||
|  | @ -31,7 +31,7 @@ index e74a275..acd7b05 100644 | ||||||
|          # lib_dirs and inc_dirs are used to search for files; |          # lib_dirs and inc_dirs are used to search for files; | ||||||
|          # if a file is found in one of those directories, it can |          # if a file is found in one of those directories, it can | ||||||
|          # be assumed that no additional -I,-L directives are needed. |          # be assumed that no additional -I,-L directives are needed. | ||||||
| @@ -1160,7 +1160,12 @@ class PyBuildExt(build_ext):
 | @@ -1117,7 +1117,12 @@ class PyBuildExt(build_ext):
 | ||||||
|          # Curses support, requiring the System V version of curses, often |          # Curses support, requiring the System V version of curses, often | ||||||
|          # provided by the ncurses library. |          # provided by the ncurses library. | ||||||
|          curses_defines = [] |          curses_defines = [] | ||||||
|  |  | ||||||
|  | @ -15,10 +15,10 @@ in the detection code. | ||||||
|  1 file changed, 2 insertions(+) |  1 file changed, 2 insertions(+) | ||||||
| 
 | 
 | ||||||
| diff --git a/setup.py b/setup.py
 | diff --git a/setup.py b/setup.py
 | ||||||
| index acd7b05..6554b1c 100644
 | index e651ac7627e8b796f8b9b4d60f592bc9261b6540..c4c4e92309a952a88d9de1b853a9535cb86913cc 100644
 | ||||||
| --- a/setup.py
 | --- a/setup.py
 | ||||||
| +++ b/setup.py
 | +++ b/setup.py
 | ||||||
| @@ -163,6 +163,8 @@ def sysroot_paths(make_vars, subdirs):
 | @@ -166,6 +166,8 @@ def sysroot_paths(make_vars, subdirs):
 | ||||||
|      for var_name in make_vars: |      for var_name in make_vars: | ||||||
|          var = sysconfig.get_config_var(var_name) |          var = sysconfig.get_config_var(var_name) | ||||||
|          if var is not None: |          if var is not None: | ||||||
|  |  | ||||||
|  | @ -12,10 +12,10 @@ For now, it can be safely ignored until it's supported in the kernel. | ||||||
|  1 file changed, 2 insertions(+) |  1 file changed, 2 insertions(+) | ||||||
| 
 | 
 | ||||||
| diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
 | diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
 | ||||||
| index 0109d97..484e651 100644
 | index 9dcad434af405f0a6f6233f36ef1e1062086050e..a53a510b0c779dfbba7428229b34e8a23c69ee9e 100644
 | ||||||
| --- a/Modules/socketmodule.c
 | --- a/Modules/socketmodule.c
 | ||||||
| +++ b/Modules/socketmodule.c
 | +++ b/Modules/socketmodule.c
 | ||||||
| @@ -3003,6 +3003,8 @@ sock_setsockopt(PySocketSockObject *s, PyObject *args)
 | @@ -3043,6 +3043,8 @@ sock_setsockopt(PySocketSockObject *s, PyObject *args)
 | ||||||
|      PyBuffer_Release(&optval); |      PyBuffer_Release(&optval); | ||||||
|   |   | ||||||
|  done: |  done: | ||||||
|  |  | ||||||
|  | @ -1,5 +1,5 @@ | ||||||
| PYTHON_VERSION="3.10.4" | PYTHON_VERSION="3.11.0" | ||||||
| PYTHON_VERSION_WITHOUT_SUFFIX="3.10.4"  # PYTHON_VERSION but without the a1/b1/rc1/... suffix | PYTHON_VERSION_WITHOUT_SUFFIX="3.11.0"  # PYTHON_VERSION but without the a1/b1/rc1/... suffix | ||||||
| PYTHON_ARCHIVE="Python-${PYTHON_VERSION}.tar.xz" | PYTHON_ARCHIVE="Python-${PYTHON_VERSION}.tar.xz" | ||||||
| PYTHON_ARCHIVE_URL="https://www.python.org/ftp/python/${PYTHON_VERSION_WITHOUT_SUFFIX}/${PYTHON_ARCHIVE}" | PYTHON_ARCHIVE_URL="https://www.python.org/ftp/python/${PYTHON_VERSION_WITHOUT_SUFFIX}/${PYTHON_ARCHIVE}" | ||||||
| PYTHON_ARCHIVE_SHA256SUM="80bf925f571da436b35210886cf79f6eb5fa5d6c571316b73568343451f77a19" | PYTHON_ARCHIVE_SHA256SUM="a57dc82d77358617ba65b9841cee1e3b441f386c3789ddc0676eca077f2951c3" | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Linus Groh
						Linus Groh