python: more msysize cleanup

change uname to cygwin and drop all build time patches
depending on uname.

This shouldn't change anything in the build result in theory.
This commit is contained in:
Christoph Reiter
2023-02-13 19:10:27 +01:00
parent c7e102a61a
commit 34a49bb1b3
2 changed files with 6 additions and 100 deletions

View File

@@ -1,14 +1,5 @@
--- Python-3.8.7.cygwin/configure.ac 2021-05-11 21:07:52.839122100 +0200
+++ Python-3.8.7/configure.ac 2021-05-11 21:10:48.366063600 +0200
@@ -401,7 +401,7 @@
case $MACHDEP in
aix*) MACHDEP="aix";;
linux*) MACHDEP="linux";;
- cygwin*) MACHDEP="cygwin";;
+ cygwin*|msys*) MACHDEP="cygwin";;
darwin*) MACHDEP="darwin";;
'') MACHDEP="unknown";;
esac
@@ -845,6 +845,14 @@
darwin
#elif defined(__VXWORKS__)
@@ -24,89 +15,15 @@
#elif defined(__CYGWIN__)
# if defined(__x86_64__)
x86_64-cygwin
@@ -1064,7 +1072,7 @@
if test -z "$enable_shared"
then
@@ -1137,7 +1148,7 @@
case $ac_sys_system in
- CYGWIN*)
+ CYGWIN*|MSYS*)
enable_shared="yes";;
*)
enable_shared="no";;
@@ -1118,6 +1126,10 @@
CYGWIN*)
LDLIBRARY='libpython$(LDVERSION).dll.a'
DLLLIBRARY='libpython$(LDVERSION).dll'
;;
+ MSYS*)
+ LDLIBRARY='libpython$(LDVERSION).dll.a'
- DLLLIBRARY='libpython$(LDVERSION).dll'
+ DLLLIBRARY='msys-python$(LDVERSION).dll'
+ ;;
;;
SunOS*)
LDLIBRARY='libpython$(LDVERSION).so'
BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
@@ -1164,7 +1176,7 @@
else # shared is disabled
PY_ENABLE_SHARED=0
case $ac_sys_system in
- CYGWIN*)
+ CYGWIN*|MSYS*)
BLDLIBRARY='$(LIBRARY)'
LDLIBRARY='libpython$(LDVERSION).dll.a'
;;
@@ -1213,7 +1225,7 @@
AC_SUBST(LN)
if test -z "$LN" ; then
case $ac_sys_system in
- CYGWIN*) LN="ln -s";;
+ CYGWIN*|MSYS*) LN="ln -s";;
*) LN=ln;;
esac
fi
@@ -2514,7 +2526,7 @@
*) SHLIB_SUFFIX=.sl;;
esac
;;
- CYGWIN*) SHLIB_SUFFIX=.dll;;
+ CYGWIN*|MSYS*) SHLIB_SUFFIX=.dll;;
*) SHLIB_SUFFIX=.so;;
esac
fi
@@ -2648,7 +2660,7 @@
SCO_SV*)
LDSHARED='$(CC) -Wl,-G,-Bexport'
LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
- CYGWIN*)
+ CYGWIN*|MSYS*)
LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
*) LDSHARED="ld";;
@@ -2734,7 +2746,7 @@
LINKFORSHARED="-Xlinker --export-dynamic"
fi;;
esac;;
- CYGWIN*)
+ CYGWIN*|MSYS*)
if test $enable_shared = "no"
then
LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
@@ -2758,7 +2770,7 @@
if test ! "$LIBRARY" = "$LDLIBRARY"
then
case $ac_sys_system in
- CYGWIN*)
+ CYGWIN*|MSYS*)
# Cygwin needs CCSHARED when building extension DLLs
# but not when building the interpreter DLL.
CFLAGSFORSHARED='';;
@@ -3228,7 +3240,7 @@
fi
AC_CHECK_FUNCS(pthread_sigmask,
[case $ac_sys_system in
- CYGWIN*)
+ CYGWIN*|MSYS*)
AC_DEFINE(HAVE_BROKEN_PTHREAD_SIGMASK, 1,
[Define if pthread_sigmask() does not work on your system.])
;;
--- Python-3.8.7.orig/Lib/ctypes/__init__.py 2020-12-21 17:25:24.000000000 +0100
+++ Python-3.8.7/Lib/ctypes/__init__.py 2021-05-11 22:26:25.866873900 +0200
@@ -456,7 +456,7 @@
@@ -184,15 +101,3 @@ diff -Naur Python-3.8.2-orig/Lib/sysconfig.py Python-3.8.2/Lib/sysconfig.py
elif osname[:6] == "darwin":
import _osx_support
osname, release, machine = _osx_support.get_platform_osx(
diff -Naur Python-3.8.2-orig/Modules/makesetup Python-3.8.2/Modules/makesetup
--- Python-3.8.2-orig/Modules/makesetup 2020-02-25 00:36:25.000000000 +0300
+++ Python-3.8.2/Modules/makesetup 2020-04-16 11:24:20.926282900 +0300
@@ -88,7 +88,7 @@
# Setup to link with extra libraries when making shared extensions.
# Currently, only Cygwin needs this baggage.
case `uname -s` in
-CYGWIN*) if test $libdir = .
+CYGWIN*|MSYS*) if test $libdir = .
then
ExtraLibDir=.
else

View File

@@ -63,7 +63,7 @@ sha256sums=('0419e9085bf51b7a672009b3f50dbf1859acdf18ba725d0ec19aa5c8503f0ea3'
'437332e1a7195dd0adcd505ecdeab5c3a7a793efdd7fea7bec55f97957bb8934'
'3e6c115c9b8e044193c0524b94275dfb13c1adfba3d250131b065f632b6d5512'
'9d0efb7e7e913e96b9f7953802311bbc2d046a7bfdcc3ffaf11fc509731b4d18'
'ce55a5e343158d7b1cd114cc7d7d53bcedfcd8616c533f816b3a0f1b2fe13682'
'5dfed4be015e93ab6f4e99a69fc5b3eece9c801ea504c8d0517c3cb6bb7dbe89'
'85d9d042e0fa3493ec54b364e6b4fb6d2b12ba09641e01047bc84a09605ef76b'
'17e4ac1b5f0fa8a6c410fb80d1ad99ec9185efef51b8450a31932b553c354ed1'
'b439ff4f0a1f13858f8fb596414b74ed2c14fc3103d90287bb8e461ee89288b9'
@@ -122,6 +122,7 @@ prepare() {
build() {
cd "${srcdir}/Python-${pkgver}"
export MSYSTEM=CYGWIN
local CYGWIN_CHOST="${CHOST/-msys/-cygwin}"
./configure \
--prefix=/usr \