diff options
Diffstat (limited to 'games/koules/koules.SlackBuild')
-rw-r--r-- | games/koules/koules.SlackBuild | 38 |
1 files changed, 26 insertions, 12 deletions
diff --git a/games/koules/koules.SlackBuild b/games/koules/koules.SlackBuild index c4be504c8b..e02b060475 100644 --- a/games/koules/koules.SlackBuild +++ b/games/koules/koules.SlackBuild @@ -1,8 +1,8 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for koules -# 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. @@ -10,10 +10,19 @@ # This script doesn't share any code with whatever build script # existed back then (partly because I couldn't find a copy) +# TODO: make -E the default size. It's 2023, nobody wants to play a game +# in a window the size of a postcard (or a playing card, on 4K). + +# 20230107 bkw: BUILD=4, fix paths to joystick devices (/dev/jsX => /dev/input/jsX) +# 20211020 bkw: BUILD=3, fix -current build. + +cd $(dirname $0) ; CWD=$(pwd) + PRGNAM=koules VERSION=${VERSION:-1.4} -BUILD=${BUILD:-2} +BUILD=${BUILD:-4} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -23,7 +32,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} @@ -57,11 +70,8 @@ rm -rf $PRGNAM$VERSION tar xvf $CWD/$PRGNAM$VERSION-src.tar.gz 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 \ - \( -perm 666 -o -perm 664 -o -perm 640 -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 {} \+ # 20140502 bkw: modern Slackware has OSS modules disabled by default, # so wrap the sound server in aoss. @@ -75,7 +85,7 @@ patch -p1 < $CWD/patches/slackware.diff patch -p1 < $CWD/patches/compile_fix.diff # Modern gcc seems to hate the inline assembly. Anyway I bet gcc's code -# with -O2 is the same or faster... +# with -O2 is the same or faster... and we need this for x86_64 too. patch -p1 < $CWD/patches/no_inline_asm.diff # The author forgot to mention the -E option in the help and man page @@ -84,6 +94,10 @@ patch -p1 < $CWD/patches/document_E_option.diff # Some people might like the launcher... patch -p1 < $CWD/patches/tcl_launcher_paths.diff +# 20230107 bkw: this has been broken for ages, I just now decided to play +# this game with a joystick... +patch -p1 < $CWD/patches/joystickdevs.diff + # I hate Imake even worse than autoconf... if [ "$MITSHM" = "no" ]; then sed -i -e '/#define MITSHM/d' Iconfig @@ -97,7 +111,7 @@ xmkmf -a # Did I mention I hate Imake? find . -name Makefile | \ - xargs sed -i -e "s/-O2.*/$SLKCFLAGS/" + xargs sed -i -e "s/-O2.*/$SLKCFLAGS -fcommon/" touch xkoules.man # 20140502 bkw: @@ -143,4 +157,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 |