summaryrefslogtreecommitdiffstats
path: root/games/meandmyshadow/meandmyshadow.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'games/meandmyshadow/meandmyshadow.SlackBuild')
-rw-r--r--games/meandmyshadow/meandmyshadow.SlackBuild40
1 files changed, 37 insertions, 3 deletions
diff --git a/games/meandmyshadow/meandmyshadow.SlackBuild b/games/meandmyshadow/meandmyshadow.SlackBuild
index 024f5951f1..c37acc6459 100644
--- a/games/meandmyshadow/meandmyshadow.SlackBuild
+++ b/games/meandmyshadow/meandmyshadow.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for meandmyshadow
@@ -22,10 +22,16 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20210214 bkw: Modified by SlackBuilds.org to allow building on a
+# system that has both lua and lua52 (or lua53) installed.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=meandmyshadow
VERSION=${VERSION:-0.5a}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -35,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}
@@ -56,6 +69,23 @@ fi
set -e
+# 20210214 bkw: cmake can't be told to ignore lua-5.1 when both 5.1
+# and 5.2 are installed, so help it out a little. LUAVER is used in
+# the cmake command, below.
+if [ -z "$LUAVER" ]; then
+ if [ -x /usr/bin/lua5.3 ]; then
+ LUAVER=5.3
+ elif [ -x /usr/bin/lua5.2 ]; then
+ LUAVER=5.2
+ fi
+fi
+
+case "$LUAVER" in
+ 5.[23]) ;; # OK
+ *) echo "$0: No supported lua version found, install lua52 or lua53." 2>&1
+ exit 0 ;;
+esac
+
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
@@ -75,6 +105,10 @@ sed -i 's/\r//' docs/ThemeDescription.md
mkdir -p build
cd build
cmake -G "Unix Makefiles" \
+ -DLUA_FOUND=ON \
+ -DLUA_LIBRARY="/usr/lib$LIBDIRSUFFIX/liblua$LUAVER.so" \
+ -DLUA_INCLUDE_DIR="/usr/include/lua$LUAVER" \
+ -DLUA_MATH_LIBRARY="/usr/lib$LIBDIRSUFFIX/libm.so" \
-DCMAKE_INSTALL_PREFIX:PATH=/usr \
-DBINDIR=/usr/games \
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
@@ -97,4 +131,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