games/qtads: Updated for version 3.0.0.

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

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
B. Watson 2020-10-20 03:16:34 -04:00 committed by Willy Sudiarto Raharjo
parent 3e807ed6ec
commit 7c1cb1570b
No known key found for this signature in database
GPG Key ID: 3F617144D7238786
4 changed files with 30 additions and 55 deletions

View File

@ -1,15 +1,12 @@
qtads (a multimedia interpreter for TADS games) qtads (a multimedia interpreter for TADS games)
QTads is a so called "interpreter" for games created with the Text QTads is a so called "interpreter" for games created with the Text
Adventure Development System, or "Tads" for short, a C-like object Adventure Development System, or "TADS" for short, a C-like object
oriented programming language for authoring Interactive Fiction oriented programming language for authoring Interactive Fiction
(similar to the Infocom or Legend Entertainment games, like (similar to the Infocom or Legend Entertainment games, like
"Zork"). Yes, we are talking about text adventures here. "Zork"). Yes, we are talking about text adventures here.
Both Tads 2 (*.gam) as well as Tads 3 (*.t3) games Both TADS 2 (*.gam) and TADS 3 (*.t3) games are supported. You can
are supported. You can find a selection of games at find a selection of games at:
http://www.ifarchive.org/if-archive/games/tads/
By default, Qt4 is used for the user interface. If you prefer Qt5, http://www.ifarchive.org/if-archive/games/tads/
install libraries/qt5 and run this script with QT5=yes in the
environment.

View File

@ -6,14 +6,12 @@
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
# Both qt4 and qt5 are supported by upstream, so this script allows for # 20201020 bkw: updated for v3.0.0. Sadly the qt4 UI is gone in this
# both. Not sure why anyone really cares (I'm pretty much GUI-insensitive, # release, so qt5 is now a hard dep. SDL2_sound is no longer needed, but
# plus I hate waiting for qt5 to build), but eventually Pat will probably # it's replaced with fluidsynth.
# replace qt4 with qt5 in Slackware. When that happens, this script will
# still be usable.
PRGNAM=qtads PRGNAM=qtads
VERSION=${VERSION:-2.1.7} VERSION=${VERSION:-3.0.0}
BUILD=${BUILD:-1} BUILD=${BUILD:-1}
TAG=${TAG:-_SBo} TAG=${TAG:-_SBo}
@ -30,19 +28,8 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp} OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i586" ]; then # No SLKCFLAGS: qmake-qt5 uses the CFLAGS qt5 was built with.
SLKCFLAGS="-O2 -march=i586 -mtune=i686" # No need for LIBDIRSUFFIX either, qtads doesn't use /usr/lib(64).
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
else
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
fi
set -e set -e
@ -50,44 +37,35 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT mkdir -p $TMP $PKG $OUTPUT
cd $TMP cd $TMP
rm -rf $PRGNAM-$VERSION rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2 tar xvf $CWD/$PRGNAM-$VERSION-source.tar.xz
cd $PRGNAM-$VERSION cd $PRGNAM-$VERSION
chown -R root:root . chown -R root:root .
find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \ find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
\! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
if [ "${QT5:-no}" = "yes" ]; then # In case the user just installed qt5 and hasn't logged out & back in:
[ "$QT5DIR" = "" ] && source /etc/profile.d/qt5.sh [ "$QT5DIR" = "" ] && source /etc/profile.d/qt5.sh
# qt5 uses the CFLAGS qt5 was built with.
qmake-qt5 qmake-qt5 PREFIX=/usr BINDIR=/usr/games DOCDIR=/usr/doc/$PRGNAM-$VERSION
else
qmake # Hardcoded share/ in man path.
# qt4 needs CFLAGS forced. easier to do it this way than deal with qmake: sed -i 's,/usr/share/man,/usr/man,g' Makefile
sed -i "s,-O2,$SLKCFLAGS," Makefile
fi
# Setting CC/CXX shows the actual compile commands. Using gold speeds # Setting CC/CXX shows the actual compile commands. Using gold speeds
# up linking enough to be worth the effort. # up linking enough to be worth the effort.
make CC=gcc CXX=g++ LINK="g++ -fuse-ld=gold" make CC=gcc CXX=g++ LINK="g++ -fuse-ld=gold"
mkdir -p $PKG/usr/games
# No 'make install' target, but things are laid out nicely in the source. # INSTALL_ROOT, *not* DESTDIR here!
install -s -m0755 -oroot -groot $PRGNAM $PKG/usr/games/$PRGNAM make install INSTALL_ROOT=$PKG
mkdir -p $PKG/usr/share
mv share/man $PKG/usr
gzip -9 $PKG/usr/man/man6/$PRGNAM.6
mv share/* $PKG/usr/share
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION gzip -9 $PKG/usr/man/man?/*.?
cp -a AUTHORS COPYING HTML_TADS_LICENSE NEWS README \
$PKG/usr/doc/$PRGNAM-$VERSION # 'make install' doesn't install the GPL.
cp -a LICENSE.TXT $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
# for use in the slack-desc:
ldd $PRGNAM | grep -q Qt5 && QTVER=5 || QTVER=4
mkdir -p $PKG/install mkdir -p $PKG/install
sed "s,@QTVER@,$QTVER," $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG cd $PKG

View File

@ -1,10 +1,10 @@
PRGNAM="qtads" PRGNAM="qtads"
VERSION="2.1.7" VERSION="3.0.0"
HOMEPAGE="https://github.com/realnc/qtads" HOMEPAGE="https://github.com/realnc/qtads"
DOWNLOAD="https://github.com/realnc/qtads/releases/download/2.1.7/qtads-2.1.7.tar.bz2" DOWNLOAD="https://github.com/realnc/qtads/releases/download/v3.0.0/qtads-3.0.0-source.tar.xz"
MD5SUM="32139431f08ce157eb385f1894c18f24" MD5SUM="bbe7ee79d776f7f656b0ca7acd4d815b"
DOWNLOAD_x86_64="" DOWNLOAD_x86_64=""
MD5SUM_x86_64="" MD5SUM_x86_64=""
REQUIRES="SDL_sound" REQUIRES="SDL2 qt5 fluidsynth"
MAINTAINER="B. Watson" MAINTAINER="B. Watson"
EMAIL="yalhcru@gmail.com" EMAIL="yalhcru@gmail.com"

View File

@ -14,6 +14,6 @@ qtads: oriented programming language for authoring Interactive Fiction
qtads: (similar to the Infocom or Legend Entertainment games, like qtads: (similar to the Infocom or Legend Entertainment games, like
qtads: "Zork"). Yes, we are talking about text adventures here. qtads: "Zork"). Yes, we are talking about text adventures here.
qtads: qtads:
qtads: This package built for Qt@QTVER@. qtads:
qtads: qtads:
qtads: qtads: