aboutsummaryrefslogtreecommitdiffstats
path: root/astro
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 /astro
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 'astro')
-rw-r--r--astro/gpsbabel/Makefile13
-rw-r--r--astro/gpsbabel/files/extra-patch-libusb31
2 files changed, 41 insertions, 3 deletions
diff --git a/astro/gpsbabel/Makefile b/astro/gpsbabel/Makefile
index d40659b9a567..f8b5c7f1f6c1 100644
--- a/astro/gpsbabel/Makefile
+++ b/astro/gpsbabel/Makefile
@@ -12,12 +12,19 @@ MASTER_SITES= http://www.lexort.com/pkgsrc/distfiles/
MAINTAINER= wenheping@gmail.com
COMMENT= A gps file translating tool
-LIB_DEPENDS= usb:${PORTSDIR}/devel/libusb \
- expat:${PORTSDIR}/textproc/expat2
+LIB_DEPENDS= expat:${PORTSDIR}/textproc/expat2
USE_AUTOTOOLS= autoconf:262
GNU_CONFIGURE= yes
PLIST_FILES= bin/gpsbabel
-.include <bsd.port.mk>
+.include <bsd.port.pre.mk>
+
+.if ${OSVERSION} < 800069
+LIB_DEPENDS+= usb:${PORTSDIR}/devel/libusb
+.else
+EXTRA_PATCHES= ${FILESDIR}/extra-patch-libusb
+.endif
+
+.include <bsd.port.post.mk>
diff --git a/astro/gpsbabel/files/extra-patch-libusb b/astro/gpsbabel/files/extra-patch-libusb
new file mode 100644
index 000000000000..4bf7613de5d0
--- /dev/null
+++ b/astro/gpsbabel/files/extra-patch-libusb
@@ -0,0 +1,31 @@
+--- configure.in.orig 2008-10-31 15:43:21.000000000 +0300
++++ configure.in 2009-03-07 01:08:46.000000000 +0300
+@@ -170,6 +169,28 @@
+ AC_DEFINE(HAVE_LIBUSB, 1)
+ CFLAGS="$CFLAGS -Imac/libusb/"
+ ;;
++ *-*-freebsd*)
++ GBSER=gbser_posix.o
++ AC_MSG_CHECKING(for libusb)
++ if test "$with_libusb" = no ; then
++ AC_MSG_RESULT(check not done)
++ OSJEEPS=jeeps/gpsusbstub.o
++ else
++ OLDFLAGS=$LDFLAGS
++ OCFLAGS=$CFLAGS
++ LDFLAGS="$LDFLAGS -lusb"
++ CFLAGS="$OCFLAGS"
++
++ AC_CHECK_LIB([usb], [usb_interrupt_read],
++ AC_DEFINE(HAVE_LIBUSB, 1, [Defined if you have libusb])
++ [USB_CFLAGS=""]
++ [USB_LIBS="-lusb"]
++# ,[AC_MSG_ERROR([libusb is needed])]
++ )
++ OSJEEPS=jeeps/gpslibusb.o
++ CFLAGS="$OCFLAGS"
++ fi
++ ;;
+ *)
+ GBSER=gbser_posix.o
+ AC_MSG_CHECKING(for libusb)