RetroPie-Setup/scriptmodules/libretrocores/lr-dosbox.sh
cmitu 12c79be89f lr-dosbox: fix building with GCC 11+
Reported upstream, but not fixed. Workaround is to force C++11 as dialect, suggested in https://github.com/libretro/dosbox-libretro/issues/137
2024-01-25 17:57:13 +00:00

53 lines
1.5 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-dosbox"
rp_module_desc="DOS emulator"
rp_module_help="ROM Extensions: .bat .com .exe .sh\n\nCopy your DOS games to $ROMDIR/pc"
rp_module_licence="GPL2 https://raw.githubusercontent.com/libretro/dosbox-libretro/master/COPYING"
rp_module_repo="git https://github.com/libretro/dosbox-libretro.git master"
rp_module_section="exp"
rp_module_flags=""
function sources_lr-dosbox() {
gitPullOrClone
}
function build_lr-dosbox() {
local params=()
if isPlatform "arm"; then
if isPlatform "armv6"; then
params+="WITH_DYNAREC=oldarm"
else
params+="WITH_DYNAREC=arm"
fi
fi
make clean
[[ "$__gcc_version" -gt 10 ]] && CXXFLAGS="$CXXFLAGS -std=gnu++11"
make "${params[@]}"
md_ret_require="$md_build/dosbox_libretro.so"
}
function install_lr-dosbox() {
md_ret_files=(
'COPYING'
'dosbox_libretro.so'
'README'
)
}
function configure_lr-dosbox() {
mkRomDir "pc"
defaultRAConfig "pc"
addEmulator 0 "$md_id" "pc" "$md_inst/dosbox_libretro.so"
addSystem "pc"
}