games/sumeria: actually use SLKCFLAGS.

Signed-off-by: B. Watson <urchlay@slackware.uk>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
B. Watson 2023-05-30 15:43:31 -04:00 committed by Willy Sudiarto Raharjo
parent 53473c99aa
commit db9fa7f001
No known key found for this signature in database
GPG key ID: 3F617144D7238786

View file

@ -8,11 +8,13 @@
# VERSION came from the server timestamp of the source file.
# 20230530 bkw: BUILD=2, actually use SLKCFLAGS.
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=sumeria
VERSION=${VERSION:-20020219}
BUILD=${BUILD:-1}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@ -35,16 +37,12 @@ OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
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
@ -52,7 +50,7 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG/usr/games $OUTPUT
cd $PKG/usr/games
gcc -include stdlib.h -Wl,-s -o $PRGNAM $CWD/$PRGNAM.c -lm
gcc $SLKCFLAGS -include stdlib.h -Wl,-s -o $PRGNAM $CWD/$PRGNAM.c -lm
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/README > $PKG/usr/doc/$PRGNAM-$VERSION/README