pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/emulators/xmame Add DragonFly support. For the DGA dri...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/8da5e01a0439
branches:  trunk
changeset: 503289:8da5e01a0439
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Thu Nov 17 19:55:54 2005 +0000

description:
Add DragonFly support. For the DGA drivers, include sys/time.h before
sys/resource.h on DragonFly, struct timeval is needed.

diffstat:

 emulators/xmame/Makefile         |   3 ++-
 emulators/xmame/distinfo         |   6 +++++-
 emulators/xmame/patches/patch-ac |  12 ++++++++++++
 emulators/xmame/patches/patch-ad |  12 ++++++++++++
 emulators/xmame/patches/patch-af |  40 ++++++++++++++++++++++++++++++++++++++++
 emulators/xmame/patches/patch-ag |  36 ++++++++++++++++++++++++++++++++++++
 6 files changed, 107 insertions(+), 2 deletions(-)

diffs (150 lines):

diff -r c29ad7127460 -r 8da5e01a0439 emulators/xmame/Makefile
--- a/emulators/xmame/Makefile  Thu Nov 17 19:54:08 2005 +0000
+++ b/emulators/xmame/Makefile  Thu Nov 17 19:55:54 2005 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.136 2005/10/23 20:03:25 kristerw Exp $
+# $NetBSD: Makefile,v 1.137 2005/11/17 19:55:54 joerg Exp $
 #
 
 DISTNAME=              xmame-0.101
@@ -51,6 +51,7 @@
 MAME_ARCH.NetBSD?=     netbsd
 MAME_ARCH.Linux?=      linux
 MAME_ARCH.SunOS?=      solaris
+MAME_ARCH.DragonFly?=  dragonfly
 .if !defined(MAME_ARCH.${OPSYS})
 MAME_ARCH.${OPSYS}?=   generic
 .endif
diff -r c29ad7127460 -r 8da5e01a0439 emulators/xmame/distinfo
--- a/emulators/xmame/distinfo  Thu Nov 17 19:54:08 2005 +0000
+++ b/emulators/xmame/distinfo  Thu Nov 17 19:55:54 2005 +0000
@@ -1,8 +1,12 @@
-$NetBSD: distinfo,v 1.67 2005/10/23 20:03:25 kristerw Exp $
+$NetBSD: distinfo,v 1.68 2005/11/17 19:55:54 joerg Exp $
 
 SHA1 (xmame-0.101.tar.bz2) = 2746b914d8af534fac4802f22a68dcce982ea223
 RMD160 (xmame-0.101.tar.bz2) = 92ad8035fb134df64e825a976dcf002d38eeb9a8
 Size (xmame-0.101.tar.bz2) = 15978618 bytes
 SHA1 (patch-aa) = 909583adb17f7485ad5cd1e390cdbb73d367d7be
 SHA1 (patch-ab) = dd21329b7e1a05bc7ea12b5a98a05d502dc36656
+SHA1 (patch-ac) = f4e0f614577924d19713e1862efa1e6d42e791c4
+SHA1 (patch-ad) = 087e162f8b05d894532e6d5091d8b0008c3f0e80
 SHA1 (patch-ae) = efd91447d33b6cb1246bbd2264f92b4ab9be44e0
+SHA1 (patch-af) = 1498df9c05561ee0ace376203506aeb3ecbc9e72
+SHA1 (patch-ag) = c33b9f3f8c81756abcb1bb1d81820f522f3f7293
diff -r c29ad7127460 -r 8da5e01a0439 emulators/xmame/patches/patch-ac
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/xmame/patches/patch-ac  Thu Nov 17 19:55:54 2005 +0000
@@ -0,0 +1,12 @@
+$NetBSD: patch-ac,v 1.12 2005/11/17 19:55:55 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 -r c29ad7127460 -r 8da5e01a0439 emulators/xmame/patches/patch-ad
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/xmame/patches/patch-ad  Thu Nov 17 19:55:54 2005 +0000
@@ -0,0 +1,12 @@
+$NetBSD: patch-ad,v 1.6 2005/11/17 19:55:55 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 -r c29ad7127460 -r 8da5e01a0439 emulators/xmame/patches/patch-af
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/xmame/patches/patch-af  Thu Nov 17 19:55:54 2005 +0000
@@ -0,0 +1,40 @@
+$NetBSD: patch-af,v 1.7 2005/11/17 19:55:55 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 -r c29ad7127460 -r 8da5e01a0439 emulators/xmame/patches/patch-ag
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/xmame/patches/patch-ag  Thu Nov 17 19:55:54 2005 +0000
@@ -0,0 +1,36 @@
+$NetBSD: patch-ag,v 1.4 2005/11/17 19:55:55 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));



Home | Main Index | Thread Index | Old Index