aboutsummaryrefslogtreecommitdiffstats
path: root/games
diff options
context:
space:
mode:
authoredwin <edwin@FreeBSD.org>2009-02-22 12:05:02 +0800
committeredwin <edwin@FreeBSD.org>2009-02-22 12:05:02 +0800
commit91403c7362e7fa68c0bcd8b0e2b15732a82d2df9 (patch)
tree91bae1eeb40118ffcb4eddf7cf63290b7bd36758 /games
parentd19c174527722eb80b7f548552fdc4ccc8fcf3f5 (diff)
downloadfreebsd-ports-gnome-91403c7362e7fa68c0bcd8b0e2b15732a82d2df9.tar.gz
freebsd-ports-gnome-91403c7362e7fa68c0bcd8b0e2b15732a82d2df9.tar.zst
freebsd-ports-gnome-91403c7362e7fa68c0bcd8b0e2b15732a82d2df9.zip
Fixed build on 7.x
Removed dependency on gcc2.95
Diffstat (limited to 'games')
-rw-r--r--games/xrally/Makefile12
-rw-r--r--games/xrally/files/patch-global.h42
-rw-r--r--games/xrally/files/patch-graphics.c (renamed from games/xrally/files/patch-xrally-1.1.1)82
-rw-r--r--games/xrally/files/patch-menu.c21
-rw-r--r--games/xrally/files/patch-score.c10
-rw-r--r--games/xrally/files/patch-sound.c18
-rw-r--r--games/xrally/files/patch-soundplayer.h15
7 files changed, 126 insertions, 74 deletions
diff --git a/games/xrally/Makefile b/games/xrally/Makefile
index 4546d320a729..7914706ca32c 100644
--- a/games/xrally/Makefile
+++ b/games/xrally/Makefile
@@ -8,7 +8,7 @@
PORTNAME= xrally
PORTVERSION= 1.1.1
-PORTREVISION= 4
+PORTREVISION= 5
CATEGORIES= games
MASTER_SITES= SF/xrally
DISTNAME= ${PORTNAME}-1.1
@@ -17,8 +17,6 @@ MAINTAINER= edwin@mavetju.org
COMMENT= XRally is a Linux clone of the classic Rally X arcade game
WRKSRC= ${WRKDIR}/${PORTNAME}
-USE_GCC= 2.95
-PTHREAD_LIBS= -lc_r
HAS_CONFIGURE= yes
USE_XORG= x11 xi xpm
USE_BZIP2= yes
@@ -29,10 +27,4 @@ CONFIGURE_ENV= LDFLAGS="-L${LOCALBASE}/lib ${PTHREAD_LIBS}" \
MAKE_ENV= LDFLAGS="-L${LOCALBASE}/lib ${PTHREAD_LIBS}" \
INCLUDES="-I${LOCALBASE}/include"
-.include <bsd.port.pre.mk>
-
-.if ${OSVERSION} > 700000
-BROKEN= Doesn't work (yet?) on 7.x
-.endif
-
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/games/xrally/files/patch-global.h b/games/xrally/files/patch-global.h
new file mode 100644
index 000000000000..9c3194bc553e
--- /dev/null
+++ b/games/xrally/files/patch-global.h
@@ -0,0 +1,42 @@
+--- global.h.orig 2001-01-02 05:49:16.000000000 +1100
++++ global.h 2009-02-22 13:18:18.000000000 +1100
+@@ -5,7 +5,7 @@
+ copyright : (C) 2000 by Perdig
+ email : perdig@linuxbr.com.br
+
+- $Id: global.h,v 1.9 2001/01/01 18:49:16 perdig Exp $
++ $Id: global.h,v 1.10 2001/01/11 15:28:03 perdig Exp $
+ ***************************************************************************/
+
+ /***************************************************************************
+@@ -181,10 +181,12 @@
+ #define _D_INFO "\x1b[33m"
+ #define _D_CRIT "\x1b[31m"
+ #define _D_WARN "\x1b[36m"
+-#define _D(args...) do { \
+- printf("\x1b[33m" __PRETTY_FUNCTION__ " \x1b[37m[" __FILE__ \
+- ":%d] " _D_INFO, __LINE__); printf (args); printf ("\x1b[0m\n"); \
+- } while (0)
++#define _D(args...) { \
++ printf("\x1b[33m%s \x1b[37m[%s:%d]%s", \
++ __PRETTY_FUNCTION__, __FILE__, __LINE__, _D_INFO); \
++ printf(args); \
++ printf("\x1b[0m\n"); \
++ }
+
+ #define ldbg(STR...) { if (DEBUG&4) _D(_D_INFO STR); }
+ #define dbg(STR...) { if (DEBUG&2) _D(_D_WARN STR); }
+@@ -213,4 +215,13 @@
+
+ #define PLAYABLE
+
++#ifndef USE_SOUND
++#define sound_switch()
++#define sound_stop()
++#define sound_volume(a)
++#define sound_start()
++#define sound_select(a)
++#define sound_load(a)
++#endif
++
+ #endif
diff --git a/games/xrally/files/patch-xrally-1.1.1 b/games/xrally/files/patch-graphics.c
index c313fd2e70f0..b64957ce0935 100644
--- a/games/xrally/files/patch-xrally-1.1.1
+++ b/games/xrally/files/patch-graphics.c
@@ -1,59 +1,39 @@
---- menu.c 2001/01/01 18:49:16 1.22 XRALLY_1_1
-+++ menu.c 2001/01/11 15:28:03 1.23 HEAD
+--- graphics.c.orig 2000-12-09 04:42:47.000000000 +1100
++++ graphics.c 2009-02-22 14:41:51.000000000 +1100
@@ -5,7 +5,7 @@
copyright : (C) 2000 by Perdig
email : perdig@linuxbr.com.br
-
-- $Id: menu.c,v 1.22 2001/01/01 18:49:16 perdig Exp $
-+ $Id: menu.c,v 1.23 2001/01/11 15:28:03 perdig Exp $
- ***************************************************************************/
-
- /***************************************************************************
-@@ -25,7 +25,9 @@
- #include "level.h"
- #include "score.h"
- #include "dirent.h"
-+#ifdef USE_SOUND
- #include "sound.h"
-+#endif
- #include "limits.h"
- #include <stdio.h>
- #include <string.h>
---- graphics.c 2000/12/07 12:44:10 1.15 XRALLY_1_1
-+++ graphics.c 2001/01/11 15:28:03 1.16 HEAD
-@@ -5,7 +5,7 @@
- copyright : (C) 2000 by Perdig
- email : perdig@linuxbr.com.br
-
+
- $Id: graphics.c,v 1.15 2000/12/07 12:44:10 perdig Exp $
+ $Id: graphics.c,v 1.16 2001/01/11 15:28:03 perdig Exp $
***************************************************************************/
-
+
/***************************************************************************
-@@ -18,12 +18,13 @@
+@@ -18,12 +18,14 @@
***************************************************************************/
#include "graphics.h"
#include "global.h"
+#include <unistd.h>
++#include <string.h>
#include <sys/time.h>
-
+
// Internal functions
-
+
static char ** _split_text(const char *_txt);
-static int _check_event(XEvent *xev);
+static int _check_event(XEvent *xev, int blocking);
long time_diff(struct timeval *rt);
-
+
// Basic X11 variables
-@@ -401,10 +402,15 @@
+@@ -401,10 +403,15 @@
return double_buffer;
}
-
+
-static int _check_event(XEvent *xev) {
+static int _check_event(XEvent *xev, int blocking) {
XEvent *last = NULL;
+ int a = 0;
-
+
- while (XCheckMaskEvent(dpy, KeyPressMask | ExposureMask, xev)) {
+ do {
+ if (blocking)
@@ -63,7 +43,7 @@
switch (xev->type) {
case KeyPress:
last = xev;
-@@ -417,7 +423,7 @@
+@@ -417,7 +424,7 @@
default:
break;
}
@@ -72,8 +52,8 @@
// No events
xev = last;
return (last) ? true : false;
-@@ -426,32 +432,35 @@
-
+@@ -426,32 +433,35 @@
+
KeySym check_key() {
XEvent xev;
- if (_check_event(&xev) && xev.type == KeyPress)
@@ -82,7 +62,7 @@
// No events
return XK_VoidSymbol;
}
-
+
KeySym wait_key() {
- KeySym key = XK_VoidSymbol;
- while (key == XK_VoidSymbol) {
@@ -93,7 +73,7 @@
+ _check_event(&xev, 1);
+ return XLookupKeysym(&xev.xkey, 0);
}
-
+
void wait_time(long time_wait) {
- struct timeval it;
+ struct timeval it, tmp;
@@ -109,7 +89,7 @@
+ _check_event(&xev, 0);
+ }
}
-
+
KeySym wait_char(char *str) {
KeySym key = XK_VoidSymbol;
XEvent xev;
@@ -118,29 +98,3 @@
XLookupString(&xev.xkey, str, 3, &key, NULL);
return key;
}
---- global.h 2001/01/01 18:49:16 1.9 XRALLY_1_1
-+++ global.h 2001/01/11 15:28:03 1.10
-@@ -5,7 +5,7 @@
- copyright : (C) 2000 by Perdig
- email : perdig@linuxbr.com.br
-
-- $Id: global.h,v 1.9 2001/01/01 18:49:16 perdig Exp $
-+ $Id: global.h,v 1.10 2001/01/11 15:28:03 perdig Exp $
- ***************************************************************************/
-
- /***************************************************************************
-@@ -212,5 +212,14 @@
-
-
- #define PLAYABLE
-+
-+#ifndef USE_SOUND
-+#define sound_switch()
-+#define sound_stop()
-+#define sound_volume(a)
-+#define sound_start()
-+#define sound_select(a)
-+#define sound_load(a)
-+#endif
-
- #endif
diff --git a/games/xrally/files/patch-menu.c b/games/xrally/files/patch-menu.c
new file mode 100644
index 000000000000..4ae1d40be1a8
--- /dev/null
+++ b/games/xrally/files/patch-menu.c
@@ -0,0 +1,21 @@
+--- menu.c 2001/01/01 18:49:16 1.22 XRALLY_1_1
++++ menu.c 2001/01/11 15:28:03 1.23 HEAD
+@@ -5,7 +5,7 @@
+ copyright : (C) 2000 by Perdig
+ email : perdig@linuxbr.com.br
+
+- $Id: menu.c,v 1.22 2001/01/01 18:49:16 perdig Exp $
++ $Id: menu.c,v 1.23 2001/01/11 15:28:03 perdig Exp $
+ ***************************************************************************/
+
+ /***************************************************************************
+@@ -25,7 +25,9 @@
+ #include "level.h"
+ #include "score.h"
+ #include "dirent.h"
++#ifdef USE_SOUND
+ #include "sound.h"
++#endif
+ #include "limits.h"
+ #include <stdio.h>
+ #include <string.h>
diff --git a/games/xrally/files/patch-score.c b/games/xrally/files/patch-score.c
new file mode 100644
index 000000000000..c9551774bd76
--- /dev/null
+++ b/games/xrally/files/patch-score.c
@@ -0,0 +1,10 @@
+--- score.c.orig 2009-02-22 14:37:44.000000000 +1100
++++ score.c 2009-02-22 14:37:54.000000000 +1100
+@@ -17,6 +17,7 @@
+ * *
+ ***************************************************************************/
+
++#include <string.h>
+ #include "config.h"
+ #include "score.h"
+ #include "time.h"
diff --git a/games/xrally/files/patch-sound.c b/games/xrally/files/patch-sound.c
new file mode 100644
index 000000000000..f2bfaba58362
--- /dev/null
+++ b/games/xrally/files/patch-sound.c
@@ -0,0 +1,18 @@
+--- sound.c.orig 2009-02-22 14:43:06.000000000 +1100
++++ sound.c 2009-02-22 15:00:36.000000000 +1100
+@@ -19,6 +19,7 @@
+ #include <stdio.h>
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <string.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <unistd.h>
+@@ -563,6 +564,7 @@
+ }
+
+ skip_extended:
++ while (0) {};
+ } else {
+ /*
+ * In the rest of the frames we slide volume, pitch,
diff --git a/games/xrally/files/patch-soundplayer.h b/games/xrally/files/patch-soundplayer.h
new file mode 100644
index 000000000000..83ae66bcb1c5
--- /dev/null
+++ b/games/xrally/files/patch-soundplayer.h
@@ -0,0 +1,15 @@
+--- soundplayer.h.orig 2009-02-22 14:46:33.000000000 +1100
++++ soundplayer.h 2009-02-22 14:59:51.000000000 +1100
+@@ -103,9 +103,9 @@
+ #define vphase data[2]
+ #define target data[0]
+
+-#define fx_enable(x) do { x##.active = 1; } while (0)
+-#define fx_disable(x) do { x##.active = 0; } while (0)
+-#define fx_test(x) (x##.active != 0)
++#define fx_enable(x) do { x.active = 1; } while (0)
++#define fx_disable(x) do { x.active = 0; } while (0)
++#define fx_test(x) (x.active != 0)
+
+ /* Sound driver stuff */
+