diff options
Diffstat (limited to 'games/0ad/0ad.SlackBuild')
-rw-r--r-- | games/0ad/0ad.SlackBuild | 47 |
1 files changed, 28 insertions, 19 deletions
diff --git a/games/0ad/0ad.SlackBuild b/games/0ad/0ad.SlackBuild index 7ebbab8d82..d79e586be8 100644 --- a/games/0ad/0ad.SlackBuild +++ b/games/0ad/0ad.SlackBuild @@ -2,7 +2,7 @@ # # 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,23 +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.25} +VERSION=${VERSION:-r28035} RELEASE=${RELEASE:-alpha} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} - -# 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 - TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} @@ -53,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="" @@ -88,27 +89,35 @@ 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" -# 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 +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 @@ -132,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 |