python: Update to 3.11

* 006-3.7-ftm.patch: code no longer exists and builds fine without
* 010-3.8-nis-cygwin.patch: code no longer exists and builds fine without
* 012-3.8-pep3149-cygwin.patch: refreshed
* 013-3.8-tkinter-cygwin.patch: code no longer exists and builds fine without
* 28881-backport.patch, 930-fix-missing-tcp-include.patch: included in the new release
* 970-ossaudiodev.patch: work around "error: initializer element is not constant"

remove useless permissions change
This commit is contained in:
Christoph Reiter 2023-02-13 21:31:18 +01:00
parent ac720b4ee1
commit 5978b5b570
8 changed files with 34 additions and 155 deletions

View File

@ -1,14 +0,0 @@
--- Python-3.7.2-orig/configure.ac 2019-01-06 19:25:12.660930750 -0600
+++ Python-3.7.2/configure.ac 2019-01-06 19:27:23.594427904 -0600
@@ -131,11 +131,6 @@ AC_DEFINE(_GNU_SOURCE, 1, [Define on Lin
AC_DEFINE(_NETBSD_SOURCE, 1, [Define on NetBSD to activate all library features])
# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
-# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
-# them.
-AC_DEFINE(__BSD_VISIBLE, 1, [Define on FreeBSD to activate all library features])
-
-# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
# them.
AC_DEFINE(_DARWIN_C_SOURCE, 1, [Define on Darwin to activate all library features])

View File

@ -1,11 +0,0 @@
--- Python-3.8.0a4-orig/setup.py 2019-05-19 12:20:42.157823300 -0400
+++ Python-3.8.0a4/setup.py 2019-05-19 14:13:32.603602100 -0400
@@ -2216,7 +2216,7 @@ class PyBuildExt(build_ext):
depends=sha3_deps))
def detect_nis(self):
- if MS_WINDOWS or CYGWIN or HOST_PLATFORM == 'qnx6':
+ if MS_WINDOWS or HOST_PLATFORM == 'qnx6':
self.missing.append('nis')
return

View File

@ -9,9 +9,9 @@
".dll",
#else /* !__CYGWIN__ */
"." SOABI ".so",
--- Python-3.8.0a3-orig/configure.ac 2019-03-29 13:16:29.207031200 -0400
+++ Python-3.8.0a3/configure.ac 2019-03-29 13:20:15.713867100 -0400
@@ -837,6 +837,14 @@ cat >> conftest.c <<EOF
--- Python-3.11.2/configure.ac.orig 2023-02-13 19:44:27.282349300 +0100
+++ Python-3.11.2/configure.ac 2023-02-13 20:30:23.784979600 +0100
@@ -1057,6 +1057,14 @@
darwin
#elif defined(__VXWORKS__)
vxworks
@ -23,6 +23,6 @@
+# else
+# error unknown platform triplet
+# endif
#else
# error unknown platform triplet
#endif
#elif defined(__wasm32__)
# if defined(__EMSCRIPTEN__)
wasm32-emscripten

View File

@ -1,27 +0,0 @@
--- Python-3.8.0a3-orig/setup.py 2019-03-29 13:13:05.105468700 -0400
+++ Python-3.8.0a3/setup.py 2019-03-29 13:21:39.245117100 -0400
@@ -1871,12 +1871,6 @@ class PyBuildExt(build_ext):
include_dirs.append('/usr/X11/include')
added_lib_dirs.append('/usr/X11/lib')
- # If Cygwin, then verify that X is installed before proceeding
- if CYGWIN:
- x11_inc = find_file('X11/Xlib.h', [], include_dirs)
- if x11_inc is None:
- return False
-
# Check for BLT extension
if self.compiler.find_library_file(self.lib_dirs + added_lib_dirs,
'BLT8.0'):
@@ -1894,9 +1888,8 @@ class PyBuildExt(build_ext):
if HOST_PLATFORM in ['aix3', 'aix4']:
libs.append('ld')
- # Finally, link with the X11 libraries (not appropriate on cygwin)
- if not CYGWIN:
- libs.append('X11')
+ # Finally, link with the X11 libraries
+ libs.append('X11')
# XXX handle these, but how to detect?
# *** Uncomment and edit for PIL (TkImaging) extension only:

View File

