summaryrefslogtreecommitdiffstats
path: root/system/wiimms-iso-tools/wiimms-iso-tools.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'system/wiimms-iso-tools/wiimms-iso-tools.SlackBuild')
-rw-r--r--system/wiimms-iso-tools/wiimms-iso-tools.SlackBuild28
1 files changed, 24 insertions, 4 deletions
diff --git a/system/wiimms-iso-tools/wiimms-iso-tools.SlackBuild b/system/wiimms-iso-tools/wiimms-iso-tools.SlackBuild
index d10239ff94..58df4b17f5 100644
--- a/system/wiimms-iso-tools/wiimms-iso-tools.SlackBuild
+++ b/system/wiimms-iso-tools/wiimms-iso-tools.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for Wiimms ISO Tools
#
@@ -23,10 +23,15 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20220209 bkw: Modified by SlackBuilds.org: fix build on 15.0.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=wiimms-iso-tools
VERSION=${VERSION:-3.02a}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -36,7 +41,14 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# 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
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -72,7 +84,15 @@ find -L . \
patch -p0 < $CWD/cflags.diff
-make CFLAGS="$SLKCFLAGS"
+# 20220209 bkw: I need to see the compile/link commands!
+sed -i 's,@\$(CC),$(CC),g' Makefile
+
+# 20220209 bkw: overriding in the environment or as make args just
+# wasn't working, so I nuked it from orbit. It's the only way to be sure.
+SLKCFLAGS+=" -Wl,--allow-multiple-definition -fcommon"
+sed -i "s|-O3|$SLKCFLAGS|" Makefile test-libwbfs/Makefile
+
+make
# Fix the install directory
sed -i "s|/usr/local|$PKG/usr|" templates.sed
@@ -90,4 +110,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