aboutsummaryrefslogtreecommitdiffstats
path: root/emulators/xmame
diff options
context:
space:
mode:
authormdodd <mdodd@FreeBSD.org>2003-04-09 12:51:09 +0800
committermdodd <mdodd@FreeBSD.org>2003-04-09 12:51:09 +0800
commit1b9828fe53fbba7fd26bf8765d7f0427f5ab00c1 (patch)
tree2bf4221b01fd74ca45748b0e1e19cb494c1f01c5 /emulators/xmame
parent0a80d7ac99d441fd44d4f291a5a01205d7da4a35 (diff)
downloadfreebsd-ports-gnome-1b9828fe53fbba7fd26bf8765d7f0427f5ab00c1.tar.gz
freebsd-ports-gnome-1b9828fe53fbba7fd26bf8765d7f0427f5ab00c1.tar.zst
freebsd-ports-gnome-1b9828fe53fbba7fd26bf8765d7f0427f5ab00c1.zip
Build fixes for __FreeBSD_version >= 500111 (usbhid changes.)
Diffstat (limited to 'emulators/xmame')
-rw-r--r--emulators/xmame/files/patch-src::unix::joystick-drivers::joy_usb.c58
-rw-r--r--emulators/xmame/files/patch-src::unix::unix.mak32
2 files changed, 90 insertions, 0 deletions
diff --git a/emulators/xmame/files/patch-src::unix::joystick-drivers::joy_usb.c b/emulators/xmame/files/patch-src::unix::joystick-drivers::joy_usb.c
new file mode 100644
index 000000000000..c96dc72eb3ba
--- /dev/null
+++ b/emulators/xmame/files/patch-src::unix::joystick-drivers::joy_usb.c
@@ -0,0 +1,58 @@
+--- src/unix/joystick-drivers/joy_usb.c.orig Mon Mar 17 22:36:59 2003
++++ src/unix/joystick-drivers/joy_usb.c Tue Apr 8 22:54:47 2003
+@@ -20,19 +20,27 @@
+ "Patches to support other archs are welcome ;)"
+ #endif
+
+-#if defined(__ARCH_netbsd)
+-#ifdef HAVE_USBHID_H
+-#include <usbhid.h>
++#if defined(HAVE_USBHID_H) || defined(HAVE_LIBUSBHID_H)
++# ifdef HAVE_USBHID_H
++# include <usbhid.h>
++# endif
++# ifdef HAVE_LIBUSBHID_H
++# include <libusbhid.h>
++# endif
+ #else
+-#include <usb.h>
+-#endif
+-#elif defined(__ARCH_freebsd)
+-#ifdef HAVE_USBHID_H
+-#include <libusbhid.h>
+-#else
+-#include <libusb.h>
++# ifdef __ARCH_netbsd
++# include <usb.h>
++# endif
++# ifdef __ARCH_freebsd
++# include <libusb.h>
++# endif
+ #endif
++
++#ifdef __ARCH_freebsd
++#include <osreldate.h>
++#include <sys/ioctl.h>
+ #endif
++
+ #include <dev/usb/usb.h>
+ #include <dev/usb/usbhid.h>
+
+@@ -90,7 +98,7 @@
+
+ priv_joy_data[i].hids = NULL;
+
+-#ifdef HAVE_USBHID_H
++#if defined(HAVE_USBHID_H) || defined(HAVE_LIBUSBHID_H)
+ #if defined(__ARCH_netbsd) || (defined(__ARCH_freebsd) && __FreeBSD_version > 500000)
+ if (ioctl(joy_data[i].fd, USB_GET_REPORT_ID, &report_id) < 0)
+ {
+@@ -114,7 +122,7 @@
+ priv_joy_data[i].dlen = size;
+
+ is_joystick = 0;
+-#if defined(__ARCH_netbsd) && defined(HAVE_USBHID_H)
++#if defined(HAVE_USBHID_H)
+ for (d = hid_start_parse(rd, 1 << hid_input, report_id);
+ hid_get_item(d, &h); )
+ #else
diff --git a/emulators/xmame/files/patch-src::unix::unix.mak b/emulators/xmame/files/patch-src::unix::unix.mak
index 1c652a13eeb8..321e8ffdcc61 100644
--- a/emulators/xmame/files/patch-src::unix::unix.mak
+++ b/emulators/xmame/files/patch-src::unix::unix.mak
@@ -20,3 +20,35 @@
endif
ifdef SOUND_WAVEOUT
+@@ -248,27 +248,20 @@
+ ifdef JOY_PS2
+ CONFIG += -DPS2_JOYSTICK
+ endif
++
+ ifdef JOY_USB
+ CONFIG += -DUSB_JOYSTICK
+-ifeq ($(ARCH), netbsd)
+ ifeq ($(shell test -f /usr/include/usbhid.h && echo have_usbhid), have_usbhid)
+ CONFIG += -DHAVE_USBHID_H
+ MY_LIBS += -lusbhid
+ else
+-MY_LIBS += -lusb
+-endif
+-else
+-ifeq ($(ARCH), freebsd)
+-ifeq ($(shell test -f /usr/include/libusbhid.h && echo have_usbhid), have_usbhid)
+-CONFIG += -DHAVE_USBHID_H
++ifeq ($(shell test -f /usr/include/libusbhid.h && echo have_libusbhid), have_libusbhid)
++CONFIG += -DHAVE_LIBUSBHID_H
+ MY_LIBS += -lusbhid
+-else
+-MY_LIBS += -lusb
++endif
+ endif
+ else
+ MY_LIBS += -lusb
+-endif
+-endif
+ endif
+
+ ifdef EFENCE