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

Signed-off-by: Yi Zhao <[email protected]>
---
 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

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#54504): https://lists.yoctoproject.org/g/yocto/message/54504
Mute This Topic: https://lists.yoctoproject.org/mt/84990069/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to