build_helper: add gir build_helper

This commit is contained in:
maxice8 2019-01-29 11:18:06 -02:00 committed by maxice8
parent c07f975e88
commit fae786dec1
2 changed files with 30 additions and 0 deletions

View File

@ -874,6 +874,9 @@ The current list of available `build_helper` scripts is the following:
- `rust` specifies environment variables required for cross-compiling crates via cargo and - `rust` specifies environment variables required for cross-compiling crates via cargo and
for compiling cargo -sys crates. for compiling cargo -sys crates.
- `gir` specifies dependencies for native and cross builds to deal with
GObject Introspection
<a id="functions"></a> <a id="functions"></a>
### Functions ### Functions

View File

@ -0,0 +1,27 @@
#
# gir - build-helper for gobject-introspection
#
# This build-helper is used for packages that make use of
# the GObject introspection middleware layer.
#
# Check if the 'gir' build_option is set or if there is no
# 'gir' build_option.
if [ "$build_option_gir" ] || [[ $build_options != *"gir"* ]]; then
# Provide the host tooling, g-ir-scanner, g-ir-compiler and its
# wrappers.
hostmakedepends+=" gobject-introspection"
if [ "$CROSS_BUILD" ]; then
# Required for running binaries produced from g-ir-compiler
# via g-ir-scanner-qemuwrapper
hostmakedepends+=" qemu-user-static"
# Required for running the g-ir-scanner-lddwrapper
hostmakedepends+=" prelink-cross"
# Provide basic .gir types like GLib, GObject, DBus, Gio, cairo
# and tooling like g-ir-compiler
makedepends+=" gobject-introspection"
fi
fi