From 219e16e0c28838d1ccdb16a7151395e2b8b66c30 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Sat, 19 Feb 2022 10:20:13 -0500 Subject: games/ace: Fix 15.0 build. Signed-off-by: B. Watson Signed-off-by: Willy Sudiarto Raharjo --- games/ace/README | 16 ++++++++++------ games/ace/ace.SlackBuild | 31 +++++++++++++++++++------------ 2 files changed, 29 insertions(+), 18 deletions(-) (limited to 'games/ace') diff --git a/games/ace/README b/games/ace/README index 2c74643d0efa..6f0acdb7b4d0 100644 --- a/games/ace/README +++ b/games/ace/README @@ -1,8 +1,12 @@ ace - a set of Unix/X solitaire games -The Ace of Penguins is a set of Unix/X solitaire games -based on the ones available for Windows(tm) -but with a number of enhancements. -The latest version includes clones of freecell, golf, mastermind, -merlin, minesweeper, pegged, solitaire, taipei (with editor) -and thornq. +The Ace of Penguins is a set of Unix/X solitaire games based on the +ones available for Windows(tm) but with a number of enhancements. + +The latest version includes clones of freecell, golf, mastermind, +merlin, minesweeper, pegged, solitaire, taipei (with editor) and +thornq. + +The executables are installed with -ace suffix, e.g. solitaire-ace. +This is to avoid conflicting with Slackware's bsd-games and xgames +packages. diff --git a/games/ace/ace.SlackBuild b/games/ace/ace.SlackBuild index 72a27330be73..c5c579eeec95 100644 --- a/games/ace/ace.SlackBuild +++ b/games/ace/ace.SlackBuild @@ -4,6 +4,13 @@ # Written by G. Schoenmakers +# 20220219 bkw: Modified by SlackBuilds.org: +# - fix build on Slackware 15.0. +# - binaries in /usr/games. +# - remove .la file. +# - install binaries with -ace suffix, to avoid conflicting with +# canfield from Slackware's bsd-games and solitaire from xgames. + cd $(dirname $0) ; CWD=$(pwd) PRGNAM=ace @@ -14,15 +21,12 @@ PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) ARCH=i486 ;; + i?86) ARCH=i586 ;; arm*) ARCH=arm ;; *) ARCH=$( uname -m ) ;; 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 @@ -32,8 +36,8 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" @@ -57,35 +61,38 @@ 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 {} \+ # Patch for libpng and other fixes thanks to Arch Linux patch -p1 < $CWD/ace14_fixes.patch +SLKCFLAGS+=" -fcommon" + CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ --libdir=/usr/lib${LIBDIRSUFFIX} \ + --bindir=/usr/games \ --sysconfdir=/etc \ --localstatedir=/var \ --mandir=/usr/man \ --docdir=/usr/doc/$PRGNAM-$VERSION \ --enable-static=no \ + --program-suffix=-ace \ --build=$ARCH-slackware-linux make -make install DESTDIR=$PKG - -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 +make install-strip DESTDIR=$PKG mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a docs/COPYING docs/intro.html docs/toolkit.html $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild +rm -f $PKG/usr/lib*/*.la + mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc -- cgit v1.2.3