diff options
Diffstat (limited to 'games/pioneer')
-rw-r--r-- | games/pioneer/README | 13 | ||||
-rw-r--r-- | games/pioneer/alignment.patch | 22 | ||||
-rw-r--r-- | games/pioneer/gcc-14.diff | 10 | ||||
-rw-r--r-- | games/pioneer/pioneer.SlackBuild | 50 | ||||
-rw-r--r-- | games/pioneer/pioneer.info | 10 | ||||
-rw-r--r-- | games/pioneer/save-compat.diff | 13 |
6 files changed, 64 insertions, 54 deletions
diff --git a/games/pioneer/README b/games/pioneer/README index 389b6706af..e19fd95e46 100644 --- a/games/pioneer/README +++ b/games/pioneer/README @@ -8,16 +8,13 @@ try your hand at piracy, make your fortune trading between systems, or do missions for the various factions fighting for power, freedom or self-determination. -WARNING: If pioneer is already installed, uninstall it before compiling -or important game data may be missing and pioneer will fail to start. +To build with debugging support, use: -OpenGL core profile version 3.1 or newer is a runtime dependency, to -determine what version of OpenGL is installed use: + DEBUG="yes" ./pioneer.SlackBuild + +OpenGL core profile version 3.1 or newer is a runtime dependency. To +determine what version of OpenGL is installed, use: glxinfo | grep "core profile version" lua52 is an optional dependency. - -To build with debugging support use: - - DEBUG="yes" ./pioneer.SlackBuild diff --git a/games/pioneer/alignment.patch b/games/pioneer/alignment.patch deleted file mode 100644 index 10ad31ed08..0000000000 --- a/games/pioneer/alignment.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- a/src/scenegraph/Serializer.orig.h 2019-10-09 13:49:04.000000000 +0200 -+++ b/src/scenegraph/Serializer.h 2019-10-09 18:47:05.238671730 +0200 -@@ -23,14 +23,14 @@ - // where possible, prefer serializing state information via JSON instead. - namespace Serializer { - static_assert((sizeof(Uint32) == 4 && alignof(Uint32) == 4), "Int32 is sized differently on this platform and will not serialize properly."); -- static_assert((sizeof(Uint64) == 8 && alignof(Uint64) == 8), "Int64 is sized differently on this platform and will not serialize properly."); -+ static_assert((sizeof(Uint64) == 8 && alignof(Uint64) <= 8), "Int64 is sized differently on this platform and will not serialize properly."); - static_assert((sizeof(Color) == 4 && alignof(Color) == 1), "Color is padded differently on this platform and will not serialize properly."); - static_assert((sizeof(vector2f) == 8 && alignof(vector2f) == 4), "Vector2f is padded differently on this platform and will not serialize properly."); -- static_assert((sizeof(vector2d) == 16 && alignof(vector2d) == 8), "Vector2d is padded differently on this platform and will not serialize properly."); -+ static_assert((sizeof(vector2d) == 16 && alignof(vector2d) <= 8), "Vector2d is padded differently on this platform and will not serialize properly."); - static_assert((sizeof(vector3f) == 12 && alignof(vector3f) == 4), "Vector3f is padded differently on this platform and will not serialize properly."); -- static_assert((sizeof(vector3d) == 24 && alignof(vector3d) == 8), "Vector3d is padded differently on this platform and will not serialize properly."); -+ static_assert((sizeof(vector3d) == 24 && alignof(vector3d) <= 8), "Vector3d is padded differently on this platform and will not serialize properly."); - static_assert((sizeof(Quaternionf) == 16 && alignof(Quaternionf) == 4), "Quaternionf is padded differently on this platform and will not serialize properly."); -- static_assert((sizeof(Aabb) == 56 && alignof(Aabb) == 8), "Aabb is padded differently on this platform and will not serialize properly."); -+ static_assert((sizeof(Aabb) == 56 && alignof(Aabb) <= 8), "Aabb is padded differently on this platform and will not serialize properly."); - - class Writer { - public: - diff --git a/games/pioneer/gcc-14.diff b/games/pioneer/gcc-14.diff new file mode 100644 index 0000000000..f71de6c62b --- /dev/null +++ b/games/pioneer/gcc-14.diff @@ -0,0 +1,10 @@ +--- src/Input.h.orig 2024-05-18 09:08:26.973952781 +0900 ++++ src/Input.h 2024-05-18 09:08:44.313951316 +0900 +@@ -12,6 +12,7 @@ + #include <vector> + #include <map> + #include <string> ++#include <algorithm> + + class IniConfig; + diff --git a/games/pioneer/pioneer.SlackBuild b/games/pioneer/pioneer.SlackBuild index 83daea8051..3162d6de45 100644 --- a/games/pioneer/pioneer.SlackBuild +++ b/games/pioneer/pioneer.SlackBuild @@ -3,6 +3,7 @@ # Slackware build script for pioneer # Copyright 2015-2019 Hunter Sezen California, USA +# Copyright 2023-2024 K. Eugene Carlson Tsukuba, JP # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -25,8 +26,7 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=pioneer -SRCNAM=$(printf %s $PRGNAM | tr [a-z] [A-Z]) -VERSION=${VERSION:-20191117} +VERSION=${VERSION:-20240314} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -53,16 +53,12 @@ OUTPUT=${OUTPUT:-/tmp} if [ "$ARCH" = "i586" ]; then SLKCFLAGS="-O2 -march=i586 -mtune=i686" - LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" - LIBDIRSUFFIX="" elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" - LIBDIRSUFFIX="64" else SLKCFLAGS="-O2" - LIBDIRSUFFIX="" fi set -eu @@ -87,27 +83,30 @@ else RELEASE=Release fi +# Fix save compatibility (#5798). +patch -p0 < $CWD/save-compat.diff +# GCC 14 compatibility. +patch -p0 < $CWD/gcc-14.diff + GLEW=OFF LUA=OFF pkg-config --exists glew && GLEW=ON - -# 20210214 bkw: cmake can't easily be told to ignore lua 5.1 on a -# system where both 5.1 and 5.2 are installed. In that case, we'll -# use the bundled lua source. Note that there's no problem with 5.3, -# as cmake seems to search for them in order. -pkg-config --exists lua5.2 && ! pkg-config --exists lua && LUA=ON - -# Workaround 32-bit build failure -# https://github.com/pioneerspacesim/pioneer/issues/4691 -patch -p1 < $CWD/alignment.patch +pkg-config --exists lua5.2 && LUA=ON # 20210214 bkw: prevent the build from writing to /root/, without # breaking ccache if it's in use. -mkdir -p tmphome +mkdir -p tmphome/.local/share/pioneer export CCACHE_DIR=${CCACHE_DIR:-$HOME/.ccache} export HOME=$( pwd )/tmphome +OSNAME="$(awk -F= '/^ID=/{print $2}' /etc/os-release)" +OSVER="$(awk -F= '/^VERSION_ID=/{print $2}' /etc/os-release)" +OSCODENAME="$(awk -F= '/^VERSION_CODENAME=/{print $2}' /etc/os-release)" +# This version information string can be included when reporting issues +# upstream. +INFOSTRING="$OSNAME-$OSVER-$OSCODENAME-$PRGNAM-$VERSION-$ARCH-$BUILD$TAG" + mkdir -p build cd build cmake \ @@ -115,12 +114,15 @@ cd build -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_BINDIR=games \ - -DPIONEER_DATA_DIR=/usr/share/games/$PRGNAM \ + -DCMAKE_INSTALL_DATADIR=share/games \ -DUSE_SYSTEM_LIBGLEW=$GLEW \ -DUSE_SYSTEM_LIBLUA=$LUA \ + -DFMT_INSTALL=OFF \ + -DPROJECT_VERSION_INFO="$INFOSTRING" \ -DCMAKE_BUILD_TYPE=$RELEASE .. make make install DESTDIR=$PKG + make -C . build-data install DESTDIR=$PKG cd .. if [ "$DEBUG" = 0 ]; then @@ -128,8 +130,18 @@ if [ "$DEBUG" = 0 ]; then grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true fi +# Clean up the data directory, put icons and files where they are +# supposed to be and install an SVG icon. +rm -rf $PKG/usr/share/games/$PRGNAM/{licenses,*txt,*md} +mv $PKG/usr/share/games/{icons,applications,metainfo} $PKG/usr/share +sed -i 's|Exec=|Exec=/usr/|g' $PKG/usr/share/applications/net.pioneerspacesim.Pioneer.desktop +mkdir -p $PKG/usr/share/icons/hicolor/scalable/apps +install -m 0644 application-icon/badge-full.svg \ + $PKG/usr/share/icons/hicolor/scalable/apps/net.pioneerspacesim.Pioneer.svg + mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a licenses *.txt README.md $PKG/usr/doc/$PRGNAM-$VERSION +cp -a licenses *.txt README.md NEWS.md $PKG/usr/doc/$PRGNAM-$VERSION +rm -f $PKG/usr/doc/$PRGNAM-$VERSION/{CMakeLists,SAVEBUMP}.txt cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install diff --git a/games/pioneer/pioneer.info b/games/pioneer/pioneer.info index 81cb877e8d..633ff1cbdc 100644 --- a/games/pioneer/pioneer.info +++ b/games/pioneer/pioneer.info @@ -1,10 +1,10 @@ PRGNAM="pioneer" -VERSION="20191117" +VERSION="20240314" HOMEPAGE="https://pioneerspacesim.net/" -DOWNLOAD="https://github.com/pioneerspacesim/pioneer/archive/20191117/pioneer-20191117.tar.gz" -MD5SUM="4b7b7e5119b371b65cd61f45c6747dad" +DOWNLOAD="https://github.com/pioneerspacesim/pioneer/archive/20240314/pioneer-20240314.tar.gz" +MD5SUM="e95791b2dc96584e51dd0d2e892655f0" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="assimp" -MAINTAINER="Hunter Sezen" -EMAIL="orbea@riseup.net" +MAINTAINER="K. Eugene Carlson" +EMAIL="kvngncrlsn@gmail.com" diff --git a/games/pioneer/save-compat.diff b/games/pioneer/save-compat.diff new file mode 100644 index 0000000000..db0f5f247c --- /dev/null +++ b/games/pioneer/save-compat.diff @@ -0,0 +1,13 @@ +--- src/lua/LuaSerializer.cpp.orig 2024-03-16 10:23:00.037921901 +0900 ++++ src/lua/LuaSerializer.cpp 2024-03-16 10:24:18.622366095 +0900 +@@ -413,6 +413,10 @@ + lua_State *l = Lua::manager->GetLuaState(); + LUA_DEBUG_START(l); + ++ // Old savefile with no persistent table. ++ if (!json.count("lua_persistent_json")) ++ return; ++ + const Json &persist = json["lua_persistent_json"]; + + luaL_getsubtable(l, LUA_REGISTRYINDEX, NS_REFTABLE); |