All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC] meson needs a pkg-config wrapper script
@ 2021-11-30 17:20 Joel Winarske
  2021-11-30 17:49 ` [OE-core] " Alexander Kanavin
  2021-11-30 21:18 ` Ross Burton
  0 siblings, 2 replies; 16+ messages in thread
From: Joel Winarske @ 2021-11-30 17:20 UTC (permalink / raw)
  To: Openembedded-core

[-- Attachment #1: Type: text/plain, Size: 958 bytes --]

Meson does not expose PKG_CONFIG_SYSROOT_DIR to the pkg-config process.

Currently meson.cross as generated in meson.bbclass points directly to the
pkg-config executable (no wrapper script).

PKG_CONFIG_SYSROOT_DIR behaves like a simple string prepend to all package
config variable queries.  So if you want to determine the absolute path of
a variable in .pc you set PKG_CONFIG_SYSROOT_DIR and make your query.
Currently this is not possible with Yocto+Meson.

I think a simple wrapper script would resolve this.  This is from
https://autotools.io/pkgconfig/cross-compiling.html:

#!/bin/sh

SYSROOT=/build/root

export PKG_CONFIG_PATH=
export PKG_CONFIG_LIBDIR=${SYSROOT}/usr/lib/pkgconfig:${SYSROOT}/usr/share/pkgconfig
export PKG_CONFIG_SYSROOT_DIR=${SYSROOT}

exec pkg-config "$@"


The wrapper script would be generated per recipe via meson.bbclass,
meson.cross would then reference this wrapper instead of the pkg-config
executable.

Thoughts?


Joel

[-- Attachment #2: Type: text/html, Size: 1382 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2021-12-01 23:57 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-30 17:20 [RFC] meson needs a pkg-config wrapper script Joel Winarske
2021-11-30 17:49 ` [OE-core] " Alexander Kanavin
2021-11-30 18:25   ` Joel Winarske
2021-11-30 18:53     ` Alexander Kanavin
2021-11-30 19:15       ` Joel Winarske
2021-11-30 19:39         ` Alexander Kanavin
2021-11-30 20:00           ` Joel Winarske
2021-11-30 20:03             ` Joel Winarske
2021-11-30 20:13             ` Alexander Kanavin
2021-11-30 22:37               ` Joel Winarske
2021-12-01  8:36                 ` Alexander Kanavin
2021-12-01  9:11                   ` Eero Aaltonen
     [not found]                   ` <CABKMkPJ+6xA9BtZsv-tcKKssJdhfjA4w7eSxJzNyBOg4Ak2=gw@mail.gmail.com>
2021-12-01 22:38                     ` Alexander Kanavin
2021-12-01 23:27                       ` Joel Winarske
     [not found]                       ` <16BCC5463709ABBF.10763@lists.openembedded.org>
2021-12-01 23:56                         ` Joel Winarske
2021-11-30 21:18 ` Ross Burton

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.