RetroPie-Setup/scriptmodules/libretrocores/lr-mame2016.sh
cmitu 9849fd1ab8 lr-mame2016: fix build with recent python3
Looks like some deprecation in python3.11 breaks building the Mame/Mess2016 cores due to some codegen including python scripts.
Similar to the commit for `lr-mame2016`, allows us to build on the newer Bookworm.
2023-10-24 18:21:19 +01:00

52 lines
1.6 KiB
Bash

#!/usr/bin/env bash
# This file is part of The RetroPie Project
#
# The RetroPie Project is the legal property of its developers, whose names are
# too numerous to list here. Please refer to the COPYRIGHT.md file distributed with this source.
#
# See the LICENSE.md file at the top-level directory of this distribution and
# at https://raw.githubusercontent.com/RetroPie/RetroPie-Setup/master/LICENSE.md
#
rp_module_id="lr-mame2016"
rp_module_desc="MAME emulator - MAME 0.174 port for libretro"
rp_module_help="ROM Extension: .zip\n\nCopy your MAME roms to either $romdir/mame-libretro or\n$romdir/arcade"
rp_module_licence="GPL2 https://raw.githubusercontent.com/libretro/mame2016-libretro/master/LICENSE.md"
rp_module_repo="git https://github.com/libretro/mame2016-libretro.git master"
rp_module_section="exp"
rp_module_flags=""
function depends_lr-mame2016() {
getDepends libasound2-dev
}
function sources_lr-mame2016() {
gitPullOrClone
applyPatch "${md_path%/*}/lr-mame2016/01-python3-irgen.diff"
}
function build_lr-mame2016() {
rpSwap on 1200
local params=($(_get_params_lr-mame) SUBTARGET=arcade)
make -f Makefile.libretro clean
make -f Makefile.libretro "${params[@]}"
rpSwap off
md_ret_require="$md_build/mamearcade2016_libretro.so"
}
function install_lr-mame2016() {
md_ret_files=(
'mamearcade2016_libretro.so'
)
}
function configure_lr-mame2016() {
local system
for system in arcade mame-libretro; do
mkRomDir "$system"
defaultRAConfig "$system"
addEmulator 0 "$md_id" "$system" "$md_inst/mamearcade2016_libretro.so"
addSystem "$system"
done
}