All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] libusb-compat: add (from oe-core)
@ 2018-07-27 11:19 Ross Burton
  0 siblings, 0 replies; only message in thread
From: Ross Burton @ 2018-07-27 11:19 UTC (permalink / raw)
  To: openembedded-devel

This is being removed from oe-core, so add to meta-oe as some recipes still
claim to need it.

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 .../0001-usb.h-Include-sys-types.h.patch           | 30 ++++++++++++++++
 .../recipes-support/libusb/libusb-compat_0.1.5.bb  | 42 ++++++++++++++++++++++
 2 files changed, 72 insertions(+)
 create mode 100644 meta-oe/recipes-support/libusb/libusb-compat/0001-usb.h-Include-sys-types.h.patch
 create mode 100644 meta-oe/recipes-support/libusb/libusb-compat_0.1.5.bb

diff --git a/meta-oe/recipes-support/libusb/libusb-compat/0001-usb.h-Include-sys-types.h.patch b/meta-oe/recipes-support/libusb/libusb-compat/0001-usb.h-Include-sys-types.h.patch
new file mode 100644
index 0000000000..b88440dec9
--- /dev/null
+++ b/meta-oe/recipes-support/libusb/libusb-compat/0001-usb.h-Include-sys-types.h.patch
@@ -0,0 +1,30 @@
+From 340f911f9e3f4ff6b01682c5341c959060782af2 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 2 Apr 2015 19:18:45 -0700
+Subject: [PATCH] usb.h: Include sys/types.h
+
+We need the definitions for things like u_intX_t
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ libusb/usb.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/libusb/usb.h b/libusb/usb.h
+index 84e730f..caffae2 100644
+--- a/libusb/usb.h
++++ b/libusb/usb.h
+@@ -31,6 +31,8 @@
+ 
+ #include <dirent.h>
+ 
++#include <sys/types.h>
++
+ /*
+  * USB spec information
+  *
+-- 
+2.1.4
+
diff --git a/meta-oe/recipes-support/libusb/libusb-compat_0.1.5.bb b/meta-oe/recipes-support/libusb/libusb-compat_0.1.5.bb
new file mode 100644
index 0000000000..1ddbe238fc
--- /dev/null
+++ b/meta-oe/recipes-support/libusb/libusb-compat_0.1.5.bb
@@ -0,0 +1,42 @@
+SUMMARY = "libusb-0.1 compatibility layer for libusb1"
+DESCRIPTION = "libusb-0.1 compatible layer for libusb1, a drop-in replacement \
+that aims to look, feel and behave exactly like libusb-0.1"
+HOMEPAGE = "http://www.libusb.org/"
+BUGTRACKER = "http://www.libusb.org/report"
+SECTION = "libs"
+
+LICENSE = "LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=f2ac5f3ac4835e8f91324a26a590a423"
+DEPENDS = "libusb1"
+
+# Few packages are known not to work with libusb-compat (e.g. libmtp-1.0.0),
+# so here libusb-0.1 is removed completely instead of adding virtual/libusb0.
+# Besides, libusb-0.1 uses a per 1ms polling that hurts a lot to power
+# consumption.
+PROVIDES = "libusb virtual/libusb0"
+BBCLASSEXTEND = "native nativesdk"
+
+PE = "1"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/libusb/libusb-compat-${PV}.tar.bz2 \
+           file://0001-usb.h-Include-sys-types.h.patch \
+          "
+
+SRC_URI[md5sum] = "2780b6a758a1e2c2943bdbf7faf740e4"
+SRC_URI[sha256sum] = "404ef4b6b324be79ac1bfb3d839eac860fbc929e6acb1ef88793a6ea328bc55a"
+
+UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/libusb/files/libusb-compat-0.1/"
+UPSTREAM_CHECK_REGEX = "/libusb-compat-(?P<pver>(\d+[\.\-_]*)+)/$"
+
+BINCONFIG = "${bindir}/libusb-config"
+
+inherit autotools pkgconfig binconfig-disabled lib_package
+
+EXTRA_OECONF = "--libdir=${base_libdir}"
+
+do_install_append() {
+	install -d ${D}${libdir}
+	if [ ! ${D}${libdir} -ef ${D}${base_libdir} ]; then
+		mv ${D}${base_libdir}/pkgconfig ${D}${libdir}
+	fi
+}
-- 
2.11.0



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-07-27 11:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-27 11:19 [PATCH] libusb-compat: add (from oe-core) Ross Burton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.