Refresh resources dependency patch from upstream

This commit is contained in:
David King 2022-03-03 08:15:58 +00:00
parent cf8e1ec829
commit c8f7d238bf

View File

@ -1,32 +1,69 @@
From 21226b9973fa222104f9c178269be42323a0b1fe Mon Sep 17 00:00:00 2001
From: David King <amigadave@amigadave.com>
Date: Wed, 16 Feb 2022 11:14:12 +0000
Subject: [PATCH] common: Add gresource sources to common_sources
From 9401881a38dbfd46559c75c72a9b8161e528a915 Mon Sep 17 00:00:00 2001
From: Dor Askayo <dor.askayo@gmail.com>
Date: Sun, 20 Feb 2022 01:26:12 +0200
Subject: [PATCH] common: Add a missing dependency on cc-common-resources.h
As the gresource source and header are generated, add them to
common_sources. Follow-up to 234d1aadb78dfea16d001569bcb71a6807598c03.
Without this, the build fails on s390 as the resources header is not
generated.
cc-common-resources.h is used by both libwidgets and liblanguage, and
so must be generated before they build. However, Meson wasn't aware
of this dependency which resulted in a race condition during build.
Conveniently, "generates_sources_dep" already contains other generated
sources used by these two libraries, so adding cc-common-resources.h
to this list is enough to declare the dependency.
---
panels/common/meson.build | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
panels/common/meson.build | 32 ++++++++++++++++----------------
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/panels/common/meson.build b/panels/common/meson.build
index 20b9dcf16..b956f7c18 100644
index 20b9dcf16..13557c1ff 100644
--- a/panels/common/meson.build
+++ b/panels/common/meson.build
@@ -63,9 +63,10 @@ resource_data = files(
'cc-permission-infobar.ui',
@@ -24,6 +24,22 @@ common_sources += gnome.mkenums(
vtail: ' { 0, NULL, NULL }\n };\n etype = g_@type@_register_static ("@EnumName@", values);\n }\n return etype;\n}\n'
)
-sources += gnome.compile_resources(
+resource_data = files(
+ 'cc-language-chooser.ui',
+ 'cc-language-row.ui',
+ 'cc-list-row.ui',
+ 'cc-time-editor.ui',
+ 'cc-permission-infobar.ui',
+)
+
+common_sources += gnome.compile_resources(
'cc-common-resources',
'common.gresource.xml',
+ source_dir: '.',
c_name: 'cc_common',
dependencies: resource_data,
export: true
+ 'cc-common-resources',
+ 'common.gresource.xml',
+ c_name: 'cc_common',
+ dependencies: resource_data,
+ export: true
+)
+
generates_sources_dep = declare_dependency(
sources: common_sources,
)
@@ -55,22 +71,6 @@ sources = common_sources + files(
'cc-util.c'
)
-resource_data = files(
- 'cc-language-chooser.ui',
- 'cc-language-row.ui',
- 'cc-list-row.ui',
- 'cc-time-editor.ui',
- 'cc-permission-infobar.ui',
-)
-
-sources += gnome.compile_resources(
- 'cc-common-resources',
- 'common.gresource.xml',
- c_name: 'cc_common',
- dependencies: resource_data,
- export: true
-)
-
deps = common_deps + [
generates_sources_dep,
gnome_desktop_dep,
--
2.35.1
GitLab