games/ace: 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 10:20:13 -05:00 committed by Willy Sudiarto Raharjo
parent 7f7e9dc347
commit 219e16e0c2
No known key found for this signature in database
GPG key ID: 3F617144D7238786
2 changed files with 29 additions and 18 deletions

View file

@ -1,8 +1,12 @@
ace - a set of Unix/X solitaire games ace - a set of Unix/X solitaire games
The Ace of Penguins is a set of Unix/X solitaire games The Ace of Penguins is a set of Unix/X solitaire games based on the
based on the ones available for Windows(tm) ones available for Windows(tm) but with a number of enhancements.
but with a number of enhancements.
The latest version includes clones of freecell, golf, mastermind, The latest version includes clones of freecell, golf, mastermind,
merlin, minesweeper, pegged, solitaire, taipei (with editor) merlin, minesweeper, pegged, solitaire, taipei (with editor) and
and thornq. 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.

View file

@ -4,6 +4,13 @@
# Written by G. Schoenmakers # 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) cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=ace PRGNAM=ace
@ -14,15 +21,12 @@ PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then if [ -z "$ARCH" ]; then
case "$( uname -m )" in case "$( uname -m )" in
i?86) ARCH=i486 ;; i?86) ARCH=i586 ;;
arm*) ARCH=arm ;; arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;; *) ARCH=$( uname -m ) ;;
esac esac
fi 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 if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0 exit 0
@ -32,8 +36,8 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp} OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i486" ]; then if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686" SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX="" LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686" SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@ -57,35 +61,38 @@ cd $PRGNAM-$VERSION
chown -R root:root . chown -R root:root .
find -L . \ find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ \( -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 \ \( -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 for libpng and other fixes thanks to Arch Linux
patch -p1 < $CWD/ace14_fixes.patch patch -p1 < $CWD/ace14_fixes.patch
SLKCFLAGS+=" -fcommon"
CFLAGS="$SLKCFLAGS" \ CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \
./configure \ ./configure \
--prefix=/usr \ --prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \ --libdir=/usr/lib${LIBDIRSUFFIX} \
--bindir=/usr/games \
--sysconfdir=/etc \ --sysconfdir=/etc \
--localstatedir=/var \ --localstatedir=/var \
--mandir=/usr/man \ --mandir=/usr/man \
--docdir=/usr/doc/$PRGNAM-$VERSION \ --docdir=/usr/doc/$PRGNAM-$VERSION \
--enable-static=no \ --enable-static=no \
--program-suffix=-ace \
--build=$ARCH-slackware-linux --build=$ARCH-slackware-linux
make make
make install DESTDIR=$PKG make install-strip 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
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a docs/COPYING docs/intro.html docs/toolkit.html $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 cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
rm -f $PKG/usr/lib*/*.la
mkdir -p $PKG/install mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/slack-desc > $PKG/install/slack-desc