Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame^] | 1 | SUMMARY = "Library for low-level interaction with nftables Netlink's API over libmnl" |
| 2 | LICENSE = "GPLv2" |
| 3 | LIC_FILES_CHKSUM = "file://COPYING;md5=79808397c3355f163c012616125c9e26" |
| 4 | SECTION = "libs" |
| 5 | DEPENDS = "libmnl" |
| 6 | |
| 7 | SRCREV = "09456c720e9c00eecc08e41ac6b7c291b3821ee5" |
| 8 | SRC_URI = "git://git.netfilter.org/libnftnl;branch=master \ |
| 9 | file://0001-avoid-naming-local-function-as-one-of-printf-family.patch \ |
| 10 | file://0001-configure.ac-Add-serial-tests.patch \ |
| 11 | file://run-ptest \ |
| 12 | " |
| 13 | |
| 14 | S = "${WORKDIR}/git" |
| 15 | |
| 16 | inherit autotools pkgconfig ptest |
| 17 | |
| 18 | RDEPENDS:${PN}-ptest += " bash python3-core make" |
| 19 | |
| 20 | TESTDIR = "tests" |
| 21 | |
| 22 | do_compile_ptest() { |
| 23 | cp -rf ${S}/build-aux . |
| 24 | oe_runmake buildtest-TESTS |
| 25 | } |
| 26 | |
| 27 | do_install_ptest() { |
| 28 | cp -rf ${B}/build-aux ${D}${PTEST_PATH} |
| 29 | install -d ${D}${PTEST_PATH}/${TESTDIR} |
| 30 | cp -rf ${B}/${TESTDIR}/Makefile ${D}${PTEST_PATH}/${TESTDIR} |
| 31 | |
| 32 | # the binaries compiled in ${TESTDIR} will look for a compiler to |
| 33 | # use, which will cause failures. Substitute the binaries in |
| 34 | # ${TESTDIR}/.libs instead |
| 35 | cp -rf ${B}/${TESTDIR}/.libs/* ${D}${PTEST_PATH}/${TESTDIR} |
| 36 | |
| 37 | # Alter the Makefile so that it does not try and rebuild anything in |
| 38 | # other nonexistent paths before running the actual tests |
| 39 | sed -i 's/^Makefile/_Makefile/' ${D}${PTEST_PATH}/${TESTDIR}/Makefile |
| 40 | } |
| 41 | |