Andrew Geissler | fc113ea | 2023-03-31 09:59:46 -0500 | [diff] [blame] | 1 | SUMMARY = "YANG data modeling language library" |
| 2 | DESCRIPTION = "libyang is a YANG data modelling language parser and toolkit written (and providing API) in C." |
| 3 | HOMEPAGE = "https://github.com/CESNET/libyang" |
| 4 | SECTION = "libs" |
| 5 | LICENSE = "BSD-3-Clause" |
| 6 | |
| 7 | LIC_FILES_CHKSUM = "file://LICENSE;md5=f3916d7d8d42a6508d0ea418cfff10ad" |
| 8 | |
| 9 | SRCREV = "9a4e5b2ce30b9696116d6e654ee55caab5aafed8" |
| 10 | |
| 11 | SRC_URI = "git://github.com/CESNET/libyang.git;branch=master;protocol=https \ |
| 12 | file://0001-test_context-skip-test-case-test_searchdirs.patch \ |
| 13 | file://run-ptest \ |
| 14 | " |
| 15 | |
| 16 | S = "${WORKDIR}/git" |
| 17 | |
| 18 | # Main dependencies |
Andrew Geissler | 8f84068 | 2023-07-21 09:09:43 -0500 | [diff] [blame] | 19 | inherit cmake pkgconfig lib_package ptest multilib_header |
Andrew Geissler | fc113ea | 2023-03-31 09:59:46 -0500 | [diff] [blame] | 20 | DEPENDS = "libpcre2" |
| 21 | DEPENDS += "${@bb.utils.contains('PTEST_ENABLED', '1', 'cmocka', '', d)}" |
| 22 | |
| 23 | EXTRA_OECMAKE = "-DCMAKE_BUILD_TYPE=Release" |
| 24 | EXTRA_OECMAKE += " ${@bb.utils.contains('PTEST_ENABLED', '1', '-DENABLE_TESTS=ON -DENABLE_VALGRIND_TESTS=OFF', '', d)}" |
| 25 | |
| 26 | do_compile:prepend () { |
| 27 | if [ ${PTEST_ENABLED} = "1" ]; then |
| 28 | sed -i -e 's|${S}|${PTEST_PATH}|g' ${B}/tests/tests_config.h |
| 29 | sed -i -e 's|${B}|${PTEST_PATH}|g' ${B}/tests/tests_config.h |
| 30 | fi |
| 31 | } |
| 32 | |
Andrew Geissler | 8f84068 | 2023-07-21 09:09:43 -0500 | [diff] [blame] | 33 | do_install:append () { |
| 34 | oe_multilib_header libyang/config.h |
| 35 | } |
| 36 | |
Andrew Geissler | fc113ea | 2023-03-31 09:59:46 -0500 | [diff] [blame] | 37 | do_install_ptest () { |
| 38 | install -d ${D}${PTEST_PATH}/tests |
| 39 | cp -f ${B}/tests/utest_* ${D}${PTEST_PATH}/tests/ |
| 40 | cp -fR ${S}/tests/modules ${D}${PTEST_PATH}/tests/ |
| 41 | install -d ${D}${PTEST_PATH}/tests/plugins |
| 42 | cp -f ${B}/tests/plugins/plugin_*.so ${D}${PTEST_PATH}/tests/plugins/ |
| 43 | } |
| 44 | |
| 45 | FILES:${PN} += "${datadir}/yang/*" |