Package: rust-glib
Version: 0.20.9-1

rust-glib seems to have outdated/malformed gobject bindings and fails to
build:

error[E0425]: cannot find value `G_SIGNAL_ACCUMULATOR_FIRST_RUN` in crate
`crate::gobject_ffi`
   --> src/gobject/auto/flags.rs:119:59
    |
119 |         const ACCUMULATOR_FIRST_RUN =
crate::gobject_ffi::G_SIGNAL_ACCUMULATOR_FIRST_RUN as _;
    |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `crate::gobject_ffi`
    |
note: found an item that was configured out
   --> /usr/share/cargo/registry/gobject-sys-0.20.9/src/lib.rs:113:11
    |
113 | pub const G_SIGNAL_ACCUMULATOR_FIRST_RUN: GSignalFlags = 131072;
    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: the item is gated behind the `v2_68` feature
   --> /usr/share/cargo/registry/gobject-sys-0.20.9/src/lib.rs:111:7
    |
111 | #[cfg(feature = "v2_68")]
    |       ^^^^^^^^^^^^^^^^^

I can fix this by updating debian/rules to also run gir for
Gir_GObject.toml (the same way it does for the sys bindings in
rust-gobject-sys):

Index: rust-glib-0.20.9-1/debian/rules
===================================================================
--- rust-glib-0.20.9-1.orig/debian/rules
+++ rust-glib-0.20.9-1/debian/rules
@@ -6,6 +6,7 @@
 # regenerating the source code
 # the xmlstarlet fixes are taken from upstream here:
https://github.com/gtk-rs/gir-files/blob/master/fix.sh
 execute_before_dh_auto_build:
+ cp /usr/share/gir-1.0/GObject-2.0.gir $(CURDIR)
  cp /usr/share/gir-1.0/GLib-2.0.gir $(CURDIR)
  xmlstarlet ed -L \
  -u
'//*[@glib:error-domain="g-option-context-error-quark"]/@glib:error-domain'
-v g-option-error-quark \
@@ -15,9 +16,20 @@ execute_before_dh_auto_build:
  -u
'//_:record[@name="KeyFile"]/_:method[@name="set_locale_string_list"]//_:parameter[@name="list"]/_:array/@c:type'
-v "const gchar* const*" \
  -u
'//_:record[@name="KeyFile"]/_:method[@name="set_string_list"]//_:parameter[@name="list"]/_:array/@c:type'
-v "const gchar* const*" \
  GLib-2.0.gir
- sed -i
's/girs_directories\s=\s\[\"\.\.\/gir-files\"\]/girs_directories=\[\".\"\]/'
$(CURDIR)/Gir.toml
+ xmlstarlet ed -L \
+ -u
'//_:class[@name="Object"]/_:method[@name="getv"]//_:parameter[@name="names"]/_:array/@c:type'
-v "const gchar**" \
+ -u
'//_:class[@name="Object"]/_:method[@name="getv"]//_:parameter[@name="values"]/_:array/@c:type'
-v "GValue*" \
+ -u
'//_:class[@name="Object"]/_:method[@name="setv"]//_:parameter[@name="names"]/_:array/@c:type'
-v "const gchar**" \
+ -u
'//_:class[@name="Object"]/_:method[@name="setv"]//_:parameter[@name="values"]/_:array/@c:type'
-v "const GValue*" \
+ -u
'//_:class[@name="Object"]/_:constructor[@name="new_with_properties"]//_:parameter[@name="names"]/_:array/@c:type'
-v "const char**" \
+ -u
'//_:class[@name="Object"]/_:constructor[@name="new_with_properties"]//_:parameter[@name="values"]/_:array/@c:type'
-v "const GValue*" \
+ -i '//_:interface[@name="TypePlugin" and not(@glib:type-struct)]' -t
'attr' -n 'glib:type-struct' -v 'TypePluginClass' \
+ -i '//_:record[@name="TypePluginClass" and
not(@glib:is-gtype-struct-for)]' -t 'attr' -n 'glib:is-gtype-struct-for' -v
'TypePlugin' \
+ GObject-2.0.gir
+ sed -i
's/girs_directories\s=\s\[\"\.\.\/gir-files\"\]/girs_directories=\[\".\"\]/'
$(CURDIR)/Gir*.toml
  gir -o .
+ gir -c Gir_GObject.toml -o .

 # Remove the .gir file before install
 execute_before_dh_auto_install:
- rm $(CURDIR)/GLib-2.0.gir
+ rm $(CURDIR)/*.gir

-- 
Regards,
Andrey

Reply via email to