Import of pkgsrc-2013Q2

This commit is contained in:
2013-09-26 17:14:40 +02:00
commit 785076ae39
74991 changed files with 4380255 additions and 0 deletions
+11
View File
@@ -0,0 +1,11 @@
Jetpack is an arcade action game. The user controls a player wearing a
jetpack. The player must travel through the maze to find a key and
bring it back to the door to exit to the next level. There are three
kinds of enemies in jetpack: guards, fireballs and wall sweepers.
Touching any enemy is fatal. Guards patrol the maze. They
fly in the middle of the corridors and follow random paths through the
maze. Fireballs fly through space and bounce off walls. Wall
Sweepers cling to walls and continuously move along the surface of the
walls. They can hang on to any side, and when they reach the end of a
wall, flip to hug the other side and continue in the opposite
direction.
+30
View File
@@ -0,0 +1,30 @@
# $NetBSD: Makefile,v 1.12 2012/10/06 11:54:43 asau Exp $
DISTNAME= jetpack
PKGNAME= jetpack-1.0
PKGREVISION= 2
CATEGORIES= games x11
MASTER_SITES= ftp://qiclab.scn.rain.com/pub/games/
EXTRACT_SUFX= .tar.Z
MAINTAINER= pkgsrc-users@NetBSD.org
COMMENT= Arcade action game for X Windows
USE_IMAKE= yes
NO_INSTALL_MANPAGES= yes
SETGIDGAME= yes
INSTALLATION_DIRS= bin ${PKGMANDIR}/man6 share/jetpack
SPECIAL_PERMS+= bin/jetpack ${SETGID_GAMES_PERMS}
CONF_FILES_PERM+= /dev/null /var/games/jetpack.scores \
${GAMES_USER} ${GAMES_GROUP} 0664
OWN_DIRS_PERMS+= ${PREFIX}/share/jetpack ${GAMES_USER} ${GAMES_GROUP} 0775
post-install:
${INSTALL_MAN} ${WRKSRC}/jetpack.man ${DESTDIR}${PREFIX}/${PKGMANDIR}/man6/jetpack.6
.include "../../x11/libX11/buildlink3.mk"
.include "../../x11/libXext/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
+4
View File
@@ -0,0 +1,4 @@
@comment $NetBSD: PLIST,v 1.2 2009/06/14 17:56:48 joerg Exp $
bin/jetpack
man/man6/jetpack.6
share/jetpack/jetpack.lev000
+18
View File
@@ -0,0 +1,18 @@
$NetBSD: distinfo,v 1.6 2013/01/17 15:53:38 joerg Exp $
SHA1 (jetpack.tar.Z) = 7898a971eed7a03e9e390c83d0365584f74dabc7
RMD160 (jetpack.tar.Z) = 2454cef72849f8f644ac6600ad84b3bebd39f8cf
Size (jetpack.tar.Z) = 70621 bytes
SHA1 (patch-ac) = a9a42e0e6f817a5654deec79731786460ed9b944
SHA1 (patch-ad) = f64494ec70fade9d203ab8dbc2795b94f9ecb7e7
SHA1 (patch-defs.h) = bae3d9e3551639dc7f62d115bed4c004047ebe7e
SHA1 (patch-demo.c) = d7a83753210513a3d711c80299f5dbc4ef510889
SHA1 (patch-draw.c) = c67b3e6cf3dd74dc484e4b9b40ca1116d0bd7679
SHA1 (patch-erase.c) = 758b6db7b594d41e44fdf9f6b73a98bc84eae3ad
SHA1 (patch-events.c) = 99536d8901b26fa5c21513266d95edd0b96838c8
SHA1 (patch-gameover.c) = 6a04f25c087f2f0efc794d5341408408d5264d01
SHA1 (patch-main.c) = cd4e545ccdb624118ead3d3f1e27821cd584989c
SHA1 (patch-message.c) = 0dcdea677e485a5cb4a4f3d9528057e7e1b52b50
SHA1 (patch-scores.c) = e7f0fd9f6a6c6a28fd21d8e84105250a3dec10e3
SHA1 (patch-setup.c) = 3572bd0704dab6538a77d8830df2622960345fd3
SHA1 (patch-update.c) = b82cfbc0955ce40d51904f2885afa809493645fb
+81
View File
@@ -0,0 +1,81 @@
$NetBSD: patch-ac,v 1.4 2013/01/15 15:19:05 joerg Exp $
--- Imakefile.orig Sun Mar 29 12:41:25 1992
+++ Imakefile Sun Sep 13 15:08:51 1998
@@ -1,54 +1,53 @@
- SRCS = bitmap.c bonus.c collision.c demo.c draw.c erase.c events.c\
+SRCS = bitmap.c bonus.c collision.c demo.c draw.c erase.c events.c\
gameover.c initx.c main.c maze.c message.c normal.c quitx.c scores.c\
setinmaze.c setup.c special.c time.c update.c windowx.c
- OBJS = bitmap.o bonus.o collision.o demo.o draw.o erase.o events.o\
+OBJS = bitmap.o bonus.o collision.o demo.o draw.o erase.o events.o\
gameover.o initx.o main.o maze.o message.o normal.o quitx.o scores.o\
setinmaze.o setup.o special.o time.o update.o windowx.o
- PROGRAMS = jetpack
+PROGRAMS = jetpack
- DESTDIR = /usrd/s/m/meb2
+BINDIR = $(PREFIX)/bin
+LIBDIR = $(PREFIX)/share/jetpack
+MANDIR = $(PREFIX)/man/man6
+MANSUFFIX = 6
# These defines override the template defaults. Trash em if you want to
# use the template locations
- USRLIBDIR = $(DESTDIR)/lib/jetpack
- BINDIR = $(DESTDIR)/bin
- MANPATH = $(DESTDIR)/man
- MANDIR = $(MANSOURCEPATH)1
- TOP_INCLUDES =
- DEPXLIB =
- EXTRA_LIBRARIES = $(XLIB)
+# LIBDIR = $(DESTDIR)/lib/jetpack
+# BINDIR = $(DESTDIR)/bin
+# MANPATH = $(DESTDIR)/man
+# MANDIR = $(MANSOURCEPATH)1
+EXTRA_LIBRARIES = $(XLIB)
# I like my programs optimized, stripped, and setuid. Do what you like.
- INSTPGMFLAGS = $(INSTUIDFLAGS) -s
- CDEBUGFLAGS = -O4
+INSTPGMFLAGS = -s
+CDEBUGFLAGS = -O2
# Since my programs are setuid, I make the data files readable only by me.
- INSTDATFLAGS = -m 0600
+INSTDATFLAGS = -m 0644
# These defines are needed by jetpack. Delete the -DBLIT if you don't want
# the game to do all the drawing to an offscreen pixmap. (This is good for
# machines that don't have hardware blitting -- if you have an xterm or a
# graphics workhorse, leave it in, there will be no flicker)
- DEFINES = -DBLIT -DSCOREPATH=\"$(SCOREFILE)\" -DLEVELPATH=\"$(LEVELFILE)\"
+# DEFINES = -DBLIT -DSCOREPATH=\"$(SCOREFILE)\" -DLEVELPATH=\"$(LEVELFILE)\"
+DEFINES = -DSCOREPATH=\"$(SCOREFILE)\" -DLEVELPATH=\"$(LEVELFILE)\"
# The score file can be any name you like, just make sure the directory
# it's supposed to reside in exists, or jetpack will start creating score
# files in the directories it is run from. Same for the level files, only
# the filename you give here is only a prefix -- the complete filename has
# the level number appended to it.
- SCOREFILE = $(USRLIBDIR)/jetpack.scores
- LEVELFILE = $(USRLIBDIR)/jetpack.lev
+SCOREFILE = /var/games/jetpack.scores
+LEVELFILE = $(LIBDIR)/jetpack.lev
ComplexProgramTarget(jetpack)
DependTarget()
DependDependency()
-InstallNonExec(levels/000,$(LEVELFILE)000)
+install::
+ MakeDir(${DESTDIR}$(LIBDIR))
-# oops, I can't figure how to override the template default to install the
-# man page as jetpack.1, so I install both and remove the bad one.
-install.man:: jetpack.man
- $(INSTALL) -c $(INSTMANFLAGS) jetpack.man $(MANDIR)/jetpack.1
- @rm -f $(MANDIR)/jetpack.n
+InstallNonExec(levels/000,$(LEVELFILE)000)
+37
View File
@@ -0,0 +1,37 @@
$NetBSD: patch-ad,v 1.3 1998/11/12 23:34:31 frueauf Exp $
--- initx.c.orig Sun Mar 29 12:41:21 1992
+++ initx.c Thu Aug 27 10:32:51 1998
@@ -44,14 +44,19 @@
resulting fontname right into the code.
*/
-static char *fontname = "-*-fixed-medium-r-normal--*-70-*-*-c-*-*-*";
+static char *fontname = "-misc-fixed-medium-r-semicondensed--13-120-75-75-c-*-*-*";
static char *bigfontname = "-*-courier-bold-r-normal--*-180-*-*-m-150-*-*";
/* init_X opens the display and sets up all the color stuff
*/
init_X()
{
- display = XOpenDisplay(NULL);
+ int saved_euid;
+
+ saved_euid = geteuid();
+ seteuid(getuid());
+ display = XOpenDisplay("");
+ seteuid(saved_euid);
if (display == NULL) {
fprintf(stderr, "Jetpack : Cannot connect to X Server %s\n",
XDisplayName(NULL));
@@ -162,8 +167,8 @@
case CWHITE:
tmpcolor.pixel = pixel | planes[2] | planes[1] | planes[0];
break;
- }
- XStoreColor(display, colormap, &tmpcolor);
+ } /*Store*/
+ XAllocColor(display, colormap, &tmpcolor);
ctable[i].pixelvalue = tmpcolor.pixel;
}
}
+27
View File
@@ -0,0 +1,27 @@
$NetBSD: patch-defs.h,v 1.1 2013/01/15 15:19:05 joerg Exp $
--- defs.h.orig 2013-01-14 16:27:35.000000000 +0000
+++ defs.h
@@ -135,6 +135,8 @@ extern int xdir[4], ydir[4];
#define MEXIT 5
#define MQUIT 6
+void dumb_message(int kind);
+
/* Structure used to store the messages triggered in certain areas of a
level
*/
@@ -319,3 +321,13 @@ extern int men, score, bonus, bonustimer
*/
extern int paused, leveldone, gameover, lastscore;
+extern int usecdelay;
+
+void death(void);
+void demo(void);
+void check_score(void);
+void open_scores(void);
+void place_fuel(int x, int y);
+void place_sweeper(int x, int y, int floor, int rot, int speed);
+void place_guard(int x, int y, int dir, int speed);
+void place_fireball(int x, int y, int dx, int dy);
+13
View File
@@ -0,0 +1,13 @@
$NetBSD: patch-demo.c,v 1.1 2013/01/15 15:19:05 joerg Exp $
--- demo.c.orig 2013-01-14 16:34:45.000000000 +0000
+++ demo.c
@@ -13,7 +13,7 @@ int demostage, demodelay;
the demo, and demo_player does the actual player action. The level
itself is special level 0.
*/
-demo()
+void demo(void)
{
register unsigned long timer;
+31
View File
@@ -0,0 +1,31 @@
$NetBSD: patch-draw.c,v 1.1 2013/01/15 15:19:05 joerg Exp $
--- draw.c.orig 1992-03-29 19:41:14.000000000 +0000
+++ draw.c
@@ -4,6 +4,8 @@
#include "copyright.h"
#include "defs.h"
+static void draw_player(void);
+
Pixmap drawpixmap;
char fuelstring[20] = "Fuel: ";
@@ -68,7 +70,7 @@ draw_maze()
/* draw_player draws the player in the center of the window
*/
-draw_player()
+static void draw_player(void)
{
if(dead) return;
if(exploded > -1) {
@@ -533,7 +535,7 @@ title_refresh()
y, CGREY, fontinfo);
y += fontinfo->descent + fontinfo->ascent;
place_string(
- " center button : fire jetpack ",
+ " center button : fire jetpack T : turbo ",
y, CYELLOW, fontinfo);
y += fontinfo->descent + 10 + fontinfo->ascent;
place_string("Extra Player awarded every 10000 points", y, CGREY,
+57
View File
@@ -0,0 +1,57 @@
$NetBSD: patch-erase.c,v 1.1 2013/01/15 15:19:05 joerg Exp $
--- erase.c.orig 1992-03-29 19:41:20.000000000 +0000
+++ erase.c
@@ -8,9 +8,12 @@
/* Note: the functions and variables in this file are not used in the
blitting version.
*/
+static void draw_recur(int i);
+static void erase_recur(int i);
#ifndef BLIT
+#define MAXTOUCH 10
#define MAXOBJECTS 6+MAXLINES+MAXFIREBALLS+MAXSWEEPERS+MAXFUELPODS+MAXGUARDS+MAXHIGHSCORES/5
/* Structure for eraseable zones that minimize flicker
@@ -19,7 +22,7 @@ struct zone {
int type, num;
int x, y, w, h;
int numtouch;
- int touch[MAXOBJECTS];
+ int touch[MAXTOUCH];
int erased, drawn;
};
@@ -57,6 +60,10 @@ int x, y, w, h, type, num;
if(zone_intersect(numzones,j)) {
zones[j].touch[zones[j].numtouch] = numzones;
zones[j].numtouch++;
+ if (zones[j].numtouch == MAXTOUCH) {
+ zones[j].numtouch = -1;
+ printf("Reached maxtouch for zone %d\n", numzones);
+ }
break;
}
}
@@ -115,8 +122,7 @@ erase_draw_zones()
/* erase_recur erases zone i and all the zones that touch it.
*/
-erase_recur(i)
-int i;
+static void erase_recur(int i)
{
register int j;
@@ -137,8 +143,7 @@ int i;
/* draw_recur draws the object associated with zone i and the objects
associated with all the zones that touch it.
*/
-draw_recur(i)
-int i;
+static void draw_recur(int i)
{
register int j, tmp;
+43
View File
@@ -0,0 +1,43 @@
$NetBSD: patch-events.c,v 1.1 2013/01/15 15:19:05 joerg Exp $
--- events.c.orig 1992-03-29 19:41:27.000000000 +0000
+++ events.c
@@ -4,6 +4,8 @@
#include "copyright.h"
#include "defs.h"
+int usecdelay = USECDELAY;
+
/* event_filter handles game events
*/
int event_filter()
@@ -86,6 +88,13 @@ XKeyEvent *event;
XLookupString(event, &buf, 1, &key, &i);
switch(key) {
+ case 't':
+ case 'T':
+ if (usecdelay == USECDELAY)
+ usecdelay = USECDELAY/1.5;
+ else
+ usecdelay = USECDELAY;
+ break;
case XK_KP_4:
case 'a':
case 'A':
@@ -115,6 +124,7 @@ XKeyEvent *event;
}
break;
case 'Q':
+ case 'q':
if(dead) break;
dead = 1;
deadtimer = 50;
@@ -124,6 +134,7 @@ XKeyEvent *event;
dumb_message(MQUIT);
break;
case 'p':
+ case 'P':
if(paused) {
paused = 0;
bigmessagetime = 0;
+13
View File
@@ -0,0 +1,13 @@
$NetBSD: patch-gameover.c,v 1.1 2013/01/15 15:19:05 joerg Exp $
--- gameover.c.orig 2013-01-14 16:36:44.000000000 +0000
+++ gameover.c
@@ -8,7 +8,7 @@ int dead, deadtimer;
/* death is called when a player is killed.
*/
-death()
+void death(void)
{
men--;
if(men < 0) {
+22
View File
@@ -0,0 +1,22 @@
$NetBSD: patch-main.c,v 1.1 2013/01/15 15:19:05 joerg Exp $
--- main.c.orig 2013-01-14 16:27:35.000000000 +0000
+++ main.c
@@ -90,7 +90,7 @@ main()
begin_timer();
while(paused) {
while(XPending(display) && !event_filter());
- usleep(USECDELAY);
+ usleep(usecdelay);
}
while(XPending(display) && !event_filter());
update();
@@ -111,7 +111,7 @@ main()
busy, and you shouldn't be playing anyway.
*/
timer = get_timer();
- if(timer < USECDELAY) usleep(USECDELAY - timer);
+ if(timer < usecdelay) usleep(usecdelay - timer);
}
}
}
+14
View File
@@ -0,0 +1,14 @@
$NetBSD: patch-message.c,v 1.1 2013/01/15 15:19:05 joerg Exp $
--- message.c.orig 2013-01-14 16:37:42.000000000 +0000
+++ message.c
@@ -51,8 +51,7 @@ int color, time;
Called dumb because the procedure is ugly and the messages are mostly
snide remarks.
*/
-dumb_message(kind)
-int kind;
+void dumb_message(int kind)
{
register int opinion, num;
+28
View File
@@ -0,0 +1,28 @@
$NetBSD: patch-scores.c,v 1.1 2013/01/15 15:19:05 joerg Exp $
--- scores.c.orig 1992-03-29 19:41:16.000000000 +0000
+++ scores.c
@@ -30,12 +30,12 @@ int dialogwidth, dialogheight;
/* open_scores tries to open the score file, and if it can't it tries to
create one.
*/
-open_scores()
+void open_scores(void)
{
numhighs = 0;
scorefd = open(SCOREPATH, O_RDWR);
if(scorefd == -1) {
- scorefd = open(SCOREPATH, O_RDWR | O_CREAT, 0444);
+ scorefd = open(SCOREPATH, O_RDWR | O_CREAT, 0644);
if(scorefd == -1) {
scorefd = open("jetpack.scores", O_RDWR);
if(scorefd == -1) {
@@ -133,7 +133,7 @@ read_new_scores()
table, and if it makes it, gets the player's name and saves the new
high scores in the file.
*/
-check_score()
+void check_score(void)
{
register int i, spot;
char buf[MAXNAMELENGTH];
+63
View File
@@ -0,0 +1,63 @@
$NetBSD: patch-setup.c,v 1.1 2013/01/15 15:19:05 joerg Exp $
--- setup.c.orig 1992-03-29 19:41:23.000000000 +0000
+++ setup.c
@@ -4,6 +4,8 @@
#include "copyright.h"
#include "defs.h"
+static void random_fuel(int num);
+
/* make_random_level takes its huge list of arguments and creates a
level.
*/
@@ -115,8 +117,7 @@ random_player()
[dx,dy]. The coordinates are modified to so the fireball won't sit on
a wall.
*/
-place_fireball(x, y, dx, dy)
-int x, y, dx, dy;
+void place_fireball(int x, int y, int dx, int dy)
{
if(numfire == MAXFIREBALLS) return;
nx = x;
@@ -161,8 +162,7 @@ int num, min, max;
/* place_guard puts a guard at maze location (x,y) with direction dir and
speed speed
*/
-place_guard(x, y, dir, speed)
-int x, y, dir, speed;
+void place_guard(int x, int y, int dir, int speed)
{
if(numguard == MAXGUARDS) return;
guardx[numguard] = x * mazescale + mazescale / 2;
@@ -205,8 +205,7 @@ int num, min, max;
/* place_sweeper puts a sweeper at maze location (x,y) with a floor
direction of floor, rotation of rot, and speed speed
*/
-place_sweeper(x, y, floor, rot, speed)
-int x, y, floor, rot, speed;
+void place_sweeper(int x, int y, int floor, int rot, int speed)
{
if(numsweep == MAXSWEEPERS) return;
sweepx[numsweep] = x * mazescale + mazescale / 2 + xdir[floor] *
@@ -272,8 +271,7 @@ int num, min, max;
/* place_fuel puts a fuel pod at world location (x,y). The coordinates
are modified so the pod won't sit on a wall.
*/
-place_fuel(x, y)
-int x, y;
+void place_fuel(int x, int y)
{
if(numfuel == MAXFUELPODS) return;
nx = x;
@@ -288,8 +286,7 @@ int x, y;
/* random_fuel places num fuel pods in the maze. The coordinates are
generated so they don't sit on walls or too close together.
*/
-random_fuel(num)
-int num;
+static void random_fuel(int num)
{
register int i, j, ok, radius;
+22
View File
@@ -0,0 +1,22 @@
$NetBSD: patch-update.c,v 1.1 2013/01/15 15:19:05 joerg Exp $
--- update.c.orig 2013-01-14 16:42:03.000000000 +0000
+++ update.c
@@ -4,6 +4,8 @@
#include "copyright.h"
#include "defs.h"
+static void update_player(void);
+
int plx, ply, burn, playerphase, playerdir, playervert, playerfuel,
walk, waiting, exploded, explodetimer;
@@ -39,7 +41,7 @@ update()
/* update_player updates the player
*/
-update_player()
+static void update_player(void)
{
register int flags;