clojure-lsp: update to 2024.08.05.
[void-pkg.git] / common / build-helper / gir.sh
blob70699adb179732759be6951202568f59292d88ba
2 # gir - build-helper for gobject-introspection
4 # This build-helper is used for packages that make use of
5 # the GObject introspection middleware layer.
8 # Check if the 'gir' build_option is set or if there is no
9 # 'gir' build_option.
10 if [ "$build_option_gir" ] || [[ $build_options != *"gir"* ]]; then
11 if [[ $hostmakedepends != *"gobject-introspection"* ]]; then
12 # Provide the host tooling, g-ir-scanner, g-ir-compiler
13 # and its wrappers.
14 hostmakedepends+=" gobject-introspection"
17 if [ "$CROSS_BUILD" ]; then
18 # Required for running binaries produced from g-ir-compiler
19 # via g-ir-scanner-qemuwrapper
20 hostmakedepends+=" qemu-user-static"
22 # Required for running the g-ir-scanner-lddwrapper
23 hostmakedepends+=" prelink-cross"
25 if [[ $makedepends != *"gobject-introspection"* ]]; then
26 # Provide basic .gir types like GLib, GObject, DBus, Gio, cairo
27 # and tooling like g-ir-compiler
28 makedepends+=" gobject-introspection"
31 export VAPIGEN_VAPIDIRS=${XBPS_CROSS_BASE}/usr/share/vala/vapi
32 export VAPIGEN_GIRDIRS=${XBPS_CROSS_BASE}/usr/share/gir-1.0
34 # Provide some packages in hostmakedepends if they are in makedepends
35 for f in gtk+3-devel python3-gobject-devel; do
36 if [[ $makedepends == *"${f}"* ]]; then
37 hostmakedepends+=" ${f}"
39 done
40 unset f