diff options
| author | Ross Burton <ross.burton@arm.com> | 2024-05-10 15:45:35 +0000 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-05-13 15:42:27 +0100 |
| commit | 45e819b4d45c64104b57845eec0a07b54d889c2a (patch) | |
| tree | b6b6a298d713f7c2f8fbf981f57caae90c68b238 | |
| parent | f0b560e0a56251cef7ced7f798d656a0ce8aa756 (diff) | |
| download | poky-45e819b4d45c64104b57845eec0a07b54d889c2a.tar.gz | |
libportal: fix rare build race
There is a build race where the libportal.vapi is not always generated
before it is needed to build libportal-gtk*.vapi. Backport the fix from
upstream.
[ YOCTO #15479 ]
(From OE-Core rev: 2d984e52cded09647b210bd79cfec9deb4b7b589)
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/recipes-gnome/libportal/files/0001-meson.build-fix-build-race-when-building-GTK-vapi-fi.patch | 49 | ||||
| -rw-r--r-- | meta/recipes-gnome/libportal/libportal_0.7.1.bb | 3 |
2 files changed, 51 insertions, 1 deletions
diff --git a/meta/recipes-gnome/libportal/files/0001-meson.build-fix-build-race-when-building-GTK-vapi-fi.patch b/meta/recipes-gnome/libportal/files/0001-meson.build-fix-build-race-when-building-GTK-vapi-fi.patch new file mode 100644 index 0000000000..fb015d3632 --- /dev/null +++ b/meta/recipes-gnome/libportal/files/0001-meson.build-fix-build-race-when-building-GTK-vapi-fi.patch | |||
| @@ -0,0 +1,49 @@ | |||
| 1 | From 26f96a178f8a0afded00bdd7238728c0b6e42a6b Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Richard Purdie <richard.purdie@linuxfoundation.org> | ||
| 3 | Date: Thu, 9 May 2024 18:44:41 +0000 | ||
| 4 | Subject: [PATCH] meson.build: fix build race when building GTK vapi files | ||
| 5 | |||
| 6 | There's a build race when building the GTK vapi files: | ||
| 7 | |||
| 8 | FAILED: libportal/libportal-gtk4.vapi | ||
| 9 | error: Package `libportal' not found in specified Vala API directories or GObject-Introspection GIR directories | ||
| 10 | |||
| 11 | This can be verified by adding "sleep 10;" to the command for the | ||
| 12 | libportal/libportal.vapi target in the generated build.ninja file. | ||
| 13 | |||
| 14 | The GTK vapi files need to have access to the generic libportal.vapi file, | ||
| 15 | but there is no explicit dependency. Switch the dependency name 'libportal' | ||
| 16 | to the dependency object libportal_vapi so that Meson generates the | ||
| 17 | dependency correctly. | ||
| 18 | |||
| 19 | Upstream-Status: Backport | ||
| 20 | Signed-off-by: Ross Burton <ross.burton@arm.com> | ||
| 21 | --- | ||
| 22 | libportal/meson.build | 4 ++-- | ||
| 23 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
| 24 | |||
| 25 | diff --git a/libportal/meson.build b/libportal/meson.build | ||
| 26 | index fff7603..4e67f40 100644 | ||
| 27 | --- a/libportal/meson.build | ||
| 28 | +++ b/libportal/meson.build | ||
| 29 | @@ -168,7 +168,7 @@ if gtk3_dep.found() | ||
| 30 | if vapi | ||
| 31 | libportal_gtk3_vapi = gnome.generate_vapi('libportal-gtk3', | ||
| 32 | sources: libportal_gtk3_gir[0], | ||
| 33 | - packages: ['gio-2.0', 'gtk+-3.0', 'libportal'], | ||
| 34 | + packages: ['gio-2.0', 'gtk+-3.0', libportal_vapi], | ||
| 35 | gir_dirs: [meson.current_build_dir()], | ||
| 36 | vapi_dirs: [meson.current_build_dir()], | ||
| 37 | install: true, | ||
| 38 | @@ -227,7 +227,7 @@ if gtk4_dep.found() | ||
| 39 | if vapi | ||
| 40 | libportal_gtk4_vapi = gnome.generate_vapi('libportal-gtk4', | ||
| 41 | sources: libportal_gtk4_gir[0], | ||
| 42 | - packages: ['gio-2.0', 'gtk4', 'libportal'], | ||
| 43 | + packages: ['gio-2.0', 'gtk4', libportal_vapi], | ||
| 44 | gir_dirs: [meson.current_build_dir()], | ||
| 45 | vapi_dirs: [meson.current_build_dir()], | ||
| 46 | install: true, | ||
| 47 | -- | ||
| 48 | 2.34.1 | ||
| 49 | |||
diff --git a/meta/recipes-gnome/libportal/libportal_0.7.1.bb b/meta/recipes-gnome/libportal/libportal_0.7.1.bb index 22e45559c9..6ddfef76d3 100644 --- a/meta/recipes-gnome/libportal/libportal_0.7.1.bb +++ b/meta/recipes-gnome/libportal/libportal_0.7.1.bb | |||
| @@ -6,7 +6,8 @@ BUGTRACKER = "https://github.com/flatpak/libportal/issues" | |||
| 6 | LICENSE = "LGPL-3.0-only" | 6 | LICENSE = "LGPL-3.0-only" |
| 7 | LIC_FILES_CHKSUM = "file://COPYING;md5=3000208d539ec061b899bce1d9ce9404" | 7 | LIC_FILES_CHKSUM = "file://COPYING;md5=3000208d539ec061b899bce1d9ce9404" |
| 8 | 8 | ||
| 9 | SRC_URI = "git://github.com/flatpak/${BPN}.git;protocol=https;branch=main" | 9 | SRC_URI = "git://github.com/flatpak/${BPN}.git;protocol=https;branch=main \ |
| 10 | file://0001-meson.build-fix-build-race-when-building-GTK-vapi-fi.patch" | ||
| 10 | SRCREV = "e9ed3a50cdde321eaf42361212480a66eb94a57a" | 11 | SRCREV = "e9ed3a50cdde321eaf42361212480a66eb94a57a" |
| 11 | S = "${WORKDIR}/git" | 12 | S = "${WORKDIR}/git" |
| 12 | 13 | ||
