aboutsummaryrefslogtreecommitdiff
path: root/sysutils/lcdproc
diff options
context:
space:
mode:
authorJan Beich <jbeich@FreeBSD.org>2017-01-05 22:58:02 +0000
committerJan Beich <jbeich@FreeBSD.org>2017-01-05 22:58:02 +0000
commit7277ec6a16005fbbf00e59a8beacc7634f4376fc (patch)
tree89becbb47fd3ca1d6f3fd97d6677e0b01732e970 /sysutils/lcdproc
parent96966101c6558191cb15925803ded6baf1737eb7 (diff)
downloadports-7277ec6a16005fbbf00e59a8beacc7634f4376fc.tar.gz
ports-7277ec6a16005fbbf00e59a8beacc7634f4376fc.zip
Assume "pkg-config libusb*" works after 9.x EOL
FreeBSD appears to use different pkg-config name for 0.1.x API but it doesn't matter much as 0.1, 1.0 and 2.0 share CFLAGS/LIBS.
Notes
Notes: svn path=/head/; revision=430669
Diffstat (limited to 'sysutils/lcdproc')
-rw-r--r--sysutils/lcdproc/Makefile4
-rw-r--r--sysutils/lcdproc/files/patch-configure.ac90
2 files changed, 12 insertions, 82 deletions
diff --git a/sysutils/lcdproc/Makefile b/sysutils/lcdproc/Makefile
index 0878fa947d79..0751f456ba74 100644
--- a/sysutils/lcdproc/Makefile
+++ b/sysutils/lcdproc/Makefile
@@ -90,7 +90,7 @@ LCDPROC_DRIVERS=bayrad \
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MUSB}
-CONFIGURE_ARGS+= --with-libusb=/usr
+CONFIGURE_ARGS+= --enable-libusb
PLIST_SUB+= USB=""
LCDPROC_DRIVERS+=IOWarrior \
picolcd \
@@ -117,7 +117,7 @@ PLIST_SUB+= HID="@comment "
. endif
.else
-CONFIGURE_ARGS+= --without-libusb --disable-libftdi --disable-libhid
+CONFIGURE_ARGS+= --disable-libusb --disable-libftdi --disable-libhid
PLIST_SUB+= USB="@comment " FTDI="@comment " HID="@comment "
.endif
diff --git a/sysutils/lcdproc/files/patch-configure.ac b/sysutils/lcdproc/files/patch-configure.ac
index f8fc91b2de15..f417b376049c 100644
--- a/sysutils/lcdproc/files/patch-configure.ac
+++ b/sysutils/lcdproc/files/patch-configure.ac
@@ -1,6 +1,6 @@
---- ./configure.ac.orig 2014-05-17 12:08:57.000000000 +0200
-+++ ./configure.ac 2014-05-17 12:12:55.000000000 +0200
-@@ -4,6 +4,7 @@
+--- configure.ac.orig 2014-05-01 10:44:01 UTC
++++ configure.ac
+@@ -4,6 +4,7 @@ AC_PREREQ(2.61)
AC_INIT([lcdproc], [0.5.7], [lcdproc@lists.omnipotent.net])
AC_CONFIG_SRCDIR([clients/lcdproc/batt.c])
AM_INIT_AUTOMAKE
@@ -8,82 +8,12 @@
AC_CONFIG_HEADERS(config.h)
-@@ -255,26 +256,62 @@
+@@ -268,7 +269,7 @@ AC_MSG_RESULT($enable_libusb)
- 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)
-+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 "$enable_libusb" = "yes"; then
-- ifdef([PKG_CHECK_MODULES],
+ 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])])
-+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 libusb-1.0 support
++ [PKG_CHECK_MODULES(LIBUSB, libusb-0.1,
+ [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])])