summaryrefslogtreecommitdiff
path: root/system/dosemu
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2022-03-18 22:55:11 -0400
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2022-03-20 20:45:15 +0700
commit2757d5f649c6bc72f9a579d2f483d7ca4eefc685 (patch)
treee3ea84f8d61dce1be35ec48ef45948a377f2bd4d /system/dosemu
parente4f1ac80eac1e428cdfd08dd17e288fd65a07b1b (diff)
downloadslackbuilds-2757d5f649c6bc72f9a579d2f483d7ca4eefc685.tar.gz
system/dosemu: Fix segfaults on 15.0 (use gcc5).
Signed-off-by: B. Watson <yalhcru@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/dosemu')
-rw-r--r--system/dosemu/dosemu.SlackBuild37
-rw-r--r--system/dosemu/dosemu.info2
2 files changed, 25 insertions, 14 deletions
diff --git a/system/dosemu/dosemu.SlackBuild b/system/dosemu/dosemu.SlackBuild
index 9f1ffc3e11..e3f35c91b7 100644
--- a/system/dosemu/dosemu.SlackBuild
+++ b/system/dosemu/dosemu.SlackBuild
@@ -23,25 +23,35 @@
# 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
-# 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
@@ -51,8 +61,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"
@@ -67,6 +77,8 @@ fi
set -e
+source /etc/profile.d/gcc5.sh
+
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
@@ -76,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 \
@@ -86,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
diff --git a/system/dosemu/dosemu.info b/system/dosemu/dosemu.info
index 5f5755a869..98d9194283 100644
--- a/system/dosemu/dosemu.info
+++ b/system/dosemu/dosemu.info
@@ -7,6 +7,6 @@ MD5SUM="190c77107fa23847eaa0bade762091ff \
2e09774fe91cff4372cb4a393eb467f5"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES=""
+REQUIRES="gcc5"
MAINTAINER="Larry Hajali"
EMAIL="larryhaja[at]gmail[dot]com"