Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 26 Jan 2013 05:49:04 +0900
From:      KATO Tsuguru <tkato432@yahoo.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/175572: games/xchomp: Update MASTER_SITES
Message-ID:  <20130126054904.bab92598543593de8ea90ba9@yahoo.com>
Resent-Message-ID: <201301252110.r0PLA2IF074940@freefall.freebsd.org>

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

>Number:         175572
>Category:       ports
>Synopsis:       games/xchomp: Update MASTER_SITES
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jan 25 21:10:02 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     KATO Tsuguru
>Release:        FreeBSD 7.4-RELEASE-p11 i386
>Organization:
>Environment:
>Description:
- Update MASTER_SITES
- Fix build with clang
- Add MAKE_JOBS_SAFE

New file:
files/patch-contact.c
files/patch-demo.c
files/patch-drivers.c
files/patch-main.c
files/patch-maze.c
files/patch-props.c
files/patch-resources.c
files/patch-status.c
files/patch-xchomp.h

Remove file:
files/patch-ac
files/patch-ad
files/patch-ae

>How-To-Repeat:
>Fix:

diff -urN /usr/ports/games/xchomp/Makefile games/xchomp/Makefile
--- /usr/ports/games/xchomp/Makefile	2012-11-08 07:35:40.000000000 +0900
+++ games/xchomp/Makefile	2013-01-12 21:57:48.000000000 +0900
@@ -1,22 +1,21 @@
-# New ports collection makefile for:    xchomp
-# Date created:         4 Jan 1995
-# Whom:                 swallace
-#
-# $FreeBSD: head/games/xchomp/Makefile 300896 2012-07-14 13:54:48Z beat $
-#
+# Created by: swallace
+# $FreeBSD: ports/games/xchomp/Makefile,v 1.20 2009/06/09 15:33:00 amdmi3 Exp $
 
 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 -urN /usr/ports/games/xchomp/files/patch-ac games/xchomp/files/patch-ac
--- /usr/ports/games/xchomp/files/patch-ac	2012-11-08 07:35:40.000000000 +0900
+++ games/xchomp/files/patch-ac	1970-01-01 09:00:00.000000000 +0900
@@ -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 -urN /usr/ports/games/xchomp/files/patch-ad games/xchomp/files/patch-ad
--- /usr/ports/games/xchomp/files/patch-ad	2012-11-08 07:35:40.000000000 +0900
+++ games/xchomp/files/patch-ad	1970-01-01 09:00:00.000000000 +0900
@@ -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 -urN /usr/ports/games/xchomp/files/patch-ae games/xchomp/files/patch-ae
--- /usr/ports/games/xchomp/files/patch-ae	2012-11-08 07:35:40.000000000 +0900
+++ games/xchomp/files/patch-ae	1970-01-01 09:00:00.000000000 +0900
@@ -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 -urN /usr/ports/games/xchomp/files/patch-contact.c games/xchomp/files/patch-contact.c
--- /usr/ports/games/xchomp/files/patch-contact.c	1970-01-01 09:00:00.000000000 +0900
+++ games/xchomp/files/patch-contact.c	2013-01-12 21:52:30.000000000 +0900
@@ -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 -urN /usr/ports/games/xchomp/files/patch-demo.c games/xchomp/files/patch-demo.c
--- /usr/ports/games/xchomp/files/patch-demo.c	1970-01-01 09:00:00.000000000 +0900
+++ games/xchomp/files/patch-demo.c	2013-01-12 21:52:56.000000000 +0900
@@ -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 -urN /usr/ports/games/xchomp/files/patch-drivers.c games/xchomp/files/patch-drivers.c
--- /usr/ports/games/xchomp/files/patch-drivers.c	1970-01-01 09:00:00.000000000 +0900
+++ games/xchomp/files/patch-drivers.c	2013-01-12 21:53:16.000000000 +0900
@@ -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 -urN /usr/ports/games/xchomp/files/patch-main.c games/xchomp/files/patch-main.c
--- /usr/ports/games/xchomp/files/patch-main.c	1970-01-01 09:00:00.000000000 +0900
+++ games/xchomp/files/patch-main.c	2013-01-12 21:53:34.000000000 +0900
@@ -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 -urN /usr/ports/games/xchomp/files/patch-maze.c games/xchomp/files/patch-maze.c
--- /usr/ports/games/xchomp/files/patch-maze.c	1970-01-01 09:00:00.000000000 +0900
+++ games/xchomp/files/patch-maze.c	2013-01-12 21:53:50.000000000 +0900
@@ -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 -urN /usr/ports/games/xchomp/files/patch-props.c games/xchomp/files/patch-props.c
--- /usr/ports/games/xchomp/files/patch-props.c	1970-01-01 09:00:00.000000000 +0900
+++ games/xchomp/files/patch-props.c	2013-01-12 21:54:07.000000000 +0900
@@ -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 -urN /usr/ports/games/xchomp/files/patch-resources.c games/xchomp/files/patch-resources.c
--- /usr/ports/games/xchomp/files/patch-resources.c	1970-01-01 09:00:00.000000000 +0900
+++ games/xchomp/files/patch-resources.c	2013-01-12 21:54:48.000000000 +0900
@@ -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 -urN /usr/ports/games/xchomp/files/patch-status.c games/xchomp/files/patch-status.c
--- /usr/ports/games/xchomp/files/patch-status.c	1970-01-01 09:00:00.000000000 +0900
+++ games/xchomp/files/patch-status.c	2013-01-12 21:55:06.000000000 +0900
@@ -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 -urN /usr/ports/games/xchomp/files/patch-xchomp.h games/xchomp/files/patch-xchomp.h
--- /usr/ports/games/xchomp/files/patch-xchomp.h	1970-01-01 09:00:00.000000000 +0900
+++ games/xchomp/files/patch-xchomp.h	2013-01-12 22:06:14.000000000 +0900
@@ -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();
>Release-Note:
>Audit-Trail:
>Unformatted:



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