mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-15 11:33:49 +02:00
mame: update to 0.225; enable cross
Also switch to python3. Remove obsolete files/mess.sh and install check. When cross compiling build genie for the host and in do_build() now override the CC, CXX, LD with the target compilers.
This commit is contained in:
parent
93d88be939
commit
08d6a68a44
2 changed files with 65 additions and 101 deletions
|
@ -1,45 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
exec_mess() {
|
||||
/usr/libexec/mame/mess \
|
||||
-artpath "$HOME/.mess/artwork;artwork" \
|
||||
-ctrlrpath "$HOME/.mess/ctrlr;ctrlr" \
|
||||
-inipath $HOME/.mess/ini \
|
||||
-rompath $HOME/.mess/roms \
|
||||
-samplepath "$HOME/.mess/samples;samples" \
|
||||
-cfg_directory $HOME/.mess/cfg \
|
||||
-comment_directory $HOME/.mess/comments \
|
||||
-diff_directory $HOME/.mess/diff \
|
||||
-input_directory $HOME/.mess/inp \
|
||||
-nvram_directory $HOME/.mess/nvram \
|
||||
-snapshot_directory $HOME/.mess/snap \
|
||||
-state_directory $HOME/.mess/sta \
|
||||
-video opengl \
|
||||
-createconfig
|
||||
}
|
||||
|
||||
if [ "$1" = "--newini" ]; then
|
||||
echo "Rebuilding the ini file at $HOME/.mess/mame.ini"
|
||||
echo "Modify this file for permanent changes to your MESS"
|
||||
echo "options and paths before running MESS again."
|
||||
cd $HOME/.mess
|
||||
if [ -e mame.ini ]; then
|
||||
echo "Your old ini file has been renamed to mame.ini.bak"
|
||||
mv mame.ini mame.ini.bak
|
||||
fi
|
||||
exec_mess
|
||||
elif [ ! -e $HOME/.mess ]; then
|
||||
echo "Running MESS for the first time..."
|
||||
echo "Creating an ini file for MESS at $HOME/.mess/mame.ini"
|
||||
echo "Modify this file for permanent changes to your MAME"
|
||||
echo "options and paths before running MAME again."
|
||||
mkdir $HOME/.mess
|
||||
for f in artwork cfg comments ctrlr diff ini ip nvram \
|
||||
samples snap sta roms; do
|
||||
mkdir $HOME/.mess/${f}
|
||||
done
|
||||
cd $HOME/.mess && exec_mess
|
||||
else
|
||||
cd /usr/share/mame
|
||||
/usr/libexec/mame/mess "$@"
|
||||
fi
|
|
@ -1,73 +1,85 @@
|
|||
# Template file for 'mame'
|
||||
pkgname=mame
|
||||
version=0224
|
||||
version=0225
|
||||
revision=1
|
||||
wrksrc="mame-mame${version}"
|
||||
hostmakedepends="pkg-config python3 qt5-host-tools tar xz which"
|
||||
makedepends="SDL2_ttf-devel fontconfig-devel glm libgomp-devel libjpeg-turbo-devel
|
||||
lua-devel libutf8proc-devel libuv-devel portaudio-devel portmidi-devel
|
||||
pugixml-devel rapidjson $(vopt_if qt 'qt5-devel')"
|
||||
depends="liberation-fonts-ttf"
|
||||
short_desc="Multiple Arcade Machine Emulator"
|
||||
maintainer="Jürgen Buchmüller <pullmoll@t-online.de>"
|
||||
license="GPL-2.0-or-later"
|
||||
homepage="http://mamedev.org"
|
||||
distfiles="https://github.com/mamedev/mame/archive/mame${version}.tar.gz"
|
||||
checksum=3518e71ec20fbeac8ebe93f8ec856078b8288e19f0d7cb38959d4bde30cd2810
|
||||
|
||||
hostmakedepends="pkg-config python tar xz which"
|
||||
makedepends="SDL2_ttf-devel glm libgomp-devel libjpeg-turbo-devel
|
||||
libutf8proc-devel libuv-devel lua53-devel portaudio-devel portmidi-devel
|
||||
pugixml-devel rapidjson $(vopt_if qt 'qt5-devel')"
|
||||
depends="liberation-fonts-ttf"
|
||||
nocross=yes
|
||||
checksum=ca4d5a429d72b30fd2bdf60350e490c7de4ac64b1e0dafcf38450f8ba84a1a95
|
||||
nodebug=yes
|
||||
replaces="sdlmame>=0 sdlmess>=0"
|
||||
|
||||
CFLAGS="-I${XBPS_CROSS_BASE}/usr/include/lua5.3 -I${XBPS_CROSS_BASE}/usr/include/libutf8proc"
|
||||
CXXFLAGS="${CFLAGS}"
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
*-musl) CXXFLAGS+=" -DBX_CRT_MUSL=1" ;;
|
||||
esac
|
||||
CXXFLAGS="$CFLAGS"
|
||||
[ "$XBPS_TARGET_LIBC" = musl ] && CXXFLAGS+=" -DBX_CRT_MUSL=1"
|
||||
|
||||
build_options="qt"
|
||||
if [ -z "$CROSS_BUILD" ]; then
|
||||
build_options_default="qt"
|
||||
build_options_default="qt"
|
||||
|
||||
_options="REGENIE=1 TARGETOS=linux NOWERROR=1 OPENMP=1 OPTIMIZE=3
|
||||
TOOLS=1 LTO=0 USE_SYSTEM_LIB_ASIO=0 USE_SYSTEM_LIB_EXPAT=1
|
||||
USE_SYSTEM_LIB_ZLIB=1 USE_SYSTEM_LIB_JPEG=1 USE_SYSTEM_LIB_FLAC=1
|
||||
USE_SYSTEM_LIB_LUA=0 USE_SYSTEM_LIB_SQLITE3=1
|
||||
USE_SYSTEM_LIB_PORTMIDI=1 USE_SYSTEM_LIB_PORTAUDIO=1
|
||||
USE_SYSTEM_LIB_UTF8PROC=1 USE_SYSTEM_LIB_GLM=1
|
||||
USE_SYSTEM_LIB_RAPIDJSON=1 USE_SYSTEM_LIB_PUGIXML=1"
|
||||
if [ "$XBPS_TARGET_ENDIAN" = "be" ]; then
|
||||
_options+=" BIGENDIAN=1"
|
||||
else
|
||||
_options+=" BIGENDIAN=0"
|
||||
fi
|
||||
if [ "${CROSS_BUILD}" ]; then
|
||||
_options+=" NOASM=1"
|
||||
fi
|
||||
if [ "$XBPS_TARGET_WORDSIZE" = 32 ]; then
|
||||
# Overcome linker memory exhaustion
|
||||
_options+=" SYMBOLS=0"
|
||||
LDFLAGS+=" -Wl,--no-keep-memory"
|
||||
else
|
||||
_options+=" PTR64=1"
|
||||
fi
|
||||
if [ "$build_option_qt" ]; then
|
||||
_options+=" USE_QTDEBUG=1"
|
||||
fi
|
||||
|
||||
do_build() {
|
||||
local opts="REGENIE=1"
|
||||
opts+=" TARGETOS=linux"
|
||||
opts+=" NOWERROR=1"
|
||||
opts+=" OPENMP=1"
|
||||
opts+=" OPTIMIZE=3"
|
||||
opts+=" TOOLS=1"
|
||||
opts+=" LTO=0"
|
||||
opts+=" USE_SYSTEM_LIB_EXPAT=1"
|
||||
opts+=" USE_SYSTEM_LIB_ZLIB=1"
|
||||
opts+=" USE_SYSTEM_LIB_JPEG=1"
|
||||
opts+=" USE_SYSTEM_LIB_FLAC=1"
|
||||
opts+=" USE_SYSTEM_LIB_LUA=1"
|
||||
opts+=" USE_SYSTEM_LIB_SQLITE3=1"
|
||||
opts+=" USE_SYSTEM_LIB_PORTMIDI=1"
|
||||
opts+=" USE_SYSTEM_LIB_PORTAUDIO=1"
|
||||
opts+=" USE_SYSTEM_LIB_UTF8PROC=1"
|
||||
opts+=" USE_SYSTEM_LIB_GLM=1"
|
||||
opts+=" USE_SYSTEM_LIB_RAPIDJSON=1"
|
||||
opts+=" USE_SYSTEM_LIB_PUGIXML=1"
|
||||
[ "$build_option_qt" ] && opts+=" USE_QTDEBUG=1"
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
i686*) # Overcome linker memory exhaustion
|
||||
opts+=" SYMBOLS=0"
|
||||
;;
|
||||
x86_64*|aarch64*|ppc64*)
|
||||
opts+=" PTR64=1"
|
||||
;;
|
||||
esac
|
||||
# To test flags with a tiny build remove hash (#) on the following line
|
||||
#_options+=" TARGET=mame SUBTARGET=tiny VERBOSE=1"
|
||||
|
||||
do_configure() {
|
||||
# When linking mame expects liblua.so but we have liblua5.3.so
|
||||
ln -sf liblua5.3.so ${XBPS_CROSS_BASE}/usr/lib/liblua.so
|
||||
if [ "${CROSS_BUILD}" ]; then
|
||||
# Doesn't work yet
|
||||
opts+=" TOOLCHAIN=${XBPS_CROSS_TRIPLET}"
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
i686*|x86_64*) ;;
|
||||
*) # Cross compilers don't need/use -m32 or -m64
|
||||
grep -rlw -- -m32 | xargs sed -i "s;-m32;;"
|
||||
grep -rlw -- -m64 | xargs sed -i "s;-m64;;"
|
||||
;;
|
||||
esac
|
||||
make ${makejobs} ${_options} \
|
||||
CC="$CC_host" \
|
||||
CXX="$CXX_host" \
|
||||
LD="$CXX_host" \
|
||||
CFLAGS="$CFLAGS_host" \
|
||||
CXXFLAGS="$CXXFLAGS_host" \
|
||||
LDFLAGS="$LDFLAGS_host" \
|
||||
genie
|
||||
else
|
||||
make ${makejobs} ${_options} genie
|
||||
fi
|
||||
make ${opts} genie
|
||||
cd 3rdparty/genie
|
||||
bin/linux/genie embed
|
||||
cd ${wrksrc}
|
||||
make ${opts} ${makejobs}
|
||||
}
|
||||
|
||||
do_build() {
|
||||
make OVERRIDE_CC="$CC" OVERRIDE_CXX="$CXX" OVERRIDE_LD="$CXX" \
|
||||
${makejobs} ${_options}
|
||||
}
|
||||
|
||||
do_install() {
|
||||
|
@ -76,11 +88,6 @@ do_install() {
|
|||
# Install the mame script
|
||||
vbin ${FILESDIR}/mame.sh mame
|
||||
|
||||
# If mess is a separate binary, also install the mess script
|
||||
if [ "${XBPS_TARGET_MACHINE%-musl}" != "x86_64" ]; then
|
||||
vbin ${FILESDIR}/mess.sh mess
|
||||
fi
|
||||
|
||||
# Install the main application(s)
|
||||
for f in mame mame64 mamearcade mamearcade64; do
|
||||
if [ -r ${f} ]; then
|
||||
|
@ -113,4 +120,6 @@ do_install() {
|
|||
for f in artwork bgfx docs hash hlsl keymaps plugins samples; do
|
||||
vcopy ${f} usr/share/${pkgname}
|
||||
done
|
||||
# Remove temporary liblua.so symlink
|
||||
rm -f ${XBPS_CROSS_BASE}/usr/lib/liblua.so
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue