aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Clausecker <fuz@fuz.su>2021-12-05 12:20:45 +0000
committerMikael Urankar <mikael@FreeBSD.org>2021-12-16 20:06:31 +0000
commite8cf9c4dafb78dbcd0e3c88e67fc1e626afea44e (patch)
tree5bd5c5da9ee7f0f65316ed81b76b36da2f45d9a1
parent72b574cbae01ee81e886e2c21a950e3cd2895e4d (diff)
downloadports-e8cf9c4dafb78dbcd0e3c88e67fc1e626afea44e.tar.gz
ports-e8cf9c4dafb78dbcd0e3c88e67fc1e626afea44e.zip
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
-rw-r--r--MOVED1
-rw-r--r--games/Makefile1
-rw-r--r--games/xnethack-nox11/Makefile7
-rw-r--r--games/xnethack/Makefile43
-rw-r--r--games/xnethack/files/patch-doc_dlb.62
-rw-r--r--games/xnethack/files/patch-doc_nethack.62
-rw-r--r--games/xnethack/files/patch-doc_recover.62
-rw-r--r--games/xnethack/files/patch-sys-unix-Makefile.doc10
-rw-r--r--games/xnethack/files/patch-sys-unix-Makefile.src2
-rw-r--r--games/xnethack/files/patch-sys-unix-Makefile.top2
-rw-r--r--games/xnethack/files/pkg-deinstall.in14
-rw-r--r--games/xnethack/pkg-plist1
12 files changed, 23 insertions, 64 deletions
diff --git a/MOVED b/MOVED
index 1b56f4da858a..0575d9b04b45 100644
--- a/MOVED
+++ b/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
diff --git a/games/Makefile b/games/Makefile
index 9a2418da73fb..de9804cbe34b 100644
--- a/games/Makefile
+++ b/games/Makefile
@@ -1101,7 +1101,6 @@
SUBDIR += xmulti
SUBDIR += xneko
SUBDIR += xnethack
- SUBDIR += xnethack-nox11
SUBDIR += xoct
SUBDIR += xoids
SUBDIR += xoj
diff --git a/games/xnethack-nox11/Makefile b/games/xnethack-nox11/Makefile
deleted file mode 100644
index faba98afde3d..000000000000
--- a/games/xnethack-nox11/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-# Created by: Jeremy Chadwick <yoshi@parodius.com>
-
-MASTERDIR= ${.CURDIR}/../xnethack
-
-PKGNAMESUFFIX= -nox11
-
-.include "${MASTERDIR}/Makefile"
diff --git a/games/xnethack/Makefile b/games/xnethack/Makefile
index 6147cdf98c8f..ca1993103cf3 100644
--- a/games/xnethack/Makefile
+++ b/games/xnethack/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
diff --git a/games/xnethack/files/patch-doc_dlb.6 b/games/xnethack/files/patch-doc_dlb.6
index 942fb1fdf506..ee45582bb8a7 100644
--- a/games/xnethack/files/patch-doc_dlb.6
+++ b/games/xnethack/files/patch-doc_dlb.6
@@ -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.
diff --git a/games/xnethack/files/patch-doc_nethack.6 b/games/xnethack/files/patch-doc_nethack.6
index 6040c8d826c9..179b1c2e1bce 100644
--- a/games/xnethack/files/patch-doc_nethack.6
+++ b/games/xnethack/files/patch-doc_nethack.6
@@ -32,7 +32,7 @@
.SH "SEE ALSO"
.PP
-recover(6)
-+recover%%HACKEXT%%(6)
++recover(6)
.SH BUGS
.PP
Probably infinite.
diff --git a/games/xnethack/files/patch-doc_recover.6 b/games/xnethack/files/patch-doc_recover.6
index 2ee7bb286566..06d36363e29a 100644
--- a/games/xnethack/files/patch-doc_recover.6
+++ b/games/xnethack/files/patch-doc_recover.6
@@ -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
diff --git a/games/xnethack/files/patch-sys-unix-Makefile.doc b/games/xnethack/files/patch-sys-unix-Makefile.doc
index fecd35c0dda4..d9d793b86507 100644
--- a/games/xnethack/files/patch-sys-unix-Makefile.doc
+++ b/games/xnethack/files/patch-sys-unix-Makefile.doc
@@ -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 \
diff --git a/games/xnethack/files/patch-sys-unix-Makefile.src b/games/xnethack/files/patch-sys-unix-Makefile.src
index bcf8a95aaf6f..306cfd00fab6 100644
--- a/games/xnethack/files/patch-sys-unix-Makefile.src
+++ b/games/xnethack/files/patch-sys-unix-Makefile.src
@@ -105,7 +105,7 @@
# make NetHack
-GAME = xnethack
-+GAME = xnethack%%HACKEXT%%
++GAME = xnethack
# GAME = nethack.prg
GAMEBIN = $(GAME)
diff --git a/games/xnethack/files/patch-sys-unix-Makefile.top b/games/xnethack/files/patch-sys-unix-Makefile.top
index 44a4ffef3d57..7dd119a0717f 100644
--- a/games/xnethack/files/patch-sys-unix-Makefile.top
+++ b/games/xnethack/files/patch-sys-unix-Makefile.top
@@ -5,7 +5,7 @@
# make NetHack
#PREFIX = /usr
-GAME = xnethack
-+GAME = xnethack%%HACKEXT%%
++GAME = xnethack
# GAME = nethack.prg
#GAMEUID = games
-#GAMEGRP = bin
diff --git a/games/xnethack/files/pkg-deinstall.in b/games/xnethack/files/pkg-deinstall.in
deleted file mode 100644
index 04e356acdf02..000000000000
--- a/games/xnethack/files/pkg-deinstall.in
+++ /dev/null
@@ -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
diff --git a/games/xnethack/pkg-plist b/games/xnethack/pkg-plist
index 5733415fcb2e..4cc6d9988bd1 100644
--- a/games/xnethack/pkg-plist
+++ b/games/xnethack/pkg-plist
@@ -1,4 +1,3 @@
-%%HACKLINK%%bin/xnethack
@mode 555
bin/%%HACKNAME%%
@owner games