diff options
author | kamil <kamil@pkgsrc.org> | 2016-07-28 17:51:20 +0000 |
---|---|---|
committer | kamil <kamil@pkgsrc.org> | 2016-07-28 17:51:20 +0000 |
commit | c1b9286bb1e471b308da33be1e1dcfc68568aa24 (patch) | |
tree | 291a3ecbd4b8453eb8e6c8c602d675dc118a3e5c /games | |
parent | 411e12240e86d8526ce84196b4b0b4383200267a (diff) | |
download | pkgsrc-c1b9286bb1e471b308da33be1e1dcfc68568aa24.tar.gz |
Import ztrack-1.0 as games/ztrack
Simple curses-based pseudo-3D driving game
Originally packaged in pkgsrc-wip by:
- myself
and
- <leot>.
Diffstat (limited to 'games')
-rw-r--r-- | games/ztrack/DESCR | 1 | ||||
-rw-r--r-- | games/ztrack/Makefile | 25 | ||||
-rw-r--r-- | games/ztrack/PLIST | 3 | ||||
-rw-r--r-- | games/ztrack/distinfo | 8 | ||||
-rw-r--r-- | games/ztrack/patches/patch-Makefile | 53 | ||||
-rw-r--r-- | games/ztrack/patches/patch-ztrack.c | 21 |
6 files changed, 111 insertions, 0 deletions
diff --git a/games/ztrack/DESCR b/games/ztrack/DESCR new file mode 100644 index 00000000000..8e0c7a393bc --- /dev/null +++ b/games/ztrack/DESCR @@ -0,0 +1 @@ +Ztrack is a simple curses-based pseudo-3D driving game. diff --git a/games/ztrack/Makefile b/games/ztrack/Makefile new file mode 100644 index 00000000000..80c5049af67 --- /dev/null +++ b/games/ztrack/Makefile @@ -0,0 +1,25 @@ +# $NetBSD: Makefile,v 1.1 2016/07/28 17:51:20 kamil Exp $ + +DISTNAME= ztrack-1.0 +CATEGORIES= games +MASTER_SITES= ${MASTER_SITE_SUNSITE:=games/arcade/} + +MAINTAINER= pkgsrc-users@NetBSD.org +# Nothing better available +HOMEPAGE= ${MASTER_SITE_SUNSITE:=games/arcade/} +COMMENT= Simple curses-based pseudo-3D driving game +LICENSE= public-domain + +WRKSRC= ${WRKDIR}/${PKGBASE} + +MAKE_FLAGS+= BINDIR=${PREFIX}/bin +MAKE_FLAGS+= MANDIR=${PREFIX}/${PKGMANDIR}/man6 + +SUBST_CLASSES+= makefile +SUBST_STAGE.makefile= pre-configure +SUBST_MESSAGE.makefile= Link with the proper curses type +SUBST_FILES.makefile= Makefile +SUBST_SED.makefile= -e '/LIBS/ s,-lncurses,-l${BUILDLINK_LIBNAME.curses},' + +.include "../../mk/curses.buildlink3.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/games/ztrack/PLIST b/games/ztrack/PLIST new file mode 100644 index 00000000000..51e791f5ecf --- /dev/null +++ b/games/ztrack/PLIST @@ -0,0 +1,3 @@ +@comment $NetBSD: PLIST,v 1.1 2016/07/28 17:51:20 kamil Exp $ +bin/ztrack +man/man6/ztrack.6 diff --git a/games/ztrack/distinfo b/games/ztrack/distinfo new file mode 100644 index 00000000000..1c9b92b67ec --- /dev/null +++ b/games/ztrack/distinfo @@ -0,0 +1,8 @@ +$NetBSD: distinfo,v 1.1 2016/07/28 17:51:20 kamil Exp $ + +SHA1 (ztrack-1.0.tar.gz) = 1cc31c82d78b87efa18623edf72eaa02859b38f0 +RMD160 (ztrack-1.0.tar.gz) = ff3deaf1a31e048350cb94f1d9fed87e84a99fde +SHA512 (ztrack-1.0.tar.gz) = 10efc72b593f6068ebf515ebd5be8d4c0451f37e798161dca5addbfcc468b6ee1d2bfc6b92701c6024ae4cb4fd3b1053a7891c2e7a023855aa2821420e6bb62c +Size (ztrack-1.0.tar.gz) = 10186 bytes +SHA1 (patch-Makefile) = cb68993430fa3286ebb1c5828c3e5209adf844f9 +SHA1 (patch-ztrack.c) = f47973334a3baa59e8ac675fc43280a6f9bb6881 diff --git a/games/ztrack/patches/patch-Makefile b/games/ztrack/patches/patch-Makefile new file mode 100644 index 00000000000..fcbf5fbb4e2 --- /dev/null +++ b/games/ztrack/patches/patch-Makefile @@ -0,0 +1,53 @@ +$NetBSD: patch-Makefile,v 1.1 2016/07/28 17:51:20 kamil Exp $ + +- Accept user defined CC, CFLAGS and LDFLAGS. +- Add DESTDIR support +- Fix permissions of installed files + +--- Makefile.orig 1996-09-30 03:34:20.000000000 +0000 ++++ Makefile +@@ -2,16 +2,16 @@ + # + # note that you need an ANSI C compiler; + # gcc is easiest if you've got it or can get it +-CC=gcc ++CC?=gcc + + # flags for Linux/gcc, hack as required + # remove '-DHAVE_RANDOM' if your libc doesn't have 'random' and 'srandom'. + # add '-DNO_COLOUR' if you don't want colour or the colour support + # causes problems. +-CFLAGS=-O2 -Wall -DHAVE_RANDOM -I/usr/include/ncurses #-DDEBUG ++CFLAGS+= -Wall -DHAVE_RANDOM + + # if using ncurses: +-LIBS=-lncurses ++LIBS=-lcurses + + # bsd-derived is usually: + #LIBS=-lcurses -ltermcap +@@ -20,6 +20,7 @@ LIBS=-lncurses + #LIBS=-lcurses -lterminfo + + # change these if needed - they're used by 'make install' ++DESTDIR?= + BINDIR=/usr/games + MANDIR=/usr/man/man6 + +@@ -31,11 +32,13 @@ OBJS=ztrack.o + all: ztrack + + ztrack: $(OBJS) +- $(CC) $(CFLAGS) -o ztrack $(OBJS) $(LIBS) ++ $(CC) $(CFLAGS) $(LDFLAGS) -o ztrack $(OBJS) $(LIBS) + + install: ztrack +- install -s -m 511 ztrack $(BINDIR) +- install -m 444 ztrack.6 $(MANDIR) ++ install -d $(DESTDIR)$(BINDIR) ++ install -s -m 755 ztrack $(DESTDIR)$(BINDIR) ++ install -d $(DESTDIR)$(MANDIR) ++ install -m 644 ztrack.6 $(DESTDIR)$(MANDIR) + + clean: + $(RM) *.o *~ ztrack diff --git a/games/ztrack/patches/patch-ztrack.c b/games/ztrack/patches/patch-ztrack.c new file mode 100644 index 00000000000..8ebe2711e88 --- /dev/null +++ b/games/ztrack/patches/patch-ztrack.c @@ -0,0 +1,21 @@ +$NetBSD: patch-ztrack.c,v 1.1 2016/07/28 17:51:20 kamil Exp $ + +Add explicit braces to avoid ambiguous 'else' (pointed out by -Wall) + +--- ztrack.c.orig 1995-12-01 02:34:36.000000000 +0000 ++++ ztrack.c +@@ -553,12 +553,13 @@ int f,l=0,r=0; + + for(f=0;f<MAX_ENEMY;f++) + if(enemy[f].active) +- if(FIX_DOWN(enemy[f].ypos)==0) ++ if(FIX_DOWN(enemy[f].ypos)==0) { + if(enemy[f].lane==lane-1) + l=1; + else + if(enemy[f].lane==lane+1) + r=1; ++ } + + use_colour(COLOR_YELLOW,A_BOLD); + |