summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author B. Watson <yalhcru@gmail.com>2022-02-22 16:01:28 -0500
committer Willy Sudiarto Raharjo <willysr@slackbuilds.org>2022-02-23 20:10:24 +0700
commit22d280c54e3c69d3dc2b13d24d441ffdd81c525f (patch)
tree5e1904cabdbbd558b70e5f6eaaa494a49dbded82
parentb0e5411c5fa1aed9b4b012ee1bcd930745d299ea (diff)
downloadslackbuilds-22d280c54e3c69d3dc2b13d24d441ffdd81c525f.tar.gz
slackbuilds-22d280c54e3c69d3dc2b13d24d441ffdd81c525f.tar.xz
games/mars: Fix 15.0 build.
Signed-off-by: B. Watson <yalhcru@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r--games/mars/mars.SlackBuild20
1 files changed, 13 insertions, 7 deletions
diff --git a/games/mars/mars.SlackBuild b/games/mars/mars.SlackBuild
index 817c37b895..26e8022862 100644
--- a/games/mars/mars.SlackBuild
+++ b/games/mars/mars.SlackBuild
@@ -22,6 +22,8 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20220222 bkw: Modified by SlackBuilds.org: fix build on 15.0.
+
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=mars
@@ -41,9 +43,6 @@ if [ -z "$ARCH" ]; then
esac
fi
-# 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
@@ -69,18 +68,25 @@ fi
set -e
+# 20220222 bkw: depending on what client was used to download the file,
+# it may have CGI parameters in the filename.
+TARBALL=$CWD/${SRCNAM}_$VERSION.tar.gz
+if [ ! -e $TARBALL ]; then
+ TARBALL="$( /bin/ls $TARBALL\?* | head -1 )"
+fi
+
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $SRCDIR
-tar xvf $CWD/$SRCNAM\_$VERSION.tar.gz || tar xvf $CWD/v$VERSION.tar.gz
+tar xvf $TARBALL
cd $SRCDIR
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
- -o -perm 511 \) -exec chmod 755 {} \; -o \
+ -o -perm 511 \) -exec chmod 755 {} \+ -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \+
# Fix build with SFML-2.1
# https://github.com/thelaui/M.A.R.S./pull/2
@@ -99,7 +105,7 @@ sed -i \
mkdir -p build
cd build
cmake \
- -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS $FRIBIDIFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS -std=gnu++11 $FRIBIDIFLAGS" \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release ..
make