summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2022-02-19 11:05:48 -0500
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2022-02-20 15:12:42 +0700
commitb1e0ad67936d0157815e2fbd1302b9d28eb020b1 (patch)
tree1d0ae25f18af82de0afdf3507040b4632343e79c
parent5d18424b69c93099c9e6916d220e97eba155810f (diff)
downloadslackbuilds-b1e0ad67936d0157815e2fbd1302b9d28eb020b1.tar.gz
games/antimicro: Fix 15.0 build.
Signed-off-by: B. Watson <yalhcru@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r--games/antimicro/README6
-rw-r--r--games/antimicro/antimicro.SlackBuild39
-rw-r--r--games/antimicro/antimicro.desktop18
-rw-r--r--games/antimicro/antimicro.info2
4 files changed, 40 insertions, 25 deletions
diff --git a/games/antimicro/README b/games/antimicro/README
index 2544b5ceed..399fbaa113 100644
--- a/games/antimicro/README
+++ b/games/antimicro/README
@@ -5,12 +5,6 @@ gamepad with games that do not have native (or poor) gamepad support.
It works for games you're playing on Linux or with WINE. It works with
Steam or stand-alone games.
-You can compile it using Qt4 or Qt5, at your option. Default is
-the Slackware default: Qt4. To compile with Qt5 instead:
-
- # QT=5 ./antimicro.SlackBuild
-
-
Profiles
--------
diff --git a/games/antimicro/antimicro.SlackBuild b/games/antimicro/antimicro.SlackBuild
index 672156bd11..293f8938cd 100644
--- a/games/antimicro/antimicro.SlackBuild
+++ b/games/antimicro/antimicro.SlackBuild
@@ -8,6 +8,11 @@
# notice and this notice are preserved. This file is offered as-is,
# without any warranty.
+# 20220219 bkw: Modified by SlackBuilds.org:
+# - fix build on Slackware 15.0.
+# - remove option to build with qt5: it fails.
+# - add qt4 as a dep.
+
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=antimicro
@@ -15,7 +20,6 @@ VERSION=${VERSION:-2.23}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
-QT=${QT:-4}
DOCDIR=${DOCDIR:-/usr/doc}
MANDIR=${MANDIR:-/usr/man}
@@ -27,9 +31,6 @@ if [ -z "$ARCH" ]; then
esac
fi
-# 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
@@ -64,33 +65,35 @@ cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
- -o -perm 511 \) -exec chmod 755 {} \; -o \
+ -o -perm 511 \) -exec chmod 755 {} \+ -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \+
+
+# 20220219 bkw: ordered comparison of pointer with integer... this is
+# really a bit too picky, IMO.
+sed -i '/if *(joysticks *>/s, *> *0 *),),' src/mainwindow.cpp
+
+# 20220219 bkw: put man page in right place.
+sed -i 's,share/man,man,' other/CMakeLists.txt
mkdir -p build
cd build
-QT_SELECT=`echo $QT` cmake \
+QT_SELECT=4 cmake \
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
-DUSE_SDL_2=ON \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release ..
make
- make install DESTDIR=$PKG
+ make install/strip DESTDIR=$PKG
cd ..
-find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-
-mkdir -p $PKG/$MANDIR
-mv $PKG/usr/share/man/man1 $PKG/$MANDIR
-rm -rf $PKG/usr/share/man
-
-find $PKG/$MANDIR -type f -exec gzip -9 {} \;
-for i in $( find $PKG/$MANDIR -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+# 20220219 bkw: binary stripped, man page already gzipped.
-cat other/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop
+# 20220219 bkw: .desktop file needs absolute path to binary (because
+# /usr/games might not be in someone's $PATH) and icon (because it's
+# not in /usr/share/icons).
+cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop
mkdir -p $PKG/$DOCDIR/$PRGNAM-$VERSION
cp -a README.md BuildOptions.md gpl.txt Resources.txt \
diff --git a/games/antimicro/antimicro.desktop b/games/antimicro/antimicro.desktop
new file mode 100644
index 0000000000..857a322dce
--- /dev/null
+++ b/games/antimicro/antimicro.desktop
@@ -0,0 +1,18 @@
+[Desktop Entry]
+Name=AntiMicro
+Comment=Use a gamepad to control a variety of programs
+Name[sr]=Анти-микро
+Comment[sr]=Користите џојстик или играћу тастатуру за управљање различитим програмима
+Name[fr]=AntiMicro
+Comment[fr]=Utilisez une manette de jeu pour commander un logiciel
+Name[de]=AntiMicro
+Comment[de]=Nutze das Gamepad um Programme/Spiele zu steuern
+Comment[uk]=Використовуйте ігровий маніпулятор для керування програмами
+Exec=/usr/games/antimicro
+Icon=/usr/share/pixmaps/antimicro.png
+StartupNotify=true
+Terminal=false
+Type=Application
+Categories=Qt;Utility;
+MimeType=application/x-amgp;
+Keywords=game;controller;keyboard;joystick;mouse;
diff --git a/games/antimicro/antimicro.info b/games/antimicro/antimicro.info
index 4890aba69c..5e7c0e2abb 100644
--- a/games/antimicro/antimicro.info
+++ b/games/antimicro/antimicro.info
@@ -5,6 +5,6 @@ DOWNLOAD="https://github.com/AntiMicro/antimicro/archive/2.23/antimicro-2.23.tar
MD5SUM="b63397e9e6d0bb06d98b0931a86b3427"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES=""
+REQUIRES="qt4"
MAINTAINER="Klaatu"
EMAIL="klaatu@member.fsf.org"