games/pioneer: Updated for version 20240314.

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Gene Carlson 2024-03-17 17:15:14 +09:00 committed by Willy Sudiarto Raharjo
parent a77a1de021
commit 8aa12f24c5
No known key found for this signature in database
GPG key ID: 3F617144D7238786
3 changed files with 25 additions and 12 deletions

View file

@ -26,7 +26,7 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=pioneer
VERSION=${VERSION:-20240203}
VERSION=${VERSION:-20240314}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@ -83,16 +83,14 @@ else
RELEASE=Release
fi
# Fix save compatibility (#5798).
patch -p0 < $CWD/save-compat.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
pkg-config --exists lua5.2 && LUA=ON
# 20210214 bkw: prevent the build from writing to /root/, without
# breaking ccache if it's in use.
@ -114,9 +112,10 @@ cd build
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_BINDIR=games \
-DCMAKE_INSTALL_DATADIR=/usr/share/games \
-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
@ -133,12 +132,13 @@ fi
# 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

View file

@ -1,8 +1,8 @@
PRGNAM="pioneer"
VERSION="20240203"
VERSION="20240314"
HOMEPAGE="https://pioneerspacesim.net/"
DOWNLOAD="https://github.com/pioneerspacesim/pioneer/archive/20240203/pioneer-20240203.tar.gz"
MD5SUM="0404c477b33d428f7b48686c71569b52"
DOWNLOAD="https://github.com/pioneerspacesim/pioneer/archive/20240314/pioneer-20240314.tar.gz"
MD5SUM="e95791b2dc96584e51dd0d2e892655f0"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="assimp"

View file

@ -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);