| git.druid.rocks | index | druid520 | ports | ports/ | libraries/ | glib2/ | pkg.conf |
ports/libraries/glib2/pkg.conf
pkg_name="glib2"
pkg_license="lgpl-2.1"
pkg_ver="git"
pkg_deps="libffi pcre2 zlib gnu-gettext"
pkg_fetch="git:https://gitlab.gnome.org/GNOME/glib.git"
inherit="meson"
# glib2 vendors its gvdb subproject as a real git submodule (see
# .gitmodules) rather than relying solely on meson's gvdb.wrap fetch, and
# its own meson.build checks for and requires an initialized submodule
# checkout -- the default synthesized "git clone" alone leaves it empty.
fetch:
git clone https://gitlab.gnome.org/GNOME/glib.git glib2
cd glib2
git submodule update --init --recursive
cd ..
# glib2's own build runs some of its just-built, not-yet-installed tools
# (e.g. glib-compile-resources, linked against the build tree's own
# libglib/libgio/libgobject) as part of compiling the rest of the package.
# their RUNPATH is $ORIGIN-relative (meson's normal uninstalled-devel
# convention), but this environment's musl ld.so does not resolve $ORIGIN
# in RUNPATH -- confirmed directly: running glib-compile-resources bare
# fails with "No such file or directory" for all three libs even though
# they exist exactly where its RUNPATH points, while running it with
# LD_LIBRARY_PATH covering those same build-tree lib dirs works. point
# LD_LIBRARY_PATH at them explicitly for the whole build.
build:
meson setup build --prefix=$MP_PREFIX $MESON_FLAGS
B="$PWD/build"
LD_LIBRARY_PATH="$B/glib:$B/gobject:$B/gio:$B/gmodule:$B/gthread${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" meson compile -C build -j$MP_JOBS