system/twin: 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-09 16:12:49 -05:00 committed by Willy Sudiarto Raharjo
parent 78eb960edd
commit 31e06a369a
No known key found for this signature in database
GPG key ID: 3F617144D7238786

View file

@ -23,6 +23,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# Slightly modified by Robby Workman <rworkman@slackbuilds.org>
# 20220209 bkw: ...and fixed for 15.0 by B. Watson.
cd $(dirname $0) ; CWD=$(pwd)
@ -34,15 +35,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
@ -52,8 +50,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"
@ -78,8 +76,9 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
SLKCFLAGS+=" -fcommon"
# 20220209 bkw: configure ignores CFLAGS from environment.
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
@ -88,7 +87,7 @@ CXXFLAGS="$SLKCFLAGS" \
--mandir=/usr/man \
--build=$ARCH-slackware-linux
make -j1
make -j1 CFLAGS="$SLKCFLAGS" CXXFLAGS="$SLKCFLAGS"
make install DESTDIR=$PKG
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \