Mon Apr 4 17:33:42 2016 UTC ()
No longer rely on GLUT internals

This fixes building with modern graphics/glut.

Bump PKGREVISION.


(khorben)
diff -r1.60 -r1.61 pkgsrc/games/xracer/Makefile
diff -r1.11 -r1.12 pkgsrc/games/xracer/distinfo
diff -r0 -r1.1 pkgsrc/games/xracer/patches/patch-src_ws__x11.c

cvs diff -r1.60 -r1.61 pkgsrc/games/xracer/Makefile (expand / switch to unified diff)

--- pkgsrc/games/xracer/Makefile 2015/06/27 09:32:15 1.60
+++ pkgsrc/games/xracer/Makefile 2016/04/04 17:33:42 1.61
@@ -1,18 +1,18 @@ @@ -1,18 +1,18 @@
1# $NetBSD: Makefile,v 1.60 2015/06/27 09:32:15 dholland Exp $ 1# $NetBSD: Makefile,v 1.61 2016/04/04 17:33:42 khorben Exp $
2# 2#
3 3
4DISTNAME= xracer-0.96.9 4DISTNAME= xracer-0.96.9
5PKGREVISION= 18 5PKGREVISION= 19
6CATEGORIES= games x11 6CATEGORIES= games x11
7MASTER_SITES= http://www.annexia.org/_file/ 7MASTER_SITES= http://www.annexia.org/_file/
8 8
9MAINTAINER= pkgsrc-users@NetBSD.org 9MAINTAINER= pkgsrc-users@NetBSD.org
10#HOMEPAGE= http://www.annexia.org/freeware/xracer 10#HOMEPAGE= http://www.annexia.org/freeware/xracer
11COMMENT= XRacer is a clone of the popular Psygnosis game Wipeout 11COMMENT= XRacer is a clone of the popular Psygnosis game Wipeout
12 12
13USE_TOOLS+= gmake perl:run 13USE_TOOLS+= gmake perl:run
14PERL5_PACKLIST= auto/XRacer/.packlist 14PERL5_PACKLIST= auto/XRacer/.packlist
15 15
16MAKE_JOBS_SAFE= no 16MAKE_JOBS_SAFE= no
17USE_LIBTOOL= yes 17USE_LIBTOOL= yes
18# disabled by patch-an, since the only existing translation is empty 18# disabled by patch-an, since the only existing translation is empty

cvs diff -r1.11 -r1.12 pkgsrc/games/xracer/distinfo (expand / switch to unified diff)

