Merge pull request #1663 from pullmoll/sdlmame

mame: update to 0.162 and rename from sdlmame
This commit is contained in:
Juan RP 2015-05-28 07:48:35 +02:00
commit 6f64a9e860
4 changed files with 23 additions and 99 deletions

View file

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

View file

@ -1,22 +1,21 @@
# Template file for 'mame' # Template file for 'mame'
pkgname=sdlmame pkgname=mame
_distver=0161 version=0162
_patchver=0 revision=1
version=${_distver}u${_patchver} wrksrc="mame-${version}s"
revision=2
wrksrc="mame-${_distver}s"
homepage="http://mamedev.org" 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" short_desc="The Multiple Arcade Machine Emulator"
maintainer="Juan RP <xtraeme@voidlinux.eu>" maintainer="Juan RP <xtraeme@voidlinux.eu>"
license="mame" license="mame"
checksum=c0ba4c8e6ea7a491cbf7b317221d03c916dee53ca3cde4ff26adbc478a395a0f checksum=8342af35ab8cc9498d3ade5947bf2376bbfdd40883a532cae9b09c63ace99d7e
hostmakedepends="unzip perl pkg-config python automoc4" hostmakedepends="unzip perl pkg-config python automoc4"
makedepends="SDL2_ttf-devel fontconfig-devel libXinerama-devel qt-devel alsa-lib-devel lua-devel" makedepends="SDL2_ttf-devel fontconfig-devel libXinerama-devel qt-devel alsa-lib-devel lua-devel"
depends="liberation-fonts-ttf" depends="liberation-fonts-ttf"
repository="nonfree"
nocross=yes nocross=yes
repository="nonfree"
replaces="sdlmame>=0 sdlmess>=0"
do_extract() { do_extract() {
# mame source code is double-zipped to save space. # mame source code is double-zipped to save space.
@ -25,25 +24,17 @@ do_extract() {
unzip -q mame.zip unzip -q mame.zip
rm -f mame.zip rm -f mame.zip
find . -type f -not -name \*.png -print0 | xargs -0 perl -pi -e 's/\r\n?/\n/g' 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() { do_build() {
# REGENIE=1 rebuild genie binary and dependencies local opts="REGENIE=1 NOWERROR=1 TOOLS=1 OPTIMIZE=3"
# TOOLS=1 replaces target tools if [ "${CROSS_BUILD}" ]; then
make REGENIE=1 NOWERROR=1 TOOLS=1 ${makejobs} # 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() { do_install() {
# Install the sdlmame script # Install the mame script
vbin ${FILESDIR}/${pkgname}.sh ${pkgname} vbin ${FILESDIR}/${pkgname}.sh ${pkgname}
# Install the applications and the UI font in /usr/share # Install the applications and the UI font in /usr/share
@ -54,13 +45,15 @@ do_install() {
fi fi
for f in chdman jedutil regrep romcmp testkeys src2html srcclean \ 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} vinstall ${f} 755 usr/share/${pkgname}
if [ -f src/osd/sdl/man/${f}.1 ]; then if [ -f src/osd/sdl/man/${f}.1 ]; then
vman src/osd/sdl/man/${f}.1 vman src/osd/sdl/man/${f}.1
fi fi
done done
vman src/osd/sdl/man/mame.6 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 the extra bits
install -d ${DESTDIR}/usr/share/${pkgname}/{artwork,ctrlr,keymaps,shader} install -d ${DESTDIR}/usr/share/${pkgname}/{artwork,ctrlr,keymaps,shader}
@ -72,28 +65,5 @@ do_install() {
${DESTDIR}/usr/share/${pkgname}/keymaps ${DESTDIR}/usr/share/${pkgname}/keymaps
# Include the license # Include the license
vlicense docs/license.txt LICENSE vlicense docs/mamelicense.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}
}
} }

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