diff options
Diffstat (limited to 'games/mgba/mgba.SlackBuild')
-rw-r--r-- | games/mgba/mgba.SlackBuild | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/games/mgba/mgba.SlackBuild b/games/mgba/mgba.SlackBuild index 3927ea4b1a..21b682123d 100644 --- a/games/mgba/mgba.SlackBuild +++ b/games/mgba/mgba.SlackBuild @@ -1,9 +1,9 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for mgba # Copyright 2015 Dugan Chen Canada -# Copyright 2019-2021 Ruoh-Shoei LIN +# Copyright 2019-2022 Ruoh-Shoei LIN # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -23,10 +23,13 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +cd $(dirname $0) ; CWD=$(pwd) + PRGNAM=mgba -VERSION=${VERSION:-0.9.0} +VERSION=${VERSION:-0.10.2} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -36,14 +39,18 @@ if [ -z "$ARCH" ]; then esac fi -CWD=$(pwd) +# If the variable PRINT_PACKAGE_NAME is set, then this script will report what +# the name of the created package would be, and then exit. This information +# could be useful to other scripts. +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -# Set to on to build the Qt GUI. Requires Qt 5. -QT=${QT:-off} - if [ "$ARCH" = "i586" ]; then SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" @@ -84,7 +91,9 @@ cd build -DCMAKE_INSTALL_LIBDIR:PATH=lib$LIBDIRSUFFIX \ -DMANDIR=man \ -DUSE_DISCORD_RPC=OFF \ - -DBUILD_QT=${QT} \ + -DENABLE_SCRIPTING=OFF \ + -DBUILD_UPDATER=OFF \ + -DBUILD_QT=${QT:-on} \ -DCMAKE_BUILD_TYPE=Release .. make make install DESTDIR=$PKG @@ -106,4 +115,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE |