summaryrefslogtreecommitdiffstats
path: root/system/dosemu/dosemu.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'system/dosemu/dosemu.SlackBuild')
-rw-r--r--system/dosemu/dosemu.SlackBuild47
1 files changed, 34 insertions, 13 deletions
diff --git a/system/dosemu/dosemu.SlackBuild b/system/dosemu/dosemu.SlackBuild
index 58b842b584..e3f35c91b7 100644
--- a/system/dosemu/dosemu.SlackBuild
+++ b/system/dosemu/dosemu.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for dosemu
@@ -23,26 +23,46 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20220318 bkw: Modified by SlackBuilds.org, BUILD=3: fix build on 15.0.
+# Actually it was *building* OK, but would segfault on startup.
+# - add gcc5 as a dep, use it for the build.
+# - build without fluidsynth, 15.0's is too new for this old code.
+# looks like there's still OPL emulation for MIDI.
+# - build without svgalib, 15.0's is too old. I haven't seen svgalib
+# do anything but crash and lock up the console any time I've tried
+# it in the last 20 years or so, anyway.
+
+# Note to self: there's a smorgasboard of patches here:
+# https://gitweb.gentoo.org/repo/gentoo.git/tree/app-emulation/dosemu/files
+# ...none of which fix the segfaults or the fluidsynth issues.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=dosemu
VERSION=${VERSION:-20130804_35054ba}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-3}
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
fi
-CWD=$(pwd)
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
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,6 +77,8 @@ fi
set -e
+source /etc/profile.d/gcc5.sh
+
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
@@ -66,9 +88,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 {} \+
CFLAGS="$SLKCFLAGS" \
./configure \
@@ -76,19 +98,18 @@ CFLAGS="$SLKCFLAGS" \
--sysconfdir=/etc/dosemu \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--with-x \
- --with-svgalib \
+ --without-svgalib \
+ --without-fluidsynth \
--with-docdir=/usr/doc/$PRGNAM-$VERSION \
--with-fdtarball=$CWD/dosemu-freedos-1.0-bin.tgz
make
make install DESTDIR=$PKG
+gzip -9 $PKG/usr/man/man*/* $PKG/usr/man/??/man*/*
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
-find $PKG/usr/man -type f -exec gzip -9 {} \;
-for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
-
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
( cd $PKG/etc/dosemu
@@ -104,4 +125,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
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