aboutsummaryrefslogtreecommitdiffstats
path: root/devel/libftdi
diff options
context:
space:
mode:
authorstas <stas@FreeBSD.org>2009-03-10 01:15:43 +0800
committerstas <stas@FreeBSD.org>2009-03-10 01:15:43 +0800
commit08bfa7c4aa027efa35afd531304e476e4f713b80 (patch)
tree31b7120f0eb5ff46ed252641018a5ff19ff41fc3 /devel/libftdi
parent982434000a36499258eff52f7032254355edca7a (diff)
downloadfreebsd-ports-gnome-08bfa7c4aa027efa35afd531304e476e4f713b80.tar.gz
freebsd-ports-gnome-08bfa7c4aa027efa35afd531304e476e4f713b80.tar.zst
freebsd-ports-gnome-08bfa7c4aa027efa35afd531304e476e4f713b80.zip
- Chase libusb20 rename in r189585.
- Mark sane-backends broken on current due to changes in USB stack. Reviewed by: thompsa (old version), miwi Tested by: miwi
Diffstat (limited to 'devel/libftdi')
-rw-r--r--devel/libftdi/Makefile18
-rw-r--r--devel/libftdi/files/extra-patch-configure.in34
-rw-r--r--devel/libftdi/files/patch-examples_find_all.c10
-rw-r--r--devel/libftdi/files/patch-examples_simple.c10
4 files changed, 69 insertions, 3 deletions
diff --git a/devel/libftdi/Makefile b/devel/libftdi/Makefile
index 3ce3cd6edbcb..76f9b4d0fe3f 100644
--- a/devel/libftdi/Makefile
+++ b/devel/libftdi/Makefile
@@ -13,8 +13,6 @@ MASTER_SITES= http://www.intra2net.com/de/produkte/opensource/ftdi/TGZ/
MAINTAINER= o.davydenko@gmail.com
COMMENT= A library (using libusb) to talk to FTDI chips
-LIB_DEPENDS= usb-0.1:${PORTSDIR}/devel/libusb
-
USE_AUTOTOOLS= libtool:15
GNU_CONFIGURE= yes
CONFIGURE_ENV= CFLAGS="${CFLAGS} -I${LOCALBASE}/include"
@@ -23,10 +21,24 @@ USE_GNOME= pkgconfig gnomehack
PORTDOCS= COPYING.LIB ChangeLog README
+.include <bsd.port.pre.mk>
+
+.if ${OSVERSION} < 800069
+LIB_DEPENDS+= usb-0.1:${PORTSDIR}/devel/libusb
+.else
+EXTRA_PATCHES= ${FILESDIR}/extra-patch-configure.in
+USE_AUTOTOOLS+= autoconf:262
+.endif
+
+post-patch:
+.if ${OSVERSION} >= 800069
+ ${RM} -f ${WRKSRC}/configure
+.endif
+
post-install:
.if !defined(NOPORTDOCS)
${MKDIR} ${DOCSDIR}
${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${DOCSDIR}
.endif
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/devel/libftdi/files/extra-patch-configure.in b/devel/libftdi/files/extra-patch-configure.in
new file mode 100644
index 000000000000..d3a8a6f6635c
--- /dev/null
+++ b/devel/libftdi/files/extra-patch-configure.in
@@ -0,0 +1,34 @@
+--- configure.in.orig 2009-03-07 20:14:41.000000000 +0300
++++ configure.in 2009-03-07 20:15:29.000000000 +0300
+@@ -7,30 +7,7 @@
+ AC_PROG_CC
+ AM_PROG_LIBTOOL
+
+-dnl check for libusb-config
+-AC_PATH_PROG(HAVELIBUSB, libusb-config, $PATH)
+-
+-if test ! -z "$HAVELIBUSB"; then
+- LIBUSB_CFLAGS=`$HAVELIBUSB --cflags`
+- LIBUSB_LIBS=`$HAVELIBUSB --libs`
+-
+- CFLAGS="$CFLAGS $LIBUSB_CFLAGS"
+- LIBS="$LIBS $LIBUSB_LIBS"
+-else
+- AC_MSG_ERROR([*** libusb-config not found. You need a working libusb installation.])
+-fi
+-
+-dnl check for version of libusb
+-AC_MSG_CHECKING([if libusb version is >= 0.1.7])
+-libusb_version_needed="1007"
+-libusb_version=`$HAVELIBUSB --version | sed -e "s/libusb //" | awk 'BEGIN { FS = "."; } { printf "%d", ($''1 * 1000 + $''2) * 1000 + $''3;}'`
+-
+-if test $libusb_version -lt $libusb_version_needed; then
+- AC_MSG_RESULT(no)
+- AC_MSG_ERROR([*** libusb is too old ($libusb_version). You need a libusb installation newer or equal to 0.1.7.])
+-else
+- AC_MSG_RESULT(yes)
+-fi
++LIBS="$LIBS -lusb"
+
+ ENABLE_ASYNC_MODE=0
+ AC_ARG_WITH(async-mode,
diff --git a/devel/libftdi/files/patch-examples_find_all.c b/devel/libftdi/files/patch-examples_find_all.c
new file mode 100644
index 000000000000..f4a15772d49e
--- /dev/null
+++ b/devel/libftdi/files/patch-examples_find_all.c
@@ -0,0 +1,10 @@
+--- examples/find_all.c.orig 2009-03-07 20:18:06.000000000 +0300
++++ examples/find_all.c 2009-03-07 20:18:52.000000000 +0300
+@@ -6,6 +6,7 @@
+ */
+
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <ftdi.h>
+
+ int main(int argc, char **argv)
diff --git a/devel/libftdi/files/patch-examples_simple.c b/devel/libftdi/files/patch-examples_simple.c
new file mode 100644
index 000000000000..8aaf9e4a075e
--- /dev/null
+++ b/devel/libftdi/files/patch-examples_simple.c
@@ -0,0 +1,10 @@
+--- examples/simple.c.orig 2009-03-07 20:12:44.000000000 +0300
++++ examples/simple.c 2009-03-07 20:14:10.000000000 +0300
+@@ -6,6 +6,7 @@
+ */
+
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <ftdi.h>
+
+ int main(int argc, char **argv)