diff options
author | Maxim Sobolev <sobomax@FreeBSD.org> | 2002-04-18 08:10:01 +0000 |
---|---|---|
committer | Maxim Sobolev <sobomax@FreeBSD.org> | 2002-04-18 08:10:01 +0000 |
commit | 3d510485e53d7e2ad78c00305f4e230e9feff5c7 (patch) | |
tree | 13f4e30c4af5488d284c6d367827d0d7f3bae1a0 /devel/sdl12 | |
parent | 89b10cd027e27666e34c546569d64157838fc540 (diff) | |
download | ports-3d510485e53d7e2ad78c00305f4e230e9feff5c7.tar.gz ports-3d510485e53d7e2ad78c00305f4e230e9feff5c7.zip |
Notes
Diffstat (limited to 'devel/sdl12')
-rw-r--r-- | devel/sdl12/Makefile | 6 | ||||
-rw-r--r-- | devel/sdl12/files/patch-ac | 2 | ||||
-rw-r--r-- | devel/sdl12/files/patch-src::joystick::bsd::SDL_sysjoystick.c | 28 |
3 files changed, 25 insertions, 11 deletions
diff --git a/devel/sdl12/Makefile b/devel/sdl12/Makefile index 642916d4572d..975a93c85c00 100644 --- a/devel/sdl12/Makefile +++ b/devel/sdl12/Makefile @@ -49,6 +49,12 @@ CONFIGURE_ARGS+=--enable-video-opengl LIB_DEPENDS+= vga.1:${PORTSDIR}/graphics/svgalib CONFIGURE_ARGS+=--enable-video-svga .endif +.if exists(/usr/include/libusbhid.h) +CONFIGURE_ENV+= USB_LIBS=-lusbhid +CFLAGS+= -DHAVE_LIBUSBHID_H +.else +CONFIGURE_ENV+= USB_LIBS=-lusb +.endif .include <bsd.port.pre.mk> diff --git a/devel/sdl12/files/patch-ac b/devel/sdl12/files/patch-ac index 863d4864981c..3d322f5c6890 100644 --- a/devel/sdl12/files/patch-ac +++ b/devel/sdl12/files/patch-ac @@ -39,7 +39,7 @@ $FreeBSD$ if test x$enable_joystick = xyes; then JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS bsd" JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS bsd/libjoystick_bsd.la" -+ SYSTEM_LIBS="$SYSTEM_LIBS -lusb" ++ SYSTEM_LIBS="$SYSTEM_LIBS $USB_LIBS" fi # Set up files for the cdrom library if test x$enable_cdrom = xyes; then diff --git a/devel/sdl12/files/patch-src::joystick::bsd::SDL_sysjoystick.c b/devel/sdl12/files/patch-src::joystick::bsd::SDL_sysjoystick.c index 0365f18a0cb7..283d51def5b6 100644 --- a/devel/sdl12/files/patch-src::joystick::bsd::SDL_sysjoystick.c +++ b/devel/sdl12/files/patch-src::joystick::bsd::SDL_sysjoystick.c @@ -1,18 +1,22 @@ $FreeBSD$ ---- src/joystick/bsd/SDL_sysjoystick.c 2002/04/17 11:06:43 1.1 -+++ src/joystick/bsd/SDL_sysjoystick.c 2002/04/17 11:20:41 -@@ -41,7 +41,7 @@ +--- src/joystick/bsd/SDL_sysjoystick.c.orig Sun Mar 10 05:49:25 2002 ++++ src/joystick/bsd/SDL_sysjoystick.c Thu Apr 18 10:48:00 2002 +@@ -41,7 +41,11 @@ #include <dev/usb/usb.h> #include <dev/usb/usbhid.h> -#include <usbhid.h> ++#if !defined(HAVE_LIBUSBHID_H) +#include <libusb.h> ++#else ++#include <libusbhid.h> ++#endif #include "SDL_error.h" #include "SDL_joystick.h" -@@ -205,7 +205,8 @@ +@@ -205,7 +209,8 @@ joy->nballs = 0; while (hid_get_item(hdata, &hitem) > 0) { @@ -22,7 +26,7 @@ $FreeBSD$ switch (hitem.kind) { case hid_collection: -@@ -275,7 +276,7 @@ +@@ -275,7 +280,7 @@ Sint32 v; rep = &joy->hwdata->inreport; @@ -31,7 +35,7 @@ $FreeBSD$ return; } hdata = hid_start_parse(joy->hwdata->repdesc, 1 << hid_input); -@@ -310,7 +311,7 @@ +@@ -310,7 +315,7 @@ goto scaleaxe; } scaleaxe: @@ -40,7 +44,7 @@ $FreeBSD$ if (v != 127) { if (v < 127) { v = -(256 - v); -@@ -329,7 +330,7 @@ +@@ -329,7 +334,7 @@ } break; case HUP_BUTTON: @@ -49,16 +53,20 @@ $FreeBSD$ &hitem); if (joy->buttons[nbutton] != v) { SDL_PrivateJoystickButton(joy, -@@ -381,7 +382,7 @@ +@@ -381,7 +386,12 @@ { int len; -- len = hid_report_size(rd, repinfo[repind].kind, &r->rid); ++#if !defined(HAVE_LIBUSBHID_H) + len = hid_report_size(rd, repinfo[repind].kind, &r->rid); ++#else + len = hid_report_size(rd, r->rid, repinfo[repind].kind); ++#endif ++ if (len < 0) { SDL_SetError("Negative HID report size"); return (-1); -@@ -389,7 +390,7 @@ +@@ -389,7 +399,7 @@ r->size = len; if (r->size > 0) { |