Skip to contentSkip to conversation

Upgrade libusb to v1.0.3 and add new libusb-compat package for compatibility with old packages that expect the pre-1.0 API.

PATCH New Mike Crowe 1 participant 1 message Feb 11, 2010

lore
Share & tools
lore

Mike Crowe

author
#0 lore raw

PATCH 1/1 Upgrade libusb to v1.0.3 and add new libusb-compat package for compatibility with old packages that expect the pre-1.0 API.

Switch to using AUTOTARGETS while we're at it.

I'm not certain that libusb-compat-0.1.3-pkgconfig.patch is essential but it doesn't seem to do any harm.

Also update usb_modeswitch to depend on libusb-compat rather than libusb.

---

 package/Config.in                                  |    1 +
 package/libusb-compat/Config.in                    |    7 ++
 .../libusb-compat-0.1.3-pkgconfig.patch            |   10 +++
 package/libusb-compat/libusb-compat.mk             |   15 ++++
 package/libusb/libusb-0.1.12-nocpp.patch           |   20 -----
 package/libusb/libusb.mk                           |   86 +++-----------------
 package/usb_modeswitch/Config.in                   |    2 +-
 package/usb_modeswitch/usb_modeswitch.mk           |    2 +-
 8 files changed, 45 insertions(+), 98 deletions(-)
 create mode 100644 package/libusb-compat/Config.in
 create mode 100644 package/libusb-compat/libusb-compat-0.1.3-pkgconfig.patch
 create mode 100644 package/libusb-compat/libusb-compat.mk
 delete mode 100644 package/libusb/libusb-0.1.12-nocpp.patch
package/Config.in +1 -0
index 5ddd63c..72f65b6 100644
@@ -251,6 +251,7 @@ source "package/iostat/Config.in"
 source "package/libaio/Config.in"
 source "package/libraw1394/Config.in"
 source "package/libusb/Config.in"
+source "package/libusb-compat/Config.in"
 source "package/lm-sensors/Config.in"
 source "package/lvm2/Config.in"
 source "package/mdadm/Config.in"
package/libusb-compat/Config.in new file +7 -0
new file mode 100644
index 0000000..f6f49ca
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_LIBUSB_COMPAT
+	bool "libusb-compat"
+	depends on BR2_PACKAGE_LIBUSB
+	help
+	  libusb-0.1 compatibility layer for libusb-1.0.
+
+	  http://libusb.sourceforge.net/
package/libusb-compat/libusb-compat-0.1.3-pkgconfig.patch new file +10 -0
new file mode 100644
index 0000000..e5ba786
@@ -0,0 +1,10 @@
+--- libusb-compat-0.1.3.orig/libusb.pc.in	2008-06-18 00:13:02.000000000 +0100
++++ libusb-compat-0.1.3/libusb.pc.in	2009-09-16 12:06:50.000000000 +0100
+@@ -9,6 +9,7 @@ emulated_by=libusb-1.0
+ Name: libusb
+ Description: USB access library (libusb-1.0 compat wrapper)
+ Version: @LIBUSB01_VERSION@
++Requires: libusb-1.0
+ Libs: -L${libdir} -lusb
+ Cflags: -I${includedir}
+ 
package/libusb-compat/libusb-compat.mk new file +15 -0
new file mode 100644
index 0000000..e61bbd4
@@ -0,0 +1,15 @@
+#############################################################
+#
+# libusb-compat
+#
+#############################################################
+LIBUSB_COMPAT_VERSION = 0.1.3
+LIBUSB_COMPAT_SOURCE = libusb-compat-$(LIBUSB_COMPAT_VERSION).tar.bz2
+LIBUSB_COMPAT_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/project/libusb/libusb-compat-0.1/libusb-compat-$(LIBUSB_COMPAT_VERSION)
+LIBUSB_COMPAT_AUTOCONF = NO
+LIBUSB_COMPAT_LIBTOOL_PATCH = NO
+LIBUSB_COMPAT_DEPENDENCIES = uclibc host-pkg-config libusb
+LIBUSB_COMPAT_INSTALL_STAGING = YES
+LIBUSB_COMPAT_INSTALL_TARGET = YES
+
+$(eval $(call AUTOTARGETS,package,libusb-compat))
package/libusb/libusb-0.1.12-nocpp.patch deleted +0 -20
deleted file mode 100644
index de1a8c7..0000000
@@ -1,20 +0,0 @@
---- libusb-0.1.12/Makefile.am	2006-03-04 13:52:46.000000000 +1100
-+++ libusb-0.1.12/Makefile.am.new	2007-11-08 16:25:38.000000000 +1100
-@@ -4,7 +4,7 @@
- # gnu strictness chokes on README being autogenerated
- AUTOMAKE_OPTIONS = 1.4 foreign
- 
--SUBDIRS = . tests doc
-+SUBDIRS = . doc
- 
- AM_CFLAGS = -Werror
- 
-@@ -19,7 +19,7 @@
-              apidocs/footer.html apidocs/doxygen.css apidocs/doxygen.png libusb.pc.in
- EXTRA_libusb_la_SOURCE = linux.c linux.h bsd.c darwin.c
- 
--lib_LTLIBRARIES = libusb.la libusbpp.la
-+lib_LTLIBRARIES = libusb.la
- 
- pkgconfig_DATA = libusb.pc
- 
package/libusb/libusb.mk +10 -76

89 lines not on this page · raw message

package/usb_modeswitch/Config.in +1 -1
index 41cd3a0..f9fa76e 100644
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_USB_MODESWITCH
 	bool "usb_modeswitch"
-	select BR2_PACKAGE_LIBUSB
+	select BR2_PACKAGE_LIBUSB_COMPAT
 	help
 	  USB mode switcher.
 	  Used to switch mode on multiple-function devices
package/usb_modeswitch/usb_modeswitch.mk +1 -1
index 306d803..377bc3b 100644
@@ -8,7 +8,7 @@ USB_MODESWITCH_VERSION = 1.0.7
 USB_MODESWITCH_SOURCE = usb_modeswitch-$(USB_MODESWITCH_VERSION).tar.bz2
 USB_MODESWITCH_SITE = http://www.draisberghof.de/usb_modeswitch
 USB_MODESWITCH_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) install
-USB_MODESWITCH_DEPENDENCIES = libusb
+USB_MODESWITCH_DEPENDENCIES = libusb-compat
 USB_MODESWITCH_MAKE_OPT = CC="$(TARGET_CC)" OPTS="$(TARGET_CFLAGS)"
 
 $(eval $(call AUTOTARGETS,package,usb_modeswitch))
Signature · 1 line
1.5.6.5