Date: Sun, 01 Apr 2007 00:08:28 +0300 (EEST) From: Teemu Korhonen <venefics@mbnet.fi> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/111076: [patch] multimedia/mplayer: enable joystick support Message-ID: <200703312108.l2VL8S0i021829@veneficus.koti.lan> Resent-Message-ID: <200703312150.l2VLo4ZA060889@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 111076 >Category: ports >Synopsis: [patch] multimedia/mplayer: enable joystick support >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sat Mar 31 21:50:03 GMT 2007 >Closed-Date: >Last-Modified: >Originator: Teemu Korhonen <venefics@mbnet.fi> >Release: FreeBSD 6.2-RELEASE i386 >Organization: >Environment: >Description: MPlayer's joystick support works in FreeBSD with devel/linux-js, but it is disabled if not compiled in linux. This patch adds config-option to enable joystick support (+add dependency to linux-js) and disables linux check for joystick. Files affected on port: Makefile patch-configure (new file) patch-input-joystick.c (new file) >How-To-Repeat: >Fix: --- mplayer-joystick.diff begins here --- diff -ruN mplayer/Makefile mplayer.new/Makefile --- mplayer/Makefile Sat Mar 31 18:23:00 2007 +++ mplayer.new/Makefile Sat Mar 31 16:49:51 2007 @@ -174,6 +174,7 @@ OPTIONS+= LIBCDIO "Enable libcdio support" off OPTIONS+= CDPARANOIA "Enable cdparanoia support" off OPTIONS+= LIBLZO "Enable external liblzo library" off +OPTIONS+= JOYSTICK "Enable joystick support" off .endif WANT_GNOME= yes @@ -584,6 +585,13 @@ DEFAULT_KERN_HZ=${WITH_KERN_HZ} .else DEFAULT_KERN_HZ=1024 +.endif + +.if defined(WITH_JOYSTICK) +BUILD_DEPENDS+= ${LOCALBASE}/include/linux/joystick.h:${PORTSDIR}/devel/linux-js +CONFIGURE_ARGS+=--enable-joystick +.else +CONFIGURE_ARGS+=--disable-joystick .endif # "enable" build for other archs diff -ruN mplayer/files/patch-configure mplayer.new/files/patch-configure --- mplayer/files/patch-configure Thu Jan 1 02:00:00 1970 +++ mplayer.new/files/patch-configure Sat Mar 31 15:33:05 2007 @@ -0,0 +1,19 @@ +--- configure.orig Sat Mar 31 04:34:54 2007 ++++ configure Sat Mar 31 15:31:07 2007 +@@ -7362,12 +7362,12 @@ + echocheck "joystick" + _def_joystick='#undef HAVE_JOYSTICK' + if test "$_joystick" = yes ; then +- if linux ; then ++# if linux ; then + # TODO add some check + _def_joystick='#define HAVE_JOYSTICK 1' +- else +- _joystick="no (unsupported under $system_name)" +- fi ++# else ++# _joystick="no (unsupported under $system_name)" ++# fi + fi + echores "$_joystick" + diff -ruN mplayer/files/patch-input-joystick.c mplayer.new/files/patch-input-joystick.c --- mplayer/files/patch-input-joystick.c Thu Jan 1 02:00:00 1970 +++ mplayer.new/files/patch-input-joystick.c Sat Mar 31 05:12:10 2007 @@ -0,0 +1,29 @@ +--- input/joystick.c.orig Sat Mar 31 05:10:08 2007 ++++ input/joystick.c Sat Mar 31 05:09:30 2007 +@@ -24,8 +24,6 @@ + #define JS_DEV "/dev/input/js0" + #endif + +-#ifdef TARGET_LINUX +- + #include <linux/joystick.h> + + int axis[256]; +@@ -147,17 +145,3 @@ + return MP_INPUT_NOTHING; + } + +-#else +- +-// dummy function +- +-int mp_input_joystick_init(char* dev) { +- return -1; +-} +- +-int mp_input_joystick_read(int fd) { +- +- return MP_INPUT_NOTHING; +-} +- +-#endif --- mplayer-joystick.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200703312108.l2VL8S0i021829>