scons: update for python sys.platform changes

This commit is contained in:
Christoph Reiter 2021-05-13 11:52:54 +02:00
parent 243214a2ff
commit ffa3048c44
2 changed files with 7 additions and 50 deletions

View File

@ -3,7 +3,7 @@
pkgname=scons
pkgver=3.1.2
pkgrel=4
pkgrel=5
pkgdesc="Extensible Python-based build utility"
arch=('any')
groups=('base-devel')
@ -15,7 +15,7 @@ source=("https://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${p
scons-2.3.4-msys2-plat-mingw-env.patch
mingw_w64.py)
sha256sums=('7801f3f62f654528e272df780be10c0e9337e897650b62ddcee9f39fde13f8fb'
'23b50d164c3e22694c635bc146e8482ee97c876f693c8a0c2a4a90230eb8812a'
'48e9ac05b18f123c179da0a7398b6a8e777bb309d4125b729855100119644ec4'
'c024560dc93636d92614c17d7519080dd931f6c1471088616692a443d3cfc064'
'984c55d0ca18ac594941bb6336fe994efe2f5bba20225e8cb1f5d42c80eaf651')

View File

@ -1,32 +1,10 @@
diff -Naur scons-2.3.4-orig/engine/SCons/Node/FS.py scons-2.3.4/engine/SCons/Node/FS.py
--- scons-2.3.4-orig/engine/SCons/Node/FS.py 2014-09-27 19:51:48.000000000 +0300
+++ scons-2.3.4/engine/SCons/Node/FS.py 2014-11-05 01:00:41.503600000 +0300
@@ -372,7 +372,7 @@
_null = _Null()
# Cygwin's os.path.normcase pretends it's on a case-sensitive filesystem.
-_is_cygwin = sys.platform == "cygwin"
+_is_cygwin = sys.platform in ["cygwin", "msys"]
if os.path.normcase("TeSt") == os.path.normpath("TeSt") and not _is_cygwin:
def _my_normcase(x):
return x
@@ -1955,7 +1955,7 @@
for entry in map(_my_normcase, entries):
d[entry] = True
self.on_disk_entries = d
- if sys.platform == 'win32' or sys.platform == 'cygwin':
+ if sys.platform == 'win32' or sys.platform == 'cygwin' or sys.platform == 'msys':
name = _my_normcase(name)
result = d.get(name)
if result is None:
diff -Naur scons-2.3.4-orig/engine/SCons/Platform/__init__.py scons-2.3.4/engine/SCons/Platform/__init__.py
--- scons-2.3.4-orig/engine/SCons/Platform/__init__.py 2014-09-27 19:51:48.000000000 +0300
+++ scons-2.3.4/engine/SCons/Platform/__init__.py 2014-11-05 01:00:42.034000000 +0300
@@ -70,6 +70,8 @@
--- scons-3.1.2.orig/engine/SCons/Platform/__init__.py 2019-12-17 03:07:12.000000000 +0100
+++ scons-3.1.2/engine/SCons/Platform/__init__.py 2021-05-13 11:44:15.899865900 +0200
@@ -69,7 +69,7 @@
osname = os._osType
if osname == 'posix':
if sys.platform == 'cygwin':
return 'cygwin'
+ elif sys.platform == 'msys':
- return 'cygwin'
+ return 'msys'
elif sys.platform.find('irix') != -1:
return 'irix'
@ -412,27 +390,6 @@ diff -Naur /dev/null scons-3.0.4/engine/SCons/Tool/msyslink.py
+# indent-tabs-mode:nil
+# End:
+# vim: set expandtab tabstop=4 shiftwidth=4:
diff -Naur scons-2.3.4-orig/engine/SCons/Util.py scons-2.3.4/engine/SCons/Util.py
--- scons-2.3.4-orig/engine/SCons/Util.py 2014-09-27 19:51:48.000000000 +0300
+++ scons-2.3.4/engine/SCons/Util.py 2014-11-05 01:00:42.049600000 +0300
@@ -889,7 +889,7 @@
else:
return sep.join(paths)
-if sys.platform == 'cygwin':
+if sys.platform in ['cygwin', 'msys']:
def get_native_path(path):
"""Transforms an absolute path into a native path for the system. In
Cygwin, this converts from a Cygwin path to a Windows one."""
@@ -1020,7 +1020,7 @@
return None
-if sys.platform == 'cygwin':
+if sys.platform in ['cygwin', 'msys']:
# On Cygwin, os.path.normcase() lies, so just report back the
# fact that the underlying Windows OS is case-insensitive.
def case_sensitive_suffixes(s1, s2):
diff -Naur scons-2.3.4-orig/MANIFEST scons-2.3.4/MANIFEST
--- scons-2.3.4-orig/MANIFEST 2014-09-27 19:52:20.000000000 +0300
+++ scons-2.3.4/MANIFEST 2014-11-05 01:00:42.065200000 +0300