[meta-selinux][PATCH 09/12] net-tools: fix selinux build


Yi Zhao
 

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@...>
---
recipes-extended/net-tools/net-tools_selinux.inc | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/recipes-extended/net-tools/net-tools_selinux.inc b/recipes-extended/net-tools/net-tools_selinux.inc
index 1bcf7be..6454205 100644
--- a/recipes-extended/net-tools/net-tools_selinux.inc
+++ b/recipes-extended/net-tools/net-tools_selinux.inc
@@ -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
+}
--
2.25.1

Join yocto@lists.yoctoproject.org to automatically receive all group messages.