From bernd@heitec.net  Mon Feb 19 20:11:46 2001
Return-Path: <bernd@heitec.net>
Received: from heitec.net (paladin.heitec.net [193.101.232.30])
	by hub.freebsd.org (Postfix) with ESMTP id 0264C37B4EC
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 19 Feb 2001 20:11:45 -0800 (PST)
Received: (from bernd@localhost)
	by  heitec.net (8.11.2/8.11.2) id f1K4BgB78393;
	Tue, 20 Feb 2001 05:11:42 +0100 (CET)
	(envelope-from bernd)
Message-Id: <200102200411.f1K4BgB78393@ heitec.net>
Date: Tue, 20 Feb 2001 05:11:42 +0100 (CET)
From: bdluevel@heitec.net
Reply-To: bdluevel@heitec.net
To: FreeBSD-gnats-submit@freebsd.org
Subject: new port: "hunt" game from 4.4BSD-Lite2
X-Send-Pr-Version: 3.2

>Number:         25221
>Category:       ports
>Synopsis:       new port: "hunt" game from 4.4BSD-Lite2
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Feb 19 20:20:01 PST 2001
>Closed-Date:    Sat Mar 24 22:33:48 PST 2001
>Last-Modified:  Sat Mar 24 22:37:19 PST 2001
>Originator:     Bernd Luevelsmeyer
>Release:        FreeBSD 4.2-STABLE i386
>Organization:
>Environment:

	FreeBSD 4.2-Stable

>Description:

	I ported the "hunt" console game. It's my first port, so
    I'd like to have it reviewed quite closely.
    Points I'm not sure about are:
    a) What's with 4.4BSD-Lite2 copyright?
    b) May the port be packaged and/or on CD, which would involve
       distributing the sources? Should NO_CDROM and/or NO_PACKAGE
       be set?
    c) When compiling, the sources raise lots of warnings because
       the sources are pre-ANSI C; should there be more and bigger
       patches to clean this up?
    d) I switched off the "otto" feature which didn't compile,
       and disabled the "faketalk" because it involves silently
       sending mail to a list which probably doesn't exist. Should
       these be enabled/debugged?
    e) The sources are not in packed form on ftp.pvv.ntnu.no, so I'm
       fetching the sources one-by-one, and there's an awkward
       extracting mechanism in the Makefile. Is that acceptable? Using
       a proper distfile would of course be more elegant and also
       a lot faster; but then, copies of the sources would have
       to be stored somewhere.

>How-To-Repeat:

>Fix:


# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	games/hunt
#	games/hunt/files
#	games/hunt/files/patch-aa
#	games/hunt/files/patch-ab
#	games/hunt/distinfo
#	games/hunt/Makefile
#	games/hunt/pkg-comment
#	games/hunt/pkg-descr
#	games/hunt/pkg-plist
#
echo c - games/hunt
mkdir -p games/hunt > /dev/null 2>&1
echo c - games/hunt/files
mkdir -p games/hunt/files > /dev/null 2>&1
echo x - games/hunt/files/patch-aa
sed 's/^X//' >games/hunt/files/patch-aa << 'END-of-games/hunt/files/patch-aa'
X--- Makefile.orig	Fri Jun 18 03:26:23 1993
X+++ Makefile	Mon Jun 26 03:21:22 2000
X@@ -17,8 +17,9 @@
X 
X #
X # Installation destinations
X+# (with FreeBSD patches, unused except LIBDIR for pathname.o)
X BINDIR=		/usr/games
X-LIBDIR=		/usr/libexec
X+LIBDIR=		$(PREFIX)/bin
X MANDIR=		/usr/contrib/man/cat6
X 
X #
X@@ -33,8 +34,8 @@
X #	BOOTS	Include boots (which makes you immune to slime)
X #	OTTO	Reserved for CGL automatic player
X #
X-GAME_PARAM=	-DRANDOM -DREFLECT -DMONITOR -DOOZE -DFLY -DVOLCANO -DBOOTS \
X-		-DOTTO
X+# (FreeBSD patches deleted -DOTTO because otto.c doesn't compile)
X+GAME_PARAM=	-DRANDOM -DREFLECT -DMONITOR -DOOZE -DFLY -DVOLCANO -DBOOTS
X 
X #
X # System parameter flags are:
X@@ -66,6 +67,11 @@
X DEFS_SGI=	-DINTERNET -DLOG -DBSD_RELEASE=43 -DTERMINFO -DSIGNAL_TYPE=void
X DEFS_NEXT=	$(DEFS_43) -bsd -traditional -Dconst= -DSIGNAL_TYPE=int
X DEFS_OSF1=	-DINTERNET -DLOG -DBSD_RELEASE=43 -DSIGNAL_TYPE=void -D_BSD
X+#
X+# FreeBSD patches add this target and use it for DEFS
X+# /etc/terminfo is there, and the faketalk feature is switched
X+# off (deprecated)
X+DEFS_FREEBSD= $(DEFS_BSD44) -DTERMINFO -DTALK_DISABLE
X 
X #
X # The following flags are used for system specific compilation arguments.
X@@ -80,8 +86,10 @@
X #
X # Generic definitions
X #
X-DEFS=		$(GAME_PARAM) $(DEFS_BSD44)
X-CFLAGS=		-O2 $(SYSCFLAGS) $(DEFS)
X+DEFS=		$(GAME_PARAM) $(DEFS_FREEBSD)
X+# FreeBSD patches change the CFLAGS definition to include the
X+# user's definition, instead of overwriting it
X+CFLAGS+=		$(SYSCFLAGS) $(DEFS)
X 
X #
X # Normal targets
X@@ -129,14 +137,13 @@
X 
X #
X # System installation
X+# (modified by FreeBSD patches)
X #
X install:
X-	install -s -o bin -g bin -m 555 huntd ${LIBDIR}/huntd
X-	install -s -o bin -g bin -m 555 hunt ${BINDIR}/hunt
X-	nroff -man hunt.6 > ${MANDIR}/hunt.0
X-	nroff -man huntd.6 > ${MANDIR}/huntd.0
X-	chown bin.bin ${MANDIR}/hunt.0 ${MANDIR}/huntd.0
X-	chmod 444 ${MANDIR}/hunt.0 ${MANDIR}/huntd.0
X+	$(BSD_INSTALL_PROGRAM) hunt $(PREFIX)/bin/hunt
X+	$(BSD_INSTALL_MAN) hunt.6 $(PREFIX)/man/man6/hunt.6
X+	$(BSD_INSTALL_PROGRAM) huntd $(PREFIX)/bin/huntd
X+	$(BSD_INSTALL_MAN) huntd.6 $(PREFIX)/man/man6/huntd.6
X 
X #
X # Object file dependencies
END-of-games/hunt/files/patch-aa
echo x - games/hunt/files/patch-ab
sed 's/^X//' >games/hunt/files/patch-ab << 'END-of-games/hunt/files/patch-ab'
X--- faketalk.c.orig	Sat May 22 09:32:43 1993
X+++ faketalk.c	Mon Jun 26 03:16:18 2000
X@@ -10,7 +10,7 @@
X 
X #include "bsd.h"
X 
X-#if	defined(TALK_43) || defined(TALK_42)
X+#if	!defined(TALK_DISABLE) && (defined(TALK_43) || defined(TALK_42))
X 
X # include	<stdio.h>
X # include	<string.h>
END-of-games/hunt/files/patch-ab
echo x - games/hunt/distinfo
sed 's/^X//' >games/hunt/distinfo << 'END-of-games/hunt/distinfo'
XMD5 (hunt-1.0/Makefile) = 0482c865b5c03f040eab976ee76a5fe9
XMD5 (hunt-1.0/README) = 9b9bd4f2a083e22051c92cab35dbc18c
XMD5 (hunt-1.0/answer.c) = bfaa2e334dfa83befdee0910da1623ec
XMD5 (hunt-1.0/bsd.h) = a816518eb64898248b88a2ecefe53890
XMD5 (hunt-1.0/connect.c) = 67605908d437a80a5f38ad1d9db4de4b
XMD5 (hunt-1.0/ctl.c) = 94f7f4c811cec70ddd73a1437b04484a
XMD5 (hunt-1.0/ctl_transact.c) = ac0408a9686bd0113ce30372ffbf3f42
XMD5 (hunt-1.0/draw.c) = 88eaf4fec9cb6751eda30ae8c629791c
XMD5 (hunt-1.0/driver.c) = 6a012eeaa992cff46e5d270b12fc24ee
XMD5 (hunt-1.0/execute.c) = 878c42a3347a4ef80a717cd3dd30f25f
XMD5 (hunt-1.0/expl.c) = a29667ad3d7548e4f0f2c74f43442809
XMD5 (hunt-1.0/extern.c) = 9fba77476ad3f809dc7dbb9b2b7e94dc
XMD5 (hunt-1.0/faketalk.c) = 71875aeecff85c7d8dfdc88855ce3228
XMD5 (hunt-1.0/get_names.c) = 18ad83182842b65896bc1b61d9846065
XMD5 (hunt-1.0/hunt.6) = a9582ec0fa023ab70dc8f9d9bcd5b2bd
XMD5 (hunt-1.0/hunt.c) = aed7a91ce956bcfdb5703a81ffed8813
XMD5 (hunt-1.0/hunt.h) = 9f0a9ea6cbad1ae42fb32c52be1160c1
XMD5 (hunt-1.0/huntd.6) = 0553c85d2b574c4707cd5eb5cd49b8d4
XMD5 (hunt-1.0/makemaze.c) = 1874278fb87c554b8f12690622ccce40
XMD5 (hunt-1.0/otto.c) = 459529b0a5429fc9957e91de7a6b737f
XMD5 (hunt-1.0/pathname.c) = 32f0e3ba9cb5da5d06eba30d5112133c
XMD5 (hunt-1.0/playit.c) = 64c846b00fd5f527402303c813c38dfb
XMD5 (hunt-1.0/shots.c) = 48657a7034f507a28fd0698cce798701
XMD5 (hunt-1.0/talk_ctl.h) = 75e4ca499ff0af049e6f9064cde83c8e
XMD5 (hunt-1.0/terminal.c) = 491d5fbdcb8558c2c3ba731f4f451fa5
END-of-games/hunt/distinfo
echo x - games/hunt/Makefile
sed 's/^X//' >games/hunt/Makefile << 'END-of-games/hunt/Makefile'
X# New ports collection makefile for:   hunt
X# Date created:        2001-02-20
X# Whom:                bdluevel@heitec.net
X#
X# $FreeBSD$
X#
X
X# the files are not packed at the master site,
X# so they must be retrieved one by one
X
XPORTNAME=      hunt
XPORTVERSION=   1.0
XCATEGORIES=    games
XMASTER_SITES=  ftp://ftp.pvv.ntnu.no/.disk4a/4.4BSD-Lite2/untarred/usr/src/contrib/hunt/
XDISTFILES=  Makefile        \
X			README          \
X			answer.c        \
X			bsd.h           \
X			connect.c       \
X			ctl.c           \
X			ctl_transact.c  \
X			draw.c          \
X			driver.c        \
X			execute.c       \
X			expl.c          \
X			extern.c        \
X			faketalk.c      \
X			get_names.c     \
X			hunt.6          \
X			hunt.c          \
X			hunt.h          \
X			huntd.6         \
X			makemaze.c      \
X			otto.c          \
X			pathname.c      \
X			playit.c        \
X			shots.c         \
X			talk_ctl.h      \
X			terminal.c
X
XMAINTAINER=    bdluevel@heitec.net
X
XDIST_SUBDIR=$(PORTNAME)-$(PORTVERSION)
X
XEXTRACT_CMD= $(CP)
XEXTRACT_BEFORE_ARGS=
XEXTRACT_AFTER_ARGS= $(DIST_SUBDIR)
X
XMAN6=          hunt.6 huntd.6
X
Xdo-extract :
X	@$(RM) -rf $(WRKDIR)
X	@$(MKDIR) -p $(WRKDIR)/$(DIST_SUBDIR)
X	@for file in ${EXTRACT_ONLY}; do \
X		if ! (cd $(WRKDIR) && ${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${_DISTDIR}/$$file ${EXTRACT_AFTER_ARGS});\
X		then \
X			exit 1; \
X		fi \
X	done
X.if !defined(EXTRACT_PRESERVE_OWNERSHIP)
X	@if [ `id -u` = 0 ]; then \
X		${CHMOD} -R ug-s ${WRKDIR}; \
X		${CHOWN} -R 0:0 ${WRKDIR}; \
X	fi
X.endif
X
X.include <bsd.port.mk>
END-of-games/hunt/Makefile
echo x - games/hunt/pkg-comment
sed 's/^X//' >games/hunt/pkg-comment << 'END-of-games/hunt/pkg-comment'
XRogue-like multiplayer game
END-of-games/hunt/pkg-comment
echo x - games/hunt/pkg-descr
sed 's/^X//' >games/hunt/pkg-descr << 'END-of-games/hunt/pkg-descr'
XHunt is a mixture of 'rogue' and 'Doom': It is a multiplayer
Xshoot-and-run game, but in a textbased console.
XFound at:
Xftp://ftp.pvv.ntnu.no/.disk4a/4.4BSD-Lite2/untarred/usr/src/contrib/hunt
X
XFreeBSD port made by bdluevel@heitec.net
END-of-games/hunt/pkg-descr
echo x - games/hunt/pkg-plist
sed 's/^X//' >games/hunt/pkg-plist << 'END-of-games/hunt/pkg-plist'
Xbin/hunt
Xbin/huntd
END-of-games/hunt/pkg-plist
exit


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: will 
State-Changed-When: Sat Mar 24 22:33:48 PST 2001 
State-Changed-Why:  
I changed a few behaviors and made it work.  I changed the name of the port 
to 44bsd-hunt to make sure people understood that it is from 4.4BSD, and by 
convention.  Also changed filenames of patchfiles for clarity.  EXTRACT_* 
really isn't appropriate for this kind of thing, so just write our own.  BTW, 
no other port does checking on ownership etc. so it is pointless to do it here. 
And also, if files pass checksum, no need to check to see if they make it to 
${WRKSRC}. 

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