From 552901db9ac8d84d822d18074f84ddf48d1c228b Mon Sep 17 00:00:00 2001 From: khorben Date: Mon, 4 Apr 2016 17:33:42 +0000 Subject: No longer rely on GLUT internals This fixes building with modern graphics/glut. Bump PKGREVISION. --- games/xracer/Makefile | 4 +- games/xracer/distinfo | 3 +- games/xracer/patches/patch-src_ws__x11.c | 71 ++++++++++++++++++++++++++++++++ 3 files changed, 75 insertions(+), 3 deletions(-) create mode 100644 games/xracer/patches/patch-src_ws__x11.c (limited to 'games/xracer') diff --git a/games/xracer/Makefile b/games/xracer/Makefile index 59e61af3cf3..e3d3374261a 100644 --- a/games/xracer/Makefile +++ b/games/xracer/Makefile @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.60 2015/06/27 09:32:15 dholland Exp $ +# $NetBSD: Makefile,v 1.61 2016/04/04 17:33:42 khorben Exp $ # DISTNAME= xracer-0.96.9 -PKGREVISION= 18 +PKGREVISION= 19 CATEGORIES= games x11 MASTER_SITES= http://www.annexia.org/_file/ diff --git a/games/xracer/distinfo b/games/xracer/distinfo index 1fbd863fd56..0d900688a3c 100644 --- a/games/xracer/distinfo +++ b/games/xracer/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.11 2015/11/03 20:57:09 agc Exp $ +$NetBSD: distinfo,v 1.12 2016/04/04 17:33:42 khorben Exp $ SHA1 (xracer-0.96.9.tar.gz) = 8c7a4f0be46ee83bbb588f6c5834340f519a3059 RMD160 (xracer-0.96.9.tar.gz) = 1e9611dd55b1a3f0bf681a7051fcbb37bec47a6e @@ -32,3 +32,4 @@ SHA1 (patch-src_player.c) = e2a8305257f38073b03fbd39a95c1a35542506af SHA1 (patch-src_text.c) = bec183a1fb701e4bf854df52012e22bf87053891 SHA1 (patch-src_utils.c) = d8fc536848a3e116528af64b7f97fd50667f7af1 SHA1 (patch-src_video.c) = fa81bfea35390ab48c024433288b2252dada39d1 +SHA1 (patch-src_ws__x11.c) = f3c60f58c8281aad0420abbec7b77f8fbfbe1fde diff --git a/games/xracer/patches/patch-src_ws__x11.c b/games/xracer/patches/patch-src_ws__x11.c new file mode 100644 index 00000000000..a3f7df5fbd0 --- /dev/null +++ b/games/xracer/patches/patch-src_ws__x11.c @@ -0,0 +1,71 @@ +$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 + } -- cgit v1.2.3