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