diff options
Diffstat (limited to 'meta-oe/recipes-support/libgpiod/libgpiod_1.6.5.bb')
-rw-r--r-- | meta-oe/recipes-support/libgpiod/libgpiod_1.6.5.bb | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/libgpiod/libgpiod_1.6.5.bb b/meta-oe/recipes-support/libgpiod/libgpiod_1.6.5.bb new file mode 100644 index 000000000..079583949 --- /dev/null +++ b/meta-oe/recipes-support/libgpiod/libgpiod_1.6.5.bb | |||
@@ -0,0 +1,47 @@ | |||
1 | require libgpiod.inc | ||
2 | |||
3 | LICENSE = "LGPL-2.1-or-later" | ||
4 | LIC_FILES_CHKSUM = "file://COPYING;md5=2caced0b25dfefd4c601d92bd15116de" | ||
5 | |||
6 | SRC_URI += "file://0001-bindings-cxx-disable-tests.patch" | ||
7 | |||
8 | SRC_URI[sha256sum] = "ae280f697bf035a1fb780c9972e5c81d0d2712b7ab6124fb3fba24619daa72bc" | ||
9 | |||
10 | FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}-1.x:" | ||
11 | |||
12 | inherit python3native | ||
13 | |||
14 | PACKAGECONFIG[tests] = "--enable-tests,--disable-tests,kmod udev glib-2.0 catch2" | ||
15 | PACKAGECONFIG[python3] = "--enable-bindings-python,--disable-bindings-python,python3" | ||
16 | |||
17 | # Always build tools - they don't have any additional | ||
18 | # requirements over the library. | ||
19 | EXTRA_OECONF = "--enable-tools" | ||
20 | |||
21 | PACKAGES =+ "${PN}-python" | ||
22 | FILES:${PN}-tools += "${bindir}/gpiofind" | ||
23 | FILES:${PN}-ptest += " \ | ||
24 | ${bindir}/gpiod_py_test.py \ | ||
25 | ${libdir}/libgpiomockup.so.* \ | ||
26 | " | ||
27 | FILES:${PN}-python = "${PYTHON_SITEPACKAGES_DIR}/*.so" | ||
28 | FILES:${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/*.a" | ||
29 | |||
30 | RRECOMMENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'python3', '${PN}-python', '', d)}" | ||
31 | RRECOMMENDS:${PN}-ptest += " \ | ||
32 | kernel-module-gpio-mockup \ | ||
33 | ${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3-unittest', '', d)} \ | ||
34 | " | ||
35 | RDEPENDS:${PN}-ptest += " \ | ||
36 | python3-packaging \ | ||
37 | ${@bb.utils.contains('PTEST_ENABLED', '1', 'bats', '', d)} \ | ||
38 | " | ||
39 | |||
40 | do_install_ptest:append() { | ||
41 | install -m 0755 ${S}/tools/gpio-tools-test ${D}${PTEST_PATH}/tests/ | ||
42 | install -m 0755 ${S}/tools/gpio-tools-test.bats ${D}${PTEST_PATH}/tests/ | ||
43 | |||
44 | if ${@bb.utils.contains('PACKAGECONFIG', 'python3', 'true', 'false', d)}; then | ||
45 | install -m 0755 ${S}/bindings/python/tests/gpiod_py_test.py ${D}${PTEST_PATH}/tests/ | ||
46 | fi | ||
47 | } | ||