diff options
author | Alexander Kanavin <alex.kanavin@gmail.com> | 2019-02-20 21:10:26 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-02-25 12:35:59 +0000 |
commit | a3ebd8a19de79c0dbd83a8430acfcffadbda48e7 (patch) | |
tree | 4cffcb52e5f62c8685938e8d2d8428bb23c04856 /meta/recipes-core/glib-2.0/glib.inc | |
parent | ce0d8dbbf01960a13e5883fa036acef346c56c85 (diff) | |
download | poky-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.inc | 41 |
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 | ||
30 | LEAD_SONAME = "libglib-2.0.*" | 30 | LEAD_SONAME = "libglib-2.0.*" |
31 | 31 | ||
32 | inherit autotools gettext gtk-doc pkgconfig ptest-gnome upstream-version-is-even bash-completion gio-module-cache manpages distro_features_check | 32 | inherit meson gettext gtk-doc pkgconfig ptest-gnome upstream-version-is-even bash-completion gio-module-cache manpages distro_features_check |
33 | |||
34 | GTKDOC_ENABLE_FLAG = "-Dgtk_doc=true" | ||
35 | GTKDOC_DISABLE_FLAG = "-Dgtk_doc=false" | ||
36 | |||
37 | EXTRA_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. | ||
42 | unset _PYTHON_SYSCONFIGDATA_NAME | ||
33 | 43 | ||
34 | REQUIRED_DISTRO_FEATURES_libc-glibc = "${@'libc-charsets libc-locale-code libc-locales' if bb.utils.contains('DISTRO_FEATURES', 'ptest', True, False, d) else ''}" | 44 | REQUIRED_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 | ||
38 | PACKAGECONFIG ??= "system-pcre libmount" | 48 | PACKAGECONFIG ??= "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 |
40 | PACKAGECONFIG[system-pcre] = "--with-pcre=system,--with-pcre=internal,libpcre" | 50 | PACKAGECONFIG[system-pcre] = "-Dinternal_pcre=false,-Dinternal_pcre=true,libpcre" |
41 | PACKAGECONFIG[libmount] = "--enable-libmount,--disable-libmount,util-linux" | 51 | PACKAGECONFIG[libmount] = "-Dlibmount=true,-Dlibmount=false,util-linux" |
42 | PACKAGECONFIG[manpages] = "--enable-man --with-xml-catalog=${STAGING_ETCDIR_NATIVE}/xml/catalog.xml, --disable-man, libxslt-native xmlto-native" | 52 | PACKAGECONFIG[manpages] = "-Dman=true, -Dman=false, libxslt-native xmlto-native" |
43 | PACKAGECONFIG[libelf] = "--enable-libelf,--disable-libelf,elfutils" | 53 | # libelf is auto-detected without a configuration option |
54 | PACKAGECONFIG[libelf] = ",,elfutils" | ||
44 | 55 | ||
45 | CORECONF = "--disable-dtrace --disable-fam --disable-systemtap" | 56 | CORECONF = "-Ddtrace=false -Dfam=false -Dsystemtap=false -Dselinux=false" |
46 | 57 | ||
47 | PRINTF = "--enable-included-printf=no" | 58 | EXTRA_OEMESON = "${CORECONF} ${@bb.utils.contains('PTEST_ENABLED', '1', '-Dinstalled_tests=true', '-Dinstalled_tests=false', d)}" |
48 | PRINTF_darwin = "--enable-included-printf=yes" | 59 | EXTRA_OEMESON_class-native = "${CORECONF} -Dinstalled_tests=false" |
49 | PRINTF_mingw32 = "--enable-included-printf=yes" | 60 | EXTRA_OEMESON_class-nativesdk = "${CORECONF} -Dinstalled_tests=false" |
50 | EXTRA_OECONF = "${PRINTF} ${CORECONF}" | ||
51 | EXTRA_OECONF_class-native = "${CORECONF} --disable-selinux" | ||
52 | |||
53 | # Tell configure that we'll have dbus-daemon on the target for the tests | ||
54 | EXTRA_OECONF_append_class-target = " ${@bb.utils.contains('PTEST_ENABLED', '1', ' ac_cv_prog_DBUS_DAEMON=dbus-daemon', '', d)}" | ||
55 | 61 | ||
56 | do_configure_prepend() { | 62 | do_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 | ||
122 | do_install_append_class-target () { | 130 | do_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 | ||
141 | do_install_append_mingw32() { | ||
142 | rm -f ${D}${bindir}/gtester-report | ||
143 | } | ||
144 | |||
132 | CODEGEN_PYTHON_RDEPENDS = "python3 python3-distutils python3-xml" | 145 | CODEGEN_PYTHON_RDEPENDS = "python3 python3-distutils python3-xml" |
133 | CODEGEN_PYTHON_RDEPENDS_mingw32 = "" | 146 | CODEGEN_PYTHON_RDEPENDS_mingw32 = "" |
134 | 147 | ||