summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/libgpiod/libgpiod_1.6.4.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-support/libgpiod/libgpiod_1.6.4.bb')
-rw-r--r--meta-oe/recipes-support/libgpiod/libgpiod_1.6.4.bb56
1 files changed, 6 insertions, 50 deletions
diff --git a/meta-oe/recipes-support/libgpiod/libgpiod_1.6.4.bb b/meta-oe/recipes-support/libgpiod/libgpiod_1.6.4.bb
index 70a77c8834..df0e3f104a 100644
--- a/meta-oe/recipes-support/libgpiod/libgpiod_1.6.4.bb
+++ b/meta-oe/recipes-support/libgpiod/libgpiod_1.6.4.bb
@@ -1,80 +1,36 @@
1SUMMARY = "C library and tools for interacting with the linux GPIO character device" 1require libgpiod.inc
2AUTHOR = "Bartosz Golaszewski <brgl@bgdev.pl>"
3 2
4LICENSE = "LGPL-2.1-or-later" 3LICENSE = "LGPL-2.1-or-later"
5LIC_FILES_CHKSUM = "file://COPYING;md5=2caced0b25dfefd4c601d92bd15116de" 4LIC_FILES_CHKSUM = "file://COPYING;md5=2caced0b25dfefd4c601d92bd15116de"
6 5
7SRC_URI = " \
8 https://www.kernel.org/pub/software/libs/${BPN}/${BP}.tar.xz \
9 file://run-ptest \
10"
11
12SRC_URI[md5sum] = "7a2cca6ead9296c27e877070dd8853bc"
13SRC_URI[sha256sum] = "7b146e12f28fbca3df7557f176eb778c5ccf952ca464698dba8a61b2e1e3f9b5" 6SRC_URI[sha256sum] = "7b146e12f28fbca3df7557f176eb778c5ccf952ca464698dba8a61b2e1e3f9b5"
14 7
15inherit autotools pkgconfig python3native ptest 8inherit python3native
16 9
17PACKAGECONFIG[tests] = "--enable-tests,--disable-tests,kmod udev glib-2.0 catch2" 10PACKAGECONFIG[tests] = "--enable-tests,--disable-tests,kmod udev glib-2.0 catch2"
18PACKAGECONFIG[cxx] = "--enable-bindings-cxx,--disable-bindings-cxx"
19PACKAGECONFIG[python3] = "--enable-bindings-python,--disable-bindings-python,python3" 11PACKAGECONFIG[python3] = "--enable-bindings-python,--disable-bindings-python,python3"
20 12
21# Enable cxx bindings by default.
22PACKAGECONFIG ?= "cxx \
23 ${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)}"
24
25# Always build tools - they don't have any additional 13# Always build tools - they don't have any additional
26# requirements over the library. 14# requirements over the library.
27EXTRA_OECONF = "--enable-tools" 15EXTRA_OECONF = "--enable-tools"
28 16
29DEPENDS += "autoconf-archive-native" 17PACKAGES =+ "${PN}-python"
30 18FILES:${PN}-tools += "${bindir}/gpiofind"
31PACKAGES =+ "${PN}-tools libgpiodcxx ${PN}-python"
32FILES:${PN}-tools = " \
33 ${bindir}/gpiodetect \
34 ${bindir}/gpioinfo \
35 ${bindir}/gpioget \
36 ${bindir}/gpioset \
37 ${bindir}/gpiofind \
38 ${bindir}/gpiomon \
39"
40FILES:${PN}-ptest += " \ 19FILES:${PN}-ptest += " \
41 ${bindir}/gpiod-test \
42 ${bindir}/gpio-tools-test \
43 ${bindir}/gpio-tools-test.bats \
44 ${bindir}/gpiod-cxx-test \
45 ${bindir}/gpiod_py_test.py \ 20 ${bindir}/gpiod_py_test.py \
46 ${libdir}/libgpiomockup.so.* \ 21 ${libdir}/libgpiomockup.so.* \
47" 22"
48FILES:libgpiodcxx = "${libdir}/libgpiodcxx.so.*"
49FILES:${PN}-python = "${PYTHON_SITEPACKAGES_DIR}/*.so" 23FILES:${PN}-python = "${PYTHON_SITEPACKAGES_DIR}/*.so"
50FILES:${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/*.a" 24FILES:${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/*.a"
51 25
52RRECOMMENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'python3', '${PN}-python', '', d)}" 26RRECOMMENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'python3', '${PN}-python', '', d)}"
53RRECOMMENDS:${PN}-ptest += " \ 27RRECOMMENDS:${PN}-ptest += " \
54 kernel-module-gpio-mockup \ 28 kernel-module-gpio-mockup \
55 coreutils \
56 ${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3-unittest', '', d)} \ 29 ${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3-unittest', '', d)} \
57" 30"
58RDEPENDS:${PN}-ptest += "bats python3-packaging" 31RDEPENDS:${PN}-ptest += "python3-packaging"
59
60do_install_ptest() {
61 install -d ${D}${PTEST_PATH}/tests
62
63 # These are the core C library tests
64 install -m 0755 ${B}/tests/.libs/gpiod-test ${D}${PTEST_PATH}/tests/
65
66 # Tools are always built so let's always install them for ptest even if
67 # we're not selecting libgpiod-tools.
68 install -m 0755 ${S}/tools/gpio-tools-test ${D}${PTEST_PATH}/tests/
69 install -m 0755 ${S}/tools/gpio-tools-test.bats ${D}${PTEST_PATH}/tests/
70 for tool in ${FILES:${PN}-tools}; do
71 install ${B}/tools/.libs/$(basename $tool) ${D}${PTEST_PATH}/tests/
72 done
73
74 if ${@bb.utils.contains('PACKAGECONFIG', 'cxx', 'true', 'false', d)}; then
75 install -m 0755 ${B}/bindings/cxx/tests/.libs/gpiod-cxx-test ${D}${PTEST_PATH}/tests/
76 fi
77 32
33do_install_ptest:append() {
78 if ${@bb.utils.contains('PACKAGECONFIG', 'python3', 'true', 'false', d)}; then 34 if ${@bb.utils.contains('PACKAGECONFIG', 'python3', 'true', 'false', d)}; then
79 install -m 0755 ${S}/bindings/python/tests/gpiod_py_test.py ${D}${PTEST_PATH}/tests/ 35 install -m 0755 ${S}/bindings/python/tests/gpiod_py_test.py ${D}${PTEST_PATH}/tests/
80 fi 36 fi