diff options
Diffstat (limited to 'games/mame/mame.SlackBuild')
-rw-r--r-- | games/mame/mame.SlackBuild | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/games/mame/mame.SlackBuild b/games/mame/mame.SlackBuild index fb9aba91a40e9..94fb72b0ceadb 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 |