Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | SUMMARY = "libusb-0.1 compatibility layer for libusb1" |
| 2 | DESCRIPTION = "libusb-0.1 compatible layer for libusb1, a drop-in replacement \ |
| 3 | that aims to look, feel and behave exactly like libusb-0.1" |
| 4 | HOMEPAGE = "http://www.libusb.org/" |
| 5 | BUGTRACKER = "http://www.libusb.org/report" |
| 6 | SECTION = "libs" |
| 7 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 8 | LICENSE = "LGPL-2.1-or-later" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 9 | LIC_FILES_CHKSUM = "file://LICENSE;md5=f2ac5f3ac4835e8f91324a26a590a423" |
| 10 | DEPENDS = "libusb1" |
| 11 | |
Andrew Geissler | fc113ea | 2023-03-31 09:59:46 -0500 | [diff] [blame] | 12 | # libusb-compat dlopen() libusb1 so we need to explicitly RDEPENDS on it |
| 13 | RDEPENDS:${PN} += "libusb1" |
| 14 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 15 | # Few packages are known not to work with libusb-compat (e.g. libmtp-1.0.0), |
| 16 | # so here libusb-0.1 is removed completely instead of adding virtual/libusb0. |
| 17 | # Besides, libusb-0.1 uses a per 1ms polling that hurts a lot to power |
| 18 | # consumption. |
| 19 | PROVIDES = "libusb virtual/libusb0" |
| 20 | BBCLASSEXTEND = "native nativesdk" |
| 21 | |
| 22 | PE = "1" |
| 23 | |
Andrew Geissler | 2ee498a | 2020-05-29 15:52:06 -0500 | [diff] [blame] | 24 | SRC_URI = " \ |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 25 | git://github.com/libusb/libusb-compat-0.1.git;protocol=https;branch=master \ |
Andrew Geissler | 2ee498a | 2020-05-29 15:52:06 -0500 | [diff] [blame] | 26 | file://0001-usb.h-Include-sys-types.h.patch \ |
Andrew Geissler | fc113ea | 2023-03-31 09:59:46 -0500 | [diff] [blame] | 27 | file://0002-automake-make-example-programs-installable.patch \ |
| 28 | file://run-ptest \ |
Andrew Geissler | 2ee498a | 2020-05-29 15:52:06 -0500 | [diff] [blame] | 29 | " |
Andrew Geissler | fc113ea | 2023-03-31 09:59:46 -0500 | [diff] [blame] | 30 | SRCREV = "c497eff1ae8c4cfd4fdff370f04c78fa0584f4f3" |
Andrew Geissler | 2ee498a | 2020-05-29 15:52:06 -0500 | [diff] [blame] | 31 | S = "${WORKDIR}/git" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 32 | |
Andrew Geissler | 2ee498a | 2020-05-29 15:52:06 -0500 | [diff] [blame] | 33 | UPSTREAM_CHECK_URI = "https://github.com/libusb/libusb-compat-0.1/releases" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 34 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 35 | BINCONFIG = "${bindir}/libusb-config" |
| 36 | |
Andrew Geissler | fc113ea | 2023-03-31 09:59:46 -0500 | [diff] [blame] | 37 | inherit autotools pkgconfig binconfig-disabled lib_package ptest |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 38 | |
Andrew Geissler | fc113ea | 2023-03-31 09:59:46 -0500 | [diff] [blame] | 39 | # examples are used as ptest so enable them at configuration if needed |
| 40 | EXTRA_OECONF += "${@bb.utils.contains('PTEST_ENABLED', '1', '--enable-examples-build', '', d)}" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 41 | |
Andrew Geissler | fc113ea | 2023-03-31 09:59:46 -0500 | [diff] [blame] | 42 | # Move test binaries out of bindir to avoid clashing with a "real" lsusb. |
| 43 | do_install_ptest() { |
| 44 | for bin in lsusb testlibusb; do |
| 45 | mv ${D}${bindir}/$bin ${D}${PTEST_PATH} |
| 46 | done |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 47 | } |