Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Jul 2009 22:38:47 +0200
From:      "Charlie &" <bsdfan@nurfuerspam.de>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        bsdfan@nurfuerspam.de
Subject:   ports/136941: [MAINTAINER] sysutils/lcdproc: libusb detection updated
Message-ID:  <20090720203948.11C188FC12@mx1.freebsd.org>
Resent-Message-ID: <200907202040.n6KKe3ea049471@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         136941
>Category:       ports
>Synopsis:       [MAINTAINER] sysutils/lcdproc: libusb detection updated
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jul 20 20:40:03 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Markus Dolze
>Release:        FreeBSD 7.2-RELEASE i386
>Organization:
>Environment:
System: FreeBSD elenore.intra.mdolze.de 7.2-RELEASE FreeBSD 7.2-RELEASE #2: Tue May  5 06:31:14 CEST
>Description:
Changed the way to test for the presence of libusb. This allows proper
detection of libusb on FreeBSD 8.

Added file(s):
- files/patch-configure.in

Generated with FreeBSD Port Tools 0.77
>How-To-Repeat:
>Fix:

--- lcdproc-0.5.3.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/sysutils/lcdproc.orig/Makefile /usr/ports/sysutils/lcdproc/Makefile
--- /usr/ports/sysutils/lcdproc.orig/Makefile	2009-07-20 20:36:55.000000000 +0200
+++ /usr/ports/sysutils/lcdproc/Makefile	2009-07-20 20:39:14.000000000 +0200
@@ -70,16 +70,16 @@
 .if defined(WITH_USB)
 . if ${OSVERSION} < 800069
 LIB_DEPENDS+=		usb-0.1.8:${PORTSDIR}/devel/libusb
+CONFIGURE_ARGS+=	--with-libusb
 . else
-CONFIGURE_ARGS+=	--with-libusb-libraries=/usr
+CONFIGURE_ARGS+=	--with-libusb=/usr
 . endif
-CONFIGURE_ARGS+=	--enable-libusb
 PLIST_SUB+=		USB=""
 LCDPROC_DRIVERS+=IOWarrior \
 		picolcd \
 		shuttleVFD
 .else
-CONFIGURE_ARGS+=	--disable-libusb
+CONFIGURE_ARGS+=	--without-libusb
 PLIST_SUB+=		USB="@comment "
 .endif
 
diff -ruN --exclude=CVS /usr/ports/sysutils/lcdproc.orig/files/patch-configure.in /usr/ports/sysutils/lcdproc/files/patch-configure.in
--- /usr/ports/sysutils/lcdproc.orig/files/patch-configure.in	1970-01-01 01:00:00.000000000 +0100
+++ /usr/ports/sysutils/lcdproc/files/patch-configure.in	2009-07-20 20:48:14.000000000 +0200
@@ -0,0 +1,88 @@
+Index: configure.in
+===================================================================
+RCS file: /cvsroot/lcdproc/lcdproc/configure.in,v
+retrieving revision 1.79
+diff -u -r1.79 configure.in
+--- configure.in	6 Jun 2009 16:01:38 -0000	1.79
++++ configure.in	20 Jul 2009 06:38:04 -0000
+@@ -230,26 +230,63 @@
+ 
+ dnl ######################################################################
+ dnl libusb support
++dnl Stolen from the gnupg project and modified for LCDproc's need.
++dnl
++dnl Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+ dnl ######################################################################
+ AC_MSG_CHECKING([if libusb support has been enabled]);
+-AC_ARG_ENABLE(libusb,
+-	[AS_HELP_STRING([--disable-libusb],[disable USB support using libusb])],
+-	[ if test "$enableval" != "no"; then
+-		enable_libusb="yes"
+-	fi ],
+-	[ enable_libusb=yes ]
+-)
+-AC_MSG_RESULT($enable_libusb) 
+-
+-if test "$enable_libusb" = "yes"; then
+-	ifdef([PKG_CHECK_MODULES],
+-		[PKG_CHECK_MODULES(LIBUSB, libusb,
+-			[AC_DEFINE(HAVE_LIBUSB, [1], [Define to 1 if you have libusb])],
+-			[ enable_libusb=no ])],
+-		[AC_MSG_WARN([pkg-config not (fully) installed; drivers requiring libusb may not be built])])	
++AC_ARG_WITH(libusb,
++	AC_HELP_STRING([--with-libusb=DIR],
++		[look for the libusb library in DIR]),
++		[_do_libusb=$withval],[_do_libusb=yes])
++AC_MSG_RESULT($_do_libusb) 
++
++if test "$_do_libusb" != "no" ; then
++	if test -d "$withval" ; then
++		CPPFLAGS="${CPPFLAGS} -I$withval/include"
++		LDFLAGS="${LDFLAGS} -L$withval/lib"
++		AC_PATH_PROG([_usb_config],["$_do_libusb/bin/libusb-config"])
++	else
++		AC_PATH_PROG([_usb_config],[libusb-config])
++	fi
++
++	_libusb_save_libs=$LIBS
++	_libusb_save_cflags=$CFLAGS
++
++	if test x$_usb_config != "x" ; then
++		_libusb_try_libs=`$_usb_config --libs`
++		_libusb_try_cflags=`$_usb_config --cflags`
++	else
++		_libusb_try_libs="-lusb"
++		_libusb_try_cflags=""
++	fi
++
++	LIBS="$LIBS $_libusb_try_libs"
++	CFLAGS="$CFLAGS $_libusb_try_cflags"
++
++	AC_MSG_CHECKING([whether libusb is present and sane])
++
++	AC_LINK_IFELSE(AC_LANG_PROGRAM([#include <usb.h>],[
++		usb_interrupt_write(NULL,0,NULL,0,0);
++		]),enable_libusb=yes,enable_libusb=no)
++
++	AC_MSG_RESULT([$enable_libusb])
++
++	if test "$enable_libusb" = "yes" ; then
++		AC_DEFINE(HAVE_LIBUSB, [1], [Define to 1 if you have libusb])
++		AC_SUBST(LIBUSB_CFLAGS, $_libusb_try_cflags)
++		AC_SUBST(LIBUSB_LIBS, $_libusb_try_libs)
++	fi
++
++	LIBS=$_libusb_save_libs
++	CFLAGS=$_libusb_save_cflags
++
++	unset _libusb_save_libs
++	unset _libusb_save_cflags
++	unset _libusb_try_libs
++	unset _libusb_try_cflags
+ fi
+-AC_SUBST(LIBUSB_LIBS)
+-AC_SUBST(LIBUSB_CFLAGS)
++
+ 
+ dnl ######################################################################
+ dnl libftdi support
--- lcdproc-0.5.3.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



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