From owner-freebsd-ports-bugs@FreeBSD.ORG Mon Jan 15 08:00:47 2007 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AAE1D16A40F for ; Mon, 15 Jan 2007 08:00:47 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.freebsd.org (Postfix) with ESMTP id 8A97613C467 for ; Mon, 15 Jan 2007 08:00:47 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id l0F80l5E017742 for ; Mon, 15 Jan 2007 08:00:47 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id l0F80lhG017741; Mon, 15 Jan 2007 08:00:47 GMT (envelope-from gnats) Resent-Date: Mon, 15 Jan 2007 08:00:47 GMT Resent-Message-Id: <200701150800.l0F80lhG017741@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Jeremy Chadwick Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6EDEB16A407 for ; Mon, 15 Jan 2007 07:59:47 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from alnrmhc11.comcast.net (alnrmhc11.comcast.net [206.18.177.51]) by mx1.freebsd.org (Postfix) with ESMTP id 3D60F13C455 for ; Mon, 15 Jan 2007 07:59:47 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from icarus.home.lan (c-71-198-0-135.hsd1.ca.comcast.net[71.198.0.135]) by comcast.net (alnrmhc11) with ESMTP id <20070115075946b110049m5le>; Mon, 15 Jan 2007 07:59:46 +0000 Received: by icarus.home.lan (Postfix, from userid 1000) id 112AC1FA037; Sun, 14 Jan 2007 23:59:46 -0800 (PST) Message-Id: <20070115075946.112AC1FA037@icarus.home.lan> Date: Sun, 14 Jan 2007 23:59:46 -0800 (PST) From: Jeremy Chadwick To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: glewis@FreeBSD.org Subject: ports/107941: games/nethack34 - Add WITH_HPMON, cleanup removal of lib/nethack when savegames exist X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Jeremy Chadwick List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Jan 2007 08:00:47 -0000 >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@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@jdc.parodius.com +MAINTAINER?= koitsu@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 -@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 -@dirrm %%HACKDIR%% +@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 +@dirrmtry %%HACKDIR%% %%PORTDOCS%%%%HACKDOCSDIR%%/Guidebook.txt %%PORTDOCS%%@dirrm %%HACKDOCSDIR%% >Release-Note: >Audit-Trail: >Unformatted: