summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2021-12-30 21:49:50 +0000
committer Eric Hameleers <alien@slackware.com>2021-12-30 21:49:50 +0000
commitc3cafdbb6a18ff22e58f2f648d81743caa3d982b (patch)
tree5b1f00a73bcf007428cd3880bb31e6d8676db4d8
parent77bf4ef70f098cbd8f5480dfd94e4a75247f20d3 (diff)
downloadasb-c3cafdbb6a18ff22e58f2f648d81743caa3d982b.tar.gz
asb-c3cafdbb6a18ff22e58f2f648d81743caa3d982b.tar.xz
dosbox: updated to 0.74.3
-rwxr-xr-xdosbox/build/dosbox.SlackBuild56
1 files changed, 36 insertions, 20 deletions
diff --git a/dosbox/build/dosbox.SlackBuild b/dosbox/build/dosbox.SlackBuild
index 0383bf03..3484bba1 100755
--- a/dosbox/build/dosbox.SlackBuild
+++ b/dosbox/build/dosbox.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
# $Id$
-# Copyright 2005, 2006, 2007, 2009, 2010, 2012, 2013 Eric Hameleers, Eindhoven, NL
+# Copyright 2005, 2006, 2007, 2009, 2010, 2012, 2013, 2021 Eric Hameleers, Eindhoven, NL
#
# Permission to use, copy, modify, and distribute this software for
# any purpose with or without fee is hereby granted, provided that
@@ -49,6 +49,8 @@
# * Use a SVN snapshot for the Wine-specific changes this contains.
# r3833-1: 15/oct/2013 by Eric Hameleers <alien@slackware.com>
# * Newer SVN snapshot.
+# 0.74-3-1: 30/dec/2021 by Eric Hameleers <alien@slackware.com>
+# * Update.
#
# Run 'sh dosbox.SlackBuild' to build a Slackware package.
# The package (.tgz) plus descriptive .txt file are created in /tmp .
@@ -59,8 +61,10 @@
# Set initial variables:
PRGNAM=dosbox
-VERSION=${VERSION:-"r3833"}
+VERSION=${VERSION:-"0.74.3"}
+SRCVER=${SRCVER:-"0.74-3"}
BUILD=${BUILD:-1}
+NUMJOBS=${NUMJOBS:-" -j$(nproc) "}
TAG=${TAG:-alien}
DOCS="AUTHORS COPYING ChangeLog INSTALL NEWS README THANKS TODO \
@@ -74,9 +78,9 @@ TMP=${TMP:-/tmp/build}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-SOURCE="${SRCDIR}/${PRGNAM}-${VERSION}.tar.gz"
-#SRCURL="http://downloads.sourceforge.net/${PRGNAM}/${PRGNAM}-${VERSION}.tar.gz"
-SRCURL=""
+SOURCE="${SRCDIR}/${PRGNAM}-${SRCVER}.tar.gz"
+SRCURL="https://downloads.sourceforge.net/${PRGNAM}/${PRGNAM}-${SRCVER}.tar.gz"
+#SRCURL=""
# Use the src_checkout() function if no downloadable tarball exists.
# This function checks out sources from SVN/CVS and creates a tarball of them.
@@ -126,19 +130,19 @@ src_checkout() {
##
# Automatically determine the architecture we're building on:
-MARCH=$( uname -m )
if [ -z "$ARCH" ]; then
- case "$MARCH" in
- i?86) export ARCH=i486 ;;
- armv7hl) export ARCH=$MARCH ;;
- arm*) export ARCH=arm ;;
+ case "$(uname -m)" in
+ i?86) ARCH=i586 ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
# Unless $ARCH is already set, use uname -m for all other archs:
- *) export ARCH=$MARCH ;;
+ *) ARCH=$(uname -m) ;;
esac
+ export ARCH
fi
+# Set CFLAGS/CXXFLAGS and LIBDIRSUFFIX:
case "$ARCH" in
- i486) SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ i?86) SLKCFLAGS="-O2 -march=${ARCH} -mtune=i686"
SLKLDFLAGS=""; LIBDIRSUFFIX=""
;;
x86_64) SLKCFLAGS="-O2 -fPIC"
@@ -147,11 +151,16 @@ case "$ARCH" in
armv7hl) SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16"
SLKLDFLAGS=""; LIBDIRSUFFIX=""
;;
- *) SLKCFLAGS="-O2"
- SLKLDFLAGS=""; LIBDIRSUFFIX=""
+ *) SLKCFLAGS=${SLKCFLAGS:-"-O2"}
+ SLKLDFLAGS=${SLKLDFLAGS:-""}; LIBDIRSUFFIX=${LIBDIRSUFFIX:-""}
;;
esac
+case "$ARCH" in
+ arm*) TARGET=$ARCH-slackware-linux-gnueabi ;;
+ *) TARGET=$ARCH-slackware-linux ;;
+esac
+
# Exit the script on errors:
set -e
trap 'echo "$0 FAILED at line $LINENO!" | tee $OUTPUT/error-${PRGNAM}.log' ERR
@@ -169,7 +178,7 @@ mkdir -p $TMP/tmp-$PRGNAM # location to build the source
mkdir -p $PKG # place for the package to be built
rm -rf $PKG/* # always erase old package's contents
rm -rf $TMP/tmp-$PRGNAM/* # remove the remnants of previous build
-rm -rf $OUTPUT/{configure,make,install,error,makepkg}-$PRGNAM.log
+rm -rf $OUTPUT/{configure,make,install,error,makepkg,patch}-$PRGNAM.log
# remove old log files
# Source file availability:
@@ -180,7 +189,7 @@ if ! [ -f ${SOURCE} ]; then
if [ -f ${SOURCE} ]; then echo "Ah, found it!"; continue; fi
if ! [ "x${SRCURL}" == "x" ]; then
echo "Will download file to $(dirname $SOURCE)"
- wget -nv -T 20 -O "${SOURCE}" "${SRCURL}" || true
+ wget --no-check-certificate -nv -T 20 -O "${SOURCE}" "${SRCURL}" || true
if [ $? -ne 0 -o ! -s "${SOURCE}" ]; then
echo "Fail to download '$(basename ${SOURCE})'. Aborting the build."
mv -f "${SOURCE}" "${SOURCE}".FAIL
@@ -217,9 +226,15 @@ fi
cd $TMP/tmp-$PRGNAM
echo "Extracting the source archive(s) for $PRGNAM..."
tar -xvf ${SOURCE}
-cd ${PRGNAM}-${VERSION}
+cd ${PRGNAM}-${SRCVER}
+
+# Patch to solve problems with the keyboard,
+# where it appears as if you stopped pressing a key:
+cat $SRCDIR/patches/dosbox_events.patch | patch -p0 --verbose \
+ 2>&1 | tee $OUTPUT/patch-${PRGNAM}.log
+
chown -R root:root .
-chmod -R u+w,go+r-w,a+X-s .
+chmod -R u+w,go+r-w,a+rX-st .
echo Building ...
@@ -236,16 +251,17 @@ export LDFLAGS="$SLKLDFLAGS"
--mandir=/usr/man \
--program-prefix= \
--program-suffix= \
- --build=$ARCH-slackware-linux \
+ --build=$TARGET \
2>&1 | tee $OUTPUT/configure-${PRGNAM}.log
-make 2>&1 | tee $OUTPUT/make-${PRGNAM}.log
+make $NUMJOBS 2>&1 | tee $OUTPUT/make-${PRGNAM}.log
make DESTDIR=$PKG install 2>&1 |tee $OUTPUT/install-${PRGNAM}.log
# Documentation:
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION || true
cp -a $SRCDIR/$(basename $0) $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+chown -R root:root $PKG/usr/doc/$PRGNAM-$VERSION
find $PKG/usr/doc -type f -exec chmod 644 {} \;
# Compress the man page(s)