summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/libgpiod/libgpiod_1.6.5.bb
diff options
context:
space:
mode:
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.bb47
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 @@
1require libgpiod.inc
2
3LICENSE = "LGPL-2.1-or-later"
4LIC_FILES_CHKSUM = "file://COPYING;md5=2caced0b25dfefd4c601d92bd15116de"
5
6SRC_URI += "file://0001-bindings-cxx-disable-tests.patch"
7
8SRC_URI[sha256sum] = "ae280f697bf035a1fb780c9972e5c81d0d2712b7ab6124fb3fba24619daa72bc"
9
10FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}-1.x:"
11
12inherit python3native
13
14PACKAGECONFIG[tests] = "--enable-tests,--disable-tests,kmod udev glib-2.0 catch2"
15PACKAGECONFIG[python3] = "--enable-bindings-python,--disable-bindings-python,python3"
16
17# Always build tools - they don't have any additional
18# requirements over the library.
19EXTRA_OECONF = "--enable-tools"
20
21PACKAGES =+ "${PN}-python"
22FILES:${PN}-tools += "${bindir}/gpiofind"
23FILES:${PN}-ptest += " \
24 ${bindir}/gpiod_py_test.py \
25 ${libdir}/libgpiomockup.so.* \
26"
27FILES:${PN}-python = "${PYTHON_SITEPACKAGES_DIR}/*.so"
28FILES:${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/*.a"
29
30RRECOMMENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'python3', '${PN}-python', '', d)}"
31RRECOMMENDS:${PN}-ptest += " \
32 kernel-module-gpio-mockup \
33 ${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3-unittest', '', d)} \
34"
35RDEPENDS:${PN}-ptest += " \
36 python3-packaging \
37 ${@bb.utils.contains('PTEST_ENABLED', '1', 'bats', '', d)} \
38"
39
40do_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}