aboutsummaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
authorGreg Lewis <glewis@FreeBSD.org>2015-12-27 23:05:19 +0000
committerGreg Lewis <glewis@FreeBSD.org>2015-12-27 23:05:19 +0000
commiteeda7dda1233953b600e9377452840896dc50cf7 (patch)
tree9bb7ab713eca85e47f14e42e2c3cbbc712485f27 /games
parent379ce5b3057362ee1506da73d5dd013d97f2753f (diff)
downloadports-eeda7dda1233953b600e9377452840896dc50cf7.tar.gz
ports-eeda7dda1233953b600e9377452840896dc50cf7.zip
Notes
Diffstat (limited to 'games')
-rw-r--r--games/nethack34/Makefile44
-rw-r--r--games/nethack34/files/patch-dgn_comp.611
-rw-r--r--games/nethack34/files/patch-dlb.611
-rw-r--r--games/nethack34/files/patch-lev_comp.611
-rw-r--r--games/nethack34/files/patch-nethack.638
-rw-r--r--games/nethack34/files/patch-recover.620
-rw-r--r--games/nethack34/files/patch-sys-unix-Makefile.doc12
-rw-r--r--games/nethack34/files/patch-sys-unix-Makefile.src20
-rw-r--r--games/nethack34/pkg-plist9
9 files changed, 148 insertions, 28 deletions
diff --git a/games/nethack34/Makefile b/games/nethack34/Makefile
index e5f25f2901b8..d2301abae86a 100644
--- a/games/nethack34/Makefile
+++ b/games/nethack34/Makefile
@@ -1,12 +1,12 @@
# Created by: asami
# $FreeBSD$
-PORTNAME= nethack
+PORTNAME= nethack34
PORTVERSION= 3.4.3
-PORTREVISION= 8
+PORTREVISION= 9
CATEGORIES= games
MASTER_SITES= SF
-DISTNAME= ${PORTNAME}-${PORTVERSION:S/.//g}-src
+DISTNAME= ${TRUEPORTNAME}-${PORTVERSION:S/.//g}-src
MAINTAINER= glewis@FreeBSD.org
COMMENT= Dungeon explorin', slashin', hackin' game
@@ -16,15 +16,20 @@ LICENSE_NAME= NETHACK GENERAL PUBLIC LICENSE
LICENSE_FILE= ${WRKSRC}/dat/license
LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
-WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
+WRKSRC= ${WRKDIR}/${TRUEPORTNAME}-${PORTVERSION}
USES= gmake tar:tgz
MAKE_ENV= GRAPHICS="${GRAPHICS}"
-PLIST_SUB= HACKNAME="${HACKNAME}"
+PLIST_SUB= HACKNAME="${HACKNAME}" \
+ HACKEXT="${HACKEXT}"
+MAKE_JOBS_UNSAFE= yes
+TRUEPORTNAME= nethack
# Configure these variables as you want them to be.
-HACKNAME?= nethack
+HACKEXT?= 34
+HACKNAME?= ${TRUEPORTNAME}${HACKEXT}
HACKDIR?= share/${HACKNAME}
+HACKLINK= ${TRUEPORTNAME}
DATADIR= ${PREFIX}/${HACKDIR}
DOCSDIR= ${PREFIX}/share/doc/${HACKNAME}
@@ -70,6 +75,14 @@ OPTIONS_DEFINE= DOCS
.include <bsd.port.pre.mk>
+.include <bsd.port.options.mk>
+
+.if !exists(${PREFIX}/bin/${HACKLINK}) && ${HACKNAME} != ${HACKLINK}
+PLIST_SUB+= HACKLINK=""
+.else
+PLIST_SUB+= HACKLINK="@comment "
+.endif
+
pre-everything::
@if [ "${PKGBASE}" != "nethack" ]; then \
${ECHO_MSG} "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" ; \
@@ -80,15 +93,23 @@ pre-everything::
${ECHO_MSG} "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" ; \
fi
-.include <bsd.port.options.mk>
-
post-patch:
-.for f in include/config.h sys/unix/Makefile.top
+ @${REINPLACE_CMD} -e \
+ 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/include/config.h
+ @${REINPLACE_CMD} -e \
+ 's|<malloc.h>|<stdlib.h>|g' ${WRKSRC}/win/Qt/qt_win.cpp
+.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
- @${REINPLACE_CMD} -e 's|<malloc.h>|<stdlib.h>|g' ${WRKSRC}/win/Qt/qt_win.cpp
+.for f in dgn_comp.6 dlb.6 lev_comp.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)
@${REINPLACE_CMD} -e 's|#define SHELL|/* #define SHELL|' ${WRKSRC}/include/unixconf.h
.endif
@@ -104,6 +125,9 @@ pre-install:
-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
@cd ${WRKSRC}/doc; ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_ARGS} manpages
@${MKDIR} ${STAGEDIR}${DATADIR}/save
.if ${PORT_OPTIONS:MDOCS}
diff --git a/games/nethack34/files/patch-dgn_comp.6 b/games/nethack34/files/patch-dgn_comp.6
new file mode 100644
index 000000000000..02ae84b6ff6b
--- /dev/null
+++ b/games/nethack34/files/patch-dgn_comp.6
@@ -0,0 +1,11 @@
+--- doc/dgn_comp.6.orig Mon Apr 12 09:28:09 2004
++++ doc/dgn_comp.6 Mon Apr 12 09:28:33 2004
+@@ -396,7 +396,7 @@
+ M. Stephenson (from the level compiler by Jean-Christophe Collet).
+ .SH "SEE ALSO"
+ .PP
+-lev_comp(6), nethack(6)
++lev_comp%%HACKEXT%%(6), %%HACKNAME%%(6)
+ .SH BUGS
+ .PP
+ Probably infinite.
diff --git a/games/nethack34/files/patch-dlb.6 b/games/nethack34/files/patch-dlb.6
new file mode 100644
index 000000000000..14d52abc9eb3
--- /dev/null
+++ b/games/nethack34/files/patch-dlb.6
@@ -0,0 +1,11 @@
+--- doc/dlb.6.orig Mon Apr 12 09:28:09 2004
++++ doc/dlb.6 Mon Apr 12 09:28:54 2004
+@@ -74,7 +74,7 @@
+ Kenneth Lorber
+ .SH "SEE ALSO"
+ .PP
+-nethack(6), tar(1)
++%%HACKNAME%%(6), tar(1)
+ .SH BUGS
+ .PP
+ Not a good tar emulation; - does not mean stdin or stdout.
diff --git a/games/nethack34/files/patch-lev_comp.6 b/games/nethack34/files/patch-lev_comp.6
new file mode 100644
index 000000000000..836e1f531c6f
--- /dev/null
+++ b/games/nethack34/files/patch-lev_comp.6
@@ -0,0 +1,11 @@
+--- doc/lev_comp.6.orig Mon Apr 12 09:28:09 2004
++++ doc/lev_comp.6 Mon Apr 12 09:29:20 2004
+@@ -563,7 +563,7 @@
+ Jean-Christophe Collet, David Cohrs.
+ .SH "SEE ALSO"
+ .PP
+-dgn_comp(6), nethack(6)
++dgn_comp%%HACKEXT%%(6), %%HACKNAME%%(6)
+ .SH BUGS
+ .PP
+ Probably infinite.
diff --git a/games/nethack34/files/patch-nethack.6 b/games/nethack34/files/patch-nethack.6
new file mode 100644
index 000000000000..10b07ea613a5
--- /dev/null
+++ b/games/nethack34/files/patch-nethack.6
@@ -0,0 +1,38 @@
+--- doc/nethack.6.orig 2003-12-07 15:39:13.000000000 -0800
++++ doc/nethack.6 2015-12-27 14:12:43.428436000 -0800
+@@ -5,7 +5,7 @@
+ .SH SYNOPSIS
+ .na
+ .hy 0
+-.B nethack
++.B %%HACKNAME%%
+ [
+ .B \-d
+ .I directory
+@@ -197,7 +197,7 @@
+ supplies a directory which is to serve as the playground.
+ It overrides the value from NETHACKDIR, HACKDIR,
+ or the directory specified by the game administrator during compilation
+-(usually /usr/games/lib/nethackdir).
++(usually %%HACKDIR%%).
+ This option is usually only useful to the game administrator.
+ The playground must contain several auxiliary files such as help files,
+ the list of top scorers, and a subdirectory
+@@ -222,7 +222,7 @@
+ distinction, as he may eventually release a new version of his own.
+ .SH FILES
+ .PP
+-All files are in the playground, normally /usr/games/lib/nethackdir.
++All files are in the playground, normally %%HACKDIR%%.
+ If DLB was defined during the compile, the data files and special levels
+ will be inside a larger file, normally nhdat, instead of being separate
+ files.
+@@ -295,7 +295,7 @@
+ In addition, SHOPTYPE is used in debugging (wizard) mode.
+ .SH "SEE ALSO"
+ .PP
+-dgn_comp(6), lev_comp(6), recover(6)
++dgn_comp%%HACKEXT%%(6), lev_comp%%HACKEXT%%(6), recover%%HACKEXT%%(6)
+ .SH BUGS
+ .PP
+ Probably infinite.
diff --git a/games/nethack34/files/patch-recover.6 b/games/nethack34/files/patch-recover.6
new file mode 100644
index 000000000000..9126718396bf
--- /dev/null
+++ b/games/nethack34/files/patch-recover.6
@@ -0,0 +1,20 @@
+--- doc/recover.6.orig Mon Apr 12 09:28:09 2004
++++ doc/recover.6 Mon Apr 12 09:31:27 2004
+@@ -31,7 +31,7 @@
+ supplies a directory which is the NetHack playground.
+ It overrides the value from NETHACKDIR, HACKDIR, or the directory
+ specified by the game administrator during compilation
+-(usually /usr/games/lib/nethackdir).
++(usually %%HACKDIR%%).
+ .PP
+ For recovery to be possible,
+ .I nethack
+@@ -103,7 +103,7 @@
+ .I nethack
+ will find them in the uncompressed form.
+ .SH "SEE ALSO"
+-nethack(6)
++%%HACKNAME%%(6)
+ .SH BUGS
+ .PP
+ .I recover
diff --git a/games/nethack34/files/patch-sys-unix-Makefile.doc b/games/nethack34/files/patch-sys-unix-Makefile.doc
index bb3bdb358d38..ca34bd9cf781 100644
--- a/games/nethack34/files/patch-sys-unix-Makefile.doc
+++ b/games/nethack34/files/patch-sys-unix-Makefile.doc
@@ -1,5 +1,5 @@
--- sys/unix/Makefile.doc.orig 2003-12-07 15:39:13.000000000 -0800
-+++ sys/unix/Makefile.doc 2014-06-28 23:05:31.000000000 -0700
++++ sys/unix/Makefile.doc 2015-12-27 14:11:19.343677000 -0800
@@ -41,15 +41,15 @@
@@ -31,11 +31,11 @@
- -$(DGNMANCREATE) $(MANDIR)/dgn_comp.$(MANEXT)
- -$(RCVRMANCREATE) $(MANDIR)/recover.$(MANEXT)
- -$(DLBMANCREATE) $(MANDIR)/dlb.$(MANEXT)
-+ -$(GAMEMANCREATE) ${DESTDIR}$(MANDIR)$(MANEXT)/$(GAME).$(MANEXT)
-+ -$(LEVMANCREATE) ${DESTDIR}$(MANDIR)$(MANEXT)/lev_comp.$(MANEXT)
-+ -$(DGNMANCREATE) ${DESTDIR}$(MANDIR)$(MANEXT)/dgn_comp.$(MANEXT)
-+ -$(RCVRMANCREATE) ${DESTDIR}$(MANDIR)$(MANEXT)/recover.$(MANEXT)
-+ -$(DLBMANCREATE) ${DESTDIR}$(MANDIR)$(MANEXT)/dlb.$(MANEXT)
++ -$(GAMEMANCREATE) ${DESTDIR}$(MANDIR)$(MANEXT)/%%HACKNAME%%.$(MANEXT)
++ -$(LEVMANCREATE) ${DESTDIR}$(MANDIR)$(MANEXT)/lev_comp%%HACKEXT%%.$(MANEXT)
++ -$(DGNMANCREATE) ${DESTDIR}$(MANDIR)$(MANEXT)/dgn_comp%%HACKEXT%%.$(MANEXT)
++ -$(RCVRMANCREATE) ${DESTDIR}$(MANDIR)$(MANEXT)/recover%%HACKEXT%%.$(MANEXT)
++ -$(DLBMANCREATE) ${DESTDIR}$(MANDIR)$(MANEXT)/dlb%%HACKEXT%%.$(MANEXT)
# manual creation for distribution
DISTRIB = Guidebook.txt nethack.txt lev_comp.txt dgn_comp.txt recover.txt dlb.txt
diff --git a/games/nethack34/files/patch-sys-unix-Makefile.src b/games/nethack34/files/patch-sys-unix-Makefile.src
index b66b31524228..e6298b7408c8 100644
--- a/games/nethack34/files/patch-sys-unix-Makefile.src
+++ b/games/nethack34/files/patch-sys-unix-Makefile.src
@@ -1,6 +1,5 @@
-diff -ruN sys.orig/unix/Makefile.src sys/unix/Makefile.src
---- sys.orig/unix/Makefile.src Sun Dec 7 15:39:13 2003
-+++ sys/unix/Makefile.src Wed Jun 30 08:27:32 2004
+--- sys/unix/Makefile.src.orig 2003-12-07 15:39:13.000000000 -0800
++++ sys/unix/Makefile.src 2015-12-27 14:18:55.720804000 -0800
@@ -146,19 +146,29 @@
# directories. The ones given below is the usual spot for linux systems.
# The paths are for glibconfig.h and gnomesupport.h respectively.
@@ -62,11 +61,7 @@ diff -ruN sys.orig/unix/Makefile.src sys/unix/Makefile.src
# on some systems the termcap library is in -ltermcap or -lcurses
# on 386 Xenix, the -ltermlib tputs() seems not to work; use -lcurses instead
-@@ -231,23 +260,23 @@
- # WINTTYLIB = -lcurses
- # WINTTYLIB = -lcurses16
- # WINTTYLIB = -lncurses
- WINTTYLIB = -ltermlib
+@@ -235,19 +264,19 @@
#
# libraries for X11
# If USE_XPM is defined in config.h, you will also need -lXpm here.
@@ -105,6 +100,15 @@ diff -ruN sys.orig/unix/Makefile.src sys/unix/Makefile.src
# any other strange libraries your system needs (for Sysunix only -- the more
# specialized targets should already be right)
+@@ -285,7 +323,7 @@
+ LIBS =
+
+ # make NetHack
+-GAME = nethack
++GAME = nethack%%HACKEXT%%
+ # GAME = nethack.prg
+
+ # if you defined RANDOM in unixconf.h/tosconf.h since your system did not come
@@ -461,13 +499,13 @@
# Qt windowport meta-object-compiler output
diff --git a/games/nethack34/pkg-plist b/games/nethack34/pkg-plist
index 1f96aebdf0ec..89ba9ffddfb4 100644
--- a/games/nethack34/pkg-plist
+++ b/games/nethack34/pkg-plist
@@ -1,3 +1,4 @@
+%%HACKLINK%%bin/nethack
@mode 555
bin/%%HACKNAME%%
@owner games
@@ -148,11 +149,11 @@ bin/%%HACKNAME%%
@mode
@owner
@group
-man/man6/dgn_comp.6.gz
-man/man6/dlb.6.gz
-man/man6/lev_comp.6.gz
+man/man6/dgn_comp%%HACKEXT%%.6.gz
+man/man6/dlb%%HACKEXT%%.6.gz
+man/man6/lev_comp%%HACKEXT%%.6.gz
man/man6/%%HACKNAME%%.6.gz
-man/man6/recover.6.gz
+man/man6/recover%%HACKEXT%%.6.gz
%%PORTDOCS%%%%DOCSDIR%%/Guidebook.txt
@dir(games,games,0775) %%DATADIR%%/save
@dir(games,games,0775) %%DATADIR%%