Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 Jul 2012 10:03:52 +0000 (UTC)
From:      Marcus von Appen <mva@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r301271 - in head: Mk devel/sdl12 devel/sdl12/files
Message-ID:  <201207211003.q6LA3qwG015914@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mva
Date: Sat Jul 21 10:03:51 2012
New Revision: 301271
URL: http://svn.freebsd.org/changeset/ports/301271

Log:
  - Fix joystick input support for RELENG_9
  - while here, convert to optionsng framework
  
  PR:		ports/169042
  Submitted by:	Jeffrey Pfau <jeffrey@endrift.com>

Modified:
  head/Mk/bsd.options.desc.mk
  head/devel/sdl12/Makefile   (contents, props changed)
  head/devel/sdl12/files/patch-src_joystick_bsd_SDL_sysjoystick.c   (contents, props changed)

Modified: head/Mk/bsd.options.desc.mk
==============================================================================
--- head/Mk/bsd.options.desc.mk	Sat Jul 21 09:51:21 2012	(r301270)
+++ head/Mk/bsd.options.desc.mk	Sat Jul 21 10:03:51 2012	(r301271)
@@ -79,6 +79,7 @@ GDM_DESC?=		Build GDM login manager
 GEOIP_DESC?=		GeoIP support
 GEOS_DESC?=		GEOS support
 GEOTIFF_DESC?=		GeoTIFF support
+GGI_DESC?=		General Graphics Interface support
 GIF_DESC?=		GIF support
 GLADE_DESC?=		Glade interface support
 GMP_DESC?=		GMP support
@@ -242,6 +243,7 @@ SSH_DESC?=		SSH support
 SSL_DESC?=		SSL support
 STATIC_DESC?=		Build static executable/libraries
 SVG_DESC?=		SVG image support
+SVGALIB_DESC?=		SVGA graphics support
 SVN_DESC?=		Subversion support
 SZIP_DESC?=		Szip support
 TCL_DESC?=		Tcl scripting language support

Modified: head/devel/sdl12/Makefile
==============================================================================
--- head/devel/sdl12/Makefile	Sat Jul 21 09:51:21 2012	(r301270)
+++ head/devel/sdl12/Makefile	Sat Jul 21 10:03:51 2012	(r301271)
@@ -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:

Modified: head/devel/sdl12/files/patch-src_joystick_bsd_SDL_sysjoystick.c
==============================================================================
--- head/devel/sdl12/files/patch-src_joystick_bsd_SDL_sysjoystick.c	Sat Jul 21 09:51:21 2012	(r301270)
+++ head/devel/sdl12/files/patch-src_joystick_bsd_SDL_sysjoystick.c	Sat Jul 21 10:03:51 2012	(r301271)
@@ -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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201207211003.q6LA3qwG015914>