Re: [Gimp-developer] how to build json-glib in a prefix when building gimp from git in a prefix?



On Sat, Sep 29, 2018 at 03:23:24PM -0400, Elle Stone wrote:
Anyone know the precise terminal commands for building json-glib in a prefix
using meson? I'm trying to update this article:

https://ninedegreesbelow.com/photography/build-gimp-in-prefix-for-artists.html

I already established the prefix using these commands:


PREFIX=$HOME/code/gimpdefault/install
export PATH=$PREFIX/bin:$PATH
export LD_LIBRARY_PATH=$PREFIX/lib:$LD_LIBRARY_PATH
export XDG_DATA_DIRS=$PREFIX/share:$XDG_DATA_DIRS
export ACLOCAL_FLAGS="-I $PREFIX/share/aclocal"
export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH
export PKG_CONFIG_PATH=$PREFIX/share/pkgconfig:$PKG_CONFIG_PATH
export GIO_EXTRA_MODULES=/usr/lib64/gio/modules
export SRC_DIR=$HOME/code/gimpdefault/build

I'm building on OpenSUSE Tumbleweed. Probably I need to install meson
something or other, so does anyone know what package(s) to install? And then
of course what commands to type.

Best,

and thanks in advance for any help!

Elle

Hi Elle,

I don't know how OpenSUSE splits packages into sub-packages (-dev or
something for headers), but the upstream packages you will need are
meson, ninja, and python3.

For building meson in /usr, see
http://www.linuxfromscratch.org/blfs/view/svn/general/json-glib.html

Note that is still on 1.4.2 which is probably older than what you
are going to build.

I don't think the _process_ of using meson has changed recently:
create a build directory, change to it, invoke meson with whatever
switches you need (a minimum of --prefix=) followed by .. to point
to where the meson files are.

For some options you may need cmake-style -Dfoo=bar.

I have found it necessary to export LC_ALL with a UTF-8 value, e.g.
en_GB.UTF-8, if invoking meson from a script running under the C or
POSIX locales.

And ninja will use all your cores, although for json-glib that is
probably immaterial.

So, use meson to create the Makefile(s), ninja to build, ninja
install.  For a DESTDIR-style install to check what is going to be
installed:
 DESTDIR=/tmp/JG ninja install
(i.e. put the DESTDIR first)

In BLFS we target linuxfromscratch which includes meson and ninja,
so those are not listed as dependencies, and the build time uses
LFS's "standard build units" (SBU) - for json-glib the time should
only be a few seconds on any modern machine.  Other deps are
whatever any 'Required' or 'Recommended' packages specify - but
since you probably already have glib and gobject-introspection I
guess you have everything necessary.

Also, in BLFS we only use lib, not lib64, I'm not sure if that will
affect meson.  Old docs from fedora suggest --libdir, but I don't
immediately see that in their latest build, so I suggest you try
without, and if it builds do a DESTDIR install to see if the files
are where you expect them to be.

For building with meson the important files are meson.build and
meson_options.txt.

From the first, for json-glib-1.4.2 meson needs to be >= 0.40.1,
glib >= 2.44.0, and from the second, introspection defaults to true
but can be set to false if you don't have gobject-introspection, and
the docs are not built by default (needs gtk-doc and xsltproc).  But
check the required version of meson in the version of json-glib you
are going to build.

HTH

ĸen
-- 
                      Well grubbed , old mole!


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]