summaryrefslogtreecommitdiff
path: root/emulators/xmess/patches
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2005-11-17 19:54:08 +0000
committerjoerg <joerg@pkgsrc.org>2005-11-17 19:54:08 +0000
commite904b7b9c89779ca391a81716b17aa30217fbb9a (patch)
tree8459daa91488545ce6a60dc4b2c4ba05f300efe4 /emulators/xmess/patches
parent60a3dc4c1b8dc4fa45f492a186cef716882c2ebc (diff)
downloadpkgsrc-e904b7b9c89779ca391a81716b17aa30217fbb9a.tar.gz
Add DragonFly support. In the DGA drivers, include sys/time.h to get
struct timeval on DragonFly, otherwise sys/resource.h doesn't compile.
Diffstat (limited to 'emulators/xmess/patches')
-rw-r--r--emulators/xmess/patches/patch-ac12
-rw-r--r--emulators/xmess/patches/patch-ad12
-rw-r--r--emulators/xmess/patches/patch-af40
-rw-r--r--emulators/xmess/patches/patch-ag36
4 files changed, 100 insertions, 0 deletions
diff --git a/emulators/xmess/patches/patch-ac b/emulators/xmess/patches/patch-ac
new file mode 100644
index 00000000000..7d4e7cc1af5
--- /dev/null
+++ b/emulators/xmess/patches/patch-ac
@@ -0,0 +1,12 @@
+$NetBSD: patch-ac,v 1.7 2005/11/17 19:54:09 joerg Exp $
+
+--- src/unix/video-drivers/xf86_dga1.c.orig 2005-11-17 15:56:02.000000000 +0000
++++ src/unix/video-drivers/xf86_dga1.c
+@@ -6,6 +6,7 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <sys/types.h>
++#include <sys/time.h>
+ #include <sys/wait.h>
+ #include <sys/resource.h>
+ #include <X11/Xlib.h>
diff --git a/emulators/xmess/patches/patch-ad b/emulators/xmess/patches/patch-ad
new file mode 100644
index 00000000000..bb8844ceba5
--- /dev/null
+++ b/emulators/xmess/patches/patch-ad
@@ -0,0 +1,12 @@
+$NetBSD: patch-ad,v 1.5 2005/11/17 19:54:09 joerg Exp $
+
+--- src/unix/video-drivers/xf86_dga2.c.orig 2005-11-17 16:14:12.000000000 +0000
++++ src/unix/video-drivers/xf86_dga2.c
+@@ -9,6 +9,7 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <sys/types.h>
++#include <sys/time.h>
+ #include <sys/wait.h>
+ #include <sys/resource.h>
+ #include <X11/Xlib.h>
diff --git a/emulators/xmess/patches/patch-af b/emulators/xmess/patches/patch-af
new file mode 100644
index 00000000000..4421fa9076d
--- /dev/null
+++ b/emulators/xmess/patches/patch-af
@@ -0,0 +1,40 @@
+$NetBSD: patch-af,v 1.4 2005/11/17 19:54:09 joerg Exp $
+
+--- src/unix/joystick-drivers/joy_standard.c.orig 2005-11-17 16:17:48.000000000 +0000
++++ src/unix/joystick-drivers/joy_standard.c
+@@ -6,7 +6,7 @@ static int use_old_driver = 0;
+
+ struct rc_option joy_standard_opts[] = {
+ /* name, shortname, type, dest, deflt, min, max, func, help */
+-#if defined(__ARCH_netbsd) || defined(__ARCH_freebsd) || defined(__ARCH_openbsd)
++#if defined(__ARCH_netbsd) || defined(__ARCH_freebsd) || defined(__ARCH_openbsd) || defined(__ARCH_dragonfly)
+ { "joydevname", "jdev", rc_string, &joy_dev,
+ "/dev/joy", 0, 0, NULL,
+ "Joystick device prefix (defaults to /dev/joy)" },
+@@ -29,7 +29,7 @@ struct rc_option joy_standard_opts[] = {
+ #include <sys/ioctl.h>
+
+ /* specific joystick for PC clones */
+-#if defined(__ARCH_netbsd) || defined(__ARCH_freebsd) || defined(__ARCH_openbsd)
++#if defined(__ARCH_netbsd) || defined(__ARCH_freebsd) || defined(__ARCH_openbsd) || defined(__ARCH_dragonfly)
+
+ #include <machine/joystick.h>
+ typedef struct joystick joy_struct;
+@@ -142,7 +142,7 @@ void joy_standard_init(void)
+ /* fall through to the next case */
+ case 1:
+ joy_data[i].num_axes = 2;
+-#if defined(__ARCH_netbsd) || defined(__ARCH_freebsd) || defined(__ARCH_openbsd)
++#if defined(__ARCH_netbsd) || defined(__ARCH_freebsd) || defined(__ARCH_openbsd) || defined(__ARCH_dragonfly)
+ joy_data[i].num_buttons = 2;
+ #else
+ joy_data[i].num_buttons = JOY_BUTTONS;
+@@ -217,7 +217,7 @@ void joy_standard_poll(void)
+ continue;
+
+ /* get value of buttons */
+-#if defined(__ARCH_netbsd) || defined(__ARCH_freebsd) || defined(__ARCH_openbsd)
++#if defined(__ARCH_netbsd) || defined(__ARCH_freebsd) || defined(__ARCH_openbsd) || defined(__ARCH_dragonfly)
+ joy_data[i].buttons[0] = my_joy_data.b1;
+ joy_data[i].buttons[1] = my_joy_data.b2;
+ #else
diff --git a/emulators/xmess/patches/patch-ag b/emulators/xmess/patches/patch-ag
new file mode 100644
index 00000000000..764093c4683
--- /dev/null
+++ b/emulators/xmess/patches/patch-ag
@@ -0,0 +1,36 @@
+$NetBSD: patch-ag,v 1.4 2005/11/17 19:54:09 joerg Exp $
+
+--- src/unix/joystick-drivers/joy_usb.c.orig 2005-11-17 16:19:51.000000000 +0000
++++ src/unix/joystick-drivers/joy_usb.c
+@@ -22,7 +22,7 @@ struct rc_option joy_usb_opts[] = {
+ #ifdef USB_JOYSTICK
+
+
+-#if !defined(__ARCH_openbsd) && !defined(__ARCH_netbsd) && !defined(__ARCH_freebsd)
++#if !defined(__ARCH_openbsd) && !defined(__ARCH_netbsd) && !defined(__ARCH_freebsd) && !defined(__ARCH_dragonfly)
+ #error "USB joysticks are only supported under OpenBSD, NetBSD and FreeBSD. Patches to support other archs are welcome ;)"
+ #endif
+
+@@ -47,8 +47,13 @@ struct rc_option joy_usb_opts[] = {
+ #include <sys/ioctl.h>
+ #endif
+
++#ifdef __ARCH_dragonfly
++#include <bus/usb/usb.h>
++#include <bus/usb/usbhid.h>
++#else
+ #include <dev/usb/usb.h>
+ #include <dev/usb/usbhid.h>
++#endif
+
+ int axis_usage[] = {
+ HUG_X, HUG_Y, HUG_Z,
+@@ -118,7 +123,7 @@ static int joy_initialize_hid(int i)
+ }
+
+ #if defined(HAVE_USBHID_H) || defined(HAVE_LIBUSBHID_H)
+-#if defined(__ARCH_openbsd) || defined(__ARCH_netbsd) || (defined(__ARCH_freebsd) && __FreeBSD_version > 500000)
++#if defined(__ARCH_openbsd) || defined(__ARCH_netbsd) || (defined(__ARCH_freebsd) && __FreeBSD_version > 500000) || defined(__ARCH_dragonfly)
+ if (ioctl(joy_data[i].fd, USB_GET_REPORT_ID, &report_id) < 0)
+ {
+ fprintf(stderr_file, "error: /dev/uhid%d: %s", i, strerror(errno));