summaryrefslogtreecommitdiffstats
path: root/games/0ad
diff options
context:
space:
mode:
Diffstat (limited to 'games/0ad')
-rw-r--r--games/0ad/0ad.SlackBuild63
-rw-r--r--games/0ad/0ad.info12
-rw-r--r--games/0ad/README4
3 files changed, 55 insertions, 24 deletions
diff --git a/games/0ad/0ad.SlackBuild b/games/0ad/0ad.SlackBuild
index 524b16e406..d79e586be8 100644
--- a/games/0ad/0ad.SlackBuild
+++ b/games/0ad/0ad.SlackBuild
@@ -1,7 +1,8 @@
-#!/bin/sh
+#!/bin/bash
#
# Slackware build script for 0.A.D.
#
+# Copyright 2020-2023 Tim Dickson, Scotland
# Copyright 2016-2017 Reedych <reedych@ya.ru>
# Copyright 2010-2016 Erik W. Hanson, Minneapolis, MN, USA
# All rights reserved.
@@ -23,13 +24,16 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#build 3 adds patches for fmt >=v10
+
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=0ad
-VERSION=${VERSION:-0.0.21}
+VERSION=${VERSION:-r28035}
RELEASE=${RELEASE:-alpha}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
-
-CWD=$(pwd)
+PKGTYPE=${PKGTYPE:-tgz}
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -42,6 +46,14 @@ 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
+fi
+
if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
@@ -56,7 +68,7 @@ else
LIBDIRSUFFIX=""
fi
-set -eu
+set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
@@ -71,24 +83,43 @@ 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 {} \;
+unset CPPFLAGS
+
export CFLAGS="$SLKCFLAGS"
-export CXXFLAGS="$SLKCFLAGS -fpermissive"
-# and yes, it's really necessary to set CPPFLAGS like this :(
-export CPPFLAGS="$SLKCFLAGS -fpermissive"
+export CXXFLAGS="$SLKCFLAGS -DU_USING_ICU_NAMESPACE=1"
export LDFLAGS="-L/usr/lib${LIBDIRSUFFIX}"
-
-# Fix boost names
-sed -i 's/-mt//g' build/premake/extern_libs4.lua
-
+export SDL2_CONFIG="/usr/bin/sdl2-config"
+#prevent out of tree files getting written.
+mkdir -p cargoh
+export CARGO_HOME="$TMP/$PRGNAM-$VERSION-$RELEASE/cargoh"
+
+# Fix boost names, include paths and remove isystem. commented stuff is fixed upstream already
+sed -i 's|-mt||g' build/premake/extern_libs5.lua || exit 1
+#sed -i 's|/usr/local/include|/usr/include|' build/premake/{extern_libs5.lua,premake5.lua} || exit 1
+sed -i 's|/usr/local/include|/usr/include|' build/premake/extern_libs5.lua || exit 1
+sed -i 's|-isystem |-I|' build/premake/premake5/{src/tools/gcc.lua,tests/tools/test_gcc.lua} || exit 1
+
+#sed -i '/third_party/a #include <deque>' source/ps/CLogger.h || exit 1
+#sed -i '/ps\/Profiler2/a #include <stack>' source/ps/Profiler2GPU.cpp || exit 1
+
+#allow for ATLAS to be yes or no. if not specified we defaul to enable
+[ "x$ATLAS" = "xno" ]&& ATLAS="disable"
+[ "x$ATLAS" = "xyes" ]&& ATLAS="enable"
# build/workspaces/update-workspaces.sh
# have a root check, let's disable it.
patch -p1 < $CWD/disable-root-check.patch
+sed -i '/Pyrogenesis/i #include <iomanip>' source/ps/Util.cpp
+
+CXX=clang++ \
build/workspaces/update-workspaces.sh \
+ --without-pch \
--bindir=/usr/games \
--datadir=/usr/share/games/0ad \
--libdir=/usr/lib${LIBDIRSUFFIX}/0ad \
- --${ATLAS:-disable}-atlas
+ --${ATLAS:-enable}-atlas
+
+sed -i 's|-isystem |-I|g' build/workspaces/gcc/*.make || exit 1
make CONFIG=Release -C build/workspaces/gcc
@@ -110,8 +141,8 @@ install -Dm 0644 build/resources/0ad.desktop $PKG/usr/share/applications/0ad.des
install -Dm 0644 build/resources/0ad.png $PKG/usr/share/pixmaps/0ad.png
install -Dm 0755 build/resources/0ad.sh $PKG/usr/games/0ad
-sed -i "s,/usr/bin/,/usr/games/," $PKG/usr/games/0ad
-sed -i "s,/usr/bin/,/usr/games/," $PKG/usr/share/applications/0ad.desktop
+#sed -i "s,/usr/bin/,/usr/games/," $PKG/usr/games/0ad
+#sed -i "s,/usr/bin/,/usr/games/," $PKG/usr/share/applications/0ad.desktop
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
@@ -128,4 +159,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
diff --git a/games/0ad/0ad.info b/games/0ad/0ad.info
index 97bc6ce2ac..f1aaf3606a 100644
--- a/games/0ad/0ad.info
+++ b/games/0ad/0ad.info
@@ -1,10 +1,10 @@
PRGNAM="0ad"
-VERSION="0.0.21"
+VERSION="r28035"
HOMEPAGE="https://play0ad.com/"
-DOWNLOAD="http://releases.wildfiregames.com/0ad-0.0.21-alpha-unix-build.tar.xz"
-MD5SUM="095eade8c9b3deaf25d0d7fa423ff860"
+DOWNLOAD="https://ponce.cc/slackware/sources/repo/0ad-r28035-alpha-unix-build.tar.xz"
+MD5SUM="45c9ebe38e0578c6eade09da81b10105"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES="0ad-data OpenAL enet gloox miniupnpc SDL2"
-MAINTAINER="Reedych"
-EMAIL="reedych@ya.ru"
+REQUIRES="0ad-data enet fmt gloox miniupnpc wxWidgets"
+MAINTAINER="Tim Dickson"
+EMAIL="dickson.tim@googlemail.com"
diff --git a/games/0ad/README b/games/0ad/README
index 1f7344ab01..6af05415e6 100644
--- a/games/0ad/README
+++ b/games/0ad/README
@@ -1,5 +1,5 @@
0 A.D. (pronounced "zero ey-dee") is a free, open-source, cross-platform
real-time strategy (RTS) game of ancient warfare.
-To include the Atlas editor, which requires wxPython:
- ATLAS=enable ./0ad.SlackBuild
+To omit the Atlas editor
+ ATLAS=disable ./0ad.SlackBuild