summaryrefslogtreecommitdiffstats
path: root/games/qmc2/qmc2.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'games/qmc2/qmc2.SlackBuild')
-rw-r--r--games/qmc2/qmc2.SlackBuild41
1 files changed, 31 insertions, 10 deletions
diff --git a/games/qmc2/qmc2.SlackBuild b/games/qmc2/qmc2.SlackBuild
index b0710d48ce..1aa4f1be84 100644
--- a/games/qmc2/qmc2.SlackBuild
+++ b/games/qmc2/qmc2.SlackBuild
@@ -1,8 +1,8 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for QMC2
-# Copyright 2010-2017 Erik Hanson, Minneapolis, MN, USA
+# Copyright 2010-2020 Erik Hanson, Minneapolis, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,26 +22,36 @@
# 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=qmc2
-VERSION=${VERSION:-0.187}
+VERSION=${VERSION:-0.195}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
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}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -69,6 +79,9 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+patch -p1 < $CWD/qmc2-qt5.15.patch
+patch --binary -p1 < $CWD/qmc2-types.patch
+
CXX_FLAGS="$SLKCFLAGS" LDFLAGS="-L/usr/lib${LIBDIRSUFFIX}" \
make EMU=MESS PREFIX=/usr PRETTY=0 MACHINE=$ARCH
make install EMU=MESS PREFIX=/usr DESTDIR=$PKG
@@ -78,11 +91,19 @@ CXX_FLAGS="$SLKCFLAGS" LDFLAGS="-L/usr/lib${LIBDIRSUFFIX}" \
make EMU=MAME PREFIX=/usr PRETTY=0 MACHINE=$ARCH
make install EMU=MAME PREFIX=/usr DESTDIR=$PKG
+cd tools/qchdman
+qmake qchdman.pro
+make
+install -D -m 0755 qchdman $PKG/usr/bin/qchdman
+cd -
+
find $PKG | xargs file | egrep "ELF.*executable" | cut -f 1 -d : \
| xargs strip --strip-unneeded 2> /dev/null
-install -D -m 0644 $CWD/qmc2.desktop $PKG/usr/share/applications/qmc2.desktop
-install -D -m 0644 $CWD/qmc2.png $PKG/usr/share/pixmaps/qmc2.png
+#install -D -m 0644 $CWD/qmc2.desktop $PKG/usr/share/applications/qmc2.desktop
+#install -D -m 0644 $CWD/qmc2.png $PKG/usr/share/pixmaps/qmc2.png
+install -D -m 0644 $CWD/qchdman.desktop $PKG/usr/share/applications/qchman.desktop
+#install -D -m 0644 $CWD/qchdman.png $PKG/usr/share/pixmaps/qchdman.png
mv $PKG/etc/qmc2/qmc2.ini $PKG/etc/qmc2/qmc2.ini.new
@@ -96,4 +117,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