--- pkgsrc/games/xracer/distinfo 2015/11/03 20:57:09 1.11
+++ pkgsrc/games/xracer/distinfo 2016/04/04 17:33:42 1.12
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1$NetBSD: distinfo,v 1.11 2015/11/03 20:57:09 agc Exp $ 1$NetBSD: distinfo,v 1.12 2016/04/04 17:33:42 khorben Exp $
2 2
3SHA1 (xracer-0.96.9.tar.gz) = 8c7a4f0be46ee83bbb588f6c5834340f519a3059 3SHA1 (xracer-0.96.9.tar.gz) = 8c7a4f0be46ee83bbb588f6c5834340f519a3059
4RMD160 (xracer-0.96.9.tar.gz) = 1e9611dd55b1a3f0bf681a7051fcbb37bec47a6e 4RMD160 (xracer-0.96.9.tar.gz) = 1e9611dd55b1a3f0bf681a7051fcbb37bec47a6e
5SHA512 (xracer-0.96.9.tar.gz) = e409ca9dfdf1cf196646eb5d7a0f380d8f19ac8f805de3bc44e6030b6580009aa94a7b9d13d303ce7a5daf6a0ec512da40c8f006b0fb09fcc24152932fc889b4 5SHA512 (xracer-0.96.9.tar.gz) = e409ca9dfdf1cf196646eb5d7a0f380d8f19ac8f805de3bc44e6030b6580009aa94a7b9d13d303ce7a5daf6a0ec512da40c8f006b0fb09fcc24152932fc889b4
6Size (xracer-0.96.9.tar.gz) = 1550085 bytes 6Size (xracer-0.96.9.tar.gz) = 1550085 bytes
7SHA1 (patch-aa) = bd73584734449a4de330982f2cd2fa2c93ecfba4 7SHA1 (patch-aa) = bd73584734449a4de330982f2cd2fa2c93ecfba4
8SHA1 (patch-ab) = 397213618e38a9d8b6a02b66c0bd6dfa8e9088f2 8SHA1 (patch-ab) = 397213618e38a9d8b6a02b66c0bd6dfa8e9088f2
9SHA1 (patch-ac) = 8ca84cea66a44b700d32633151767c7ecfacbefc 9SHA1 (patch-ac) = 8ca84cea66a44b700d32633151767c7ecfacbefc
10SHA1 (patch-ad) = 89fba91a07db5222ddb21717205a16613710e12b 10SHA1 (patch-ad) = 89fba91a07db5222ddb21717205a16613710e12b
11SHA1 (patch-ae) = f14f54d246370382255c2ebe4e907d9110f95a5e 11SHA1 (patch-ae) = f14f54d246370382255c2ebe4e907d9110f95a5e
12SHA1 (patch-af) = 05122f93b7f9ed1481a8d20696f75c35356db8a4 12SHA1 (patch-af) = 05122f93b7f9ed1481a8d20696f75c35356db8a4
13SHA1 (patch-ag) = 129497c5e5b041b32c545493ea97afe9db996e33 13SHA1 (patch-ag) = 129497c5e5b041b32c545493ea97afe9db996e33
14SHA1 (patch-ah) = b97883d599ac070385883e1356ac53382f15fbaa 14SHA1 (patch-ah) = b97883d599ac070385883e1356ac53382f15fbaa
@@ -22,13 +22,14 @@ SHA1 (patch-ap) = 491cf858882cedc2fce865 @@ -22,13 +22,14 @@ SHA1 (patch-ap) = 491cf858882cedc2fce865
22SHA1 (patch-aq) = 90dd0c5a669439b47ca489117b9efa19c656f40a 22SHA1 (patch-aq) = 90dd0c5a669439b47ca489117b9efa19c656f40a
23SHA1 (patch-ar) = be958b29fdf3fdb82df9b0cc6f1c152371c7a858 23SHA1 (patch-ar) = be958b29fdf3fdb82df9b0cc6f1c152371c7a858
24SHA1 (patch-as) = 5f22c78bec9b9fab9feb2cae73afc251f4367066 24SHA1 (patch-as) = 5f22c78bec9b9fab9feb2cae73afc251f4367066
25SHA1 (patch-include_xracer-craft.h) = b53a6f89f29263451ea111a44a5b84eb91721c1f 25SHA1 (patch-include_xracer-craft.h) = b53a6f89f29263451ea111a44a5b84eb91721c1f
26SHA1 (patch-include_xracer-player.h) = 6a7f33c926d74c1d2ee9dc21d91acbf269b57f6c 26SHA1 (patch-include_xracer-player.h) = 6a7f33c926d74c1d2ee9dc21d91acbf269b57f6c
27SHA1 (patch-src_game.c) = cb5a73dde445eec2aa924e61be4f1fd0c3e9135e 27SHA1 (patch-src_game.c) = cb5a73dde445eec2aa924e61be4f1fd0c3e9135e
28SHA1 (patch-src_jpeg.c) = 8549eccb261e3169381ff6c101895ed2815d6c78 28SHA1 (patch-src_jpeg.c) = 8549eccb261e3169381ff6c101895ed2815d6c78
29SHA1 (patch-src_math.c) = c358f346184092e1e68f21ec8ba82e253093fb97 29SHA1 (patch-src_math.c) = c358f346184092e1e68f21ec8ba82e253093fb97
30SHA1 (patch-src_mpeg_store.c) = 13cf0c3625be119c68825961282beb50a3aa4a70 30SHA1 (patch-src_mpeg_store.c) = 13cf0c3625be119c68825961282beb50a3aa4a70
31SHA1 (patch-src_player.c) = e2a8305257f38073b03fbd39a95c1a35542506af 31SHA1 (patch-src_player.c) = e2a8305257f38073b03fbd39a95c1a35542506af
32SHA1 (patch-src_text.c) = bec183a1fb701e4bf854df52012e22bf87053891 32SHA1 (patch-src_text.c) = bec183a1fb701e4bf854df52012e22bf87053891
33SHA1 (patch-src_utils.c) = d8fc536848a3e116528af64b7f97fd50667f7af1 33SHA1 (patch-src_utils.c) = d8fc536848a3e116528af64b7f97fd50667f7af1
34SHA1 (patch-src_video.c) = fa81bfea35390ab48c024433288b2252dada39d1 34SHA1 (patch-src_video.c) = fa81bfea35390ab48c024433288b2252dada39d1
 35SHA1 (patch-src_ws__x11.c) = f3c60f58c8281aad0420abbec7b77f8fbfbe1fde

File Added: pkgsrc/games/xracer/patches/patch-src_ws__x11.c
$NetBSD: patch-src_ws__x11.c,v 1.1 2016/04/04 17:33:42 khorben Exp $

Avoid references to obsolete GLUT internals

--- src/ws_x11.c.orig	2016-04-04 07:44:51.000000000 +0000
+++ src/ws_x11.c
@@ -28,6 +28,7 @@
 #include "xracer-ws.h"
 #include "xracer-log.h"
 
+#if 0
 /* X11- and GLUT-specific hack to warp and grab the pointer into the window. */
 struct GLUTwindow
 {
@@ -39,33 +40,43 @@ extern Display *__glutDisplay;
 
 extern Window __glutRoot;
 extern struct GLUTwindow *__glutCurrentWindow;
+#endif
 
 void
 xrWsWarpPointer ()
 {
+#if 0
   Window window = __glutCurrentWindow->win;
 
   XWarpPointer(__glutDisplay, 0, window, 0, 0, 0, 0, xrWidth/2, xrHeight/2);
+#else
+  glutWarpPointer(xrWidth/2, xrHeight/2);
+#endif
 }
 
 /* Grab the pointer. */
 void
 xrWsGrabPointer ()
 {
+#if 0
   Window window = __glutCurrentWindow->win;
 
   if (XGrabPointer(__glutDisplay, window, True,
         ButtonReleaseMask | ButtonPressMask,
         GrabModeAsync, GrabModeAsync,
         window, None, CurrentTime) != GrabSuccess)
+#else
     xrLog (LOG_ERROR, "pointer grab failed");
+#endif
 }
 
 /* Flush out the event queue. */
 void
 xrWsFlushEventQueue ()
 {
+#if 0
   XSync(__glutDisplay, False);
+#endif
 }
 
 /* X11 hack to give window a class, so WindowManagers can interact with it
@@ -75,10 +86,12 @@ xrWsFlushEventQueue ()
 void
 xrWsFixWindowClass ()
 {
+#if 0
    XClassHint classhint;
    Window window = __glutCurrentWindow->win;
 
    classhint.res_name = (char *) "xracer";
    classhint.res_class = (char *) "XRacer";
    XSetClassHint (__glutDisplay, window, &classhint);
+#endif
 }