guix_mirror_bot pushed a commit to branch gnome-team
in repository guix.
commit 4d1bf9f23c9d1d6bb587bb0be92be278437c025f
Author: Liliana Marie Prikler <[email protected]>
AuthorDate: Thu Apr 10 20:50:32 2025 +0200
gnu: [email protected]: Fix GIR parser.
* gnu/packages/patches/vala-0.52-fix-valagirparser.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it here.
* gnu/packages/gnome.scm (vala-0.52)[patches]: Use it here.
---
gnu/local.mk | 1 +
gnu/packages/gnome.scm | 3 +-
.../patches/vala-0.52-fix-valagirparser.patch | 72 ++++++++++++++++++++++
3 files changed, 75 insertions(+), 1 deletion(-)
diff --git a/gnu/local.mk b/gnu/local.mk
index dcbfdc6645..dd6f86a0e1 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -2476,6 +2476,7 @@ dist_patch_DATA =
\
%D%/packages/patches/vagrant-bin-vagrant-silence-warning-about-installer.patch
\
%D%/packages/patches/vagrant-Support-system-installed-plugins.patch \
%D%/packages/patches/vagrant-Use-a-private-temporary-dir.patch \
+ %D%/packages/patches/vala-0.52-fix-valagirparser.patch \
%D%/packages/patches/vboot-utils-fix-format-load-address.patch \
%D%/packages/patches/vboot-utils-fix-tests-show-contents.patch \
%D%/packages/patches/vboot-utils-skip-test-workbuf.patch \
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 8983c6bf65..cd44f0300c 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -4555,7 +4555,8 @@ targeting the GNOME stack simple.")
"vala-" version ".tar.xz"))
(sha256
(base32
- "12y6p8wdjp01vmfhxg2cgh32xnyqq6ivblvrar9clnj6vc867qhx"))))
+ "12y6p8wdjp01vmfhxg2cgh32xnyqq6ivblvrar9clnj6vc867qhx"))
+ (patches (search-patches "vala-0.52-fix-valagirparser.patch"))))
(arguments
(substitute-keyword-arguments (package-arguments vala)
((#:configure-flags flags #~'())
diff --git a/gnu/packages/patches/vala-0.52-fix-valagirparser.patch
b/gnu/packages/patches/vala-0.52-fix-valagirparser.patch
new file mode 100644
index 0000000000..3cb7b16d05
--- /dev/null
+++ b/gnu/packages/patches/vala-0.52-fix-valagirparser.patch
@@ -0,0 +1,72 @@
+Starting with GLib 2.84, GModule.gir uses a hitherto unsupported
+ <doc:format name="gi-docgen"/>
+tag to indicate that gi-docgen is/ought to be used for formatting the
+documentation. We lazily "support" this tag by skipping it.
+
+This patch applies to both the original Vala source and generated C sources,
+making sure that the change is present in both, but notably also that it is
+slightly prettier in the C code. For a proper Vala-only patch, we would need
+to bootstrap Vala first.
+
+Index: vala-0.52.0/vala/valagirparser.c
+===================================================================
+--- vala-0.52.0.orig/vala/valagirparser.c
++++ vala-0.52.0/vala/valagirparser.c
+@@ -3641,6 +3641,8 @@ vala_gir_parser_parse_repository (ValaGi
+ _tmp31_ = _tmp30_;
+ if (g_strcmp0 (_tmp31_, "c:include") ==
0) {
+ vala_gir_parser_parse_c_include
(self);
++ } else if (g_strcmp0 (_tmp31_,
"doc:format") == 0) {
++ vala_gir_parser_skip_element
(self);
+ } else {
+ ValaSourceReference* _tmp32_;
+ ValaSourceReference* _tmp33_;
+Index: vala-0.52.0/vala/valagirparser.vala
+===================================================================
+--- vala-0.52.0.orig/vala/valagirparser.vala
++++ vala-0.52.0/vala/valagirparser.vala
+@@ -2034,6 +2034,8 @@ public class Vala.GirParser : CodeVisito
+ }
+ } else if (reader.name == "c:include") {
+ parse_c_include ();
++ } else if (reader.name == "doc:format") {
++ skip_element ();
+ } else {
+ // error
+ Report.error (get_current_src (), "unknown
child element `%s' in `repository'", reader.name);
+Index: vala-0.52.0/libvaladoc/importer/girdocumentationimporter.c
+===================================================================
+--- vala-0.52.0.orig/libvaladoc/importer/girdocumentationimporter.c
++++ vala-0.52.0/libvaladoc/importer/girdocumentationimporter.c
+@@ -794,6 +794,8 @@ valadoc_importer_gir_documentation_impor
+ _tmp21_ = _tmp20_;
+ if (g_strcmp0 (_tmp21_, "c:include") ==
0) {
+
valadoc_importer_gir_documentation_importer_parse_c_include (self);
++ } else if (g_strcmp0 (_tmp21_,
"doc:format") == 0) {
++
valadoc_importer_gir_documentation_importer_skip_element (self);
+ } else {
+ ValaMarkupReader* _tmp22_;
+ const gchar* _tmp23_;
+@@ -2977,4 +2979,3 @@ _vala_array_free (gpointer array,
+ _vala_array_destroy (array, array_length, destroy_func);
+ g_free (array);
+ }
+-
+Index: vala-0.52.0/libvaladoc/importer/girdocumentationimporter.vala
+===================================================================
+--- vala-0.52.0.orig/libvaladoc/importer/girdocumentationimporter.vala
++++ vala-0.52.0/libvaladoc/importer/girdocumentationimporter.vala
+@@ -213,6 +213,8 @@ public class Valadoc.Importer.GirDocumen
+ parse_package ();
+ } else if (reader.name == "c:include") {
+ parse_c_include ();
++ } else if (reader.name == "doc:format") {
++ skip_element ();
+ } else {
+ // error
+ error ("unknown child element `%s' in
`repository'".printf (reader.name));
+@@ -856,4 +858,3 @@ public class Valadoc.Importer.GirDocumen
+ end_element ("constant");
+ }
+ }
+-