mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-14 07:43:06 +00:00
games/xnethack: fix wrong lua version
The game calls for lua 5.4, so USES=lua:54 when unbundling lua (PR #260224). While we are at it: - turn games/nethack-nox11 into flavor games/nethack@nox11 - simplify Makefile - remove archaic pkg-deinstall.in; it's function is superseeded by messages pkg-deinstall(8) prints on its own PR: 260224 Reported by: wesley.a.wroten@gmail.com
This commit is contained in:
parent
72b574cbae
commit
e8cf9c4daf
1
MOVED
1
MOVED
@ -16614,3 +16614,4 @@ www/bareos17-webui|www/bareos18-webui|2021-12-05|Has expired: Deprecated, no new
|
||||
math/eigen2||2021-12-07|Has expired: No longer available upstream, no consumers in ports
|
||||
emulators/qemu41||2021-12-10|Has expired: Use emulators/qemu or emulators/qemu-devel
|
||||
security/putty-gtk2||2021-12-15|Has expired: putty-gtk2 is being phased out
|
||||
games/xnethack-nox11|games/xnethack@nox11|2021-12-05|Turned into flavor
|
||||
|
@ -1101,7 +1101,6 @@
|
||||
SUBDIR += xmulti
|
||||
SUBDIR += xneko
|
||||
SUBDIR += xnethack
|
||||
SUBDIR += xnethack-nox11
|
||||
SUBDIR += xoct
|
||||
SUBDIR += xoids
|
||||
SUBDIR += xoj
|
||||
|
@ -1,7 +0,0 @@
|
||||
# Created by: Jeremy Chadwick <yoshi@parodius.com>
|
||||
|
||||
MASTERDIR= ${.CURDIR}/../xnethack
|
||||
|
||||
PKGNAMESUFFIX= -nox11
|
||||
|
||||
.include "${MASTERDIR}/Makefile"
|
@ -1,8 +1,7 @@
|
||||
# Created by: asami
|
||||
|
||||
PORTNAME= xNetHack
|
||||
DISTVERSIONPREFIX= xnh
|
||||
DISTVERSION= 6.1
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= games
|
||||
|
||||
MAINTAINER= fuz@fuz.su
|
||||
@ -13,60 +12,47 @@ LICENSE_NAME= NETHACK GENERAL PUBLIC LICENSE
|
||||
LICENSE_FILE= ${WRKSRC}/dat/license
|
||||
LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
|
||||
|
||||
USES= alias compiler:c11 gmake ncurses tar:tgz lua
|
||||
USE_GITHUB= yes
|
||||
FLAVORS= x11 nox11
|
||||
FLAVOR?= ${FLAVORS:[1]}
|
||||
nox11_PKGNAMESUFFIX= -nox11
|
||||
|
||||
USES= alias compiler:c11 gmake ncurses tar:tgz lua:54
|
||||
USE_GITHUB= yes
|
||||
GH_ACCOUNT= copperwater
|
||||
GH_PROJECT= xNetHack
|
||||
|
||||
MAKE_ENV= GRAPHICS="${GRAPHICS}"
|
||||
PLIST_SUB= HACKNAME="${HACKNAME}" \
|
||||
HACKEXT="${HACKEXT}"
|
||||
TRUEPORTNAME= xnethack
|
||||
PLIST_SUB= HACKNAME="${HACKNAME}"
|
||||
|
||||
# Configure these variables as you want them to be.
|
||||
HACKEXT?=
|
||||
HACKNAME?= ${TRUEPORTNAME}${HACKEXT}
|
||||
HACKNAME?= ${PORTNAME:tl}
|
||||
HACKDIR?= share/${HACKNAME}
|
||||
HACKLINK= ${TRUEPORTNAME}
|
||||
|
||||
DATADIR= ${PREFIX}/${HACKDIR}
|
||||
DOCSDIR= ${PREFIX}/share/doc/${HACKNAME}
|
||||
PKGDEINSTALL= ${WRKDIR}/pkg-deinstall
|
||||
|
||||
.if !defined(PKGNAMESUFFIX)
|
||||
.if ${FLAVOR} == "x11"
|
||||
USES+= xorg
|
||||
USE_XORG= xaw xpm xmu xext xt x11 sm ice
|
||||
CFLAGS+= -DX11_GRAPHICS -DUSE_TILES
|
||||
GRAPHICS= X11_GRAPHICS
|
||||
.else
|
||||
.if ${PKGNAMESUFFIX} == "-nox11"
|
||||
.elif ${FLAVOR} == "nox11"
|
||||
GRAPHICS= # none
|
||||
.endif
|
||||
.endif
|
||||
CFLAGS+= -DNOMAIL -DCURSES_GRAPHICS
|
||||
|
||||
OPTIONS_DEFINE= DOCS
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
.if !exists(${PREFIX}/bin/${HACKLINK}) && ${HACKNAME} != ${HACKLINK}
|
||||
PLIST_SUB+= HACKLINK=""
|
||||
.else
|
||||
PLIST_SUB+= HACKLINK="@comment "
|
||||
.endif
|
||||
|
||||
post-patch:
|
||||
.for f in include/config.h sys/unix/Makefile.doc sys/unix/Makefile.src sys/unix/Makefile.top
|
||||
@${REINPLACE_CMD} -e 's|%%HACKNAME%%|${HACKNAME}|g' \
|
||||
-e 's|%%HACKDIR%%|${PREFIX}/${HACKDIR}|g' \
|
||||
-e 's|%%HACKEXT%%|${HACKEXT}|g' \
|
||||
${WRKSRC}/${f}
|
||||
.endfor
|
||||
.for f in dlb.6 nethack.6 recover.6
|
||||
@${REINPLACE_CMD} -e 's|%%HACKNAME%%|${HACKNAME}|g' \
|
||||
-e 's|%%HACKDIR%%|${PREFIX}/${HACKDIR}|g' \
|
||||
-e 's|%%HACKEXT%%|${HACKEXT}|g' \
|
||||
${WRKSRC}/doc/${f}
|
||||
.endfor
|
||||
.if defined(WITHOUT_SHELL)
|
||||
@ -79,14 +65,9 @@ post-patch:
|
||||
do-configure:
|
||||
@cd ${WRKSRC}/sys/unix; ${SH} setup.sh
|
||||
|
||||
pre-install:
|
||||
@${CAT} ${FILESDIR}/pkg-deinstall.in | ${SED} \
|
||||
-e 's|%%HACKDIR%%|${HACKDIR}|g' > ${PKGDEINSTALL}
|
||||
|
||||
post-install:
|
||||
.if !exists(${PREFIX}/bin/${HACKLINK}) && ${HACKNAME} != ${HACKLINK}
|
||||
@${LN} -s -f ${PREFIX}/bin/${HACKNAME} ${STAGEDIR}${PREFIX}/bin/${HACKLINK}
|
||||
.endif
|
||||
${STRIP_CMD} ${STAGEDIR}${DATADIR}/recover
|
||||
${STRIP_CMD} ${STAGEDIR}${DATADIR}/${HACKNAME}
|
||||
@cd ${WRKSRC}/doc; ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_ARGS} manpages
|
||||
@${MKDIR} ${STAGEDIR}${DATADIR}/save
|
||||
@${CP} ${WRKSRC}/sys/unix/sysconf ${STAGEDIR}/${DATADIR}/sysconf
|
||||
|
@ -5,7 +5,7 @@
|
||||
.SH "SEE ALSO"
|
||||
.PP
|
||||
-nethack(6), tar(1)
|
||||
+xnethack%%HACKEXT%%(6), tar(1)
|
||||
+xnethack(6), tar(1)
|
||||
.SH BUGS
|
||||
.PP
|
||||
Not a good tar emulation; - does not mean stdin or stdout.
|
||||
|
@ -32,7 +32,7 @@
|
||||
.SH "SEE ALSO"
|
||||
.PP
|
||||
-recover(6)
|
||||
+recover%%HACKEXT%%(6)
|
||||
+recover(6)
|
||||
.SH BUGS
|
||||
.PP
|
||||
Probably infinite.
|
||||
|
@ -14,7 +14,7 @@
|
||||
will find them in the uncompressed form.
|
||||
.SH "SEE ALSO"
|
||||
-nethack(6)
|
||||
+xnethack%%HACKEXT%%(6)
|
||||
+xnethack(6)
|
||||
.SH BUGS
|
||||
.PP
|
||||
.I recover
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
-GAME = nethack
|
||||
-MANDIR = /usr/man/man6
|
||||
+GAME = xnethack%%HACKEXT%%
|
||||
+GAME = xnethack
|
||||
+MANDIR = ${PREFIX}/man/man6
|
||||
MANEXT = 6
|
||||
|
||||
@ -30,10 +30,10 @@
|
||||
- -$(RCVRMANCREATE) $(MANDIR)/recover.$(MANEXT)
|
||||
- -$(DLBMANCREATE) $(MANDIR)/dlb.$(MANEXT)
|
||||
- -$(MDMANCREATE) $(MANDIR)/makedefs.$(MANEXT)
|
||||
+ -$(GAMEMANCREATE) ${DESTDIR}$(MANDIR)/$(GAME)%%HACKEXT%%.$(MANEXT)
|
||||
+ -$(RCVRMANCREATE) ${DESTDIR}$(MANDIR)/recover%%HACKEXT%%.$(MANEXT)
|
||||
+ -$(DLBMANCREATE) ${DESTDIR}$(MANDIR)/dlb%%HACKEXT%%.$(MANEXT)
|
||||
+ -$(MDMANCREATE) ${DESTDIR}$(MANDIR)/makedefs%%HACKEXT%%.$(MANEXT)
|
||||
+ -$(GAMEMANCREATE) ${DESTDIR}$(MANDIR)/$(GAME).$(MANEXT)
|
||||
+ -$(RCVRMANCREATE) ${DESTDIR}$(MANDIR)/recover.$(MANEXT)
|
||||
+ -$(DLBMANCREATE) ${DESTDIR}$(MANDIR)/dlb.$(MANEXT)
|
||||
+ -$(MDMANCREATE) ${DESTDIR}$(MANDIR)/makedefs.$(MANEXT)
|
||||
|
||||
# manual creation for distribution
|
||||
DISTRIB = Guidebook.txt nethack.txt recover.txt \
|
||||
|
@ -105,7 +105,7 @@
|
||||
|
||||
# make NetHack
|
||||
-GAME = xnethack
|
||||
+GAME = xnethack%%HACKEXT%%
|
||||
+GAME = xnethack
|
||||
# GAME = nethack.prg
|
||||
GAMEBIN = $(GAME)
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
# make NetHack
|
||||
#PREFIX = /usr
|
||||
-GAME = xnethack
|
||||
+GAME = xnethack%%HACKEXT%%
|
||||
+GAME = xnethack
|
||||
# GAME = nethack.prg
|
||||
#GAMEUID = games
|
||||
-#GAMEGRP = bin
|
||||
|
@ -1,14 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ "${2}" = "POST-DEINSTALL" ]; then
|
||||
if [ -d "${PKG_PREFIX}/%%HACKDIR%%" ]; then
|
||||
echo
|
||||
echo "The ${1} save files have not been removed."
|
||||
echo
|
||||
echo "If you are deleting ${1} permanently then you can "
|
||||
echo "remove the save files with the command:"
|
||||
echo
|
||||
echo " rm -rf ${PKG_PREFIX}/%%HACKDIR%%"
|
||||
echo
|
||||
fi
|
||||
fi
|
@ -1,4 +1,3 @@
|
||||
%%HACKLINK%%bin/xnethack
|
||||
@mode 555
|
||||
bin/%%HACKNAME%%
|
||||
@owner games
|
||||
|
Loading…
Reference in New Issue
Block a user