utils: Search for GIR XML in $GI_GIR_PATH and /usr/share/gir-1.0
GObject-Introspection 1.78.x contains some improvements to the search path used for GIR XML. Mimic those in gi-docgen.
As well as improving consistency with GObject-Introspection, this might be useful as an alternative to !64 (closed): on !64 (closed), @fanc999 suggests using an environment variable to find GIR XML on Windows. With this MR, they could use something like GI_GIR_PATH=C:\myproject\share\gir-1.0;Z:\data\gir-1.0
and would not need to invent a new environment variable.
-
utils: Search for GIR XML in $GI_GIR_PATH
This is consistent with GObject-Introspection since 1.78.
-
test: Assert that GIR_GIR_PATH is respected
When run with the previous commit reverted, this test would fail because it is unable to load Utility-1.0.
-
utils: Always fall back to /usr/share/gir-1.0 on Unix
Usually XDG_DATA_DIRS will contain /usr/share anyway, but if it doesn't, this is consistent with how GObject-Introspection behaves.