diff options
author | jmc <jmc> | 2002-02-19 06:25:57 +0000 |
---|---|---|
committer | jmc <jmc> | 2002-02-19 06:25:57 +0000 |
commit | 494a8366265360ccb50d7c7cb7c0e69889a90f7d (patch) | |
tree | aa58ad920e12f6b8ae753e5aada1f51046f22709 | |
parent | 976cac1263d25566d812b562ce9f16a289f75d7e (diff) | |
download | pkgsrc-494a8366265360ccb50d7c7cb7c0e69889a90f7d.tar.gz |
Minor overhaul.
Not all NetBSD platforms support joysticks. Based on ones which are active
in their GENERIC config's only have those actually compile in NetBSD specific
joystick support. For the rest let the generic joystick support get pulled
in (and then fail to probe so the code will disable it anyways).
Otherwise this fails on any system without <machine/joystick.h>
XXX...This really should be redone at some point since it's messy now and
the original code looks like it had the concept of no joystick support in
the first place.
-rw-r--r-- | games/rocksndiamonds/Makefile | 7 | ||||
-rw-r--r-- | games/rocksndiamonds/distinfo | 12 | ||||
-rw-r--r-- | games/rocksndiamonds/patches/patch-aa | 15 | ||||
-rw-r--r-- | games/rocksndiamonds/patches/patch-ag | 16 | ||||
-rw-r--r-- | games/rocksndiamonds/patches/patch-ah | 8 | ||||
-rw-r--r-- | games/rocksndiamonds/patches/patch-ai | 8 | ||||
-rw-r--r-- | games/rocksndiamonds/patches/patch-aj | 14 |
7 files changed, 45 insertions, 35 deletions
diff --git a/games/rocksndiamonds/Makefile b/games/rocksndiamonds/Makefile index dd4a0de89cc..8c685cf2d1d 100644 --- a/games/rocksndiamonds/Makefile +++ b/games/rocksndiamonds/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.6 2002/02/02 11:59:09 jdolecek Exp $ +# $NetBSD: Makefile,v 1.7 2002/02/19 06:25:57 jmc Exp $ # DISTNAME= rocksndiamonds-2.0.0 @@ -12,6 +12,11 @@ COMMENT= Game like Boulderdash, Emerald Mine, or Sokoban with lots of levels USE_GMAKE= YES +.if ( ${MACHINE} == "i386" || ${MACHINE} == "prep" || ${MACHINE} == "cats" || \ + ${MACHINE} == "shark" ) +MAKE_ENV+=HAVE_JOYSTICK=1 +.endif + # if you change SCORE_PATH, don't forget to change patch-aa, too SCORE_PATH= /var/games/rocksndiamonds diff --git a/games/rocksndiamonds/distinfo b/games/rocksndiamonds/distinfo index 197f766eb69..cb3bec4cac3 100644 --- a/games/rocksndiamonds/distinfo +++ b/games/rocksndiamonds/distinfo @@ -1,14 +1,14 @@ -$NetBSD: distinfo,v 1.4 2002/02/02 11:59:54 jdolecek Exp $ +$NetBSD: distinfo,v 1.5 2002/02/19 06:25:57 jmc Exp $ SHA1 (rocksndiamonds-2.0.0.tar.gz) = 50ce7b646187ce6e10a7e8ccf4c5ce16119f11ee Size (rocksndiamonds-2.0.0.tar.gz) = 2476309 bytes -SHA1 (patch-aa) = 17cc33c87433eb05e640829210c2d612d4f43454 +SHA1 (patch-aa) = 6c0aa7635e09149ca1551afe635799276c873e37 SHA1 (patch-ab) = 0485825f11f3d82357effd84d911d164d13373f0 SHA1 (patch-ac) = 646a586346cbc7ea566a9b001be8e96131f13679 SHA1 (patch-ad) = 213cc8d169ed448657f96e0adee8623f90f50335 SHA1 (patch-ae) = fe84a2cfb4bcef854a8f79655e64ee68f771effe SHA1 (patch-af) = 30d4782a6345f52008955bd3d2bb3d705c7f28c0 -SHA1 (patch-ag) = 65fd9caab419f02b5c7e0dffb08b163f8cb473a4 -SHA1 (patch-ah) = 78e2cbb6a18402db980a62dfc21bfc7014f8cdcc -SHA1 (patch-ai) = 4ab3a82b99c7bf93061770613da5f583cfc4fb25 -SHA1 (patch-aj) = 7baeca5d8797a25dfdc4caf6e7ac81f670ebaac7 +SHA1 (patch-ag) = 5ec96869ac15ec33966143dbd5d9d699bf294785 +SHA1 (patch-ah) = e0b783de268606d0572fbc6e3a17011cc90b54d6 +SHA1 (patch-ai) = 4607c87f276df311f06df9b9eb8888348c823a16 +SHA1 (patch-aj) = 9af1220fcbaddeeb623e5f2e7f91ce860cfe7f70 diff --git a/games/rocksndiamonds/patches/patch-aa b/games/rocksndiamonds/patches/patch-aa index 2363bed676a..1f2f50d8131 100644 --- a/games/rocksndiamonds/patches/patch-aa +++ b/games/rocksndiamonds/patches/patch-aa @@ -1,7 +1,8 @@ -$NetBSD: patch-aa,v 1.3 2001/07/05 22:07:59 kristerw Exp $ ---- Makefile.orig Wed May 2 23:09:06 2001 -+++ Makefile Sun Jun 24 21:03:37 2001 -@@ -12,15 +12,17 @@ +$NetBSD: patch-aa,v 1.4 2002/02/19 06:25:58 jmc Exp $ + +--- Makefile.orig Sun Dec 31 16:24:30 2000 ++++ Makefile Tue Feb 19 06:21:17 2002 +@@ -12,15 +12,21 @@ # specify path to X11 on your system # if undefined, use system defaults (works with Linux/gcc/libc5) @@ -17,10 +18,14 @@ $NetBSD: patch-aa,v 1.3 2001/07/05 22:07:59 kristerw Exp $ # default is '.', so you can play without installing game data somewhere # RW_GAME_DIR = /var/games +RW_GAME_DIR = /var/games/rocksndiamonds ++ ++ifdef HAVE_JOYSTICK ++JOYSTICK=-DHAVE_JOYSTICK ++endif # uncomment this if your system has no joystick include file # JOYSTICK = -DNO_JOYSTICK -@@ -42,7 +44,6 @@ +@@ -42,7 +48,6 @@ .EXPORT_ALL_VARIABLES: diff --git a/games/rocksndiamonds/patches/patch-ag b/games/rocksndiamonds/patches/patch-ag index 66002716c0d..e2121c1872a 100644 --- a/games/rocksndiamonds/patches/patch-ag +++ b/games/rocksndiamonds/patches/patch-ag @@ -1,31 +1,31 @@ -$NetBSD: patch-ag,v 1.1 2002/02/02 11:59:09 jdolecek Exp $ +$NetBSD: patch-ag,v 1.2 2002/02/19 06:25:58 jmc Exp $ ---- src/joystick.c.orig Sat Feb 2 12:01:57 2002 -+++ src/joystick.c Sat Feb 2 12:11:43 2002 +--- src/joystick.c.orig Tue Dec 5 00:11:08 2000 ++++ src/joystick.c Tue Feb 19 05:54:30 2002 @@ -11,7 +11,7 @@ * joystick.c * ***********************************************************/ -#if defined(PLATFORM_FREEBSD) -+#if defined(__FreeBSD__) || defined(__NetBSD__) ++#if defined(__FreeBSD__) || (defined(__NetBSD__) && defined(HAVE_JOYSTICK)) #include <machine/joystick.h> #endif -@@ -319,7 +319,7 @@ void CheckJoystickData() +@@ -319,7 +319,7 @@ #if defined(PLATFORM_UNIX) int Joystick(int player_nr) { -#ifdef __FreeBSD__ -+#if defined(__FreeBSD__) || defined(__NetBSD__) ++#if defined(__FreeBSD__) || (defined(__NetBSD__) && defined(HAVE_JOYSTICK)) struct joystick joy_ctrl; #else struct joystick_control -@@ -355,7 +355,7 @@ int Joystick(int player_nr) +@@ -355,7 +355,7 @@ js_x = joy_ctrl.x; js_y = joy_ctrl.y; -#ifdef __FreeBSD__ -+#if defined(__FreeBSD__) || defined(__NetBSD__) ++#if defined(__FreeBSD__) || (defined(__NetBSD__) && defined(HAVE_JOYSTICK)) js_b1 = joy_ctrl.b1; js_b2 = joy_ctrl.b2; #else diff --git a/games/rocksndiamonds/patches/patch-ah b/games/rocksndiamonds/patches/patch-ah index 0f17a8925ec..20e86bec2f0 100644 --- a/games/rocksndiamonds/patches/patch-ah +++ b/games/rocksndiamonds/patches/patch-ah @@ -1,13 +1,13 @@ -$NetBSD: patch-ah,v 1.1 2002/02/02 11:59:09 jdolecek Exp $ +$NetBSD: patch-ah,v 1.2 2002/02/19 06:25:58 jmc Exp $ ---- src/joystick.h.orig Sat Feb 2 12:01:40 2002 -+++ src/joystick.h Sat Feb 2 12:40:04 2002 +--- src/joystick.h.orig Tue Dec 5 00:10:55 2000 ++++ src/joystick.h Tue Feb 19 05:47:49 2002 @@ -20,7 +20,7 @@ #define JOYSTICK_OFF 0 #define JOYSTICK_AVAILABLE 1 -#ifdef __FreeBSD__ -+#if defined(__FreeBSD__) || defined(__NetBSD__) ++#if defined(__FreeBSD__) || (defined(__NetBSD__) && defined(HAVE_JOYSTICK)) #include <machine/joystick.h> #define DEV_JOYSTICK_0 "/dev/joy0" #define DEV_JOYSTICK_1 "/dev/joy1" diff --git a/games/rocksndiamonds/patches/patch-ai b/games/rocksndiamonds/patches/patch-ai index 41103b0b998..180e1db1cda 100644 --- a/games/rocksndiamonds/patches/patch-ai +++ b/games/rocksndiamonds/patches/patch-ai @@ -1,13 +1,13 @@ -$NetBSD: patch-ai,v 1.1 2002/02/02 11:59:09 jdolecek Exp $ +$NetBSD: patch-ai,v 1.2 2002/02/19 06:25:58 jmc Exp $ ---- src/tools.c.orig Sat Feb 2 12:05:13 2002 -+++ src/tools.c Sat Feb 2 12:16:01 2002 +--- src/tools.c.orig Tue Dec 5 00:14:16 2000 ++++ src/tools.c Tue Feb 19 05:52:08 2002 @@ -13,7 +13,7 @@ #include <stdarg.h> -#if defined(PLATFORM_FREEBSD) -+#if defined(__FreeBSD__) || defined(__NetBSD__) ++#if defined(__FreeBSD__) || (defined(__NetBSD__) && defined(HAVE_JOYSTICK)) #include <machine/joystick.h> #endif diff --git a/games/rocksndiamonds/patches/patch-aj b/games/rocksndiamonds/patches/patch-aj index 6ae2be0d7d4..a89c3e6b37b 100644 --- a/games/rocksndiamonds/patches/patch-aj +++ b/games/rocksndiamonds/patches/patch-aj @@ -1,22 +1,22 @@ -$NetBSD: patch-aj,v 1.1 2002/02/02 11:59:10 jdolecek Exp $ +$NetBSD: patch-aj,v 1.2 2002/02/19 06:25:58 jmc Exp $ ---- src/screens.c.orig Sat Feb 2 12:51:14 2002 -+++ src/screens.c Sat Feb 2 12:52:14 2002 -@@ -2027,7 +2027,7 @@ void CustomizeKeyboard(int player_nr) +--- src/screens.c.orig Thu Dec 21 18:18:36 2000 ++++ src/screens.c Tue Feb 19 05:53:20 2002 +@@ -2027,7 +2027,7 @@ void CalibrateJoystick(int player_nr) { -#ifdef __FreeBSD__ -+#if defined(__FreeBSD__) || defined(__NetBSD__) ++#if defined(__FreeBSD__) || (defined(__NetBSD__) && defined(HAVE_JOYSTICK)) struct joystick joy_ctrl; #else struct joystick_control -@@ -2092,7 +2092,7 @@ void CalibrateJoystick(int player_nr) +@@ -2092,7 +2092,7 @@ BackToFront(); -#ifdef __FreeBSD__ -+#if defined(__FreeBSD__) || defined(__NetBSD__) ++#if defined(__FreeBSD__) || (defined(__NetBSD__) && defined(HAVE_JOYSTICK)) joy_ctrl.b1 = joy_ctrl.b2 = 0; #else joy_ctrl.buttons = 0; |