diff --git a/nodejs13.changes b/nodejs13.changes index 2faff38..600b005 100644 --- a/nodejs13.changes +++ b/nodejs13.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Jan 3 15:03:17 UTC 2020 - Adam Majer + +- sle12_python3_compat.patch: Adds Python 3.4 to compatible + python versions allowing us to build with python3 on SLE-12 + ------------------------------------------------------------------- Thu Dec 19 14:05:11 UTC 2019 - Adam Majer diff --git a/nodejs13.spec b/nodejs13.spec index 26fdef5..359c08b 100644 --- a/nodejs13.spec +++ b/nodejs13.spec @@ -121,6 +121,7 @@ Source20: bash_output_helper.bash ## Patches not distribution specific Patch2: python3.patch Patch3: fix_ci_tests.patch +Patch5: sle12_python3_compat.patch Patch7: manual_configure.patch @@ -318,6 +319,12 @@ echo "`grep node-v%{version}.tar.xz %{S:1} | head -n1 | cut -c1-64` %{S:0}" | s %setup -q -n node-%{version} %endif +%if %{node_version_number} == 6 +# Update NPM +rm -r deps/npm +tar Jxvf %{SOURCE10} +%endif + %if %{node_version_number} >= 10 tar Jxvf %{SOURCE11} %endif # node_version_number @@ -326,6 +333,7 @@ tar Jxvf %{SOURCE11} %patch3 -p1 %if ! 0%{with intree_openssl} %endif +%patch5 -p1 %patch7 -p1 %if 0%{with valgrind_tests} %endif diff --git a/sle12_python3_compat.patch b/sle12_python3_compat.patch new file mode 100644 index 0000000..9e291ea --- /dev/null +++ b/sle12_python3_compat.patch @@ -0,0 +1,21 @@ +Index: node-v13.5.0/configure +=================================================================== +--- node-v13.5.0.orig/configure ++++ node-v13.5.0/configure +@@ -11,6 +11,7 @@ which python3.8 >/dev/null && exec pytho + which python3.7 >/dev/null && exec python3.7 "$0" "$@" + which python3.6 >/dev/null && exec python3.6 "$0" "$@" + which python3.5 >/dev/null && exec python3.5 "$0" "$@" ++which python3.4 >/dev/null && exec python3.4 "$0" "$@" + which python2.7 >/dev/null && exec python2.7 "$0" "$@" + exec python "$0" "$@" + ''' "$0" "$@" +@@ -21,7 +22,7 @@ import sys + from distutils.spawn import find_executable + + print('Node.js configure: Found Python {0}.{1}.{2}...'.format(*sys.version_info)) +-acceptable_pythons = ((3, 8), (3, 7), (3, 6), (3, 5), (2, 7)) ++acceptable_pythons = ((3, 8), (3, 7), (3, 6), (3, 5), (3, 4), (2, 7)) + if sys.version_info[:2] in acceptable_pythons: + import configure + else: