meson-selinux.bbclass: add for meson build system

Add meson-selinux.bbclass for meson build system. It used
'-Dselinux=true/false' to enable/disable 'selinux' rather than
--enable-selinux or --with-selinux.

Inherit meson-selinux for glib-2.0 to fix configure failure.

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
This commit is contained in:
Kai Kang 2019-03-11 01:52:00 -04:00 committed by Joe MacDonald
parent 780038798b
commit eafe868098
2 changed files with 5 additions and 1 deletions

View File

@ -0,0 +1,4 @@
inherit selinux
PACKAGECONFIG_append = " ${@target_selinux(d)}"
PACKAGECONFIG[selinux] = "-Dselinux=true,-Dselinux=false,libselinux,"

View File

@ -1 +1 @@
inherit ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'enable-selinux', '', d)}
inherit ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'meson-selinux', '', d)}