summaryrefslogtreecommitdiffstats
path: root/poky/meta/recipes-core/glib-2.0/glib.inc
diff options
context:
space:
mode:
Diffstat (limited to 'poky/meta/recipes-core/glib-2.0/glib.inc')
-rw-r--r--poky/meta/recipes-core/glib-2.0/glib.inc59
1 files changed, 35 insertions, 24 deletions
diff --git a/poky/meta/recipes-core/glib-2.0/glib.inc b/poky/meta/recipes-core/glib-2.0/glib.inc
index e8215da58..574bb3855 100644
--- a/poky/meta/recipes-core/glib-2.0/glib.inc
+++ b/poky/meta/recipes-core/glib-2.0/glib.inc
@@ -22,34 +22,38 @@ DEPENDS = "glib-2.0-native \
virtual/libintl \
virtual/libiconv \
libffi \
- zlib \
- ${@bb.utils.contains('PTEST_ENABLED', '1', 'dbus', '', d)}"
+ zlib"
PACKAGES += "${PN}-codegen ${PN}-utils"
LEAD_SONAME = "libglib-2.0.*"
-inherit autotools gettext gtk-doc pkgconfig ptest-gnome upstream-version-is-even bash-completion gio-module-cache manpages
+inherit meson gettext gtk-doc pkgconfig ptest-gnome upstream-version-is-even bash-completion gio-module-cache manpages distro_features_check
-S = "${WORKDIR}/glib-${PV}"
+GTKDOC_ENABLE_FLAG = "-Dgtk_doc=true"
+GTKDOC_DISABLE_FLAG = "-Dgtk_doc=false"
-PACKAGECONFIG ??= "system-pcre libmount"
-# To use the system pcre it must be configured with --enable-unicode-properties
-PACKAGECONFIG[system-pcre] = "--with-pcre=system,--with-pcre=internal,libpcre"
-PACKAGECONFIG[libmount] = "--enable-libmount,--disable-libmount,util-linux"
-PACKAGECONFIG[manpages] = "--enable-man --with-xml-catalog=${STAGING_ETCDIR_NATIVE}/xml/catalog.xml, --disable-man, libxslt-native xmlto-native"
-PACKAGECONFIG[libelf] = "--enable-libelf,--disable-libelf,elfutils"
+EXTRA_OEMESON_append_class-target = " ${@bb.utils.contains('GTKDOC_ENABLED', 'True', '${GTKDOC_ENABLE_FLAG}', \
+ '${GTKDOC_DISABLE_FLAG}', d)} "
-CORECONF = "--disable-dtrace --disable-fam --disable-systemtap"
+# This avoids the need to depend on target python3, which in case of mingw is not even possible.
+# meson's python configuration pokes into python3 configuration, so this provides the native config to it.
+unset _PYTHON_SYSCONFIGDATA_NAME
-PRINTF = "--enable-included-printf=no"
-PRINTF_darwin = "--enable-included-printf=yes"
-PRINTF_mingw32 = "--enable-included-printf=yes"
-EXTRA_OECONF = "${PRINTF} ${CORECONF}"
-EXTRA_OECONF_class-native = "${CORECONF} --disable-selinux"
+S = "${WORKDIR}/glib-${PV}"
+
+PACKAGECONFIG ??= "system-pcre libmount \
+ ${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)}"
+# To use the system pcre it must be configured with --enable-unicode-properties
+PACKAGECONFIG[system-pcre] = "-Dinternal_pcre=false,-Dinternal_pcre=true,libpcre"
+PACKAGECONFIG[libmount] = "-Dlibmount=true,-Dlibmount=false,util-linux"
+PACKAGECONFIG[manpages] = "-Dman=true, -Dman=false, libxslt-native xmlto-native"
+# libelf is auto-detected without a configuration option
+PACKAGECONFIG[libelf] = ",,elfutils"
+PACKAGECONFIG[tests] = "-Dinstalled_tests=true,-Dinstalled_tests=false,dbus"
-# Tell configure that we'll have dbus-daemon on the target for the tests
-EXTRA_OECONF_append_class-target = " ${@bb.utils.contains('PTEST_ENABLED', '1', ' ac_cv_prog_DBUS_DAEMON=dbus-daemon', '', d)}"
+EXTRA_OEMESON = "-Ddtrace=false -Dfam=false -Dsystemtap=false -Dselinux=false"
+EXTRA_OEMESON_append_class-target = " --cross-file ${WORKDIR}/glib-meson.cross"
do_configure_prepend() {
sed -i -e '1s,#!.*,#!${USRBINPATH}/env python3,' ${S}/gio/gdbus-2.0/codegen/gdbus-codegen.in
@@ -75,9 +79,12 @@ FILES_${PN}-codegen = "${datadir}/glib-2.0/codegen/*.py \
${bindir}/gdbus-codegen"
FILES_${PN}-utils = "${bindir}/*"
-RRECOMMENDS_${PN} += "shared-mime-info"
+SHAREDMIMEDEP = "shared-mime-info"
+SHAREDMIMEDEP_class-native = ""
# When cross compiling for Windows we don't want to include this
-RRECOMMENDS_${PN}_remove_mingw32 = "shared-mime-info"
+SHAREDMIMEDEP_mingw32 = ""
+
+RRECOMMENDS_${PN} += "${SHAREDMIMEDEP}"
ARM_INSTRUCTION_SET_armv4 = "arm"
ARM_INSTRUCTION_SET_armv5 = "arm"
@@ -112,6 +119,8 @@ do_install_append () {
if test "x${MLPREFIX}" != "x"; then
mv ${D}${libexecdir}/gio-querymodules${EXEEXT} ${D}${libexecdir}/${MLPREFIX}gio-querymodules${EXEEXT}
fi
+ # Autotools does this, meson does not
+ mkdir -p ${D}${libdir}/gio/modules
}
do_install_append_class-target () {
@@ -124,6 +133,11 @@ do_install_append_class-target () {
fi
}
+# As we do not build python3 for windows, makes no sense to ship the script that's using it
+do_install_append_mingw32() {
+ rm -f ${D}${bindir}/gtester-report
+}
+
CODEGEN_PYTHON_RDEPENDS = "python3 python3-distutils python3-xml"
CODEGEN_PYTHON_RDEPENDS_mingw32 = ""
@@ -140,8 +154,6 @@ RDEPENDS_${PN}-ptest += "\
shared-mime-info \
"
-# When https://gitlab.gnome.org/GNOME/glib/issues/1343 is
-# fixed add locale-base-pl-pl
RDEPENDS_${PN}-ptest_append_libc-glibc = "\
glibc-gconv-utf-16 \
glibc-charmap-utf-8 \
@@ -165,6 +177,5 @@ RDEPENDS_${PN}-ptest_append_libc-glibc = "\
locale-base-fr-fr \
locale-base-es-es \
locale-base-en-gb \
+ locale-base-pl-pl \
"
-
-INSANE_SKIP_${PN}-ptest += "libdir"
OpenPOWER on IntegriCloud