Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 27 Dec 2015 23:05:19 +0000 (UTC)
From:      Greg Lewis <glewis@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r404605 - in head: . games/nethack34 games/nethack34/files
Message-ID:  <201512272305.tBRN5JZ5034786@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: glewis
Date: Sun Dec 27 23:05:19 2015
New Revision: 404605
URL: https://svnweb.freebsd.org/changeset/ports/404605

Log:
  . Modify the nethack34 port to install itself in a versionsed fashion to
    make way for a port of NetHack 3.6.0.
  . Add a note to updating on how to preserve save and bones files.
  
  PR:		205255
  Submitted by:	groot@kde.org (partially)

Added:
  head/games/nethack34/files/patch-dgn_comp.6   (contents, props changed)
  head/games/nethack34/files/patch-dlb.6   (contents, props changed)
  head/games/nethack34/files/patch-lev_comp.6   (contents, props changed)
  head/games/nethack34/files/patch-nethack.6   (contents, props changed)
  head/games/nethack34/files/patch-recover.6   (contents, props changed)
Modified:
  head/UPDATING
  head/games/nethack34/Makefile
  head/games/nethack34/files/patch-sys-unix-Makefile.doc
  head/games/nethack34/files/patch-sys-unix-Makefile.src
  head/games/nethack34/pkg-plist

Modified: head/UPDATING
==============================================================================
--- head/UPDATING	Sun Dec 27 22:31:46 2015	(r404604)
+++ head/UPDATING	Sun Dec 27 23:05:19 2015	(r404605)
@@ -5,6 +5,22 @@ they are unavoidable.
 You should get into the habit of checking this file for changes each time
 you update your ports collection, before attempting any port upgrades.
 
+20151227:
+  AFFECTS: users of games/nethack34
+  AUTHOR: glewis@FreeBSD.org
+
+  The port name and installation location of games/nethack34 have changed
+  to allow for a port of NetHack 3.6.0.  To preserve your save and bones
+  files do the following after updating:
+
+    # sudo cp -p ${LOCALBASE}/share/nethack/save/* ${LOCALBASE}/share/nethack34/save/
+    # sudo cp -p ${LOCALBASE}/share/nethack/bon* ${LOCALBASE}/share/nethack34/
+
+  After verifying the files were copied correctly, remove the playground
+  directory (as these files are incompatible with NetHack 3.6.0).
+
+    # sudo rm -r ${LOCALBASE}/share/nethack
+
 20151219:
   AFFECTS: users of net/samba4, net/samba41
   AUTHOR: timur@FreeBSD.org

Modified: head/games/nethack34/Makefile
==============================================================================
--- head/games/nethack34/Makefile	Sun Dec 27 22:31:46 2015	(r404604)
+++ head/games/nethack34/Makefile	Sun Dec 27 23:05:19 2015	(r404605)
@@ -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 LIC
 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}

Added: head/games/nethack34/files/patch-dgn_comp.6
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/nethack34/files/patch-dgn_comp.6	Sun Dec 27 23:05:19 2015	(r404605)
@@ -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.

Added: head/games/nethack34/files/patch-dlb.6
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/nethack34/files/patch-dlb.6	Sun Dec 27 23:05:19 2015	(r404605)
@@ -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.

Added: head/games/nethack34/files/patch-lev_comp.6
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/nethack34/files/patch-lev_comp.6	Sun Dec 27 23:05:19 2015	(r404605)
@@ -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.

Added: head/games/nethack34/files/patch-nethack.6
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/nethack34/files/patch-nethack.6	Sun Dec 27 23:05:19 2015	(r404605)
@@ -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.

Added: head/games/nethack34/files/patch-recover.6
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/nethack34/files/patch-recover.6	Sun Dec 27 23:05:19 2015	(r404605)
@@ -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

Modified: head/games/nethack34/files/patch-sys-unix-Makefile.doc
==============================================================================
--- head/games/nethack34/files/patch-sys-unix-Makefile.doc	Sun Dec 27 22:31:46 2015	(r404604)
+++ head/games/nethack34/files/patch-sys-unix-Makefile.doc	Sun Dec 27 23:05:19 2015	(r404605)
@@ -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

Modified: head/games/nethack34/files/patch-sys-unix-Makefile.src
==============================================================================
--- head/games/nethack34/files/patch-sys-unix-Makefile.src	Sun Dec 27 22:31:46 2015	(r404604)
+++ head/games/nethack34/files/patch-sys-unix-Makefile.src	Sun Dec 27 23:05:19 2015	(r404605)
@@ -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
  
  # 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
  
  # 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

Modified: head/games/nethack34/pkg-plist
==============================================================================
--- head/games/nethack34/pkg-plist	Sun Dec 27 22:31:46 2015	(r404604)
+++ head/games/nethack34/pkg-plist	Sun Dec 27 23:05:19 2015	(r404605)
@@ -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%%



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201512272305.tBRN5JZ5034786>