From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: James Hilliard <james.hilliard1@gmail.com>
Cc: Olivier Schonken <olivier.schonken@gmail.com>,
Fabrice Fontaine <fontaine.fabrice@gmail.com>,
Adam Duskett <aduskett@gmail.com>,
buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH v2, 1/1] package/poppler: fix introspection build
Date: Wed, 19 Apr 2023 21:50:23 +0200 [thread overview]
Message-ID: <20230419195023.GA2748651@scaer> (raw)
In-Reply-To: <CADvTj4o9KPC3_knDp4KjKwyyFQZ4HPsbSj4n21dqT6bhtWM9pw@mail.gmail.com>
James, All,
On 2023-04-18 15:58 -0600, James Hilliard spake thusly:
> On Tue, Apr 18, 2023 at 11:44 AM Yann E. MORIN <yann.morin.1998@free.fr> wrote:
> > On 2023-04-18 02:03 -0600, James Hilliard spake thusly:
> > > On Sun, Apr 16, 2023 at 5:17 AM Yann E. MORIN <yann.morin.1998@free.fr> wrote:
> > > > On 2023-04-16 10:25 +0200, Yann E. MORIN spake thusly:
> > Sure, but then maybe it begs for a generic solution, that works for all
> > packages?
> I reported this issue upstream to granite:
> https://github.com/elementary/granite/issues/645
Thanks for beinging this upstream; They have explained why they can't
use the "standard meson way", and the solution does not seem to be
straightforward, so we'll definitely will have to have a way to
workaround that.
Also, nothing would prevent any other cmake-based package to use
introspection, and that would be similarly broken...
> > Maybe something like we used GIR_EXTRA_LIBS_PATH from the environment,
> > we could allow paclages to specify additional include directories with
> > GIR_EXTRA_INCLUDE_PATH ?
> I'm not really sure if this makes sense to do for all packages as it
> could have side
> effects which may interfere with meson's native gobject-introspection
> integration.
As I said, it would not be for *all* packages, but only for those that
actually set GIR_EXTRA_INCLUDE_PATH; it would be handled the same way
we currently handle GIR_EXTRA_LIBS_PATH: if a package needs a special
path to find libraries, it can set GIR_EXTRA_LIBS_PATH [0] in its
environment, e.g.:
FOO_ENV += GIR_EXTRA_LIBS_PATH=$(@D)/src/.libs
And that will be automatically added to the library search path in our
g-ir-scanner wrappers:
package/gobject-introspection/g-ir-scanner-qemuwrapper.in
package/gobject-introspection/g-ir-scanner.in
So, we could very well do something similar for GIR_EXTRA_INCLUDE_PATH:
diff --git a/package/gobject-introspection/g-ir-compiler.in b/package/gobject-introspection/g-ir-compiler.in
index 712753023a..97a6d7333e 100644
--- a/package/gobject-introspection/g-ir-compiler.in
+++ b/package/gobject-introspection/g-ir-compiler.in
@@ -1,3 +1,5 @@
-#!/usr/bin/env sh
+#!/usr/bin/env bash
+
+set $(printf ' --includedir=%s' ${GIR_EXTRA_INCLUDE_PATH//:/ }) "${@}"
"$(dirname "$0")"/g-ir-scanner-qemuwrapper "$(dirname "$0")"/g-ir-compiler.real "$@"
diff --git a/package/granite/granite.mk b/package/granite/granite.mk
index 71dfbf4c03..8309d21414 100644
--- a/package/granite/granite.mk
+++ b/package/granite/granite.mk
@@ -20,6 +20,8 @@ GRANITE_LDFLAGS = $(TARGET_LDFLAGS) $(TARGET_NLS_LIBS)
ifeq ($(BR2_PACKAGE_GOBJECT_INTROSPECTION),y)
GRANITE_CONF_OPTS += -Dintrospection=true
+GRANITE_CONF_ENV += GIR_EXTRA_INCLUDE_PATH=$(STAGING_DIR)/usr/share/gir-1.0
+GRANITE_NINJA_ENV += GIR_EXTRA_INCLUDE_PATH=$(STAGING_DIR)/usr/share/gir-1.0
GRANITE_DEPENDENCIES += gobject-introspection
else
GRANITE_CONF_OPTS += -Dintrospection=false
We could do the same for poppler, but it's better to use upstream's
mechanism, as they now have one. But for granite, if upstream can't find
a solution, and does not want to add a config option, we'll have to
resort to that...
[0] We currently have no package that sets GIR_EXTRA_LIBS_PATH, and
never had, but support is there...
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
prev parent reply other threads:[~2023-04-19 19:50 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-12 10:17 [Buildroot] [PATCH v2, 1/1] package/poppler: fix introspection build Fabrice Fontaine
2022-08-14 10:37 ` Thomas Petazzoni via buildroot
2022-08-20 9:28 ` Thomas Petazzoni via buildroot
2022-09-21 17:38 ` Adam Duskett
2022-09-21 20:41 ` Fabrice Fontaine
2022-09-27 18:33 ` Adam Duskett
2023-04-15 21:29 ` Yann E. MORIN
2023-04-16 2:44 ` James Hilliard
2023-04-16 8:25 ` Yann E. MORIN
2023-04-16 11:16 ` Yann E. MORIN
2023-04-18 8:03 ` James Hilliard
2023-04-18 17:44 ` Yann E. MORIN
2023-04-18 21:58 ` James Hilliard
2023-04-19 19:50 ` Yann E. MORIN [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230419195023.GA2748651@scaer \
--to=yann.morin.1998@free.fr \
--cc=aduskett@gmail.com \
--cc=buildroot@buildroot.org \
--cc=fontaine.fabrice@gmail.com \
--cc=james.hilliard1@gmail.com \
--cc=olivier.schonken@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.