diff options
author | Alexander Aring <alex.aring@gmail.com> | 2014-03-29 08:44:43 +0100 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2014-04-03 08:18:59 +0200 |
commit | 127924094678e459b0d31cd81605317479d80c7f (patch) | |
tree | c981180e9f79b49d6d4139aaef1b44062519fa45 /rules/libusb.make | |
parent | c3b43253a618292227d3a7678454ffc8d3478139 (diff) | |
download | ptxdist-127924094678e459b0d31cd81605317479d80c7f.tar.gz ptxdist-127924094678e459b0d31cd81605317479d80c7f.tar.xz |
libusb: drop libusb and use libusbx
This patch drops the libusb support and add the libusbx instead.
We can do that because libusb and libusbx offers the same API, original
text from libusbx project website:
"If you are an existing user of libusb, you don't have to change
anything. Just download the libusbx library and use it in your code. The
library is designed as a drop in replacement for libusb, so please give
it a try. If you don't like it, which we very much doubt, you can always
revert..."
Another point is that libusbx website says that the libusb project is
somehow died and will not longer release new releases:
"The reason for the fork is that, despite having dedicated members,
libusb has still not been able to produce a new release for the past 2
years. When a project fails to produce regular releases, we consider
that you, its user, are paying the ultimate price. This is because it
means that patches and new feature are being witheld and you end up
wasting your time."
This patch fix also a few bugs which I detected:
i) switch to "--disable-static", otherwise it was "--enable-shared
--enable-static"
ii) correct use of --disable-log and --enable-debug-log, there was an
option for these two configure flags but also was a static
"--disable-log --disable-debug-log" in the configure call, which
makes no sense.
iii) Fix Jürgen Beisert's mail address.
iv) cleanup and remove _ENV and _PATH setting.
new features:
i) Add LIBUSB_SYSTEM_LOG which could enable --enable-system-log flag.
ii) also adding some new disable flag --disable-tests-build
iii) I add "--disable-udev" there but we should have a --enable-udev...
The old one has no kind of udev support and I got a recursive
dependency detection because udev-legacy needs usbutils which needs
libusb. We should look at this in the near future.
iv) change "libusb" entry to "libusbx"
v) rename LIBUSB_DISBALE_LOG to LIBUSB_LOG and change logic.
I also keep the patch from libusb and port it to libusbx because I saw
that libusbx uses also pthreads.
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'rules/libusb.make')
-rw-r--r-- | rules/libusb.make | 33 |
1 files changed, 12 insertions, 21 deletions
diff --git a/rules/libusb.make b/rules/libusb.make index 4dfa0e583..addc4d8fe 100644 --- a/rules/libusb.make +++ b/rules/libusb.make @@ -16,37 +16,28 @@ PACKAGES-$(PTXCONF_LIBUSB) += libusb # # Paths and names # -LIBUSB_VERSION := 1.0.8 -LIBUSB_MD5 := 37d34e6eaa69a4b645a19ff4ca63ceef -LIBUSB := libusb-$(LIBUSB_VERSION) +LIBUSB_VERSION := 1.0.18 +LIBUSB_MD5 := f2ccd0589dde901dfd5607459f77bf44 +LIBUSB := libusbx-$(LIBUSB_VERSION) LIBUSB_SUFFIX := tar.bz2 -LIBUSB_URL := $(call ptx/mirror, SF, libusb/$(LIBUSB).$(LIBUSB_SUFFIX)) +LIBUSB_URL := $(call ptx/mirror, SF, libusbx/$(LIBUSB).$(LIBUSB_SUFFIX)) LIBUSB_SOURCE := $(SRCDIR)/$(LIBUSB).$(LIBUSB_SUFFIX) LIBUSB_DIR := $(BUILDDIR)/$(LIBUSB) LIBUSB_LICENSE := LGPLv2.1 -# ---------------------------------------------------------------------------- -# Prepare -# ---------------------------------------------------------------------------- - -LIBUSB_PATH := PATH=$(CROSS_PATH) -LIBUSB_ENV := $(CROSS_ENV) - # # autoconf # LIBUSB_AUTOCONF := \ $(CROSS_AUTOCONF_USR) \ - --disable-log \ - --disable-debug-log \ - --disable-examples-build \ - --enable-static \ + --disable-static \ --enable-shared \ - --$(call ptx/endis, PTXCONF_LIBUSB_DISABLE_LOG)-log - -ifdef PTXCONF_LIBUSB_DEBUG_LOG -LIBUSB_AUTOCONF += --enable-debug-log -endif + --disable-udev \ + --$(call ptx/endis, PTXCONF_LIBUSB_LOG)-log \ + --$(call ptx/endis, PTXCONF_LIBUSB_DEBUG_LOG)-debug-log \ + --$(call ptx/endis, PTXCONF_LIBUSB_SYSTEM_LOG)-system-log \ + --disable-examples-build \ + --disable-tests-build # ---------------------------------------------------------------------------- # Target-Install @@ -58,7 +49,7 @@ $(STATEDIR)/libusb.targetinstall: @$(call install_init, libusb) @$(call install_fixup, libusb,PRIORITY,optional) @$(call install_fixup, libusb,SECTION,base) - @$(call install_fixup, libusb,AUTHOR,"Juergen Beisert <juergen@kreuzholzen.de>") + @$(call install_fixup, libusb,AUTHOR,"Juergen Beisert <j.beisert@pengutronix.de>") @$(call install_fixup, libusb,DESCRIPTION,missing) @$(call install_lib, libusb, 0, 0, 0644, libusb-1.0) |