From 85f2a0108b152fbd5ef9c18dd90b119674e67f37 Mon Sep 17 00:00:00 2001 From: James Meyer Date: Wed, 5 Dec 2012 09:30:35 -0600 Subject: sdl_mame : .147 --- abs/extra/sdlmame/PKGBUILD | 95 ++++++++++++++++++++++++++++++++++++++ abs/extra/sdlmame/extras.tar.gz | Bin 0 -> 4093 bytes abs/extra/sdlmame/sdlmame.install | 8 ++++ abs/extra/sdlmame/sdlmame.sh | 58 +++++++++++++++++++++++ 4 files changed, 161 insertions(+) create mode 100644 abs/extra/sdlmame/PKGBUILD create mode 100644 abs/extra/sdlmame/extras.tar.gz create mode 100644 abs/extra/sdlmame/sdlmame.install create mode 100644 abs/extra/sdlmame/sdlmame.sh diff --git a/abs/extra/sdlmame/PKGBUILD b/abs/extra/sdlmame/PKGBUILD new file mode 100644 index 0000000..daf290a --- /dev/null +++ b/abs/extra/sdlmame/PKGBUILD @@ -0,0 +1,95 @@ +# $Id: PKGBUILD 80432 2012-11-21 14:28:56Z spupykin $ +# Maintainer: Sergej Pupykin +# Contributor: robb_force +# Maintainer: JJDaNiMoTh + +_patchlevel=3 +_basever=0.147 + +pkgname=sdlmame +if [ ${_patchlevel} -ne 0 ]; then + pkgver=${_basever}.u${_patchlevel} +else + pkgver=${_basever} +fi +pkgrel=1 +pkgdesc="A port of the popular Multiple Arcade Machine Emulator using SDL with OpenGL support." +url="http://mamedev.org/" +license=('custom:MAME License') +arch=('i686' 'x86_64') +depends=('sdl>=1.2.11' 'libxinerama' 'gconf' 'sdl_ttf' 'gtk2') +makedepends=('unzip' 'nasm' 'mesa' 'glu' 'wget') +DLAGENTS=('http::/usr/bin/wget -U "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.2) Gecko/20090804 Shiretoko/3.5.2" -c -t 3 --waitretry=3 -O %o %u') +install=sdlmame.install + +for i in `seq 1 ${_patchlevel}`; do + _patches="${_patches} sdlmame-${_basever/./}u${i}_diff.zip::http://mamedev.org/updates/${_basever/./}u${i}_diff.zip" +done + +source=("mame${_basever/./}s.zip::http://mamedev.org/downloader.php?file=releases/mame${_basever/./}s.zip" + "sdlmame.sh" + "extras.tar.gz" + ${_patches}) +md5sums=('b5fc953ee0351f5145b9d704603f2ee3' + 'e11a7d26704a9e2cff223b9b867d6a05' + '420b61240bf5ae11615ba7c6100ee00d' + '7f2dbea383138a6ae2bbaac3b32376d6' + 'c0306cbf583309d23549529f441e97f2' + '8851533ae3f692e436bc399b773c4fcb') + +build() { + cd $srcdir/ + if [ $NOEXTRACT -eq 0 ]; then + unzip mame.zip + find . -type f -not -name \*.png | xargs perl -pi -e 's/\r\n?/\n/g' + for i in `seq 1 ${_patchlevel}`; do + msg "Patch#$i" + patch -p0 -E <${_basever/./}u$i.diff || true # FIXME: + done + fi + make NOWERROR=1 OPTIMIZE=2 + make tools NOWERROR=1 OPTIMIZE=2 +} + +package() { + cd $srcdir/ + # Install the sdlmame script + install -Dm755 $srcdir/${pkgname}.sh $pkgdir/usr/bin/${pkgname} + + # Install the applications and the UI font in /usr/share + install -Dm755 mame $pkgdir/usr/share/${pkgname}/${pkgname} || \ + install -Dm755 mame64 $pkgdir/usr/share/${pkgname}/${pkgname} + + install -m755 chdman $pkgdir/usr/share/${pkgname}/chdman + install -m755 jedutil $pkgdir/usr/share/${pkgname}/jedutil + install -m755 regrep $pkgdir/usr/share/${pkgname}/regrep + install -m755 romcmp $pkgdir/usr/share/${pkgname}/romcmp + install -m755 testkeys $pkgdir/usr/share/${pkgname}/testkeys + install -m755 src2html $pkgdir/usr/share/${pkgname}/src2html + install -m755 srcclean $pkgdir/usr/share/${pkgname}/srcclean + install -m755 ldverify $pkgdir/usr/share/${pkgname}/ldverify + install -m755 ldresample $pkgdir/usr/share/${pkgname}/ldresample + + # Install the extra bits + install -d $pkgdir/usr/share/${pkgname}/{artwork,ctrlr,keymaps,shader} + install -d $pkgdir/usr/share/man/man1 + install -d $pkgdir/usr/share/man/man6 + install -m644 src/osd/sdl/shader/glsl*.*h $pkgdir/usr/share/${pkgname}/shader/ + install -m644 src/osd/sdl/man/*.1* $pkgdir/usr/share/man/man1/ + install -m644 src/osd/sdl/man/*.6* $pkgdir/usr/share/man/man6/ + + install -m644 $srcdir/artwork/* $pkgdir/usr/share/${pkgname}/artwork/ + install -m644 $srcdir/ctrlr/* $pkgdir/usr/share/${pkgname}/ctrlr/ + install -m644 src/osd/sdl/keymaps/* $pkgdir/usr/share/${pkgname}/keymaps/ + + # Include the license + install -Dm644 docs/license.txt $pkgdir/usr/share/licenses/${pkgname}/license.txt + + # FS#28203 + sed -i 's|KEYCODE_2_PAD|KEYCODE_2PAD|' $pkgdir/usr/share/sdlmame/ctrlr/*.cfg + sed -i 's|KEYCODE_4_PAD|KEYCODE_4PAD|' $pkgdir/usr/share/sdlmame/ctrlr/*.cfg + sed -i 's|KEYCODE_6_PAD|KEYCODE_6PAD|' $pkgdir/usr/share/sdlmame/ctrlr/*.cfg + sed -i 's|KEYCODE_8_PAD|KEYCODE_8PAD|' $pkgdir/usr/share/sdlmame/ctrlr/*.cfg + + find $pkgdir -type f -exec strip {} \; +} diff --git a/abs/extra/sdlmame/extras.tar.gz b/abs/extra/sdlmame/extras.tar.gz new file mode 100644 index 0000000..ae0bc2a Binary files /dev/null and b/abs/extra/sdlmame/extras.tar.gz differ diff --git a/abs/extra/sdlmame/sdlmame.install b/abs/extra/sdlmame/sdlmame.install new file mode 100644 index 0000000..0d3fab8 --- /dev/null +++ b/abs/extra/sdlmame/sdlmame.install @@ -0,0 +1,8 @@ +post_install() +{ + echo " SDLMAME and the additional MAME utilities have been installed" + echo " in /usr/share/sdlmame However, SDLMAME can be run by" + echo " typing sdlmame and it's options. Try running SDLMAME with" + echo " these options:" + echo " sdlmame -nowindow -noswitchres" +} diff --git a/abs/extra/sdlmame/sdlmame.sh b/abs/extra/sdlmame/sdlmame.sh new file mode 100644 index 0000000..336f716 --- /dev/null +++ b/abs/extra/sdlmame/sdlmame.sh @@ -0,0 +1,58 @@ +#!/bin/sh + +# Create a variable equal to $HOME that will be used later in the ini creation +home=('$HOME') + +if [ "$1" != "" ] && [ "$1" = "--newini" ]; then + 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 + if [ -e mame.ini ]; then + echo "Your old ini file has been renamed to mameini.bak" + mv mame.ini mameini.bak + fi + /usr/share/sdlmame/sdlmame \ + -artpath "$home/.mame/artwork;artwork" \ + -ctrlrpath "$home/.mame/ctrlr;ctrlr" \ + -inipath $home/.mame/ini \ + -rompath $home/.mame/roms \ + -samplepath $home/.mame/samples \ + -cfg_directory $home/.mame/cfg \ + -comment_directory $home/.mame/comments \ + -diff_directory $home/.mame/diff \ + -input_directory $home/.mame/inp \ + -memcard_directory $home/.mame/memcard \ + -nvram_directory $home/.mame/nvram \ + -snapshot_directory $home/.mame/snap \ + -state_directory $home/.mame/sta \ + -video opengl \ + -createconfig +elif [ ! -e $HOME/.mame ]; then + echo "Running SDLMAME for the first time..." + echo "Creating an ini file for SDLMAME at $HOME/.mame/mame.ini" + echo "Modify this file for permanent changes to your SDLMAME" + echo "options and paths before running SDLMAME again." + mkdir $HOME/.mame + mkdir $HOME/.mame/{artwork,cfg,comments,ctrlr,diff,ini,inp,memcard,nvram,samples,snap,sta} + cd $HOME/.mame + /usr/share/sdlmame/sdlmame \ + -artpath "$home/.mame/artwork;artwork" \ + -ctrlrpath "$home/.mame/ctrlr;ctrlr" \ + -inipath $home/.mame/ini \ + -rompath $home/.mame/roms \ + -samplepath $home/.mame/samples \ + -cfg_directory $home/.mame/cfg \ + -comment_directory $home/.mame/comments \ + -diff_directory $home/.mame/diff \ + -input_directory $home/.mame/inp \ + -memcard_directory $home/.mame/memcard \ + -nvram_directory $home/.mame/nvram \ + -snapshot_directory $home/.mame/snap \ + -state_directory $home/.mame/sta \ + -video opengl \ + -createconfig +else + cd /usr/share/sdlmame + ./sdlmame "$@" +fi -- cgit v0.12