diff options
Diffstat (limited to 'games/0ad/0ad.SlackBuild')
-rw-r--r-- | games/0ad/0ad.SlackBuild | 52 |
1 files changed, 35 insertions, 17 deletions
diff --git a/games/0ad/0ad.SlackBuild b/games/0ad/0ad.SlackBuild index d8ff784b1b..b6c52e7c61 100644 --- a/games/0ad/0ad.SlackBuild +++ b/games/0ad/0ad.SlackBuild @@ -1,8 +1,8 @@ -#!/bin/sh +#!/bin/bash # # Slackware build script for 0.A.D. # -# Copyright 2020 Tim Dickson, Scotland +# 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. @@ -24,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.24b} +VERSION=${VERSION:-0.0.26} RELEASE=${RELEASE:-alpha} -BUILD=${BUILD:-2} +BUILD=${BUILD:-3} TAG=${TAG:-_SBo} - -CWD=$(pwd) +PKGTYPE=${PKGTYPE:-tgz} TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} @@ -43,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="" @@ -78,29 +89,36 @@ export CFLAGS="$SLKCFLAGS" export CXXFLAGS="$SLKCFLAGS -DU_USING_ICU_NAMESPACE=1" export LDFLAGS="-L/usr/lib${LIBDIRSUFFIX}" 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" + +#add patches for fmt>9.1.0 ie. 10.1.1 +sed -i 's/, header.GetType()/, static_cast<int>(header.GetType())/g' source/network/NetMessage.cpp +sed -i 's/, arrayType/, static_cast<int>(arrayType)/g' source/simulation2/serialization/BinarySerializer.cpp -# Fix boost names, include paths and remove isystem +# 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,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 +#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. +#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 -echo "patch -p1 < $CWD/rust-1.50.0.patch" >> libraries/source/spidermonkey/patch.sh - 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 @@ -124,8 +142,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 @@ -142,4 +160,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 |