diff options
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.bb | 56 |
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 @@ | |||
| 1 | SUMMARY = "C library and tools for interacting with the linux GPIO character device" | 1 | require libgpiod.inc |
| 2 | AUTHOR = "Bartosz Golaszewski <brgl@bgdev.pl>" | ||
| 3 | 2 | ||
| 4 | LICENSE = "LGPL-2.1-or-later" | 3 | LICENSE = "LGPL-2.1-or-later" |
| 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=2caced0b25dfefd4c601d92bd15116de" | 4 | LIC_FILES_CHKSUM = "file://COPYING;md5=2caced0b25dfefd4c601d92bd15116de" |
| 6 | 5 | ||
| 7 | SRC_URI = " \ | ||
| 8 | https://www.kernel.org/pub/software/libs/${BPN}/${BP}.tar.xz \ | ||
| 9 | file://run-ptest \ | ||
| 10 | " | ||
| 11 | |||
| 12 | SRC_URI[md5sum] = "7a2cca6ead9296c27e877070dd8853bc" | ||
| 13 | SRC_URI[sha256sum] = "7b146e12f28fbca3df7557f176eb778c5ccf952ca464698dba8a61b2e1e3f9b5" | 6 | SRC_URI[sha256sum] = "7b146e12f28fbca3df7557f176eb778c5ccf952ca464698dba8a61b2e1e3f9b5" |
| 14 | 7 | ||
| 15 | inherit autotools pkgconfig python3native ptest | 8 | inherit python3native |
| 16 | 9 | ||
| 17 | PACKAGECONFIG[tests] = "--enable-tests,--disable-tests,kmod udev glib-2.0 catch2" | 10 | PACKAGECONFIG[tests] = "--enable-tests,--disable-tests,kmod udev glib-2.0 catch2" |
| 18 | PACKAGECONFIG[cxx] = "--enable-bindings-cxx,--disable-bindings-cxx" | ||
| 19 | PACKAGECONFIG[python3] = "--enable-bindings-python,--disable-bindings-python,python3" | 11 | PACKAGECONFIG[python3] = "--enable-bindings-python,--disable-bindings-python,python3" |
| 20 | 12 | ||
| 21 | # Enable cxx bindings by default. | ||
| 22 | PACKAGECONFIG ?= "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. |
| 27 | EXTRA_OECONF = "--enable-tools" | 15 | EXTRA_OECONF = "--enable-tools" |
| 28 | 16 | ||
| 29 | DEPENDS += "autoconf-archive-native" | 17 | PACKAGES =+ "${PN}-python" |
| 30 | 18 | FILES:${PN}-tools += "${bindir}/gpiofind" | |
| 31 | PACKAGES =+ "${PN}-tools libgpiodcxx ${PN}-python" | ||
| 32 | FILES:${PN}-tools = " \ | ||
| 33 | ${bindir}/gpiodetect \ | ||
| 34 | ${bindir}/gpioinfo \ | ||
| 35 | ${bindir}/gpioget \ | ||
| 36 | ${bindir}/gpioset \ | ||
| 37 | ${bindir}/gpiofind \ | ||
| 38 | ${bindir}/gpiomon \ | ||
| 39 | " | ||
| 40 | FILES:${PN}-ptest += " \ | 19 | FILES:${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 | " |
| 48 | FILES:libgpiodcxx = "${libdir}/libgpiodcxx.so.*" | ||
| 49 | FILES:${PN}-python = "${PYTHON_SITEPACKAGES_DIR}/*.so" | 23 | FILES:${PN}-python = "${PYTHON_SITEPACKAGES_DIR}/*.so" |
| 50 | FILES:${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/*.a" | 24 | FILES:${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/*.a" |
| 51 | 25 | ||
| 52 | RRECOMMENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'python3', '${PN}-python', '', d)}" | 26 | RRECOMMENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'python3', '${PN}-python', '', d)}" |
| 53 | RRECOMMENDS:${PN}-ptest += " \ | 27 | RRECOMMENDS:${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 | " |
| 58 | RDEPENDS:${PN}-ptest += "bats python3-packaging" | 31 | RDEPENDS:${PN}-ptest += "python3-packaging" |
| 59 | |||
| 60 | do_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 | ||
| 33 | do_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 |
