From tlp@LiquidX.org  Tue Jan 27 10:54:05 2004
Return-Path: <tlp@LiquidX.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 5A47E16A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 27 Jan 2004 10:54:05 -0800 (PST)
Received: from mail.cableone.net (scanmail2.cableone.net [24.116.0.122])
	by mx1.FreeBSD.org (Postfix) with ESMTP id CFADB43D69
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 27 Jan 2004 10:53:42 -0800 (PST)
	(envelope-from tlp@LiquidX.org)
Received: from maya.liquidx.org (unverified [24.119.12.184]) 
	by smail2.cableone.net (SurgeMail 1.5d2) with ESMTP id 3626472 
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 27 Jan 2004 10:43:59 -0700
Message-Id: <20040127105154.018659b6.tlp@LiquidX.org>
Date: Tue, 27 Jan 2004 10:51:54 -0700
From: Travis Poppe <tlp@LiquidX.org>
To: FreeBSD-gnats-submit@freebsd.org
Subject: [MAINTAINER UPDATE] Port revision for wolf3d (fixes saves and such)

>Number:         62001
>Category:       ports
>Synopsis:       [MAINTAINER UPDATE] Port revision for wolf3d (fixes saves and such)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jan 27 11:00:37 PST 2004
>Closed-Date:    Wed Jan 28 20:53:57 CST 2004
>Last-Modified:  Wed Jan 28 20:53:57 CST 2004
>Originator:     Travis Poppe
>Release:        
>Organization:
>Environment:
>Description:
I re-wrote the wrapper script (wolf3d) to install (symlink) the data to the user's home directory (~/.wolf3d) the first time the script is executed.

It will then check to see if the data is installed (if ~/.wolf3d exists) the next time the script is executed. If it does indeed exist, the installation does not happen again, and it runs the program.

I also modified the COMMENT to be a bit more appropriate, and added a pkg-message alerting the user of possible home directory conflicts.

If anybody feels like my script could be written in a better manner, feel free to write one and submit it. 

:-)
>How-To-Repeat:
>Fix:
diff -ruN wolf3d/Makefile wolf3d-new/Makefile
--- wolf3d/Makefile	Thu Jan 15 15:50:37 2004
+++ wolf3d-new/Makefile	Tue Jan 27 10:45:11 2004
@@ -7,13 +7,14 @@
 
 PORTNAME=	wolf3d
 PORTVERSION=	20011028
+PORTREVISION=	1
 CATEGORIES=	games
 MASTER_SITES=	http://www.icculus.org/wolf3d/:wolf \
 		http://www.liquidx.org/distfiles/:wolfdata
 DISTFILES=	wolf3d-20011028.tar.gz:wolf wolfdata.tar.gz:wolfdata
 
 MAINTAINER=	tlp@liquidx.org
-COMMENT=	Wolfenstein 3D by Steven Fuller, based on 1992 id Software game
+COMMENT=	"Wolfenstein 3D Linux" by Steven Fuller (1992)
 
 USE_SDL=	yes
 USE_GZIP=	yes
@@ -42,5 +43,8 @@
 	${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}/README
 	${INSTALL_DATA} ${WRKSRC}/TODO ${DOCSDIR}/TODO
 .endif
+
+post-install:
+	@${CAT} ${PKGMESSAGE}
 
 .include <bsd.port.mk>
diff -ruN wolf3d/files/wolf3d.in wolf3d-new/files/wolf3d.in
--- wolf3d/files/wolf3d.in	Thu Jan 15 15:50:37 2004
+++ wolf3d-new/files/wolf3d.in	Tue Jan 27 10:39:32 2004
@@ -3,6 +3,33 @@
 #
 # 2004 Travis Poppe
 
+USERDIR=$HOME/.wolf3d
+
+if [ -x $USERDIR ]; then
+	echo "wolf3d appears to be installed to $USERDIR/"
+	echo ""
+	echo "Basic options:"
+	echo ""
+	echo "-nowait           Skips introduction"
+	echo "-nojoy            Disables joystick"
+	echo "-nomouse          Disables mouse"
+	echo "-x2               Increases screen size by x2"
+	echo "-x3               Increases screen size by x3"
+	echo "-fullscreen       Enables fullscreen mode"
+	echo "-demotest         Starts wolf3d in demonstration mode"
+	echo "-version          Reports game version"
+	echo ""
+
+	cd $USERDIR
+	./sdlwolf3d $*
+	exit
+fi
+
+mkdir $USERDIR
+ln -s %%PREFIX%%/libexec/wolf3d/* $USERDIR
+
+echo "Installed wolf3d to $USERDIR/"
+echo ""
 echo "Basic options:"
 echo ""
 echo "-nowait           Skips introduction"
@@ -14,5 +41,6 @@
 echo "-demotest         Starts wolf3d in demonstration mode"
 echo "-version          Reports game version"
 echo ""
-cd %%PREFIX%%/libexec/wolf3d
+
+cd $USERDIR
 ./sdlwolf3d $*
diff -ruN wolf3d/pkg-message wolf3d-new/pkg-message
--- wolf3d/pkg-message	Wed Dec 31 17:00:00 1969
+++ wolf3d-new/pkg-message	Tue Jan 27 10:44:40 2004
@@ -0,0 +1,8 @@
+-------------------------------------------------------------------------------
+This port's wrapper script will install the wolf3d data to your home directory
+the first time you run it. If for some odd reason you already have a directory
+called .wolf3d in your home directory, you must (re)move it before this port 
+will function correctly.
+
+-tlp
+-------------------------------------------------------------------------------
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: petef 
State-Changed-When: Wed Jan 28 20:53:56 CST 2004 
State-Changed-Why:  
Committed, thanks. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=62001 
>Unformatted:
