diff options
34 files changed, 39 insertions, 436 deletions
diff --git a/audio/libgpod/Makefile b/audio/libgpod/Makefile index d6d44175b99b..9c51879d6240 100644 --- a/audio/libgpod/Makefile +++ b/audio/libgpod/Makefile @@ -33,7 +33,6 @@ OPTIONS_SUB= yes IMOBILE_DESC= Apple iPhone/iPod Touch support IMOBILE_LIB_DEPENDS= libimobiledevice.so:comms/libimobiledevice -IMOBILE_CONFIGURE_ENV= LIBUSB_CFLAGS=" " LIBUSB_LIBS="-lusb" IMOBILE_CONFIGURE_WITH= libimobiledevice MONO_USE= GNOME=gtksharp20 diff --git a/comms/gnuradio/Makefile b/comms/gnuradio/Makefile index 25c1cdc004c9..882fc9a610f0 100644 --- a/comms/gnuradio/Makefile +++ b/comms/gnuradio/Makefile @@ -41,7 +41,7 @@ RUN_DEPENDS:= ${BUILD_DEPENDS} # volk/lib/volk_cpu.c: In function 'i_can_has_3dnow': # volk/lib/volk_cpu.c:62: error: can't find a register in class 'BREG' while reloading 'asm' # volk/lib/volk_cpu.c:62: error: 'asm' operand has impossible constraints -USES= cmake:outsource compiler:c11 iconv perl5 python:2.7 shebangfix +USES= cmake:outsource compiler:c11 iconv perl5 pkgconfig python:2.7 shebangfix SHEBANG_FILES= grc/freedesktop/grc_setup_freedesktop.in CMAKE_ARGS+= -DSWIG_EXECUTABLE:STRING="${LOCALBASE}/bin/swig2.0"\ -DICONV_PREFIX:STRING="${ICONV_PREFIX}" \ diff --git a/comms/gnuradio/files/patch-cmake_Modules_FindUSB.cmake b/comms/gnuradio/files/patch-cmake_Modules_FindUSB.cmake index e174ca320d0f..4efb096fdaca 100644 --- a/comms/gnuradio/files/patch-cmake_Modules_FindUSB.cmake +++ b/comms/gnuradio/files/patch-cmake_Modules_FindUSB.cmake @@ -1,51 +1,5 @@ --- cmake/Modules/FindUSB.cmake.orig 2015-04-13 14:32:43 UTC +++ cmake/Modules/FindUSB.cmake -@@ -1,20 +1,30 @@ - if(NOT LIBUSB_FOUND) -- pkg_check_modules (LIBUSB_PKG libusb-1.0) -- find_path(LIBUSB_INCLUDE_DIR NAMES libusb.h -- PATHS -- ${LIBUSB_PKG_INCLUDE_DIRS} -- /usr/include/libusb-1.0 -- /usr/include -- /usr/local/include -- ) -- -- find_library(LIBUSB_LIBRARIES NAMES usb-1.0 usb -- PATHS -- ${LIBUSB_PKG_LIBRARY_DIRS} -- /usr/lib -- /usr/local/lib -- ) -+ if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") -+ message(status "--- Looking for FreeBSD usb") -+ find_library(LIBUSB_LIBRARIES NAMES usb -+ PATHS -+ ${LIBUSB_PKG_LIBRARY_DIRS} -+ /usr/lib -+ ) -+ else() -+ message(status "--- LIBUSB_LIBRARIES ${LIBUSB_LIBRARIES}") -+ pkg_check_modules (LIBUSB_PKG libusb-1.0) -+ find_path(LIBUSB_INCLUDE_DIR NAMES libusb.h -+ PATHS -+ ${LIBUSB_PKG_INCLUDE_DIRS} -+ /usr/include/libusb-1.0 -+ /usr/include -+ /usr/local/include -+ ) - -+ find_library(LIBUSB_LIBRARIES NAMES usb-1.0 usb -+ PATHS -+ ${LIBUSB_PKG_LIBRARY_DIRS} -+ /usr/lib -+ /usr/local/lib -+ ) -+ endif() -+ - if(LIBUSB_INCLUDE_DIR AND LIBUSB_LIBRARIES) - set(LIBUSB_FOUND TRUE CACHE INTERNAL "libusb-1.0 found") - message(STATUS "Found libusb-1.0: ${LIBUSB_INCLUDE_DIR}, ${LIBUSB_LIBRARIES}") @@ -23,6 +33,17 @@ else(LIBUSB_INCLUDE_DIR AND LIBUSB_LIBRA message(STATUS "libusb-1.0 not found.") endif(LIBUSB_INCLUDE_DIR AND LIBUSB_LIBRARIES) diff --git a/comms/libticables2/Makefile b/comms/libticables2/Makefile index 0562699a6819..6d3bc7f2e9f4 100644 --- a/comms/libticables2/Makefile +++ b/comms/libticables2/Makefile @@ -22,11 +22,12 @@ NLS_USES= gettext NLS_CONFIGURE_ENABLE= nls GNU_CONFIGURE= yes -CONFIGURE_ENV= LIBUSB_CFLAGS=" " LIBUSB_LIBS="-lusb" CPPFLAGS+= -I${LOCALBASE}/include LDFLAGS+= -L${LOCALBASE}/lib post-patch: + @${REINPLACE_CMD} -e '/PKG_CONFIG.*libusb/s/ >= 0\.1\.[0-9]*/-0.1/' \ + ${WRKSRC}/configure @${REINPLACE_CMD} -e 's/Requires/&.private/' ${WRKSRC}/ticables2.pc.in .include <bsd.port.mk> diff --git a/comms/owfs/Makefile b/comms/owfs/Makefile index 9d6efdefcb03..a1a6d775d62e 100644 --- a/comms/owfs/Makefile +++ b/comms/owfs/Makefile @@ -3,6 +3,7 @@ PORTNAME= owfs PORTVERSION= 3.1p1 +PORTREVISION= 1 CATEGORIES= comms MASTER_SITES= SF/owfs/owfs/${PORTVERSION} @@ -71,7 +72,6 @@ OWFS_USES= fuse ZERO_CONFIGURE_ENABLE= zero USB_CONFIGURE_ENABLE= usb -USB_LDFLAGS= -lusb .include <bsd.port.options.mk> diff --git a/comms/rtl-sdr/Makefile b/comms/rtl-sdr/Makefile index 741c227324c4..1564fbdeae11 100644 --- a/comms/rtl-sdr/Makefile +++ b/comms/rtl-sdr/Makefile @@ -3,7 +3,7 @@ PORTNAME= rtl-sdr PORTVERSION= 20140210 -PORTREVISION= 8 +PORTREVISION= 9 CATEGORIES= comms hamradio MASTER_SITES= http://contribs.martymac.org/FreeBSD-ports/distfiles/ \ LOCAL/martymac diff --git a/comms/rtl-sdr/files/patch-configure.ac b/comms/rtl-sdr/files/patch-configure.ac index 41b2b774812f..344f1a6cf34a 100644 --- a/comms/rtl-sdr/files/patch-configure.ac +++ b/comms/rtl-sdr/files/patch-configure.ac @@ -1,16 +1,5 @@ --- configure.ac.orig 2012-08-23 08:40:54.000000000 +0200 +++ configure.ac 2012-08-23 11:47:20.000000000 +0200 -@@ -14,9 +14,7 @@ - LT_INIT - AC_PROG_LIBTOOL - --PKG_CHECK_MODULES(LIBUSB, libusb-1.0 >= 1.0) --LIBS="$LIBS $LIBUSB_LIBS" --CFLAGS="$CFLAGS $LIBUSB_CFLAGS" -+LIBS="$LIBS -lusb" - - AC_PATH_PROG(DOXYGEN,doxygen,false) - AM_CONDITIONAL(HAVE_DOXYGEN, test $DOXYGEN != false) @@ -34,7 +32,7 @@ dnl checks for required libraries diff --git a/comms/rtl-sdr/files/patch-librtlsdr.pc.in b/comms/rtl-sdr/files/patch-librtlsdr.pc.in index 7a8ae2a687f4..23a615e11a89 100644 --- a/comms/rtl-sdr/files/patch-librtlsdr.pc.in +++ b/comms/rtl-sdr/files/patch-librtlsdr.pc.in @@ -1,3 +1,5 @@ +libusb-1.0 is already part of RTLSDR_PC_LIBS + --- librtlsdr.pc.in.orig 2014-07-11 08:56:42.640078065 +0000 +++ librtlsdr.pc.in 2014-07-11 08:56:57.487076496 +0000 @@ -7,5 +7,5 @@ @@ -5,5 +7,5 @@ Version: @VERSION@ Cflags: -I${includedir}/ @RTLSDR_PC_CFLAGS@ -Libs: -L${libdir} -lrtlsdr -lusb-1.0 -+Libs: -L${libdir} -lrtlsdr -lusb ++Libs: -L${libdir} -lrtlsdr Libs.private: @RTLSDR_PC_LIBS@ diff --git a/comms/usbmuxd/Makefile b/comms/usbmuxd/Makefile index b1ae2bb1e742..93cf7e29ad66 100644 --- a/comms/usbmuxd/Makefile +++ b/comms/usbmuxd/Makefile @@ -17,9 +17,7 @@ LIB_DEPENDS= libplist.so:devel/libplist \ USES= autoreconf cpe libtool pathfix pkgconfig tar:bzip2 CPE_VENDOR= nikias_bassen GNU_CONFIGURE= yes -CONFIGURE_ARGS= --without-systemd \ - libusb_CFLAGS="-I/usr/include" \ - libusb_LIBS="-lusb" +CONFIGURE_ARGS= --without-systemd PLIST_FILES= man/man1/${PORTNAME}.1.gz \ sbin/${PORTNAME} diff --git a/devel/acsccid/Makefile b/devel/acsccid/Makefile index 41432b4c35ed..579ee4fa1491 100644 --- a/devel/acsccid/Makefile +++ b/devel/acsccid/Makefile @@ -20,15 +20,7 @@ PLIST_FILES= lib/pcsc/drivers/ifd-acsccid.bundle/Contents/${OPSYS}/libacsccid.so GNU_CONFIGURE= yes -.include <bsd.port.pre.mk> - -# Old versions don't have pkgconfig files for libusb -.if ${OPSYS} == FreeBSD && ${OSVERSION} < 1000024 -CONFIGURE_ENV+= LIBUSB_CFLAGS="-I${LOCALBASE}/include" \ - LIBUSB_LIBS="-L${LOCALBASE}/lib -lusb" -.endif - post-install: ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/pcsc/drivers/ifd-acsccid.bundle/Contents/${OPSYS}/libacsccid.so -.include <bsd.port.post.mk> +.include <bsd.port.mk> diff --git a/devel/libccid/Makefile b/devel/libccid/Makefile index f239d23e465e..bdab67b25773 100644 --- a/devel/libccid/Makefile +++ b/devel/libccid/Makefile @@ -19,8 +19,6 @@ GNU_CONFIGURE= yes USE_PERL5= build CONFIGURE_ARGS= --enable-usbdropdir=${PREFIX}/lib/pcsc/drivers \ --enable-ccidtwindir=${PREFIX}/lib/pcsc/drivers/serial -CONFIGURE_ENV= LIBUSB_CFLAGS="-I${LOCALBASE}/include" \ - LIBUSB_LIBS="-L${LOCALBASE}/lib -lusb" PLIST_SUB= VER=${PORTVERSION} INSTALL_TARGET= install-strip diff --git a/devel/libg19/Makefile b/devel/libg19/Makefile index 47960cde8bad..b059ff7efbd1 100644 --- a/devel/libg19/Makefile +++ b/devel/libg19/Makefile @@ -10,7 +10,7 @@ MASTER_SITES= SF/g19linux/${PORTNAME}/${PORTNAME}-${PORTVERSION} MAINTAINER= armin@frozen-zone.org COMMENT= G19 library -USES= libtool +USES= libtool pkgconfig USE_LDCONFIG= yes GNU_CONFIGURE= yes diff --git a/devel/libg19/files/patch-configure b/devel/libg19/files/patch-configure deleted file mode 100644 index 96de0d7ee22b..000000000000 --- a/devel/libg19/files/patch-configure +++ /dev/null @@ -1,39 +0,0 @@ ---- configure.orig 2011-04-15 10:36:10.000000000 +0200 -+++ configure 2011-04-15 15:27:11.000000000 +0200 -@@ -20067,35 +20067,11 @@ - - if test -n "$libg19_CFLAGS"; then - pkg_cv_libg19_CFLAGS="$libg19_CFLAGS" -- elif test -n "$PKG_CONFIG"; then -- if test -n "$PKG_CONFIG" && \ -- { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libusb-1.0\"") >&5 -- ($PKG_CONFIG --exists --print-errors "libusb-1.0") 2>&5 -- ac_status=$? -- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; then -- pkg_cv_libg19_CFLAGS=`$PKG_CONFIG --cflags "libusb-1.0" 2>/dev/null` --else -- pkg_failed=yes --fi -- else -- pkg_failed=untried - fi - if test -n "$libg19_LIBS"; then - pkg_cv_libg19_LIBS="$libg19_LIBS" -- elif test -n "$PKG_CONFIG"; then -- if test -n "$PKG_CONFIG" && \ -- { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libusb-1.0\"") >&5 -- ($PKG_CONFIG --exists --print-errors "libusb-1.0") 2>&5 -- ac_status=$? -- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; then -- pkg_cv_libg19_LIBS=`$PKG_CONFIG --libs "libusb-1.0" 2>/dev/null` - else -- pkg_failed=yes --fi -- else -- pkg_failed=untried -+ pkg_cv_libg19_LIBS="-lusb" - fi - - diff --git a/devel/libpafe/Makefile b/devel/libpafe/Makefile index d02314a11537..ca95235e998b 100644 --- a/devel/libpafe/Makefile +++ b/devel/libpafe/Makefile @@ -24,7 +24,4 @@ PLIST_FILES= bin/felica_dump bin/pasori_test \ lib/libpafe.a lib/libpafe.so lib/libpafe.so.0 \ lib/libpafe.so.0.0.8 -CONFIGURE_ENV+= LIBUSB_CFLAGS="-I/usr/include" \ - LIBUSB_LIBS="-L/usr/lib -lusb" - .include <bsd.port.mk> diff --git a/devel/libsigrok/Makefile b/devel/libsigrok/Makefile index 44e9e7eef0aa..75305b87b434 100644 --- a/devel/libsigrok/Makefile +++ b/devel/libsigrok/Makefile @@ -20,9 +20,14 @@ USES= gmake pathfix libtool pkgconfig USE_GNOME= glib20 INSTALL_TARGET= install-strip MAKE_JOBS_UNSAFE= yes -LDFLAGS+= -L/usr/lib -lusb USE_LDCONFIG= yes +post-patch: +# libusb can be disabled via src.conf(5), so detect via pkg-config + @${REINPLACE_CMD} -e 's/\(libusb-1\.0\) >= 1\.0\.[0-9]*/\1/' \ + -e '/\*freebsd\*/,/;;/d' \ + ${WRKSRC}/configure + .include <bsd.port.pre.mk> # Workaround for libusb not knowing LIBUSB_CLASS_APPLICATION diff --git a/devel/openocd/Makefile b/devel/openocd/Makefile index dcc843bf8112..e06cc1b82c1e 100644 --- a/devel/openocd/Makefile +++ b/devel/openocd/Makefile @@ -58,7 +58,8 @@ CFLAGS+= -I${LOCALBASE}/include -L${LOCALBASE}/lib INFO= openocd post-patch: - chmod +x ${WRKSRC}/libusb_finder + @${REINPLACE_CMD} -e '/PKG_CONFIG/{/1\.0/!s/libusb/&-0.1/;}' \ + ${WRKSRC}/configure # IMPORTANT INFORMATION FOR DEVELOPERS: # Some Interfaces and Options are not on the list because they break a build. diff --git a/devel/openocd/files/patch-configure b/devel/openocd/files/patch-configure deleted file mode 100644 index f6214efa6f10..000000000000 --- a/devel/openocd/files/patch-configure +++ /dev/null @@ -1,101 +0,0 @@ ---- configure.orig 2015-05-17 21:09:56 UTC -+++ configure -@@ -15124,12 +15124,12 @@ if test -n "$LIBUSB1_CFLAGS"; then - pkg_cv_LIBUSB1_CFLAGS="$LIBUSB1_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ -- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libusb-1.0\""; } >&5 -- ($PKG_CONFIG --exists --print-errors "libusb-1.0") 2>&5 -+ { { $as_echo "$as_me:${as_lineno-$LINENO}: ./libusb_finder --exists --print-errors \"libusb-1.0\""; } >&5 -+ (./libusb_finder --exists --print-errors "libusb-1.0") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then -- pkg_cv_LIBUSB1_CFLAGS=`$PKG_CONFIG --cflags "libusb-1.0" 2>/dev/null` -+ pkg_cv_LIBUSB1_CFLAGS=`./libusb_finder --cflags "libusb-1.0" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes - else - pkg_failed=yes -@@ -15141,12 +15141,12 @@ if test -n "$LIBUSB1_LIBS"; then - pkg_cv_LIBUSB1_LIBS="$LIBUSB1_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ -- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libusb-1.0\""; } >&5 -- ($PKG_CONFIG --exists --print-errors "libusb-1.0") 2>&5 -+ { { $as_echo "$as_me:${as_lineno-$LINENO}: ./libusb_finder --exists --print-errors \"libusb-1.0\""; } >&5 -+ (./libusb_finder --exists --print-errors "libusb-1.0") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then -- pkg_cv_LIBUSB1_LIBS=`$PKG_CONFIG --libs "libusb-1.0" 2>/dev/null` -+ pkg_cv_LIBUSB1_LIBS=`./libusb_finder --libs "libusb-1.0" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes - else - pkg_failed=yes -@@ -15167,9 +15167,9 @@ else - _pkg_short_errors_supported=no - fi - if test $_pkg_short_errors_supported = yes; then -- LIBUSB1_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libusb-1.0" 2>&1` -+ LIBUSB1_PKG_ERRORS=`./libusb_finder --short-errors --print-errors --cflags --libs "libusb-1.0" 2>&1` - else -- LIBUSB1_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libusb-1.0" 2>&1` -+ LIBUSB1_PKG_ERRORS=`./libusb_finder --print-errors --cflags --libs "libusb-1.0" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$LIBUSB1_PKG_ERRORS" >&5 -@@ -15198,8 +15198,8 @@ $as_echo "yes" >&6; } - $as_echo "#define HAVE_LIBUSB1 1" >>confdefs.h - - if test -n "$PKG_CONFIG" && \ -- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libusb-1.0 >= 1.0.9\""; } >&5 -- ($PKG_CONFIG --exists --print-errors "libusb-1.0 >= 1.0.9") 2>&5 -+ { { $as_echo "$as_me:${as_lineno-$LINENO}: ./libusb_finder --exists --print-errors \"libusb-1.0 >= 1.0.9\""; } >&5 -+ (./libusb_finder --exists --print-errors "libusb-1.0 >= 1.0.9") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then -@@ -15225,12 +15225,12 @@ if test -n "$LIBUSB0_CFLAGS"; then - pkg_cv_LIBUSB0_CFLAGS="$LIBUSB0_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ -- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libusb\""; } >&5 -- ($PKG_CONFIG --exists --print-errors "libusb") 2>&5 -+ { { $as_echo "$as_me:${as_lineno-$LINENO}: ./libusb_finder --exists --print-errors \"libusb\""; } >&5 -+ (./libusb_finder --exists --print-errors "libusb-0.1") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then -- pkg_cv_LIBUSB0_CFLAGS=`$PKG_CONFIG --cflags "libusb" 2>/dev/null` -+ pkg_cv_LIBUSB0_CFLAGS=`./libusb_finder --cflags "libusb-0.1" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes - else - pkg_failed=yes -@@ -15242,12 +15242,12 @@ if test -n "$LIBUSB0_LIBS"; then - pkg_cv_LIBUSB0_LIBS="$LIBUSB0_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ -- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libusb\""; } >&5 -- ($PKG_CONFIG --exists --print-errors "libusb") 2>&5 -+ { { $as_echo "$as_me:${as_lineno-$LINENO}: ./libusb_finder --exists --print-errors \"libusb-0.1\""; } >&5 -+ (./libusb_finder --exists --print-errors "libusb-0.1") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then -- pkg_cv_LIBUSB0_LIBS=`$PKG_CONFIG --libs "libusb" 2>/dev/null` -+ pkg_cv_LIBUSB0_LIBS=`./libusb_finder --libs "libusb-0.1" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes - else - pkg_failed=yes -@@ -15268,9 +15268,9 @@ else - _pkg_short_errors_supported=no - fi - if test $_pkg_short_errors_supported = yes; then -- LIBUSB0_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libusb" 2>&1` -+ LIBUSB0_PKG_ERRORS=`./libusb_finder --short-errors --print-errors --cflags --libs "libusb" 2>&1` - else -- LIBUSB0_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libusb" 2>&1` -+ LIBUSB0_PKG_ERRORS=`./libusb_finder --print-errors --cflags --libs "libusb" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$LIBUSB0_PKG_ERRORS" >&5 diff --git a/devel/openocd/files/patch-libusb__finder b/devel/openocd/files/patch-libusb__finder deleted file mode 100644 index 424e08ce41ea..000000000000 --- a/devel/openocd/files/patch-libusb__finder +++ /dev/null @@ -1,30 +0,0 @@ ---- libusb_finder.orig 2016-07-22 13:59:36 UTC -+++ libusb_finder -@@ -0,0 +1,27 @@ -+#!/bin/sh -+ -+set -e -+ -+case `uname -r` in -+ 9.*) ;; -+ *) pkg-config $@ && exit 0;; -+esac -+ -+if [ ! -e /usr/lib/libusb.so ]; then -+ echo "$0: libusb does not seem to be available" > /dev/stderr -+ exit 1 -+fi -+ -+for param in $@; do -+ case $param in -+ "--exists") ;; -+ "--cflags") ;; -+ "--libs") echo "-lusb" ;; -+ "--short-errors") ;; -+ "--print-errors") ;; -+ libusb*) ;; -+ *) -+ echo "$0: Unhandled parameters: $@" > /dev/stderr -+ exit 1 ;; -+ esac -+done diff --git a/devel/pcsc-lite/Makefile b/devel/pcsc-lite/Makefile index 2ab70f05b169..61ab53bed96d 100644 --- a/devel/pcsc-lite/Makefile +++ b/devel/pcsc-lite/Makefile @@ -21,8 +21,7 @@ USE_RC_SUBR= pcscd SHEBANG_FILES= ${WRKSRC}/src/spy/pcsc-spy USE_LDCONFIG= yes -CONFIGURE_ARGS= --enable-usbdropdir=${PREFIX}/lib/pcsc/drivers/ \ - LIBUSB_CFLAGS=" " LIBUSB_LIBS="-lusb" +CONFIGURE_ARGS= --enable-usbdropdir=${PREFIX}/lib/pcsc/drivers/ PKGMESSAGE= ${WRKDIR}/pkg-message diff --git a/devel/stlink/files/patch-configure.ac b/devel/stlink/files/patch-configure.ac deleted file mode 100644 index e12b04ce1761..000000000000 --- a/devel/stlink/files/patch-configure.ac +++ /dev/null @@ -1,13 +0,0 @@ ---- configure.ac.orig 2014-02-01 10:35:47.000000000 +0400 -+++ configure.ac 2014-02-15 18:30:35.000000000 +0400 -@@ -21,8 +21,8 @@ - AC_REPLACE_FUNCS(mmap) - - # Checks for libraries. --PKG_CHECK_MODULES(USB, libusb-1.0 >= 1.0.0,, -- AC_MSG_ERROR([*** Required libusb-1.0 >= 1.0.0 not installed ***])) -+LIBS="$LIBS -lusb" -+ - AC_CHECK_LIB([usbpath],[usb_path2devnum],,,-lusb) - - LIBS="$LIBS $USB_LIBS" diff --git a/emulators/qemu-devel/Makefile b/emulators/qemu-devel/Makefile index e0fc0971b363..b576e1ecb91a 100644 --- a/emulators/qemu-devel/Makefile +++ b/emulators/qemu-devel/Makefile @@ -110,6 +110,7 @@ CONFIGURE_ARGS+= --sparc_cpu=v9 # but it shouldn't matter much post-patch: @${REINPLACE_CMD} -e '/LIBS/s|-lprocstat|-lprocstat -lelf|' \ + -e '/libusb/s/ --atleast-version=1\.0\.[0-9]*//' \ ${WRKSRC}/configure @${REINPLACE_CMD} -e '/libs_qga=/s|glib_libs|glib_libs -lintl|' ${WRKSRC}/configure @${REINPLACE_CMD} -E \ diff --git a/emulators/qemu-devel/files/patch-configure b/emulators/qemu-devel/files/patch-configure index 40a964f3df4e..c01324559867 100644 --- a/emulators/qemu-devel/files/patch-configure +++ b/emulators/qemu-devel/files/patch-configure @@ -130,32 +130,6 @@ fi # Search for bswap_32 function -@@ -3992,6 +4045,17 @@ fi - - # check for libusb - if test "$libusb" != "no" ; then -+ cat > $TMPC << EOF -+#include <libusb.h> -+ -+int main(void) { return libusb_get_port_path(NULL, NULL, NULL, 0); } -+EOF -+ if compile_prog "-Werror" "-lusb -pthread" ; then -+ libusb="yes" -+ libusb_cflags="" -+ libusb_libs=-lusb -+ libs_softmmu="$libs_softmmu $libusb_libs" -+ else - if $pkg_config --atleast-version=1.0.13 libusb-1.0; then - libusb="yes" - libusb_cflags=$($pkg_config --cflags libusb-1.0) -@@ -4004,6 +4068,7 @@ if test "$libusb" != "no" ; then - fi - libusb="no" - fi -+ fi - fi - - # check for usbredirparser for usb network redirection support @@ -4769,6 +4834,7 @@ echo "Audio drivers $audio_drv_list" echo "Block whitelist (rw) $block_drv_rw_whitelist" echo "Block whitelist (ro) $block_drv_ro_whitelist" diff --git a/emulators/qemu/Makefile b/emulators/qemu/Makefile index 75bbb759ec5e..b9bd546f803c 100644 --- a/emulators/qemu/Makefile +++ b/emulators/qemu/Makefile @@ -111,6 +111,7 @@ CONFIGURE_ARGS+= --sparc_cpu=v9 # but it shouldn't matter much post-patch: @${REINPLACE_CMD} -e '/LIBS/s|-lprocstat|-lprocstat -lelf|' \ + -e '/libusb/s/ --atleast-version=1\.0\.[0-9]*//' \ ${WRKSRC}/configure @${REINPLACE_CMD} -e '/libs_qga=/s|glib_libs|glib_libs -lintl|' ${WRKSRC}/configure @${REINPLACE_CMD} -E \ diff --git a/emulators/qemu/files/patch-configure b/emulators/qemu/files/patch-configure index 40a964f3df4e..c01324559867 100644 --- a/emulators/qemu/files/patch-configure +++ b/emulators/qemu/files/patch-configure @@ -130,32 +130,6 @@ fi # Search for bswap_32 function -@@ -3992,6 +4045,17 @@ fi - - # check for libusb - if test "$libusb" != "no" ; then -+ cat > $TMPC << EOF -+#include <libusb.h> -+ -+int main(void) { return libusb_get_port_path(NULL, NULL, NULL, 0); } -+EOF -+ if compile_prog "-Werror" "-lusb -pthread" ; then -+ libusb="yes" -+ libusb_cflags="" -+ libusb_libs=-lusb -+ libs_softmmu="$libs_softmmu $libusb_libs" -+ else - if $pkg_config --atleast-version=1.0.13 libusb-1.0; then - libusb="yes" - libusb_cflags=$($pkg_config --cflags libusb-1.0) -@@ -4004,6 +4068,7 @@ if test "$libusb" != "no" ; then - fi - libusb="no" - fi -+ fi - fi - - # check for usbredirparser for usb network redirection support @@ -4769,6 +4834,7 @@ echo "Audio drivers $audio_drv_list" echo "Block whitelist (rw) $block_drv_rw_whitelist" echo "Block whitelist (ro) $block_drv_ro_whitelist" diff --git a/graphics/colord/Makefile b/graphics/colord/Makefile index 05f8e1f6497d..bf694ca0ac55 100644 --- a/graphics/colord/Makefile +++ b/graphics/colord/Makefile @@ -34,8 +34,6 @@ CONFIGURE_ARGS= --disable-udev \ --with-daemon-user=colord \ --disable-systemd-login \ --enable-libcolordcompat -CONFIGURE_ENV= USB_CFLAGS="-I/usr/include" \ - USB_LIBS="-L/usr/lib -lusb" INSTALL_TARGET= install-strip GLIB_SCHEMAS= org.freedesktop.ColorHelper.gschema.xml @@ -56,7 +54,6 @@ post-patch: -e 's|-Wignored-qualifiers||g' \ -e 's|-Wtype-limits||g' \ -e 's|-Wmissing-parameter-type||g' \ - -e 's|LIBS="-lusb-1.0|LIBS="-lusb|g' \ ${WRKSRC}/configure @${REINPLACE_CMD} -e 's|lib/color|db/color|g' \ -e 's|/usr/share/color|${PREFIX}/share/color|g' \ diff --git a/graphics/libgphoto2/Makefile b/graphics/libgphoto2/Makefile index bd445895be6a..58c4400cdc92 100644 --- a/graphics/libgphoto2/Makefile +++ b/graphics/libgphoto2/Makefile @@ -47,10 +47,6 @@ XML_CONFIGURE_OFF= --with-libxml-2.0=no .include <bsd.port.options.mk> -.if ${OPSYS} == FreeBSD && ${OSVERSION} < 1000040 -CONFIGURE_ENV+= LIBUSB1_CFLAGS=" " LIBUSB1_LIBS="-lusb" -.endif - post-patch: .for i in configure libgphoto2_port/configure @${REINPLACE_CMD} -e \ @@ -63,9 +59,6 @@ post-patch: '/^doc_DATA/s|COPYING||' \ ${WRKSRC}/Makefile.in @${REINPLACE_CMD} -e \ - 's|-lusb-1.0|-lusb|' \ - ${WRKSRC}/libgphoto2_port/configure - @${REINPLACE_CMD} -e \ '/^SUBDIRS/s|linux-hotplug||' \ ${WRKSRC}/packaging/Makefile.in diff --git a/net/usbredir/Makefile b/net/usbredir/Makefile index 0a9894034843..670aa3484af7 100644 --- a/net/usbredir/Makefile +++ b/net/usbredir/Makefile @@ -16,6 +16,5 @@ USES= gmake libtool pathfix pkgconfig tar:bzip2 USE_LDCONFIG= yes GNU_CONFIGURE= yes INSTALL_TARGET= install-strip -CONFIGURE_ENV= LIBUSB_CFLAGS=-DLIBUSB_CALL= LIBUSB_LIBS=-lusb .include <bsd.port.mk> diff --git a/print/cups/files/patch-configure b/print/cups/files/patch-configure index fc6c8a79888c..5b50e1cb13a3 100644 --- a/print/cups/files/patch-configure +++ b/print/cups/files/patch-configure @@ -1,19 +1,5 @@ --- configure.orig 2016-02-05 17:22:09 UTC +++ configure -@@ -5390,6 +5390,13 @@ $as_echo "yes" >&6; } - CFLAGS="$CFLAGS `$PKGCONFIG --cflags libusb-1.0`" - LIBUSB="`$PKGCONFIG --libs libusb-1.0`" - USBQUIRKS="\$(DATADIR)/usb" -+ elif test -f /usr/lib/libusb.so; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -+$as_echo "yes" >&6; } -+ $as_echo "#define HAVE_LIBUSB 1" >>confdefs.h -+ -+ LIBUSB="-lusb" -+ USBQUIRKS="\$(DATADIR)/usb" - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 - $as_echo "no" >&6; } @@ -5656,7 +5663,6 @@ if test "${with_dbusdir+set}" = set; the fi diff --git a/security/libfprint/Makefile b/security/libfprint/Makefile index 96da28b9a2ba..d20e3f7b81a3 100644 --- a/security/libfprint/Makefile +++ b/security/libfprint/Makefile @@ -20,7 +20,6 @@ USE_OPENSSL= yes USE_GNOME= glib20 INSTALL_TARGET= install-strip -CONFIGURE_ENV= LIBUSB_CFLAGS=" " LIBUSB_LIBS="-lusb" CPPFLAGS+= -DHAVE_MEMMEM MAKE_JOBS_UNSAFE=yes diff --git a/security/openct/Makefile b/security/openct/Makefile index 16b5c625e03c..33c5fff5e5d3 100644 --- a/security/openct/Makefile +++ b/security/openct/Makefile @@ -24,9 +24,7 @@ USE_RC_SUBR= openct SUB_FILES= etoken.conf CONFIGURE_ENV= LTLIB_CFLAGS="-I${LOCALBASE}/include" \ - LTLIB_LIBS="-L${LOCALBASE}/lib -lltdl" \ - LIBUSB_CFLAGS="-I/usr/include" \ - LIBUSB_LIBS="-lusb" + LTLIB_LIBS="-L${LOCALBASE}/lib -lltdl" CONFIGURE_ARGS= --localstatedir=/var --enable-usb @@ -48,7 +46,8 @@ CONFIGURE_ARGS+=--enable-doc .endif post-patch: - @${REINPLACE_CMD} 's|(libdir)/pkgconfig|(prefix)/libdata/pkgconfig|' \ + @${REINPLACE_CMD} -e '/PKG_CONFIG/s/libusb/&-0.1/' \ + -e 's|(libdir)/pkgconfig|(prefix)/libdata/pkgconfig|' \ ${WRKSRC}/configure @${REINPLACE_CMD} 's|install-data-am: install-dist_apidocDATA install-dist_docDATA|install-data-am: install-dist_docDATA|' \ ${WRKSRC}/doc/Makefile.in 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])]) diff --git a/sysutils/usbhid-dump/Makefile b/sysutils/usbhid-dump/Makefile index a344bb0affc1..7d80bbc3b8d5 100644 --- a/sysutils/usbhid-dump/Makefile +++ b/sysutils/usbhid-dump/Makefile @@ -11,8 +11,6 @@ COMMENT= USB HID device dumping utility LICENSE= GPLv2 GPLv3 LICENSE_COMB= dual -CONFIGURE_ENV= LIBUSB_CFLAGS="-I/usr/include" \ - LIBUSB_LIBS="-L/usr/lib -lusb" GNU_CONFIGURE= yes USES= autoreconf libtool pkgconfig diff --git a/sysutils/usbutils/Makefile b/sysutils/usbutils/Makefile index 4a4369d7504a..968e454f93b3 100644 --- a/sysutils/usbutils/Makefile +++ b/sysutils/usbutils/Makefile @@ -20,14 +20,14 @@ GNU_CONFIGURE= yes CPPFLAGS+= -I${LOCALBASE}/include LDFLAGS+= -L${LOCALBASE}/lib CONFIGURE_ARGS= --datadir=${DATADIR} --enable-zlib -CONFIGURE_ENV= LIBUSB_CFLAGS="-I/usr/include" \ - LIBUSB_LIBS="-L/usr/lib -lusb" PORTDOCS= AUTHORS ChangeLog NEWS README OPTIONS_DEFINE= DOCS post-patch: + @${REINPLACE_CMD} -e '/PKG_CONFIG.*libusb/s/ >= 0\.1\.[0-9]*/-0.1/' \ + ${WRKSRC}/configure @${REINPLACE_CMD} -i '' \ -e 's|/bin/bash|/bin/sh|' \ ${WRKSRC}/usb-devices |