* [PATCH 1/8] gdk-pixbuf: rewrite the cross-build support for tests
@ 2021-05-13 20:56 Alexander Kanavin
2021-05-13 20:56 ` [PATCH 2/8] gnome: drop upstream even condition from a few recipes Alexander Kanavin
` (6 more replies)
0 siblings, 7 replies; 12+ messages in thread
From: Alexander Kanavin @ 2021-05-13 20:56 UTC (permalink / raw)
To: openembedded-core; +Cc: Alexander Kanavin
It was scattered over four different patches, and wasn't guarded
by a configuration option. Hopefully the new patch is acceptable
to upstream.
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
.../0001-Add-use_prebuilt_tools-option.patch | 171 ++++++++++++++++++
...f-decisions-around-cross-compilation.patch | 38 ----
...bnailer-and-pixdata-cross-compile-fa.patch | 95 ----------
...nd-thumbnailer-cross-compile-failure.patch | 28 ---
...ailer-and-tests-also-in-cross-builds.patch | 29 ---
.../gdk-pixbuf/gdk-pixbuf_2.42.6.bb | 9 +-
6 files changed, 176 insertions(+), 194 deletions(-)
create mode 100644 meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0001-Add-use_prebuilt_tools-option.patch
delete mode 100644 meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0001-Fix-a-couple-of-decisions-around-cross-compilation.patch
delete mode 100644 meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0001-Work-around-thumbnailer-and-pixdata-cross-compile-fa.patch
delete mode 100644 meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0001-Work-around-thumbnailer-cross-compile-failure.patch
delete mode 100644 meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0006-Build-thumbnailer-and-tests-also-in-cross-builds.patch
diff --git a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0001-Add-use_prebuilt_tools-option.patch b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0001-Add-use_prebuilt_tools-option.patch
new file mode 100644
index 0000000000..dc8d6ce724
--- /dev/null
+++ b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0001-Add-use_prebuilt_tools-option.patch
@@ -0,0 +1,171 @@
+From ba73bb0f3d2023839bc3b681c49b7ec1192cceb4 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Sat, 8 May 2021 21:58:54 +0200
+Subject: [PATCH] Add use_prebuilt_tools option
+
+This allows using the gdk-pixbuf tools from the host to
+build and install tests in a cross-compile scenarion.
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+---
+ gdk-pixbuf/meson.build | 11 +++++++++--
+ meson.build | 6 +++---
+ meson_options.txt | 4 ++++
+ tests/meson.build | 16 ++++++++--------
+ thumbnailer/meson.build | 24 ++++++++++++++++++------
+ 5 files changed, 42 insertions(+), 19 deletions(-)
+
+diff --git a/gdk-pixbuf/meson.build b/gdk-pixbuf/meson.build
+index 8b0590b..7331491 100644
+--- a/gdk-pixbuf/meson.build
++++ b/gdk-pixbuf/meson.build
+@@ -342,13 +342,20 @@ foreach bin: gdkpixbuf_bin
+ include_directories: [ root_inc, gdk_pixbuf_inc ],
+ c_args: common_cflags + gdk_pixbuf_cflags,
+ install: true)
+- meson.override_find_program(bin_name, bin)
++ if not get_option('use_prebuilt_tools')
++ meson.override_find_program(bin_name, bin)
++ endif
+
+ # Used in tests
+ set_variable(bin_name.underscorify(), bin)
+ endforeach
+
+-if not meson.is_cross_build()
++if get_option('use_prebuilt_tools')
++ gdk_pixbuf_query_loaders = find_program('gdk-pixbuf-query-loaders', required: true)
++ gdk_pixbuf_pixdata = find_program('gdk-pixbuf-pixdata', required: true)
++endif
++
++if not meson.is_cross_build() or get_option('use_prebuilt_tools')
+ # The 'loaders.cache' used for testing, so we don't accidentally
+ # load the installed cache; we always build it by default
+ loaders_cache = custom_target('loaders.cache',
+diff --git a/meson.build b/meson.build
+index 7a1409b..0bc73eb 100644
+--- a/meson.build
++++ b/meson.build
+@@ -403,16 +403,16 @@ subdir('gdk-pixbuf')
+ # i18n
+ subdir('po')
+
+-if not meson.is_cross_build()
++if not meson.is_cross_build() or get_option('use_prebuilt_tools')
+ subdir('tests')
+- subdir('thumbnailer')
+ endif
++subdir('thumbnailer')
+
+ # Documentation
+ build_docs = get_option('gtk_doc') or get_option('docs')
+ subdir('docs')
+
+-if not meson.is_cross_build()
++if not meson.is_cross_build() or get_option('use_prebuilt_tools')
+ meson.add_install_script('build-aux/post-install.py',
+ gdk_pixbuf_bindir,
+ gdk_pixbuf_libdir,
+diff --git a/meson_options.txt b/meson_options.txt
+index 0ee6718..cc29855 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -49,4 +49,8 @@ option('gio_sniffing',
+ description: 'Perform file type detection using GIO (Unused on MacOS and Windows)',
+ type: 'boolean',
+ value: true)
++option('use_prebuilt_tools',
++ description: 'Use prebuilt gdk-pixbuf tools from the host for cross-compilation',
++ type: 'boolean',
++ value: false)
+
+diff --git a/tests/meson.build b/tests/meson.build
+index 7c6cb11..1029e6a 100644
+--- a/tests/meson.build
++++ b/tests/meson.build
+@@ -5,6 +5,12 @@
+ # $PATH. Ideally we should use gnome.compile_resources() and let Meson deal with
+ # this problem: See https://github.com/mesonbuild/meson/issues/8266.
+ if enabled_loaders.contains('png') and host_system != 'windows'
++
++ resources_deps = [loaders_cache,]
++ if not get_option('use_prebuilt_tools')
++ resources_deps += [gdk_pixbuf_pixdata,]
++ endif
++
+ # Resources; we cannot use gnome.compile_resources() here, because we need to
+ # override the environment in order to use the utilities we just built instead
+ # of the system ones
+@@ -21,10 +27,7 @@ if enabled_loaders.contains('png') and host_system != 'windows'
+ '@INPUT@',
+ '@OUTPUT@',
+ ],
+- depends: [
+- gdk_pixbuf_pixdata,
+- loaders_cache,
+- ],
++ depends: resources_deps,
+ )
+
+ resources_h = custom_target('resources.h',
+@@ -40,10 +43,7 @@ if enabled_loaders.contains('png') and host_system != 'windows'
+ '@INPUT@',
+ '@OUTPUT@',
+ ],
+- depends: [
+- gdk_pixbuf_pixdata,
+- loaders_cache,
+- ],
++ depends: resources_deps,
+ )
+ no_resources = false
+ else
+diff --git a/thumbnailer/meson.build b/thumbnailer/meson.build
+index b6a206d..9336c21 100644
+--- a/thumbnailer/meson.build
++++ b/thumbnailer/meson.build
+@@ -6,13 +6,29 @@ bin = executable('gdk-pixbuf-thumbnailer',
+ ],
+ dependencies: gdk_pixbuf_deps + [ gdkpixbuf_dep ],
+ install: true)
+-meson.override_find_program('gdk-pixbuf-thumbnailer', bin)
++if not get_option('use_prebuilt_tools')
++ meson.override_find_program('gdk-pixbuf-thumbnailer', bin)
++endif
+
+ gdk_pixbuf_print_mime_types = executable('gdk-pixbuf-print-mime-types',
+ 'gdk-pixbuf-print-mime-types.c',
++ install: true,
+ c_args: common_cflags,
+ dependencies: gdk_pixbuf_deps + [ gdkpixbuf_dep ])
+
++if get_option('use_prebuilt_tools')
++ gdk_pixbuf_print_mime_types = find_program('gdk-pixbuf-print-mime-types', required: true)
++endif
++
++thumbnailer_deps = [loaders_cache,]
++
++if not get_option('use_prebuilt_tools')
++ thumbnailer_deps += [
++ gdk_pixbuf_print_mime_types,
++ gdk_pixbuf_pixdata,
++ ]
++endif
++
+ custom_target('thumbnailer',
+ input: 'gdk-pixbuf-thumbnailer.thumbnailer.in',
+ output: 'gdk-pixbuf-thumbnailer.thumbnailer',
+@@ -25,10 +41,6 @@ custom_target('thumbnailer',
+ '@INPUT@',
+ '@OUTPUT@',
+ ],
+- depends: [
+- gdk_pixbuf_print_mime_types,
+- gdk_pixbuf_pixdata,
+- loaders_cache,
+- ],
++ depends: thumbnailer_deps,
+ install: true,
+ install_dir: join_paths(gdk_pixbuf_datadir, 'thumbnailers'))
diff --git a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0001-Fix-a-couple-of-decisions-around-cross-compilation.patch b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0001-Fix-a-couple-of-decisions-around-cross-compilation.patch
deleted file mode 100644
index e461404918..0000000000
--- a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0001-Fix-a-couple-of-decisions-around-cross-compilation.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From be8a47e0c21e5577d4f5669d339dfec6299b25be Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Thu, 14 Feb 2019 18:06:25 +0100
-Subject: [PATCH] Generate loaders.cache using a native tool when
- cross-compiling
-
-Otherwise meson would attempt to run a target binary.
-
-Upstream-Status: Pending
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
-
----
- gdk-pixbuf/meson.build | 12 ++++++++++--
- 1 file changed, 10 insertions(+), 2 deletions(-)
-
-diff --git a/gdk-pixbuf/meson.build b/gdk-pixbuf/meson.build
-index 5cddbec..78c8bd3 100644
---- a/gdk-pixbuf/meson.build
-+++ b/gdk-pixbuf/meson.build
-@@ -324,8 +324,16 @@ if not meson.is_cross_build()
- build_by_default: true)
- loaders_dep = declare_dependency(sources: [ loaders_cache ])
- else
-- loaders_cache = []
-- loaders_dep = declare_dependency()
-+ loaders_cache = custom_target('loaders.cache',
-+ output: 'loaders.cache',
-+ capture: true,
-+ command: [
-+ 'gdk-pixbuf-query-loaders',
-+ dynamic_loaders,
-+ ],
-+ depends: dynamic_loaders_dep,
-+ build_by_default: true)
-+ loaders_dep = declare_dependency(sources: [ loaders_cache ])
- endif
-
- pkgconfig = import('pkgconfig')
diff --git a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0001-Work-around-thumbnailer-and-pixdata-cross-compile-fa.patch b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0001-Work-around-thumbnailer-and-pixdata-cross-compile-fa.patch
deleted file mode 100644
index 2aa9164750..0000000000
--- a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0001-Work-around-thumbnailer-and-pixdata-cross-compile-fa.patch
+++ /dev/null
@@ -1,95 +0,0 @@
-From dcaf3106e2cca27f728a8bd26127430500a1136e Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Fri, 22 Feb 2019 13:22:06 +0100
-Subject: [PATCH] Work-around thumbnailer and pixdata cross-compile failure
-
-Use native gdk-pixbuf-print-mime-types and gdk-pixbuf-pixdata
-when generating the thumbnail metadata and resources.
-
-This works but the mime types will come from native
-loader.cache (which will only contain in-tree loaders), not from the
-target loader.cache.
-
-The upstream issue is https://bugzilla.gnome.org/show_bug.cgi?id=779057
-
-Upstream-Status: Inappropriate [workaround]
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
-
----
- tests/meson.build | 11 +++++++++--
- thumbnailer/meson.build | 23 ++++++++++++++++++++++-
- 2 files changed, 31 insertions(+), 3 deletions(-)
-
-diff --git a/tests/meson.build b/tests/meson.build
-index 7c6cb11..07121f1 100644
---- a/tests/meson.build
-+++ b/tests/meson.build
-@@ -8,13 +8,20 @@ if enabled_loaders.contains('png') and host_system != 'windows'
- # Resources; we cannot use gnome.compile_resources() here, because we need to
- # override the environment in order to use the utilities we just built instead
- # of the system ones
-+
-+ if not meson.is_cross_build()
-+ pixdata_binary = gdk_pixbuf_pixdata.full_path()
-+ else
-+ pixdata_binary = 'gdk-pixbuf-pixdata'
-+ endif
-+
- resources_c = custom_target('resources.c',
- input: 'resources.gresource.xml',
- output: 'resources.c',
- command: [
- gen_resources,
- '--glib-compile-resources=@0@'.format(glib_compile_resources.full_path()),
-- '--pixdata=@0@'.format(gdk_pixbuf_pixdata.full_path()),
-+ '--pixdata=@0@'.format(pixdata_binary),
- '--loaders=@0@'.format(loaders_cache.full_path()),
- '--sourcedir=@0@'.format(meson.current_source_dir()),
- '--source',
-@@ -33,7 +40,7 @@ if enabled_loaders.contains('png') and host_system != 'windows'
- command: [
- gen_resources,
- '--glib-compile-resources=@0@'.format(glib_compile_resources.full_path()),
-- '--pixdata=@0@'.format(gdk_pixbuf_pixdata.full_path()),
-+ '--pixdata=@0@'.format(pixdata_binary),
- '--loaders=@0@'.format(loaders_cache.full_path()),
- '--sourcedir=@0@'.format(meson.current_source_dir()),
- '--header',
-diff --git a/thumbnailer/meson.build b/thumbnailer/meson.build
-index 8c741e0..5a3b52a 100644
---- a/thumbnailer/meson.build
-+++ b/thumbnailer/meson.build
-@@ -14,7 +14,27 @@ gdk_pixbuf_print_mime_types = executable('gdk-pixbuf-print-mime-types',
- install: true,
- dependencies: gdk_pixbuf_deps + [ gdkpixbuf_dep ])
-
--custom_target('thumbnailer',
-+if meson.is_cross_build()
-+ custom_target('thumbnailer',
-+ input: 'gdk-pixbuf-thumbnailer.thumbnailer.in',
-+ output: 'gdk-pixbuf-thumbnailer.thumbnailer',
-+ command: [
-+ gen_thumbnailer,
-+ '--printer=gdk-pixbuf-print-mime-types',
-+ '--pixdata=@0@'.format(gdk_pixbuf_pixdata.full_path()),
-+ '--loaders=@0@'.format(loaders_cache.full_path()),
-+ '--bindir=@0@'.format(gdk_pixbuf_bindir),
-+ '@INPUT@',
-+ '@OUTPUT@',
-+ ],
-+ depends: [
-+ gdk_pixbuf_print_mime_types,
-+ gdk_pixbuf_pixdata,
-+ ],
-+ install: true,
-+ install_dir: join_paths(gdk_pixbuf_datadir, 'thumbnailers'))
-+else
-+ custom_target('thumbnailer',
- input: 'gdk-pixbuf-thumbnailer.thumbnailer.in',
- output: 'gdk-pixbuf-thumbnailer.thumbnailer',
- command: [
-@@ -33,3 +53,4 @@ custom_target('thumbnailer',
- ],
- install: true,
- install_dir: join_paths(gdk_pixbuf_datadir, 'thumbnailers'))
-+endif
diff --git a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0001-Work-around-thumbnailer-cross-compile-failure.patch b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0001-Work-around-thumbnailer-cross-compile-failure.patch
deleted file mode 100644
index 110b32a490..0000000000
--- a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0001-Work-around-thumbnailer-cross-compile-failure.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 8c7ced988def52654946458a3779e383b27f14f7 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Thu, 14 Feb 2019 17:56:10 +0100
-Subject: [PATCH] Work-around thumbnailer cross-compile failure
-
-Install gdk-pixbuf-print-mime-types that's needed for thumbnail
-metadata generation.
-
-The upstream issue is https://bugzilla.gnome.org/show_bug.cgi?id=779057
-
-Upstream-Status: Inappropriate [workaround]
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- thumbnailer/meson.build | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/thumbnailer/meson.build b/thumbnailer/meson.build
-index e801144..aaafec8 100644
---- a/thumbnailer/meson.build
-+++ b/thumbnailer/meson.build
-@@ -10,6 +10,7 @@ executable('gdk-pixbuf-thumbnailer',
- gdk_pixbuf_print_mime_types = executable('gdk-pixbuf-print-mime-types',
- 'gdk-pixbuf-print-mime-types.c',
- c_args: common_cflags,
-+ install: true,
- dependencies: gdk_pixbuf_deps + [ gdkpixbuf_dep ])
-
- custom_target('thumbnailer',
diff --git a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0006-Build-thumbnailer-and-tests-also-in-cross-builds.patch b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0006-Build-thumbnailer-and-tests-also-in-cross-builds.patch
deleted file mode 100644
index cd9f88befc..0000000000
--- a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0006-Build-thumbnailer-and-tests-also-in-cross-builds.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From d02a8e202d2fe5caf3449683e0ccdf84a482a325 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Wed, 5 Jun 2019 14:17:55 +0200
-Subject: [PATCH] Build thumbnailer and tests also in cross builds.
-
-Upstream-Status: Inappropriate [relies on oe-core specific hacks]
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
-
----
- meson.build | 6 ++----
- 1 file changed, 2 insertions(+), 4 deletions(-)
-
-diff --git a/meson.build b/meson.build
-index 73034d1..d114016 100644
---- a/meson.build
-+++ b/meson.build
-@@ -378,10 +378,8 @@ subdir('gdk-pixbuf')
- # i18n
- subdir('po')
-
--if not meson.is_cross_build()
-- subdir('tests')
-- subdir('thumbnailer')
--endif
-+subdir('tests')
-+subdir('thumbnailer')
-
- # Documentation
- build_docs = get_option('gtk_doc') or get_option('docs')
diff --git a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.42.6.bb b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.42.6.bb
index e28423efd9..f171464f4d 100644
--- a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.42.6.bb
+++ b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.42.6.bb
@@ -20,10 +20,7 @@ MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz \
file://run-ptest \
file://fatal-loader.patch \
- file://0001-Work-around-thumbnailer-cross-compile-failure.patch \
- file://0001-Fix-a-couple-of-decisions-around-cross-compilation.patch \
- file://0006-Build-thumbnailer-and-tests-also-in-cross-builds.patch \
- file://0001-Work-around-thumbnailer-and-pixdata-cross-compile-fa.patch \
+ file://0001-Add-use_prebuilt_tools-option.patch \
"
SRC_URI[sha256sum] = "c4a6b75b7ed8f58ca48da830b9fa00ed96d668d3ab4b1f723dcf902f78bde77f"
@@ -47,6 +44,10 @@ PACKAGECONFIG[jpeg] = "-Djpeg=true,-Djpeg=false,jpeg"
PACKAGECONFIG[tiff] = "-Dtiff=true,-Dtiff=false,tiff"
PACKAGECONFIG[tests] = "-Dinstalled_tests=true,-Dinstalled_tests=false"
+EXTRA_OEMESON_class-target = " \
+ -Duse_prebuilt_tools=true \
+"
+
PACKAGES =+ "${PN}-xlib"
# For GIO image type sniffing
--
2.31.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 2/8] gnome: drop upstream even condition from a few recipes
2021-05-13 20:56 [PATCH 1/8] gdk-pixbuf: rewrite the cross-build support for tests Alexander Kanavin
@ 2021-05-13 20:56 ` Alexander Kanavin
2021-05-13 20:56 ` [PATCH 3/8] expat: upgrade 2.2.10 -> 2.3.0 Alexander Kanavin
` (5 subsequent siblings)
6 siblings, 0 replies; 12+ messages in thread
From: Alexander Kanavin @ 2021-05-13 20:56 UTC (permalink / raw)
To: openembedded-core; +Cc: Alexander Kanavin
They have adopted the new gnome version scheme where the distinction
is no longer:
https://lwn.net/Articles/831746/
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
meta/recipes-gnome/epiphany/epiphany_40.1.bb | 2 +-
meta/recipes-gnome/gnome/adwaita-icon-theme_3.34.3.bb | 2 +-
meta/recipes-gnome/gnome/adwaita-icon-theme_3.38.0.bb | 2 +-
.../gsettings-desktop-schemas_3.38.0.bb | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/meta/recipes-gnome/epiphany/epiphany_40.1.bb b/meta/recipes-gnome/epiphany/epiphany_40.1.bb
index e1e3ad7868..2242e9d010 100644
--- a/meta/recipes-gnome/epiphany/epiphany_40.1.bb
+++ b/meta/recipes-gnome/epiphany/epiphany_40.1.bb
@@ -12,7 +12,7 @@ DEPENDS = "libsoup-2.4 webkitgtk gtk+3 iso-codes avahi libnotify gcr gnutls \
libarchive"
GNOMEBASEBUILDCLASS = "meson"
-inherit gnomebase gsettings features_check upstream-version-is-even gettext mime-xdg
+inherit gnomebase gsettings features_check gettext mime-xdg
REQUIRED_DISTRO_FEATURES = "x11 opengl"
SRC_URI = "${GNOME_MIRROR}/${GNOMEBN}/${@oe.utils.trim_version("${PV}", 1)}/${GNOMEBN}-${PV}.tar.${GNOME_COMPRESS_TYPE};name=archive \
diff --git a/meta/recipes-gnome/gnome/adwaita-icon-theme_3.34.3.bb b/meta/recipes-gnome/gnome/adwaita-icon-theme_3.34.3.bb
index 6cde6fffa3..61927c0dd1 100644
--- a/meta/recipes-gnome/gnome/adwaita-icon-theme_3.34.3.bb
+++ b/meta/recipes-gnome/gnome/adwaita-icon-theme_3.34.3.bb
@@ -8,7 +8,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=c84cac88e46fc07647ea07e6c24eeb7c \
file://COPYING_CCBYSA3;md5=96143d33de3a79321b1006c4e8ed07e7 \
file://COPYING_LGPL;md5=e6a600fd5e1d9cbde2d983680233ad02"
-inherit allarch autotools pkgconfig gettext gtk-icon-cache upstream-version-is-even
+inherit allarch autotools pkgconfig gettext gtk-icon-cache
MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz \
diff --git a/meta/recipes-gnome/gnome/adwaita-icon-theme_3.38.0.bb b/meta/recipes-gnome/gnome/adwaita-icon-theme_3.38.0.bb
index a36a2b113c..672fbd2b07 100644
--- a/meta/recipes-gnome/gnome/adwaita-icon-theme_3.38.0.bb
+++ b/meta/recipes-gnome/gnome/adwaita-icon-theme_3.38.0.bb
@@ -10,7 +10,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=c84cac88e46fc07647ea07e6c24eeb7c \
file://COPYING_CCBYSA3;md5=96143d33de3a79321b1006c4e8ed07e7 \
file://COPYING_LGPL;md5=e6a600fd5e1d9cbde2d983680233ad02"
-inherit allarch autotools pkgconfig gettext gtk-icon-cache upstream-version-is-even
+inherit allarch autotools pkgconfig gettext gtk-icon-cache
MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz \
diff --git a/meta/recipes-gnome/gsettings-desktop-schemas/gsettings-desktop-schemas_3.38.0.bb b/meta/recipes-gnome/gsettings-desktop-schemas/gsettings-desktop-schemas_3.38.0.bb
index 34681197d8..cf06af57d6 100644
--- a/meta/recipes-gnome/gsettings-desktop-schemas/gsettings-desktop-schemas_3.38.0.bb
+++ b/meta/recipes-gnome/gsettings-desktop-schemas/gsettings-desktop-schemas_3.38.0.bb
@@ -11,6 +11,6 @@ DEPENDS = "glib-2.0"
GNOMEBASEBUILDCLASS = "meson"
-inherit gnomebase gsettings gobject-introspection gettext upstream-version-is-even
+inherit gnomebase gsettings gobject-introspection gettext
SRC_URI[archive.sha256sum] = "5704c8266004b296036671f223c705dc046aa694a1b1abb87c67e7d2747a8c67"
--
2.31.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 3/8] expat: upgrade 2.2.10 -> 2.3.0
2021-05-13 20:56 [PATCH 1/8] gdk-pixbuf: rewrite the cross-build support for tests Alexander Kanavin
2021-05-13 20:56 ` [PATCH 2/8] gnome: drop upstream even condition from a few recipes Alexander Kanavin
@ 2021-05-13 20:56 ` Alexander Kanavin
2021-05-13 20:56 ` [PATCH 4/8] meson: update 0.57.2 -> 0.58.0 Alexander Kanavin
` (4 subsequent siblings)
6 siblings, 0 replies; 12+ messages in thread
From: Alexander Kanavin @ 2021-05-13 20:56 UTC (permalink / raw)
To: openembedded-core; +Cc: Alexander Kanavin
Drop 0001-Add-output-of-tests-result.patch
(difficult to rebase). I have verified that ptests
still pass, and print PASS for every test. If they
start failing we can revisit what kind of output would
be beneficial.
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
.../0001-Add-output-of-tests-result.patch | 83 -------------------
meta/recipes-core/expat/expat/run-ptest | 4 +-
.../expat/{expat_2.2.10.bb => expat_2.3.0.bb} | 7 +-
3 files changed, 5 insertions(+), 89 deletions(-)
delete mode 100644 meta/recipes-core/expat/expat/0001-Add-output-of-tests-result.patch
rename meta/recipes-core/expat/{expat_2.2.10.bb => expat_2.3.0.bb} (81%)
diff --git a/meta/recipes-core/expat/expat/0001-Add-output-of-tests-result.patch b/meta/recipes-core/expat/expat/0001-Add-output-of-tests-result.patch
deleted file mode 100644
index c5c18ead74..0000000000
--- a/meta/recipes-core/expat/expat/0001-Add-output-of-tests-result.patch
+++ /dev/null
@@ -1,83 +0,0 @@
-From aa84835a00bfd65e784d58411e76f60658e939dc Mon Sep 17 00:00:00 2001
-From: Oleksandr Popovych <oleksandr.s.popovych@globallogic.com>
-Date: Tue, 18 Feb 2020 19:04:55 +0200
-Subject: [PATCH] Add output of tests result
-
-Added console output of testing results in form 'RESULT: TEST_NAME'.
-
-Changed verbose mode of test application set by '-v' ('--verbose')
-argument to CK_NORMAL.
-Added new supported argument '-vv' ('--extra-verbose') that changes
-verbose mode of test application to CK_VERBOSE. Results of each test
-are shown in output only if this mode is set.
-
-Upstream-Status: Denied
-
-This patch changes potentially deprecated feature that shoud be changed
-in upstream. [https://github.com/libexpat/libexpat/issues/382]
-
-Signed-off-by: Oleksandr Popovych <oleksandr.s.popovych@globallogic.com>
----
- tests/minicheck.c | 10 +++++++++-
- tests/runtests.c | 4 +++-
- 2 files changed, 12 insertions(+), 2 deletions(-)
-
-diff --git a/expat/tests/minicheck.c b/expat/tests/minicheck.c
-index a5a1efb..94fa412 100644
---- a/tests/minicheck.c
-+++ b/tests/minicheck.c
-@@ -164,6 +164,8 @@ srunner_run_all(SRunner *runner, int verbosity) {
- if (tc->setup != NULL) {
- /* setup */
- if (setjmp(env)) {
-+ if (verbosity >= CK_VERBOSE)
-+ printf("SKIP: %s\n", _check_current_function);
- add_failure(runner, verbosity);
- continue;
- }
-@@ -171,6 +173,8 @@ srunner_run_all(SRunner *runner, int verbosity) {
- }
- /* test */
- if (setjmp(env)) {
-+ if (verbosity >= CK_VERBOSE)
-+ printf("FAIL: %s\n", _check_current_function);
- add_failure(runner, verbosity);
- continue;
- }
-@@ -178,12 +182,16 @@ srunner_run_all(SRunner *runner, int verbosity) {
-
- /* teardown */
- if (tc->teardown != NULL) {
-- if (setjmp(env)) {
-+ if (setjmp(env)) {
-+ if (verbosity >= CK_VERBOSE)
-+ printf("PASS: %s\n", _check_current_function);
- add_failure(runner, verbosity);
- continue;
- }
- tc->teardown();
- }
-+ if (verbosity >= CK_VERBOSE)
-+ printf("PASS: %s\n", _check_current_function);
- }
- tc = tc->next_tcase;
- }
-diff --git a/tests/runtests.c b/expat/tests/runtests.c
-index 7791fe0..75724e5 100644
---- a/tests/runtests.c
-+++ b/tests/runtests.c
-@@ -11619,9 +11619,11 @@ main(int argc, char *argv[]) {
- for (i = 1; i < argc; ++i) {
- char *opt = argv[i];
- if (strcmp(opt, "-v") == 0 || strcmp(opt, "--verbose") == 0)
-- verbosity = CK_VERBOSE;
-+ verbosity = CK_NORMAL;
- else if (strcmp(opt, "-q") == 0 || strcmp(opt, "--quiet") == 0)
- verbosity = CK_SILENT;
-+ else if (strcmp(opt, "-vv") == 0 || strcmp(opt, "--extra-verbose") == 0)
-+ verbosity = CK_VERBOSE;
- else {
- fprintf(stderr, "runtests: unknown option '%s'\n", opt);
- return 2;
---
-2.17.1
diff --git a/meta/recipes-core/expat/expat/run-ptest b/meta/recipes-core/expat/expat/run-ptest
index 1b39cec8e5..59d8ab57e3 100644
--- a/meta/recipes-core/expat/expat/run-ptest
+++ b/meta/recipes-core/expat/expat/run-ptest
@@ -18,6 +18,6 @@ TIME=$(which time)
echo "Architecture: $(uname -m)" > ${output}
echo "Image: $(uname -sr)" >> ${output}
-${TIME} -f 'Execution time: %e s' bash -c "testCheck runtests -vv" |& tee -a ${output}
-${TIME} -f 'Execution time: %e s' bash -c "testCheck runtestspp -vv" |& tee -a ${output}
+${TIME} -f 'Execution time: %e s' bash -c "testCheck runtests -v" |& tee -a ${output}
+${TIME} -f 'Execution time: %e s' bash -c "testCheck runtestspp -v" |& tee -a ${output}
echo
diff --git a/meta/recipes-core/expat/expat_2.2.10.bb b/meta/recipes-core/expat/expat_2.3.0.bb
similarity index 81%
rename from meta/recipes-core/expat/expat_2.2.10.bb
rename to meta/recipes-core/expat/expat_2.3.0.bb
index fa263775b3..14d2855df3 100644
--- a/meta/recipes-core/expat/expat_2.2.10.bb
+++ b/meta/recipes-core/expat/expat_2.3.0.bb
@@ -8,11 +8,10 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=9e2ce3b3c4c0f2670883a23bbd7c37a9"
SRC_URI = "${SOURCEFORGE_MIRROR}/expat/expat-${PV}.tar.bz2 \
file://libtool-tag.patch \
- file://run-ptest \
- file://0001-Add-output-of-tests-result.patch \
- "
+ file://run-ptest \
+ "
-SRC_URI[sha256sum] = "b2c160f1b60e92da69de8e12333096aeb0c3bf692d41c60794de278af72135a5"
+SRC_URI[sha256sum] = "f122a20eada303f904d5e0513326c5b821248f2d4d2afbf5c6f1339e511c0586"
EXTRA_OECMAKE_class-native += "-DEXPAT_BUILD_DOCS=OFF"
--
2.31.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 4/8] meson: update 0.57.2 -> 0.58.0
2021-05-13 20:56 [PATCH 1/8] gdk-pixbuf: rewrite the cross-build support for tests Alexander Kanavin
2021-05-13 20:56 ` [PATCH 2/8] gnome: drop upstream even condition from a few recipes Alexander Kanavin
2021-05-13 20:56 ` [PATCH 3/8] expat: upgrade 2.2.10 -> 2.3.0 Alexander Kanavin
@ 2021-05-13 20:56 ` Alexander Kanavin
2021-05-14 13:45 ` [OE-core] " Khem Raj
2021-05-13 20:56 ` [PATCH 5/8] meson.bbclass: split python routines into a separate class Alexander Kanavin
` (3 subsequent siblings)
6 siblings, 1 reply; 12+ messages in thread
From: Alexander Kanavin @ 2021-05-13 20:56 UTC (permalink / raw)
To: openembedded-core; +Cc: Alexander Kanavin
Rebase patches; dropped chunks (and cross-prop-default.patch)
have been removed upstream.
Move native-only patches to all-patches, as they're a pain to rebase
separately.
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
meta/recipes-devtools/meson/meson.inc | 11 +-
.../0001-Make-CPU-family-warnings-fatal.patch | 18 +-
...sues-that-arise-when-cross-compiling.patch | 8 +-
...-not-manipulate-the-environment-when.patch | 14 +-
...pport-building-allarch-recipes-again.patch | 10 +-
.../meson/meson/0003-native_bindir.patch | 58 +--
...2c19e693a69b0650ce6c8a8903163c959996.patch | 412 ++++++++++++++++++
.../meson/meson/cross-prop-default.patch | 23 -
.../{meson_0.57.2.bb => meson_0.58.0.bb} | 0
...on_0.57.2.bb => nativesdk-meson_0.58.0.bb} | 0
10 files changed, 456 insertions(+), 98 deletions(-)
create mode 100644 meta/recipes-devtools/meson/meson/4e312c19e693a69b0650ce6c8a8903163c959996.patch
delete mode 100644 meta/recipes-devtools/meson/meson/cross-prop-default.patch
rename meta/recipes-devtools/meson/{meson_0.57.2.bb => meson_0.58.0.bb} (100%)
rename meta/recipes-devtools/meson/{nativesdk-meson_0.57.2.bb => nativesdk-meson_0.58.0.bb} (100%)
diff --git a/meta/recipes-devtools/meson/meson.inc b/meta/recipes-devtools/meson/meson.inc
index 10e7d8a1ce..f60381453b 100644
--- a/meta/recipes-devtools/meson/meson.inc
+++ b/meta/recipes-devtools/meson/meson.inc
@@ -12,16 +12,13 @@ SRC_URI = "https://github.com/mesonbuild/meson/releases/download/${PV}/meson-${P
file://0003-native_bindir.patch \
file://0001-python-module-do-not-manipulate-the-environment-when.patch \
file://disable-rpath-handling.patch \
- file://cross-prop-default.patch \
file://0001-modules-python.py-do-not-substitute-python-s-install.patch \
file://gi-target-dep.patch \
+ file://0001-Make-CPU-family-warnings-fatal.patch \
+ file://0002-Support-building-allarch-recipes-again.patch \
+ file://4e312c19e693a69b0650ce6c8a8903163c959996.patch \
"
-SRC_URI[sha256sum] = "3a83e7b1c5de94fa991ec34d9b198d94f38ed699d3524cb0fdf3b99fd23d4cc5"
-
-SRC_URI_append_class-native = " \
- file://0001-Make-CPU-family-warnings-fatal.patch \
- file://0002-Support-building-allarch-recipes-again.patch \
-"
+SRC_URI[sha256sum] = "f4820df0bc969c99019fd4af8ca5f136ee94c63d8a5ad67e7eb73bdbc9182fdd"
UPSTREAM_CHECK_URI = "https://github.com/mesonbuild/meson/releases"
UPSTREAM_CHECK_REGEX = "meson-(?P<pver>\d+(\.\d+)+)\.tar"
diff --git a/meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch b/meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch
index 300797f9ee..bcccfabd17 100644
--- a/meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch
+++ b/meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch
@@ -1,34 +1,33 @@
-From 198e2de24adf5845e3ba389b533cf43440ee8acb Mon Sep 17 00:00:00 2001
+From b64032a2eb1fb760f4ffd5b4b666e2433cf80d39 Mon Sep 17 00:00:00 2001
From: Ross Burton <ross.burton@intel.com>
Date: Tue, 3 Jul 2018 13:59:09 +0100
-Subject: [PATCH] Make CPU family warnings fatal
+Subject: [PATCH 1/2] Make CPU family warnings fatal
Upstream-Status: Inappropriate [OE specific]
Signed-off-by: Ross Burton <ross.burton@intel.com>
-
---
mesonbuild/envconfig.py | 2 +-
mesonbuild/environment.py | 4 +---
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/mesonbuild/envconfig.py b/mesonbuild/envconfig.py
-index ba35d16..2d3c34c 100644
+index c6a4df3..4d58c91 100644
--- a/mesonbuild/envconfig.py
+++ b/mesonbuild/envconfig.py
-@@ -262,7 +262,7 @@ class MachineInfo:
+@@ -266,7 +266,7 @@ class MachineInfo:
cpu_family = literal['cpu_family']
if cpu_family not in known_cpu_families:
-- mlog.warning('Unknown CPU family {}, please report this at https://github.com/mesonbuild/meson/issues/new'.format(cpu_family))
+- mlog.warning(f'Unknown CPU family {cpu_family}, please report this at https://github.com/mesonbuild/meson/issues/new')
+ raise EnvironmentException('Unknown CPU family {}, see https://wiki.yoctoproject.org/wiki/Meson/UnknownCPU for directions.'.format(cpu_family))
endian = literal['endian']
if endian not in ('little', 'big'):
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
-index 756dd81..4d2c2b6 100644
+index fc9b703..eea8345 100644
--- a/mesonbuild/environment.py
+++ b/mesonbuild/environment.py
-@@ -434,9 +434,7 @@ def detect_cpu_family(compilers: CompilersDict) -> str:
+@@ -436,9 +436,7 @@ def detect_cpu_family(compilers: CompilersDict) -> str:
trial = 'ppc64'
if trial not in known_cpu_families:
@@ -39,3 +38,6 @@ index 756dd81..4d2c2b6 100644
return trial
+--
+2.24.0
+
diff --git a/meta/recipes-devtools/meson/meson/0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch b/meta/recipes-devtools/meson/meson/0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch
index 471f1500da..ce90e515da 100644
--- a/meta/recipes-devtools/meson/meson/0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch
+++ b/meta/recipes-devtools/meson/meson/0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch
@@ -1,4 +1,4 @@
-From d3ef01a4208a801acad380a4aaceb6a21f8fa603 Mon Sep 17 00:00:00 2001
+From 2f9c59e0489e569c5382404667c10f5c200a72ad Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Fri, 4 Aug 2017 16:16:41 +0300
Subject: [PATCH] gtkdoc: fix issues that arise when cross-compiling
@@ -20,11 +20,11 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
1 file changed, 4 insertions(+)
diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py
-index bcf77b9..6a4b472 100644
+index dc2979e..c9ff9bd 100644
--- a/mesonbuild/modules/gnome.py
+++ b/mesonbuild/modules/gnome.py
-@@ -974,6 +974,10 @@ This will become a hard error in the future.''')
- args.append('--{}={}'.format(program_name, path))
+@@ -1053,6 +1053,10 @@ class GnomeModule(ExtensionModule):
+ args.append(f'--{program_name}={path}')
if namespace:
args.append('--namespace=' + namespace)
+ gtkdoc_exe_wrapper = state.environment.properties.host.get('gtkdoc_exe_wrapper', None)
diff --git a/meta/recipes-devtools/meson/meson/0001-python-module-do-not-manipulate-the-environment-when.patch b/meta/recipes-devtools/meson/meson/0001-python-module-do-not-manipulate-the-environment-when.patch
index eb0e90dbdd..fdadc6869b 100644
--- a/meta/recipes-devtools/meson/meson/0001-python-module-do-not-manipulate-the-environment-when.patch
+++ b/meta/recipes-devtools/meson/meson/0001-python-module-do-not-manipulate-the-environment-when.patch
@@ -1,4 +1,4 @@
-From 689e28c49b85311f93f39df70cbee702fc44afb6 Mon Sep 17 00:00:00 2001
+From 2264e67d7c2c22ca634fd26ea8ada6f0344ab280 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Mon, 19 Nov 2018 14:24:26 +0100
Subject: [PATCH] python module: do not manipulate the environment when calling
@@ -12,10 +12,10 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
1 file changed, 12 deletions(-)
diff --git a/mesonbuild/modules/python.py b/mesonbuild/modules/python.py
-index 07be318..b770603 100644
+index 422155b..aaf5844 100644
--- a/mesonbuild/modules/python.py
+++ b/mesonbuild/modules/python.py
-@@ -71,11 +71,6 @@ class PythonDependency(ExternalDependency):
+@@ -70,11 +70,6 @@ class PythonDependency(ExternalDependency):
old_pkg_libdir = os.environ.get('PKG_CONFIG_LIBDIR')
old_pkg_path = os.environ.get('PKG_CONFIG_PATH')
@@ -26,9 +26,9 @@ index 07be318..b770603 100644
-
try:
self.pkgdep = PkgConfigDependency(pkg_name, environment, kwargs)
- mlog.debug('Found "{}" via pkgconfig lookup in LIBPC ({})'.format(pkg_name, pkg_libdir))
-@@ -84,13 +79,6 @@ class PythonDependency(ExternalDependency):
- mlog.debug('"{}" could not be found in LIBPC ({})'.format(pkg_name, pkg_libdir))
+ mlog.debug(f'Found "{pkg_name}" via pkgconfig lookup in LIBPC ({pkg_libdir})')
+@@ -83,13 +78,6 @@ class PythonDependency(ExternalDependency):
+ mlog.debug(f'"{pkg_name}" could not be found in LIBPC ({pkg_libdir})')
mlog.debug(e)
- if old_pkg_path is not None:
@@ -39,5 +39,5 @@ index 07be318..b770603 100644
- else:
- os.environ.pop('PKG_CONFIG_LIBDIR', None)
else:
- mlog.debug('"{}" could not be found in LIBPC ({}), this is likely due to a relocated python installation'.format(pkg_name, pkg_libdir))
+ mlog.debug(f'"{pkg_name}" could not be found in LIBPC ({pkg_libdir}), this is likely due to a relocated python installation')
diff --git a/meta/recipes-devtools/meson/meson/0002-Support-building-allarch-recipes-again.patch b/meta/recipes-devtools/meson/meson/0002-Support-building-allarch-recipes-again.patch
index f6175a194c..dcc1ce9c27 100644
--- a/meta/recipes-devtools/meson/meson/0002-Support-building-allarch-recipes-again.patch
+++ b/meta/recipes-devtools/meson/meson/0002-Support-building-allarch-recipes-again.patch
@@ -1,19 +1,18 @@
-From ac1021a3abf612e8be9b19eecb97062e0c314701 Mon Sep 17 00:00:00 2001
+From 656bf55fed01df2d2e2ad6d9d9887173cb16b85c Mon Sep 17 00:00:00 2001
From: Peter Kjellerstedt <pkj@axis.com>
Date: Thu, 26 Jul 2018 16:32:49 +0200
-Subject: [PATCH] Support building allarch recipes again
+Subject: [PATCH 2/2] Support building allarch recipes again
This registers "allarch" as a known CPU family.
Upstream-Status: Inappropriate [OE specific]
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
-
---
mesonbuild/envconfig.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/mesonbuild/envconfig.py b/mesonbuild/envconfig.py
-index 2d3c34c..b9e7908 100644
+index 4d58c91..ff01ad1 100644
--- a/mesonbuild/envconfig.py
+++ b/mesonbuild/envconfig.py
@@ -36,6 +36,7 @@ from pathlib import Path
@@ -24,3 +23,6 @@ index 2d3c34c..b9e7908 100644
'aarch64',
'alpha',
'arc',
+--
+2.24.0
+
diff --git a/meta/recipes-devtools/meson/meson/0003-native_bindir.patch b/meta/recipes-devtools/meson/meson/0003-native_bindir.patch
index ed85116c4f..89257b9e05 100644
--- a/meta/recipes-devtools/meson/meson/0003-native_bindir.patch
+++ b/meta/recipes-devtools/meson/meson/0003-native_bindir.patch
@@ -1,4 +1,4 @@
-From 1546e1f95a119175b7a4e4272a26dd85505e5ede Mon Sep 17 00:00:00 2001
+From 30e97d4090a3d3f5b7ddcaf27cfa17f3c8c1d462 Mon Sep 17 00:00:00 2001
From: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Date: Wed, 15 Nov 2017 15:05:01 +0100
Subject: [PATCH] native_bindir
@@ -18,23 +18,22 @@ Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
---
mesonbuild/dependencies/base.py | 19 +++++++++++--------
- mesonbuild/dependencies/ui.py | 6 +++---
- 2 files changed, 14 insertions(+), 11 deletions(-)
+ 1 file changed, 11 insertions(+), 8 deletions(-)
diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py
-index cd77b4b..7e3f338 100644
+index 14380d4..d0c443f 100644
--- a/mesonbuild/dependencies/base.py
+++ b/mesonbuild/dependencies/base.py
-@@ -192,7 +192,7 @@ class Dependency:
+@@ -179,7 +179,7 @@ class Dependency:
def get_exe_args(self, compiler):
return []
- def get_pkgconfig_variable(self, variable_name: str, kwargs: T.Dict[str, T.Any]) -> str:
+ def get_pkgconfig_variable(self, variable_name: str, kwargs: T.Dict[str, T.Any], use_native=False) -> str:
- raise DependencyException('{!r} is not a pkgconfig dependency'.format(self.name))
+ raise DependencyException(f'{self.name!r} is not a pkgconfig dependency')
def get_configtool_variable(self, variable_name):
-@@ -280,7 +280,7 @@ class InternalDependency(Dependency):
+@@ -267,7 +267,7 @@ class InternalDependency(Dependency):
return True
return any(d.is_built() for d in self.ext_deps)
@@ -43,7 +42,7 @@ index cd77b4b..7e3f338 100644
raise DependencyException('Method "get_pkgconfig_variable()" is '
'invalid for an internal dependency')
-@@ -658,8 +658,11 @@ class PkgConfigDependency(ExternalDependency):
+@@ -645,8 +645,11 @@ class PkgConfigDependency(ExternalDependency):
return s.format(self.__class__.__name__, self.name, self.is_found,
self.version_reqs)
@@ -57,16 +56,16 @@ index cd77b4b..7e3f338 100644
p, out, err = Popen_safe(cmd, env=env)
rc, out, err = p.returncode, out.strip(), err.strip()
call = ' '.join(cmd)
-@@ -685,7 +688,7 @@ class PkgConfigDependency(ExternalDependency):
- env['PKG_CONFIG_LIBDIR'] = new_pkg_config_libdir
- mlog.debug('PKG_CONFIG_LIBDIR: ' + new_pkg_config_libdir)
+@@ -674,7 +677,7 @@ class PkgConfigDependency(ExternalDependency):
+ if key.startswith('PKG_'):
+ mlog.debug(f'env[{key}]: {value}')
- def _call_pkgbin(self, args, env=None):
+ def _call_pkgbin(self, args, env=None, use_native=False):
# Always copy the environment since we're going to modify it
# with pkg-config variables
if env is None:
-@@ -699,7 +702,7 @@ class PkgConfigDependency(ExternalDependency):
+@@ -688,7 +691,7 @@ class PkgConfigDependency(ExternalDependency):
targs = tuple(args)
cache = PkgConfigDependency.pkgbin_cache
if (self.pkgbin, targs, fenv) not in cache:
@@ -75,7 +74,7 @@ index cd77b4b..7e3f338 100644
return cache[(self.pkgbin, targs, fenv)]
def _convert_mingw_paths(self, args: T.List[str]) -> T.List[str]:
-@@ -905,7 +908,7 @@ class PkgConfigDependency(ExternalDependency):
+@@ -894,7 +897,7 @@ class PkgConfigDependency(ExternalDependency):
(self.name, out_raw))
self.link_args, self.raw_link_args = self._search_libs(out, out_raw)
@@ -84,7 +83,7 @@ index cd77b4b..7e3f338 100644
options = ['--variable=' + variable_name, self.name]
if 'define_variable' in kwargs:
-@@ -918,7 +921,7 @@ class PkgConfigDependency(ExternalDependency):
+@@ -907,7 +910,7 @@ class PkgConfigDependency(ExternalDependency):
options = ['--define-variable=' + '='.join(definition)] + options
@@ -93,34 +92,3 @@ index cd77b4b..7e3f338 100644
variable = ''
if ret != 0:
if self.required:
-diff --git a/mesonbuild/dependencies/ui.py b/mesonbuild/dependencies/ui.py
-index d897d76..a598d2e 100644
---- a/mesonbuild/dependencies/ui.py
-+++ b/mesonbuild/dependencies/ui.py
-@@ -325,7 +325,7 @@ class QtBaseDependency(ExternalDependency):
- self.bindir = self.get_pkgconfig_host_bins(core)
- if not self.bindir:
- # If exec_prefix is not defined, the pkg-config file is broken
-- prefix = core.get_pkgconfig_variable('exec_prefix', {})
-+ prefix = core.get_pkgconfig_variable('exec_prefix', {}, use_native=True)
- if prefix:
- self.bindir = os.path.join(prefix, 'bin')
-
-@@ -528,7 +528,7 @@ class Qt4Dependency(QtBaseDependency):
- applications = ['moc', 'uic', 'rcc', 'lupdate', 'lrelease']
- for application in applications:
- try:
-- return os.path.dirname(core.get_pkgconfig_variable('%s_location' % application, {}))
-+ return os.path.dirname(core.get_pkgconfig_variable('%s_location' % application, {}, use_native=True))
- except MesonException:
- pass
-
-@@ -538,7 +538,7 @@ class Qt5Dependency(QtBaseDependency):
- QtBaseDependency.__init__(self, 'qt5', env, kwargs)
-
- def get_pkgconfig_host_bins(self, core):
-- return core.get_pkgconfig_variable('host_bins', {})
-+ return core.get_pkgconfig_variable('host_bins', {}, use_native=True)
-
- def get_private_includes(self, mod_inc_dir, module):
- return _qt_get_private_includes(mod_inc_dir, module, self.version)
diff --git a/meta/recipes-devtools/meson/meson/4e312c19e693a69b0650ce6c8a8903163c959996.patch b/meta/recipes-devtools/meson/meson/4e312c19e693a69b0650ce6c8a8903163c959996.patch
new file mode 100644
index 0000000000..76daf019b0
--- /dev/null
+++ b/meta/recipes-devtools/meson/meson/4e312c19e693a69b0650ce6c8a8903163c959996.patch
@@ -0,0 +1,412 @@
+From 4e312c19e693a69b0650ce6c8a8903163c959996 Mon Sep 17 00:00:00 2001
+From: Xavier Claessens <xavier.claessens@collabora.com>
+Date: Tue, 11 May 2021 09:18:47 -0400
+Subject: [PATCH] gnome: Fix gtkdoc generation
+
+install_scripts used to replace @BUILD_ROOT@ and @SOURCE_ROOT@ but it
+was not documented and got removed in Meson 0.58.0. gnome.gtkdoc() was
+relying on that behaviour, but it has always been broken in the case the
+source or build directory contains spaces.
+
+Fix this by changing get_include_args() to substitue paths directly
+which will then get escaped correctly.
+
+Add a unit test that builds GObject documentation which is where this
+issue has been spotted.
+
+Fixes: #8744
+Upstream-Status: Backport
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ mesonbuild/modules/__init__.py | 54 +++++++++----------
+ mesonbuild/modules/gnome.py | 15 +++---
+ mesonbuild/modules/hotdoc.py | 3 +-
+ mesonbuild/modules/qt.py | 4 +-
+ mesonbuild/modules/windows.py | 5 +-
+ .../10 gtk-doc/doc/foobar1/foobar-docs.sgml | 2 +-
+ .../doc/foobar1/foobar-sections.txt | 16 ++++++
+ .../10 gtk-doc/doc/foobar1/foobar.types | 4 ++
+ .../10 gtk-doc/doc/foobar1/meson.build | 6 ++-
+ test cases/frameworks/10 gtk-doc/foo.c | 30 +++++++++++
+ .../frameworks/10 gtk-doc/include/foo.h | 18 +++++++
+ test cases/frameworks/10 gtk-doc/meson.build | 12 +++++
+ test cases/frameworks/10 gtk-doc/test.json | 4 +-
+ 13 files changed, 127 insertions(+), 46 deletions(-)
+ create mode 100644 test cases/frameworks/10 gtk-doc/doc/foobar1/foobar-sections.txt
+ create mode 100644 test cases/frameworks/10 gtk-doc/doc/foobar1/foobar.types
+ create mode 100644 test cases/frameworks/10 gtk-doc/foo.c
+
+diff --git a/mesonbuild/modules/__init__.py b/mesonbuild/modules/__init__.py
+index ddb5e3e6cf3..c0970294c34 100644
+--- a/mesonbuild/modules/__init__.py
++++ b/mesonbuild/modules/__init__.py
+@@ -56,6 +56,33 @@ def __init__(self, interpreter: 'Interpreter') -> None:
+ self.target_machine = interpreter.builtin['target_machine'].held_object
+ self.current_node = interpreter.current_node
+
++ def get_include_args(self, include_dirs, prefix='-I'):
++ if not include_dirs:
++ return []
++
++ srcdir = self.environment.get_source_dir()
++ builddir = self.environment.get_build_dir()
++
++ dirs_str = []
++ for dirs in unholder(include_dirs):
++ if isinstance(dirs, str):
++ dirs_str += [f'{prefix}{dirs}']
++ continue
++
++ # Should be build.IncludeDirs object.
++ basedir = dirs.get_curdir()
++ for d in dirs.get_incdirs():
++ expdir = os.path.join(basedir, d)
++ srctreedir = os.path.join(srcdir, expdir)
++ buildtreedir = os.path.join(builddir, expdir)
++ dirs_str += [f'{prefix}{buildtreedir}',
++ f'{prefix}{srctreedir}']
++ for d in dirs.get_extra_build_dirs():
++ dirs_str += [f'{prefix}{d}']
++
++ return dirs_str
++
++
+ class ModuleObject:
+ """Base class for all objects returned by modules
+ """
+@@ -71,33 +98,6 @@ def __init__(self, interpreter: T.Optional['Interpreter'] = None) -> None:
+ class ExtensionModule(ModuleObject):
+ pass
+
+-def get_include_args(include_dirs, prefix='-I'):
+- '''
+- Expand include arguments to refer to the source and build dirs
+- by using @SOURCE_ROOT@ and @BUILD_ROOT@ for later substitution
+- '''
+- if not include_dirs:
+- return []
+-
+- dirs_str = []
+- for dirs in unholder(include_dirs):
+- if isinstance(dirs, str):
+- dirs_str += [f'{prefix}{dirs}']
+- continue
+-
+- # Should be build.IncludeDirs object.
+- basedir = dirs.get_curdir()
+- for d in dirs.get_incdirs():
+- expdir = os.path.join(basedir, d)
+- srctreedir = os.path.join('@SOURCE_ROOT@', expdir)
+- buildtreedir = os.path.join('@BUILD_ROOT@', expdir)
+- dirs_str += [f'{prefix}{buildtreedir}',
+- f'{prefix}{srctreedir}']
+- for d in dirs.get_extra_build_dirs():
+- dirs_str += [f'{prefix}{d}']
+-
+- return dirs_str
+-
+ def is_module_library(fname):
+ '''
+ Check if the file is a library-like file generated by a module-specific
+diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py
+index d0b053d4f76..c91cda66f8b 100644
+--- a/mesonbuild/modules/gnome.py
++++ b/mesonbuild/modules/gnome.py
+@@ -26,7 +26,6 @@
+ from .. import mesonlib
+ from .. import interpreter
+ from . import GResourceTarget, GResourceHeaderTarget, GirTarget, TypelibTarget, VapiTarget
+-from . import get_include_args
+ from . import ExtensionModule
+ from . import ModuleReturnValue
+ from ..mesonlib import (
+@@ -394,7 +393,7 @@ def _get_dependencies_flags(self, deps, state, depends, include_rpath=False,
+ gi_includes.update([girdir])
+ if isinstance(dep, InternalDependency):
+ cflags.update(dep.get_compile_args())
+- cflags.update(get_include_args(dep.include_directories))
++ cflags.update(state.get_include_args(dep.include_directories))
+ for lib in unholder(dep.libraries):
+ if isinstance(lib, build.SharedLibrary):
+ internal_ldflags.update(self._get_link_args(state, lib, depends, include_rpath))
+@@ -443,7 +442,7 @@ def _get_dependencies_flags(self, deps, state, depends, include_rpath=False,
+ else:
+ external_ldflags.update([lib])
+ elif isinstance(dep, (build.StaticLibrary, build.SharedLibrary)):
+- cflags.update(get_include_args(dep.get_include_dirs()))
++ cflags.update(state.get_include_args(dep.get_include_dirs()))
+ depends.append(dep)
+ else:
+ mlog.log(f'dependency {dep!r} not handled to build gir files')
+@@ -853,7 +852,7 @@ def generate_gir(self, state, args, kwargs):
+ scan_command += self._scan_header(kwargs)
+ scan_command += self._scan_extra_args(kwargs)
+ scan_command += ['-I' + srcdir, '-I' + builddir]
+- scan_command += get_include_args(girtargets_inc_dirs)
++ scan_command += state.get_include_args(girtargets_inc_dirs)
+ scan_command += ['--filelist=' + self._make_gir_filelist(state, srcdir, ns, nsversion, girtargets, libsources)]
+ scan_command += self._scan_link_withs(state, depends, kwargs)
+ scan_command += self._scan_include(state, depends, gir_inc_dirs, kwargs)
+@@ -863,8 +862,8 @@ def generate_gir(self, state, args, kwargs):
+ scan_command += ['--cflags-begin']
+ scan_command += cflags
+ scan_command += ['--cflags-end']
+- scan_command += get_include_args(inc_dirs)
+- scan_command += get_include_args(list(gi_includes) + gir_inc_dirs + inc_dirs, prefix='--add-include-path=')
++ scan_command += state.get_include_args(inc_dirs)
++ scan_command += state.get_include_args(list(gi_includes) + gir_inc_dirs + inc_dirs, prefix='--add-include-path=')
+ scan_command += list(internal_ldflags)
+ scan_command += self._scan_gir_targets(state, girtargets)
+ scan_command += self._scan_langs(state, [lc[0] for lc in langs_compilers])
+@@ -886,7 +885,7 @@ def generate_gir(self, state, args, kwargs):
+
+ typelib_output = f'{ns}-{nsversion}.typelib'
+ typelib_cmd = [gicompiler, scan_target, '--output', '@OUTPUT@']
+- typelib_cmd += get_include_args(gir_inc_dirs, prefix='--includedir=')
++ typelib_cmd += state.get_include_args(gir_inc_dirs, prefix='--includedir=')
+
+ for incdir in typelib_includes:
+ typelib_cmd += ["--includedir=" + incdir]
+@@ -1127,7 +1126,7 @@ def _get_build_args(self, kwargs, state, depends):
+ 'Gir include dirs should be include_directories().')
+
+ cflags.extend(deps_cflags)
+- cflags.extend(get_include_args(inc_dirs))
++ cflags.extend(state.get_include_args(inc_dirs))
+ ldflags = []
+ ldflags.extend(internal_ldflags)
+ ldflags.extend(external_ldflags)
+diff --git a/mesonbuild/modules/hotdoc.py b/mesonbuild/modules/hotdoc.py
+index bf8cd229c0d..89a5d938ea7 100644
+--- a/mesonbuild/modules/hotdoc.py
++++ b/mesonbuild/modules/hotdoc.py
+@@ -22,7 +22,6 @@
+ from mesonbuild.coredata import MesonException
+ from . import ModuleReturnValue
+ from . import ExtensionModule
+-from . import get_include_args
+ from ..dependencies import Dependency, InternalDependency
+ from ..interpreterbase import FeatureNew, InvalidArguments, noPosargs, noKwargs
+ from ..interpreter import CustomTargetHolder
+@@ -191,7 +190,7 @@ def process_dependencies(self, deps):
+ for dep in mesonlib.listify(ensure_list(deps)):
+ dep = getattr(dep, "held_object", dep)
+ if isinstance(dep, InternalDependency):
+- inc_args = get_include_args(dep.include_directories)
++ inc_args = self.state.get_include_args(dep.include_directories)
+ cflags.update([self.replace_dirs_in_string(x)
+ for x in inc_args])
+ cflags.update(self.process_dependencies(dep.libraries))
+diff --git a/mesonbuild/modules/qt.py b/mesonbuild/modules/qt.py
+index b7389bd59af..1bf0099d1df 100644
+--- a/mesonbuild/modules/qt.py
++++ b/mesonbuild/modules/qt.py
+@@ -23,7 +23,7 @@
+ from ..mesonlib import MesonException, extract_as_list, File, unholder, version_compare
+ from ..dependencies import Dependency
+ import xml.etree.ElementTree as ET
+-from . import ModuleReturnValue, get_include_args, ExtensionModule
++from . import ModuleReturnValue, ExtensionModule
+ from ..interpreterbase import noPosargs, permittedKwargs, FeatureNew, FeatureNewKwargs
+ from ..interpreter import extract_required_kwarg
+ from ..programs import NonExistingExternalProgram
+@@ -239,7 +239,7 @@ def preprocess(self, state, args, kwargs):
+ ui_gen = build.Generator([self.uic], ui_kwargs)
+ ui_output = ui_gen.process_files(f'Qt{self.qt_version} ui', ui_files, state)
+ sources.append(ui_output)
+- inc = get_include_args(include_dirs=include_directories)
++ inc = state.get_include_args(include_dirs=include_directories)
+ compile_args = []
+ for dep in unholder(dependencies):
+ if isinstance(dep, Dependency):
+diff --git a/mesonbuild/modules/windows.py b/mesonbuild/modules/windows.py
+index d7a86380885..c4fdc196681 100644
+--- a/mesonbuild/modules/windows.py
++++ b/mesonbuild/modules/windows.py
+@@ -19,7 +19,6 @@
+ from .. import mlog
+ from .. import mesonlib, build
+ from ..mesonlib import MachineChoice, MesonException, extract_as_list, unholder
+-from . import get_include_args
+ from . import ModuleReturnValue
+ from . import ExtensionModule
+ from ..interpreter import CustomTargetHolder
+@@ -83,12 +82,12 @@ def compile_resources(self, state, args, kwargs):
+ wrc_depends = extract_as_list(kwargs, 'depends', pop = True)
+ for d in wrc_depends:
+ if isinstance(d, CustomTargetHolder):
+- extra_args += get_include_args([d.outdir_include()])
++ extra_args += state.get_include_args([d.outdir_include()])
+ inc_dirs = extract_as_list(kwargs, 'include_directories', pop = True)
+ for incd in inc_dirs:
+ if not isinstance(incd.held_object, (str, build.IncludeDirs)):
+ raise MesonException('Resource include dirs should be include_directories().')
+- extra_args += get_include_args(inc_dirs)
++ extra_args += state.get_include_args(inc_dirs)
+
+ rescomp, rescomp_type = self._find_resource_compiler(state)
+ if rescomp_type == ResourceCompilerType.rc:
+diff --git a/test cases/frameworks/10 gtk-doc/doc/foobar1/foobar-docs.sgml b/test cases/frameworks/10 gtk-doc/doc/foobar1/foobar-docs.sgml
+index 95f73efdf45..6ccd087dc18 100644
+--- a/test cases/frameworks/10 gtk-doc/doc/foobar1/foobar-docs.sgml
++++ b/test cases/frameworks/10 gtk-doc/doc/foobar1/foobar-docs.sgml
+@@ -35,7 +35,7 @@
+ </partintro>
+ <xi:include href="xml/foo.xml"/>
+ <xi:include href="../../include/bar.xml"/>
+- <xi:include href="xml/foo-version.xml"/>
++ <xi:include href="xml/version.xml"/>
+ </reference>
+
+ </book>
+diff --git a/test cases/frameworks/10 gtk-doc/doc/foobar1/foobar-sections.txt b/test cases/frameworks/10 gtk-doc/doc/foobar1/foobar-sections.txt
+new file mode 100644
+index 00000000000..d14c8dab010
+--- /dev/null
++++ b/test cases/frameworks/10 gtk-doc/doc/foobar1/foobar-sections.txt
+@@ -0,0 +1,16 @@
++<SECTION>
++<FILE>foo</FILE>
++<TITLE>FooObj</TITLE>
++FooObj
++FooObjClass
++foo_do_something
++</SECTION>
++
++<SECTION>
++<FILE>version</FILE>
++<TITLE>version</TITLE>
++FOO_MAJOR_VERSION
++FOO_MINOR_VERSION
++FOO_MICRO_VERSION
++</SECTION>
++
+diff --git a/test cases/frameworks/10 gtk-doc/doc/foobar1/foobar.types b/test cases/frameworks/10 gtk-doc/doc/foobar1/foobar.types
+new file mode 100644
+index 00000000000..0a9c046f3ed
+--- /dev/null
++++ b/test cases/frameworks/10 gtk-doc/doc/foobar1/foobar.types
+@@ -0,0 +1,4 @@
++% This include is useless it's a regression test for https://github.com/mesonbuild/meson/issues/8744
++#include <foo.h>
++
++foo_obj_get_type
+diff --git a/test cases/frameworks/10 gtk-doc/doc/foobar1/meson.build b/test cases/frameworks/10 gtk-doc/doc/foobar1/meson.build
+index 149c6e956aa..f4b3724dbae 100644
+--- a/test cases/frameworks/10 gtk-doc/doc/foobar1/meson.build
++++ b/test cases/frameworks/10 gtk-doc/doc/foobar1/meson.build
+@@ -1,5 +1,9 @@
+ gnome.gtkdoc('foobar',
+- src_dir : inc,
++ src_dir : [inc, '.'],
+ main_sgml : 'foobar-docs.sgml',
+ content_files : [docbook, version_xml],
++ dependencies: foo_dep,
++ # Manually written types file for regression test:
++ # https://github.com/mesonbuild/meson/issues/8744
++ gobject_typesfile: 'foobar.types',
+ install : true)
+diff --git a/test cases/frameworks/10 gtk-doc/foo.c b/test cases/frameworks/10 gtk-doc/foo.c
+new file mode 100644
+index 00000000000..36c0639ec08
+--- /dev/null
++++ b/test cases/frameworks/10 gtk-doc/foo.c
+@@ -0,0 +1,30 @@
++#include <foo.h>
++
++
++struct _FooObj {
++ GObject parent;
++ int dummy;
++};
++
++G_DEFINE_TYPE(FooObj, foo_obj, G_TYPE_OBJECT)
++
++static void foo_obj_init (FooObj *self)
++{
++}
++
++static void foo_obj_class_init (FooObjClass *klass)
++{
++}
++
++/**
++ * foo_do_something:
++ * @self: self
++ *
++ * Useless function.
++ *
++ * Returns: 0.
++ */
++int foo_do_something(FooObj *self)
++{
++ return 0;
++}
+diff --git a/test cases/frameworks/10 gtk-doc/include/foo.h b/test cases/frameworks/10 gtk-doc/include/foo.h
+index 7b8946b6a86..510f3d1ecb5 100644
+--- a/test cases/frameworks/10 gtk-doc/include/foo.h
++++ b/test cases/frameworks/10 gtk-doc/include/foo.h
+@@ -1,5 +1,7 @@
+ #pragma once
+
++#include <glib-object.h>
++
+ /**
+ * FooIndecision:
+ * @FOO_MAYBE: Something maybe
+@@ -13,3 +15,19 @@ typedef enum {
+ FOO_POSSIBLY,
+ } FooIndecision;
+
++/**
++ * FooObjClass:
++ *
++ * The class
++ */
++
++/**
++ * FooObj:
++ *
++ * The instance
++ */
++
++#define FOO_TYPE_OBJ foo_obj_get_type()
++G_DECLARE_FINAL_TYPE(FooObj, foo_obj, FOO, OBJ, GObject)
++
++int foo_do_something(FooObj *self);
+diff --git a/test cases/frameworks/10 gtk-doc/meson.build b/test cases/frameworks/10 gtk-doc/meson.build
+index 5c22ad0afa4..292980fafa7 100644
+--- a/test cases/frameworks/10 gtk-doc/meson.build
++++ b/test cases/frameworks/10 gtk-doc/meson.build
+@@ -24,4 +24,16 @@ if gtkdoc_ver.version_compare('<1.26')
+ error('MESON_SKIP_TEST gtk-doc test requires gtkdoc >= 1.26.')
+ endif
+
++gobject = dependency('gobject-2.0')
++
++libfoo = library('foo', 'foo.c',
++ include_directories: inc,
++ dependencies: gobject,
++)
++
++foo_dep = declare_dependency(
++ link_with: libfoo,
++ include_directories: inc,
++)
++
+ subdir('doc')
+diff --git a/test cases/frameworks/10 gtk-doc/test.json b/test cases/frameworks/10 gtk-doc/test.json
+index c44126cc741..03ad0595817 100644
+--- a/test cases/frameworks/10 gtk-doc/test.json
++++ b/test cases/frameworks/10 gtk-doc/test.json
+@@ -4,8 +4,8 @@
+ {"type": "file", "file": "usr/share/gtk-doc/html/foobar/BAR.html"},
+ {"type": "file", "file": "usr/share/gtk-doc/html/foobar/foobar.devhelp2"},
+ {"type": "file", "file": "usr/share/gtk-doc/html/foobar/foobar.html"},
+- {"type": "file", "file": "usr/share/gtk-doc/html/foobar/foobar-foo.html"},
+- {"type": "file", "file": "usr/share/gtk-doc/html/foobar/foobar-foo-version.html"},
++ {"type": "file", "file": "usr/share/gtk-doc/html/foobar/FooObj.html"},
++ {"type": "file", "file": "usr/share/gtk-doc/html/foobar/foo-version.html"},
+ {"type": "file", "file": "usr/share/gtk-doc/html/foobar/home.png"},
+ {"type": "file", "file": "usr/share/gtk-doc/html/foobar/index.html"},
+ {"type": "file", "file": "usr/share/gtk-doc/html/foobar/left.png"},
diff --git a/meta/recipes-devtools/meson/meson/cross-prop-default.patch b/meta/recipes-devtools/meson/meson/cross-prop-default.patch
deleted file mode 100644
index 772395e879..0000000000
--- a/meta/recipes-devtools/meson/meson/cross-prop-default.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-meson.build files that use cc.run() in native builds can silently fallback to
-meson.get_cross_property() in cross builds without an exe-wrapper, but there's
-no way to know that this is happening.
-
-As the defaults may be pessimistic (for example, disabling the support for a
-feature that should be enabled) emit a warning when the default is used, so that
-the recipe can explicitly set the cross property as relevant.
-
-Upstream-Status: Submitted [https://github.com/mesonbuild/meson/pull/5071]
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py
-index 3c3cfae0..10e741ae 100644
---- a/mesonbuild/interpreter.py
-+++ b/mesonbuild/interpreter.py
-@@ -1890,6 +1890,7 @@ class MesonMain(InterpreterObject):
- return props[propname]
- except Exception:
- if len(args) == 2:
-+ mlog.warning('Cross property %s is using default value %s' % (propname, args[1]))
- return args[1]
- raise InterpreterException('Unknown cross property: %s.' % propname)
-
diff --git a/meta/recipes-devtools/meson/meson_0.57.2.bb b/meta/recipes-devtools/meson/meson_0.58.0.bb
similarity index 100%
rename from meta/recipes-devtools/meson/meson_0.57.2.bb
rename to meta/recipes-devtools/meson/meson_0.58.0.bb
diff --git a/meta/recipes-devtools/meson/nativesdk-meson_0.57.2.bb b/meta/recipes-devtools/meson/nativesdk-meson_0.58.0.bb
similarity index 100%
rename from meta/recipes-devtools/meson/nativesdk-meson_0.57.2.bb
rename to meta/recipes-devtools/meson/nativesdk-meson_0.58.0.bb
--
2.31.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 5/8] meson.bbclass: split python routines into a separate class
2021-05-13 20:56 [PATCH 1/8] gdk-pixbuf: rewrite the cross-build support for tests Alexander Kanavin
` (2 preceding siblings ...)
2021-05-13 20:56 ` [PATCH 4/8] meson: update 0.57.2 -> 0.58.0 Alexander Kanavin
@ 2021-05-13 20:56 ` Alexander Kanavin
2021-05-13 20:56 ` [PATCH 6/8] nativesdk-meson: correctly set cpu_family Alexander Kanavin
` (2 subsequent siblings)
6 siblings, 0 replies; 12+ messages in thread
From: Alexander Kanavin @ 2021-05-13 20:56 UTC (permalink / raw)
To: openembedded-core; +Cc: Alexander Kanavin
This allows reusing them in nativesdk-meson without copy-pasting code.
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
meta/classes/meson-routines.bbclass | 51 ++++++++++++++++++++++++++++
meta/classes/meson.bbclass | 52 +----------------------------
2 files changed, 52 insertions(+), 51 deletions(-)
create mode 100644 meta/classes/meson-routines.bbclass
diff --git a/meta/classes/meson-routines.bbclass b/meta/classes/meson-routines.bbclass
new file mode 100644
index 0000000000..be3aeedeba
--- /dev/null
+++ b/meta/classes/meson-routines.bbclass
@@ -0,0 +1,51 @@
+inherit siteinfo
+
+def meson_array(var, d):
+ items = d.getVar(var).split()
+ return repr(items[0] if len(items) == 1 else items)
+
+# Map our ARCH values to what Meson expects:
+# http://mesonbuild.com/Reference-tables.html#cpu-families
+def meson_cpu_family(var, d):
+ import re
+ arch = d.getVar(var)
+ if arch == 'powerpc':
+ return 'ppc'
+ elif arch == 'powerpc64' or arch == 'powerpc64le':
+ return 'ppc64'
+ elif arch == 'armeb':
+ return 'arm'
+ elif arch == 'aarch64_be':
+ return 'aarch64'
+ elif arch == 'mipsel':
+ return 'mips'
+ elif arch == 'mips64el':
+ return 'mips64'
+ elif re.match(r"i[3-6]86", arch):
+ return "x86"
+ elif arch == "microblazeel":
+ return "microblaze"
+ else:
+ return arch
+
+# Map our OS values to what Meson expects:
+# https://mesonbuild.com/Reference-tables.html#operating-system-names
+def meson_operating_system(var, d):
+ os = d.getVar(var)
+ if "mingw" in os:
+ return "windows"
+ # avoid e.g 'linux-gnueabi'
+ elif "linux" in os:
+ return "linux"
+ else:
+ return os
+
+def meson_endian(prefix, d):
+ arch, os = d.getVar(prefix + "_ARCH"), d.getVar(prefix + "_OS")
+ sitedata = siteinfo_data_for_machine(arch, os, d)
+ if "endian-little" in sitedata:
+ return "little"
+ elif "endian-big" in sitedata:
+ return "big"
+ else:
+ bb.fatal("Cannot determine endianism for %s-%s" % (arch, os))
diff --git a/meta/classes/meson.bbclass b/meta/classes/meson.bbclass
index bf9b02e06e..8ae0285f72 100644
--- a/meta/classes/meson.bbclass
+++ b/meta/classes/meson.bbclass
@@ -1,4 +1,4 @@
-inherit siteinfo python3native
+inherit python3native meson-routines
DEPENDS_append = " meson-native ninja-native"
@@ -35,56 +35,6 @@ MESON_CROSS_FILE = ""
MESON_CROSS_FILE_class-target = "--cross-file ${WORKDIR}/meson.cross"
MESON_CROSS_FILE_class-nativesdk = "--cross-file ${WORKDIR}/meson.cross"
-def meson_array(var, d):
- items = d.getVar(var).split()
- return repr(items[0] if len(items) == 1 else items)
-
-# Map our ARCH values to what Meson expects:
-# http://mesonbuild.com/Reference-tables.html#cpu-families
-def meson_cpu_family(var, d):
- import re
- arch = d.getVar(var)
- if arch == 'powerpc':
- return 'ppc'
- elif arch == 'powerpc64' or arch == 'powerpc64le':
- return 'ppc64'
- elif arch == 'armeb':
- return 'arm'
- elif arch == 'aarch64_be':
- return 'aarch64'
- elif arch == 'mipsel':
- return 'mips'
- elif arch == 'mips64el':
- return 'mips64'
- elif re.match(r"i[3-6]86", arch):
- return "x86"
- elif arch == "microblazeel":
- return "microblaze"
- else:
- return arch
-
-# Map our OS values to what Meson expects:
-# https://mesonbuild.com/Reference-tables.html#operating-system-names
-def meson_operating_system(var, d):
- os = d.getVar(var)
- if "mingw" in os:
- return "windows"
- # avoid e.g 'linux-gnueabi'
- elif "linux" in os:
- return "linux"
- else:
- return os
-
-def meson_endian(prefix, d):
- arch, os = d.getVar(prefix + "_ARCH"), d.getVar(prefix + "_OS")
- sitedata = siteinfo_data_for_machine(arch, os, d)
- if "endian-little" in sitedata:
- return "little"
- elif "endian-big" in sitedata:
- return "big"
- else:
- bb.fatal("Cannot determine endianism for %s-%s" % (arch, os))
-
addtask write_config before do_configure
do_write_config[vardeps] += "CC CXX LD AR NM STRIP READELF CFLAGS CXXFLAGS LDFLAGS"
do_write_config() {
--
2.31.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 6/8] nativesdk-meson: correctly set cpu_family
2021-05-13 20:56 [PATCH 1/8] gdk-pixbuf: rewrite the cross-build support for tests Alexander Kanavin
` (3 preceding siblings ...)
2021-05-13 20:56 ` [PATCH 5/8] meson.bbclass: split python routines into a separate class Alexander Kanavin
@ 2021-05-13 20:56 ` Alexander Kanavin
2021-05-13 20:56 ` [PATCH 7/8] gstreamer1.0-plugins-base: backport a patch to fix meson 0.58 builds Alexander Kanavin
2021-05-13 20:56 ` [PATCH 8/8] qemu: " Alexander Kanavin
6 siblings, 0 replies; 12+ messages in thread
From: Alexander Kanavin @ 2021-05-13 20:56 UTC (permalink / raw)
To: openembedded-core; +Cc: Alexander Kanavin
This was a warning before, but with the patch
that turns it into an error, it needs to be properly addressed.
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
.../meson/nativesdk-meson_0.58.0.bb | 14 ++------------
1 file changed, 2 insertions(+), 12 deletions(-)
diff --git a/meta/recipes-devtools/meson/nativesdk-meson_0.58.0.bb b/meta/recipes-devtools/meson/nativesdk-meson_0.58.0.bb
index 8778cab124..74e1a7104a 100644
--- a/meta/recipes-devtools/meson/nativesdk-meson_0.58.0.bb
+++ b/meta/recipes-devtools/meson/nativesdk-meson_0.58.0.bb
@@ -1,21 +1,11 @@
include meson.inc
-inherit siteinfo
+inherit meson-routines
inherit nativesdk
SRC_URI += "file://meson-setup.py \
file://meson-wrapper"
-def meson_endian(prefix, d):
- arch, os = d.getVar(prefix + "_ARCH"), d.getVar(prefix + "_OS")
- sitedata = siteinfo_data_for_machine(arch, os, d)
- if "endian-little" in sitedata:
- return "little"
- elif "endian-big" in sitedata:
- return "big"
- else:
- bb.fatal("Cannot determine endianism for %s-%s" % (arch, os))
-
# The cross file logic is similar but not identical to that in meson.bbclass,
# since it's generating for an SDK rather than a cross-compile. Important
# differences are:
@@ -44,7 +34,7 @@ sys_root = @OECORE_TARGET_SYSROOT
[host_machine]
system = '${SDK_OS}'
-cpu_family = '${SDK_ARCH}'
+cpu_family = '${@meson_cpu_family("SDK_ARCH", d)}'
cpu = '${SDK_ARCH}'
endian = '${@meson_endian("SDK", d)}'
EOF
--
2.31.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 7/8] gstreamer1.0-plugins-base: backport a patch to fix meson 0.58 builds
2021-05-13 20:56 [PATCH 1/8] gdk-pixbuf: rewrite the cross-build support for tests Alexander Kanavin
` (4 preceding siblings ...)
2021-05-13 20:56 ` [PATCH 6/8] nativesdk-meson: correctly set cpu_family Alexander Kanavin
@ 2021-05-13 20:56 ` Alexander Kanavin
2021-05-13 20:56 ` [PATCH 8/8] qemu: " Alexander Kanavin
6 siblings, 0 replies; 12+ messages in thread
From: Alexander Kanavin @ 2021-05-13 20:56 UTC (permalink / raw)
To: openembedded-core; +Cc: Alexander Kanavin
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
...c91697a141fea7317aff7f0f28e5a861db99.patch | 50 +++++++++++++++++++
.../gstreamer1.0-plugins-base_1.18.4.bb | 1 +
2 files changed, 51 insertions(+)
create mode 100644 meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/4ef5c91697a141fea7317aff7f0f28e5a861db99.patch
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/4ef5c91697a141fea7317aff7f0f28e5a861db99.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/4ef5c91697a141fea7317aff7f0f28e5a861db99.patch
new file mode 100644
index 0000000000..a2f5dff5e9
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/4ef5c91697a141fea7317aff7f0f28e5a861db99.patch
@@ -0,0 +1,50 @@
+From 4ef5c91697a141fea7317aff7f0f28e5a861db99 Mon Sep 17 00:00:00 2001
+From: Xavier Claessens <xavier.claessens@collabora.com>
+Date: Mon, 26 Apr 2021 14:25:03 -0400
+Subject: [PATCH] gstgl: Fix build when Meson >= 0.58.0rc1
+
+"implicit_include_directories: false" now also means that current build
+directory is not added to include paths by default any more. We have to
+add it manually because we have some custom_target() that generate
+headers in current build directory.
+
+See https://github.com/mesonbuild/meson/issues/8700.
+
+Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1125>
+Upstream-Status: Backport
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ gst-libs/gst/gl/meson.build | 15 ++++++++++++---
+ 1 file changed, 12 insertions(+), 3 deletions(-)
+
+diff --git a/gst-libs/gst/gl/meson.build b/gst-libs/gst/gl/meson.build
+index 66668644e..53891625a 100644
+--- a/gst-libs/gst/gl/meson.build
++++ b/gst-libs/gst/gl/meson.build
+@@ -1004,11 +1004,20 @@ if build_gstgl
+ command : [mkenums, glib_mkenums, '@OUTPUT@', '@INPUT@'])
+ gen_sources = [gl_enumtypes_h]
+
++ common_args = gst_plugins_base_args + gl_cpp_args + ['-DBUILDING_GST_GL']
++
++ # We have custom_target() that generate headers in the current build dir,
++ # but with implicit_include_directories: false, meson >= 0.58.0 won't include
++ # it by default. We cannot use include_directories('.') here because it would
++ # also include current source dir which is what we want to avoid because
++ # case-insensitive FS would include gst-libs/gl/egl/egl.h as EGL/egl.h.
++ common_args += '-I@0@'.format(meson.current_build_dir())
++
+ gstgl = library('gstgl-' + api_version,
+ gl_sources, gl_egl_sources, gl_x11_sources, gl_wayland_sources, gl_priv_sources, gl_enumtypes_c, gl_enumtypes_h,
+- c_args : gst_plugins_base_args + gl_cpp_args + ['-DBUILDING_GST_GL'],
+- cpp_args : gst_plugins_base_args + gl_cpp_args + ['-DBUILDING_GST_GL'],
+- objc_args : gst_plugins_base_args + gl_cpp_args + gl_objc_args + ['-DBUILDING_GST_GL'],
++ c_args : common_args,
++ cpp_args : common_args,
++ objc_args : common_args + gl_objc_args,
+ include_directories : [configinc, libsinc, gl_includes],
+ version : libversion,
+ soversion : soversion,
+--
+GitLab
+
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.18.4.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.18.4.bb
index beddfb0386..73b433ab91 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.18.4.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.18.4.bb
@@ -11,6 +11,7 @@ SRC_URI = "https://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-ba
file://0003-viv-fb-Make-sure-config.h-is-included.patch \
file://0002-ssaparse-enhance-SSA-text-lines-parsing.patch \
file://0004-glimagesink-Downrank-to-marginal.patch \
+ file://4ef5c91697a141fea7317aff7f0f28e5a861db99.patch \
"
SRC_URI[sha256sum] = "29e53229a84d01d722f6f6db13087231cdf6113dd85c25746b9b58c3d68e8323"
--
2.31.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 8/8] qemu: backport a patch to fix meson 0.58 builds
2021-05-13 20:56 [PATCH 1/8] gdk-pixbuf: rewrite the cross-build support for tests Alexander Kanavin
` (5 preceding siblings ...)
2021-05-13 20:56 ` [PATCH 7/8] gstreamer1.0-plugins-base: backport a patch to fix meson 0.58 builds Alexander Kanavin
@ 2021-05-13 20:56 ` Alexander Kanavin
6 siblings, 0 replies; 12+ messages in thread
From: Alexander Kanavin @ 2021-05-13 20:56 UTC (permalink / raw)
To: openembedded-core; +Cc: Alexander Kanavin
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
meta/recipes-devtools/qemu/qemu.inc | 1 +
...igure-fix-detection-of-gdbus-codegen.patch | 53 +++++++++++++++++++
2 files changed, 54 insertions(+)
create mode 100644 meta/recipes-devtools/qemu/qemu/0001-configure-fix-detection-of-gdbus-codegen.patch
diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc
index 82d1cb5566..74c53c6309 100644
--- a/meta/recipes-devtools/qemu/qemu.inc
+++ b/meta/recipes-devtools/qemu/qemu.inc
@@ -57,6 +57,7 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \
file://CVE-2020-27821.patch \
file://CVE-2021-20263.patch \
file://CVE-2021-3392.patch \
+ file://0001-configure-fix-detection-of-gdbus-codegen.patch \
"
UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar"
diff --git a/meta/recipes-devtools/qemu/qemu/0001-configure-fix-detection-of-gdbus-codegen.patch b/meta/recipes-devtools/qemu/qemu/0001-configure-fix-detection-of-gdbus-codegen.patch
new file mode 100644
index 0000000000..1f20077883
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu/0001-configure-fix-detection-of-gdbus-codegen.patch
@@ -0,0 +1,53 @@
+From 464cfc64201b21386030b8f353fe9724a3413a85 Mon Sep 17 00:00:00 2001
+From: Paolo Bonzini <pbonzini@redhat.com>
+Date: Wed, 5 May 2021 10:15:34 -0400
+Subject: [PATCH] configure: fix detection of gdbus-codegen
+
+"pkg-config --variable=gdbus_codegen gio-2.0" returns "gdbus-codegen",
+and it does not pass test -x (which does not walk the path).
+
+Meson 0.58.0 notices that something is iffy, as the dbus_vmstate1
+assignment in tests/qtest/meson.build uses an empty string as the
+command, and fails very eloquently:
+
+../tests/qtest/meson.build:92:2: ERROR: No program name specified.
+
+Use the "has" function instead of test -x, and fix the generation
+of config-host.mak since meson.build expects that GDBUS_CODEGEN
+is absent, rather than empty, if the tool is unavailable.
+
+Reported-by: Sebastian Mitterle <smitterl@redhat.com>
+Fixes: #178
+Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
+Upstream-Status: Backport [https://git.qemu.org/?p=qemu.git;a=commitdiff;h=5ecfb76ccc056eb6127e44268e475827ae73b9e0]
+(not in 6.0.0, should be kept when upgrading)
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ configure | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/configure b/configure
+index 18c26e0389..4c36e221d3 100755
+--- a/configure
++++ b/configure
+@@ -3496,7 +3496,7 @@ if $pkg_config --atleast-version=$glib_req_ver gio-2.0; then
+ gio_cflags=$($pkg_config --cflags gio-2.0)
+ gio_libs=$($pkg_config --libs gio-2.0)
+ gdbus_codegen=$($pkg_config --variable=gdbus_codegen gio-2.0)
+- if [ ! -x "$gdbus_codegen" ]; then
++ if ! has "$gdbus_codegen"; then
+ gdbus_codegen=
+ fi
+ # Check that the libraries actually work -- Ubuntu 18.04 ships
+@@ -6172,6 +6172,8 @@ if test "$gio" = "yes" ; then
+ echo "CONFIG_GIO=y" >> $config_host_mak
+ echo "GIO_CFLAGS=$gio_cflags" >> $config_host_mak
+ echo "GIO_LIBS=$gio_libs" >> $config_host_mak
++fi
++if test "$gdbus_codegen" != "" ; then
+ echo "GDBUS_CODEGEN=$gdbus_codegen" >> $config_host_mak
+ fi
+ echo "CONFIG_TLS_PRIORITY=\"$tls_priority\"" >> $config_host_mak
+--
+2.24.0
+
--
2.31.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [OE-core] [PATCH 4/8] meson: update 0.57.2 -> 0.58.0
2021-05-13 20:56 ` [PATCH 4/8] meson: update 0.57.2 -> 0.58.0 Alexander Kanavin
@ 2021-05-14 13:45 ` Khem Raj
2021-05-14 13:59 ` Alexander Kanavin
0 siblings, 1 reply; 12+ messages in thread
From: Khem Raj @ 2021-05-14 13:45 UTC (permalink / raw)
To: Alexander Kanavin; +Cc: Patches and discussions about the oe-core layer
breaks nautilus https://errors.yoctoproject.org/Errors/Details/581184/
On Thu, May 13, 2021 at 1:56 PM Alexander Kanavin
<alex.kanavin@gmail.com> wrote:
>
> Rebase patches; dropped chunks (and cross-prop-default.patch)
> have been removed upstream.
>
> Move native-only patches to all-patches, as they're a pain to rebase
> separately.
>
> Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
> ---
> meta/recipes-devtools/meson/meson.inc | 11 +-
> .../0001-Make-CPU-family-warnings-fatal.patch | 18 +-
> ...sues-that-arise-when-cross-compiling.patch | 8 +-
> ...-not-manipulate-the-environment-when.patch | 14 +-
> ...pport-building-allarch-recipes-again.patch | 10 +-
> .../meson/meson/0003-native_bindir.patch | 58 +--
> ...2c19e693a69b0650ce6c8a8903163c959996.patch | 412 ++++++++++++++++++
> .../meson/meson/cross-prop-default.patch | 23 -
> .../{meson_0.57.2.bb => meson_0.58.0.bb} | 0
> ...on_0.57.2.bb => nativesdk-meson_0.58.0.bb} | 0
> 10 files changed, 456 insertions(+), 98 deletions(-)
> create mode 100644 meta/recipes-devtools/meson/meson/4e312c19e693a69b0650ce6c8a8903163c959996.patch
> delete mode 100644 meta/recipes-devtools/meson/meson/cross-prop-default.patch
> rename meta/recipes-devtools/meson/{meson_0.57.2.bb => meson_0.58.0.bb} (100%)
> rename meta/recipes-devtools/meson/{nativesdk-meson_0.57.2.bb => nativesdk-meson_0.58.0.bb} (100%)
>
> diff --git a/meta/recipes-devtools/meson/meson.inc b/meta/recipes-devtools/meson/meson.inc
> index 10e7d8a1ce..f60381453b 100644
> --- a/meta/recipes-devtools/meson/meson.inc
> +++ b/meta/recipes-devtools/meson/meson.inc
> @@ -12,16 +12,13 @@ SRC_URI = "https://github.com/mesonbuild/meson/releases/download/${PV}/meson-${P
> file://0003-native_bindir.patch \
> file://0001-python-module-do-not-manipulate-the-environment-when.patch \
> file://disable-rpath-handling.patch \
> - file://cross-prop-default.patch \
> file://0001-modules-python.py-do-not-substitute-python-s-install.patch \
> file://gi-target-dep.patch \
> + file://0001-Make-CPU-family-warnings-fatal.patch \
> + file://0002-Support-building-allarch-recipes-again.patch \
> + file://4e312c19e693a69b0650ce6c8a8903163c959996.patch \
> "
> -SRC_URI[sha256sum] = "3a83e7b1c5de94fa991ec34d9b198d94f38ed699d3524cb0fdf3b99fd23d4cc5"
> -
> -SRC_URI_append_class-native = " \
> - file://0001-Make-CPU-family-warnings-fatal.patch \
> - file://0002-Support-building-allarch-recipes-again.patch \
> -"
> +SRC_URI[sha256sum] = "f4820df0bc969c99019fd4af8ca5f136ee94c63d8a5ad67e7eb73bdbc9182fdd"
>
> UPSTREAM_CHECK_URI = "https://github.com/mesonbuild/meson/releases"
> UPSTREAM_CHECK_REGEX = "meson-(?P<pver>\d+(\.\d+)+)\.tar"
> diff --git a/meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch b/meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch
> index 300797f9ee..bcccfabd17 100644
> --- a/meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch
> +++ b/meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch
> @@ -1,34 +1,33 @@
> -From 198e2de24adf5845e3ba389b533cf43440ee8acb Mon Sep 17 00:00:00 2001
> +From b64032a2eb1fb760f4ffd5b4b666e2433cf80d39 Mon Sep 17 00:00:00 2001
> From: Ross Burton <ross.burton@intel.com>
> Date: Tue, 3 Jul 2018 13:59:09 +0100
> -Subject: [PATCH] Make CPU family warnings fatal
> +Subject: [PATCH 1/2] Make CPU family warnings fatal
>
> Upstream-Status: Inappropriate [OE specific]
> Signed-off-by: Ross Burton <ross.burton@intel.com>
> -
> ---
> mesonbuild/envconfig.py | 2 +-
> mesonbuild/environment.py | 4 +---
> 2 files changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/mesonbuild/envconfig.py b/mesonbuild/envconfig.py
> -index ba35d16..2d3c34c 100644
> +index c6a4df3..4d58c91 100644
> --- a/mesonbuild/envconfig.py
> +++ b/mesonbuild/envconfig.py
> -@@ -262,7 +262,7 @@ class MachineInfo:
> +@@ -266,7 +266,7 @@ class MachineInfo:
>
> cpu_family = literal['cpu_family']
> if cpu_family not in known_cpu_families:
> -- mlog.warning('Unknown CPU family {}, please report this at https://github.com/mesonbuild/meson/issues/new'.format(cpu_family))
> +- mlog.warning(f'Unknown CPU family {cpu_family}, please report this at https://github.com/mesonbuild/meson/issues/new')
> + raise EnvironmentException('Unknown CPU family {}, see https://wiki.yoctoproject.org/wiki/Meson/UnknownCPU for directions.'.format(cpu_family))
>
> endian = literal['endian']
> if endian not in ('little', 'big'):
> diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
> -index 756dd81..4d2c2b6 100644
> +index fc9b703..eea8345 100644
> --- a/mesonbuild/environment.py
> +++ b/mesonbuild/environment.py
> -@@ -434,9 +434,7 @@ def detect_cpu_family(compilers: CompilersDict) -> str:
> +@@ -436,9 +436,7 @@ def detect_cpu_family(compilers: CompilersDict) -> str:
> trial = 'ppc64'
>
> if trial not in known_cpu_families:
> @@ -39,3 +38,6 @@ index 756dd81..4d2c2b6 100644
>
> return trial
>
> +--
> +2.24.0
> +
> diff --git a/meta/recipes-devtools/meson/meson/0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch b/meta/recipes-devtools/meson/meson/0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch
> index 471f1500da..ce90e515da 100644
> --- a/meta/recipes-devtools/meson/meson/0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch
> +++ b/meta/recipes-devtools/meson/meson/0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch
> @@ -1,4 +1,4 @@
> -From d3ef01a4208a801acad380a4aaceb6a21f8fa603 Mon Sep 17 00:00:00 2001
> +From 2f9c59e0489e569c5382404667c10f5c200a72ad Mon Sep 17 00:00:00 2001
> From: Alexander Kanavin <alex.kanavin@gmail.com>
> Date: Fri, 4 Aug 2017 16:16:41 +0300
> Subject: [PATCH] gtkdoc: fix issues that arise when cross-compiling
> @@ -20,11 +20,11 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
> 1 file changed, 4 insertions(+)
>
> diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py
> -index bcf77b9..6a4b472 100644
> +index dc2979e..c9ff9bd 100644
> --- a/mesonbuild/modules/gnome.py
> +++ b/mesonbuild/modules/gnome.py
> -@@ -974,6 +974,10 @@ This will become a hard error in the future.''')
> - args.append('--{}={}'.format(program_name, path))
> +@@ -1053,6 +1053,10 @@ class GnomeModule(ExtensionModule):
> + args.append(f'--{program_name}={path}')
> if namespace:
> args.append('--namespace=' + namespace)
> + gtkdoc_exe_wrapper = state.environment.properties.host.get('gtkdoc_exe_wrapper', None)
> diff --git a/meta/recipes-devtools/meson/meson/0001-python-module-do-not-manipulate-the-environment-when.patch b/meta/recipes-devtools/meson/meson/0001-python-module-do-not-manipulate-the-environment-when.patch
> index eb0e90dbdd..fdadc6869b 100644
> --- a/meta/recipes-devtools/meson/meson/0001-python-module-do-not-manipulate-the-environment-when.patch
> +++ b/meta/recipes-devtools/meson/meson/0001-python-module-do-not-manipulate-the-environment-when.patch
> @@ -1,4 +1,4 @@
> -From 689e28c49b85311f93f39df70cbee702fc44afb6 Mon Sep 17 00:00:00 2001
> +From 2264e67d7c2c22ca634fd26ea8ada6f0344ab280 Mon Sep 17 00:00:00 2001
> From: Alexander Kanavin <alex.kanavin@gmail.com>
> Date: Mon, 19 Nov 2018 14:24:26 +0100
> Subject: [PATCH] python module: do not manipulate the environment when calling
> @@ -12,10 +12,10 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
> 1 file changed, 12 deletions(-)
>
> diff --git a/mesonbuild/modules/python.py b/mesonbuild/modules/python.py
> -index 07be318..b770603 100644
> +index 422155b..aaf5844 100644
> --- a/mesonbuild/modules/python.py
> +++ b/mesonbuild/modules/python.py
> -@@ -71,11 +71,6 @@ class PythonDependency(ExternalDependency):
> +@@ -70,11 +70,6 @@ class PythonDependency(ExternalDependency):
> old_pkg_libdir = os.environ.get('PKG_CONFIG_LIBDIR')
> old_pkg_path = os.environ.get('PKG_CONFIG_PATH')
>
> @@ -26,9 +26,9 @@ index 07be318..b770603 100644
> -
> try:
> self.pkgdep = PkgConfigDependency(pkg_name, environment, kwargs)
> - mlog.debug('Found "{}" via pkgconfig lookup in LIBPC ({})'.format(pkg_name, pkg_libdir))
> -@@ -84,13 +79,6 @@ class PythonDependency(ExternalDependency):
> - mlog.debug('"{}" could not be found in LIBPC ({})'.format(pkg_name, pkg_libdir))
> + mlog.debug(f'Found "{pkg_name}" via pkgconfig lookup in LIBPC ({pkg_libdir})')
> +@@ -83,13 +78,6 @@ class PythonDependency(ExternalDependency):
> + mlog.debug(f'"{pkg_name}" could not be found in LIBPC ({pkg_libdir})')
> mlog.debug(e)
>
> - if old_pkg_path is not None:
> @@ -39,5 +39,5 @@ index 07be318..b770603 100644
> - else:
> - os.environ.pop('PKG_CONFIG_LIBDIR', None)
> else:
> - mlog.debug('"{}" could not be found in LIBPC ({}), this is likely due to a relocated python installation'.format(pkg_name, pkg_libdir))
> + mlog.debug(f'"{pkg_name}" could not be found in LIBPC ({pkg_libdir}), this is likely due to a relocated python installation')
>
> diff --git a/meta/recipes-devtools/meson/meson/0002-Support-building-allarch-recipes-again.patch b/meta/recipes-devtools/meson/meson/0002-Support-building-allarch-recipes-again.patch
> index f6175a194c..dcc1ce9c27 100644
> --- a/meta/recipes-devtools/meson/meson/0002-Support-building-allarch-recipes-again.patch
> +++ b/meta/recipes-devtools/meson/meson/0002-Support-building-allarch-recipes-again.patch
> @@ -1,19 +1,18 @@
> -From ac1021a3abf612e8be9b19eecb97062e0c314701 Mon Sep 17 00:00:00 2001
> +From 656bf55fed01df2d2e2ad6d9d9887173cb16b85c Mon Sep 17 00:00:00 2001
> From: Peter Kjellerstedt <pkj@axis.com>
> Date: Thu, 26 Jul 2018 16:32:49 +0200
> -Subject: [PATCH] Support building allarch recipes again
> +Subject: [PATCH 2/2] Support building allarch recipes again
>
> This registers "allarch" as a known CPU family.
>
> Upstream-Status: Inappropriate [OE specific]
> Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
> -
> ---
> mesonbuild/envconfig.py | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/mesonbuild/envconfig.py b/mesonbuild/envconfig.py
> -index 2d3c34c..b9e7908 100644
> +index 4d58c91..ff01ad1 100644
> --- a/mesonbuild/envconfig.py
> +++ b/mesonbuild/envconfig.py
> @@ -36,6 +36,7 @@ from pathlib import Path
> @@ -24,3 +23,6 @@ index 2d3c34c..b9e7908 100644
> 'aarch64',
> 'alpha',
> 'arc',
> +--
> +2.24.0
> +
> diff --git a/meta/recipes-devtools/meson/meson/0003-native_bindir.patch b/meta/recipes-devtools/meson/meson/0003-native_bindir.patch
> index ed85116c4f..89257b9e05 100644
> --- a/meta/recipes-devtools/meson/meson/0003-native_bindir.patch
> +++ b/meta/recipes-devtools/meson/meson/0003-native_bindir.patch
> @@ -1,4 +1,4 @@
> -From 1546e1f95a119175b7a4e4272a26dd85505e5ede Mon Sep 17 00:00:00 2001
> +From 30e97d4090a3d3f5b7ddcaf27cfa17f3c8c1d462 Mon Sep 17 00:00:00 2001
> From: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
> Date: Wed, 15 Nov 2017 15:05:01 +0100
> Subject: [PATCH] native_bindir
> @@ -18,23 +18,22 @@ Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
>
> ---
> mesonbuild/dependencies/base.py | 19 +++++++++++--------
> - mesonbuild/dependencies/ui.py | 6 +++---
> - 2 files changed, 14 insertions(+), 11 deletions(-)
> + 1 file changed, 11 insertions(+), 8 deletions(-)
>
> diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py
> -index cd77b4b..7e3f338 100644
> +index 14380d4..d0c443f 100644
> --- a/mesonbuild/dependencies/base.py
> +++ b/mesonbuild/dependencies/base.py
> -@@ -192,7 +192,7 @@ class Dependency:
> +@@ -179,7 +179,7 @@ class Dependency:
> def get_exe_args(self, compiler):
> return []
>
> - def get_pkgconfig_variable(self, variable_name: str, kwargs: T.Dict[str, T.Any]) -> str:
> + def get_pkgconfig_variable(self, variable_name: str, kwargs: T.Dict[str, T.Any], use_native=False) -> str:
> - raise DependencyException('{!r} is not a pkgconfig dependency'.format(self.name))
> + raise DependencyException(f'{self.name!r} is not a pkgconfig dependency')
>
> def get_configtool_variable(self, variable_name):
> -@@ -280,7 +280,7 @@ class InternalDependency(Dependency):
> +@@ -267,7 +267,7 @@ class InternalDependency(Dependency):
> return True
> return any(d.is_built() for d in self.ext_deps)
>
> @@ -43,7 +42,7 @@ index cd77b4b..7e3f338 100644
> raise DependencyException('Method "get_pkgconfig_variable()" is '
> 'invalid for an internal dependency')
>
> -@@ -658,8 +658,11 @@ class PkgConfigDependency(ExternalDependency):
> +@@ -645,8 +645,11 @@ class PkgConfigDependency(ExternalDependency):
> return s.format(self.__class__.__name__, self.name, self.is_found,
> self.version_reqs)
>
> @@ -57,16 +56,16 @@ index cd77b4b..7e3f338 100644
> p, out, err = Popen_safe(cmd, env=env)
> rc, out, err = p.returncode, out.strip(), err.strip()
> call = ' '.join(cmd)
> -@@ -685,7 +688,7 @@ class PkgConfigDependency(ExternalDependency):
> - env['PKG_CONFIG_LIBDIR'] = new_pkg_config_libdir
> - mlog.debug('PKG_CONFIG_LIBDIR: ' + new_pkg_config_libdir)
> +@@ -674,7 +677,7 @@ class PkgConfigDependency(ExternalDependency):
> + if key.startswith('PKG_'):
> + mlog.debug(f'env[{key}]: {value}')
>
> - def _call_pkgbin(self, args, env=None):
> + def _call_pkgbin(self, args, env=None, use_native=False):
> # Always copy the environment since we're going to modify it
> # with pkg-config variables
> if env is None:
> -@@ -699,7 +702,7 @@ class PkgConfigDependency(ExternalDependency):
> +@@ -688,7 +691,7 @@ class PkgConfigDependency(ExternalDependency):
> targs = tuple(args)
> cache = PkgConfigDependency.pkgbin_cache
> if (self.pkgbin, targs, fenv) not in cache:
> @@ -75,7 +74,7 @@ index cd77b4b..7e3f338 100644
> return cache[(self.pkgbin, targs, fenv)]
>
> def _convert_mingw_paths(self, args: T.List[str]) -> T.List[str]:
> -@@ -905,7 +908,7 @@ class PkgConfigDependency(ExternalDependency):
> +@@ -894,7 +897,7 @@ class PkgConfigDependency(ExternalDependency):
> (self.name, out_raw))
> self.link_args, self.raw_link_args = self._search_libs(out, out_raw)
>
> @@ -84,7 +83,7 @@ index cd77b4b..7e3f338 100644
> options = ['--variable=' + variable_name, self.name]
>
> if 'define_variable' in kwargs:
> -@@ -918,7 +921,7 @@ class PkgConfigDependency(ExternalDependency):
> +@@ -907,7 +910,7 @@ class PkgConfigDependency(ExternalDependency):
>
> options = ['--define-variable=' + '='.join(definition)] + options
>
> @@ -93,34 +92,3 @@ index cd77b4b..7e3f338 100644
> variable = ''
> if ret != 0:
> if self.required:
> -diff --git a/mesonbuild/dependencies/ui.py b/mesonbuild/dependencies/ui.py
> -index d897d76..a598d2e 100644
> ---- a/mesonbuild/dependencies/ui.py
> -+++ b/mesonbuild/dependencies/ui.py
> -@@ -325,7 +325,7 @@ class QtBaseDependency(ExternalDependency):
> - self.bindir = self.get_pkgconfig_host_bins(core)
> - if not self.bindir:
> - # If exec_prefix is not defined, the pkg-config file is broken
> -- prefix = core.get_pkgconfig_variable('exec_prefix', {})
> -+ prefix = core.get_pkgconfig_variable('exec_prefix', {}, use_native=True)
> - if prefix:
> - self.bindir = os.path.join(prefix, 'bin')
> -
> -@@ -528,7 +528,7 @@ class Qt4Dependency(QtBaseDependency):
> - applications = ['moc', 'uic', 'rcc', 'lupdate', 'lrelease']
> - for application in applications:
> - try:
> -- return os.path.dirname(core.get_pkgconfig_variable('%s_location' % application, {}))
> -+ return os.path.dirname(core.get_pkgconfig_variable('%s_location' % application, {}, use_native=True))
> - except MesonException:
> - pass
> -
> -@@ -538,7 +538,7 @@ class Qt5Dependency(QtBaseDependency):
> - QtBaseDependency.__init__(self, 'qt5', env, kwargs)
> -
> - def get_pkgconfig_host_bins(self, core):
> -- return core.get_pkgconfig_variable('host_bins', {})
> -+ return core.get_pkgconfig_variable('host_bins', {}, use_native=True)
> -
> - def get_private_includes(self, mod_inc_dir, module):
> - return _qt_get_private_includes(mod_inc_dir, module, self.version)
> diff --git a/meta/recipes-devtools/meson/meson/4e312c19e693a69b0650ce6c8a8903163c959996.patch b/meta/recipes-devtools/meson/meson/4e312c19e693a69b0650ce6c8a8903163c959996.patch
> new file mode 100644
> index 0000000000..76daf019b0
> --- /dev/null
> +++ b/meta/recipes-devtools/meson/meson/4e312c19e693a69b0650ce6c8a8903163c959996.patch
> @@ -0,0 +1,412 @@
> +From 4e312c19e693a69b0650ce6c8a8903163c959996 Mon Sep 17 00:00:00 2001
> +From: Xavier Claessens <xavier.claessens@collabora.com>
> +Date: Tue, 11 May 2021 09:18:47 -0400
> +Subject: [PATCH] gnome: Fix gtkdoc generation
> +
> +install_scripts used to replace @BUILD_ROOT@ and @SOURCE_ROOT@ but it
> +was not documented and got removed in Meson 0.58.0. gnome.gtkdoc() was
> +relying on that behaviour, but it has always been broken in the case the
> +source or build directory contains spaces.
> +
> +Fix this by changing get_include_args() to substitue paths directly
> +which will then get escaped correctly.
> +
> +Add a unit test that builds GObject documentation which is where this
> +issue has been spotted.
> +
> +Fixes: #8744
> +Upstream-Status: Backport
> +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
> +---
> + mesonbuild/modules/__init__.py | 54 +++++++++----------
> + mesonbuild/modules/gnome.py | 15 +++---
> + mesonbuild/modules/hotdoc.py | 3 +-
> + mesonbuild/modules/qt.py | 4 +-
> + mesonbuild/modules/windows.py | 5 +-
> + .../10 gtk-doc/doc/foobar1/foobar-docs.sgml | 2 +-
> + .../doc/foobar1/foobar-sections.txt | 16 ++++++
> + .../10 gtk-doc/doc/foobar1/foobar.types | 4 ++
> + .../10 gtk-doc/doc/foobar1/meson.build | 6 ++-
> + test cases/frameworks/10 gtk-doc/foo.c | 30 +++++++++++
> + .../frameworks/10 gtk-doc/include/foo.h | 18 +++++++
> + test cases/frameworks/10 gtk-doc/meson.build | 12 +++++
> + test cases/frameworks/10 gtk-doc/test.json | 4 +-
> + 13 files changed, 127 insertions(+), 46 deletions(-)
> + create mode 100644 test cases/frameworks/10 gtk-doc/doc/foobar1/foobar-sections.txt
> + create mode 100644 test cases/frameworks/10 gtk-doc/doc/foobar1/foobar.types
> + create mode 100644 test cases/frameworks/10 gtk-doc/foo.c
> +
> +diff --git a/mesonbuild/modules/__init__.py b/mesonbuild/modules/__init__.py
> +index ddb5e3e6cf3..c0970294c34 100644
> +--- a/mesonbuild/modules/__init__.py
> ++++ b/mesonbuild/modules/__init__.py
> +@@ -56,6 +56,33 @@ def __init__(self, interpreter: 'Interpreter') -> None:
> + self.target_machine = interpreter.builtin['target_machine'].held_object
> + self.current_node = interpreter.current_node
> +
> ++ def get_include_args(self, include_dirs, prefix='-I'):
> ++ if not include_dirs:
> ++ return []
> ++
> ++ srcdir = self.environment.get_source_dir()
> ++ builddir = self.environment.get_build_dir()
> ++
> ++ dirs_str = []
> ++ for dirs in unholder(include_dirs):
> ++ if isinstance(dirs, str):
> ++ dirs_str += [f'{prefix}{dirs}']
> ++ continue
> ++
> ++ # Should be build.IncludeDirs object.
> ++ basedir = dirs.get_curdir()
> ++ for d in dirs.get_incdirs():
> ++ expdir = os.path.join(basedir, d)
> ++ srctreedir = os.path.join(srcdir, expdir)
> ++ buildtreedir = os.path.join(builddir, expdir)
> ++ dirs_str += [f'{prefix}{buildtreedir}',
> ++ f'{prefix}{srctreedir}']
> ++ for d in dirs.get_extra_build_dirs():
> ++ dirs_str += [f'{prefix}{d}']
> ++
> ++ return dirs_str
> ++
> ++
> + class ModuleObject:
> + """Base class for all objects returned by modules
> + """
> +@@ -71,33 +98,6 @@ def __init__(self, interpreter: T.Optional['Interpreter'] = None) -> None:
> + class ExtensionModule(ModuleObject):
> + pass
> +
> +-def get_include_args(include_dirs, prefix='-I'):
> +- '''
> +- Expand include arguments to refer to the source and build dirs
> +- by using @SOURCE_ROOT@ and @BUILD_ROOT@ for later substitution
> +- '''
> +- if not include_dirs:
> +- return []
> +-
> +- dirs_str = []
> +- for dirs in unholder(include_dirs):
> +- if isinstance(dirs, str):
> +- dirs_str += [f'{prefix}{dirs}']
> +- continue
> +-
> +- # Should be build.IncludeDirs object.
> +- basedir = dirs.get_curdir()
> +- for d in dirs.get_incdirs():
> +- expdir = os.path.join(basedir, d)
> +- srctreedir = os.path.join('@SOURCE_ROOT@', expdir)
> +- buildtreedir = os.path.join('@BUILD_ROOT@', expdir)
> +- dirs_str += [f'{prefix}{buildtreedir}',
> +- f'{prefix}{srctreedir}']
> +- for d in dirs.get_extra_build_dirs():
> +- dirs_str += [f'{prefix}{d}']
> +-
> +- return dirs_str
> +-
> + def is_module_library(fname):
> + '''
> + Check if the file is a library-like file generated by a module-specific
> +diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py
> +index d0b053d4f76..c91cda66f8b 100644
> +--- a/mesonbuild/modules/gnome.py
> ++++ b/mesonbuild/modules/gnome.py
> +@@ -26,7 +26,6 @@
> + from .. import mesonlib
> + from .. import interpreter
> + from . import GResourceTarget, GResourceHeaderTarget, GirTarget, TypelibTarget, VapiTarget
> +-from . import get_include_args
> + from . import ExtensionModule
> + from . import ModuleReturnValue
> + from ..mesonlib import (
> +@@ -394,7 +393,7 @@ def _get_dependencies_flags(self, deps, state, depends, include_rpath=False,
> + gi_includes.update([girdir])
> + if isinstance(dep, InternalDependency):
> + cflags.update(dep.get_compile_args())
> +- cflags.update(get_include_args(dep.include_directories))
> ++ cflags.update(state.get_include_args(dep.include_directories))
> + for lib in unholder(dep.libraries):
> + if isinstance(lib, build.SharedLibrary):
> + internal_ldflags.update(self._get_link_args(state, lib, depends, include_rpath))
> +@@ -443,7 +442,7 @@ def _get_dependencies_flags(self, deps, state, depends, include_rpath=False,
> + else:
> + external_ldflags.update([lib])
> + elif isinstance(dep, (build.StaticLibrary, build.SharedLibrary)):
> +- cflags.update(get_include_args(dep.get_include_dirs()))
> ++ cflags.update(state.get_include_args(dep.get_include_dirs()))
> + depends.append(dep)
> + else:
> + mlog.log(f'dependency {dep!r} not handled to build gir files')
> +@@ -853,7 +852,7 @@ def generate_gir(self, state, args, kwargs):
> + scan_command += self._scan_header(kwargs)
> + scan_command += self._scan_extra_args(kwargs)
> + scan_command += ['-I' + srcdir, '-I' + builddir]
> +- scan_command += get_include_args(girtargets_inc_dirs)
> ++ scan_command += state.get_include_args(girtargets_inc_dirs)
> + scan_command += ['--filelist=' + self._make_gir_filelist(state, srcdir, ns, nsversion, girtargets, libsources)]
> + scan_command += self._scan_link_withs(state, depends, kwargs)
> + scan_command += self._scan_include(state, depends, gir_inc_dirs, kwargs)
> +@@ -863,8 +862,8 @@ def generate_gir(self, state, args, kwargs):
> + scan_command += ['--cflags-begin']
> + scan_command += cflags
> + scan_command += ['--cflags-end']
> +- scan_command += get_include_args(inc_dirs)
> +- scan_command += get_include_args(list(gi_includes) + gir_inc_dirs + inc_dirs, prefix='--add-include-path=')
> ++ scan_command += state.get_include_args(inc_dirs)
> ++ scan_command += state.get_include_args(list(gi_includes) + gir_inc_dirs + inc_dirs, prefix='--add-include-path=')
> + scan_command += list(internal_ldflags)
> + scan_command += self._scan_gir_targets(state, girtargets)
> + scan_command += self._scan_langs(state, [lc[0] for lc in langs_compilers])
> +@@ -886,7 +885,7 @@ def generate_gir(self, state, args, kwargs):
> +
> + typelib_output = f'{ns}-{nsversion}.typelib'
> + typelib_cmd = [gicompiler, scan_target, '--output', '@OUTPUT@']
> +- typelib_cmd += get_include_args(gir_inc_dirs, prefix='--includedir=')
> ++ typelib_cmd += state.get_include_args(gir_inc_dirs, prefix='--includedir=')
> +
> + for incdir in typelib_includes:
> + typelib_cmd += ["--includedir=" + incdir]
> +@@ -1127,7 +1126,7 @@ def _get_build_args(self, kwargs, state, depends):
> + 'Gir include dirs should be include_directories().')
> +
> + cflags.extend(deps_cflags)
> +- cflags.extend(get_include_args(inc_dirs))
> ++ cflags.extend(state.get_include_args(inc_dirs))
> + ldflags = []
> + ldflags.extend(internal_ldflags)
> + ldflags.extend(external_ldflags)
> +diff --git a/mesonbuild/modules/hotdoc.py b/mesonbuild/modules/hotdoc.py
> +index bf8cd229c0d..89a5d938ea7 100644
> +--- a/mesonbuild/modules/hotdoc.py
> ++++ b/mesonbuild/modules/hotdoc.py
> +@@ -22,7 +22,6 @@
> + from mesonbuild.coredata import MesonException
> + from . import ModuleReturnValue
> + from . import ExtensionModule
> +-from . import get_include_args
> + from ..dependencies import Dependency, InternalDependency
> + from ..interpreterbase import FeatureNew, InvalidArguments, noPosargs, noKwargs
> + from ..interpreter import CustomTargetHolder
> +@@ -191,7 +190,7 @@ def process_dependencies(self, deps):
> + for dep in mesonlib.listify(ensure_list(deps)):
> + dep = getattr(dep, "held_object", dep)
> + if isinstance(dep, InternalDependency):
> +- inc_args = get_include_args(dep.include_directories)
> ++ inc_args = self.state.get_include_args(dep.include_directories)
> + cflags.update([self.replace_dirs_in_string(x)
> + for x in inc_args])
> + cflags.update(self.process_dependencies(dep.libraries))
> +diff --git a/mesonbuild/modules/qt.py b/mesonbuild/modules/qt.py
> +index b7389bd59af..1bf0099d1df 100644
> +--- a/mesonbuild/modules/qt.py
> ++++ b/mesonbuild/modules/qt.py
> +@@ -23,7 +23,7 @@
> + from ..mesonlib import MesonException, extract_as_list, File, unholder, version_compare
> + from ..dependencies import Dependency
> + import xml.etree.ElementTree as ET
> +-from . import ModuleReturnValue, get_include_args, ExtensionModule
> ++from . import ModuleReturnValue, ExtensionModule
> + from ..interpreterbase import noPosargs, permittedKwargs, FeatureNew, FeatureNewKwargs
> + from ..interpreter import extract_required_kwarg
> + from ..programs import NonExistingExternalProgram
> +@@ -239,7 +239,7 @@ def preprocess(self, state, args, kwargs):
> + ui_gen = build.Generator([self.uic], ui_kwargs)
> + ui_output = ui_gen.process_files(f'Qt{self.qt_version} ui', ui_files, state)
> + sources.append(ui_output)
> +- inc = get_include_args(include_dirs=include_directories)
> ++ inc = state.get_include_args(include_dirs=include_directories)
> + compile_args = []
> + for dep in unholder(dependencies):
> + if isinstance(dep, Dependency):
> +diff --git a/mesonbuild/modules/windows.py b/mesonbuild/modules/windows.py
> +index d7a86380885..c4fdc196681 100644
> +--- a/mesonbuild/modules/windows.py
> ++++ b/mesonbuild/modules/windows.py
> +@@ -19,7 +19,6 @@
> + from .. import mlog
> + from .. import mesonlib, build
> + from ..mesonlib import MachineChoice, MesonException, extract_as_list, unholder
> +-from . import get_include_args
> + from . import ModuleReturnValue
> + from . import ExtensionModule
> + from ..interpreter import CustomTargetHolder
> +@@ -83,12 +82,12 @@ def compile_resources(self, state, args, kwargs):
> + wrc_depends = extract_as_list(kwargs, 'depends', pop = True)
> + for d in wrc_depends:
> + if isinstance(d, CustomTargetHolder):
> +- extra_args += get_include_args([d.outdir_include()])
> ++ extra_args += state.get_include_args([d.outdir_include()])
> + inc_dirs = extract_as_list(kwargs, 'include_directories', pop = True)
> + for incd in inc_dirs:
> + if not isinstance(incd.held_object, (str, build.IncludeDirs)):
> + raise MesonException('Resource include dirs should be include_directories().')
> +- extra_args += get_include_args(inc_dirs)
> ++ extra_args += state.get_include_args(inc_dirs)
> +
> + rescomp, rescomp_type = self._find_resource_compiler(state)
> + if rescomp_type == ResourceCompilerType.rc:
> +diff --git a/test cases/frameworks/10 gtk-doc/doc/foobar1/foobar-docs.sgml b/test cases/frameworks/10 gtk-doc/doc/foobar1/foobar-docs.sgml
> +index 95f73efdf45..6ccd087dc18 100644
> +--- a/test cases/frameworks/10 gtk-doc/doc/foobar1/foobar-docs.sgml
> ++++ b/test cases/frameworks/10 gtk-doc/doc/foobar1/foobar-docs.sgml
> +@@ -35,7 +35,7 @@
> + </partintro>
> + <xi:include href="xml/foo.xml"/>
> + <xi:include href="../../include/bar.xml"/>
> +- <xi:include href="xml/foo-version.xml"/>
> ++ <xi:include href="xml/version.xml"/>
> + </reference>
> +
> + </book>
> +diff --git a/test cases/frameworks/10 gtk-doc/doc/foobar1/foobar-sections.txt b/test cases/frameworks/10 gtk-doc/doc/foobar1/foobar-sections.txt
> +new file mode 100644
> +index 00000000000..d14c8dab010
> +--- /dev/null
> ++++ b/test cases/frameworks/10 gtk-doc/doc/foobar1/foobar-sections.txt
> +@@ -0,0 +1,16 @@
> ++<SECTION>
> ++<FILE>foo</FILE>
> ++<TITLE>FooObj</TITLE>
> ++FooObj
> ++FooObjClass
> ++foo_do_something
> ++</SECTION>
> ++
> ++<SECTION>
> ++<FILE>version</FILE>
> ++<TITLE>version</TITLE>
> ++FOO_MAJOR_VERSION
> ++FOO_MINOR_VERSION
> ++FOO_MICRO_VERSION
> ++</SECTION>
> ++
> +diff --git a/test cases/frameworks/10 gtk-doc/doc/foobar1/foobar.types b/test cases/frameworks/10 gtk-doc/doc/foobar1/foobar.types
> +new file mode 100644
> +index 00000000000..0a9c046f3ed
> +--- /dev/null
> ++++ b/test cases/frameworks/10 gtk-doc/doc/foobar1/foobar.types
> +@@ -0,0 +1,4 @@
> ++% This include is useless it's a regression test for https://github.com/mesonbuild/meson/issues/8744
> ++#include <foo.h>
> ++
> ++foo_obj_get_type
> +diff --git a/test cases/frameworks/10 gtk-doc/doc/foobar1/meson.build b/test cases/frameworks/10 gtk-doc/doc/foobar1/meson.build
> +index 149c6e956aa..f4b3724dbae 100644
> +--- a/test cases/frameworks/10 gtk-doc/doc/foobar1/meson.build
> ++++ b/test cases/frameworks/10 gtk-doc/doc/foobar1/meson.build
> +@@ -1,5 +1,9 @@
> + gnome.gtkdoc('foobar',
> +- src_dir : inc,
> ++ src_dir : [inc, '.'],
> + main_sgml : 'foobar-docs.sgml',
> + content_files : [docbook, version_xml],
> ++ dependencies: foo_dep,
> ++ # Manually written types file for regression test:
> ++ # https://github.com/mesonbuild/meson/issues/8744
> ++ gobject_typesfile: 'foobar.types',
> + install : true)
> +diff --git a/test cases/frameworks/10 gtk-doc/foo.c b/test cases/frameworks/10 gtk-doc/foo.c
> +new file mode 100644
> +index 00000000000..36c0639ec08
> +--- /dev/null
> ++++ b/test cases/frameworks/10 gtk-doc/foo.c
> +@@ -0,0 +1,30 @@
> ++#include <foo.h>
> ++
> ++
> ++struct _FooObj {
> ++ GObject parent;
> ++ int dummy;
> ++};
> ++
> ++G_DEFINE_TYPE(FooObj, foo_obj, G_TYPE_OBJECT)
> ++
> ++static void foo_obj_init (FooObj *self)
> ++{
> ++}
> ++
> ++static void foo_obj_class_init (FooObjClass *klass)
> ++{
> ++}
> ++
> ++/**
> ++ * foo_do_something:
> ++ * @self: self
> ++ *
> ++ * Useless function.
> ++ *
> ++ * Returns: 0.
> ++ */
> ++int foo_do_something(FooObj *self)
> ++{
> ++ return 0;
> ++}
> +diff --git a/test cases/frameworks/10 gtk-doc/include/foo.h b/test cases/frameworks/10 gtk-doc/include/foo.h
> +index 7b8946b6a86..510f3d1ecb5 100644
> +--- a/test cases/frameworks/10 gtk-doc/include/foo.h
> ++++ b/test cases/frameworks/10 gtk-doc/include/foo.h
> +@@ -1,5 +1,7 @@
> + #pragma once
> +
> ++#include <glib-object.h>
> ++
> + /**
> + * FooIndecision:
> + * @FOO_MAYBE: Something maybe
> +@@ -13,3 +15,19 @@ typedef enum {
> + FOO_POSSIBLY,
> + } FooIndecision;
> +
> ++/**
> ++ * FooObjClass:
> ++ *
> ++ * The class
> ++ */
> ++
> ++/**
> ++ * FooObj:
> ++ *
> ++ * The instance
> ++ */
> ++
> ++#define FOO_TYPE_OBJ foo_obj_get_type()
> ++G_DECLARE_FINAL_TYPE(FooObj, foo_obj, FOO, OBJ, GObject)
> ++
> ++int foo_do_something(FooObj *self);
> +diff --git a/test cases/frameworks/10 gtk-doc/meson.build b/test cases/frameworks/10 gtk-doc/meson.build
> +index 5c22ad0afa4..292980fafa7 100644
> +--- a/test cases/frameworks/10 gtk-doc/meson.build
> ++++ b/test cases/frameworks/10 gtk-doc/meson.build
> +@@ -24,4 +24,16 @@ if gtkdoc_ver.version_compare('<1.26')
> + error('MESON_SKIP_TEST gtk-doc test requires gtkdoc >= 1.26.')
> + endif
> +
> ++gobject = dependency('gobject-2.0')
> ++
> ++libfoo = library('foo', 'foo.c',
> ++ include_directories: inc,
> ++ dependencies: gobject,
> ++)
> ++
> ++foo_dep = declare_dependency(
> ++ link_with: libfoo,
> ++ include_directories: inc,
> ++)
> ++
> + subdir('doc')
> +diff --git a/test cases/frameworks/10 gtk-doc/test.json b/test cases/frameworks/10 gtk-doc/test.json
> +index c44126cc741..03ad0595817 100644
> +--- a/test cases/frameworks/10 gtk-doc/test.json
> ++++ b/test cases/frameworks/10 gtk-doc/test.json
> +@@ -4,8 +4,8 @@
> + {"type": "file", "file": "usr/share/gtk-doc/html/foobar/BAR.html"},
> + {"type": "file", "file": "usr/share/gtk-doc/html/foobar/foobar.devhelp2"},
> + {"type": "file", "file": "usr/share/gtk-doc/html/foobar/foobar.html"},
> +- {"type": "file", "file": "usr/share/gtk-doc/html/foobar/foobar-foo.html"},
> +- {"type": "file", "file": "usr/share/gtk-doc/html/foobar/foobar-foo-version.html"},
> ++ {"type": "file", "file": "usr/share/gtk-doc/html/foobar/FooObj.html"},
> ++ {"type": "file", "file": "usr/share/gtk-doc/html/foobar/foo-version.html"},
> + {"type": "file", "file": "usr/share/gtk-doc/html/foobar/home.png"},
> + {"type": "file", "file": "usr/share/gtk-doc/html/foobar/index.html"},
> + {"type": "file", "file": "usr/share/gtk-doc/html/foobar/left.png"},
> diff --git a/meta/recipes-devtools/meson/meson/cross-prop-default.patch b/meta/recipes-devtools/meson/meson/cross-prop-default.patch
> deleted file mode 100644
> index 772395e879..0000000000
> --- a/meta/recipes-devtools/meson/meson/cross-prop-default.patch
> +++ /dev/null
> @@ -1,23 +0,0 @@
> -meson.build files that use cc.run() in native builds can silently fallback to
> -meson.get_cross_property() in cross builds without an exe-wrapper, but there's
> -no way to know that this is happening.
> -
> -As the defaults may be pessimistic (for example, disabling the support for a
> -feature that should be enabled) emit a warning when the default is used, so that
> -the recipe can explicitly set the cross property as relevant.
> -
> -Upstream-Status: Submitted [https://github.com/mesonbuild/meson/pull/5071]
> -Signed-off-by: Ross Burton <ross.burton@intel.com>
> -
> -diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py
> -index 3c3cfae0..10e741ae 100644
> ---- a/mesonbuild/interpreter.py
> -+++ b/mesonbuild/interpreter.py
> -@@ -1890,6 +1890,7 @@ class MesonMain(InterpreterObject):
> - return props[propname]
> - except Exception:
> - if len(args) == 2:
> -+ mlog.warning('Cross property %s is using default value %s' % (propname, args[1]))
> - return args[1]
> - raise InterpreterException('Unknown cross property: %s.' % propname)
> -
> diff --git a/meta/recipes-devtools/meson/meson_0.57.2.bb b/meta/recipes-devtools/meson/meson_0.58.0.bb
> similarity index 100%
> rename from meta/recipes-devtools/meson/meson_0.57.2.bb
> rename to meta/recipes-devtools/meson/meson_0.58.0.bb
> diff --git a/meta/recipes-devtools/meson/nativesdk-meson_0.57.2.bb b/meta/recipes-devtools/meson/nativesdk-meson_0.58.0.bb
> similarity index 100%
> rename from meta/recipes-devtools/meson/nativesdk-meson_0.57.2.bb
> rename to meta/recipes-devtools/meson/nativesdk-meson_0.58.0.bb
> --
> 2.31.1
>
>
>
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [OE-core] [PATCH 4/8] meson: update 0.57.2 -> 0.58.0
2021-05-14 13:45 ` [OE-core] " Khem Raj
@ 2021-05-14 13:59 ` Alexander Kanavin
2021-05-14 15:20 ` Khem Raj
0 siblings, 1 reply; 12+ messages in thread
From: Alexander Kanavin @ 2021-05-14 13:59 UTC (permalink / raw)
To: Khem Raj; +Cc: Patches and discussions about the oe-core layer
[-- Attachment #1: Type: text/plain, Size: 40495 bytes --]
Probably resolved by updating to 40.1?
https://gitlab.gnome.org/GNOME/nautilus/-/tags
Alex
On Fri, 14 May 2021 at 15:46, Khem Raj <raj.khem@gmail.com> wrote:
> breaks nautilus https://errors.yoctoproject.org/Errors/Details/581184/
>
> On Thu, May 13, 2021 at 1:56 PM Alexander Kanavin
> <alex.kanavin@gmail.com> wrote:
> >
> > Rebase patches; dropped chunks (and cross-prop-default.patch)
> > have been removed upstream.
> >
> > Move native-only patches to all-patches, as they're a pain to rebase
> > separately.
> >
> > Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
> > ---
> > meta/recipes-devtools/meson/meson.inc | 11 +-
> > .../0001-Make-CPU-family-warnings-fatal.patch | 18 +-
> > ...sues-that-arise-when-cross-compiling.patch | 8 +-
> > ...-not-manipulate-the-environment-when.patch | 14 +-
> > ...pport-building-allarch-recipes-again.patch | 10 +-
> > .../meson/meson/0003-native_bindir.patch | 58 +--
> > ...2c19e693a69b0650ce6c8a8903163c959996.patch | 412 ++++++++++++++++++
> > .../meson/meson/cross-prop-default.patch | 23 -
> > .../{meson_0.57.2.bb => meson_0.58.0.bb} | 0
> > ...on_0.57.2.bb => nativesdk-meson_0.58.0.bb} | 0
> > 10 files changed, 456 insertions(+), 98 deletions(-)
> > create mode 100644
> meta/recipes-devtools/meson/meson/4e312c19e693a69b0650ce6c8a8903163c959996.patch
> > delete mode 100644
> meta/recipes-devtools/meson/meson/cross-prop-default.patch
> > rename meta/recipes-devtools/meson/{meson_0.57.2.bb => meson_0.58.0.bb}
> (100%)
> > rename meta/recipes-devtools/meson/{nativesdk-meson_0.57.2.bb =>
> nativesdk-meson_0.58.0.bb} (100%)
> >
> > diff --git a/meta/recipes-devtools/meson/meson.inc
> b/meta/recipes-devtools/meson/meson.inc
> > index 10e7d8a1ce..f60381453b 100644
> > --- a/meta/recipes-devtools/meson/meson.inc
> > +++ b/meta/recipes-devtools/meson/meson.inc
> > @@ -12,16 +12,13 @@ SRC_URI = "
> https://github.com/mesonbuild/meson/releases/download/${PV}/meson-${P
> > file://0003-native_bindir.patch \
> >
> file://0001-python-module-do-not-manipulate-the-environment-when.patch \
> > file://disable-rpath-handling.patch \
> > - file://cross-prop-default.patch \
> >
> file://0001-modules-python.py-do-not-substitute-python-s-install.patch \
> > file://gi-target-dep.patch \
> > + file://0001-Make-CPU-family-warnings-fatal.patch \
> > + file://0002-Support-building-allarch-recipes-again.patch \
> > + file://4e312c19e693a69b0650ce6c8a8903163c959996.patch \
> > "
> > -SRC_URI[sha256sum] =
> "3a83e7b1c5de94fa991ec34d9b198d94f38ed699d3524cb0fdf3b99fd23d4cc5"
> > -
> > -SRC_URI_append_class-native = " \
> > - file://0001-Make-CPU-family-warnings-fatal.patch \
> > - file://0002-Support-building-allarch-recipes-again.patch \
> > -"
> > +SRC_URI[sha256sum] =
> "f4820df0bc969c99019fd4af8ca5f136ee94c63d8a5ad67e7eb73bdbc9182fdd"
> >
> > UPSTREAM_CHECK_URI = "https://github.com/mesonbuild/meson/releases"
> > UPSTREAM_CHECK_REGEX = "meson-(?P<pver>\d+(\.\d+)+)\.tar"
> > diff --git
> a/meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch
> b/meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch
> > index 300797f9ee..bcccfabd17 100644
> > ---
> a/meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch
> > +++
> b/meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch
> > @@ -1,34 +1,33 @@
> > -From 198e2de24adf5845e3ba389b533cf43440ee8acb Mon Sep 17 00:00:00 2001
> > +From b64032a2eb1fb760f4ffd5b4b666e2433cf80d39 Mon Sep 17 00:00:00 2001
> > From: Ross Burton <ross.burton@intel.com>
> > Date: Tue, 3 Jul 2018 13:59:09 +0100
> > -Subject: [PATCH] Make CPU family warnings fatal
> > +Subject: [PATCH 1/2] Make CPU family warnings fatal
> >
> > Upstream-Status: Inappropriate [OE specific]
> > Signed-off-by: Ross Burton <ross.burton@intel.com>
> > -
> > ---
> > mesonbuild/envconfig.py | 2 +-
> > mesonbuild/environment.py | 4 +---
> > 2 files changed, 2 insertions(+), 4 deletions(-)
> >
> > diff --git a/mesonbuild/envconfig.py b/mesonbuild/envconfig.py
> > -index ba35d16..2d3c34c 100644
> > +index c6a4df3..4d58c91 100644
> > --- a/mesonbuild/envconfig.py
> > +++ b/mesonbuild/envconfig.py
> > -@@ -262,7 +262,7 @@ class MachineInfo:
> > +@@ -266,7 +266,7 @@ class MachineInfo:
> >
> > cpu_family = literal['cpu_family']
> > if cpu_family not in known_cpu_families:
> > -- mlog.warning('Unknown CPU family {}, please report this at
> https://github.com/mesonbuild/meson/issues/new'.format(cpu_family))
> > +- mlog.warning(f'Unknown CPU family {cpu_family}, please
> report this at https://github.com/mesonbuild/meson/issues/new')
> > + raise EnvironmentException('Unknown CPU family {}, see
> https://wiki.yoctoproject.org/wiki/Meson/UnknownCPU for
> directions.'.format(cpu_family))
> >
> > endian = literal['endian']
> > if endian not in ('little', 'big'):
> > diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
> > -index 756dd81..4d2c2b6 100644
> > +index fc9b703..eea8345 100644
> > --- a/mesonbuild/environment.py
> > +++ b/mesonbuild/environment.py
> > -@@ -434,9 +434,7 @@ def detect_cpu_family(compilers: CompilersDict) ->
> str:
> > +@@ -436,9 +436,7 @@ def detect_cpu_family(compilers: CompilersDict) ->
> str:
> > trial = 'ppc64'
> >
> > if trial not in known_cpu_families:
> > @@ -39,3 +38,6 @@ index 756dd81..4d2c2b6 100644
> >
> > return trial
> >
> > +--
> > +2.24.0
> > +
> > diff --git
> a/meta/recipes-devtools/meson/meson/0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch
> b/meta/recipes-devtools/meson/meson/0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch
> > index 471f1500da..ce90e515da 100644
> > ---
> a/meta/recipes-devtools/meson/meson/0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch
> > +++
> b/meta/recipes-devtools/meson/meson/0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch
> > @@ -1,4 +1,4 @@
> > -From d3ef01a4208a801acad380a4aaceb6a21f8fa603 Mon Sep 17 00:00:00 2001
> > +From 2f9c59e0489e569c5382404667c10f5c200a72ad Mon Sep 17 00:00:00 2001
> > From: Alexander Kanavin <alex.kanavin@gmail.com>
> > Date: Fri, 4 Aug 2017 16:16:41 +0300
> > Subject: [PATCH] gtkdoc: fix issues that arise when cross-compiling
> > @@ -20,11 +20,11 @@ Signed-off-by: Alexander Kanavin <
> alex.kanavin@gmail.com>
> > 1 file changed, 4 insertions(+)
> >
> > diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py
> > -index bcf77b9..6a4b472 100644
> > +index dc2979e..c9ff9bd 100644
> > --- a/mesonbuild/modules/gnome.py
> > +++ b/mesonbuild/modules/gnome.py
> > -@@ -974,6 +974,10 @@ This will become a hard error in the future.''')
> > - args.append('--{}={}'.format(program_name, path))
> > +@@ -1053,6 +1053,10 @@ class GnomeModule(ExtensionModule):
> > + args.append(f'--{program_name}={path}')
> > if namespace:
> > args.append('--namespace=' + namespace)
> > + gtkdoc_exe_wrapper =
> state.environment.properties.host.get('gtkdoc_exe_wrapper', None)
> > diff --git
> a/meta/recipes-devtools/meson/meson/0001-python-module-do-not-manipulate-the-environment-when.patch
> b/meta/recipes-devtools/meson/meson/0001-python-module-do-not-manipulate-the-environment-when.patch
> > index eb0e90dbdd..fdadc6869b 100644
> > ---
> a/meta/recipes-devtools/meson/meson/0001-python-module-do-not-manipulate-the-environment-when.patch
> > +++
> b/meta/recipes-devtools/meson/meson/0001-python-module-do-not-manipulate-the-environment-when.patch
> > @@ -1,4 +1,4 @@
> > -From 689e28c49b85311f93f39df70cbee702fc44afb6 Mon Sep 17 00:00:00 2001
> > +From 2264e67d7c2c22ca634fd26ea8ada6f0344ab280 Mon Sep 17 00:00:00 2001
> > From: Alexander Kanavin <alex.kanavin@gmail.com>
> > Date: Mon, 19 Nov 2018 14:24:26 +0100
> > Subject: [PATCH] python module: do not manipulate the environment when
> calling
> > @@ -12,10 +12,10 @@ Signed-off-by: Alexander Kanavin <
> alex.kanavin@gmail.com>
> > 1 file changed, 12 deletions(-)
> >
> > diff --git a/mesonbuild/modules/python.py b/mesonbuild/modules/python.py
> > -index 07be318..b770603 100644
> > +index 422155b..aaf5844 100644
> > --- a/mesonbuild/modules/python.py
> > +++ b/mesonbuild/modules/python.py
> > -@@ -71,11 +71,6 @@ class PythonDependency(ExternalDependency):
> > +@@ -70,11 +70,6 @@ class PythonDependency(ExternalDependency):
> > old_pkg_libdir = os.environ.get('PKG_CONFIG_LIBDIR')
> > old_pkg_path = os.environ.get('PKG_CONFIG_PATH')
> >
> > @@ -26,9 +26,9 @@ index 07be318..b770603 100644
> > -
> > try:
> > self.pkgdep = PkgConfigDependency(pkg_name,
> environment, kwargs)
> > - mlog.debug('Found "{}" via pkgconfig lookup in
> LIBPC ({})'.format(pkg_name, pkg_libdir))
> > -@@ -84,13 +79,6 @@ class PythonDependency(ExternalDependency):
> > - mlog.debug('"{}" could not be found in LIBPC
> ({})'.format(pkg_name, pkg_libdir))
> > + mlog.debug(f'Found "{pkg_name}" via pkgconfig
> lookup in LIBPC ({pkg_libdir})')
> > +@@ -83,13 +78,6 @@ class PythonDependency(ExternalDependency):
> > + mlog.debug(f'"{pkg_name}" could not be found in
> LIBPC ({pkg_libdir})')
> > mlog.debug(e)
> >
> > - if old_pkg_path is not None:
> > @@ -39,5 +39,5 @@ index 07be318..b770603 100644
> > - else:
> > - os.environ.pop('PKG_CONFIG_LIBDIR', None)
> > else:
> > - mlog.debug('"{}" could not be found in LIBPC ({}),
> this is likely due to a relocated python installation'.format(pkg_name,
> pkg_libdir))
> > + mlog.debug(f'"{pkg_name}" could not be found in LIBPC
> ({pkg_libdir}), this is likely due to a relocated python installation')
> >
> > diff --git
> a/meta/recipes-devtools/meson/meson/0002-Support-building-allarch-recipes-again.patch
> b/meta/recipes-devtools/meson/meson/0002-Support-building-allarch-recipes-again.patch
> > index f6175a194c..dcc1ce9c27 100644
> > ---
> a/meta/recipes-devtools/meson/meson/0002-Support-building-allarch-recipes-again.patch
> > +++
> b/meta/recipes-devtools/meson/meson/0002-Support-building-allarch-recipes-again.patch
> > @@ -1,19 +1,18 @@
> > -From ac1021a3abf612e8be9b19eecb97062e0c314701 Mon Sep 17 00:00:00 2001
> > +From 656bf55fed01df2d2e2ad6d9d9887173cb16b85c Mon Sep 17 00:00:00 2001
> > From: Peter Kjellerstedt <pkj@axis.com>
> > Date: Thu, 26 Jul 2018 16:32:49 +0200
> > -Subject: [PATCH] Support building allarch recipes again
> > +Subject: [PATCH 2/2] Support building allarch recipes again
> >
> > This registers "allarch" as a known CPU family.
> >
> > Upstream-Status: Inappropriate [OE specific]
> > Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
> > -
> > ---
> > mesonbuild/envconfig.py | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/mesonbuild/envconfig.py b/mesonbuild/envconfig.py
> > -index 2d3c34c..b9e7908 100644
> > +index 4d58c91..ff01ad1 100644
> > --- a/mesonbuild/envconfig.py
> > +++ b/mesonbuild/envconfig.py
> > @@ -36,6 +36,7 @@ from pathlib import Path
> > @@ -24,3 +23,6 @@ index 2d3c34c..b9e7908 100644
> > 'aarch64',
> > 'alpha',
> > 'arc',
> > +--
> > +2.24.0
> > +
> > diff --git a/meta/recipes-devtools/meson/meson/0003-native_bindir.patch
> b/meta/recipes-devtools/meson/meson/0003-native_bindir.patch
> > index ed85116c4f..89257b9e05 100644
> > --- a/meta/recipes-devtools/meson/meson/0003-native_bindir.patch
> > +++ b/meta/recipes-devtools/meson/meson/0003-native_bindir.patch
> > @@ -1,4 +1,4 @@
> > -From 1546e1f95a119175b7a4e4272a26dd85505e5ede Mon Sep 17 00:00:00 2001
> > +From 30e97d4090a3d3f5b7ddcaf27cfa17f3c8c1d462 Mon Sep 17 00:00:00 2001
> > From: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
> > Date: Wed, 15 Nov 2017 15:05:01 +0100
> > Subject: [PATCH] native_bindir
> > @@ -18,23 +18,22 @@ Signed-off-by: Ricardo Ribalda Delgado <
> ricardo.ribalda@gmail.com>
> >
> > ---
> > mesonbuild/dependencies/base.py | 19 +++++++++++--------
> > - mesonbuild/dependencies/ui.py | 6 +++---
> > - 2 files changed, 14 insertions(+), 11 deletions(-)
> > + 1 file changed, 11 insertions(+), 8 deletions(-)
> >
> > diff --git a/mesonbuild/dependencies/base.py
> b/mesonbuild/dependencies/base.py
> > -index cd77b4b..7e3f338 100644
> > +index 14380d4..d0c443f 100644
> > --- a/mesonbuild/dependencies/base.py
> > +++ b/mesonbuild/dependencies/base.py
> > -@@ -192,7 +192,7 @@ class Dependency:
> > +@@ -179,7 +179,7 @@ class Dependency:
> > def get_exe_args(self, compiler):
> > return []
> >
> > - def get_pkgconfig_variable(self, variable_name: str, kwargs:
> T.Dict[str, T.Any]) -> str:
> > + def get_pkgconfig_variable(self, variable_name: str, kwargs:
> T.Dict[str, T.Any], use_native=False) -> str:
> > - raise DependencyException('{!r} is not a pkgconfig
> dependency'.format(self.name))
> > + raise DependencyException(f'{self.name!r} is not a pkgconfig
> dependency')
> >
> > def get_configtool_variable(self, variable_name):
> > -@@ -280,7 +280,7 @@ class InternalDependency(Dependency):
> > +@@ -267,7 +267,7 @@ class InternalDependency(Dependency):
> > return True
> > return any(d.is_built() for d in self.ext_deps)
> >
> > @@ -43,7 +42,7 @@ index cd77b4b..7e3f338 100644
> > raise DependencyException('Method "get_pkgconfig_variable()"
> is '
> > 'invalid for an internal dependency')
> >
> > -@@ -658,8 +658,11 @@ class PkgConfigDependency(ExternalDependency):
> > +@@ -645,8 +645,11 @@ class PkgConfigDependency(ExternalDependency):
> > return s.format(self.__class__.__name__, self.name,
> self.is_found,
> > self.version_reqs)
> >
> > @@ -57,16 +56,16 @@ index cd77b4b..7e3f338 100644
> > p, out, err = Popen_safe(cmd, env=env)
> > rc, out, err = p.returncode, out.strip(), err.strip()
> > call = ' '.join(cmd)
> > -@@ -685,7 +688,7 @@ class PkgConfigDependency(ExternalDependency):
> > - env['PKG_CONFIG_LIBDIR'] = new_pkg_config_libdir
> > - mlog.debug('PKG_CONFIG_LIBDIR: ' + new_pkg_config_libdir)
> > +@@ -674,7 +677,7 @@ class PkgConfigDependency(ExternalDependency):
> > + if key.startswith('PKG_'):
> > + mlog.debug(f'env[{key}]: {value}')
> >
> > - def _call_pkgbin(self, args, env=None):
> > + def _call_pkgbin(self, args, env=None, use_native=False):
> > # Always copy the environment since we're going to modify it
> > # with pkg-config variables
> > if env is None:
> > -@@ -699,7 +702,7 @@ class PkgConfigDependency(ExternalDependency):
> > +@@ -688,7 +691,7 @@ class PkgConfigDependency(ExternalDependency):
> > targs = tuple(args)
> > cache = PkgConfigDependency.pkgbin_cache
> > if (self.pkgbin, targs, fenv) not in cache:
> > @@ -75,7 +74,7 @@ index cd77b4b..7e3f338 100644
> > return cache[(self.pkgbin, targs, fenv)]
> >
> > def _convert_mingw_paths(self, args: T.List[str]) -> T.List[str]:
> > -@@ -905,7 +908,7 @@ class PkgConfigDependency(ExternalDependency):
> > +@@ -894,7 +897,7 @@ class PkgConfigDependency(ExternalDependency):
> > (self.name, out_raw))
> > self.link_args, self.raw_link_args = self._search_libs(out,
> out_raw)
> >
> > @@ -84,7 +83,7 @@ index cd77b4b..7e3f338 100644
> > options = ['--variable=' + variable_name, self.name]
> >
> > if 'define_variable' in kwargs:
> > -@@ -918,7 +921,7 @@ class PkgConfigDependency(ExternalDependency):
> > +@@ -907,7 +910,7 @@ class PkgConfigDependency(ExternalDependency):
> >
> > options = ['--define-variable=' + '='.join(definition)] +
> options
> >
> > @@ -93,34 +92,3 @@ index cd77b4b..7e3f338 100644
> > variable = ''
> > if ret != 0:
> > if self.required:
> > -diff --git a/mesonbuild/dependencies/ui.py
> b/mesonbuild/dependencies/ui.py
> > -index d897d76..a598d2e 100644
> > ---- a/mesonbuild/dependencies/ui.py
> > -+++ b/mesonbuild/dependencies/ui.py
> > -@@ -325,7 +325,7 @@ class QtBaseDependency(ExternalDependency):
> > - self.bindir = self.get_pkgconfig_host_bins(core)
> > - if not self.bindir:
> > - # If exec_prefix is not defined, the pkg-config file is
> broken
> > -- prefix = core.get_pkgconfig_variable('exec_prefix', {})
> > -+ prefix = core.get_pkgconfig_variable('exec_prefix', {},
> use_native=True)
> > - if prefix:
> > - self.bindir = os.path.join(prefix, 'bin')
> > -
> > -@@ -528,7 +528,7 @@ class Qt4Dependency(QtBaseDependency):
> > - applications = ['moc', 'uic', 'rcc', 'lupdate', 'lrelease']
> > - for application in applications:
> > - try:
> > -- return
> os.path.dirname(core.get_pkgconfig_variable('%s_location' % application,
> {}))
> > -+ return
> os.path.dirname(core.get_pkgconfig_variable('%s_location' % application,
> {}, use_native=True))
> > - except MesonException:
> > - pass
> > -
> > -@@ -538,7 +538,7 @@ class Qt5Dependency(QtBaseDependency):
> > - QtBaseDependency.__init__(self, 'qt5', env, kwargs)
> > -
> > - def get_pkgconfig_host_bins(self, core):
> > -- return core.get_pkgconfig_variable('host_bins', {})
> > -+ return core.get_pkgconfig_variable('host_bins', {},
> use_native=True)
> > -
> > - def get_private_includes(self, mod_inc_dir, module):
> > - return _qt_get_private_includes(mod_inc_dir, module,
> self.version)
> > diff --git
> a/meta/recipes-devtools/meson/meson/4e312c19e693a69b0650ce6c8a8903163c959996.patch
> b/meta/recipes-devtools/meson/meson/4e312c19e693a69b0650ce6c8a8903163c959996.patch
> > new file mode 100644
> > index 0000000000..76daf019b0
> > --- /dev/null
> > +++
> b/meta/recipes-devtools/meson/meson/4e312c19e693a69b0650ce6c8a8903163c959996.patch
> > @@ -0,0 +1,412 @@
> > +From 4e312c19e693a69b0650ce6c8a8903163c959996 Mon Sep 17 00:00:00 2001
> > +From: Xavier Claessens <xavier.claessens@collabora.com>
> > +Date: Tue, 11 May 2021 09:18:47 -0400
> > +Subject: [PATCH] gnome: Fix gtkdoc generation
> > +
> > +install_scripts used to replace @BUILD_ROOT@ and @SOURCE_ROOT@ but it
> > +was not documented and got removed in Meson 0.58.0. gnome.gtkdoc() was
> > +relying on that behaviour, but it has always been broken in the case the
> > +source or build directory contains spaces.
> > +
> > +Fix this by changing get_include_args() to substitue paths directly
> > +which will then get escaped correctly.
> > +
> > +Add a unit test that builds GObject documentation which is where this
> > +issue has been spotted.
> > +
> > +Fixes: #8744
> > +Upstream-Status: Backport
> > +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
> > +---
> > + mesonbuild/modules/__init__.py | 54 +++++++++----------
> > + mesonbuild/modules/gnome.py | 15 +++---
> > + mesonbuild/modules/hotdoc.py | 3 +-
> > + mesonbuild/modules/qt.py | 4 +-
> > + mesonbuild/modules/windows.py | 5 +-
> > + .../10 gtk-doc/doc/foobar1/foobar-docs.sgml | 2 +-
> > + .../doc/foobar1/foobar-sections.txt | 16 ++++++
> > + .../10 gtk-doc/doc/foobar1/foobar.types | 4 ++
> > + .../10 gtk-doc/doc/foobar1/meson.build | 6 ++-
> > + test cases/frameworks/10 gtk-doc/foo.c | 30 +++++++++++
> > + .../frameworks/10 gtk-doc/include/foo.h | 18 +++++++
> > + test cases/frameworks/10 gtk-doc/meson.build | 12 +++++
> > + test cases/frameworks/10 gtk-doc/test.json | 4 +-
> > + 13 files changed, 127 insertions(+), 46 deletions(-)
> > + create mode 100644 test cases/frameworks/10
> gtk-doc/doc/foobar1/foobar-sections.txt
> > + create mode 100644 test cases/frameworks/10
> gtk-doc/doc/foobar1/foobar.types
> > + create mode 100644 test cases/frameworks/10 gtk-doc/foo.c
> > +
> > +diff --git a/mesonbuild/modules/__init__.py
> b/mesonbuild/modules/__init__.py
> > +index ddb5e3e6cf3..c0970294c34 100644
> > +--- a/mesonbuild/modules/__init__.py
> > ++++ b/mesonbuild/modules/__init__.py
> > +@@ -56,6 +56,33 @@ def __init__(self, interpreter: 'Interpreter') ->
> None:
> > + self.target_machine =
> interpreter.builtin['target_machine'].held_object
> > + self.current_node = interpreter.current_node
> > +
> > ++ def get_include_args(self, include_dirs, prefix='-I'):
> > ++ if not include_dirs:
> > ++ return []
> > ++
> > ++ srcdir = self.environment.get_source_dir()
> > ++ builddir = self.environment.get_build_dir()
> > ++
> > ++ dirs_str = []
> > ++ for dirs in unholder(include_dirs):
> > ++ if isinstance(dirs, str):
> > ++ dirs_str += [f'{prefix}{dirs}']
> > ++ continue
> > ++
> > ++ # Should be build.IncludeDirs object.
> > ++ basedir = dirs.get_curdir()
> > ++ for d in dirs.get_incdirs():
> > ++ expdir = os.path.join(basedir, d)
> > ++ srctreedir = os.path.join(srcdir, expdir)
> > ++ buildtreedir = os.path.join(builddir, expdir)
> > ++ dirs_str += [f'{prefix}{buildtreedir}',
> > ++ f'{prefix}{srctreedir}']
> > ++ for d in dirs.get_extra_build_dirs():
> > ++ dirs_str += [f'{prefix}{d}']
> > ++
> > ++ return dirs_str
> > ++
> > ++
> > + class ModuleObject:
> > + """Base class for all objects returned by modules
> > + """
> > +@@ -71,33 +98,6 @@ def __init__(self, interpreter:
> T.Optional['Interpreter'] = None) -> None:
> > + class ExtensionModule(ModuleObject):
> > + pass
> > +
> > +-def get_include_args(include_dirs, prefix='-I'):
> > +- '''
> > +- Expand include arguments to refer to the source and build dirs
> > +- by using @SOURCE_ROOT@ and @BUILD_ROOT@ for later substitution
> > +- '''
> > +- if not include_dirs:
> > +- return []
> > +-
> > +- dirs_str = []
> > +- for dirs in unholder(include_dirs):
> > +- if isinstance(dirs, str):
> > +- dirs_str += [f'{prefix}{dirs}']
> > +- continue
> > +-
> > +- # Should be build.IncludeDirs object.
> > +- basedir = dirs.get_curdir()
> > +- for d in dirs.get_incdirs():
> > +- expdir = os.path.join(basedir, d)
> > +- srctreedir = os.path.join('@SOURCE_ROOT@', expdir)
> > +- buildtreedir = os.path.join('@BUILD_ROOT@', expdir)
> > +- dirs_str += [f'{prefix}{buildtreedir}',
> > +- f'{prefix}{srctreedir}']
> > +- for d in dirs.get_extra_build_dirs():
> > +- dirs_str += [f'{prefix}{d}']
> > +-
> > +- return dirs_str
> > +-
> > + def is_module_library(fname):
> > + '''
> > + Check if the file is a library-like file generated by a
> module-specific
> > +diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py
> > +index d0b053d4f76..c91cda66f8b 100644
> > +--- a/mesonbuild/modules/gnome.py
> > ++++ b/mesonbuild/modules/gnome.py
> > +@@ -26,7 +26,6 @@
> > + from .. import mesonlib
> > + from .. import interpreter
> > + from . import GResourceTarget, GResourceHeaderTarget, GirTarget,
> TypelibTarget, VapiTarget
> > +-from . import get_include_args
> > + from . import ExtensionModule
> > + from . import ModuleReturnValue
> > + from ..mesonlib import (
> > +@@ -394,7 +393,7 @@ def _get_dependencies_flags(self, deps, state,
> depends, include_rpath=False,
> > + gi_includes.update([girdir])
> > + if isinstance(dep, InternalDependency):
> > + cflags.update(dep.get_compile_args())
> > +-
> cflags.update(get_include_args(dep.include_directories))
> > ++
> cflags.update(state.get_include_args(dep.include_directories))
> > + for lib in unholder(dep.libraries):
> > + if isinstance(lib, build.SharedLibrary):
> > +
> internal_ldflags.update(self._get_link_args(state, lib, depends,
> include_rpath))
> > +@@ -443,7 +442,7 @@ def _get_dependencies_flags(self, deps, state,
> depends, include_rpath=False,
> > + else:
> > + external_ldflags.update([lib])
> > + elif isinstance(dep, (build.StaticLibrary,
> build.SharedLibrary)):
> > +- cflags.update(get_include_args(dep.get_include_dirs()))
> > ++
> cflags.update(state.get_include_args(dep.get_include_dirs()))
> > + depends.append(dep)
> > + else:
> > + mlog.log(f'dependency {dep!r} not handled to build gir
> files')
> > +@@ -853,7 +852,7 @@ def generate_gir(self, state, args, kwargs):
> > + scan_command += self._scan_header(kwargs)
> > + scan_command += self._scan_extra_args(kwargs)
> > + scan_command += ['-I' + srcdir, '-I' + builddir]
> > +- scan_command += get_include_args(girtargets_inc_dirs)
> > ++ scan_command += state.get_include_args(girtargets_inc_dirs)
> > + scan_command += ['--filelist=' +
> self._make_gir_filelist(state, srcdir, ns, nsversion, girtargets,
> libsources)]
> > + scan_command += self._scan_link_withs(state, depends, kwargs)
> > + scan_command += self._scan_include(state, depends,
> gir_inc_dirs, kwargs)
> > +@@ -863,8 +862,8 @@ def generate_gir(self, state, args, kwargs):
> > + scan_command += ['--cflags-begin']
> > + scan_command += cflags
> > + scan_command += ['--cflags-end']
> > +- scan_command += get_include_args(inc_dirs)
> > +- scan_command += get_include_args(list(gi_includes) +
> gir_inc_dirs + inc_dirs, prefix='--add-include-path=')
> > ++ scan_command += state.get_include_args(inc_dirs)
> > ++ scan_command += state.get_include_args(list(gi_includes) +
> gir_inc_dirs + inc_dirs, prefix='--add-include-path=')
> > + scan_command += list(internal_ldflags)
> > + scan_command += self._scan_gir_targets(state, girtargets)
> > + scan_command += self._scan_langs(state, [lc[0] for lc in
> langs_compilers])
> > +@@ -886,7 +885,7 @@ def generate_gir(self, state, args, kwargs):
> > +
> > + typelib_output = f'{ns}-{nsversion}.typelib'
> > + typelib_cmd = [gicompiler, scan_target, '--output', '@OUTPUT@
> ']
> > +- typelib_cmd += get_include_args(gir_inc_dirs,
> prefix='--includedir=')
> > ++ typelib_cmd += state.get_include_args(gir_inc_dirs,
> prefix='--includedir=')
> > +
> > + for incdir in typelib_includes:
> > + typelib_cmd += ["--includedir=" + incdir]
> > +@@ -1127,7 +1126,7 @@ def _get_build_args(self, kwargs, state, depends):
> > + 'Gir include dirs should be
> include_directories().')
> > +
> > + cflags.extend(deps_cflags)
> > +- cflags.extend(get_include_args(inc_dirs))
> > ++ cflags.extend(state.get_include_args(inc_dirs))
> > + ldflags = []
> > + ldflags.extend(internal_ldflags)
> > + ldflags.extend(external_ldflags)
> > +diff --git a/mesonbuild/modules/hotdoc.py b/mesonbuild/modules/hotdoc.py
> > +index bf8cd229c0d..89a5d938ea7 100644
> > +--- a/mesonbuild/modules/hotdoc.py
> > ++++ b/mesonbuild/modules/hotdoc.py
> > +@@ -22,7 +22,6 @@
> > + from mesonbuild.coredata import MesonException
> > + from . import ModuleReturnValue
> > + from . import ExtensionModule
> > +-from . import get_include_args
> > + from ..dependencies import Dependency, InternalDependency
> > + from ..interpreterbase import FeatureNew, InvalidArguments, noPosargs,
> noKwargs
> > + from ..interpreter import CustomTargetHolder
> > +@@ -191,7 +190,7 @@ def process_dependencies(self, deps):
> > + for dep in mesonlib.listify(ensure_list(deps)):
> > + dep = getattr(dep, "held_object", dep)
> > + if isinstance(dep, InternalDependency):
> > +- inc_args = get_include_args(dep.include_directories)
> > ++ inc_args =
> self.state.get_include_args(dep.include_directories)
> > + cflags.update([self.replace_dirs_in_string(x)
> > + for x in inc_args])
> > + cflags.update(self.process_dependencies(dep.libraries))
> > +diff --git a/mesonbuild/modules/qt.py b/mesonbuild/modules/qt.py
> > +index b7389bd59af..1bf0099d1df 100644
> > +--- a/mesonbuild/modules/qt.py
> > ++++ b/mesonbuild/modules/qt.py
> > +@@ -23,7 +23,7 @@
> > + from ..mesonlib import MesonException, extract_as_list, File,
> unholder, version_compare
> > + from ..dependencies import Dependency
> > + import xml.etree.ElementTree as ET
> > +-from . import ModuleReturnValue, get_include_args, ExtensionModule
> > ++from . import ModuleReturnValue, ExtensionModule
> > + from ..interpreterbase import noPosargs, permittedKwargs, FeatureNew,
> FeatureNewKwargs
> > + from ..interpreter import extract_required_kwarg
> > + from ..programs import NonExistingExternalProgram
> > +@@ -239,7 +239,7 @@ def preprocess(self, state, args, kwargs):
> > + ui_gen = build.Generator([self.uic], ui_kwargs)
> > + ui_output = ui_gen.process_files(f'Qt{self.qt_version}
> ui', ui_files, state)
> > + sources.append(ui_output)
> > +- inc = get_include_args(include_dirs=include_directories)
> > ++ inc = state.get_include_args(include_dirs=include_directories)
> > + compile_args = []
> > + for dep in unholder(dependencies):
> > + if isinstance(dep, Dependency):
> > +diff --git a/mesonbuild/modules/windows.py
> b/mesonbuild/modules/windows.py
> > +index d7a86380885..c4fdc196681 100644
> > +--- a/mesonbuild/modules/windows.py
> > ++++ b/mesonbuild/modules/windows.py
> > +@@ -19,7 +19,6 @@
> > + from .. import mlog
> > + from .. import mesonlib, build
> > + from ..mesonlib import MachineChoice, MesonException, extract_as_list,
> unholder
> > +-from . import get_include_args
> > + from . import ModuleReturnValue
> > + from . import ExtensionModule
> > + from ..interpreter import CustomTargetHolder
> > +@@ -83,12 +82,12 @@ def compile_resources(self, state, args, kwargs):
> > + wrc_depends = extract_as_list(kwargs, 'depends', pop = True)
> > + for d in wrc_depends:
> > + if isinstance(d, CustomTargetHolder):
> > +- extra_args += get_include_args([d.outdir_include()])
> > ++ extra_args +=
> state.get_include_args([d.outdir_include()])
> > + inc_dirs = extract_as_list(kwargs, 'include_directories', pop
> = True)
> > + for incd in inc_dirs:
> > + if not isinstance(incd.held_object, (str,
> build.IncludeDirs)):
> > + raise MesonException('Resource include dirs should be
> include_directories().')
> > +- extra_args += get_include_args(inc_dirs)
> > ++ extra_args += state.get_include_args(inc_dirs)
> > +
> > + rescomp, rescomp_type = self._find_resource_compiler(state)
> > + if rescomp_type == ResourceCompilerType.rc:
> > +diff --git a/test cases/frameworks/10
> gtk-doc/doc/foobar1/foobar-docs.sgml b/test cases/frameworks/10
> gtk-doc/doc/foobar1/foobar-docs.sgml
> > +index 95f73efdf45..6ccd087dc18 100644
> > +--- a/test cases/frameworks/10 gtk-doc/doc/foobar1/foobar-docs.sgml
> > ++++ b/test cases/frameworks/10 gtk-doc/doc/foobar1/foobar-docs.sgml
> > +@@ -35,7 +35,7 @@
> > + </partintro>
> > + <xi:include href="xml/foo.xml"/>
> > + <xi:include href="../../include/bar.xml"/>
> > +- <xi:include href="xml/foo-version.xml"/>
> > ++ <xi:include href="xml/version.xml"/>
> > + </reference>
> > +
> > + </book>
> > +diff --git a/test cases/frameworks/10
> gtk-doc/doc/foobar1/foobar-sections.txt b/test cases/frameworks/10
> gtk-doc/doc/foobar1/foobar-sections.txt
> > +new file mode 100644
> > +index 00000000000..d14c8dab010
> > +--- /dev/null
> > ++++ b/test cases/frameworks/10 gtk-doc/doc/foobar1/foobar-sections.txt
> > +@@ -0,0 +1,16 @@
> > ++<SECTION>
> > ++<FILE>foo</FILE>
> > ++<TITLE>FooObj</TITLE>
> > ++FooObj
> > ++FooObjClass
> > ++foo_do_something
> > ++</SECTION>
> > ++
> > ++<SECTION>
> > ++<FILE>version</FILE>
> > ++<TITLE>version</TITLE>
> > ++FOO_MAJOR_VERSION
> > ++FOO_MINOR_VERSION
> > ++FOO_MICRO_VERSION
> > ++</SECTION>
> > ++
> > +diff --git a/test cases/frameworks/10 gtk-doc/doc/foobar1/foobar.types
> b/test cases/frameworks/10 gtk-doc/doc/foobar1/foobar.types
> > +new file mode 100644
> > +index 00000000000..0a9c046f3ed
> > +--- /dev/null
> > ++++ b/test cases/frameworks/10 gtk-doc/doc/foobar1/foobar.types
> > +@@ -0,0 +1,4 @@
> > ++% This include is useless it's a regression test for
> https://github.com/mesonbuild/meson/issues/8744
> > ++#include <foo.h>
> > ++
> > ++foo_obj_get_type
> > +diff --git a/test cases/frameworks/10 gtk-doc/doc/foobar1/meson.build
> b/test cases/frameworks/10 gtk-doc/doc/foobar1/meson.build
> > +index 149c6e956aa..f4b3724dbae 100644
> > +--- a/test cases/frameworks/10 gtk-doc/doc/foobar1/meson.build
> > ++++ b/test cases/frameworks/10 gtk-doc/doc/foobar1/meson.build
> > +@@ -1,5 +1,9 @@
> > + gnome.gtkdoc('foobar',
> > +- src_dir : inc,
> > ++ src_dir : [inc, '.'],
> > + main_sgml : 'foobar-docs.sgml',
> > + content_files : [docbook, version_xml],
> > ++ dependencies: foo_dep,
> > ++ # Manually written types file for regression test:
> > ++ # https://github.com/mesonbuild/meson/issues/8744
> > ++ gobject_typesfile: 'foobar.types',
> > + install : true)
> > +diff --git a/test cases/frameworks/10 gtk-doc/foo.c b/test
> cases/frameworks/10 gtk-doc/foo.c
> > +new file mode 100644
> > +index 00000000000..36c0639ec08
> > +--- /dev/null
> > ++++ b/test cases/frameworks/10 gtk-doc/foo.c
> > +@@ -0,0 +1,30 @@
> > ++#include <foo.h>
> > ++
> > ++
> > ++struct _FooObj {
> > ++ GObject parent;
> > ++ int dummy;
> > ++};
> > ++
> > ++G_DEFINE_TYPE(FooObj, foo_obj, G_TYPE_OBJECT)
> > ++
> > ++static void foo_obj_init (FooObj *self)
> > ++{
> > ++}
> > ++
> > ++static void foo_obj_class_init (FooObjClass *klass)
> > ++{
> > ++}
> > ++
> > ++/**
> > ++ * foo_do_something:
> > ++ * @self: self
> > ++ *
> > ++ * Useless function.
> > ++ *
> > ++ * Returns: 0.
> > ++ */
> > ++int foo_do_something(FooObj *self)
> > ++{
> > ++ return 0;
> > ++}
> > +diff --git a/test cases/frameworks/10 gtk-doc/include/foo.h b/test
> cases/frameworks/10 gtk-doc/include/foo.h
> > +index 7b8946b6a86..510f3d1ecb5 100644
> > +--- a/test cases/frameworks/10 gtk-doc/include/foo.h
> > ++++ b/test cases/frameworks/10 gtk-doc/include/foo.h
> > +@@ -1,5 +1,7 @@
> > + #pragma once
> > +
> > ++#include <glib-object.h>
> > ++
> > + /**
> > + * FooIndecision:
> > + * @FOO_MAYBE: Something maybe
> > +@@ -13,3 +15,19 @@ typedef enum {
> > + FOO_POSSIBLY,
> > + } FooIndecision;
> > +
> > ++/**
> > ++ * FooObjClass:
> > ++ *
> > ++ * The class
> > ++ */
> > ++
> > ++/**
> > ++ * FooObj:
> > ++ *
> > ++ * The instance
> > ++ */
> > ++
> > ++#define FOO_TYPE_OBJ foo_obj_get_type()
> > ++G_DECLARE_FINAL_TYPE(FooObj, foo_obj, FOO, OBJ, GObject)
> > ++
> > ++int foo_do_something(FooObj *self);
> > +diff --git a/test cases/frameworks/10 gtk-doc/meson.build b/test
> cases/frameworks/10 gtk-doc/meson.build
> > +index 5c22ad0afa4..292980fafa7 100644
> > +--- a/test cases/frameworks/10 gtk-doc/meson.build
> > ++++ b/test cases/frameworks/10 gtk-doc/meson.build
> > +@@ -24,4 +24,16 @@ if gtkdoc_ver.version_compare('<1.26')
> > + error('MESON_SKIP_TEST gtk-doc test requires gtkdoc >= 1.26.')
> > + endif
> > +
> > ++gobject = dependency('gobject-2.0')
> > ++
> > ++libfoo = library('foo', 'foo.c',
> > ++ include_directories: inc,
> > ++ dependencies: gobject,
> > ++)
> > ++
> > ++foo_dep = declare_dependency(
> > ++ link_with: libfoo,
> > ++ include_directories: inc,
> > ++)
> > ++
> > + subdir('doc')
> > +diff --git a/test cases/frameworks/10 gtk-doc/test.json b/test
> cases/frameworks/10 gtk-doc/test.json
> > +index c44126cc741..03ad0595817 100644
> > +--- a/test cases/frameworks/10 gtk-doc/test.json
> > ++++ b/test cases/frameworks/10 gtk-doc/test.json
> > +@@ -4,8 +4,8 @@
> > + {"type": "file", "file": "usr/share/gtk-doc/html/foobar/BAR.html"},
> > + {"type": "file", "file":
> "usr/share/gtk-doc/html/foobar/foobar.devhelp2"},
> > + {"type": "file", "file":
> "usr/share/gtk-doc/html/foobar/foobar.html"},
> > +- {"type": "file", "file":
> "usr/share/gtk-doc/html/foobar/foobar-foo.html"},
> > +- {"type": "file", "file":
> "usr/share/gtk-doc/html/foobar/foobar-foo-version.html"},
> > ++ {"type": "file", "file":
> "usr/share/gtk-doc/html/foobar/FooObj.html"},
> > ++ {"type": "file", "file":
> "usr/share/gtk-doc/html/foobar/foo-version.html"},
> > + {"type": "file", "file": "usr/share/gtk-doc/html/foobar/home.png"},
> > + {"type": "file", "file":
> "usr/share/gtk-doc/html/foobar/index.html"},
> > + {"type": "file", "file": "usr/share/gtk-doc/html/foobar/left.png"},
> > diff --git a/meta/recipes-devtools/meson/meson/cross-prop-default.patch
> b/meta/recipes-devtools/meson/meson/cross-prop-default.patch
> > deleted file mode 100644
> > index 772395e879..0000000000
> > --- a/meta/recipes-devtools/meson/meson/cross-prop-default.patch
> > +++ /dev/null
> > @@ -1,23 +0,0 @@
> > -meson.build files that use cc.run() in native builds can silently
> fallback to
> > -meson.get_cross_property() in cross builds without an exe-wrapper, but
> there's
> > -no way to know that this is happening.
> > -
> > -As the defaults may be pessimistic (for example, disabling the support
> for a
> > -feature that should be enabled) emit a warning when the default is
> used, so that
> > -the recipe can explicitly set the cross property as relevant.
> > -
> > -Upstream-Status: Submitted [
> https://github.com/mesonbuild/meson/pull/5071]
> > -Signed-off-by: Ross Burton <ross.burton@intel.com>
> > -
> > -diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py
> > -index 3c3cfae0..10e741ae 100644
> > ---- a/mesonbuild/interpreter.py
> > -+++ b/mesonbuild/interpreter.py
> > -@@ -1890,6 +1890,7 @@ class MesonMain(InterpreterObject):
> > - return props[propname]
> > - except Exception:
> > - if len(args) == 2:
> > -+ mlog.warning('Cross property %s is using default value
> %s' % (propname, args[1]))
> > - return args[1]
> > - raise InterpreterException('Unknown cross property: %s.' %
> propname)
> > -
> > diff --git a/meta/recipes-devtools/meson/meson_0.57.2.bb
> b/meta/recipes-devtools/meson/meson_0.58.0.bb
> > similarity index 100%
> > rename from meta/recipes-devtools/meson/meson_0.57.2.bb
> > rename to meta/recipes-devtools/meson/meson_0.58.0.bb
> > diff --git a/meta/recipes-devtools/meson/nativesdk-meson_0.57.2.bb
> b/meta/recipes-devtools/meson/nativesdk-meson_0.58.0.bb
> > similarity index 100%
> > rename from meta/recipes-devtools/meson/nativesdk-meson_0.57.2.bb
> > rename to meta/recipes-devtools/meson/nativesdk-meson_0.58.0.bb
> > --
> > 2.31.1
> >
> >
> >
> >
>
[-- Attachment #2: Type: text/html, Size: 51308 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [OE-core] [PATCH 4/8] meson: update 0.57.2 -> 0.58.0
2021-05-14 13:59 ` Alexander Kanavin
@ 2021-05-14 15:20 ` Khem Raj
2021-05-14 18:12 ` Andreas Müller
0 siblings, 1 reply; 12+ messages in thread
From: Khem Raj @ 2021-05-14 15:20 UTC (permalink / raw)
To: Alexander Kanavin, Andreas Müller
Cc: Patches and discussions about the oe-core layer
On Fri, May 14, 2021 at 6:59 AM Alexander Kanavin
<alex.kanavin@gmail.com> wrote:
>
> Probably resolved by updating to 40.1?
> https://gitlab.gnome.org/GNOME/nautilus/-/tags
>
easier said than done. Sadly these are complex apps and I don't have
time to fix the long list of dependencies it will ensue
therefore I will leave it broken and exclude them from my distro
builds from, Andreas might be
interested
> Alex
>
> On Fri, 14 May 2021 at 15:46, Khem Raj <raj.khem@gmail.com> wrote:
>>
>> breaks nautilus https://errors.yoctoproject.org/Errors/Details/581184/
>>
>> On Thu, May 13, 2021 at 1:56 PM Alexander Kanavin
>> <alex.kanavin@gmail.com> wrote:
>> >
>> > Rebase patches; dropped chunks (and cross-prop-default.patch)
>> > have been removed upstream.
>> >
>> > Move native-only patches to all-patches, as they're a pain to rebase
>> > separately.
>> >
>> > Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
>> > ---
>> > meta/recipes-devtools/meson/meson.inc | 11 +-
>> > .../0001-Make-CPU-family-warnings-fatal.patch | 18 +-
>> > ...sues-that-arise-when-cross-compiling.patch | 8 +-
>> > ...-not-manipulate-the-environment-when.patch | 14 +-
>> > ...pport-building-allarch-recipes-again.patch | 10 +-
>> > .../meson/meson/0003-native_bindir.patch | 58 +--
>> > ...2c19e693a69b0650ce6c8a8903163c959996.patch | 412 ++++++++++++++++++
>> > .../meson/meson/cross-prop-default.patch | 23 -
>> > .../{meson_0.57.2.bb => meson_0.58.0.bb} | 0
>> > ...on_0.57.2.bb => nativesdk-meson_0.58.0.bb} | 0
>> > 10 files changed, 456 insertions(+), 98 deletions(-)
>> > create mode 100644 meta/recipes-devtools/meson/meson/4e312c19e693a69b0650ce6c8a8903163c959996.patch
>> > delete mode 100644 meta/recipes-devtools/meson/meson/cross-prop-default.patch
>> > rename meta/recipes-devtools/meson/{meson_0.57.2.bb => meson_0.58.0.bb} (100%)
>> > rename meta/recipes-devtools/meson/{nativesdk-meson_0.57.2.bb => nativesdk-meson_0.58.0.bb} (100%)
>> >
>> > diff --git a/meta/recipes-devtools/meson/meson.inc b/meta/recipes-devtools/meson/meson.inc
>> > index 10e7d8a1ce..f60381453b 100644
>> > --- a/meta/recipes-devtools/meson/meson.inc
>> > +++ b/meta/recipes-devtools/meson/meson.inc
>> > @@ -12,16 +12,13 @@ SRC_URI = "https://github.com/mesonbuild/meson/releases/download/${PV}/meson-${P
>> > file://0003-native_bindir.patch \
>> > file://0001-python-module-do-not-manipulate-the-environment-when.patch \
>> > file://disable-rpath-handling.patch \
>> > - file://cross-prop-default.patch \
>> > file://0001-modules-python.py-do-not-substitute-python-s-install.patch \
>> > file://gi-target-dep.patch \
>> > + file://0001-Make-CPU-family-warnings-fatal.patch \
>> > + file://0002-Support-building-allarch-recipes-again.patch \
>> > + file://4e312c19e693a69b0650ce6c8a8903163c959996.patch \
>> > "
>> > -SRC_URI[sha256sum] = "3a83e7b1c5de94fa991ec34d9b198d94f38ed699d3524cb0fdf3b99fd23d4cc5"
>> > -
>> > -SRC_URI_append_class-native = " \
>> > - file://0001-Make-CPU-family-warnings-fatal.patch \
>> > - file://0002-Support-building-allarch-recipes-again.patch \
>> > -"
>> > +SRC_URI[sha256sum] = "f4820df0bc969c99019fd4af8ca5f136ee94c63d8a5ad67e7eb73bdbc9182fdd"
>> >
>> > UPSTREAM_CHECK_URI = "https://github.com/mesonbuild/meson/releases"
>> > UPSTREAM_CHECK_REGEX = "meson-(?P<pver>\d+(\.\d+)+)\.tar"
>> > diff --git a/meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch b/meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch
>> > index 300797f9ee..bcccfabd17 100644
>> > --- a/meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch
>> > +++ b/meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch
>> > @@ -1,34 +1,33 @@
>> > -From 198e2de24adf5845e3ba389b533cf43440ee8acb Mon Sep 17 00:00:00 2001
>> > +From b64032a2eb1fb760f4ffd5b4b666e2433cf80d39 Mon Sep 17 00:00:00 2001
>> > From: Ross Burton <ross.burton@intel.com>
>> > Date: Tue, 3 Jul 2018 13:59:09 +0100
>> > -Subject: [PATCH] Make CPU family warnings fatal
>> > +Subject: [PATCH 1/2] Make CPU family warnings fatal
>> >
>> > Upstream-Status: Inappropriate [OE specific]
>> > Signed-off-by: Ross Burton <ross.burton@intel.com>
>> > -
>> > ---
>> > mesonbuild/envconfig.py | 2 +-
>> > mesonbuild/environment.py | 4 +---
>> > 2 files changed, 2 insertions(+), 4 deletions(-)
>> >
>> > diff --git a/mesonbuild/envconfig.py b/mesonbuild/envconfig.py
>> > -index ba35d16..2d3c34c 100644
>> > +index c6a4df3..4d58c91 100644
>> > --- a/mesonbuild/envconfig.py
>> > +++ b/mesonbuild/envconfig.py
>> > -@@ -262,7 +262,7 @@ class MachineInfo:
>> > +@@ -266,7 +266,7 @@ class MachineInfo:
>> >
>> > cpu_family = literal['cpu_family']
>> > if cpu_family not in known_cpu_families:
>> > -- mlog.warning('Unknown CPU family {}, please report this at https://github.com/mesonbuild/meson/issues/new'.format(cpu_family))
>> > +- mlog.warning(f'Unknown CPU family {cpu_family}, please report this at https://github.com/mesonbuild/meson/issues/new')
>> > + raise EnvironmentException('Unknown CPU family {}, see https://wiki.yoctoproject.org/wiki/Meson/UnknownCPU for directions.'.format(cpu_family))
>> >
>> > endian = literal['endian']
>> > if endian not in ('little', 'big'):
>> > diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
>> > -index 756dd81..4d2c2b6 100644
>> > +index fc9b703..eea8345 100644
>> > --- a/mesonbuild/environment.py
>> > +++ b/mesonbuild/environment.py
>> > -@@ -434,9 +434,7 @@ def detect_cpu_family(compilers: CompilersDict) -> str:
>> > +@@ -436,9 +436,7 @@ def detect_cpu_family(compilers: CompilersDict) -> str:
>> > trial = 'ppc64'
>> >
>> > if trial not in known_cpu_families:
>> > @@ -39,3 +38,6 @@ index 756dd81..4d2c2b6 100644
>> >
>> > return trial
>> >
>> > +--
>> > +2.24.0
>> > +
>> > diff --git a/meta/recipes-devtools/meson/meson/0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch b/meta/recipes-devtools/meson/meson/0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch
>> > index 471f1500da..ce90e515da 100644
>> > --- a/meta/recipes-devtools/meson/meson/0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch
>> > +++ b/meta/recipes-devtools/meson/meson/0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch
>> > @@ -1,4 +1,4 @@
>> > -From d3ef01a4208a801acad380a4aaceb6a21f8fa603 Mon Sep 17 00:00:00 2001
>> > +From 2f9c59e0489e569c5382404667c10f5c200a72ad Mon Sep 17 00:00:00 2001
>> > From: Alexander Kanavin <alex.kanavin@gmail.com>
>> > Date: Fri, 4 Aug 2017 16:16:41 +0300
>> > Subject: [PATCH] gtkdoc: fix issues that arise when cross-compiling
>> > @@ -20,11 +20,11 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
>> > 1 file changed, 4 insertions(+)
>> >
>> > diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py
>> > -index bcf77b9..6a4b472 100644
>> > +index dc2979e..c9ff9bd 100644
>> > --- a/mesonbuild/modules/gnome.py
>> > +++ b/mesonbuild/modules/gnome.py
>> > -@@ -974,6 +974,10 @@ This will become a hard error in the future.''')
>> > - args.append('--{}={}'.format(program_name, path))
>> > +@@ -1053,6 +1053,10 @@ class GnomeModule(ExtensionModule):
>> > + args.append(f'--{program_name}={path}')
>> > if namespace:
>> > args.append('--namespace=' + namespace)
>> > + gtkdoc_exe_wrapper = state.environment.properties.host.get('gtkdoc_exe_wrapper', None)
>> > diff --git a/meta/recipes-devtools/meson/meson/0001-python-module-do-not-manipulate-the-environment-when.patch b/meta/recipes-devtools/meson/meson/0001-python-module-do-not-manipulate-the-environment-when.patch
>> > index eb0e90dbdd..fdadc6869b 100644
>> > --- a/meta/recipes-devtools/meson/meson/0001-python-module-do-not-manipulate-the-environment-when.patch
>> > +++ b/meta/recipes-devtools/meson/meson/0001-python-module-do-not-manipulate-the-environment-when.patch
>> > @@ -1,4 +1,4 @@
>> > -From 689e28c49b85311f93f39df70cbee702fc44afb6 Mon Sep 17 00:00:00 2001
>> > +From 2264e67d7c2c22ca634fd26ea8ada6f0344ab280 Mon Sep 17 00:00:00 2001
>> > From: Alexander Kanavin <alex.kanavin@gmail.com>
>> > Date: Mon, 19 Nov 2018 14:24:26 +0100
>> > Subject: [PATCH] python module: do not manipulate the environment when calling
>> > @@ -12,10 +12,10 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
>> > 1 file changed, 12 deletions(-)
>> >
>> > diff --git a/mesonbuild/modules/python.py b/mesonbuild/modules/python.py
>> > -index 07be318..b770603 100644
>> > +index 422155b..aaf5844 100644
>> > --- a/mesonbuild/modules/python.py
>> > +++ b/mesonbuild/modules/python.py
>> > -@@ -71,11 +71,6 @@ class PythonDependency(ExternalDependency):
>> > +@@ -70,11 +70,6 @@ class PythonDependency(ExternalDependency):
>> > old_pkg_libdir = os.environ.get('PKG_CONFIG_LIBDIR')
>> > old_pkg_path = os.environ.get('PKG_CONFIG_PATH')
>> >
>> > @@ -26,9 +26,9 @@ index 07be318..b770603 100644
>> > -
>> > try:
>> > self.pkgdep = PkgConfigDependency(pkg_name, environment, kwargs)
>> > - mlog.debug('Found "{}" via pkgconfig lookup in LIBPC ({})'.format(pkg_name, pkg_libdir))
>> > -@@ -84,13 +79,6 @@ class PythonDependency(ExternalDependency):
>> > - mlog.debug('"{}" could not be found in LIBPC ({})'.format(pkg_name, pkg_libdir))
>> > + mlog.debug(f'Found "{pkg_name}" via pkgconfig lookup in LIBPC ({pkg_libdir})')
>> > +@@ -83,13 +78,6 @@ class PythonDependency(ExternalDependency):
>> > + mlog.debug(f'"{pkg_name}" could not be found in LIBPC ({pkg_libdir})')
>> > mlog.debug(e)
>> >
>> > - if old_pkg_path is not None:
>> > @@ -39,5 +39,5 @@ index 07be318..b770603 100644
>> > - else:
>> > - os.environ.pop('PKG_CONFIG_LIBDIR', None)
>> > else:
>> > - mlog.debug('"{}" could not be found in LIBPC ({}), this is likely due to a relocated python installation'.format(pkg_name, pkg_libdir))
>> > + mlog.debug(f'"{pkg_name}" could not be found in LIBPC ({pkg_libdir}), this is likely due to a relocated python installation')
>> >
>> > diff --git a/meta/recipes-devtools/meson/meson/0002-Support-building-allarch-recipes-again.patch b/meta/recipes-devtools/meson/meson/0002-Support-building-allarch-recipes-again.patch
>> > index f6175a194c..dcc1ce9c27 100644
>> > --- a/meta/recipes-devtools/meson/meson/0002-Support-building-allarch-recipes-again.patch
>> > +++ b/meta/recipes-devtools/meson/meson/0002-Support-building-allarch-recipes-again.patch
>> > @@ -1,19 +1,18 @@
>> > -From ac1021a3abf612e8be9b19eecb97062e0c314701 Mon Sep 17 00:00:00 2001
>> > +From 656bf55fed01df2d2e2ad6d9d9887173cb16b85c Mon Sep 17 00:00:00 2001
>> > From: Peter Kjellerstedt <pkj@axis.com>
>> > Date: Thu, 26 Jul 2018 16:32:49 +0200
>> > -Subject: [PATCH] Support building allarch recipes again
>> > +Subject: [PATCH 2/2] Support building allarch recipes again
>> >
>> > This registers "allarch" as a known CPU family.
>> >
>> > Upstream-Status: Inappropriate [OE specific]
>> > Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
>> > -
>> > ---
>> > mesonbuild/envconfig.py | 1 +
>> > 1 file changed, 1 insertion(+)
>> >
>> > diff --git a/mesonbuild/envconfig.py b/mesonbuild/envconfig.py
>> > -index 2d3c34c..b9e7908 100644
>> > +index 4d58c91..ff01ad1 100644
>> > --- a/mesonbuild/envconfig.py
>> > +++ b/mesonbuild/envconfig.py
>> > @@ -36,6 +36,7 @@ from pathlib import Path
>> > @@ -24,3 +23,6 @@ index 2d3c34c..b9e7908 100644
>> > 'aarch64',
>> > 'alpha',
>> > 'arc',
>> > +--
>> > +2.24.0
>> > +
>> > diff --git a/meta/recipes-devtools/meson/meson/0003-native_bindir.patch b/meta/recipes-devtools/meson/meson/0003-native_bindir.patch
>> > index ed85116c4f..89257b9e05 100644
>> > --- a/meta/recipes-devtools/meson/meson/0003-native_bindir.patch
>> > +++ b/meta/recipes-devtools/meson/meson/0003-native_bindir.patch
>> > @@ -1,4 +1,4 @@
>> > -From 1546e1f95a119175b7a4e4272a26dd85505e5ede Mon Sep 17 00:00:00 2001
>> > +From 30e97d4090a3d3f5b7ddcaf27cfa17f3c8c1d462 Mon Sep 17 00:00:00 2001
>> > From: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
>> > Date: Wed, 15 Nov 2017 15:05:01 +0100
>> > Subject: [PATCH] native_bindir
>> > @@ -18,23 +18,22 @@ Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
>> >
>> > ---
>> > mesonbuild/dependencies/base.py | 19 +++++++++++--------
>> > - mesonbuild/dependencies/ui.py | 6 +++---
>> > - 2 files changed, 14 insertions(+), 11 deletions(-)
>> > + 1 file changed, 11 insertions(+), 8 deletions(-)
>> >
>> > diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py
>> > -index cd77b4b..7e3f338 100644
>> > +index 14380d4..d0c443f 100644
>> > --- a/mesonbuild/dependencies/base.py
>> > +++ b/mesonbuild/dependencies/base.py
>> > -@@ -192,7 +192,7 @@ class Dependency:
>> > +@@ -179,7 +179,7 @@ class Dependency:
>> > def get_exe_args(self, compiler):
>> > return []
>> >
>> > - def get_pkgconfig_variable(self, variable_name: str, kwargs: T.Dict[str, T.Any]) -> str:
>> > + def get_pkgconfig_variable(self, variable_name: str, kwargs: T.Dict[str, T.Any], use_native=False) -> str:
>> > - raise DependencyException('{!r} is not a pkgconfig dependency'.format(self.name))
>> > + raise DependencyException(f'{self.name!r} is not a pkgconfig dependency')
>> >
>> > def get_configtool_variable(self, variable_name):
>> > -@@ -280,7 +280,7 @@ class InternalDependency(Dependency):
>> > +@@ -267,7 +267,7 @@ class InternalDependency(Dependency):
>> > return True
>> > return any(d.is_built() for d in self.ext_deps)
>> >
>> > @@ -43,7 +42,7 @@ index cd77b4b..7e3f338 100644
>> > raise DependencyException('Method "get_pkgconfig_variable()" is '
>> > 'invalid for an internal dependency')
>> >
>> > -@@ -658,8 +658,11 @@ class PkgConfigDependency(ExternalDependency):
>> > +@@ -645,8 +645,11 @@ class PkgConfigDependency(ExternalDependency):
>> > return s.format(self.__class__.__name__, self.name, self.is_found,
>> > self.version_reqs)
>> >
>> > @@ -57,16 +56,16 @@ index cd77b4b..7e3f338 100644
>> > p, out, err = Popen_safe(cmd, env=env)
>> > rc, out, err = p.returncode, out.strip(), err.strip()
>> > call = ' '.join(cmd)
>> > -@@ -685,7 +688,7 @@ class PkgConfigDependency(ExternalDependency):
>> > - env['PKG_CONFIG_LIBDIR'] = new_pkg_config_libdir
>> > - mlog.debug('PKG_CONFIG_LIBDIR: ' + new_pkg_config_libdir)
>> > +@@ -674,7 +677,7 @@ class PkgConfigDependency(ExternalDependency):
>> > + if key.startswith('PKG_'):
>> > + mlog.debug(f'env[{key}]: {value}')
>> >
>> > - def _call_pkgbin(self, args, env=None):
>> > + def _call_pkgbin(self, args, env=None, use_native=False):
>> > # Always copy the environment since we're going to modify it
>> > # with pkg-config variables
>> > if env is None:
>> > -@@ -699,7 +702,7 @@ class PkgConfigDependency(ExternalDependency):
>> > +@@ -688,7 +691,7 @@ class PkgConfigDependency(ExternalDependency):
>> > targs = tuple(args)
>> > cache = PkgConfigDependency.pkgbin_cache
>> > if (self.pkgbin, targs, fenv) not in cache:
>> > @@ -75,7 +74,7 @@ index cd77b4b..7e3f338 100644
>> > return cache[(self.pkgbin, targs, fenv)]
>> >
>> > def _convert_mingw_paths(self, args: T.List[str]) -> T.List[str]:
>> > -@@ -905,7 +908,7 @@ class PkgConfigDependency(ExternalDependency):
>> > +@@ -894,7 +897,7 @@ class PkgConfigDependency(ExternalDependency):
>> > (self.name, out_raw))
>> > self.link_args, self.raw_link_args = self._search_libs(out, out_raw)
>> >
>> > @@ -84,7 +83,7 @@ index cd77b4b..7e3f338 100644
>> > options = ['--variable=' + variable_name, self.name]
>> >
>> > if 'define_variable' in kwargs:
>> > -@@ -918,7 +921,7 @@ class PkgConfigDependency(ExternalDependency):
>> > +@@ -907,7 +910,7 @@ class PkgConfigDependency(ExternalDependency):
>> >
>> > options = ['--define-variable=' + '='.join(definition)] + options
>> >
>> > @@ -93,34 +92,3 @@ index cd77b4b..7e3f338 100644
>> > variable = ''
>> > if ret != 0:
>> > if self.required:
>> > -diff --git a/mesonbuild/dependencies/ui.py b/mesonbuild/dependencies/ui.py
>> > -index d897d76..a598d2e 100644
>> > ---- a/mesonbuild/dependencies/ui.py
>> > -+++ b/mesonbuild/dependencies/ui.py
>> > -@@ -325,7 +325,7 @@ class QtBaseDependency(ExternalDependency):
>> > - self.bindir = self.get_pkgconfig_host_bins(core)
>> > - if not self.bindir:
>> > - # If exec_prefix is not defined, the pkg-config file is broken
>> > -- prefix = core.get_pkgconfig_variable('exec_prefix', {})
>> > -+ prefix = core.get_pkgconfig_variable('exec_prefix', {}, use_native=True)
>> > - if prefix:
>> > - self.bindir = os.path.join(prefix, 'bin')
>> > -
>> > -@@ -528,7 +528,7 @@ class Qt4Dependency(QtBaseDependency):
>> > - applications = ['moc', 'uic', 'rcc', 'lupdate', 'lrelease']
>> > - for application in applications:
>> > - try:
>> > -- return os.path.dirname(core.get_pkgconfig_variable('%s_location' % application, {}))
>> > -+ return os.path.dirname(core.get_pkgconfig_variable('%s_location' % application, {}, use_native=True))
>> > - except MesonException:
>> > - pass
>> > -
>> > -@@ -538,7 +538,7 @@ class Qt5Dependency(QtBaseDependency):
>> > - QtBaseDependency.__init__(self, 'qt5', env, kwargs)
>> > -
>> > - def get_pkgconfig_host_bins(self, core):
>> > -- return core.get_pkgconfig_variable('host_bins', {})
>> > -+ return core.get_pkgconfig_variable('host_bins', {}, use_native=True)
>> > -
>> > - def get_private_includes(self, mod_inc_dir, module):
>> > - return _qt_get_private_includes(mod_inc_dir, module, self.version)
>> > diff --git a/meta/recipes-devtools/meson/meson/4e312c19e693a69b0650ce6c8a8903163c959996.patch b/meta/recipes-devtools/meson/meson/4e312c19e693a69b0650ce6c8a8903163c959996.patch
>> > new file mode 100644
>> > index 0000000000..76daf019b0
>> > --- /dev/null
>> > +++ b/meta/recipes-devtools/meson/meson/4e312c19e693a69b0650ce6c8a8903163c959996.patch
>> > @@ -0,0 +1,412 @@
>> > +From 4e312c19e693a69b0650ce6c8a8903163c959996 Mon Sep 17 00:00:00 2001
>> > +From: Xavier Claessens <xavier.claessens@collabora.com>
>> > +Date: Tue, 11 May 2021 09:18:47 -0400
>> > +Subject: [PATCH] gnome: Fix gtkdoc generation
>> > +
>> > +install_scripts used to replace @BUILD_ROOT@ and @SOURCE_ROOT@ but it
>> > +was not documented and got removed in Meson 0.58.0. gnome.gtkdoc() was
>> > +relying on that behaviour, but it has always been broken in the case the
>> > +source or build directory contains spaces.
>> > +
>> > +Fix this by changing get_include_args() to substitue paths directly
>> > +which will then get escaped correctly.
>> > +
>> > +Add a unit test that builds GObject documentation which is where this
>> > +issue has been spotted.
>> > +
>> > +Fixes: #8744
>> > +Upstream-Status: Backport
>> > +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
>> > +---
>> > + mesonbuild/modules/__init__.py | 54 +++++++++----------
>> > + mesonbuild/modules/gnome.py | 15 +++---
>> > + mesonbuild/modules/hotdoc.py | 3 +-
>> > + mesonbuild/modules/qt.py | 4 +-
>> > + mesonbuild/modules/windows.py | 5 +-
>> > + .../10 gtk-doc/doc/foobar1/foobar-docs.sgml | 2 +-
>> > + .../doc/foobar1/foobar-sections.txt | 16 ++++++
>> > + .../10 gtk-doc/doc/foobar1/foobar.types | 4 ++
>> > + .../10 gtk-doc/doc/foobar1/meson.build | 6 ++-
>> > + test cases/frameworks/10 gtk-doc/foo.c | 30 +++++++++++
>> > + .../frameworks/10 gtk-doc/include/foo.h | 18 +++++++
>> > + test cases/frameworks/10 gtk-doc/meson.build | 12 +++++
>> > + test cases/frameworks/10 gtk-doc/test.json | 4 +-
>> > + 13 files changed, 127 insertions(+), 46 deletions(-)
>> > + create mode 100644 test cases/frameworks/10 gtk-doc/doc/foobar1/foobar-sections.txt
>> > + create mode 100644 test cases/frameworks/10 gtk-doc/doc/foobar1/foobar.types
>> > + create mode 100644 test cases/frameworks/10 gtk-doc/foo.c
>> > +
>> > +diff --git a/mesonbuild/modules/__init__.py b/mesonbuild/modules/__init__.py
>> > +index ddb5e3e6cf3..c0970294c34 100644
>> > +--- a/mesonbuild/modules/__init__.py
>> > ++++ b/mesonbuild/modules/__init__.py
>> > +@@ -56,6 +56,33 @@ def __init__(self, interpreter: 'Interpreter') -> None:
>> > + self.target_machine = interpreter.builtin['target_machine'].held_object
>> > + self.current_node = interpreter.current_node
>> > +
>> > ++ def get_include_args(self, include_dirs, prefix='-I'):
>> > ++ if not include_dirs:
>> > ++ return []
>> > ++
>> > ++ srcdir = self.environment.get_source_dir()
>> > ++ builddir = self.environment.get_build_dir()
>> > ++
>> > ++ dirs_str = []
>> > ++ for dirs in unholder(include_dirs):
>> > ++ if isinstance(dirs, str):
>> > ++ dirs_str += [f'{prefix}{dirs}']
>> > ++ continue
>> > ++
>> > ++ # Should be build.IncludeDirs object.
>> > ++ basedir = dirs.get_curdir()
>> > ++ for d in dirs.get_incdirs():
>> > ++ expdir = os.path.join(basedir, d)
>> > ++ srctreedir = os.path.join(srcdir, expdir)
>> > ++ buildtreedir = os.path.join(builddir, expdir)
>> > ++ dirs_str += [f'{prefix}{buildtreedir}',
>> > ++ f'{prefix}{srctreedir}']
>> > ++ for d in dirs.get_extra_build_dirs():
>> > ++ dirs_str += [f'{prefix}{d}']
>> > ++
>> > ++ return dirs_str
>> > ++
>> > ++
>> > + class ModuleObject:
>> > + """Base class for all objects returned by modules
>> > + """
>> > +@@ -71,33 +98,6 @@ def __init__(self, interpreter: T.Optional['Interpreter'] = None) -> None:
>> > + class ExtensionModule(ModuleObject):
>> > + pass
>> > +
>> > +-def get_include_args(include_dirs, prefix='-I'):
>> > +- '''
>> > +- Expand include arguments to refer to the source and build dirs
>> > +- by using @SOURCE_ROOT@ and @BUILD_ROOT@ for later substitution
>> > +- '''
>> > +- if not include_dirs:
>> > +- return []
>> > +-
>> > +- dirs_str = []
>> > +- for dirs in unholder(include_dirs):
>> > +- if isinstance(dirs, str):
>> > +- dirs_str += [f'{prefix}{dirs}']
>> > +- continue
>> > +-
>> > +- # Should be build.IncludeDirs object.
>> > +- basedir = dirs.get_curdir()
>> > +- for d in dirs.get_incdirs():
>> > +- expdir = os.path.join(basedir, d)
>> > +- srctreedir = os.path.join('@SOURCE_ROOT@', expdir)
>> > +- buildtreedir = os.path.join('@BUILD_ROOT@', expdir)
>> > +- dirs_str += [f'{prefix}{buildtreedir}',
>> > +- f'{prefix}{srctreedir}']
>> > +- for d in dirs.get_extra_build_dirs():
>> > +- dirs_str += [f'{prefix}{d}']
>> > +-
>> > +- return dirs_str
>> > +-
>> > + def is_module_library(fname):
>> > + '''
>> > + Check if the file is a library-like file generated by a module-specific
>> > +diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py
>> > +index d0b053d4f76..c91cda66f8b 100644
>> > +--- a/mesonbuild/modules/gnome.py
>> > ++++ b/mesonbuild/modules/gnome.py
>> > +@@ -26,7 +26,6 @@
>> > + from .. import mesonlib
>> > + from .. import interpreter
>> > + from . import GResourceTarget, GResourceHeaderTarget, GirTarget, TypelibTarget, VapiTarget
>> > +-from . import get_include_args
>> > + from . import ExtensionModule
>> > + from . import ModuleReturnValue
>> > + from ..mesonlib import (
>> > +@@ -394,7 +393,7 @@ def _get_dependencies_flags(self, deps, state, depends, include_rpath=False,
>> > + gi_includes.update([girdir])
>> > + if isinstance(dep, InternalDependency):
>> > + cflags.update(dep.get_compile_args())
>> > +- cflags.update(get_include_args(dep.include_directories))
>> > ++ cflags.update(state.get_include_args(dep.include_directories))
>> > + for lib in unholder(dep.libraries):
>> > + if isinstance(lib, build.SharedLibrary):
>> > + internal_ldflags.update(self._get_link_args(state, lib, depends, include_rpath))
>> > +@@ -443,7 +442,7 @@ def _get_dependencies_flags(self, deps, state, depends, include_rpath=False,
>> > + else:
>> > + external_ldflags.update([lib])
>> > + elif isinstance(dep, (build.StaticLibrary, build.SharedLibrary)):
>> > +- cflags.update(get_include_args(dep.get_include_dirs()))
>> > ++ cflags.update(state.get_include_args(dep.get_include_dirs()))
>> > + depends.append(dep)
>> > + else:
>> > + mlog.log(f'dependency {dep!r} not handled to build gir files')
>> > +@@ -853,7 +852,7 @@ def generate_gir(self, state, args, kwargs):
>> > + scan_command += self._scan_header(kwargs)
>> > + scan_command += self._scan_extra_args(kwargs)
>> > + scan_command += ['-I' + srcdir, '-I' + builddir]
>> > +- scan_command += get_include_args(girtargets_inc_dirs)
>> > ++ scan_command += state.get_include_args(girtargets_inc_dirs)
>> > + scan_command += ['--filelist=' + self._make_gir_filelist(state, srcdir, ns, nsversion, girtargets, libsources)]
>> > + scan_command += self._scan_link_withs(state, depends, kwargs)
>> > + scan_command += self._scan_include(state, depends, gir_inc_dirs, kwargs)
>> > +@@ -863,8 +862,8 @@ def generate_gir(self, state, args, kwargs):
>> > + scan_command += ['--cflags-begin']
>> > + scan_command += cflags
>> > + scan_command += ['--cflags-end']
>> > +- scan_command += get_include_args(inc_dirs)
>> > +- scan_command += get_include_args(list(gi_includes) + gir_inc_dirs + inc_dirs, prefix='--add-include-path=')
>> > ++ scan_command += state.get_include_args(inc_dirs)
>> > ++ scan_command += state.get_include_args(list(gi_includes) + gir_inc_dirs + inc_dirs, prefix='--add-include-path=')
>> > + scan_command += list(internal_ldflags)
>> > + scan_command += self._scan_gir_targets(state, girtargets)
>> > + scan_command += self._scan_langs(state, [lc[0] for lc in langs_compilers])
>> > +@@ -886,7 +885,7 @@ def generate_gir(self, state, args, kwargs):
>> > +
>> > + typelib_output = f'{ns}-{nsversion}.typelib'
>> > + typelib_cmd = [gicompiler, scan_target, '--output', '@OUTPUT@']
>> > +- typelib_cmd += get_include_args(gir_inc_dirs, prefix='--includedir=')
>> > ++ typelib_cmd += state.get_include_args(gir_inc_dirs, prefix='--includedir=')
>> > +
>> > + for incdir in typelib_includes:
>> > + typelib_cmd += ["--includedir=" + incdir]
>> > +@@ -1127,7 +1126,7 @@ def _get_build_args(self, kwargs, state, depends):
>> > + 'Gir include dirs should be include_directories().')
>> > +
>> > + cflags.extend(deps_cflags)
>> > +- cflags.extend(get_include_args(inc_dirs))
>> > ++ cflags.extend(state.get_include_args(inc_dirs))
>> > + ldflags = []
>> > + ldflags.extend(internal_ldflags)
>> > + ldflags.extend(external_ldflags)
>> > +diff --git a/mesonbuild/modules/hotdoc.py b/mesonbuild/modules/hotdoc.py
>> > +index bf8cd229c0d..89a5d938ea7 100644
>> > +--- a/mesonbuild/modules/hotdoc.py
>> > ++++ b/mesonbuild/modules/hotdoc.py
>> > +@@ -22,7 +22,6 @@
>> > + from mesonbuild.coredata import MesonException
>> > + from . import ModuleReturnValue
>> > + from . import ExtensionModule
>> > +-from . import get_include_args
>> > + from ..dependencies import Dependency, InternalDependency
>> > + from ..interpreterbase import FeatureNew, InvalidArguments, noPosargs, noKwargs
>> > + from ..interpreter import CustomTargetHolder
>> > +@@ -191,7 +190,7 @@ def process_dependencies(self, deps):
>> > + for dep in mesonlib.listify(ensure_list(deps)):
>> > + dep = getattr(dep, "held_object", dep)
>> > + if isinstance(dep, InternalDependency):
>> > +- inc_args = get_include_args(dep.include_directories)
>> > ++ inc_args = self.state.get_include_args(dep.include_directories)
>> > + cflags.update([self.replace_dirs_in_string(x)
>> > + for x in inc_args])
>> > + cflags.update(self.process_dependencies(dep.libraries))
>> > +diff --git a/mesonbuild/modules/qt.py b/mesonbuild/modules/qt.py
>> > +index b7389bd59af..1bf0099d1df 100644
>> > +--- a/mesonbuild/modules/qt.py
>> > ++++ b/mesonbuild/modules/qt.py
>> > +@@ -23,7 +23,7 @@
>> > + from ..mesonlib import MesonException, extract_as_list, File, unholder, version_compare
>> > + from ..dependencies import Dependency
>> > + import xml.etree.ElementTree as ET
>> > +-from . import ModuleReturnValue, get_include_args, ExtensionModule
>> > ++from . import ModuleReturnValue, ExtensionModule
>> > + from ..interpreterbase import noPosargs, permittedKwargs, FeatureNew, FeatureNewKwargs
>> > + from ..interpreter import extract_required_kwarg
>> > + from ..programs import NonExistingExternalProgram
>> > +@@ -239,7 +239,7 @@ def preprocess(self, state, args, kwargs):
>> > + ui_gen = build.Generator([self.uic], ui_kwargs)
>> > + ui_output = ui_gen.process_files(f'Qt{self.qt_version} ui', ui_files, state)
>> > + sources.append(ui_output)
>> > +- inc = get_include_args(include_dirs=include_directories)
>> > ++ inc = state.get_include_args(include_dirs=include_directories)
>> > + compile_args = []
>> > + for dep in unholder(dependencies):
>> > + if isinstance(dep, Dependency):
>> > +diff --git a/mesonbuild/modules/windows.py b/mesonbuild/modules/windows.py
>> > +index d7a86380885..c4fdc196681 100644
>> > +--- a/mesonbuild/modules/windows.py
>> > ++++ b/mesonbuild/modules/windows.py
>> > +@@ -19,7 +19,6 @@
>> > + from .. import mlog
>> > + from .. import mesonlib, build
>> > + from ..mesonlib import MachineChoice, MesonException, extract_as_list, unholder
>> > +-from . import get_include_args
>> > + from . import ModuleReturnValue
>> > + from . import ExtensionModule
>> > + from ..interpreter import CustomTargetHolder
>> > +@@ -83,12 +82,12 @@ def compile_resources(self, state, args, kwargs):
>> > + wrc_depends = extract_as_list(kwargs, 'depends', pop = True)
>> > + for d in wrc_depends:
>> > + if isinstance(d, CustomTargetHolder):
>> > +- extra_args += get_include_args([d.outdir_include()])
>> > ++ extra_args += state.get_include_args([d.outdir_include()])
>> > + inc_dirs = extract_as_list(kwargs, 'include_directories', pop = True)
>> > + for incd in inc_dirs:
>> > + if not isinstance(incd.held_object, (str, build.IncludeDirs)):
>> > + raise MesonException('Resource include dirs should be include_directories().')
>> > +- extra_args += get_include_args(inc_dirs)
>> > ++ extra_args += state.get_include_args(inc_dirs)
>> > +
>> > + rescomp, rescomp_type = self._find_resource_compiler(state)
>> > + if rescomp_type == ResourceCompilerType.rc:
>> > +diff --git a/test cases/frameworks/10 gtk-doc/doc/foobar1/foobar-docs.sgml b/test cases/frameworks/10 gtk-doc/doc/foobar1/foobar-docs.sgml
>> > +index 95f73efdf45..6ccd087dc18 100644
>> > +--- a/test cases/frameworks/10 gtk-doc/doc/foobar1/foobar-docs.sgml
>> > ++++ b/test cases/frameworks/10 gtk-doc/doc/foobar1/foobar-docs.sgml
>> > +@@ -35,7 +35,7 @@
>> > + </partintro>
>> > + <xi:include href="xml/foo.xml"/>
>> > + <xi:include href="../../include/bar.xml"/>
>> > +- <xi:include href="xml/foo-version.xml"/>
>> > ++ <xi:include href="xml/version.xml"/>
>> > + </reference>
>> > +
>> > + </book>
>> > +diff --git a/test cases/frameworks/10 gtk-doc/doc/foobar1/foobar-sections.txt b/test cases/frameworks/10 gtk-doc/doc/foobar1/foobar-sections.txt
>> > +new file mode 100644
>> > +index 00000000000..d14c8dab010
>> > +--- /dev/null
>> > ++++ b/test cases/frameworks/10 gtk-doc/doc/foobar1/foobar-sections.txt
>> > +@@ -0,0 +1,16 @@
>> > ++<SECTION>
>> > ++<FILE>foo</FILE>
>> > ++<TITLE>FooObj</TITLE>
>> > ++FooObj
>> > ++FooObjClass
>> > ++foo_do_something
>> > ++</SECTION>
>> > ++
>> > ++<SECTION>
>> > ++<FILE>version</FILE>
>> > ++<TITLE>version</TITLE>
>> > ++FOO_MAJOR_VERSION
>> > ++FOO_MINOR_VERSION
>> > ++FOO_MICRO_VERSION
>> > ++</SECTION>
>> > ++
>> > +diff --git a/test cases/frameworks/10 gtk-doc/doc/foobar1/foobar.types b/test cases/frameworks/10 gtk-doc/doc/foobar1/foobar.types
>> > +new file mode 100644
>> > +index 00000000000..0a9c046f3ed
>> > +--- /dev/null
>> > ++++ b/test cases/frameworks/10 gtk-doc/doc/foobar1/foobar.types
>> > +@@ -0,0 +1,4 @@
>> > ++% This include is useless it's a regression test for https://github.com/mesonbuild/meson/issues/8744
>> > ++#include <foo.h>
>> > ++
>> > ++foo_obj_get_type
>> > +diff --git a/test cases/frameworks/10 gtk-doc/doc/foobar1/meson.build b/test cases/frameworks/10 gtk-doc/doc/foobar1/meson.build
>> > +index 149c6e956aa..f4b3724dbae 100644
>> > +--- a/test cases/frameworks/10 gtk-doc/doc/foobar1/meson.build
>> > ++++ b/test cases/frameworks/10 gtk-doc/doc/foobar1/meson.build
>> > +@@ -1,5 +1,9 @@
>> > + gnome.gtkdoc('foobar',
>> > +- src_dir : inc,
>> > ++ src_dir : [inc, '.'],
>> > + main_sgml : 'foobar-docs.sgml',
>> > + content_files : [docbook, version_xml],
>> > ++ dependencies: foo_dep,
>> > ++ # Manually written types file for regression test:
>> > ++ # https://github.com/mesonbuild/meson/issues/8744
>> > ++ gobject_typesfile: 'foobar.types',
>> > + install : true)
>> > +diff --git a/test cases/frameworks/10 gtk-doc/foo.c b/test cases/frameworks/10 gtk-doc/foo.c
>> > +new file mode 100644
>> > +index 00000000000..36c0639ec08
>> > +--- /dev/null
>> > ++++ b/test cases/frameworks/10 gtk-doc/foo.c
>> > +@@ -0,0 +1,30 @@
>> > ++#include <foo.h>
>> > ++
>> > ++
>> > ++struct _FooObj {
>> > ++ GObject parent;
>> > ++ int dummy;
>> > ++};
>> > ++
>> > ++G_DEFINE_TYPE(FooObj, foo_obj, G_TYPE_OBJECT)
>> > ++
>> > ++static void foo_obj_init (FooObj *self)
>> > ++{
>> > ++}
>> > ++
>> > ++static void foo_obj_class_init (FooObjClass *klass)
>> > ++{
>> > ++}
>> > ++
>> > ++/**
>> > ++ * foo_do_something:
>> > ++ * @self: self
>> > ++ *
>> > ++ * Useless function.
>> > ++ *
>> > ++ * Returns: 0.
>> > ++ */
>> > ++int foo_do_something(FooObj *self)
>> > ++{
>> > ++ return 0;
>> > ++}
>> > +diff --git a/test cases/frameworks/10 gtk-doc/include/foo.h b/test cases/frameworks/10 gtk-doc/include/foo.h
>> > +index 7b8946b6a86..510f3d1ecb5 100644
>> > +--- a/test cases/frameworks/10 gtk-doc/include/foo.h
>> > ++++ b/test cases/frameworks/10 gtk-doc/include/foo.h
>> > +@@ -1,5 +1,7 @@
>> > + #pragma once
>> > +
>> > ++#include <glib-object.h>
>> > ++
>> > + /**
>> > + * FooIndecision:
>> > + * @FOO_MAYBE: Something maybe
>> > +@@ -13,3 +15,19 @@ typedef enum {
>> > + FOO_POSSIBLY,
>> > + } FooIndecision;
>> > +
>> > ++/**
>> > ++ * FooObjClass:
>> > ++ *
>> > ++ * The class
>> > ++ */
>> > ++
>> > ++/**
>> > ++ * FooObj:
>> > ++ *
>> > ++ * The instance
>> > ++ */
>> > ++
>> > ++#define FOO_TYPE_OBJ foo_obj_get_type()
>> > ++G_DECLARE_FINAL_TYPE(FooObj, foo_obj, FOO, OBJ, GObject)
>> > ++
>> > ++int foo_do_something(FooObj *self);
>> > +diff --git a/test cases/frameworks/10 gtk-doc/meson.build b/test cases/frameworks/10 gtk-doc/meson.build
>> > +index 5c22ad0afa4..292980fafa7 100644
>> > +--- a/test cases/frameworks/10 gtk-doc/meson.build
>> > ++++ b/test cases/frameworks/10 gtk-doc/meson.build
>> > +@@ -24,4 +24,16 @@ if gtkdoc_ver.version_compare('<1.26')
>> > + error('MESON_SKIP_TEST gtk-doc test requires gtkdoc >= 1.26.')
>> > + endif
>> > +
>> > ++gobject = dependency('gobject-2.0')
>> > ++
>> > ++libfoo = library('foo', 'foo.c',
>> > ++ include_directories: inc,
>> > ++ dependencies: gobject,
>> > ++)
>> > ++
>> > ++foo_dep = declare_dependency(
>> > ++ link_with: libfoo,
>> > ++ include_directories: inc,
>> > ++)
>> > ++
>> > + subdir('doc')
>> > +diff --git a/test cases/frameworks/10 gtk-doc/test.json b/test cases/frameworks/10 gtk-doc/test.json
>> > +index c44126cc741..03ad0595817 100644
>> > +--- a/test cases/frameworks/10 gtk-doc/test.json
>> > ++++ b/test cases/frameworks/10 gtk-doc/test.json
>> > +@@ -4,8 +4,8 @@
>> > + {"type": "file", "file": "usr/share/gtk-doc/html/foobar/BAR.html"},
>> > + {"type": "file", "file": "usr/share/gtk-doc/html/foobar/foobar.devhelp2"},
>> > + {"type": "file", "file": "usr/share/gtk-doc/html/foobar/foobar.html"},
>> > +- {"type": "file", "file": "usr/share/gtk-doc/html/foobar/foobar-foo.html"},
>> > +- {"type": "file", "file": "usr/share/gtk-doc/html/foobar/foobar-foo-version.html"},
>> > ++ {"type": "file", "file": "usr/share/gtk-doc/html/foobar/FooObj.html"},
>> > ++ {"type": "file", "file": "usr/share/gtk-doc/html/foobar/foo-version.html"},
>> > + {"type": "file", "file": "usr/share/gtk-doc/html/foobar/home.png"},
>> > + {"type": "file", "file": "usr/share/gtk-doc/html/foobar/index.html"},
>> > + {"type": "file", "file": "usr/share/gtk-doc/html/foobar/left.png"},
>> > diff --git a/meta/recipes-devtools/meson/meson/cross-prop-default.patch b/meta/recipes-devtools/meson/meson/cross-prop-default.patch
>> > deleted file mode 100644
>> > index 772395e879..0000000000
>> > --- a/meta/recipes-devtools/meson/meson/cross-prop-default.patch
>> > +++ /dev/null
>> > @@ -1,23 +0,0 @@
>> > -meson.build files that use cc.run() in native builds can silently fallback to
>> > -meson.get_cross_property() in cross builds without an exe-wrapper, but there's
>> > -no way to know that this is happening.
>> > -
>> > -As the defaults may be pessimistic (for example, disabling the support for a
>> > -feature that should be enabled) emit a warning when the default is used, so that
>> > -the recipe can explicitly set the cross property as relevant.
>> > -
>> > -Upstream-Status: Submitted [https://github.com/mesonbuild/meson/pull/5071]
>> > -Signed-off-by: Ross Burton <ross.burton@intel.com>
>> > -
>> > -diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py
>> > -index 3c3cfae0..10e741ae 100644
>> > ---- a/mesonbuild/interpreter.py
>> > -+++ b/mesonbuild/interpreter.py
>> > -@@ -1890,6 +1890,7 @@ class MesonMain(InterpreterObject):
>> > - return props[propname]
>> > - except Exception:
>> > - if len(args) == 2:
>> > -+ mlog.warning('Cross property %s is using default value %s' % (propname, args[1]))
>> > - return args[1]
>> > - raise InterpreterException('Unknown cross property: %s.' % propname)
>> > -
>> > diff --git a/meta/recipes-devtools/meson/meson_0.57.2.bb b/meta/recipes-devtools/meson/meson_0.58.0.bb
>> > similarity index 100%
>> > rename from meta/recipes-devtools/meson/meson_0.57.2.bb
>> > rename to meta/recipes-devtools/meson/meson_0.58.0.bb
>> > diff --git a/meta/recipes-devtools/meson/nativesdk-meson_0.57.2.bb b/meta/recipes-devtools/meson/nativesdk-meson_0.58.0.bb
>> > similarity index 100%
>> > rename from meta/recipes-devtools/meson/nativesdk-meson_0.57.2.bb
>> > rename to meta/recipes-devtools/meson/nativesdk-meson_0.58.0.bb
>> > --
>> > 2.31.1
>> >
>> >
>> >
>> >
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [OE-core] [PATCH 4/8] meson: update 0.57.2 -> 0.58.0
2021-05-14 15:20 ` Khem Raj
@ 2021-05-14 18:12 ` Andreas Müller
0 siblings, 0 replies; 12+ messages in thread
From: Andreas Müller @ 2021-05-14 18:12 UTC (permalink / raw)
To: Khem Raj
Cc: Alexander Kanavin, Patches and discussions about the oe-core layer
On Fri, May 14, 2021 at 5:20 PM Khem Raj <raj.khem@gmail.com> wrote:
>
> On Fri, May 14, 2021 at 6:59 AM Alexander Kanavin
> <alex.kanavin@gmail.com> wrote:
> >
> > Probably resolved by updating to 40.1?
> > https://gitlab.gnome.org/GNOME/nautilus/-/tags
> >
>
> easier said than done. Sadly these are complex apps and I don't have
> time to fix the long list of dependencies it will ensue
> therefore I will leave it broken and exclude them from my distro
> builds from, Andreas might be
> interested
>
Will look into
Cheers
Andreas
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2021-05-14 18:12 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-13 20:56 [PATCH 1/8] gdk-pixbuf: rewrite the cross-build support for tests Alexander Kanavin
2021-05-13 20:56 ` [PATCH 2/8] gnome: drop upstream even condition from a few recipes Alexander Kanavin
2021-05-13 20:56 ` [PATCH 3/8] expat: upgrade 2.2.10 -> 2.3.0 Alexander Kanavin
2021-05-13 20:56 ` [PATCH 4/8] meson: update 0.57.2 -> 0.58.0 Alexander Kanavin
2021-05-14 13:45 ` [OE-core] " Khem Raj
2021-05-14 13:59 ` Alexander Kanavin
2021-05-14 15:20 ` Khem Raj
2021-05-14 18:12 ` Andreas Müller
2021-05-13 20:56 ` [PATCH 5/8] meson.bbclass: split python routines into a separate class Alexander Kanavin
2021-05-13 20:56 ` [PATCH 6/8] nativesdk-meson: correctly set cpu_family Alexander Kanavin
2021-05-13 20:56 ` [PATCH 7/8] gstreamer1.0-plugins-base: backport a patch to fix meson 0.58 builds Alexander Kanavin
2021-05-13 20:56 ` [PATCH 8/8] qemu: " Alexander Kanavin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.