[MacPorts] #60987: meson: not finding pkg-config when building universal when using cross-files
MacPorts
noreply at macports.org
Tue Aug 11 16:56:26 UTC 2020
#60987: meson: not finding pkg-config when building universal when using cross-
files
--------------------+----------------------------
Reporter: kencu | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version:
Keywords: | Port: meson graphene
--------------------+----------------------------
To improve building universal with {{{meson}}} we recently added machine
cross-files. These are needed when the build configures itself differently
(eg adding asm files) with different architectures.
This works, but there is an issue with {{{pkg-config}}}, it appears, first
noticed when rebuilding {{{graphene +universal}}}.
{{{meson}}} does not appear to be searching the PATH for {{{pkg-config}}}
when cross building, but it wants {{{pkg-config}}} to be specified.
{{{meson}}} actually has a rather complicated (no surprise there)
algorithm for
[https://github.com/mesonbuild/meson/blob/847d652c4ef179bbf94c0e322dc3277858fcf08c/mesonbuild/dependencies/base.py#L557
searching for pkg-confg] that will take some sorting out.
One thing that worked is to add the {{{PKG_CONFIG}}} spec to the configure
environment like this:
{{{
configure.env-append PKG_CONFIG=${prefix}/bin/pkg-config
}}}
We could do that in the {{{meson}}} PortGroup, I suppose, or each port
that uses meson and pkg-config could do it individually.
--
Ticket URL: <https://trac.macports.org/ticket/60987>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list