Blob Blame History Raw
--- 0ad-0.0.26-alpha/libraries/source/spidermonkey/patch.sh.virtualenv	2022-09-30 13:48:58.606978147 +0200
+++ 0ad-0.0.26-alpha/libraries/source/spidermonkey/patch.sh	2022-09-30 13:49:52.645852256 +0200
@@ -2,6 +2,17 @@
 # Apply patches if needed
 # This script gets called from build.sh.
 
+git init . -b main
+git config user.name 'rpm-build'
+git config user.email '<rpm-build>'
+git add .
+git commit -m 'Initial commit'
+git am --keep-cr __SOURCE3__
+git am --keep-cr __SOURCE4__
+
+# Use python3.11 instead of 3.12 for Fedora builds
+sed -i -e 's/exec python3 /exec python3.11 /' js/src/configure*
+
 # SM78 fails to create virtual envs on macs with python > 3.7
 # Unfortunately, 3.7 is mostly unavailable on ARM macs.
 # Therefore, replace the custom script with a more up-to-date version from pip
@@ -24,14 +24,6 @@
         export PYTHONPATH="$(pwd)/virtualenv:$PYTHONPATH"
         patch -p1 < ../FixVirtualEnv.diff
     fi
-else
-    # In python 3.10 `sysconfig._get_default_scheme()` was renamed to
-    # `sysconfig.get_default_scheme()`. This breaks the version of
-    # `virtualenv` bundled with the spidermonkey source code.
-    #
-    # It is assumed that the updated version fetched for macOS systems
-    # above does not have this problem.
-    patch -p1 < ../FixVirtualenvForPython310.diff
 fi
 
 # Mozglue symbols need to be linked against static builds.