summaryrefslogtreecommitdiffstats
path: root/system/bochs/bochs.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'system/bochs/bochs.SlackBuild')
-rw-r--r--system/bochs/bochs.SlackBuild47
1 files changed, 26 insertions, 21 deletions
diff --git a/system/bochs/bochs.SlackBuild b/system/bochs/bochs.SlackBuild
index 198edad541..bea5d9be03 100644
--- a/system/bochs/bochs.SlackBuild
+++ b/system/bochs/bochs.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for Bochs
# Copyright 2012, 2013, 2014, 2015 Bojan Popovic, Belgrade, Serbia
@@ -26,20 +26,25 @@
# ChangeLog:
#
# * 2014-01-29:
-# New upstream version (2.6.2). Solved the problem with dynamic
-# linking on x86_64.
+# New upstream version (2.6.2). Solved the problem with dynamic
+# linking on x86_64.
# * 2015-08-03:
-# New upstream version (2.6.8). You can now override most of the
-# configure options on the command line.
+# New upstream version (2.6.8). You can now override most of the
+# configure options on the command line.
+
+# 20220211 bkw: updated for v2.7, as 2.6.8 won't build on Slackware 15.0.
+
+cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=bochs
-VERSION=${VERSION:-2.6.8}
+VERSION=${VERSION:-2.7}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+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
@@ -91,19 +96,23 @@ SDL2=${SDL2:-no} # Note: buggy on my machine.
# SDL and SDL2 interfaces are mutually exclusive. SDL interface seems to be
# more stable, so default to SDL.
if [ "$SDL" = "yes" -a "$SDL2" = "yes" ]; then
- echo "Warning: You can't enable both SDL and SDL2. Defaulting to SDL."
- SDL2=no
+ echo "Warning: You can't enable both SDL and SDL2. Defaulting to SDL."
+ SDL2=no
+fi
+
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
fi
-CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
DOCS="CHANGES COPYING PARAM_TREE.txt README* TESTFORM.txt TODO"
-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"
@@ -127,9 +136,9 @@ 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 {} \+
# We need this on x86_64 to fix a libtldl problem
libtoolize -c
@@ -186,15 +195,11 @@ CXXFLAGS="$SLKCFLAGS" \
--with-wx=${WX} \
--build=$ARCH-slackware-linux
-
-
make
make install DESTDIR=$PKG
+strip $PKG/usr/bin/* $PKG/usr/lib*/$PRGNAM/plugins/lib*.so.?.?.?
-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
-
-# Move docs in the proper place
+# Move docs to the proper place
mkdir -p $PKG/usr/doc
mv $PKG/usr/share/doc/$PRGNAM $PKG/usr/doc/$PRGNAM-$VERSION
rmdir $PKG/usr/share/doc
@@ -205,4 +210,4 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
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