mirror of
https://git.FreeBSD.org/ports.git
synced 2024-10-18 19:49:40 +00:00
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.
This commit is contained in:
parent
96966101c6
commit
7277ec6a16
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=430669
@ -33,7 +33,6 @@ OPTIONS_SUB= yes
|
|||||||
IMOBILE_DESC= Apple iPhone/iPod Touch support
|
IMOBILE_DESC= Apple iPhone/iPod Touch support
|
||||||
|
|
||||||
IMOBILE_LIB_DEPENDS= libimobiledevice.so:comms/libimobiledevice
|
IMOBILE_LIB_DEPENDS= libimobiledevice.so:comms/libimobiledevice
|
||||||
IMOBILE_CONFIGURE_ENV= LIBUSB_CFLAGS=" " LIBUSB_LIBS="-lusb"
|
|
||||||
IMOBILE_CONFIGURE_WITH= libimobiledevice
|
IMOBILE_CONFIGURE_WITH= libimobiledevice
|
||||||
|
|
||||||
MONO_USE= GNOME=gtksharp20
|
MONO_USE= GNOME=gtksharp20
|
||||||
|
@ -41,7 +41,7 @@ RUN_DEPENDS:= ${BUILD_DEPENDS}
|
|||||||
# volk/lib/volk_cpu.c: In function 'i_can_has_3dnow':
|
# 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: can't find a register in class 'BREG' while reloading 'asm'
|
||||||
# volk/lib/volk_cpu.c:62: error: 'asm' operand has impossible constraints
|
# 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
|
SHEBANG_FILES= grc/freedesktop/grc_setup_freedesktop.in
|
||||||
CMAKE_ARGS+= -DSWIG_EXECUTABLE:STRING="${LOCALBASE}/bin/swig2.0"\
|
CMAKE_ARGS+= -DSWIG_EXECUTABLE:STRING="${LOCALBASE}/bin/swig2.0"\
|
||||||
-DICONV_PREFIX:STRING="${ICONV_PREFIX}" \
|
-DICONV_PREFIX:STRING="${ICONV_PREFIX}" \
|
||||||
|
@ -1,51 +1,5 @@
|
|||||||
--- cmake/Modules/FindUSB.cmake.orig 2015-04-13 14:32:43 UTC
|
--- cmake/Modules/FindUSB.cmake.orig 2015-04-13 14:32:43 UTC
|
||||||
+++ cmake/Modules/FindUSB.cmake
|
+++ 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
|
@@ -23,6 +33,17 @@ else(LIBUSB_INCLUDE_DIR AND LIBUSB_LIBRA
|
||||||
message(STATUS "libusb-1.0 not found.")
|
message(STATUS "libusb-1.0 not found.")
|
||||||
endif(LIBUSB_INCLUDE_DIR AND LIBUSB_LIBRARIES)
|
endif(LIBUSB_INCLUDE_DIR AND LIBUSB_LIBRARIES)
|
||||||
|
@ -22,11 +22,12 @@ NLS_USES= gettext
|
|||||||
NLS_CONFIGURE_ENABLE= nls
|
NLS_CONFIGURE_ENABLE= nls
|
||||||
|
|
||||||
GNU_CONFIGURE= yes
|
GNU_CONFIGURE= yes
|
||||||
CONFIGURE_ENV= LIBUSB_CFLAGS=" " LIBUSB_LIBS="-lusb"
|
|
||||||
CPPFLAGS+= -I${LOCALBASE}/include
|
CPPFLAGS+= -I${LOCALBASE}/include
|
||||||
LDFLAGS+= -L${LOCALBASE}/lib
|
LDFLAGS+= -L${LOCALBASE}/lib
|
||||||
|
|
||||||
post-patch:
|
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
|
@${REINPLACE_CMD} -e 's/Requires/&.private/' ${WRKSRC}/ticables2.pc.in
|
||||||
|
|
||||||
.include <bsd.port.mk>
|
.include <bsd.port.mk>
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
PORTNAME= owfs
|
PORTNAME= owfs
|
||||||
PORTVERSION= 3.1p1
|
PORTVERSION= 3.1p1
|
||||||
|
PORTREVISION= 1
|
||||||
CATEGORIES= comms
|
CATEGORIES= comms
|
||||||
MASTER_SITES= SF/owfs/owfs/${PORTVERSION}
|
MASTER_SITES= SF/owfs/owfs/${PORTVERSION}
|
||||||
|
|
||||||
@ -71,7 +72,6 @@ OWFS_USES= fuse
|
|||||||
|
|
||||||
ZERO_CONFIGURE_ENABLE= zero
|
ZERO_CONFIGURE_ENABLE= zero
|
||||||
USB_CONFIGURE_ENABLE= usb
|
USB_CONFIGURE_ENABLE= usb
|
||||||
USB_LDFLAGS= -lusb
|
|
||||||
|
|
||||||
.include <bsd.port.options.mk>
|
.include <bsd.port.options.mk>
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
PORTNAME= rtl-sdr
|
PORTNAME= rtl-sdr
|
||||||
PORTVERSION= 20140210
|
PORTVERSION= 20140210
|
||||||
PORTREVISION= 8
|
PORTREVISION= 9
|
||||||
CATEGORIES= comms hamradio
|
CATEGORIES= comms hamradio
|
||||||
MASTER_SITES= http://contribs.martymac.org/FreeBSD-ports/distfiles/ \
|
MASTER_SITES= http://contribs.martymac.org/FreeBSD-ports/distfiles/ \
|
||||||
LOCAL/martymac
|
LOCAL/martymac
|
||||||
|
@ -1,16 +1,5 @@
|
|||||||
--- configure.ac.orig 2012-08-23 08:40:54.000000000 +0200
|
--- configure.ac.orig 2012-08-23 08:40:54.000000000 +0200
|
||||||
+++ configure.ac 2012-08-23 11:47:20.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 @@
|
@@ -34,7 +32,7 @@
|
||||||
|
|
||||||
dnl checks for required libraries
|
dnl checks for required libraries
|
||||||
|
@ -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.orig 2014-07-11 08:56:42.640078065 +0000
|
||||||
+++ librtlsdr.pc.in 2014-07-11 08:56:57.487076496 +0000
|
+++ librtlsdr.pc.in 2014-07-11 08:56:57.487076496 +0000
|
||||||
@@ -7,5 +7,5 @@
|
@@ -7,5 +7,5 @@
|
||||||
@ -5,5 +7,5 @@
|
|||||||
Version: @VERSION@
|
Version: @VERSION@
|
||||||
Cflags: -I${includedir}/ @RTLSDR_PC_CFLAGS@
|
Cflags: -I${includedir}/ @RTLSDR_PC_CFLAGS@
|
||||||
-Libs: -L${libdir} -lrtlsdr -lusb-1.0
|
-Libs: -L${libdir} -lrtlsdr -lusb-1.0
|
||||||
+Libs: -L${libdir} -lrtlsdr -lusb
|
+Libs: -L${libdir} -lrtlsdr
|
||||||
Libs.private: @RTLSDR_PC_LIBS@
|
Libs.private: @RTLSDR_PC_LIBS@
|
||||||
|
@ -17,9 +17,7 @@ LIB_DEPENDS= libplist.so:devel/libplist \
|
|||||||
USES= autoreconf cpe libtool pathfix pkgconfig tar:bzip2
|
USES= autoreconf cpe libtool pathfix pkgconfig tar:bzip2
|
||||||
CPE_VENDOR= nikias_bassen
|
CPE_VENDOR= nikias_bassen
|
||||||
GNU_CONFIGURE= yes
|
GNU_CONFIGURE= yes
|
||||||
CONFIGURE_ARGS= --without-systemd \
|
CONFIGURE_ARGS= --without-systemd
|
||||||
libusb_CFLAGS="-I/usr/include" \
|
|
||||||
libusb_LIBS="-lusb"
|
|
||||||
|
|
||||||
PLIST_FILES= man/man1/${PORTNAME}.1.gz \
|
PLIST_FILES= man/man1/${PORTNAME}.1.gz \
|
||||||
sbin/${PORTNAME}
|
sbin/${PORTNAME}
|
||||||
|
@ -20,15 +20,7 @@ PLIST_FILES= lib/pcsc/drivers/ifd-acsccid.bundle/Contents/${OPSYS}/libacsccid.so
|
|||||||
|
|
||||||
GNU_CONFIGURE= yes
|
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:
|
post-install:
|
||||||
${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/pcsc/drivers/ifd-acsccid.bundle/Contents/${OPSYS}/libacsccid.so
|
${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/pcsc/drivers/ifd-acsccid.bundle/Contents/${OPSYS}/libacsccid.so
|
||||||
|
|
||||||
.include <bsd.port.post.mk>
|
.include <bsd.port.mk>
|
||||||
|
@ -19,8 +19,6 @@ GNU_CONFIGURE= yes
|
|||||||
USE_PERL5= build
|
USE_PERL5= build
|
||||||
CONFIGURE_ARGS= --enable-usbdropdir=${PREFIX}/lib/pcsc/drivers \
|
CONFIGURE_ARGS= --enable-usbdropdir=${PREFIX}/lib/pcsc/drivers \
|
||||||
--enable-ccidtwindir=${PREFIX}/lib/pcsc/drivers/serial
|
--enable-ccidtwindir=${PREFIX}/lib/pcsc/drivers/serial
|
||||||
CONFIGURE_ENV= LIBUSB_CFLAGS="-I${LOCALBASE}/include" \
|
|
||||||
LIBUSB_LIBS="-L${LOCALBASE}/lib -lusb"
|
|
||||||
|
|
||||||
PLIST_SUB= VER=${PORTVERSION}
|
PLIST_SUB= VER=${PORTVERSION}
|
||||||
INSTALL_TARGET= install-strip
|
INSTALL_TARGET= install-strip
|
||||||
|
@ -10,7 +10,7 @@ MASTER_SITES= SF/g19linux/${PORTNAME}/${PORTNAME}-${PORTVERSION}
|
|||||||
MAINTAINER= armin@frozen-zone.org
|
MAINTAINER= armin@frozen-zone.org
|
||||||
COMMENT= G19 library
|
COMMENT= G19 library
|
||||||
|
|
||||||
USES= libtool
|
USES= libtool pkgconfig
|
||||||
USE_LDCONFIG= yes
|
USE_LDCONFIG= yes
|
||||||
GNU_CONFIGURE= yes
|
GNU_CONFIGURE= yes
|
||||||
|
|
||||||
|
@ -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
|
|
||||||
|
|
||||||
|
|
@ -24,7 +24,4 @@ PLIST_FILES= bin/felica_dump bin/pasori_test \
|
|||||||
lib/libpafe.a lib/libpafe.so lib/libpafe.so.0 \
|
lib/libpafe.a lib/libpafe.so lib/libpafe.so.0 \
|
||||||
lib/libpafe.so.0.0.8
|
lib/libpafe.so.0.0.8
|
||||||
|
|
||||||
CONFIGURE_ENV+= LIBUSB_CFLAGS="-I/usr/include" \
|
|
||||||
LIBUSB_LIBS="-L/usr/lib -lusb"
|
|
||||||
|
|
||||||
.include <bsd.port.mk>
|
.include <bsd.port.mk>
|
||||||
|
@ -20,9 +20,14 @@ USES= gmake pathfix libtool pkgconfig
|
|||||||
USE_GNOME= glib20
|
USE_GNOME= glib20
|
||||||
INSTALL_TARGET= install-strip
|
INSTALL_TARGET= install-strip
|
||||||
MAKE_JOBS_UNSAFE= yes
|
MAKE_JOBS_UNSAFE= yes
|
||||||
LDFLAGS+= -L/usr/lib -lusb
|
|
||||||
USE_LDCONFIG= yes
|
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>
|
.include <bsd.port.pre.mk>
|
||||||
|
|
||||||
# Workaround for libusb not knowing LIBUSB_CLASS_APPLICATION
|
# Workaround for libusb not knowing LIBUSB_CLASS_APPLICATION
|
||||||
|
@ -58,7 +58,8 @@ CFLAGS+= -I${LOCALBASE}/include -L${LOCALBASE}/lib
|
|||||||
INFO= openocd
|
INFO= openocd
|
||||||
|
|
||||||
post-patch:
|
post-patch:
|
||||||
chmod +x ${WRKSRC}/libusb_finder
|
@${REINPLACE_CMD} -e '/PKG_CONFIG/{/1\.0/!s/libusb/&-0.1/;}' \
|
||||||
|
${WRKSRC}/configure
|
||||||
|
|
||||||
# IMPORTANT INFORMATION FOR DEVELOPERS:
|
# IMPORTANT INFORMATION FOR DEVELOPERS:
|
||||||
# Some Interfaces and Options are not on the list because they break a build.
|
# Some Interfaces and Options are not on the list because they break a build.
|
||||||
|
@ -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
|
|
@ -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
|
|
@ -21,8 +21,7 @@ USE_RC_SUBR= pcscd
|
|||||||
SHEBANG_FILES= ${WRKSRC}/src/spy/pcsc-spy
|
SHEBANG_FILES= ${WRKSRC}/src/spy/pcsc-spy
|
||||||
|
|
||||||
USE_LDCONFIG= yes
|
USE_LDCONFIG= yes
|
||||||
CONFIGURE_ARGS= --enable-usbdropdir=${PREFIX}/lib/pcsc/drivers/ \
|
CONFIGURE_ARGS= --enable-usbdropdir=${PREFIX}/lib/pcsc/drivers/
|
||||||
LIBUSB_CFLAGS=" " LIBUSB_LIBS="-lusb"
|
|
||||||
|
|
||||||
PKGMESSAGE= ${WRKDIR}/pkg-message
|
PKGMESSAGE= ${WRKDIR}/pkg-message
|
||||||
|
|
||||||
|
@ -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"
|
|
@ -110,6 +110,7 @@ CONFIGURE_ARGS+= --sparc_cpu=v9
|
|||||||
# but it shouldn't matter much
|
# but it shouldn't matter much
|
||||||
post-patch:
|
post-patch:
|
||||||
@${REINPLACE_CMD} -e '/LIBS/s|-lprocstat|-lprocstat -lelf|' \
|
@${REINPLACE_CMD} -e '/LIBS/s|-lprocstat|-lprocstat -lelf|' \
|
||||||
|
-e '/libusb/s/ --atleast-version=1\.0\.[0-9]*//' \
|
||||||
${WRKSRC}/configure
|
${WRKSRC}/configure
|
||||||
@${REINPLACE_CMD} -e '/libs_qga=/s|glib_libs|glib_libs -lintl|' ${WRKSRC}/configure
|
@${REINPLACE_CMD} -e '/libs_qga=/s|glib_libs|glib_libs -lintl|' ${WRKSRC}/configure
|
||||||
@${REINPLACE_CMD} -E \
|
@${REINPLACE_CMD} -E \
|
||||||
|
@ -130,32 +130,6 @@
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Search for bswap_32 function
|
# 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"
|
@@ -4769,6 +4834,7 @@ echo "Audio drivers $audio_drv_list"
|
||||||
echo "Block whitelist (rw) $block_drv_rw_whitelist"
|
echo "Block whitelist (rw) $block_drv_rw_whitelist"
|
||||||
echo "Block whitelist (ro) $block_drv_ro_whitelist"
|
echo "Block whitelist (ro) $block_drv_ro_whitelist"
|
||||||
|
@ -111,6 +111,7 @@ CONFIGURE_ARGS+= --sparc_cpu=v9
|
|||||||
# but it shouldn't matter much
|
# but it shouldn't matter much
|
||||||
post-patch:
|
post-patch:
|
||||||
@${REINPLACE_CMD} -e '/LIBS/s|-lprocstat|-lprocstat -lelf|' \
|
@${REINPLACE_CMD} -e '/LIBS/s|-lprocstat|-lprocstat -lelf|' \
|
||||||
|
-e '/libusb/s/ --atleast-version=1\.0\.[0-9]*//' \
|
||||||
${WRKSRC}/configure
|
${WRKSRC}/configure
|
||||||
@${REINPLACE_CMD} -e '/libs_qga=/s|glib_libs|glib_libs -lintl|' ${WRKSRC}/configure
|
@${REINPLACE_CMD} -e '/libs_qga=/s|glib_libs|glib_libs -lintl|' ${WRKSRC}/configure
|
||||||
@${REINPLACE_CMD} -E \
|
@${REINPLACE_CMD} -E \
|
||||||
|
@ -130,32 +130,6 @@
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Search for bswap_32 function
|
# 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"
|
@@ -4769,6 +4834,7 @@ echo "Audio drivers $audio_drv_list"
|
||||||
echo "Block whitelist (rw) $block_drv_rw_whitelist"
|
echo "Block whitelist (rw) $block_drv_rw_whitelist"
|
||||||
echo "Block whitelist (ro) $block_drv_ro_whitelist"
|
echo "Block whitelist (ro) $block_drv_ro_whitelist"
|
||||||
|
@ -34,8 +34,6 @@ CONFIGURE_ARGS= --disable-udev \
|
|||||||
--with-daemon-user=colord \
|
--with-daemon-user=colord \
|
||||||
--disable-systemd-login \
|
--disable-systemd-login \
|
||||||
--enable-libcolordcompat
|
--enable-libcolordcompat
|
||||||
CONFIGURE_ENV= USB_CFLAGS="-I/usr/include" \
|
|
||||||
USB_LIBS="-L/usr/lib -lusb"
|
|
||||||
INSTALL_TARGET= install-strip
|
INSTALL_TARGET= install-strip
|
||||||
|
|
||||||
GLIB_SCHEMAS= org.freedesktop.ColorHelper.gschema.xml
|
GLIB_SCHEMAS= org.freedesktop.ColorHelper.gschema.xml
|
||||||
@ -56,7 +54,6 @@ post-patch:
|
|||||||
-e 's|-Wignored-qualifiers||g' \
|
-e 's|-Wignored-qualifiers||g' \
|
||||||
-e 's|-Wtype-limits||g' \
|
-e 's|-Wtype-limits||g' \
|
||||||
-e 's|-Wmissing-parameter-type||g' \
|
-e 's|-Wmissing-parameter-type||g' \
|
||||||
-e 's|LIBS="-lusb-1.0|LIBS="-lusb|g' \
|
|
||||||
${WRKSRC}/configure
|
${WRKSRC}/configure
|
||||||
@${REINPLACE_CMD} -e 's|lib/color|db/color|g' \
|
@${REINPLACE_CMD} -e 's|lib/color|db/color|g' \
|
||||||
-e 's|/usr/share/color|${PREFIX}/share/color|g' \
|
-e 's|/usr/share/color|${PREFIX}/share/color|g' \
|
||||||
|
@ -47,10 +47,6 @@ XML_CONFIGURE_OFF= --with-libxml-2.0=no
|
|||||||
|
|
||||||
.include <bsd.port.options.mk>
|
.include <bsd.port.options.mk>
|
||||||
|
|
||||||
.if ${OPSYS} == FreeBSD && ${OSVERSION} < 1000040
|
|
||||||
CONFIGURE_ENV+= LIBUSB1_CFLAGS=" " LIBUSB1_LIBS="-lusb"
|
|
||||||
.endif
|
|
||||||
|
|
||||||
post-patch:
|
post-patch:
|
||||||
.for i in configure libgphoto2_port/configure
|
.for i in configure libgphoto2_port/configure
|
||||||
@${REINPLACE_CMD} -e \
|
@${REINPLACE_CMD} -e \
|
||||||
@ -62,9 +58,6 @@ post-patch:
|
|||||||
@${REINPLACE_CMD} -e \
|
@${REINPLACE_CMD} -e \
|
||||||
'/^doc_DATA/s|COPYING||' \
|
'/^doc_DATA/s|COPYING||' \
|
||||||
${WRKSRC}/Makefile.in
|
${WRKSRC}/Makefile.in
|
||||||
@${REINPLACE_CMD} -e \
|
|
||||||
's|-lusb-1.0|-lusb|' \
|
|
||||||
${WRKSRC}/libgphoto2_port/configure
|
|
||||||
@${REINPLACE_CMD} -e \
|
@${REINPLACE_CMD} -e \
|
||||||
'/^SUBDIRS/s|linux-hotplug||' \
|
'/^SUBDIRS/s|linux-hotplug||' \
|
||||||
${WRKSRC}/packaging/Makefile.in
|
${WRKSRC}/packaging/Makefile.in
|
||||||
|
@ -16,6 +16,5 @@ USES= gmake libtool pathfix pkgconfig tar:bzip2
|
|||||||
USE_LDCONFIG= yes
|
USE_LDCONFIG= yes
|
||||||
GNU_CONFIGURE= yes
|
GNU_CONFIGURE= yes
|
||||||
INSTALL_TARGET= install-strip
|
INSTALL_TARGET= install-strip
|
||||||
CONFIGURE_ENV= LIBUSB_CFLAGS=-DLIBUSB_CALL= LIBUSB_LIBS=-lusb
|
|
||||||
|
|
||||||
.include <bsd.port.mk>
|
.include <bsd.port.mk>
|
||||||
|
@ -1,19 +1,5 @@
|
|||||||
--- configure.orig 2016-02-05 17:22:09 UTC
|
--- configure.orig 2016-02-05 17:22:09 UTC
|
||||||
+++ configure
|
+++ 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
|
@@ -5656,7 +5663,6 @@ if test "${with_dbusdir+set}" = set; the
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -20,7 +20,6 @@ USE_OPENSSL= yes
|
|||||||
USE_GNOME= glib20
|
USE_GNOME= glib20
|
||||||
INSTALL_TARGET= install-strip
|
INSTALL_TARGET= install-strip
|
||||||
|
|
||||||
CONFIGURE_ENV= LIBUSB_CFLAGS=" " LIBUSB_LIBS="-lusb"
|
|
||||||
CPPFLAGS+= -DHAVE_MEMMEM
|
CPPFLAGS+= -DHAVE_MEMMEM
|
||||||
MAKE_JOBS_UNSAFE=yes
|
MAKE_JOBS_UNSAFE=yes
|
||||||
|
|
||||||
|
@ -24,9 +24,7 @@ USE_RC_SUBR= openct
|
|||||||
SUB_FILES= etoken.conf
|
SUB_FILES= etoken.conf
|
||||||
|
|
||||||
CONFIGURE_ENV= LTLIB_CFLAGS="-I${LOCALBASE}/include" \
|
CONFIGURE_ENV= LTLIB_CFLAGS="-I${LOCALBASE}/include" \
|
||||||
LTLIB_LIBS="-L${LOCALBASE}/lib -lltdl" \
|
LTLIB_LIBS="-L${LOCALBASE}/lib -lltdl"
|
||||||
LIBUSB_CFLAGS="-I/usr/include" \
|
|
||||||
LIBUSB_LIBS="-lusb"
|
|
||||||
|
|
||||||
CONFIGURE_ARGS= --localstatedir=/var --enable-usb
|
CONFIGURE_ARGS= --localstatedir=/var --enable-usb
|
||||||
|
|
||||||
@ -48,7 +46,8 @@ CONFIGURE_ARGS+=--enable-doc
|
|||||||
.endif
|
.endif
|
||||||
|
|
||||||
post-patch:
|
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
|
${WRKSRC}/configure
|
||||||
@${REINPLACE_CMD} 's|install-data-am: install-dist_apidocDATA install-dist_docDATA|install-data-am: install-dist_docDATA|' \
|
@${REINPLACE_CMD} 's|install-data-am: install-dist_apidocDATA install-dist_docDATA|install-data-am: install-dist_docDATA|' \
|
||||||
${WRKSRC}/doc/Makefile.in
|
${WRKSRC}/doc/Makefile.in
|
||||||
|
@ -90,7 +90,7 @@ LCDPROC_DRIVERS=bayrad \
|
|||||||
.include <bsd.port.options.mk>
|
.include <bsd.port.options.mk>
|
||||||
|
|
||||||
.if ${PORT_OPTIONS:MUSB}
|
.if ${PORT_OPTIONS:MUSB}
|
||||||
CONFIGURE_ARGS+= --with-libusb=/usr
|
CONFIGURE_ARGS+= --enable-libusb
|
||||||
PLIST_SUB+= USB=""
|
PLIST_SUB+= USB=""
|
||||||
LCDPROC_DRIVERS+=IOWarrior \
|
LCDPROC_DRIVERS+=IOWarrior \
|
||||||
picolcd \
|
picolcd \
|
||||||
@ -117,7 +117,7 @@ PLIST_SUB+= HID="@comment "
|
|||||||
. endif
|
. endif
|
||||||
|
|
||||||
.else
|
.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 "
|
PLIST_SUB+= USB="@comment " FTDI="@comment " HID="@comment "
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
--- ./configure.ac.orig 2014-05-17 12:08:57.000000000 +0200
|
--- configure.ac.orig 2014-05-01 10:44:01 UTC
|
||||||
+++ ./configure.ac 2014-05-17 12:12:55.000000000 +0200
|
+++ configure.ac
|
||||||
@@ -4,6 +4,7 @@
|
@@ -4,6 +4,7 @@ AC_PREREQ(2.61)
|
||||||
AC_INIT([lcdproc], [0.5.7], [lcdproc@lists.omnipotent.net])
|
AC_INIT([lcdproc], [0.5.7], [lcdproc@lists.omnipotent.net])
|
||||||
AC_CONFIG_SRCDIR([clients/lcdproc/batt.c])
|
AC_CONFIG_SRCDIR([clients/lcdproc/batt.c])
|
||||||
AM_INIT_AUTOMAKE
|
AM_INIT_AUTOMAKE
|
||||||
@ -8,82 +8,12 @@
|
|||||||
|
|
||||||
AC_CONFIG_HEADERS(config.h)
|
AC_CONFIG_HEADERS(config.h)
|
||||||
|
|
||||||
@@ -255,26 +256,62 @@
|
@@ -268,7 +269,7 @@ AC_MSG_RESULT($enable_libusb)
|
||||||
|
|
||||||
dnl ######################################################################
|
if test "$enable_libusb" = "yes"; then
|
||||||
dnl libusb support
|
ifdef([PKG_CHECK_MODULES],
|
||||||
+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],
|
|
||||||
- [PKG_CHECK_MODULES(LIBUSB, libusb,
|
- [PKG_CHECK_MODULES(LIBUSB, libusb,
|
||||||
- [AC_DEFINE(HAVE_LIBUSB, [1], [Define to 1 if you have libusb])],
|
+ [PKG_CHECK_MODULES(LIBUSB, libusb-0.1,
|
||||||
- [ enable_libusb=no ])],
|
[AC_DEFINE(HAVE_LIBUSB, [1], [Define to 1 if you have libusb])],
|
||||||
- [AC_MSG_WARN([pkg-config not (fully) installed; drivers requiring libusb may not be built])])
|
[ enable_libusb=no ])],
|
||||||
+if test "$_do_libusb" != "no" ; then
|
[AC_MSG_WARN([pkg-config not (fully) installed; drivers requiring libusb may not be built])])
|
||||||
+ 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
|
|
||||||
|
@ -11,8 +11,6 @@ COMMENT= USB HID device dumping utility
|
|||||||
LICENSE= GPLv2 GPLv3
|
LICENSE= GPLv2 GPLv3
|
||||||
LICENSE_COMB= dual
|
LICENSE_COMB= dual
|
||||||
|
|
||||||
CONFIGURE_ENV= LIBUSB_CFLAGS="-I/usr/include" \
|
|
||||||
LIBUSB_LIBS="-L/usr/lib -lusb"
|
|
||||||
GNU_CONFIGURE= yes
|
GNU_CONFIGURE= yes
|
||||||
USES= autoreconf libtool pkgconfig
|
USES= autoreconf libtool pkgconfig
|
||||||
|
|
||||||
|
@ -20,14 +20,14 @@ GNU_CONFIGURE= yes
|
|||||||
CPPFLAGS+= -I${LOCALBASE}/include
|
CPPFLAGS+= -I${LOCALBASE}/include
|
||||||
LDFLAGS+= -L${LOCALBASE}/lib
|
LDFLAGS+= -L${LOCALBASE}/lib
|
||||||
CONFIGURE_ARGS= --datadir=${DATADIR} --enable-zlib
|
CONFIGURE_ARGS= --datadir=${DATADIR} --enable-zlib
|
||||||
CONFIGURE_ENV= LIBUSB_CFLAGS="-I/usr/include" \
|
|
||||||
LIBUSB_LIBS="-L/usr/lib -lusb"
|
|
||||||
|
|
||||||
PORTDOCS= AUTHORS ChangeLog NEWS README
|
PORTDOCS= AUTHORS ChangeLog NEWS README
|
||||||
|
|
||||||
OPTIONS_DEFINE= DOCS
|
OPTIONS_DEFINE= DOCS
|
||||||
|
|
||||||
post-patch:
|
post-patch:
|
||||||
|
@${REINPLACE_CMD} -e '/PKG_CONFIG.*libusb/s/ >= 0\.1\.[0-9]*/-0.1/' \
|
||||||
|
${WRKSRC}/configure
|
||||||
@${REINPLACE_CMD} -i '' \
|
@${REINPLACE_CMD} -i '' \
|
||||||
-e 's|/bin/bash|/bin/sh|' \
|
-e 's|/bin/bash|/bin/sh|' \
|
||||||
${WRKSRC}/usb-devices
|
${WRKSRC}/usb-devices
|
||||||
|
Loading…
Reference in New Issue
Block a user