diff options
author | mva <mva@FreeBSD.org> | 2012-07-21 18:03:51 +0800 |
---|---|---|
committer | mva <mva@FreeBSD.org> | 2012-07-21 18:03:51 +0800 |
commit | 743cc7a57dc2ece2974d9f47f44d7704b90e2ac1 (patch) | |
tree | fb6f0526f8864d249d3cf9918b095414578f1ffc /devel/sdl12 | |
parent | 98b02ba022fd0df57cb2d5c00a2b5379d5d3ea82 (diff) | |
download | freebsd-ports-gnome-743cc7a57dc2ece2974d9f47f44d7704b90e2ac1.tar.gz freebsd-ports-gnome-743cc7a57dc2ece2974d9f47f44d7704b90e2ac1.tar.zst freebsd-ports-gnome-743cc7a57dc2ece2974d9f47f44d7704b90e2ac1.zip |
- Fix joystick input support for RELENG_9
- while here, convert to optionsng framework
PR: ports/169042
Submitted by: Jeffrey Pfau <jeffrey@endrift.com>
Diffstat (limited to 'devel/sdl12')
-rw-r--r-- | devel/sdl12/Makefile | 111 | ||||
-rw-r--r-- | devel/sdl12/files/patch-src_joystick_bsd_SDL_sysjoystick.c | 33 |
2 files changed, 79 insertions, 65 deletions
diff --git a/devel/sdl12/Makefile b/devel/sdl12/Makefile index 922dc93c0aaa..0e0235c9ca94 100644 --- a/devel/sdl12/Makefile +++ b/devel/sdl12/Makefile @@ -7,8 +7,8 @@ PORTNAME= sdl PORTVERSION= 1.2.15 +PORTREVISION= 2 PORTEPOCH= 2 -PORTREVISION= 1 CATEGORIES= devel MASTER_SITES= http://www.libsdl.org/release/ DISTNAME= SDL-${PORTVERSION} @@ -38,106 +38,93 @@ CONFIGURE_ARGS+=--disable-video-directfb EXAMPLES= test/*.c test/*.bmp test/*.dat test/*.xbm test/*.wav DOCS= BUGS COPYING CREDITS README README-SDL.txt WhatsNew docs.html -OPTIONS= AALIB "ASCII art support" On \ - ARTS "ARts sound system support" Off \ - ESD "Enlightenment sound system support" Off \ - GGI "General Graphics Interface support" Off \ - NAS "Network Audio System support" Off \ - OPENGL "OpenGL 2D/3D graphics support" On \ - OSS "Open Sound System support" On \ - PULSEAUDIO "PulseAudio sound system support" Off \ - SVGALIB "SVGA graphics support (i386 only)" Off +OPTIONS_DEFINE= AALIB ARTS ESOUND GGI NAS OPENGL OSS PULSEAUDIO SVGALIB X11 +OPTIONS_DEFAULT= AALIB OPENGL OSS X11 .if exists(/usr/lib/libvgl.so) -OPTIONS+= VGL "Video Graphics Lib support" On -.else -WITHOUT_VGL= true -.endif - -.if defined(WITHOUT_X11) -WITHOUT_XLIB= true -.else -OPTIONS+= XLIB "XLib (xorg) graphics support" On +OPTIONS_DEFINE+= VGL +VGL_DESC= Video Graphics Lib support +OPTIONS_DEFAULT+= VGL .endif .include <bsd.port.pre.mk> MAN3!= ${CAT} ${FILESDIR}/man3 -.if defined(WITHOUT_AALIB) -CONFIGURE_ARGS+=--disable-video-aalib +.if ${PORT_OPTIONS:MAALIB} +CONFIGURE_ARGS+= --enable-video-aalib +LIB_DEPENDS+= aa:${PORTSDIR}/graphics/aalib .else -LIB_DEPENDS+= aa.1:${PORTSDIR}/graphics/aalib -CONFIGURE_ARGS+=--enable-video-aalib +CONFIGURE_ARGS+= --disable-video-aalib .endif -.if defined(WITH_ARTS) -LIB_DEPENDS+= artsc.0:${PORTSDIR}/audio/arts -CONFIGURE_ARGS+=--enable-arts +.if ${PORT_OPTIONS:MARTS} +LIB_DEPENDS+= artsc:${PORTSDIR}/audio/arts +CONFIGURE_ARGS+= --enable-arts .else -CONFIGURE_ARGS+=--disable-arts +CONFIGURE_ARGS+= --disable-arts .endif -.if defined(WITH_ESD) -USE_GNOME+= esound -CONFIGURE_ARGS+=--enable-esd +.if ${PORT_OPTIONS:MESOUND} +USE_GNOME+= esound +CONFIGURE_ARGS+= --enable-esd .else -CONFIGURE_ARGS+=--disable-esd --disable-esdtest +CONFIGURE_ARGS+= --disable-esd --disable-esdtest .endif -.if defined(WITH_GGI) -LIB_DEPENDS+= ggi.2:${PORTSDIR}/graphics/libggi -CONFIGURE_ARGS+=--enable-video-ggi +.if ${PORT_OPTIONS:MGGI} +LIB_DEPENDS+= ggi:${PORTSDIR}/graphics/libggi +CONFIGURE_ARGS+= --enable-video-ggi .else -CONFIGURE_ARGS+=--disable-video-ggi +CONFIGURE_ARGS+= --disable-video-ggi .endif -.if defined(WITH_NAS) -LIB_DEPENDS+= audio.2:${PORTSDIR}/audio/nas +.if ${PORT_OPTIONS:MNAS} +LIB_DEPENDS+= audio:${PORTSDIR}/audio/nas .else -CONFIGURE_ARGS+=--disable-nas +CONFIGURE_ARGS+= --disable-nas .endif -.if defined(WITHOUT_OPENGL) -CONFIGURE_ARGS+=--disable-video-opengl +.if ${PORT_OPTIONS:MOPENGL} +CONFIGURE_ARGS+= --enable-video-opengl +USE_GL= yes .else -USE_GL= yes -CONFIGURE_ARGS+=--enable-video-opengl +CONFIGURE_ARGS+= --disable-video-opengl .endif -.if defined(WITHOUT_OSS) -CONFIGURE_ARGS+=--disable-oss +.if ${PORT_OPTIONS:MOSS} +CONFIGURE_ARGS+= --enable-oss .else -CONFIGURE_ARGS+=--enable-oss +CONFIGURE_ARGS+= --disable-oss .endif -.if defined(WITH_PULSEAUDIO) -LIB_DEPENDS+= pulse-simple.0:${PORTSDIR}/audio/pulseaudio +.if ${PORT_OPTIONS:MPULSEAUDIO} +LIB_DEPENDS+= pulse-simple:${PORTSDIR}/audio/pulseaudio .else -CONFIGURE_ARGS+=--disable-pulseaudio +CONFIGURE_ARGS+= --disable-pulseaudio .endif -.if (defined(WITHOUT_SVGALIB) || ${ARCH} != "i386") -CONFIGURE_ARGS+=--disable-video-svga +.if ${PORT_OPTIONS:MSVGALIB} +LIB_DEPENDS+= vga:${PORTSDIR}/graphics/svgalib +CONFIGURE_ARGS+= --enable-video-svga .else -LIB_DEPENDS+= vga.1:${PORTSDIR}/graphics/svgalib -CONFIGURE_ARGS+=--enable-video-svga +CONFIGURE_ARGS+= --disable-video-svga .endif -.if defined(WITHOUT_VGL) -CONFIGURE_ARGS+=--disable-video-vgl -PKGMESSAGE= none -DISPLAY_MSG= ${DO_NADA} +.if ${PORT_OPTIONS:MVGL} +CONFIGURE_ARGS+= --enable-video-vgl +DISPLAY_MSG= ${CAT} ${PKGMESSAGE} .else -CONFIGURE_ARGS+=--enable-video-vgl -DISPLAY_MSG= ${CAT} ${PKGMESSAGE} +CONFIGURE_ARGS+= --disable-video-vgl +PKGMESSAGE= none +DISPLAY_MSG= ${DO_NADA} .endif -.if defined(WITHOUT_XLIB) -PKGNAMESUFFIX= -nox11 -CONFIGURE_ARGS+=--disable-video-x11 +.if ${PORT_OPTIONS:MX11} +USE_XORG= x11 xrender xrandr xextproto .else -USE_XORG= x11 xrender xrandr xextproto +PKGNAMESUFFIX= -nox11 +CONFIGURE_ARGS+= --disable-video-x11 .endif post-install: 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 a8a8a9a7f41c..a4b3ae7fdeb1 100644 --- a/devel/sdl12/files/patch-src_joystick_bsd_SDL_sysjoystick.c +++ b/devel/sdl12/files/patch-src_joystick_bsd_SDL_sysjoystick.c @@ -1,11 +1,38 @@ ---- src/joystick/bsd/SDL_sysjoystick.c.orig 2012-01-28 12:07:18.000000000 +0100 -+++ src/joystick/bsd/SDL_sysjoystick.c 2012-01-28 12:08:44.000000000 +0100 -@@ -148,7 +148,7 @@ +--- src/joystick/bsd/SDL_sysjoystick.c.orig 2012-01-19 07:30:06.000000000 +0100 ++++ src/joystick/bsd/SDL_sysjoystick.c 2012-07-21 10:09:16.000000000 +0200 +@@ -82,7 +82,9 @@ + #define MAX_JOYS (MAX_UHID_JOYS + MAX_JOY_JOYS) + + struct report { +-#if defined(__FREEBSD__) && (__FreeBSD_kernel_version > 800063) ++#if defined(__FREEBSD__) && (__FreeBSD_kernel_version > 900000) ++ void *buf; /* Buffer */ ++#elif defined(__FREEBSD__) && (__FreeBSD_kernel_version > 800063) + struct usb_gen_descriptor *buf; /* Buffer */ + #else + struct usb_ctl_report *buf; /* Buffer */ +@@ -148,8 +150,10 @@ static int report_alloc(struct report *, struct report_desc *, int); static void report_free(struct report *); -#if defined(USBHID_UCR_DATA) || defined(__FreeBSD_kernel__) +#if defined(USBHID_UCR_DATA) || (defined(__FreeBSD_kernel__) && __FreeBSD_kernel_version <= 800063) #define REP_BUF_DATA(rep) ((rep)->buf->ucr_data) ++#elif (defined(__FREEBSD__) && (__FreeBSD_kernel_version > 900000)) ++#define REP_BUF_DATA(rep) ((rep)->buf) #elif (defined(__FREEBSD__) && (__FreeBSD_kernel_version > 800063)) #define REP_BUF_DATA(rep) ((rep)->buf->ugd_data) + #else +@@ -582,8 +586,12 @@ + r->size = len; + + if (r->size > 0) { ++#if defined(__FREEBSD__) && (__FreeBSD_kernel_version > 900000) ++ r->buf = SDL_malloc(r->size); ++#else + r->buf = SDL_malloc(sizeof(*r->buf) - sizeof(REP_BUF_DATA(r)) + + r->size); ++#endif + if (r->buf == NULL) { + SDL_OutOfMemory(); + return (-1); |