From 44f00eb3939c1d65ea6e8bb9eae1269403f726fa Mon Sep 17 00:00:00 2001 From: cmitu <31816814+cmitu@users.noreply.github.com> Date: Sun, 1 Nov 2020 11:13:26 +0200 Subject: [PATCH] lr-mame,mame: use python3 to build recent mame versions The change impacts `lr-mame`,`lr-mess`,`lr-mame2016`,`lr-mess2016` and `mame`. It should fix building on new Ubuntu 20.04+ installations, which don't have a default `python` executable. Since `python3` is automatically needed by the installation (via `python3-pyudev` for `joy2key`), no explicit dependency for `python3` was added. --- scriptmodules/emulators/mame.sh | 5 +---- scriptmodules/libretrocores/lr-mame.sh | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/scriptmodules/emulators/mame.sh b/scriptmodules/emulators/mame.sh index a1d6226944..dde68b6c04 100644 --- a/scriptmodules/emulators/mame.sh +++ b/scriptmodules/emulators/mame.sh @@ -53,10 +53,7 @@ function build_mame() { fi # Compile MAME - local params=(NOWERROR=1 ARCHOPTS=-U_FORTIFY_SOURCE) - # Prefer python3 for building, when available - command -v python3 >/dev/null 2>&1 && params+=(PYTHON_EXECUTABLE=python3) - + local params=(NOWERROR=1 ARCHOPTS=-U_FORTIFY_SOURCE PYTHON_EXECUTABLE=python3) make "${params[@]}" local binary_name="$(_get_binary_name_${md_id})" diff --git a/scriptmodules/libretrocores/lr-mame.sh b/scriptmodules/libretrocores/lr-mame.sh index 2c46aa321e..b023b226c1 100644 --- a/scriptmodules/libretrocores/lr-mame.sh +++ b/scriptmodules/libretrocores/lr-mame.sh @@ -17,7 +17,7 @@ rp_module_section="exp" rp_module_flags="" function _get_params_lr-mame() { - local params=(OSD=retro RETRO=1 NOWERROR=1 OS=linux TARGETOS=linux CONFIG=libretro NO_USE_MIDI=1 TARGET=mame) + local params=(OSD=retro RETRO=1 NOWERROR=1 OS=linux TARGETOS=linux CONFIG=libretro NO_USE_MIDI=1 TARGET=mame PYTHON_EXECUTABLE=python3) isPlatform "64bit" && params+=(PTR64=1) echo "${params[@]}" }