Skip to content

glade: Don't install glade files outside build prefix

Adrien Plazas requested to merge adrien.plazas/libhandy:glade-module-dir into master

When using pkg-config variables to get installation directory locations, we must be careful to redefine any pkgconfig variables necessary to ensure the installation does not occur outside the build prefix. We could do, e.g.:

module_dir = gladeui_dep.get_pkgconfig_variable( 'moduledir', define_variable: ['libdir', libdir)])

Except in the particular case of glade, this is not possible because the pkg-config file uses absolute paths (i.e. the moduledir variable is not relative to libdir, and not even relative to prefix!) so there's no way to override it. This means we can't use the pkg-config directories at all.

If bored, fixing glade might be fun to do. In the meantime, we'll need to install these manually. This fixes the files being installed under /usr instead of /app when building a Fedora flatpak.

Note: submitted on behalf of Michael Catanzaro, he didn't want to create yet another account or something. 🤷

Merge request reports