diff mbox series

[3/3] package/meson: add gobject-introspection tools to cross-compilation.conf.in

Message ID 20200221224313.854089-4-aduskett@gmail.com
State Changes Requested
Headers show
Series package/gobject-introspection: fix meson support | expand

Commit Message

Adam Duskett Feb. 21, 2020, 10:43 p.m. UTC
From: Adam Duskett <Aduskett@gmail.com>

These paths are hardcoded by default to the host directory; however, because
Buildroot is using wrappers for gobject-introspection, the sysroot paths to
these tools must be explicitly called instead.

Signed-off-by: Adam Duskett <Aduskett@gmail.com>
---
 package/meson/cross-compilation.conf.in | 2 ++
 1 file changed, 2 insertions(+)

Comments

Yann E. MORIN Feb. 23, 2020, 8:58 p.m. UTC | #1
Adam, All,

On 2020-02-21 14:43 -0800, aduskett@gmail.com spake thusly:
> From: Adam Duskett <Aduskett@gmail.com>
> 
> These paths are hardcoded by default to the host directory; however, because
> Buildroot is using wrappers for gobject-introspection, the sysroot paths to
> these tools must be explicitly called instead.
> 
> Signed-off-by: Adam Duskett <Aduskett@gmail.com>
> ---
>  package/meson/cross-compilation.conf.in | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/package/meson/cross-compilation.conf.in b/package/meson/cross-compilation.conf.in
> index 369e225b3e..565ea67240 100644
> --- a/package/meson/cross-compilation.conf.in
> +++ b/package/meson/cross-compilation.conf.in
> @@ -9,6 +9,8 @@ cpp = '@TARGET_CROSS@g++'
>  ar = '@TARGET_CROSS@ar'
>  strip = '@TARGET_CROSS@strip'
>  pkgconfig = '@HOST_DIR@/bin/pkgconf'
> +g-ir-scanner = '@STAGING_DIR@/usr/bin/g-ir-scanner'
> +g-ir-compiler = '@STAGING_DIR@/usr/bin/g-ir-compiler'

On first sight, it would seem pretty obvious. However, not so much...

We already had a similar situation with llvm and llvm-config: packages,
such as mesa3d, may need to know where it is stored, but we did not want
the meson infra to hard-code all these per-package utilities.

Instead, packages that need them can specify them in their
FOO_MESON_EXTRA_BINARIES, and they get added to that package's
cross-compilation.conf.

So I'd like that the git toolset be handled the same.

Of course, to avoid repeating tedious path, you could have GOI set the
variables:

    GIR_COMPILER = $(STAGING_DIR)/usr/bin/g-ir-compiler
    GIR_SCANNER = $(STAGING_DIR)/usr/bin/g-ir-scanner

And then packages that need themwould do:

    FOO_MESON_EXTRA_BINARIES = \
        g-ir-compiler=$(GIR_COMPILER) \
        g-ir-scanner=$(GIR_SCANNER)

Regards,
Yann E. MORIN.

>  [properties]
>  needs_exe_wrapper = true
> -- 
> 2.24.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot@busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
diff mbox series

Patch

diff --git a/package/meson/cross-compilation.conf.in b/package/meson/cross-compilation.conf.in
index 369e225b3e..565ea67240 100644
--- a/package/meson/cross-compilation.conf.in
+++ b/package/meson/cross-compilation.conf.in
@@ -9,6 +9,8 @@  cpp = '@TARGET_CROSS@g++'
 ar = '@TARGET_CROSS@ar'
 strip = '@TARGET_CROSS@strip'
 pkgconfig = '@HOST_DIR@/bin/pkgconf'
+g-ir-scanner = '@STAGING_DIR@/usr/bin/g-ir-scanner'
+g-ir-compiler = '@STAGING_DIR@/usr/bin/g-ir-compiler'
 
 [properties]
 needs_exe_wrapper = true