diff options
author | jlam <jlam@pkgsrc.org> | 2000-08-04 02:00:46 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2000-08-04 02:00:46 +0000 |
commit | da8a6cda753ce46ffb6b4fae1dba96c686338566 (patch) | |
tree | 62607dc46f1f1de5809c438c9e4f538f4c4f0c67 /games | |
parent | 43a4302a0c684147336da9fb97b4fb47d72fe426 (diff) | |
download | pkgsrc-da8a6cda753ce46ffb6b4fae1dba96c686338566.tar.gz |
Make use of the MACHINE_JOYSTICK_IS_PRESENT definition so that this
has a chance of compiling on platforms without <machine/joystick.h>,
i.e. everything except i386 and arm32.
Diffstat (limited to 'games')
-rw-r--r-- | games/plib/files/patch-sum | 4 | ||||
-rw-r--r-- | games/plib/patches/patch-ab | 41 |
2 files changed, 26 insertions, 19 deletions
diff --git a/games/plib/files/patch-sum b/games/plib/files/patch-sum index 91f962a4b10..08ebecc844e 100644 --- a/games/plib/files/patch-sum +++ b/games/plib/files/patch-sum @@ -1,7 +1,7 @@ -$NetBSD: patch-sum,v 1.1.1.1 2000/02/19 22:32:45 rh Exp $ +$NetBSD: patch-sum,v 1.2 2000/08/04 02:00:46 jlam Exp $ MD5 (patch-aa) = 99428518086327a9397823ad5b06372e -MD5 (patch-ab) = 52db087ec9d9e64e823627b0d941b4bb +MD5 (patch-ab) = 9485c4b1aa22f62446103f2fb9b4e240 MD5 (patch-ac) = c2d68548f24f43142fac355555823d57 MD5 (patch-ad) = cc40ca79ae3af7a146dbe5ebb1bcb60c MD5 (patch-ae) = 9f773e10721ed4d04824710eb93060c1 diff --git a/games/plib/patches/patch-ab b/games/plib/patches/patch-ab index 47eeef0b63f..4f831b9de33 100644 --- a/games/plib/patches/patch-ab +++ b/games/plib/patches/patch-ab @@ -1,67 +1,74 @@ -$NetBSD: patch-ab,v 1.1.1.1 2000/02/19 22:32:45 rh Exp $ +$NetBSD: patch-ab,v 1.2 2000/08/04 02:00:47 jlam Exp $ ---- src/js/js.h.orig Sat Oct 16 23:08:01 1999 -+++ src/js/js.h Sat Feb 19 22:26:37 2000 -@@ -29,7 +29,7 @@ +--- src/js/js.h.orig Sat Oct 16 17:08:01 1999 ++++ src/js/js.h Thu Aug 3 21:42:03 2000 +@@ -29,7 +29,8 @@ # include <unistd.h> # include <fcntl.h> -# ifdef __FreeBSD__ -+# if defined(__FreeBSD__) || defined(__NetBSD__) ++# if defined(__FreeBSD__) || \ ++ (defined(__NetBSD__) && defined(MACHINE_JOYSTICK_IS_PRESENT)) # include <machine/joystick.h> # define JS_DATA_TYPE joystick # define JS_RETURN (sizeof(struct JS_DATA_TYPE)) -@@ -76,7 +76,7 @@ +@@ -76,7 +77,8 @@ #ifdef WIN32 # define _JS_MAX_AXES 6 #else -# ifdef __FreeBSD__ -+# if defined(__FreeBSD__) || defined(__NetBSD__) ++# if defined(__FreeBSD__) || \ ++ (defined(__NetBSD__) && defined(MACHINE_JOYSTICK_IS_PRESENT)) # define _JS_MAX_AXES 2 # else # define _JS_MAX_AXES 6 -@@ -85,7 +85,7 @@ +@@ -85,7 +87,8 @@ class jsJoystick { -#ifdef __FreeBSD__ -+#if defined(__FreeBSD__) || defined(__NetBSD__) ++#if defined(__FreeBSD__) || \ ++ (defined(__NetBSD__) && defined(MACHINE_JOYSTICK_IS_PRESENT)) int id ; #endif #ifdef WIN32 -@@ -153,7 +153,7 @@ +@@ -153,7 +156,8 @@ } #else -# ifdef __FreeBSD__ -+# if defined(__FreeBSD__) || defined(__NetBSD__) ++# if defined(__FreeBSD__) || \ ++ (defined(__NetBSD__) && defined(MACHINE_JOYSTICK_IS_PRESENT)) FILE *joyfile; char joyfname[1024]; int noargs, in_no_axes; -@@ -178,7 +178,7 @@ +@@ -178,7 +182,8 @@ if ( error ) return ; -# ifdef __FreeBSD__ -+# if defined(__FreeBSD__) || defined(__NetBSD__) ++# if defined(__FreeBSD__) || \ ++ (defined(__NetBSD__) && defined(MACHINE_JOYSTICK_IS_PRESENT)) float axes[_JS_MAX_AXES]; int buttons[_JS_MAX_AXES]; -@@ -316,7 +316,7 @@ +@@ -316,7 +321,8 @@ default : num_axes = 0 ; setError () ; break ; } #else -# ifdef __FreeBSD__ -+# if defined(__FreeBSD__) || defined(__NetBSD__) ++# if defined(__FreeBSD__) || \ ++ (defined(__NetBSD__) && defined(MACHINE_JOYSTICK_IS_PRESENT)) id = ident; sprintf ( fname, "/dev/joy%d", ident ) ; # else -@@ -467,7 +467,7 @@ +@@ -467,7 +473,8 @@ } if ( buttons ) -# ifdef __FreeBSD__ -+# if defined(__FreeBSD__) || defined(__NetBSD__) ++# if defined(__FreeBSD__) || \ ++ (defined(__NetBSD__) && defined(MACHINE_JOYSTICK_IS_PRESENT)) *buttons = ( js.b1 ? 1 : 0 ) | ( js.b2 ? 2 : 0 ) ; # else *buttons = js.buttons ; |