summaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2021-02-14 16:03:41 -0500
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2021-02-21 00:05:06 +0700
commitc90a8578ff54a40a69b880dc9b4c3df1a6aef4ff (patch)
tree7a8e52e3d22899f24a85850513ef7937dc244c18 /games
parentb35748d43b246ecb420d10ccb82061275124a7e4 (diff)
downloadslackbuilds-c90a8578ff54a40a69b880dc9b4c3df1a6aef4ff.tar.gz
games/meandmyshadow: Fix lua build.
Signed-off-by: B. Watson <yalhcru@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games')
-rw-r--r--games/meandmyshadow/README6
-rw-r--r--games/meandmyshadow/meandmyshadow.SlackBuild24
-rw-r--r--games/meandmyshadow/slack-desc4
3 files changed, 30 insertions, 4 deletions
diff --git a/games/meandmyshadow/README b/games/meandmyshadow/README
index 0de9d16730..586fe7f3f8 100644
--- a/games/meandmyshadow/README
+++ b/games/meandmyshadow/README
@@ -1,3 +1,5 @@
-A puzzle/plateform game with a player and its shadow.
+A puzzle/platform game with a player and its shadow.
-Optional: lua53
+Optional: lua53 can be used in place of lua52. If you have both
+installed, lua53 will be used unless you export LUAVER="5.2" in the
+environment.
diff --git a/games/meandmyshadow/meandmyshadow.SlackBuild b/games/meandmyshadow/meandmyshadow.SlackBuild
index 024f5951f1..417b463d70 100644
--- a/games/meandmyshadow/meandmyshadow.SlackBuild
+++ b/games/meandmyshadow/meandmyshadow.SlackBuild
@@ -22,6 +22,9 @@
# 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.
+
PRGNAM=meandmyshadow
VERSION=${VERSION:-0.5a}
BUILD=${BUILD:-1}
@@ -56,6 +59,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 +95,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" \
diff --git a/games/meandmyshadow/slack-desc b/games/meandmyshadow/slack-desc
index ab5c97000b..d4aac92bf0 100644
--- a/games/meandmyshadow/slack-desc
+++ b/games/meandmyshadow/slack-desc
@@ -6,9 +6,9 @@
# customary to leave one space after the ':' except on otherwise blank lines.
|-----handy-ruler------------------------------------------------------|
-meandmyshadow: meandmyshadow (puzzle/plateform game)
+meandmyshadow: meandmyshadow (puzzle/platform game)
meandmyshadow:
-meandmyshadow: A puzzle/plateform game with a player and its shadow.
+meandmyshadow: A puzzle/platform game with a player and its shadow.
meandmyshadow:
meandmyshadow: Homepage: http://meandmyshadow.sourceforge.net/
meandmyshadow: