summaryrefslogtreecommitdiffstats
path: root/games/openttd/openttd.SlackBuild
diff options
context:
space:
mode:
author newHeiko2022-04-23 19:46:34 +0200
committer Willy Sudiarto Raharjo2022-04-30 08:51:44 +0200
commitdcdc1db304dd5259c9cb1c4321b0e6592af6365d (patch)
tree8bdcda18ce78fe4b6740cdc6a42a11376dbf9fd0 /games/openttd/openttd.SlackBuild
parent782959715fb19384634371694b36d1067c6de4b8 (diff)
downloadslackbuilds-dcdc1db304dd5259c9cb1c4321b0e6592af6365d.tar.gz
games/openttd: Updated for version 12.2.
Signed-off-by: Andrew Clemons <andrew.clemons@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games/openttd/openttd.SlackBuild')
-rw-r--r--games/openttd/openttd.SlackBuild44
1 files changed, 19 insertions, 25 deletions
diff --git a/games/openttd/openttd.SlackBuild b/games/openttd/openttd.SlackBuild
index 61dfe18d94..58718a2e33 100644
--- a/games/openttd/openttd.SlackBuild
+++ b/games/openttd/openttd.SlackBuild
@@ -4,7 +4,7 @@
# Copyright 2007-2010 Chess Griffin <chess@chessgriffin.com>
# Copyright 2011-2014 LEVAI Daniel
-# Copyright 2020 Heiko Rosemann
+# Copyright 2020-2022 Heiko Rosemann Germany
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -27,14 +27,14 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=openttd
-VERSION=${VERSION:-1.10.1}
+VERSION=${VERSION:-12.2}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
-OPENGFX=0.6.0
-OPENSFX=0.2.3
-OPENMSX=0.3.1
+OPENGFX=7.1
+OPENSFX=1.0.3
+OPENMSX=0.4.2
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -89,7 +89,9 @@ if [ "$OPENDATA" == "YES" ]; then
unzip -o $CWD/opengfx-$OPENGFX-all.zip
tar -xvf opengfx-${OPENGFX}.tar
unzip -o $CWD/opensfx-$OPENSFX-all.zip
+ tar -xvf opensfx-${OPENSFX}.tar
unzip -o $CWD/openmsx-$OPENMSX-all.zip
+ tar -xvf openmsx-${OPENMSX}.tar
fi
chown -R root:root .
find -L . \
@@ -98,20 +100,18 @@ 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 {} \;
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS -DU_USING_ICU_NAMESPACE=1" \
-./configure \
- --prefix-dir=/usr \
- --binary-dir=/games \
- --data-dir=/share/games/openttd \
- --icon-dir=/share/pixmaps \
- --man-dir=/man/man6 \
- --doc-dir=/doc/$PRGNAM-$VERSION \
- --personal-dir=.openttd \
- --install-dir=$PKG
-
-make
-make install DEST_DIR=$PKG
+mkdir -p build
+cd build
+ cmake \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_MANDIR=/usr/man \
+ -DCMAKE_INSTALL_DOCDIR=/usr/doc/$PRGNAM-$VERSION \
+ -DCMAKE_BUILD_TYPE=Release ..
+ make
+ make install/strip DESTDIR=$PKG
+cd ..
# Copy opengfx, opensfx, and openmsx files if OPENDATA=YES
if [ "$OPENDATA" == "YES" ]; then
@@ -127,12 +127,6 @@ if [ "$OPENDATA" == "YES" ]; then
cp -a openmsx-$OPENMSX/* $PKG/usr/share/games/openttd/gm/
fi
-find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-
-find $PKG/usr/man -type f -exec gzip -9 {} \;
-for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
-
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a docs/* $PKG/usr/doc/$PRGNAM-$VERSION
rm -f $PKG/usr/doc/$PRGNAM-$VERSION/openttd.6