ports/111076: [patch] multimedia/mplayer: enable joystick support

Thomas E. Zander riggs at rrr.de
Tue Apr 3 12:10:12 UTC 2007


The following reply was made to PR ports/111076; it has been noted by GNATS.

From: "Thomas E. Zander" <riggs at rrr.de>
To: bug-followup at freebsd.org
Cc:  
Subject: Re: ports/111076: [patch] multimedia/mplayer: enable joystick
	support
Date: Tue, 3 Apr 2007 14:03:32 +0200

 Well, I don't have a joystick, so I can't comment on its importance but
 it compiles fine and the dependencies are resolved, so no objections
 here.
 
 Btw, here is the unified diff that integrates Teemu's changes to
 configure into our patches:
 (Please remember that files/patch-input-joystick.c has to be added to
 the cvs tree.)
 
 
 diff -ruN /usr/ports/multimedia/mplayer/Makefile mplayer/Makefile
 --- /usr/ports/multimedia/mplayer/Makefile	Thu Mar 22 01:46:46 2007
 +++ mplayer/Makefile	Tue Apr  3 13:30:45 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 /usr/ports/multimedia/mplayer/files/patch-ad mplayer/files/patch-ad
 --- /usr/ports/multimedia/mplayer/files/patch-ad	Mon Nov 20 23:58:17 2006
 +++ mplayer/files/patch-ad	Tue Apr  3 13:36:47 2007
 @@ -1,5 +1,5 @@
 ---- configure.orig	Mon Oct 23 00:32:31 2006
 -+++ configure	Tue Oct 24 22:19:10 2006
 +--- configure.orig	Tue Apr  3 13:35:43 2007
 ++++ configure	Tue Apr  3 13:35:51 2007
  @@ -59,9 +59,9 @@
     echo >> "$TMPLOG"
     cat "$1" >> "$TMPLOG"
 @@ -150,3 +150,20 @@
   fi
   # 64 bit file offsets?
   if test "$_largefiles" = yes || freebsd ; then
 +@@ -7362,12 +7325,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 /usr/ports/multimedia/mplayer/files/patch-input-joystick.c mplayer/files/patch-input-joystick.c
 --- /usr/ports/multimedia/mplayer/files/patch-input-joystick.c	Thu Jan  1 01:00:00 1970
 +++ mplayer/files/patch-input-joystick.c	Tue Apr  3 13:30:45 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



More information about the freebsd-ports-bugs mailing list