On Thu, 14 Aug 2025 at 22:58:09 +0200, Michael Biebl wrote:
gir1.2-glib-2.0 provides multiple names, such as
gir1.2-{gobject,gmodule,glibunix,giounix,gio}-2.0
Should packages (Build-)Depend on those virtual packages or just use
gir1.2-glib-2.0?
Ideally use the systematic names, like a GIR version of "include what
you use":
- if you need Foo-23.typelib, (build-)depend on gir1.2-foo-23
- if you need Foo-23.gir, (build-)depend on gir1.2-foo-23-dev
(Not all packages have the necessary ${gir:Provides} for the latter to
work yet, Lintian will diagnose that with a warning.)
But for the {GObject,GModule,GLibUnix,GioUnix,Gio} family, in practice
it's unlikely to matter, because there would be no point in splitting
them up unless we also split up libglib2.0-0t64 (a significant
incompatible change).
How do I figure out, which gir* packages I need?
For this particular family of libraries,
git grep -E '(GLib|GObject|GModule|GLibUnix|GioUnix|Gio)-2\.0'
would be a good first guess.
Longer, more general answer:
For Build-Depends on GIR XML, the common case is that your package runs
something like
g-ir-scanner ... --include=Foo-23 ...
which means it wants gir1.2-foo-23-dev.
In Autotools this is typically spelled:
Bar_42_gir_INCLUDES = ... Foo-23 ...
or in Meson:
gnome.generate_gir(..., includes: [..., 'Foo-23', ...], ...)
Or you might be using some other tool like
vala-gen-introspect ... --namespace=Foo ...
(you have to "just know" the major version here, I think)
cppgir ... Foo-23 ...
cppgir ... /path/to/Foo-23.gir ...
in which case you'll need to know more about the tool's command-line.
smcv