aboutsummaryrefslogtreecommitdiff
path: root/devel/sdl12
diff options
context:
space:
mode:
authorMarcus von Appen <mva@FreeBSD.org>2009-03-13 16:32:57 +0000
committerMarcus von Appen <mva@FreeBSD.org>2009-03-13 16:32:57 +0000
commit28cf0d495811a05c12cdb0f7ffa0ffb26a06eacc (patch)
tree1ba407d3c5507c6009fabc48b0f382e7f4d8466f /devel/sdl12
parent716e48ad8018d1027d736e027687a3eaaf9c9796 (diff)
downloadports-28cf0d495811a05c12cdb0f7ffa0ffb26a06eacc.tar.gz
ports-28cf0d495811a05c12cdb0f7ffa0ffb26a06eacc.zip
Notes
Diffstat (limited to 'devel/sdl12')
-rw-r--r--devel/sdl12/Makefile6
-rw-r--r--devel/sdl12/files/patch-src_joystick_bsd_SDL_sysjoystick.c40
2 files changed, 41 insertions, 5 deletions
diff --git a/devel/sdl12/Makefile b/devel/sdl12/Makefile
index db813019ab68..298b1a72772b 100644
--- a/devel/sdl12/Makefile
+++ b/devel/sdl12/Makefile
@@ -7,7 +7,7 @@
PORTNAME= sdl
PORTVERSION= 1.2.13
-PORTREVISION= 2
+PORTREVISION= 3
PORTEPOCH= 2
CATEGORIES= devel
MASTER_SITES= http://www.libsdl.org/release/
@@ -64,10 +64,6 @@ OPTIONS+= XLIB "XLib (xorg) graphics support" On
MAN3!= ${CAT} ${FILESDIR}/man3
-.if ${OSVERSION} > 800063
-CONFIGURE_ARGS+=--disable-joystick
-.endif
-
.if defined(WITHOUT_AALIB)
CONFIGURE_ARGS+=--disable-video-aalib
.else
diff --git a/devel/sdl12/files/patch-src_joystick_bsd_SDL_sysjoystick.c b/devel/sdl12/files/patch-src_joystick_bsd_SDL_sysjoystick.c
new file mode 100644
index 000000000000..e7e503fad2ab
--- /dev/null
+++ b/devel/sdl12/files/patch-src_joystick_bsd_SDL_sysjoystick.c
@@ -0,0 +1,40 @@
+--- src/joystick/bsd/SDL_sysjoystick.c.orig 2009-03-12 22:54:57.000000000 +0100
++++ src/joystick/bsd/SDL_sysjoystick.c 2009-03-12 23:04:53.000000000 +0100
+@@ -74,6 +74,13 @@
+ #define MAX_JOY_JOYS 2
+ #define MAX_JOYS (MAX_UHID_JOYS + MAX_JOY_JOYS)
+
++#if defined(__FREEBSD__) && (__FreeBSD_version > 800063)
++struct usb_ctl_report {
++ int ucr_report;
++ u_char ucr_data[1024]; /* filled data size will vary */
++};
++#endif
++
+ struct report {
+ struct usb_ctl_report *buf; /* Buffer */
+ size_t size; /* Buffer size */
+@@ -137,7 +144,7 @@
+ static int report_alloc(struct report *, struct report_desc *, int);
+ static void report_free(struct report *);
+
+-#ifdef USBHID_UCR_DATA
++#if defined(USBHID_UCR_DATA) || (defined(__FREEBSD__) && (__FreeBSD_version > 800063))
+ #define REP_BUF_DATA(rep) ((rep)->buf->ucr_data)
+ #else
+ #define REP_BUF_DATA(rep) ((rep)->buf->data)
+@@ -292,9 +299,13 @@
+ strerror(errno));
+ goto usberr;
+ }
+-
++#if defined(__FREEBSD__) && (__FreeBSD_version > 800063)
++ rep->rid = hid_get_report_id(fd);
++ if (rep->rid < 0) {
++#else
+ rep = &hw->inreport;
+ if (ioctl(fd, USB_GET_REPORT_ID, &rep->rid) < 0) {
++#endif
+ rep->rid = -1; /* XXX */
+ }
+ if (report_alloc(rep, hw->repdesc, REPORT_INPUT) < 0) {