From e185235dd97510bfdc621cef9c18d8d13b16006d Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Wed, 20 Feb 2019 21:10:26 +0100 Subject: 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 Signed-off-by: Richard Purdie --- meta/recipes-core/glib-2.0/glib.inc | 41 ++++++++++++++++++++++++------------- 1 file changed, 27 insertions(+), 14 deletions(-) (limited to 'meta/recipes-core/glib-2.0/glib.inc') 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 = "" -- cgit 1.2.3-korg