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:59 +0000
commita3ebd8a19de79c0dbd83a8430acfcffadbda48e7 (patch)
tree4cffcb52e5f62c8685938e8d2d8428bb23c04856 /meta/recipes-core/glib-2.0/glib.inc
parentce0d8dbbf01960a13e5883fa036acef346c56c85 (diff)
downloadpoky-a3ebd8a19de79c0dbd83a8430acfcffadbda48e7.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 (From OE-Core rev: e185235dd97510bfdc621cef9c18d8d13b16006d) 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"
29 29
30LEAD_SONAME = "libglib-2.0.*" 30LEAD_SONAME = "libglib-2.0.*"
31 31
32inherit autotools gettext gtk-doc pkgconfig ptest-gnome upstream-version-is-even bash-completion gio-module-cache manpages distro_features_check 32inherit meson gettext gtk-doc pkgconfig ptest-gnome upstream-version-is-even bash-completion gio-module-cache manpages distro_features_check
33
34GTKDOC_ENABLE_FLAG = "-Dgtk_doc=true"
35GTKDOC_DISABLE_FLAG = "-Dgtk_doc=false"
36
37EXTRA_OEMESON_append_class-target = " ${@bb.utils.contains('GTKDOC_ENABLED', 'True', '${GTKDOC_ENABLE_FLAG}', \
38 '${GTKDOC_DISABLE_FLAG}', d)} "
39
40# This avoids the need to depend on target python3, which in case of mingw is not even possible.
41# meson's python configuration pokes into python3 configuration, so this provides the native config to it.
42unset _PYTHON_SYSCONFIGDATA_NAME
33 43
34REQUIRED_DISTRO_FEATURES_libc-glibc = "${@'libc-charsets libc-locale-code libc-locales' if bb.utils.contains('DISTRO_FEATURES', 'ptest', True, False, d) else ''}" 44REQUIRED_DISTRO_FEATURES_libc-glibc = "${@'libc-charsets libc-locale-code libc-locales' if bb.utils.contains('DISTRO_FEATURES', 'ptest', True, False, d) else ''}"
35 45
@@ -37,21 +47,17 @@ S = "${WORKDIR}/glib-${PV}"
37 47
38PACKAGECONFIG ??= "system-pcre libmount" 48PACKAGECONFIG ??= "system-pcre libmount"
39# To use the system pcre it must be configured with --enable-unicode-properties 49# To use the system pcre it must be configured with --enable-unicode-properties
40PACKAGECONFIG[system-pcre] = "--with-pcre=system,--with-pcre=internal,libpcre" 50PACKAGECONFIG[system-pcre] = "-Dinternal_pcre=false,-Dinternal_pcre=true,libpcre"
41PACKAGECONFIG[libmount] = "--enable-libmount,--disable-libmount,util-linux" 51PACKAGECONFIG[libmount] = "-Dlibmount=true,-Dlibmount=false,util-linux"
42PACKAGECONFIG[manpages] = "--enable-man --with-xml-catalog=${STAGING_ETCDIR_NATIVE}/xml/catalog.xml, --disable-man, libxslt-native xmlto-native" 52PACKAGECONFIG[manpages] = "-Dman=true, -Dman=false, libxslt-native xmlto-native"
43PACKAGECONFIG[libelf] = "--enable-libelf,--disable-libelf,elfutils" 53# libelf is auto-detected without a configuration option
54PACKAGECONFIG[libelf] = ",,elfutils"
44 55
45CORECONF = "--disable-dtrace --disable-fam --disable-systemtap" 56CORECONF = "-Ddtrace=false -Dfam=false -Dsystemtap=false -Dselinux=false"
46 57
47PRINTF = "--enable-included-printf=no" 58EXTRA_OEMESON = "${CORECONF} ${@bb.utils.contains('PTEST_ENABLED', '1', '-Dinstalled_tests=true', '-Dinstalled_tests=false', d)}"
48PRINTF_darwin = "--enable-included-printf=yes" 59EXTRA_OEMESON_class-native = "${CORECONF} -Dinstalled_tests=false"
49PRINTF_mingw32 = "--enable-included-printf=yes" 60EXTRA_OEMESON_class-nativesdk = "${CORECONF} -Dinstalled_tests=false"
50EXTRA_OECONF = "${PRINTF} ${CORECONF}"
51EXTRA_OECONF_class-native = "${CORECONF} --disable-selinux"
52
53# Tell configure that we'll have dbus-daemon on the target for the tests
54EXTRA_OECONF_append_class-target = " ${@bb.utils.contains('PTEST_ENABLED', '1', ' ac_cv_prog_DBUS_DAEMON=dbus-daemon', '', d)}"
55 61
56do_configure_prepend() { 62do_configure_prepend() {
57 sed -i -e '1s,#!.*,#!${USRBINPATH}/env python3,' ${S}/gio/gdbus-2.0/codegen/gdbus-codegen.in 63 sed -i -e '1s,#!.*,#!${USRBINPATH}/env python3,' ${S}/gio/gdbus-2.0/codegen/gdbus-codegen.in
@@ -117,6 +123,8 @@ do_install_append () {
117 if test "x${MLPREFIX}" != "x"; then 123 if test "x${MLPREFIX}" != "x"; then
118 mv ${D}${libexecdir}/gio-querymodules${EXEEXT} ${D}${libexecdir}/${MLPREFIX}gio-querymodules${EXEEXT} 124 mv ${D}${libexecdir}/gio-querymodules${EXEEXT} ${D}${libexecdir}/${MLPREFIX}gio-querymodules${EXEEXT}
119 fi 125 fi
126 # Autotools does this, meson does not
127 mkdir -p ${D}${libdir}/gio/modules
120} 128}
121 129
122do_install_append_class-target () { 130do_install_append_class-target () {
@@ -129,6 +137,11 @@ do_install_append_class-target () {
129 fi 137 fi
130} 138}
131 139
140# As we do not build python3 for windows, makes no sense to ship the script that's using it
141do_install_append_mingw32() {
142 rm -f ${D}${bindir}/gtester-report
143}
144
132CODEGEN_PYTHON_RDEPENDS = "python3 python3-distutils python3-xml" 145CODEGEN_PYTHON_RDEPENDS = "python3 python3-distutils python3-xml"
133CODEGEN_PYTHON_RDEPENDS_mingw32 = "" 146CODEGEN_PYTHON_RDEPENDS_mingw32 = ""
134 147