summaryrefslogtreecommitdiffstats
path: root/games/solarus/solarus.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'games/solarus/solarus.SlackBuild')
-rw-r--r--games/solarus/solarus.SlackBuild31
1 files changed, 23 insertions, 8 deletions
diff --git a/games/solarus/solarus.SlackBuild b/games/solarus/solarus.SlackBuild
index 4a6847bc47..8db923eba3 100644
--- a/games/solarus/solarus.SlackBuild
+++ b/games/solarus/solarus.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for solarus
@@ -22,10 +22,13 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=solarus
VERSION=${VERSION:-1.6.4}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -35,7 +38,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}
@@ -69,16 +79,20 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-# cmake: Fix compatiblity with cmake-3.5.2.
-# https://gitlab.com/solarus-games/solarus/-/merge_requests/1353
-patch -p1 < $CWD/cmake.patch
-
if pkg-config --exists Qt5Core; then
GUI=ON
else
GUI=OFF
fi
+# cmake: Fix compatiblity with cmake-3.5.2.
+# https://gitlab.com/solarus-games/solarus/-/merge_requests/1353
+patch -p1 < $CWD/cmake.patch
+
+# Workaround SDL_WINDOW_FULLSCREEN_DESKTOP issues.
+# https://gitlab.com/solarus-games/solarus/-/merge_requests/1355
+patch -p1 -i $CWD/fullscreen.patch
+
mkdir -p build
cd build
cmake \
@@ -90,6 +104,7 @@ cd build
-DSOLARUS_LIBRARY_INSTALL_DESTINATION:PATH=lib${LIBDIRSUFFIX} \
-DSOLARUS_DEFAULT_QUEST=/usr/share/games/$PRGNAM/zsdx \
-DSOLARUS_GUI=$GUI \
+ -DCMAKE_SKIP_RPATH=TRUE \
-DCMAKE_BUILD_TYPE=Release ..
make
make install DESTDIR=$PKG
@@ -111,4 +126,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