ports/107941: games/nethack34 - Add WITH_HPMON, cleanup removal of lib/nethack when savegames exist
Jeremy Chadwick
koitsu at FreeBSD.org
Mon Jan 15 08:00:47 UTC 2007
>Number: 107941
>Category: ports
>Synopsis: games/nethack34 - Add WITH_HPMON, cleanup removal of lib/nethack when savegames exist
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: maintainer-update
>Submitter-Id: current-users
>Arrival-Date: Mon Jan 15 08:00:47 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator: Jeremy Chadwick
>Release: FreeBSD 6.2-PRERELEASE i386
>Organization:
>Environment:
System: FreeBSD icarus.home.lan 6.2-PRERELEASE FreeBSD 6.2-PRERELEASE #0: Wed Dec 13 14:55:49 PST 2006 root at icarus.home.lan:/usr/obj/usr/src/sys/ICARUS i386
>Description:
Patch does the following:
* Add WITH_HPMON support (author: Ralph Churchill). This
colourises your hitpoints as they decrease. Official diff:
http://www.netsonic.fi/~walker/nh/hpmon.diff
* Addresses the situation where there's existing save games
(in PREFIX/lib/nethack/save). Prior to this patch, pkg_delete
or deinstalling would result in the "could not remove
PREFIX/lib/nethack" message.
This is now addressed by echo'ing some useful comments to the
user when failing to rmdir PREFIX/lib/nethack/save, and using
@dirrmtry on the PREFIX/lib/nethack directory.
CC'ing glewis so he can put a copy of hpmon.diff in his directory
on MASTER_SITE_LOCAL. (We can fix the PATCH_SITES after that's
done.)
>How-To-Repeat:
n/a
>Fix:
Apply below patch.
diff -ruN nethack34.orig/Makefile nethack34/Makefile
--- nethack34.orig/Makefile Sun Sep 3 04:10:40 2006
+++ nethack34/Makefile Sun Jan 14 22:53:34 2007
@@ -14,7 +14,7 @@
DISTNAME= ${PORTNAME}-${PORTVERSION:S/.//g}-src
EXTRACT_SUFX= .tgz
-MAINTAINER?= freebsd at jdc.parodius.com
+MAINTAINER?= koitsu at FreeBSD.org
COMMENT?= A dungeon explorin', slashin', hackin' game
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
@@ -50,6 +50,12 @@
${MASTER_SITE_LOCAL:S|%SUBDIR%|glewis|}
PATCH_DIST_STRIP= -p1
CFLAGS+= -DMENU_COLOR_REGEX_POSIX
+.endif
+.if defined(WITH_HPMON)
+PATCHFILES+= hpmon.diff
+PATCH_SITES+= http://www.netsonic.fi/~walker/nh/
+PATCH_DIST_STRIP= -p1
+CFLAGS+= -DHPMON
.endif
.elif ${PKGNAMESUFFIX} == "-qt"
USE_QT_VER= 3
diff -ruN nethack34.orig/distinfo nethack34/distinfo
--- nethack34.orig/distinfo Fri May 26 07:56:09 2006
+++ nethack34/distinfo Sun Jan 14 22:55:16 2007
@@ -4,3 +4,6 @@
MD5 (nh343-menucolor_jilles.diff) = 42e8c979c0ebe3e799c62056f86935bb
SHA256 (nh343-menucolor_jilles.diff) = 28ffb66cc901c74f6321a4537f07313363d35cf60a621d829a14d46c080f3913
SIZE (nh343-menucolor_jilles.diff) = 17914
+MD5 (hpmon.diff) = a8e5cab6a93100612d428f3973dc418f
+SHA256 (hpmon.diff) = d9369768f81f06e75b7349609bdff6fd9deff226452f04a89597190e4489074f
+SIZE (hpmon.diff) = 2041
diff -ruN nethack34.orig/pkg-plist nethack34/pkg-plist
--- nethack34.orig/pkg-plist Sat Jan 21 18:11:07 2006
+++ nethack34/pkg-plist Sun Jan 14 23:34:49 2007
@@ -5,7 +5,6 @@
@exec chmod -R 775 %D/%%HACKDIR%%
@exec chmod 2755 %D/%%HACKDIR%%/%%HACKNAME%%
@exec chown games:games %D/%%HACKDIR%%/save
- at dirrmtry %%HACKDIR%%/save
%%HACKDIR%%/Arc-fila.lev
%%HACKDIR%%/Arc-filb.lev
%%HACKDIR%%/Arc-goal.lev
@@ -144,6 +143,7 @@
@exec touch %D/%%HACKDIR%%/logfile && chmod 664 %D/%%HACKDIR%%/logfile
@unexec [ -s %D/%%HACKDIR%%/record ] || rm -f %D/%%HACKDIR%%/record
@exec touch %D/%%HACKDIR%%/record && chmod 664 %D/%%HACKDIR%%/record
- at dirrm %%HACKDIR%%
+ at unexec rmdir %D/%%HACKDIR%%/save >/dev/null 2>&1 || echo 'Nethack directory (%D/%%HACKDIR%%/) not removed due to existing save games. If you are permanently removing this port, you should do a ``rm -rf %D/%%HACKDIR%%``.' | fmt
+ at dirrmtry %%HACKDIR%%
%%PORTDOCS%%%%HACKDOCSDIR%%/Guidebook.txt
%%PORTDOCS%%@dirrm %%HACKDOCSDIR%%
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list