Bug 175572 - games/xchomp: Update MASTER_SITES
Summary: games/xchomp: Update MASTER_SITES
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Martin Wilke
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-25 21:10 UTC by tkato432
Modified: 2013-02-04 14:40 UTC (History)
0 users

See Also:


Attachments
file.diff (16.32 KB, patch)
2013-01-25 21:10 UTC, tkato432
no flags Details | Diff
games_xchomp.diff (16.29 KB, patch)
2013-01-31 18:27 UTC, tkato432
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description tkato432 2013-01-25 21:10:02 UTC
- 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
Comment 1 Edwin Groothuis freebsd_committer 2013-01-25 21:10:36 UTC
Responsible Changed
From-To: freebsd-ports-bugs->araujo

araujo@ wants this submitter's PRs (via the GNATS Auto Assign Tool)
Comment 2 tkato432 2013-01-31 18:27:07 UTC
Remake of the patch against current tree.
Comment 3 Martin Wilke freebsd_committer 2013-02-04 14:30:04 UTC
Responsible Changed
From-To: araujo->miwi

I'll take it.
Comment 4 Martin Wilke freebsd_committer 2013-02-04 14:30:09 UTC
State Changed
From-To: open->closed

Committed. Thanks!
Comment 5 dfilter service freebsd_committer 2013-02-04 14:30:18 UTC
Author: miwi
Date: Mon Feb  4 14:30:02 2013
New Revision: 311621
URL: http://svnweb.freebsd.org/changeset/ports/311621

Log:
  - Update MASTER_SITES
  - Fix build with clang
  - Add MAKE_JOBS_SAFE
  
  PR:		175572
  Submitted by:	Ports Fury

Added:
  head/games/xchomp/files/patch-contact.c   (contents, props changed)
  head/games/xchomp/files/patch-demo.c   (contents, props changed)
  head/games/xchomp/files/patch-drivers.c   (contents, props changed)
  head/games/xchomp/files/patch-main.c   (contents, props changed)
  head/games/xchomp/files/patch-maze.c   (contents, props changed)
  head/games/xchomp/files/patch-props.c   (contents, props changed)
  head/games/xchomp/files/patch-resources.c   (contents, props changed)
  head/games/xchomp/files/patch-status.c   (contents, props changed)
  head/games/xchomp/files/patch-xchomp.h   (contents, props changed)
Deleted:
  head/games/xchomp/files/patch-ac
  head/games/xchomp/files/patch-ad
  head/games/xchomp/files/patch-ae
Modified:
  head/games/xchomp/Makefile   (contents, props changed)

Modified: head/games/xchomp/Makefile
==============================================================================
--- head/games/xchomp/Makefile	Mon Feb  4 14:28:34 2013	(r311620)
+++ head/games/xchomp/Makefile	Mon Feb  4 14:30:02 2013	(r311621)
@@ -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>

Added: head/games/xchomp/files/patch-contact.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/xchomp/files/patch-contact.c	Mon Feb  4 14:30:02 2013	(r311621)
@@ -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;
+ {
+ }

Added: head/games/xchomp/files/patch-demo.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/xchomp/files/patch-demo.c	Mon Feb  4 14:30:02 2013	(r311621)
@@ -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,

Added: head/games/xchomp/files/patch-drivers.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/xchomp/files/patch-drivers.c	Mon Feb  4 14:30:02 2013	(r311621)
@@ -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);

Added: head/games/xchomp/files/patch-main.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/xchomp/files/patch-main.c	Mon Feb  4 14:30:02 2013	(r311621)
@@ -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);

Added: head/games/xchomp/files/patch-maze.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/xchomp/files/patch-maze.c	Mon Feb  4 14:30:02 2013	(r311621)
@@ -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;

Added: head/games/xchomp/files/patch-props.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/xchomp/files/patch-props.c	Mon Feb  4 14:30:02 2013	(r311621)
@@ -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);

Added: head/games/xchomp/files/patch-resources.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/xchomp/files/patch-resources.c	Mon Feb  4 14:30:02 2013	(r311621)
@@ -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;
+

Added: head/games/xchomp/files/patch-status.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/xchomp/files/patch-status.c	Mon Feb  4 14:30:02 2013	(r311621)
@@ -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);

Added: head/games/xchomp/files/patch-xchomp.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/xchomp/files/patch-xchomp.h	Mon Feb  4 14:30:02 2013	(r311621)
@@ -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();
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"