diff options
Diffstat (limited to 'meta-openembedded/meta-oe/recipes-support/libgpiod/libgpiod_1.6.3.bb')
-rw-r--r-- | meta-openembedded/meta-oe/recipes-support/libgpiod/libgpiod_1.6.3.bb | 57 |
1 files changed, 45 insertions, 12 deletions
diff --git a/meta-openembedded/meta-oe/recipes-support/libgpiod/libgpiod_1.6.3.bb b/meta-openembedded/meta-oe/recipes-support/libgpiod/libgpiod_1.6.3.bb index d9c251705..be5be2f8d 100644 --- a/meta-openembedded/meta-oe/recipes-support/libgpiod/libgpiod_1.6.3.bb +++ b/meta-openembedded/meta-oe/recipes-support/libgpiod/libgpiod_1.6.3.bb @@ -1,11 +1,12 @@ SUMMARY = "C library and tools for interacting with the linux GPIO character device" -AUTHOR = "Bartosz Golaszewski <bgolaszewski@baylibre.com>" +AUTHOR = "Bartosz Golaszewski <brgl@bgdev.pl>" LICENSE = "LGPLv2.1+" LIC_FILES_CHKSUM = "file://COPYING;md5=2caced0b25dfefd4c601d92bd15116de" -SRC_URI = "https://www.kernel.org/pub/software/libs/${BPN}/${BP}.tar.xz \ - file://run-ptest \ +SRC_URI = " \ + https://www.kernel.org/pub/software/libs/${BPN}/${BP}.tar.xz \ + file://run-ptest \ " SRC_URI[md5sum] = "28e79f6f70fee1da9079558d8b7b3736" @@ -13,7 +14,7 @@ SRC_URI[sha256sum] = "841be9d788f00bab08ef22c4be5c39866f0e46cb100a3ae49ed816ac9c inherit autotools pkgconfig python3native ptest -PACKAGECONFIG[tests] = "--enable-tests,--disable-tests,kmod udev glib-2.0 catch2" +PACKAGECONFIG[tests] = "--enable-tests,--disable-tests,kmod udev glib-2.0 catch2,bats python3-packaging" PACKAGECONFIG[cxx] = "--enable-bindings-cxx,--disable-bindings-cxx" PACKAGECONFIG[python3] = "--enable-bindings-python,--disable-bindings-python,python3" @@ -26,19 +27,51 @@ EXTRA_OECONF = "--enable-tools" DEPENDS += "autoconf-archive-native" -PACKAGES =+ "${PN}-tools libgpiodcxx" -FILES_${PN}-tools = "${bindir}/*" +PACKAGES =+ "${PN}-tools libgpiodcxx ${PN}-python" +FILES_${PN}-tools = " \ + ${bindir}/gpiodetect \ + ${bindir}/gpioinfo \ + ${bindir}/gpioget \ + ${bindir}/gpioset \ + ${bindir}/gpiofind \ + ${bindir}/gpiomon \ +" +FILES_${PN}-ptest += " \ + ${bindir}/gpiod-test \ + ${bindir}/gpio-tools-test \ + ${bindir}/gpio-tools-test.bats \ + ${bindir}/gpiod-cxx-test \ + ${bindir}/gpiod_py_test.py \ + ${libdir}/libgpiomockup.so.* \ +" FILES_libgpiodcxx = "${libdir}/libgpiodcxx.so.*" - -PACKAGES =+ "${PN}-python" FILES_${PN}-python = "${PYTHON_SITEPACKAGES_DIR}/*.so" FILES_${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/*.a" -RRECOMMENDS_PYTHON = "${@bb.utils.contains('PACKAGECONFIG', 'python3', '${PN}-python', '',d)}" -RRECOMMENDS_${PN}-python += "${RRECOMMENDS_PYTHON}" + +RRECOMMENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'python3', '${PN}-python', '', d)}" +RRECOMMENDS_${PN}-ptest += "kernel-module-gpio-mockup" PACKAGECONFIG_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'tests', '', d)}" do_install_ptest() { - install -d ${D}${PTEST_PATH}/tests - cp ${B}/tests/.libs/gpiod-test ${D}${PTEST_PATH}/tests/ + install -d ${D}${PTEST_PATH}/tests + + # These are the core C library tests + install -m 0755 ${B}/tests/.libs/gpiod-test ${D}${PTEST_PATH}/tests/ + + # Tools are always built so let's always install them for ptest even if + # we're not selecting libgpiod-tools. + install -m 0755 ${S}/tools/gpio-tools-test ${D}${PTEST_PATH}/tests/ + install -m 0755 ${S}/tools/gpio-tools-test.bats ${D}${PTEST_PATH}/tests/ + for tool in ${FILES_${PN}-tools}; do + install ${B}/tools/.libs/$(basename $tool) ${D}${PTEST_PATH}/tests/ + done + + if ${@bb.utils.contains('PACKAGECONFIG', 'cxx', 'true', 'false', d)}; then + install -m 0755 ${B}/bindings/cxx/tests/.libs/gpiod-cxx-test ${D}${PTEST_PATH}/tests/ + fi + + if ${@bb.utils.contains('PACKAGECONFIG', 'python3', 'true', 'false', d)}; then + install -m 0755 ${S}/bindings/python/tests/gpiod_py_test.py ${D}${PTEST_PATH}/tests/ + fi } |