games/crawl: Build with lua51.

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-20 05:17:26 -04:00 committed by Willy Sudiarto Raharjo
parent 198790d209
commit 9d20408e6c
No known key found for this signature in database
GPG key ID: 3F617144D7238786
3 changed files with 25 additions and 8 deletions

View file

@ -22,11 +22,21 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# 20241020 bkw: Modified by SlackBuilds.org: BUILD=2
# - build with lua51.
# - use wrapper scripts, so the binaries can find the data files.
# Note: This package is still broken.
# - the crawl-ascii binary doesn't work (it didn't work in BUILD 1 either).
# - it installs binaries to /usr/share/games/bin. binaries do not
# belong in /usr/share.
# - it installs its data dirs directly to /usr/share/games, instead of
# a properly separated /usr/share/games/crawl dir.
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=crawl
VERSION=${VERSION:-0.32.1}
BUILD=${BUILD:-1}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
SRCNAM=stone_soup
@ -77,7 +87,6 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
mkdir -p $PKG/usr/games
cd source
# Do not remove quotation marks from SAVEDIR='~/.crawl/'.
# $SAVEDIR needs evaluating at runtime.
@ -85,21 +94,26 @@ cd source
prefix=/usr/share/games \
COPY_FONTS=1 \
DATADIR=/usr/share/games/crawl \
LUA_PACKAGE=lua51
SAVEDIR='~/.crawl/' \
TILES=1
strip crawl
make install \
prefix=/usr/share/games \
DESTDIR=$PKG
make clean
make \
prefix=/usr \
DATADIR=/usr/share/crawl \
prefix=/usr/share/games \
DATADIR=/usr/share/games/crawl \
LUA_PACKAGE=lua51
SAVEDIR='~/.crawl/'
cp crawl $PKG/usr/games/crawl-ascii
strip crawl
cp crawl $PKG/usr/share/games/bin/crawl-ascii
cd ..
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
mkdir -p $PKG/usr/games
install -oroot -groot -m0755 $CWD/wrapper.sh $PKG/usr/games/crawl
ln -s crawl $PKG/usr/games/crawl-ascii
mkdir -p $PKG/usr/man/man6
gzip -9 -c docs/crawl.6 > $PKG/usr/man/man6/crawl.6.gz

View file

@ -5,6 +5,6 @@ DOWNLOAD="https://github.com/crawl/crawl/releases/download/0.32.1/stone_soup-0.3
MD5SUM="29adceddd314416258b586ef76f99d56"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="lua"
REQUIRES="lua51"
MAINTAINER="David Melik"
EMAIL="dchmelik@gmail.com"

3
games/crawl/wrapper.sh Normal file
View file

@ -0,0 +1,3 @@
#!/bin/sh
exec /usr/share/games/bin/$( basename $0 ) "$@"