summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/glib-2.0/glib.inc
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2019-02-20 21:10:26 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-02-25 12:35:01 +0000
commite185235dd97510bfdc621cef9c18d8d13b16006d (patch)
treea37770aff3ae87efba6dfcaadbdaa9c8d596dbd9 /meta/recipes-core/glib-2.0/glib.inc
parent8fb16df2e6977bb3508239eb8d447b8c5401d5ed (diff)
downloadopenembedded-core-contrib-e185235dd97510bfdc621cef9c18d8d13b16006d.tar.gz
glib-2.0: convert from autotools to meson
PRINTF settings no longer seem necessary (tested with mingw). Add meson-specific bits to Enable-more-tests-while-cross-compiling.patch and 0001-Install-gio-querymodules-as-libexec_PROGRAM.patch Add 0001-Set-host_machine-correctly-when-building-with-mingw3.patch to allow 'mingw32' as target machine in addition to 'windows'. Add 0001-meson.build-do-not-hardcode-linux-as-the-host-system.patch to correct ARM build errors. Drop configure-libtool.patch (autotools-specific). Fix API docs generation Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/glib-2.0/glib.inc')
-rw-r--r--meta/recipes-core/glib-2.0/glib.inc41
1 files changed, 27 insertions, 14 deletions
diff --git a/meta/recipes-core/glib-2.0/glib.inc b/meta/recipes-core/glib-2.0/glib.inc
index a186c1d9eb..6305f553b4 100644
--- a/meta/recipes-core/glib-2.0/glib.inc
+++ b/meta/recipes-core/glib-2.0/glib.inc
@@ -29,7 +29,17 @@ 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 distro_features_check
+inherit meson gettext gtk-doc pkgconfig ptest-gnome upstream-version-is-even bash-completion gio-module-cache manpages distro_features_check
+
+GTKDOC_ENABLE_FLAG = "-Dgtk_doc=true"
+GTKDOC_DISABLE_FLAG = "-Dgtk_doc=false"
+
+EXTRA_OEMESON_append_class-target = " ${@bb.utils.contains('GTKDOC_ENABLED', 'True', '${GTKDOC_ENABLE_FLAG}', \
+ '${GTKDOC_DISABLE_FLAG}', d)} "
+
+# 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
REQUIRED_DISTRO_FEATURES_libc-glibc = "${@'libc-charsets libc-locale-code libc-locales' if bb.utils.contains('DISTRO_FEATURES', 'ptest', True, False, d) else ''}"
@@ -37,21 +47,17 @@ S = "${WORKDIR}/glib-${PV}"
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"
+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"
-CORECONF = "--disable-dtrace --disable-fam --disable-systemtap"
+CORECONF = "-Ddtrace=false -Dfam=false -Dsystemtap=false -Dselinux=false"
-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"
-
-# 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 = "${CORECONF} ${@bb.utils.contains('PTEST_ENABLED', '1', '-Dinstalled_tests=true', '-Dinstalled_tests=false', d)}"
+EXTRA_OEMESON_class-native = "${CORECONF} -Dinstalled_tests=false"
+EXTRA_OEMESON_class-nativesdk = "${CORECONF} -Dinstalled_tests=false"
do_configure_prepend() {
sed -i -e '1s,#!.*,#!${USRBINPATH}/env python3,' ${S}/gio/gdbus-2.0/codegen/gdbus-codegen.in
@@ -117,6 +123,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 () {
@@ -129,6 +137,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 = ""