mame: update to 0.162 and rename from sdlmame

- rename sdlmame -> mame
- remove handling of (no longer to be expected) 'u' patch versions
- now contains all mame and mess drivers in one binary
- replaces sdlmame and sdlmess
- the license did not change yet; plans are to move to GPL with next release
This commit is contained in:
jbu 2015-05-27 17:35:57 +02:00
parent 09707f67b5
commit e533172819
4 changed files with 23 additions and 99 deletions

View file

@ -1,7 +1,7 @@
#!/bin/sh
exec_mame() {
/usr/share/sdlmame/sdlmame \
/usr/share/mame/mame \
-artpath "$HOME/.mame/artwork;artwork" \
-ctrlrpath "$HOME/.mame/ctrlr;ctrlr" \
-inipath $HOME/.mame/ini \
@ -19,7 +19,7 @@ exec_mame() {
}
if [ "$1" = "--newini" ]; then
echo "Rebuilding the ini file at $HOME/.mame/sdlmame.ini"
echo "Rebuilding the ini file at $HOME/.mame/mame.ini"
echo "Modify this file for permanent changes to your SDLMAME"
echo "options and paths before running SDLMAME again."
cd $HOME/.mame
@ -40,6 +40,6 @@ elif [ ! -e $HOME/.mame ]; then
done
cd $HOME/.mame && exec_mame
else
cd /usr/share/sdlmame
./sdlmame "$@"
cd /usr/share/mame
./mame "$@"
fi

View file

@ -1,22 +1,21 @@
# Template file for 'mame'
pkgname=sdlmame
_distver=0161
_patchver=0
version=${_distver}u${_patchver}
revision=2
wrksrc="mame-${_distver}s"
pkgname=mame
version=0162
revision=1
wrksrc="mame-${version}s"
homepage="http://mamedev.org"
distfiles="${homepage}/downloader.php?file=releases/mame${_distver}s.zip"
distfiles="https://github.com/mamedev/$pkgname/releases/download/${pkgname}${version}/${pkgname}${version}s.zip"
short_desc="The Multiple Arcade Machine Emulator"
maintainer="Juan RP <xtraeme@voidlinux.eu>"
license="mame"
checksum=c0ba4c8e6ea7a491cbf7b317221d03c916dee53ca3cde4ff26adbc478a395a0f
checksum=8342af35ab8cc9498d3ade5947bf2376bbfdd40883a532cae9b09c63ace99d7e
hostmakedepends="unzip perl pkg-config python automoc4"
makedepends="SDL2_ttf-devel fontconfig-devel libXinerama-devel qt-devel alsa-lib-devel lua-devel"
depends="liberation-fonts-ttf"
repository="nonfree"
nocross=yes
repository="nonfree"
replaces="sdlmame>=0 sdlmess>=0"
do_extract() {
# mame source code is double-zipped to save space.
@ -25,25 +24,17 @@ do_extract() {
unzip -q mame.zip
rm -f mame.zip
find . -type f -not -name \*.png -print0 | xargs -0 perl -pi -e 's/\r\n?/\n/g'
# Download and apply released patches.
for p in $(seq -w 1 ${_patchver}); do
_patch=${_distver}u${p}
msg_normal "Fetching patch: ${_patch} ...\n"
${XBPS_FETCH_CMD} ${homepage}/updates/${_patch}_diff.zip
msg_normal "Applying patch: ${_patch} ...\n"
unzip -q ${_patch}_diff.zip
patch -p0 -E -i ${_patch}.diff
rm -f ${_patch}_diff
done
}
do_build() {
# REGENIE=1 rebuild genie binary and dependencies
# TOOLS=1 replaces target tools
make REGENIE=1 NOWERROR=1 TOOLS=1 ${makejobs}
local opts="REGENIE=1 NOWERROR=1 TOOLS=1 OPTIMIZE=3"
if [ "${CROSS_BUILD}" ]; then
# Doesn't work yet because of qt (which can't be cross compiled ?)
opts+=" CROSS_BUILD=1 OVERRIDE_CC=${CC} OVERRIDE_CXX=${CXX} OVERRIDE_LD=${CC}"
fi
make ${opts} ${makejobs}
}
do_install() {
# Install the sdlmame script
# Install the mame script
vbin ${FILESDIR}/${pkgname}.sh ${pkgname}
# Install the applications and the UI font in /usr/share
@ -54,13 +45,15 @@ do_install() {
fi
for f in chdman jedutil regrep romcmp testkeys src2html srcclean \
ldverify ldresample unidasm; do
ldverify ldresample unidasm castool floptool imgtool; do
vinstall ${f} 755 usr/share/${pkgname}
if [ -f src/osd/sdl/man/${f}.1 ]; then
vman src/osd/sdl/man/${f}.1
fi
done
vman src/osd/sdl/man/mame.6
# Currently mess.6 still exists, so install it as well
vman src/osd/sdl/man/mess.6
# Install the extra bits
install -d ${DESTDIR}/usr/share/${pkgname}/{artwork,ctrlr,keymaps,shader}
@ -72,28 +65,5 @@ do_install() {
${DESTDIR}/usr/share/${pkgname}/keymaps
# Include the license
vlicense docs/license.txt LICENSE
}
sdlmess_package() {
depends="sdlmame-${version}_${revision}"
short_desc+=" - Multi Emulator Super System (MESS)"
pkg_install() {
make TARGET=mess NOWERROR=1 TOOLS=1 ${makejobs}
# Install the application
vmkdir usr/share/${pkgname}
if [ -r mess64 ]; then
vinstall mess64 755 usr/share/${pkgname} ${pkgname}
else
vinstall mess 755 usr/share/${pkgname} ${pkgname}
fi
# Install MESS specific tools and man pages
for f in castool floptool imgtool; do
vinstall $f 755 usr/share/${pkgname}
vman src/osd/sdl/man/$f.1
done
vman src/osd/sdl/man/mess.6
# Install the sdlmess script
vbin ${FILESDIR}/${pkgname}.sh ${pkgname}
}
vlicense docs/mamelicense.txt LICENSE
}

View file

@ -1,45 +0,0 @@
#!/bin/sh
exec_mess() {
/usr/share/sdlmess/sdlmess \
-artpath "$HOME/.mess/artwork;artwork" \
-ctrlrpath "$HOME/.mess/ctrlr;ctrlr" \
-inipath $HOME/.mess/ini \
-rompath $HOME/.mess/roms \
-samplepath $HOME/.mess/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/sdlmess.ini"
echo "Modify this file for permanent changes to your SDLMESS"
echo "options and paths before running SDLMESS again."
cd $HOME/.mess
if [ -e mess.ini ]; then
echo "Your old ini file has been renamed to mess.ini.bak"
mv mess.ini mess.ini.bak
fi
exec_mess
elif [ ! -e $HOME/.mess ]; then
echo "Running SDLMESS for the first time..."
echo "Creating an ini file for SDLMESS at $HOME/.mess/mess.ini"
echo "Modify this file for permanent changes to your SDLMESS"
echo "options and paths before running SDLMESS 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/sdlmess
./sdlmess "$@"
fi

View file

@ -1 +0,0 @@
sdlmame