games/mars: Fix 15.0 build.

Signed-off-by: B. Watson <yalhcru@gmail.com>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
B. Watson 2022-02-22 16:01:28 -05:00 committed by Willy Sudiarto Raharjo
parent b0e5411c5f
commit 22d280c54e
No known key found for this signature in database
GPG key ID: 3F617144D7238786

View file

@ -22,6 +22,8 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# 20220222 bkw: Modified by SlackBuilds.org: fix build on 15.0.
cd $(dirname $0) ; CWD=$(pwd) cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=mars PRGNAM=mars
@ -41,9 +43,6 @@ if [ -z "$ARCH" ]; then
esac esac
fi 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 if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0 exit 0
@ -69,18 +68,25 @@ fi
set -e 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 rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT mkdir -p $TMP $PKG $OUTPUT
cd $TMP cd $TMP
rm -rf $SRCDIR rm -rf $SRCDIR
tar xvf $CWD/$SRCNAM\_$VERSION.tar.gz || tar xvf $CWD/v$VERSION.tar.gz tar xvf $TARBALL
cd $SRCDIR cd $SRCDIR
chown -R root:root . chown -R root:root .
find -L . \ find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ \( -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 \ \( -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 # Fix build with SFML-2.1
# https://github.com/thelaui/M.A.R.S./pull/2 # https://github.com/thelaui/M.A.R.S./pull/2
@ -99,7 +105,7 @@ sed -i \
mkdir -p build mkdir -p build
cd build cd build
cmake \ cmake \
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS $FRIBIDIFLAGS" \ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS -std=gnu++11 $FRIBIDIFLAGS" \
-DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release .. -DCMAKE_BUILD_TYPE=Release ..
make make