diff options
author | miwi <miwi@FreeBSD.org> | 2013-02-04 22:30:02 +0800 |
---|---|---|
committer | miwi <miwi@FreeBSD.org> | 2013-02-04 22:30:02 +0800 |
commit | eeeeb0b0da702e210bbde76d359e983d33bcb4ad (patch) | |
tree | 282265cf232525e9af5b4289080a1b396deb233e | |
parent | 100b28090fb7709e775db98cc4195e342bf341b4 (diff) | |
download | freebsd-ports-gnome-eeeeb0b0da702e210bbde76d359e983d33bcb4ad.tar.gz freebsd-ports-gnome-eeeeb0b0da702e210bbde76d359e983d33bcb4ad.tar.zst freebsd-ports-gnome-eeeeb0b0da702e210bbde76d359e983d33bcb4ad.zip |
- Update MASTER_SITES
- Fix build with clang
- Add MAKE_JOBS_SAFE
PR: 175572
Submitted by: Ports Fury
-rw-r--r-- | games/xchomp/Makefile | 15 | ||||
-rw-r--r-- | games/xchomp/files/patch-ac | 9 | ||||
-rw-r--r-- | games/xchomp/files/patch-ad | 9 | ||||
-rw-r--r-- | games/xchomp/files/patch-ae | 16 | ||||
-rw-r--r-- | games/xchomp/files/patch-contact.c | 29 | ||||
-rw-r--r-- | games/xchomp/files/patch-demo.c | 20 | ||||
-rw-r--r-- | games/xchomp/files/patch-drivers.c | 97 | ||||
-rw-r--r-- | games/xchomp/files/patch-main.c | 76 | ||||
-rw-r--r-- | games/xchomp/files/patch-maze.c | 20 | ||||
-rw-r--r-- | games/xchomp/files/patch-props.c | 74 | ||||
-rw-r--r-- | games/xchomp/files/patch-resources.c | 102 | ||||
-rw-r--r-- | games/xchomp/files/patch-status.c | 37 | ||||
-rw-r--r-- | games/xchomp/files/patch-xchomp.h | 67 |
13 files changed, 529 insertions, 42 deletions
diff --git a/games/xchomp/Makefile b/games/xchomp/Makefile index 2ddbc4100d9a..717519a3ad4c 100644 --- a/games/xchomp/Makefile +++ b/games/xchomp/Makefile @@ -1,22 +1,21 @@ -# New ports collection makefile for: xchomp -# Date created: 4 Jan 1995 -# Whom: swallace -# +# Created by: swallace # $FreeBSD$ -# PORTNAME= xchomp PORTVERSION= pl1 PORTREVISION= 2 CATEGORIES= games -MASTER_SITES= ftp://ftp.x.org/R5contrib/ +MASTER_SITES= XCONTRIB/../R5contrib MAINTAINER= ports@FreeBSD.org COMMENT= Pac-man-like game under X11 -PLIST_FILES= bin/xchomp WRKSRC= ${WRKDIR}/xchomp -USE_IMAKE= yes + USE_XORG= x11 xext +USE_IMAKE= yes +MAKE_JOBS_SAFE= yes + +PLIST_FILES= bin/xchomp .include <bsd.port.mk> diff --git a/games/xchomp/files/patch-ac b/games/xchomp/files/patch-ac deleted file mode 100644 index 59bf4f7717b8..000000000000 --- a/games/xchomp/files/patch-ac +++ /dev/null @@ -1,9 +0,0 @@ ---- demo.c.orig Fri Mar 18 06:12:23 1994 -+++ demo.c Thu Mar 16 15:45:38 2000 -@@ -128,5 +128,5 @@ - switch (event.type) { - case KeyPress: -- XLookupString(&event, &c_buf, 1, &last_key, &status); -+ XLookupString((XKeyEvent *) &event, &c_buf, 1, &last_key, &status); - if ((last_key == XK_q) || (last_key == XK_Q)) - do_exit(); diff --git a/games/xchomp/files/patch-ad b/games/xchomp/files/patch-ad deleted file mode 100644 index bf641a2df995..000000000000 --- a/games/xchomp/files/patch-ad +++ /dev/null @@ -1,9 +0,0 @@ ---- main.c.orig Fri Mar 18 06:12:24 1994 -+++ main.c Thu Mar 16 15:45:54 2000 -@@ -167,5 +167,5 @@ - switch (event.type) { - case KeyPress: -- XLookupString(&event, &c_buf, 1, &last_key, &status); -+ XLookupString((XKeyEvent *) &event, &c_buf, 1, &last_key, &status); - if (last_key == XK_space) - if (!pause_seq()) diff --git a/games/xchomp/files/patch-ae b/games/xchomp/files/patch-ae deleted file mode 100644 index 9c4c06957fb1..000000000000 --- a/games/xchomp/files/patch-ae +++ /dev/null @@ -1,16 +0,0 @@ ---- props.c.orig Fri Mar 18 06:13:17 1994 -+++ props.c Thu Mar 16 15:46:08 2000 -@@ -116,5 +116,5 @@ - switch (event.type) { - case KeyPress: -- XLookupString(&event, &c_buf, 1, &last_key, &status); -+ XLookupString((XKeyEvent *) &event, &c_buf, 1, &last_key, &status); - if ((last_key == XK_q) || (last_key == XK_Q)) - do_exit(); -@@ -176,5 +176,5 @@ - switch (event.type) { - case KeyPress: -- XLookupString(&event, &c_buf, 1, &last_key, &status); -+ XLookupString((XKeyEvent *) &event, &c_buf, 1, &last_key, &status); - if (last_key == XK_space) - if (!pause_seq()) diff --git a/games/xchomp/files/patch-contact.c b/games/xchomp/files/patch-contact.c new file mode 100644 index 000000000000..1a0635e26af3 --- /dev/null +++ b/games/xchomp/files/patch-contact.c @@ -0,0 +1,29 @@ +--- contact.c.orig ++++ contact.c +@@ -17,7 +17,7 @@ + * with which the player collided. In this case, it doesn't matter. + */ + /*ARGSUSED*/ +-die(dummy) ++void die(dummy) + int dummy; + { + register int xx = pac_x, yy = pac_y, i, dx, dy; +@@ -116,7 +116,7 @@ + * of the eaten ghost, and then continues. The parameter is + * the array index of the eaten ghost. + */ +-eat(i) ++void eat(i) + int i; + { + register int xx = pac_x, yy = pac_y, j; +@@ -166,7 +166,7 @@ + * The eyes are harmless; this is a no-op. + */ + /*ARGSUSED*/ +-noop(dummy) ++void noop(dummy) + int dummy; + { + } diff --git a/games/xchomp/files/patch-demo.c b/games/xchomp/files/patch-demo.c new file mode 100644 index 000000000000..86c948848142 --- /dev/null +++ b/games/xchomp/files/patch-demo.c @@ -0,0 +1,20 @@ +--- demo.c.orig ++++ demo.c +@@ -6,7 +6,7 @@ + * for the game. + */ + +-demo_seq() ++void demo_seq() + { + int i, xx, yy, direction, ascent, descent, len; + XCharStruct chars; +@@ -127,7 +127,7 @@ + if (event.xany.window != window) continue; + switch (event.type) { + case KeyPress: +- XLookupString(&event, &c_buf, 1, &last_key, &status); ++ XLookupString((XKeyEvent *) &event, &c_buf, 1, &last_key, &status); + if ((last_key == XK_q) || (last_key == XK_Q)) + do_exit(); + XFillRectangle(display, window, clearGC, 0, 0, WIN_WIDTH, diff --git a/games/xchomp/files/patch-drivers.c b/games/xchomp/files/patch-drivers.c new file mode 100644 index 000000000000..0e87f3d22910 --- /dev/null +++ b/games/xchomp/files/patch-drivers.c @@ -0,0 +1,97 @@ +--- drivers.c.orig ++++ drivers.c +@@ -12,7 +12,7 @@ + * variables (pac_x, pac_y), the direction variables (pac_ix, pac_iy), + * and the clipping region (pac_region). + */ +-control_pac() ++void control_pac() + { + register int xx = pac_x, yy = pac_y, i, dx, dy; + register char *pc = md[yy >> 4] + (xx >> 4); +@@ -89,7 +89,7 @@ + * eaten something which is not a ghost -- a dot, a power-dot, + * or the fruit. If so, the appropriate action is taken. + */ +-check_dots() ++void check_dots() + { + register char *pi; + register int i; +@@ -218,7 +218,7 @@ + * The function below causes ghosts to follow the player around, with a bit + * of randomness thrown in as well. + */ +-follow(i) ++void follow(i) + register int i; + { + int xx = ghost_x[i], yy = ghost_y[i]; +@@ -289,7 +289,7 @@ + * at half speed. It is set up as the driver function during + * the ghost-eating periods of the game. + */ +-run(i) ++void run(i) + register int i; + { + int xx = ghost_x[i], yy = ghost_y[i]; +@@ -358,7 +358,7 @@ + * high speed. It is set up as the driver for ghosts which have + * been eaten. + */ +-go_home(i) ++void go_home(i) + register int i; + { + int xx = ghost_x[i], yy = ghost_y[i]; +@@ -459,14 +459,14 @@ + * They simply hover around in a circular pattern. Randomness is + * used to decide when the ghosts leave the box. + */ +-hover(i) ++void hover(i) + register int i; + { + register int yy = ghost_y[i] >> 4, xx = ghost_x[i] >> 4; + char *pc = md[yy] + xx; + register int *px = ghost_ix + i, *py = ghost_iy + i; + +- if (xx == door_x) ++ if (xx == door_x) { + if (yy == (door_y - 1)) { + + /* +@@ -490,6 +490,7 @@ + *px = 0, *py = (-2); + return; + } ++ } + + /* + * The rest of the function drives the ghost around the +@@ -514,14 +515,14 @@ + * the ghost-eating periods of the game -- they move at half + * speed. + */ +-hover2(i) ++void hover2(i) + register int i; + { + register int yy = ghost_y[i] >> 4, xx = ghost_x[i] >> 4; + char *pc = md[yy] + xx; + register int *px = ghost_ix + i, *py = ghost_iy + i; + +- if (xx == door_x) ++ if (xx == door_x) { + if (yy == (door_y - 1)) { + drive[i] = run; + run(i); +@@ -532,6 +533,7 @@ + *px = 0, *py = (-1); + return; + } ++ } + + if (*px > 0) { + if (pc[1]) *px = 0, *py = (-1); diff --git a/games/xchomp/files/patch-main.c b/games/xchomp/files/patch-main.c new file mode 100644 index 000000000000..8cf838de2a4b --- /dev/null +++ b/games/xchomp/files/patch-main.c @@ -0,0 +1,76 @@ +--- main.c.orig ++++ main.c +@@ -2,7 +2,7 @@ + #define EXTERN + #include "xchomp.h" + +-main(argc, argv) ++int main(argc, argv) + int argc; + char *argv[]; + { +@@ -10,6 +10,12 @@ + int dummy; + XCharStruct chars; + unsigned long event_mask; ++ int fdelay = 0; ++ ++ /* User may set FRAME_DELAY from the command line */ ++ if (argc >= 2) { ++ fdelay = atoi(argv[1]); ++ } + + /* open the display */ + display = XOpenDisplay(NULL); +@@ -64,17 +70,18 @@ + } + + /* go to it */ +- play_game(); ++ play_game(fdelay); + + /* exit */ + do_exit(); ++ return 0; + } + + + /* + * The following function contains the main game loop. + */ +-play_game() { ++void play_game(fdelay) { + register int i; + char c_buf; + XComposeStatus status; +@@ -166,7 +173,7 @@ + if (event.xany.window != window) continue; + switch (event.type) { + case KeyPress: +- XLookupString(&event, &c_buf, 1, &last_key, &status); ++ XLookupString((XKeyEvent *) &event, &c_buf, 1, &last_key, &status); + if (last_key == XK_space) + if (!pause_seq()) + goto demo; +@@ -325,7 +332,11 @@ + XSync(display, False); + + #ifdef FRAME_DELAY +- usleep(FRAME_DELAY); ++ if (fdelay > 0) { ++ usleep(fdelay); ++ } else { ++ usleep(FRAME_DELAY); ++ } + #endif + + } /* while */ +@@ -347,7 +358,7 @@ + } + + +-do_exit() ++void do_exit() + { + destroy_regions(); + XUnmapWindow(display, window); diff --git a/games/xchomp/files/patch-maze.c b/games/xchomp/files/patch-maze.c new file mode 100644 index 000000000000..eb46b60fde7e --- /dev/null +++ b/games/xchomp/files/patch-maze.c @@ -0,0 +1,20 @@ +--- maze.c.orig ++++ maze.c +@@ -124,7 +124,7 @@ + "z---x---x---x---x---c" } }; + + +-read_maze(num) ++void read_maze(num) + int num; + { + int i, xx, yy; +@@ -259,7 +259,7 @@ + * The function which follows is used at the beginning of each level to + * set up the initial parameters for all of the moving figures. + */ +-position_players() ++void position_players() + { + int i; + XRectangle ghost_rect[MAX_GHOSTS], pac_rect; diff --git a/games/xchomp/files/patch-props.c b/games/xchomp/files/patch-props.c new file mode 100644 index 000000000000..f6739de4c29a --- /dev/null +++ b/games/xchomp/files/patch-props.c @@ -0,0 +1,74 @@ +--- props.c.orig ++++ props.c +@@ -9,7 +9,7 @@ + + + /* the get-ready sequence */ +-get_ready() ++void get_ready() + { + int xx, yy, i; + int direction, ascent, descent; +@@ -41,7 +41,7 @@ + + + /* the game-over sequence */ +-game_over() ++void game_over() + { + int xx, yy; + int direction, ascent, descent; +@@ -64,7 +64,7 @@ + + + /* the end-of-level sequence -- the screen flashes a few times */ +-finish() ++void finish() + { + int i; + +@@ -115,7 +115,7 @@ + if (event.xany.window != window) continue; + switch (event.type) { + case KeyPress: +- XLookupString(&event, &c_buf, 1, &last_key, &status); ++ XLookupString((XKeyEvent *) &event, &c_buf, 1, &last_key, &status); + if ((last_key == XK_q) || (last_key == XK_Q)) + do_exit(); + if ((last_key == XK_r) || (last_key == XK_R)) +@@ -136,7 +136,7 @@ + } + + +-do_sleep(secs) ++void do_sleep(secs) + { + int i; + +@@ -147,7 +147,7 @@ + } + + +-do_usleep(usecs) ++void do_usleep(usecs) + { + int i, d, r; + +@@ -164,7 +164,7 @@ + } + + +-check_normal_events() ++void check_normal_events() + { + char c_buf; + XEvent event; +@@ -175,7 +175,7 @@ + if (event.xany.window != window) continue; + switch (event.type) { + case KeyPress: +- XLookupString(&event, &c_buf, 1, &last_key, &status); ++ XLookupString((XKeyEvent *) &event, &c_buf, 1, &last_key, &status); + if (last_key == XK_space) + if (!pause_seq()) + longjmp(jb_start, 1); diff --git a/games/xchomp/files/patch-resources.c b/games/xchomp/files/patch-resources.c new file mode 100644 index 000000000000..765a404159f1 --- /dev/null +++ b/games/xchomp/files/patch-resources.c @@ -0,0 +1,102 @@ +--- resources.c.orig ++++ resources.c +@@ -9,7 +9,7 @@ + * contexts. + */ + +-create_window(argc, argv) ++void create_window(argc, argv) + int argc; + char *argv[]; + { +@@ -39,7 +39,7 @@ + } + + +-create_pac() ++void create_pac() + { + int i; + +@@ -127,7 +127,7 @@ + } + + +-create_ghost() ++void create_ghost() + { + int i; + +@@ -164,7 +164,7 @@ + } + + +-create_maze_symbols() ++void create_maze_symbols() + { + int i; + Pixmap empty; +@@ -190,7 +190,7 @@ + } + + +-create_maps() ++void create_maps() + { + powermap = XCreatePixmap(display, root, WIN_WIDTH, WIN_HEIGHT, depth); + save = XCreatePixmap(display, root, WIN_WIDTH, WIN_HEIGHT, depth); +@@ -199,8 +199,7 @@ + } + + +- +-create_fruit() ++void create_fruit() + { + fruit_pix[0] = XCreatePixmapFromBitmapData(display, root, fcherry_bits, + GHOST_SIZE, GHOST_SIZE, 1, 0, 1); +@@ -261,7 +260,7 @@ + } + + +-create_GCs() ++void create_GCs() + { + XGCValues gcv; + unsigned long mask; +@@ -341,7 +340,7 @@ + } + + +-create_demo_images() ++void create_demo_images() + { + demo_mask[0] = XCreatePixmapFromBitmapData(display, root, bigc_bits, + 48, 48, 1, 0, 1); +@@ -380,7 +379,7 @@ + } + + +-clear_maps() ++void clear_maps() + { + XFillRectangle(display, powermap, clearGC, 0, 0, WIN_WIDTH, WIN_HEIGHT); + XFillRectangle(display, save, clearGC, 0, 0, WIN_WIDTH, WIN_HEIGHT); +@@ -388,7 +387,7 @@ + } + + +-create_regions() ++void create_regions() + { + XRectangle full_rect; + int i; +@@ -411,7 +410,7 @@ + } + + +-destroy_regions() ++void destroy_regions() + { + int i; + diff --git a/games/xchomp/files/patch-status.c b/games/xchomp/files/patch-status.c new file mode 100644 index 000000000000..21eca5b6f1ef --- /dev/null +++ b/games/xchomp/files/patch-status.c @@ -0,0 +1,37 @@ +--- status.c.orig ++++ status.c +@@ -8,7 +8,7 @@ + * score, the fruit level, and the number of lives remaining. + */ + +-print_score(incr) ++void print_score(incr) + long incr; + { + static char string[6]; +@@ -48,7 +48,7 @@ + } + + +-display_level(slowly) ++void display_level(slowly) + Bool slowly; + { + int i, xx; +@@ -73,14 +73,14 @@ + } + + +-display_title() ++void display_title() + { + XCopyPlane(display, title, window, fullcopyGC, 0, 0, TITLE_WIDTH, + TITLE_HEIGHT, 12 * GHOST_SIZE, WIN_HEIGHT + 1, 1); + } + + +-restore_status() ++void restore_status() + { + print_score(0L); + (void)set_lives(lives); diff --git a/games/xchomp/files/patch-xchomp.h b/games/xchomp/files/patch-xchomp.h new file mode 100644 index 000000000000..152dd3096b54 --- /dev/null +++ b/games/xchomp/files/patch-xchomp.h @@ -0,0 +1,67 @@ +--- xchomp.h.orig ++++ xchomp.h +@@ -6,6 +6,7 @@ + #include <signal.h> + #include <setjmp.h> + #include <string.h> ++#include <stdlib.h> + + #include <X11/Xlib.h> + #include <X11/Xutil.h> +@@ -74,7 +75,7 @@ + typedef int intm[8]; + typedef char charm[BLOCK_WIDTH]; + typedef charm mazedata[BLOCK_HEIGHT]; +-typedef int (*funcptr)(); ++typedef void (*funcptr)(); + + EXTERN Atom DEC_icon_atom; + +@@ -136,6 +137,44 @@ + + EXTERN jmp_buf jb_start; + +-extern follow(), hover(), hover2(), run(), go_home(); +-extern die(), eat(), noop(); +-extern Bool pause_seq(); ++EXTERN void follow(int); ++EXTERN void run(int); ++EXTERN void go_home(int); ++EXTERN void hover(int); ++EXTERN void hover2(int); ++EXTERN void die(int); ++EXTERN void eat(int); ++EXTERN void noop(int); ++EXTERN Bool pause_seq(); ++ ++void do_exit(); ++void play_game(int); ++void destroy_regions(); ++void create_ghost(); ++void create_pac(); ++void create_fruit(); ++void create_maze_symbols(); ++void create_demo_images(); ++void create_GCs(); ++void create_window(int, char **); ++void create_maps(); ++void create_regions(); ++void demo_seq(); ++void display_title(); ++void print_score(long); ++void display_level(Bool); ++void clear_maps(); ++void read_maze(int); ++void position_players(); ++int set_lives(int); ++void get_ready(); ++void restore_status(); ++void control_pac(); ++void usleep(int); ++void do_sleep(int); ++void do_usleep(int); ++void game_over(); ++void finish(); ++void control_pac(); ++void check_dots(); ++void check_normal_events(); |