diff options
Diffstat (limited to 'games/mame')
-rw-r--r-- | games/mame/README | 3 | ||||
-rw-r--r-- | games/mame/README_groovy.txt | 38 | ||||
-rw-r--r-- | games/mame/mame.SlackBuild | 29 |
3 files changed, 69 insertions, 1 deletions
diff --git a/games/mame/README b/games/mame/README index bc136a5b64..ce580820a5 100644 --- a/games/mame/README +++ b/games/mame/README @@ -18,3 +18,6 @@ Optionally, MAME can be built with a debugger for emulated ROM code. You don't need this just to play the games; it's mainly useful for developing MAME itself. To build the debugger, first install qt5, then set QTDEBUG=yes in the environment before building mame. + +Optionally, MAME can be built with the GroovyMAME patch. See +README_groovy.txt for details. diff --git a/games/mame/README_groovy.txt b/games/mame/README_groovy.txt new file mode 100644 index 0000000000..e872b565ed --- /dev/null +++ b/games/mame/README_groovy.txt @@ -0,0 +1,38 @@ +GroovyMAME, also known as GroovyUME, is a fork of MAME/UME with greater +emphasis on CRT monitor support, in order to provide smoother gameplay +with less input lag than using regular MAME on an LCD screen. GroovyMAME +is provided as a patch against the standard MAME sources. + +GroovyMAME forum: http://forum.arcadecontrols.com/index.php?board=52.0 + +GroovyMAME patches can be downloaded from: + +https://drive.google.com/drive/folders/0B5iMjDor3P__aEFpcVNkVW5jbEE + +Get the latest patch that matches the version of MAME. Example: + +0182_groovymame_017a.diff + +The "0182" is the MAME version, without the dots. The "017a" is the +GroovyMAME version. You want the .diff file, not the .tar.bz2 or .7z! + +Download or copy the .diff file to the SlackBuild's directory and run the +SlackBuild script. The script will find the .diff, apply it, and update +the slack-desc to say "This package was patched with GroovyMAME 017a" +(or whatever the version number really is). You *don't* have to do +anything about the CRLF line endings, the script will handle that. + +If the script seems to be ignoring the .diff file, you probably have a +.diff for a different version of MAME. Check the version number at the +start of the filename. Don't try to rename the .diff file to force it +to apply: the SlackBuild will fail because the patch will fail. + +If you have multiple .diff files that match the MAME version, the script +will try to use the one with the highest GroovyMAME version number. If +it picks the wrong one, remove the ones you don't want to use. + +If all else fails, please contact me by email (yalhcru@gmail.com) or on +IRC (##slackware or #slackbuilds channel on FreeNode, user Urchlay). I +won't necessarily be testing each MAME release against each version +of the GroovyMAME patch for that release, so there might be problems I +won't know about. diff --git a/games/mame/mame.SlackBuild b/games/mame/mame.SlackBuild index fb9aba91a4..94fb72b0ce 100644 --- a/games/mame/mame.SlackBuild +++ b/games/mame/mame.SlackBuild @@ -53,9 +53,12 @@ # 20170128 bkw: # - Updated for v0.182. +# 20170214 bkw: +# - Add support for GroovyMAME patch. + PRGNAM=mame VERSION=${VERSION:-0.182} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then @@ -164,6 +167,25 @@ else WITHQT="without" fi +# Now, let's check for GroovyMAME. All the user has to do is place +# the .diff in the SlackBuild's directory. The filename always starts +# with the MAME version number, minus its dots. If we find multiple +# files matching this, sort them lexically and use the last (hopefully +# this is the one with the highest version number). +GROOVYDIFF="$( ls $CWD/${VERSION/./}_groovymame_*.diff 2>/dev/null | tail -1 )" +if [ -e "$GROOVYDIFF" ]; then + GROOVYVER="$( basename $GROOVYDIFF .diff | cut -d_ -f3- | sed 's,-,_,g' )" + + # .diffs are shipped with CRLF endings, fix: + sed 's,\r,,g' "$GROOVYDIFF" > groovy.diff + + patch -p0 < groovy.diff + + echo "GROOVYDIFF $GROOVYDIFF" + echo "GROOVYVER $GROOVYVER" +fi + + # Having ARCH set in the env will break the build, hence ARCH="" make USE_QTDEBUG=$QTOPT \ @@ -225,6 +247,11 @@ cat $CWD/${PRGNAM}.SlackBuild > $PKG/usr/doc/${PRGNAM}-$VERSION/${PRGNAM}.SlackB mkdir -p $PKG/install sed "s,@WITHQT@,$WITHQT," $CWD/slack-desc > $PKG/install/slack-desc + +[ -n "$GROOVYVER" ] && \ + sed -i "19s,\$, This package was patched with GroovyMAME $GROOVYVER.," \ + $PKG/install/slack-desc + cat $CWD/doinst.sh > $PKG/install/doinst.sh cd $PKG |