@ -1,55 +0,0 @@
From 2e386cc70a7a719bbf664a9712e3c86ffbe63900 Mon Sep 17 00:00:00 2001
From: Mike Gilbert <floppym@gentoo.org>
Date: Mon, 11 Oct 2021 13:50:03 -0400
Subject: [PATCH] bpo-45433: Do not link libpython against libcrypt
Save/restore LIBS when calling AC_SEARCH_LIBS(..., crypt). This avoid
linking libpython with libcrypt.
---
Doc/whatsnew/3.11.rst | 2 ++
.../NEWS.d/next/Build/2021-10-11-16-08-37.bpo-45433.pVDkMV.rst | 1 +
configure | 3 +++
configure.ac | 3 +++
4 files changed, 9 insertions(+)
create mode 100644 Misc/NEWS.d/next/Build/2021-10-11-16-08-37.bpo-45433.pVDkMV.rst
--- a/configure
+++ b/configure
@@ -13227,6 +13227,8 @@ done
# We search for both crypt and crypt_r as one or the other may be defined
# This gets us our -lcrypt in LIBS when required on the target platform.
+# Save/restore LIBS to avoid linking libpython with libcrypt.
+LIBS_SAVE=$LIBS
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
$as_echo_n "checking for library containing crypt... " >&6; }
if ${ac_cv_search_crypt+:} false; then :
@@ -13368,6 +13370,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
+LIBS=$LIBS_SAVE
for ac_func in clock_gettime
do :
diff --git a/configure.ac b/configure.ac
index 6c65b2914bf66..afdc68363ceaf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4085,6 +4085,8 @@ AC_CHECK_FUNCS(setpgrp,
# We search for both crypt and crypt_r as one or the other may be defined
# This gets us our -lcrypt in LIBS when required on the target platform.
+# Save/restore LIBS to avoid linking libpython with libcrypt.
+LIBS_SAVE=$LIBS
AC_SEARCH_LIBS(crypt, crypt)
AC_SEARCH_LIBS(crypt_r, crypt)
@@ -4099,6 +4101,7 @@ char *r = crypt_r("", "", &d);
[AC_DEFINE(HAVE_CRYPT_R, 1, [Define if you have the crypt_r() function.])],
[])
)
+LIBS=$LIBS_SAVE
AC_CHECK_FUNCS(clock_gettime, [], [
AC_CHECK_LIB(rt, clock_gettime, [

View File

@ -1,13 +0,0 @@
--- Python-3.8.5/Modules/socketmodule.h.orig 2020-07-20 15:01:32.000000000 +0200
+++ Python-3.8.5/Modules/socketmodule.h 2020-07-23 09:32:42.727747500 +0200
@@ -8,9 +8,7 @@
# include <sys/socket.h>
# endif
# include <netinet/in.h>
-# if !defined(__CYGWIN__)
-# include <netinet/tcp.h>
-# endif
+# include <netinet/tcp.h>
#else /* MS_WINDOWS */
# include <winsock2.h>

View File

@ -0,0 +1,20 @@
--- Python-3.11.2/Modules/ossaudiodev.c.orig 2023-02-07 14:37:51.000000000 +0100
+++ Python-3.11.2/Modules/ossaudiodev.c 2023-02-13 20:51:13.398293500 +0100
@@ -964,7 +964,7 @@
};
static PyTypeObject OSSAudioType = {
- PyVarObject_HEAD_INIT(&PyType_Type, 0)
+ PyVarObject_HEAD_INIT(NULL, 0)
"ossaudiodev.oss_audio_device", /*tp_name*/
sizeof(oss_audio_t), /*tp_basicsize*/
0, /*tp_itemsize*/
@@ -998,7 +998,7 @@
};
static PyTypeObject OSSMixerType = {
- PyVarObject_HEAD_INIT(&PyType_Type, 0)
+ PyVarObject_HEAD_INIT(NULL, 0)
"ossaudiodev.oss_mixer_device", /*tp_name*/
sizeof(oss_mixer_t), /*tp_basicsize*/
0, /*tp_itemsize*/

View File

@ -3,8 +3,8 @@
pkgbase=python
pkgname=('python' 'python-devel')
pkgver=3.10.10
pkgrel=2
pkgver=3.11.2
pkgrel=1
_pybasever=${pkgver%.*}
pkgdesc="Next generation of the python high-level scripting language"
arch=('i686' 'x86_64')
@ -30,46 +30,38 @@ source=(https://www.python.org/ftp/python/${pkgver%rc*}/Python-${pkgver}.tar.xz
001-3.1-enable-new-dtags.patch
003-3.4-select-cygwin.patch
005-3.7-ctypes-cygwin.patch
006-3.7-ftm.patch
007-3.8-dbm-cygwin.patch
008-3.8-distutils-cygwin.patch
009-3.8-export-PySignal_SetWakeupFd.patch
010-3.8-nis-cygwin.patch
012-3.8-pep3149-cygwin.patch
013-3.8-tkinter-cygwin.patch
014-3.8-xxsubinterpreters-cygwin.patch
015-rpath.patch
025-MINGW-compiler-customize-mingw-cygwin-compilers.patch
027-install-import-library.patch
900-msysize.patch
920-allow-win-drives-in-os-path-isabs.patch
930-fix-missing-tcp-include.patch
940-rebase-python-dll.patch
950-rebase-dlls.patch
960-fix-parallel-make.patch
28881-backport.patch)
sha256sums=('0419e9085bf51b7a672009b3f50dbf1859acdf18ba725d0ec19aa5c8503f0ea3'
970-ossaudiodev.patch)
sha256sums=('29e4b8f5f1658542a8c13e2dd277358c9c48f2b2f7318652ef1675e402b9d2af'
'be96ddaca58a39ddaf1e3e5bb7900b34c0e6d00e9b64c4e0f8a3565a74a44e84'
'82cfafc5b31ad4c9bb4c9786044c39c75762dbc2656abdfdc433c23fee69c02f'
'f0bb75ca69c63894fc43e0f8218c9dbcc746935bf5ea095a724e6fb2f5dcc566'
'098a756dfdb69b43bece4efe9d53a4f6ffc05a9a19a3d48854de787e69fc453c'
'dc044b0651a67f7c76e4119d65085e42277c0513b8e9653f0972d955c3dde2c5'
'8c460bf9522e50e06aa2c21a921eb42543d7a4cac6c598b13be43940a96966bf'
'70f854f00de71372e49f2ebbff7491e09e9e036e8e3f3646fe2984e30fb4a9da'
'62588723eb4051dccd0c8ab4183455e7ab99a3dca6c3c07e7403e1919b934ef0'
'9b84b5e027ff39ed3f827e805079f260db319a78571012815da30765ee2ceabc'
'4c6d9d786da1673208b0ef2bc3340e1acf08ce861b49193eb1592c53c3a4bd26'
'e3d3f4f8b653ddd7eec305d7af43928c070d409bcf7f1b59269d59545c8f1862'
'e48c719be36cb266ac3ceae834739fb1faae6740524cd672fd367f9304894a39'
'437332e1a7195dd0adcd505ecdeab5c3a7a793efdd7fea7bec55f97957bb8934'
'3e6c115c9b8e044193c0524b94275dfb13c1adfba3d250131b065f632b6d5512'
'9d0efb7e7e913e96b9f7953802311bbc2d046a7bfdcc3ffaf11fc509731b4d18'
'5dfed4be015e93ab6f4e99a69fc5b3eece9c801ea504c8d0517c3cb6bb7dbe89'
'85d9d042e0fa3493ec54b364e6b4fb6d2b12ba09641e01047bc84a09605ef76b'
'17e4ac1b5f0fa8a6c410fb80d1ad99ec9185efef51b8450a31932b553c354ed1'
'b439ff4f0a1f13858f8fb596414b74ed2c14fc3103d90287bb8e461ee89288b9'
'612bc5bcbe24c2f623713172d318c65a69ae601d72bcc5a170fe7c4eee458d18'
'c59025ca9d1219bbb42d620ca8d19398610737c5754f1873db07d55c47b2dad1'
'81e9e1a55fee1031b19dac55dbd068ed878abc5a6092cf4ab120486893ebb03a')
'ee109d91a1c7ea84d278d9a8b0e1feb397e691b8868d79f77ea7bb6b1b3b1968')
apply_patch_with_msg() {
for _patch in "$@"
@ -86,13 +78,10 @@ prepare() {
001-3.1-enable-new-dtags.patch \
003-3.4-select-cygwin.patch \
005-3.7-ctypes-cygwin.patch \
006-3.7-ftm.patch \
007-3.8-dbm-cygwin.patch \
008-3.8-distutils-cygwin.patch \
009-3.8-export-PySignal_SetWakeupFd.patch \
010-3.8-nis-cygwin.patch \
012-3.8-pep3149-cygwin.patch \
013-3.8-tkinter-cygwin.patch \
014-3.8-xxsubinterpreters-cygwin.patch \
015-rpath.patch \
025-MINGW-compiler-customize-mingw-cygwin-compilers.patch \
@ -101,15 +90,8 @@ prepare() {
920-allow-win-drives-in-os-path-isabs.patch \
940-rebase-python-dll.patch \
950-rebase-dlls.patch \
960-fix-parallel-make.patch
# https://bugs.python.org/issue41374
apply_patch_with_msg \
930-fix-missing-tcp-include.patch
# https://github.com/python/cpython/pull/28881
apply_patch_with_msg \
28881-backport.patch
960-fix-parallel-make.patch \
970-ossaudiodev.patch
# Ensure that we are using the system copy of various libraries (expat, zlib and libffi),
# rather than copies shipped in the tarball
@ -166,9 +148,6 @@ package_python() {
# License
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
# fix permissons
find ${pkgdir}/usr -type f \( -name *.dll -o -name *.exe \) | xargs chmod 0755
}
package_python-devel() {