From c90a8578ff54a40a69b880dc9b4c3df1a6aef4ff Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Sun, 14 Feb 2021 16:03:41 -0500 Subject: games/meandmyshadow: Fix lua build. Signed-off-by: B. Watson Signed-off-by: Willy Sudiarto Raharjo --- games/meandmyshadow/meandmyshadow.SlackBuild | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'games/meandmyshadow/meandmyshadow.SlackBuild') diff --git a/games/meandmyshadow/meandmyshadow.SlackBuild b/games/meandmyshadow/meandmyshadow.SlackBuild index 024f5951f138..417b463d7017 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" \ -- cgit v1.2.3