diff options
Diffstat (limited to 'games/gzdoom-legacy/gzdoom-legacy.SlackBuild')
-rw-r--r-- | games/gzdoom-legacy/gzdoom-legacy.SlackBuild | 33 |
1 files changed, 21 insertions, 12 deletions
diff --git a/games/gzdoom-legacy/gzdoom-legacy.SlackBuild b/games/gzdoom-legacy/gzdoom-legacy.SlackBuild index 295f2dcc18..9c9d407413 100644 --- a/games/gzdoom-legacy/gzdoom-legacy.SlackBuild +++ b/games/gzdoom-legacy/gzdoom-legacy.SlackBuild @@ -1,11 +1,15 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for gzdoom -# Written by B. Watson (yalhcru@gmail.com) +# Written by B. Watson (urchlay@slackware.uk) # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. +# 20211009 bkw: BUILD=3, fix build on -current. +# 20200426 bkw: +# - Fix <unknown version> in window title for real this time, BUILD=2. + # 20170610 bkw: # - Renamed to gzdoom-legacy. Too much effort to keep testing old # gzdoom versions every time there's a new release, so the regular @@ -30,11 +34,14 @@ # build now uses its own dedicated fmodapi, which installs to # a private directory (won't conflict with system fmodapi, if present). +cd $(dirname $0) ; CWD=$(pwd) + PRGNAM=gzdoom-legacy SRCNAM=gzdoom VERSION=${VERSION:-2.4.0} -BUILD=${BUILD:-1} +BUILD=${BUILD:-3} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -44,7 +51,11 @@ if [ -z "$ARCH" ]; then esac fi -CWD=$(pwd) +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} @@ -75,11 +86,8 @@ tar xvf $CWD/$SRCNAM-g$VERSION.tar.gz || \ tar xvf $CWD/$VERSION.tar.gz cd $SRCNAM-g$VERSION || cd $SRCNAM-$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 \ - \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ - -exec chmod 644 {} \+ +find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \ + \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+ # fmodapi support tries to find its lib in the current dir, fix it: sed -i \ @@ -95,9 +103,10 @@ patch -p1 < $CWD/window_title_version.diff # Sometimes upstream forgets to bump the version number, so the window # title will read 1.8.08 for version 1.8.09, eg. -sed -i "/#define *VERSIONSTR/s,\"[^\"]*\",\"$VERSION\"," src/version.h +sed -i "/#define *VERSIONSTR/s,[^ ]*$,\"$VERSION\"," src/version.h -# This isn't currently used, but was in the past, and will be again I'm sure. +# Version-specific patches. As of 2021, it's unlikely any old versions +# of gzdoom will build without patching. [ -e $CWD/compilefix.$VERSION.diff ] && \ patch -p1 < $CWD/compilefix.$VERSION.diff @@ -144,4 +153,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 |