Skip to contentSkip to conversation

glib-2.0: fix configure error for meson build

PATCH In review Yi Zhao 2 participants 3 messages Jun 12, 2019 – Jun 13, 2019 Arm/Amlogic Meson SoC support

lore
Share & tools
lore

Yi Zhao

author
#0 lore raw

PATCH 1/1 glib-2.0: fix configure error for meson build

In glib 2.60.x, it turns selinux into a meson feature. We should use '-Dselinux=enabled/disabled' rather than '-Dselinux=true/false' to enable/disable the feature.

Add meso-enable-selinux.bbclass for this change and inherit it in glib-2.0 bbappend to fix the configure error.

---
 classes/meson-enable-selinux.bbclass      | 4 ++++
 recipes-core/glib-2.0/glib-2.0_%.bbappend | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)
 create mode 100644 classes/meson-enable-selinux.bbclass
classes/meson-enable-selinux.bbclass new file +4 -0
new file mode 100644
index 0000000..91c2a2b
@@ -0,0 +1,4 @@
+inherit selinux
+
+PACKAGECONFIG_append = " ${@target_selinux(d)}"
+PACKAGECONFIG[selinux] = "-Dselinux=enabled,-Dselinux=disabled,libselinux,"
recipes-core/glib-2.0/glib-2.0_%.bbappend +1 -1
index e5d2f6f..39a0a3a 100644
@@ -1 +1 @@
-inherit ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'meson-selinux', '', d)}
+inherit ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'meson-enable-selinux', '', d)}
Signature · 1 line
2.7.4
#1 lore raw
Quoted 3 lines · Yi Zhao

+PACKAGECONFIG[selinux] = "-Dselinux=enabled,-Dselinux=disabled,libselinux,"

This line should probably go into the oe-core recipe? It is fine to have options that depend on things absent in oe-core, as long as those options are disabled by default.

Alex

author
#2 lore raw
Quoted 7 lines · Alexander Kanavin

On Wed, 12 Jun 2019 at 09:54, Yi Zhao <[email protected] <mailto:[email protected]>> wrote:

+PACKAGECONFIG[selinux] = "-Dselinux=enabled,-Dselinux=disabled,libselinux,"

This line should probably go into the oe-core recipe? It is fine to have options that depend on things absent in oe-core, as long as those options are disabled by default.

Thanks. I will test it and send a patch to oe-core

//Yi

Quoted 2 lines

Alex