gtk: find the module directory through the GTK runtime again

A module built in the container is installed on a host that has no GTK
development files, and there pkg-config knows nothing: dropping the
runtime query left `doas make install` with nowhere to put the module.
gtk-query-immodules-3.0 answers where GTK looks, so ask it when
pkg-config cannot, as before, and say so in the README.
This commit is contained in:
2026-08-17 14:37:57 +09:00
parent ae7dbae993
commit 544ed835b7
2 changed files with 14 additions and 5 deletions

View File

@@ -183,9 +183,12 @@ export GTK_IM_MODULE=strans
GLFW_IM_MODULE=ibus kitty
```
Building and installing `gtk/im-strans.so` requires GTK development files;
the install target uses GTK's own module directory, which packagers and
cross builds override with `GTK_MODULE_DIR`.
Building `gtk/im-strans.so` requires GTK development files; installing one
built elsewhere, in the container for instance, does not. The install
target uses `GTK_MODULE_DIR` when it is set, else GTK's pkg-config
variables, else the directory the installed `gtk-query-immodules-3.0`
reports. Packagers and cross builds should set `GTK_MODULE_DIR`, and a
prebuilt module must still match the target architecture and library ABI.
`DESTDIR` staging is supported and deliberately skips the host module-cache
update. A native install needs the GTK runtime query utility so it can refresh