LINTIAN

# `gir-missing-typelib-dependency`

Development packages that contain GObject-Introspection XML files (`/usr/share/gir-1.0/Foo-23.gir` or `/usr/lib/${DEB_HOST_MULTIARCH}/gir-1.0/Foo-23.gir`) must depend on the package containing the corresponding binary typelib, which should normally be named `gir1.2-foo-23`. The dependency must be strictly versioned (for example `gir1.2-foo-23 (= ${binary:Version})` when using debhelper).

The recommended way to populate the `Depends` fields is to use debhelper and dh_girepository, via the gir addon or the dh-sequence-gir virtual package, and add `Depends: ${gir:Depends}` to packages that contain GIR XML.

If multiple typelibs are shipped in the same package, then that package should have versioned `Provides` for the names that would have been used for separate packages. In this case, Lintian does not emit this tag when a group of binary packages from the same source is checked together. Since gobject-introspection 1.78.1-6 (Debian trixie), the recommended way to populate the `Provides` fields is to use debhelper and dh_girepository, via the gir addon or the dh-sequence-gir virtual package, and add `Provides: ${gir:Provides}` to packages that contain more than one typelib.

For example, `libgtk-3-dev` contains `Gtk-3.0.gir`, `Gdk-3.0.gir` and `GdkX11-3.0.gir`. `gir1.2-gtk-3.0` contains all three corresponding typelibs, so it is sufficient for `libgtk-3-dev` to depend on `gir1.2-gtk-3.0`. Giving `gir1.2-gtk-3.0` `Provides` entries for `gir1.2-gdk-3.0 (= ${binary:Version})` and `gir1.2-gdkx11-3.0 (= ${binary:Version})` signals this situation to Lintian.

Severity: | `warning`
Experimental: | `false`

## See also

- usr/share/doc/gobject-introspection/policy.txt

- list of all the affected packages
- the source of this tag