nethack: fix musl build

Close #56613
This commit is contained in:
Đoàn Trần Công Danh 2025-08-04 13:27:21 +07:00
parent c8df2cb57f
commit 74be69658c

View file

@ -1,16 +1,16 @@
# Template file for 'nethack'
pkgname=nethack
version=3.6.7
revision=1
revision=2
conf_files="/etc/nethack/sysconf"
make_dirs="/var/games/nethack/save 0775 nethack nethack"
hostmakedepends="flex"
hostmakedepends="flex groff"
makedepends="ncurses-devel ncurses-libtinfo-devel"
depends="gzip"
short_desc="Exploring The Mazes of Menace"
maintainer="Leah Neukirchen <leah@vuxu.org>"
license="NGPL"
homepage="http://www.nethack.org/"
homepage="https://www.nethack.org/"
distfiles="https://www.nethack.org/download/${version}/nethack-${version//./}-src.tgz"
checksum=98cf67df6debf9668a61745aa84c09bcab362e5d33f5b944ec5155d44d2aacb2
nocross=yes
@ -21,8 +21,13 @@ do_configure() {
}
do_build() {
local nocol
if [ "$XBPS_LIBC" = musl ]; then
nocol=yes
fi
make all dungeon \
CC="$CC" LINK="$CC" LFLAGS="$LDFLAGS" LEX=flex \
"${nocol:+COLCMD=cat}" \
HACKDIR="/var/games/nethack"
}
@ -42,7 +47,7 @@ do_install() {
GAMEPERM=0755 \
DIRPERM=0775 \
VARDIRPERM=0775 \
CHOWN=: CHGRP=: FLEX=lex
CHOWN=: CHGRP=: LEX=Flex
mv $DESTDIR/usr/lib/nethack/nhdat $DESTDIR/var/games/nethack
mv $DESTDIR/usr/lib/nethack/symbols $DESTDIR/var/games/nethack