ports/140478: [MAINTAINER] games/bsdgames repo-copy from games/freebsd-games, update to DragonflyBSD 2.4 sources
Ulrich Spoerlein
uqs at spoerlein.net
Wed Nov 11 17:50:03 UTC 2009
>Number: 140478
>Category: ports
>Synopsis: [MAINTAINER] games/bsdgames repo-copy from games/freebsd-games, update to DragonflyBSD 2.4 sources
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: update
>Submitter-Id: current-users
>Arrival-Date: Wed Nov 11 17:50:02 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator: Ulrich Spoerlein
>Release: FreeBSD 8.0-RC2 amd64
>Organization:
>Environment:
System: FreeBSD elmar.spoerlein.net 8.0-RC2 FreeBSD 8.0-RC2 #6 r198877M: Wed Nov 4 10:40:23
>Description:
Okay, a lot of things for this PR.
1. First, I'd like to request a repo-copy from games/freebsd-games to games/bsdgames
(a name shared with Debian and Slackware, though the latter use bsd-games)
2. The attached diff then brings the port up to the fairly recent Dragonfly BSD sources,
where a lot of cleanups have been done. All previous patches have been included upstream.
(NB: no old files/patch-* files must survive, somehow they don't show up in the diff below)
3. Updates my mail-address, while here
4. Please, if possible provide a local MASTER_SITE within the FreeBSD cluster, like before.
5. After the new port has been updated, connect it, disconnect the old, add the following line to MOVED
-> games/freebsd-games|games/bsdgames|2009-11-11|Superseded by and equivalent to freebsd-games
Many thanks, please get in touch if there are any questions.
Added files:
- files/patch-Makefile
- files/patch-Makefile.inc
- files/patch-dfly
- files/patch-hack
- files/patch-warns
- files/share.mtree
- files/var.mtree
Removed files:
- files/patch-adventure_crc.c
- files/patch-adventure_hdr.h
- files/patch-atc_Makefile
- files/patch-atc_include.h
- files/patch-atc_input.c
- files/patch-atc_main.c
- files/patch-backgammon_backgammon_main.c
- files/patch-backgammon_common__source_back.h
- files/patch-backgammon_common__source_subs.c
- files/patch-backgammon_teachgammon_teach.c
- files/patch-battlestar_init.c
- files/patch-hack_Makefile
- files/patch-hack_config.h
- files/patch-hack_hack.ioctl.c
- files/patch-hack_hack.pager.c
- files/patch-hack_hack.shk.c
- files/patch-hack_hack.termcap.c
- files/patch-hack_hack.tty.c
- files/patch-hack_hack.unix.c
- files/patch-larn_Makefile
- files/patch-larn_diag.c
- files/patch-larn_header.h
- files/patch-larn_io.c
- files/patch-quiz
- files/patch-rogue_Makefile
- files/patch-snake_snake_move.c
- files/patch-snake_snake_snake.c
- files/patch-snake_snake_snake.h
- files/patch-trek_main.c
Generated with FreeBSD Port Tools 0.99
>How-To-Repeat:
>Fix:
--- bsdgames-2.4,1.patch begins here ---
Index: Makefile
===================================================================
RCS file: /tank/ncvs/ports/games/freebsd-games/Makefile,v
retrieving revision 1.20
diff -u -p -u -r1.20 Makefile
--- Makefile 2 Mar 2009 01:27:11 -0000 1.20
+++ Makefile 11 Nov 2009 17:38:51 -0000
@@ -5,15 +5,17 @@
# $FreeBSD: ports/games/freebsd-games/Makefile,v 1.20 2009/03/02 01:27:11 tabthorpe Exp $
#
-PORTNAME= freebsd-games
-PORTVERSION= 5.1.1
-PORTREVISION= 7
+PORTNAME= bsdgames
+PORTVERSION= 2.4
+PORTEPOCH= 1
CATEGORIES= games
-MASTER_SITES= ${MASTER_SITE_LOCAL}
-MASTER_SITE_SUBDIR=markm
+# Fetched from http://gitweb.dragonflybsd.org/dragonfly.git/tree/v2.4.0:/games
+# Content is stable, but file timestamps differ. Bad gitweb, no cookie!
+MASTER_SITES= https://www.spoerlein.net/pub/
+WRKSRC= ${WRKDIR}/dragonfly
-MAINTAINER= uspoerlein at gmail.com
-COMMENT= FreeBSD-modified "Standard" BSD games
+MAINTAINER= uqs at spoerlein.net
+COMMENT= Traditional BSD games taken from DragonFly BSD
USE_BZIP2= yes
@@ -30,25 +32,32 @@ MAN6= \
fish.6 \
hack.6 \
hangman.6 \
+ hunt.6 \
+ huntd.6 \
larn.6 \
mille.6 \
phantasia.6 \
piano.6 \
pig.6 \
quiz.6 \
+ rain.6 \
robots.6 \
rogue.6 \
sail.6 \
snake.6 \
snscore.6 \
trek.6 \
+ wargames.6 \
worm.6 \
+ worms.6 \
wump.6
MANCOMPRESSED= maybe
-PATHNAME_FILES= atc/atc.6 \
+# contain /usr/share/games
+SHAREPATH_FILES=atc/atc.6 \
atc/pathnames.h \
+ cribbage/cribbage.6 \
cribbage/pathnames.h \
fish/pathnames.h \
larn/pathnames.h \
@@ -57,23 +66,32 @@ PATHNAME_FILES= atc/atc.6 \
quiz/quiz.6 \
wump/pathnames.h
-.include <bsd.port.pre.mk>
-
-post-extract:
- @(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} \
- ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} extract)
+# contain /usr/games/*
+GAMESPATH_FILES=backgammon/backgammon/backgammon.6 \
+ backgammon/common_source/init.c \
+ canfield/canfield/canfield.6 \
+ cribbage/cribbage.6 \
+ hunt/hunt/hunt.6 \
+ hunt/huntd/huntd.6 \
+ phantasia/pathnames.h \
+ wargames/wargames.sh
post-patch:
- @${FIND} ${WRKSRC} -name '*.c' -or -name '*.h' -or -name '*.6' -or \
- -name 'index' | ${XARGS} ${REINPLACE_CMD} -e \
- 's|share/games|local/share/games|g'
- @${FIND} ${WRKSRC} -name 'Makefile' | \
- ${XARGS} ${REINPLACE_CMD} 's|$${LIBCOMPAT}||g;;s|-lcompat||g'
- @for f in ${PATHNAME_FILES}; do \
- ${REINPLACE_CMD} -e 's|/usr/local/local/local|${PREFIX}|g' \
+ @for f in ${SHAREPATH_FILES}; do \
+ ${REINPLACE_CMD} -e 's|/usr/share/games|${PREFIX}/share/games|g' \
+ ${WRKSRC}/$${f}; \
+ done
+ @for f in ${GAMESPATH_FILES}; do \
+ ${REINPLACE_CMD} -e 's|/usr/games|${PREFIX}/bin|g' \
${WRKSRC}/$${f}; \
done
- @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|' \
- "${WRKSRC}/hack/hack.unix.c"
-.include <bsd.port.post.mk>
+# Only useful for DESTDIR
+VARDIR?= /var
+
+pre-install:
+ ${MKDIR} ${VARDIR}
+ mtree -deU -f ${FILESDIR}/var.mtree -p ${VARDIR}
+ mtree -deU -f ${FILESDIR}/share.mtree -p ${PREFIX}/share
+
+.include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /tank/ncvs/ports/games/freebsd-games/distinfo,v
retrieving revision 1.5
diff -u -p -u -r1.5 distinfo
--- distinfo 24 Nov 2005 19:27:31 -0000 1.5
+++ distinfo 11 Nov 2009 17:38:51 -0000
@@ -1,3 +1,3 @@
-MD5 (freebsd-games-5.1.1.tar.bz2) = 31c098a1ef0d198a6456e26b6d65be72
-SHA256 (freebsd-games-5.1.1.tar.bz2) = 2ef700e090c975c7d6807a556ca29acc11215ba43f3ad26ad555a63cb3f72f71
-SIZE (freebsd-games-5.1.1.tar.bz2) = 2434501
+MD5 (bsdgames-2.4.tar.bz2) = cd05ba9ade4c905520222d54845d4b13
+SHA256 (bsdgames-2.4.tar.bz2) = c89da5b3a63b3d5b4ecb9658a549a0ade114529d10890cd6cf0979a96a28ce19
+SIZE (bsdgames-2.4.tar.bz2) = 2011321
Index: pkg-descr
===================================================================
RCS file: /tank/ncvs/ports/games/freebsd-games/pkg-descr,v
retrieving revision 1.1.1.1
diff -u -p -u -r1.1.1.1 pkg-descr
--- pkg-descr 24 Nov 2002 18:09:59 -0000 1.1.1.1
+++ pkg-descr 11 Nov 2009 17:38:51 -0000
@@ -1,6 +1,5 @@
-This is a port of the FreeBSD "standard" games as they were just
-before they were removed from the base system.
+This is a port of the BSD "standard" games from Dragonfly BSD which
+includes many improvements and cleanups from NetBSD and OpenBSD.
-This source was formerly a part of the FreeBSD base system, and this
-package is based on the final version of that source code, so it
-includes all previous FreeBSD customizations.
+This source was formerly a part of the FreeBSD base system, but has
+survived in the Dragonfly BSD repository.
Index: pkg-plist
===================================================================
RCS file: /tank/ncvs/ports/games/freebsd-games/pkg-plist,v
retrieving revision 1.2
diff -u -p -u -r1.2 pkg-plist
--- pkg-plist 14 Aug 2003 15:15:51 -0000 1.2
+++ pkg-plist 11 Nov 2009 17:38:51 -0000
@@ -12,19 +12,24 @@ bin/cribbage
bin/fish
bin/hack
bin/hangman
+bin/hunt
+bin/huntd
bin/larn
bin/mille
bin/phantasia
bin/piano
bin/pig
bin/quiz
+bin/rain
bin/robots
bin/rogue
bin/sail
bin/snake
bin/snscore
bin/trek
+bin/wargames
bin/worm
+bin/worms
bin/wump
share/games/atc/Game_List
share/games/atc/Killer
@@ -76,28 +81,39 @@ share/games/fish.instr
share/games/wump.info
@dirrm share/games
@cwd /var/games
- at dirrm atc
- at dirrm battlestar
+ at exec chgrp games /var/games
+ at dirrmtry atc
+ at exec mkdir %D/atc
+ at exec chmod 0775 %D/atc
+ at dirrmtry battlestar
+ at exec mkdir %D/battlestar
+ at exec chmod 0775 %D/battlestar
hackdir/perm
-hackdir/record
hackdir/rumors
hackdir/help
hackdir/hh
hackdir/data
- at dirrm hackdir/save
- at dirrm hackdir
+phantasia/monsters
+phantasia/void
+ at comment FIXME below are highscores, we should keep them if non-empty
+ at comment Also, we must make sure to not clobber them upon install XXX
+hackdir/record
+ at dirrmtry hackdir/save
+ at dirrmtry hackdir
+ at exec mkdir -p %D/hackdir/save
+ at exec chmod 0770 %D/hackdir %D/hackdir/save
larn/lscore12.0
larn/llog12.0
- at dirrm larn
+ at dirrmtry larn
+ at exec chmod 0775 %D/larn
phantasia/characs
phantasia/gold
phantasia/lastdead
phantasia/mess
-phantasia/monsters
phantasia/motd
phantasia/scoreboard
-phantasia/void
- at dirrm phantasia
+ at dirrmtry phantasia
+ at exec chmod 0775 %D/phantasia
battlestar.log
cfscores
criblog
Index: files/patch-Makefile
===================================================================
RCS file: files/patch-Makefile
diff -N files/patch-Makefile
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ files/patch-Makefile 11 Nov 2009 17:38:51 -0000
@@ -0,0 +1,35 @@
+--- Makefile.orig 2009-09-24 10:46:30.000000000 +0200
++++ Makefile 2009-11-04 18:14:08.698185298 +0100
+@@ -8,32 +8,20 @@
+ atc \
+ backgammon \
+ battlestar \
+- bcd \
+ bs \
+- caesar \
+ canfield \
+ cribbage \
+- dm \
+- factor \
+ fish \
+- fortune \
+- grdc \
+ hack \
+ hangman \
+ hunt \
+ larn \
+ mille \
+- morse \
+- number \
+ phantasia \
+ piano \
+ pig \
+- pom \
+- ppt \
+- primes \
+ quiz \
+ rain \
+- random \
+ robots \
+ rogue \
+ sail \
Index: files/patch-Makefile.inc
===================================================================
RCS file: files/patch-Makefile.inc
diff -N files/patch-Makefile.inc
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ files/patch-Makefile.inc 11 Nov 2009 17:38:51 -0000
@@ -0,0 +1,47 @@
+--- Makefile.inc.orig 2009-09-24 10:46:30.000000000 +0200
++++ Makefile.inc 2009-11-04 20:09:49.102229343 +0100
+@@ -2,14 +2,40 @@
+ # $FreeBSD: src/games/Makefile.inc,v 1.10.2.2 2002/02/18 16:02:39 ru Exp $
+ # $DragonFly: src/games/Makefile.inc,v 1.3 2006/10/08 16:22:34 pavalos Exp $
+
+-BINDIR?= /usr/games
++PREFIX?= /usr/local
++BINDIR?= ${PREFIX}/bin
++SHAREDIR= ${PREFIX}/share
++MANDIR= ${PREFIX}/man/man
+ FILESDIR?= ${SHAREDIR}/games
+ WARNS?= 6
+
+ .if defined(HIDEGAME)
+-ORIGBINDIR:= ${BINDIR}
+-BINDIR:= ${BINDIR}/hide
+-ORIGBINGRP:= ${BINGRP}
+ BINGRP= games
+ BINMODE= 550
+ .endif
++
++# cribbed from DragonflyBSD build system
++
++NXCC?= ${CC}
++NXCFLAGS?= ${CFLAGS:N-mtune*:N-mcpu*:N-march*}
++
++.SUFFIXES: .nx .no
++
++# .no == native object file, for helper code when cross building.
++#
++.c.no:
++ ${NXCC} ${_${.IMPSRC:T}_FLAGS} ${NXCFLAGS} -c ${.IMPSRC} -o ${.TARGET}
++
++.y.no:
++ ${YACC} ${YFLAGS} ${.IMPSRC}
++ ${NXCC} ${NXCFLAGS} -c y.tab.c -o ${.TARGET}
++ rm -f y.tab.c
++
++.l.no:
++ ${LEX} ${LFLAGS} -o${.TARGET}.c ${.IMPSRC}
++ ${NXCC} ${NXCFLAGS} -c ${.TARGET}.c -o ${.TARGET}
++ rm -f ${.TARGET}.c
++
++.no.nx .c.nx:
++ ${NXCC} ${_${.IMPSRC:T}_FLAGS} ${NXCFLAGS} ${NXLDFLAGS} ${.IMPSRC} \
++ ${NXLDLIBS} -o ${.TARGET}
Index: files/patch-dfly
===================================================================
RCS file: files/patch-dfly
diff -N files/patch-dfly
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ files/patch-dfly 11 Nov 2009 17:38:51 -0000
@@ -0,0 +1,40 @@
+--- ./cribbage/instr.c
++++ ./cribbage/instr.c
+@@ -51,7 +51,11 @@ void
+ instructions(void)
+ {
+ struct stat sb;
++#ifdef __DragonFly__
+ union wait pstat;
++#else
++ int pstat;
++#endif
+ pid_t pid;
+ const char *pager, *path;
+
+@@ -77,7 +81,11 @@ instructions(void)
+ do {
+ pid = waitpid(pid, (int *)&pstat, 0);
+ } while (pid == -1 && errno == EINTR);
++#ifdef __DragonFly__
+ if (pid == -1 || pstat.w_status)
++#else
++ if (pid == -1 || WEXITSTATUS(pstat) || WTERMSIG(pstat))
++#endif
+ exit(1);
+ }
+ }
+--- ./sail/pl_1.c
++++ ./sail/pl_1.c
+@@ -122,7 +122,11 @@ choke(void)
+ void
+ child(void)
+ {
++#ifdef __DragonFly__
+ union wait status;
++#else
++ int status;
++#endif
+ int pid;
+
+ signal(SIGCHLD, SIG_IGN);
Index: files/patch-hack
===================================================================
RCS file: files/patch-hack
diff -N files/patch-hack
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ files/patch-hack 11 Nov 2009 17:38:51 -0000
@@ -0,0 +1,51 @@
+--- hack/hack.unix.c.orig 2009-09-24 10:46:30.000000000 +0200
++++ hack/hack.unix.c 2009-11-04 18:49:58.645035610 +0100
+@@ -19,7 +19,9 @@
+
+ #include <sys/types.h> /* for time_t and stat */
+ #include <sys/stat.h>
++#include <sys/param.h>
+ #include <time.h>
++#include <err.h>
+
+ static struct tm *getlt(void);
+ static bool veryold(int);
+@@ -95,13 +97,32 @@
+ void
+ gethdate(const char *name)
+ {
+-/* old version - for people short of space */
+-char *np;
++ char *p, *np, *path;
++ char filename[MAXPATHLEN+1];
+
+- name = "/usr/games/hide/hack";
+- if(stat(name, &hbuf))
+- error("Cannot get status of %s.",
+- (np = rindex(name, '/')) ? np+1 : name);
++ if (strchr(name, '/') != NULL || (p = getenv("PATH")) == NULL)
++ p = "";
++ np = path = strdup(p); /* Make a copy for strsep. */
++ if (path == NULL)
++ err(1, NULL);
++
++ for (;;) {
++ if ((p = strsep(&np, ":")) == NULL)
++ break;
++ if (*p == '\0') /* :: */
++ (void) strlcpy(filename, name, sizeof filename);
++ else
++ (void) snprintf(filename, sizeof filename,
++ "%s/%s", p, name);
++
++ if (stat(filename, &hbuf) == 0) {
++ free(path);
++ return;
++ }
++ }
++ error("Cannot get status of %s.",
++ (p = strrchr(name, '/')) ? p+1 : name);
++ free(path);
+ }
+
+ bool
Index: files/patch-warns
===================================================================
RCS file: files/patch-warns
diff -N files/patch-warns
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ files/patch-warns 11 Nov 2009 17:38:51 -0000
@@ -0,0 +1,40 @@
+--- ./atc/Makefile
++++ ./atc/Makefile
+@@ -4,6 +4,7 @@
+
+ PROG= atc
+ CFLAGS+=-I${.CURDIR} -I.
++WARNS?= 2
+ SRCS= extern.c grammar.y graphics.c input.c lex.l list.c log.c \
+ main.c tunable.c update.c y.tab.h
+ MAN= atc.6
+--- ./atc/include.h
++++ ./atc/include.h
+@@ -56,6 +56,7 @@
+ #include <pwd.h>
+ #include <signal.h>
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <string.h>
+ #include <termios.h>
+ #include <unistd.h>
+--- ./hack/Makefile
++++ ./hack/Makefile
+@@ -19,6 +19,7 @@ MAN= hack.6
+ DPADD= ${LIBTERMCAP}
+ LDADD= -ltermcap
+ CFLAGS+= -I${.CURDIR} -I.
++WARNS?= 3 # shadowed 'u' variable, blame sys/stat.h :/
+ FILES= rumors help hh data
+ FILESMODE_rumors= 440
+ FILESGRP= ${BINGRP}
+--- ./rogue/Makefile
++++ ./rogue/Makefile
+@@ -4,6 +4,7 @@
+
+ PROG= rogue
+ CFLAGS+=-DUNIX
++WARNS?= 1
+ SRCS= hit.c init.c inventory.c level.c machdep.c main.c \
+ message.c monster.c move.c object.c pack.c play.c random.c ring.c \
+ room.c save.c score.c spec_hit.c throw.c trap.c use.c zap.c
Index: files/share.mtree
===================================================================
RCS file: files/share.mtree
diff -N files/share.mtree
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ files/share.mtree 11 Nov 2009 17:38:51 -0000
@@ -0,0 +1,11 @@
+# Games dirs
+.
+/set type=dir uname=root gname=wheel mode=0755
+ games
+ atc
+ ..
+ larn
+ ..
+ quiz.db
+ ..
+ ..
Index: files/var.mtree
===================================================================
RCS file: files/var.mtree
diff -N files/var.mtree
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ files/var.mtree 11 Nov 2009 17:38:51 -0000
@@ -0,0 +1,17 @@
+# Games dirs
+.
+/set type=dir uname=root gname=games mode=0775
+ games
+ atc
+ ..
+ battlestar
+ ..
+ hackdir mode=0770
+ save mode=0770
+ ..
+ ..
+ larn
+ ..
+ phantasia
+ ..
+ ..
--- bsdgames-2.4,1.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list