Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Feb 2000 21:10:28 +0100 (CET)
From:      Christian Weisgerber <naddy@mips.rhein-neckar.de>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/17054: New port: games/tetris - from OpenBSD
Message-ID:  <200002282010.VAA59988@bigeye.rhein-neckar.de>

next in thread | raw e-mail | index | archive | help

>Number:         17054
>Category:       ports
>Synopsis:       New port: games/tetris - from OpenBSD
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Feb 28 12:40:01 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     Christian Weisgerber
>Release:        FreeBSD 4.0-CURRENT i386
>Organization:
>Environment:

>Description:

4.4BSD came with a curses(3)-based tetris(6), derived from a 1989
winner of the infamous IOCCC. This was removed in FreeBSD due to
concerns over trademark infringement. NetBSD and OpenBSD still ship
with tetris(6), though. This port fetches the source right from
the OpenBSD CVS repository, as pioneered by the openssh and
openssh-askpass ports where the Makefile was blatantly copied from.

TODO: Find a committer to put the alternative source tarball in
      his home directory, add MASTER_SITES appropriately.

>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:
#
#	tetris
#	tetris/files
#	tetris/files/distfiles
#	tetris/files/ignorefiles
#	tetris/files/md5
#	tetris/pkg
#	tetris/pkg/COMMENT
#	tetris/pkg/DESCR
#	tetris/pkg/PLIST
#	tetris/Makefile
#	tetris/patches
#	tetris/patches/patch-aa
#
echo c - tetris
mkdir -p tetris > /dev/null 2>&1
echo c - tetris/files
mkdir -p tetris/files > /dev/null 2>&1
echo x - tetris/files/distfiles
sed 's/^X//' >tetris/files/distfiles << 'END-of-tetris/files/distfiles'
Xsrc/games/tetris/Makefile
Xsrc/games/tetris/input.c
Xsrc/games/tetris/input.h
Xsrc/games/tetris/pathnames.h
Xsrc/games/tetris/scores.c
Xsrc/games/tetris/scores.h
Xsrc/games/tetris/screen.c
Xsrc/games/tetris/screen.h
Xsrc/games/tetris/shapes.c
Xsrc/games/tetris/tetris.6
Xsrc/games/tetris/tetris.c
Xsrc/games/tetris/tetris.h
END-of-tetris/files/distfiles
echo x - tetris/files/ignorefiles
sed 's/^X//' >tetris/files/ignorefiles << 'END-of-tetris/files/ignorefiles'
X.stamp
Xsrc/CVS/Root
Xsrc/CVS/Repository
Xsrc/CVS/Entries
Xsrc/CVS/Entries.Static
Xsrc/games/CVS/Root
Xsrc/games/CVS/Repository
Xsrc/games/CVS/Entries
Xsrc/games/CVS/Entries.Static
Xsrc/games/tetris/CVS/Root
Xsrc/games/tetris/CVS/Repository
Xsrc/games/tetris/CVS/Entries
Xsrc/games/tetris/CVS/Tag
END-of-tetris/files/ignorefiles
echo x - tetris/files/md5
sed 's/^X//' >tetris/files/md5 << 'END-of-tetris/files/md5'
XMD5 (tetris-1.0/src/games/tetris/Makefile) = c7fa8012078dac9d5544d629d695d21c
XMD5 (tetris-1.0/src/games/tetris/input.c) = 46bbc5e74d4e7e52549e1c5d616fe923
XMD5 (tetris-1.0/src/games/tetris/input.h) = c06a10953f21e3f72a4dd4039e65ed94
XMD5 (tetris-1.0/src/games/tetris/pathnames.h) = 213c151b8d237dc0427a0f48a0452eef
XMD5 (tetris-1.0/src/games/tetris/scores.c) = 48a1d4a6b004df1eaddcd5bc8e3670b1
XMD5 (tetris-1.0/src/games/tetris/scores.h) = f432d52139461e07733089db3fcb7001
XMD5 (tetris-1.0/src/games/tetris/screen.c) = e97c5bb408e8b75842933fa549f15cd1
XMD5 (tetris-1.0/src/games/tetris/screen.h) = 11b999e951a51acf94270ec58eabe02d
XMD5 (tetris-1.0/src/games/tetris/shapes.c) = c832cc90b9a6137f90c12f6c03d7f44a
XMD5 (tetris-1.0/src/games/tetris/tetris.6) = 0b8abfc2c0380ab7a913015aaa3b3e2f
XMD5 (tetris-1.0/src/games/tetris/tetris.c) = 74220f472ac191bcaa40546e38b90fca
XMD5 (tetris-1.0/src/games/tetris/tetris.h) = 49d88635660cf1626eb7ffc810a60a5f
XMD5 (tetris-1.0/.stamp) = IGNORE
XMD5 (tetris-1.0/src/CVS/Root) = IGNORE
XMD5 (tetris-1.0/src/CVS/Repository) = IGNORE
XMD5 (tetris-1.0/src/CVS/Entries) = IGNORE
XMD5 (tetris-1.0/src/CVS/Entries.Static) = IGNORE
XMD5 (tetris-1.0/src/games/CVS/Root) = IGNORE
XMD5 (tetris-1.0/src/games/CVS/Repository) = IGNORE
XMD5 (tetris-1.0/src/games/CVS/Entries) = IGNORE
XMD5 (tetris-1.0/src/games/CVS/Entries.Static) = IGNORE
XMD5 (tetris-1.0/src/games/tetris/CVS/Root) = IGNORE
XMD5 (tetris-1.0/src/games/tetris/CVS/Repository) = IGNORE
XMD5 (tetris-1.0/src/games/tetris/CVS/Entries) = IGNORE
XMD5 (tetris-1.0/src/games/tetris/CVS/Tag) = IGNORE
END-of-tetris/files/md5
echo c - tetris/pkg
mkdir -p tetris/pkg > /dev/null 2>&1
echo x - tetris/pkg/COMMENT
sed 's/^X//' >tetris/pkg/COMMENT << 'END-of-tetris/pkg/COMMENT'
XThe game of tetris
END-of-tetris/pkg/COMMENT
echo x - tetris/pkg/DESCR
sed 's/^X//' >tetris/pkg/DESCR << 'END-of-tetris/pkg/DESCR'
XThe tetris command runs a display-based game which must be played
Xon a CRT terminal.  The object is to fit the shapes together forming
Xcomplete rows, which then vanish.  When the shapes fill up to the
Xtop, the game ends.  You can optionally select a level of play, or
Xcustom-select control keys.
END-of-tetris/pkg/DESCR
echo x - tetris/pkg/PLIST
sed 's/^X//' >tetris/pkg/PLIST << 'END-of-tetris/pkg/PLIST'
END-of-tetris/pkg/PLIST
echo x - tetris/Makefile
sed 's/^X//' >tetris/Makefile << 'END-of-tetris/Makefile'
X# New ports collection makefile for:	tetris
X# Version required:	2000-02-28 00:00:00 UTC
X# Date created:		2000-02-28
X# Whom:			Christian Weisgerber <naddy@mips.rhein-neckar.de>
X#
X# $FreeBSD$
X
XDISTNAME=	src/games/tetris
XPKGNAME=	tetris-1.0
XCATEGORIES=	games
X# ${MASTER_SITES} is only for if CVS won't work, period.
X#MASTER_SITES=	http://www.freebsd.org/~kris/distfiles/
X
XMAINTAINER=	naddy@mips.rhein-neckar.de
X
X.include <bsd.port.pre.mk>
XCAT?=		/bin/cat
XSED?=		/usr/bin/sed
XDISTFILES!=	${SED} 's:^\(.*\)$$:${PKGNAME}/\1:g' ${FILESDIR}/distfiles
XIGNOREFILES!=	${SED} 's:^\(.*\)$$:${PKGNAME}/\1:g' ${FILESDIR}/ignorefiles
XDISTFILES+=	${IGNOREFILES}
X
XCVS_CMD?=	cvs -z3
XCVS_DATE=	Mon Feb 28 00:00:00 UTC 2000
XCVS_DATE_!=	${ECHO} -n "${CVS_DATE}" | ${SED} 's/[ \t:]/_/g'
XCVS_SITES=	anoncvs@anoncvs1.ca.openbsd.org:/cvs \
X		:pserver:anoncvs@anoncvs1.usa.openbsd.org:/cvs
XSTAMPFILE=	${DISTDIR}/${PKGNAME}/.stamp
XWRKSRC=		${WRKDIR}/tetris
X
Xdo-fetch:
X	@if [ ! -e ${STAMPFILE} ] || \
X	    [ "X${CVS_DATE}" != "X$$(${CAT} ${STAMPFILE})" ]; then \
X		if [ -e ${DISTDIR}/${PKGNAME}.${CVS_DATE_}.tar.gz ]; then \
X			cd ${DISTDIR}; \
X			${TAR} xfz ${PKGNAME}.${CVS_DATE_}.tar.gz \
X			    ${DISTFILES}; \
X			${ECHO} -n "${CVS_DATE}" > ${STAMPFILE}; \
X			exit; \
X		fi; \
X		unset CVS_RSH CVS_SERVER || ${TRUE}; \
X		if [ -n "${PORTS_CVS_RSH}" ]; then \
X			export CVS_RSH="${PORTS_CVS_RSH}"; \
X		fi; \
X		${MKDIR} ${DISTDIR}/${PKGNAME} && \
X		cd ${DISTDIR}/${PKGNAME}; \
X		for CVS_SITE in ${CVS_SITES}; do \
X			${ECHO_MSG} ">> Attempting to CVS checkout from $${CVS_SITE}."; \
X			if ${CVS_CMD} -d $${CVS_SITE} co -D "${CVS_DATE}" \
X			    ${DISTNAME}; then \
X				${ECHO} -n "${CVS_DATE}" > ${STAMPFILE}; \
X				exit; \
X			fi \
X		done; \
X		${ECHO_MSG} ">> Couldn't CVS checkout ${PKGNAME}.  Please try to retrieve"; \
X		${ECHO_MSG} ">> a snapshot with \"make fetchsrctarball\" and try again."; \
X		exit 1; \
X	fi
X
Xmakesrctarball: fetch
X	@cd ${DISTDIR}; \
X	${ECHO_MSG} ">> Creating source tarball in ${DISTDIR}"; \
X	${ECHO_MSG} ">> \"${PKGNAME}.${CVS_DATE_}.tar.gz\"."; \
X	${TAR} cfz ${PKGNAME}.${CVS_DATE_}.tar.gz ${PKGNAME}
X
Xfetchsrctarball:
X	@cd ${DISTDIR}; \
X	file=${PKGNAME}.${CVS_DATE_}.tar.gz; \
X	if [ -e $$file ]; then \
X		exit; \
X	fi; \
X	${ECHO_MSG} ">> $$file doesn't seem to exist on this system."; \
X	for site in ${MASTER_SITES}; do \
X		${ECHO_MSG} ">> Attempting to fetch from $${site}."; \
X		if ${SETENV} ${FETCH_ENV} ${FETCH_CMD} ${FETCH_BEFORE_ARGS} \
X		    $${site}$${file}; then \
X			exit; \
X		fi; \
X	done; \
X	${ECHO_MSG} ">> Couldn't fetch $$file."; \
X	${ECHO_MSG} ">> Please try to retrieve this file manually into"; \
X	${ECHO_MSG} ">> ${_DISTDIR} and try again."; \
X	exit 1
X
Xdo-extract:
X	@${MKDIR} ${WRKDIR}
X	@${CP} -r ${DISTDIR}/${PKGNAME}/${DISTNAME} ${WRKDIR}
X
X.include <bsd.port.post.mk>
END-of-tetris/Makefile
echo c - tetris/patches
mkdir -p tetris/patches > /dev/null 2>&1
echo x - tetris/patches/patch-aa
sed 's/^X//' >tetris/patches/patch-aa << 'END-of-tetris/patches/patch-aa'
X--- Makefile.orig	Mon Feb 28 15:20:24 2000
X+++ Makefile	Mon Feb 28 15:26:32 2000
X@@ -2,17 +2,18 @@
X 
X PROG=	tetris
X SRCS=	input.c screen.c shapes.c scores.c tetris.c
X-MAN=	tetris.6
X+MAN6=	tetris.6
X DPADD=	${LIBCURSES}
X LDADD=	-lcurses
X-HIDEGAME=hidegame
X+BINDIR=	${PREFIX}/bin
X+BINGRP=	games
X+BINMODE=2555
X+MANDIR=	${PREFIX}/man/man
X 
X beforeinstall:
X-	@if [ ! -f ${DESTDIR}/var/games/tetris.scores ]; then \
X-	    ${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} -m 664 \
X-		/dev/null ${DESTDIR}/var/games/tetris.scores ; \
X-	else \
X-		true ; \
X-	fi
X+.if !exists(/var/games/tetris.scores)
X+	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
X+	    /var/games/tetris.scores
X+.endif
X 
X .include <bsd.prog.mk>
END-of-tetris/patches/patch-aa
exit


>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200002282010.VAA59988>