games/antimicro: Fix 15.0 build.

Signed-off-by: B. Watson <yalhcru@gmail.com>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
B. Watson 2022-02-19 11:05:48 -05:00 committed by Willy Sudiarto Raharjo
parent 5d18424b69
commit b1e0ad6793
No known key found for this signature in database
GPG key ID: 3F617144D7238786
4 changed files with 40 additions and 25 deletions

View file

@ -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
--------

View file

@ -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
# 20220219 bkw: binary stripped, man page already gzipped.
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
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 \

View file

@ -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;

View file

@ -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"