diff options
Diffstat (limited to 'meta-openembedded/meta-oe/recipes-extended/libyang/libyang_2.1.55.bb')
-rw-r--r-- | meta-openembedded/meta-oe/recipes-extended/libyang/libyang_2.1.55.bb | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/meta-openembedded/meta-oe/recipes-extended/libyang/libyang_2.1.55.bb b/meta-openembedded/meta-oe/recipes-extended/libyang/libyang_2.1.55.bb new file mode 100644 index 0000000000..b1438c3b2b --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-extended/libyang/libyang_2.1.55.bb @@ -0,0 +1,41 @@ +SUMMARY = "YANG data modeling language library" +DESCRIPTION = "libyang is a YANG data modelling language parser and toolkit written (and providing API) in C." +HOMEPAGE = "https://github.com/CESNET/libyang" +SECTION = "libs" +LICENSE = "BSD-3-Clause" + +LIC_FILES_CHKSUM = "file://LICENSE;md5=f3916d7d8d42a6508d0ea418cfff10ad" + +SRCREV = "9a4e5b2ce30b9696116d6e654ee55caab5aafed8" + +SRC_URI = "git://github.com/CESNET/libyang.git;branch=master;protocol=https \ + file://0001-test_context-skip-test-case-test_searchdirs.patch \ + file://run-ptest \ + " + +S = "${WORKDIR}/git" + +# Main dependencies +inherit cmake pkgconfig lib_package ptest +DEPENDS = "libpcre2" +DEPENDS += "${@bb.utils.contains('PTEST_ENABLED', '1', 'cmocka', '', d)}" + +EXTRA_OECMAKE = "-DCMAKE_BUILD_TYPE=Release" +EXTRA_OECMAKE += " ${@bb.utils.contains('PTEST_ENABLED', '1', '-DENABLE_TESTS=ON -DENABLE_VALGRIND_TESTS=OFF', '', d)}" + +do_compile:prepend () { + if [ ${PTEST_ENABLED} = "1" ]; then + sed -i -e 's|${S}|${PTEST_PATH}|g' ${B}/tests/tests_config.h + sed -i -e 's|${B}|${PTEST_PATH}|g' ${B}/tests/tests_config.h + fi +} + +do_install_ptest () { + install -d ${D}${PTEST_PATH}/tests + cp -f ${B}/tests/utest_* ${D}${PTEST_PATH}/tests/ + cp -fR ${S}/tests/modules ${D}${PTEST_PATH}/tests/ + install -d ${D}${PTEST_PATH}/tests/plugins + cp -f ${B}/tests/plugins/plugin_*.so ${D}${PTEST_PATH}/tests/plugins/ +} + +FILES:${PN} += "${datadir}/yang/*" |