net-tools: fix selinux build

Simply adding EXTRA_OEMAKE doesn't work for selinux build. We need to
modify config files in do_configure.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
This commit is contained in:
Yi Zhao 2021-08-19 12:47:05 +08:00 committed by Joe MacDonald
parent 4e07344695
commit 1fda4b3a75

View File

@ -1,5 +1,10 @@
inherit selinux inherit enable-selinux
DEPENDS += "${LIBSELINUX}" PACKAGECONFIG[selinux] = ",,libselinux"
EXTRA_OEMAKE += "${@target_selinux(d, 'HAVE_SELINUX=1', 'HAVE_SELINUX=0')}" do_configure:append() {
if ${@bb.utils.contains('PACKAGECONFIG', 'selinux', 'true', 'false', d)} ; then
echo "#define HAVE_SELINUX 1" >> ${S}/config.h
echo "HAVE_SELINUX=1" >> ${S}/config.make
fi
}