summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
Diffstat (limited to 'package')
-rw-r--r--package/Config.in1
-rw-r--r--package/libusb-compat/Config.in7
-rw-r--r--package/libusb-compat/libusb-compat-0.1.3-pkgconfig.patch10
-rw-r--r--package/libusb-compat/libusb-compat.mk14
-rw-r--r--package/libusb/libusb-0.1.12-nocpp.patch20
-rw-r--r--package/libusb/libusb.mk85
-rw-r--r--package/usb_modeswitch/Config.in2
-rw-r--r--package/usb_modeswitch/usb_modeswitch-1.0.7-build-system-fix.patch29
-rw-r--r--package/usb_modeswitch/usb_modeswitch-nostrip.patch11
-rw-r--r--package/usb_modeswitch/usb_modeswitch.mk28
10 files changed, 84 insertions, 123 deletions
diff --git a/package/Config.in b/package/Config.in
index 35c6d9c91..6a695cbf4 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -265,6 +265,7 @@ source "package/libaio/Config.in"
source "package/libraw1394/Config.in"
source "package/tslib/Config.in"
source "package/libusb/Config.in"
+source "package/libusb-compat/Config.in"
endmenu
menu "Java"
diff --git a/package/libusb-compat/Config.in b/package/libusb-compat/Config.in
new file mode 100644
index 000000000..f6f49cad9
--- /dev/null
+++ b/package/libusb-compat/Config.in
@@ -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/
diff --git a/package/libusb-compat/libusb-compat-0.1.3-pkgconfig.patch b/package/libusb-compat/libusb-compat-0.1.3-pkgconfig.patch
new file mode 100644
index 000000000..e5ba786dc
--- /dev/null
+++ b/package/libusb-compat/libusb-compat-0.1.3-pkgconfig.patch
@@ -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}
+
diff --git a/package/libusb-compat/libusb-compat.mk b/package/libusb-compat/libusb-compat.mk
new file mode 100644
index 000000000..98271c7d1
--- /dev/null
+++ b/package/libusb-compat/libusb-compat.mk
@@ -0,0 +1,14 @@
+#############################################################
+#
+# 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_LIBTOOL_PATCH = NO
+LIBUSB_COMPAT_DEPENDENCIES = host-pkg-config libusb
+LIBUSB_COMPAT_INSTALL_STAGING = YES
+LIBUSB_COMPAT_INSTALL_TARGET = YES
+
+$(eval $(call AUTOTARGETS,package,libusb-compat))
diff --git a/package/libusb/libusb-0.1.12-nocpp.patch b/package/libusb/libusb-0.1.12-nocpp.patch
deleted file mode 100644
index de1a8c7db..000000000
--- a/package/libusb/libusb-0.1.12-nocpp.patch
+++ /dev/null
@@ -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
-
diff --git a/package/libusb/libusb.mk b/package/libusb/libusb.mk
index adf3e204c..8977d5294 100644
--- a/package/libusb/libusb.mk
+++ b/package/libusb/libusb.mk
@@ -3,79 +3,12 @@
# libusb
#
#############################################################
-LIBUSB_VERSION:=0.1.12
-LIBUSB_PATCH_FILE:=libusb_$(LIBUSB_VERSION)-10.diff.gz
-LIBUSB_SOURCE:=libusb_$(LIBUSB_VERSION).orig.tar.gz
-LIBUSB_SITE:=http://snapshot.debian.net/archive/2008/04/27/debian/pool/main/libu/libusb
-LIBUSB_DIR:=$(BUILD_DIR)/libusb-$(LIBUSB_VERSION)
-LIBUSB_CAT:=$(ZCAT)
-LIBUSB_BINARY:=usr/lib/libusb.so
-
-ifneq ($(LIBUSB_PATCH_FILE),)
-LIBUSB_PATCH=$(DL_DIR)/$(LIBUSB_PATCH_FILE)
-$(LIBUSB_PATCH):
- $(call DOWNLOAD,$(LIBUSB_SITE),$(LIBUSB_PATCH_FILE))
-endif
-$(DL_DIR)/$(LIBUSB_SOURCE): $(LIBUSB_PATCH)
- $(call DOWNLOAD,$(LIBUSB_SITE),$(LIBUSB_SOURCE))
- touch -c $@
-
-libusb-source: $(DL_DIR)/$(LIBUSB_SOURCE) $(LIBUSB_PATCH)
-
-libusb-unpacked: $(LIBUSB_DIR)/.unpacked
-$(LIBUSB_DIR)/.unpacked: $(DL_DIR)/$(LIBUSB_SOURCE)
- $(LIBUSB_CAT) $(DL_DIR)/$(LIBUSB_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
-ifneq ($(LIBUSB_PATCH_FILE),)
- (cd $(LIBUSB_DIR) && $(LIBUSB_CAT) $(LIBUSB_PATCH) | patch -p1)
-endif
- toolchain/patch-kernel.sh $(LIBUSB_DIR) package/libusb/ libusb-$(LIBUSB_VERSION)\*.patch*
- $(SED) 's,^all:.*,all:,g' $(LIBUSB_DIR)/tests/Makefile.in
- $(SED) 's,^install:.*,install:,g' $(LIBUSB_DIR)/tests/Makefile.in
- $(CONFIG_UPDATE) $(LIBUSB_DIR)
- cd $(LIBUSB_DIR) && $(AUTORECONF)
- touch $@
-
-$(LIBUSB_DIR)/.configured: $(LIBUSB_DIR)/.unpacked
- (cd $(LIBUSB_DIR); rm -rf config.cache; \
- $(TARGET_CONFIGURE_OPTS) \
- $(TARGET_CONFIGURE_ARGS) \
- ac_cv_header_regex_h=no \
- ./configure $(QUIET) \
- --target=$(GNU_TARGET_NAME) \
- --host=$(GNU_TARGET_NAME) \
- --build=$(GNU_HOST_NAME) \
- --prefix=$(STAGING_DIR)/usr \
- --disable-debug \
- --disable-build-docs \
- )
- touch $@
-
-$(STAGING_DIR)/usr/lib/libusb.so: $(LIBUSB_DIR)/.configured
- $(MAKE) -C $(LIBUSB_DIR)
- $(MAKE) -C $(LIBUSB_DIR) install
-
-$(TARGET_DIR)/$(LIBUSB_BINARY): $(STAGING_DIR)/usr/lib/libusb.so
- cp -dpf $(STAGING_DIR)/usr/lib/libusb*.so* $(TARGET_DIR)/usr/lib/
- $(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/lib/libusb*.so*
-
-libusb: host-pkg-config host-autoconf host-automake host-libtool $(TARGET_DIR)/$(LIBUSB_BINARY)
-
-libusb-clean:
- rm -f $(STAGING_DIR)/bin/libusb-config
- rm -f $(STAGING_DIR)/usr/includes/usb*.h
- rm -f $(STAGING_DIR)/lib/libusb*
- rm -rf $(STAGING_DIR)/lib/pkgconfig
- rm -f $(TARGET_DIR)/usr/lib/libusb*
- -$(MAKE) -C $(LIBUSB_DIR) clean
-
-libusb-dirclean:
- rm -rf $(LIBUSB_DIR)
-
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-ifeq ($(BR2_PACKAGE_LIBUSB),y)
-TARGETS+=libusb
-endif
+LIBUSB_VERSION = 1.0.3
+LIBUSB_SOURCE = libusb-$(LIBUSB_VERSION).tar.bz2
+LIBUSB_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/project/libusb/libusb-1.0/libusb-$(LIBUSB_VERSION)
+LIBUSB_LIBTOOL_PATCH = NO
+LIBUSB_DEPENDENCIES = host-pkg-config
+LIBUSB_INSTALL_STAGING = YES
+LIBUSB_INSTALL_TARGET = YES
+
+$(eval $(call AUTOTARGETS,package,libusb))
diff --git a/package/usb_modeswitch/Config.in b/package/usb_modeswitch/Config.in
index 41cd3a065..f9fa76e2c 100644
--- a/package/usb_modeswitch/Config.in
+++ b/package/usb_modeswitch/Config.in
@@ -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
diff --git a/package/usb_modeswitch/usb_modeswitch-1.0.7-build-system-fix.patch b/package/usb_modeswitch/usb_modeswitch-1.0.7-build-system-fix.patch
new file mode 100644
index 000000000..71dbc7a6d
--- /dev/null
+++ b/package/usb_modeswitch/usb_modeswitch-1.0.7-build-system-fix.patch
@@ -0,0 +1,29 @@
+---
+ Makefile | 7 +++----
+ 1 file changed, 3 insertions(+), 4 deletions(-)
+
+Index: usb_modeswitch-1.0.7/Makefile
+===================================================================
+--- usb_modeswitch-1.0.7.orig/Makefile
++++ usb_modeswitch-1.0.7/Makefile
+@@ -1,8 +1,8 @@
+ PROG = usb_modeswitch
+ VERS = 1.0.7
+ STRIP = strip
+-CC = gcc
+-CCFLAGS = -l usb -Wall
++CC ?= gcc
++CFLAGS += -l usb -Wall
+ RM = /bin/rm -f
+ OBJS = usb_modeswitch.c
+ PREFIX = $(DESTDIR)/usr
+@@ -12,8 +12,7 @@
+ .PHONY: clean
+ all: $(PROG)
+ $(PROG): $(OBJS)
+- $(CC) $(CCFLAGS) -o $(PROG) $(OBJS)
+- $(STRIP) $(PROG)
++ $(CC) $(CFLAGS) -o $(PROG) $(OBJS)
+
+ clean:
+ $(RM) ./usb_modeswitch
diff --git a/package/usb_modeswitch/usb_modeswitch-nostrip.patch b/package/usb_modeswitch/usb_modeswitch-nostrip.patch
deleted file mode 100644
index 3bb8e8d38..000000000
--- a/package/usb_modeswitch/usb_modeswitch-nostrip.patch
+++ /dev/null
@@ -1,11 +0,0 @@
-diff -Nura usb_modeswitch-1.0.1/Makefile usb_modeswitch-1.0.1.nostrip/Makefile
---- usb_modeswitch-1.0.1/Makefile 2009-04-15 16:15:17.000000000 -0300
-+++ usb_modeswitch-1.0.1.nostrip/Makefile 2009-06-10 10:02:05.000000000 -0300
-@@ -13,7 +13,6 @@
- all: $(PROG)
- $(PROG): $(OBJS)
- $(CC) $(CCFLAGS) -o $(PROG) $(OBJS)
-- $(STRIP) $(PROG)
-
- clean:
- $(RM) ./usb_modeswitch
diff --git a/package/usb_modeswitch/usb_modeswitch.mk b/package/usb_modeswitch/usb_modeswitch.mk
index 306d80315..d84ccc2bf 100644
--- a/package/usb_modeswitch/usb_modeswitch.mk
+++ b/package/usb_modeswitch/usb_modeswitch.mk
@@ -7,22 +7,20 @@
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_MAKE_OPT = CC="$(TARGET_CC)" OPTS="$(TARGET_CFLAGS)"
+USB_MODESWITCH_DEPENDENCIES = libusb-compat
-$(eval $(call AUTOTARGETS,package,usb_modeswitch))
+define USB_MODESWITCH_BUILD_CMDS
+ rm $(@D)/usb_modeswitch
+ $(TARGET_CONFIGURE_OPTS) $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
+endef
-$(USB_MODESWITCH_TARGET_CONFIGURE):
- rm -f $(USB_MODESWITCH_DIR)/usb_modeswitch
- touch $@
+define USB_MODESWITCH_INSTALL_TARGET_CMDS
+ $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install
+endef
-$(USB_MODESWITCH_HOOK_POST_INSTALL):
- chmod a-x $(TARGET_DIR)/etc/usb_modeswitch.conf
- touch $@
+define USB_MODESWITCH_CLEAN_CMDS
+ rm -f $(TARGET_DIR)/usr/sbin/usb_modeswitch
+ rm -f $(TARGET_DIR)/etc/usb_modeswitch.conf
+endef
-$(USB_MODESWITCH_TARGET_UNINSTALL):
- $(call MESSAGE,"Uninstalling")
- rm -f $(TARGET_DIR)/usr/sbin/usb_modeswitch
- rm -f $(TARGET_DIR)/etc/usb_modeswitch.conf
- rm -f $(USB_MODESWITCH_TARGET_INSTALL_TARGET) $(USB_MODESWITCH_HOOK_POST_INSTALL)
+$(eval $(call GENTARGETS,package,usb_modeswitch))