Stuck building Gimp from source

OK, thanks to some helpful replies over on the GIMP developers mailing list (Developers - how to build json-glib in a prefix when building gimp from git in a prefix?), I finally managed to build json-glib and install it in a prefix.

Here are sample commands in case anyone else ever needs to build json-glib using meson. This is for building on Gentoo to install in my GIMP-2.99 prefix - Gentoo portage version of json-glib is plenty current enough to build babl/GEGL/GIMP from git - this is just a test build to verify the process:

git clone https://gitlab.gnome.org/GNOME/json-glib
$PREFIX=PREFIX=$HOME/code-install/gimp299/install
cd json-glib
mkdir build
cd build
meson --prefix=$PREFIX ..
ninja install

The above commands did install json-glib in the indicated prefix.

If you need a specific version of json-glib, of course download and unpack the appropriate tarball. As @ggbutcher indicated, an easy way to find the current location of the latest tarballs - for any Linux library, not just for json-glib - is to search for how to build that library for Linux from Scratch.