games/pioneer: Build w/bundled lua 5.2 src.

Signed-off-by: B. Watson <urchlay@slackware.uk>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
B. Watson 2024-10-24 03:55:24 -04:00 committed by Willy Sudiarto Raharjo
parent e7bccea146
commit 7aae75a758
No known key found for this signature in database
GPG key ID: 3F617144D7238786
2 changed files with 15 additions and 25 deletions

View file

@ -16,5 +16,3 @@ 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.

View file

@ -23,11 +23,20 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# 20241024 bkw: Modified by SlackBuilds.org, BUILD=2:
# - Don't try to build with lua52 (doubleplusungood ref unbuild).
# This thing insists on lua 5.2, but includes its own bundled
# source, which it will build if -DUSE_SYSTEM_LIBLUA=OFF. I assume
# the game was actually tested with the bundled lua, so let's use it.
# Thought about doing the same with the bundled glew, but glew looks
# like it might depend a lot on the mesa version in use, so I left
# it alone (keep using the system one).
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=pioneer
VERSION=${VERSION:-20240710}
BUILD=${BUILD:-1}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@ -39,9 +48,6 @@ 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
@ -70,11 +76,8 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
-o -perm 511 \) -exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \
\! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} +
if [ "${DEBUG:=0}" != 0 ]; then
RELEASE=Debug
@ -83,12 +86,6 @@ else
RELEASE=Release
fi
GLEW=OFF
LUA=OFF
pkg-config --exists glew && GLEW=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.
mkdir -p tmphome/.local/share/pioneer
@ -110,20 +107,15 @@ cd build
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_BINDIR=games \
-DCMAKE_INSTALL_DATADIR=share/games \
-DUSE_SYSTEM_LIBGLEW=$GLEW \
-DUSE_SYSTEM_LIBLUA=$LUA \
-DUSE_SYSTEM_LIBGLEW=ON \
-DUSE_SYSTEM_LIBLUA=OFF \
-DPROJECT_VERSION_INFO="$INFOSTRING" \
-DCMAKE_BUILD_TYPE=$RELEASE ..
make
make install DESTDIR=$PKG
make install/strip DESTDIR=$PKG
make -C . build-data install DESTDIR=$PKG
cd ..
if [ "$DEBUG" = 0 ]; then
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" |
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}