From: Ionen Wolkens <ionen@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] [PATCH] ffmpeg-compat.eclass: new eclass
Date: Sun, 9 Mar 2025 11:22:09 -0400 [thread overview]
Message-ID: <Z82yIQ2SgWgk3LPF@eversor> (raw)
In-Reply-To: <ce365906b98a3420e3ced2c781517f8c60470265.camel@gentoo.org>
[-- Attachment #1: Type: text/plain, Size: 2286 bytes --]
On Sun, Mar 09, 2025 at 10:33:13AM +0000, James Le Cuirot wrote:
> On Sun, 2025-03-09 at 06:27 -0400, Ionen Wolkens wrote:
> > On Sun, Mar 09, 2025 at 10:17:42AM +0000, James Le Cuirot wrote:
> > > > +ffmpeg_compat_setup() {
> > > > + (( ${#} == 1 )) || die "Usage: ${FUNCNAME} <slot>"
> > > > +
> > > > + local path=${SYSROOT}$(ffmpeg_compat_get_prefix "${1}")
> > > > + [[ ${PKG_CONFIG_PATH} =~ (.*)"${path}"/[^/]+/pkgconfig:(.*) ]] &&
> > > > + PKG_CONFIG_PATH=${BASH_REMATCH[1]}${BASH_REMATCH[2]}
> > > > + export PKG_CONFIG_PATH=${path}/$(get_libdir)/pkgconfig:${PKG_CONFIG_PATH}
> > > > +}
> > > > +
> > > > +fi
> > >
> > > I like this approach. We've generally been quite good at dragging upstreams to
> > > the latest, so it would be a shame to go fully slotted.
> > >
> > > The regex check seems like overkill to me, but perhaps I've missed something.
> >
> > Well, guess could let the multilib paths accumulate given it'll try
> > the first one anyway. It was just cleaning up the previous one that it
> > shouldn't use.
> >
>
> That's what I thought. I don't mind too much.
I went ahead and removed it, on 2nd thought I didn't like it either.
Thanks.
> > > This currently won't work when cross-compiling as cross-pkg-config currently
> > > unsets PKG_CONFIG_PATH, but I have been thinking about changing that. That was
> > > done to tame non-Gentoo environments, but no one else uses crossdev in
> > > reality.
> >
> > Really? There's a few others eclasses that set PKG_CONFIG_PATH.. does
> > nothing work?
>
> Seems like things I haven't generally tried to cross-compile.
It's used for the same purpose in e.g. lua eclasses which put their
lua.pc in ${T}. Not looked too closely but python, vala, postgres
eclasses to do this too. It's likely that cross still "works" given
it uses the system's .pc file which could be the wrong version.
Much like how it'll still "work" here by linking to the unslotted
ffmpeg.. albeit these packages will likely be broken with latest
version and fail to build :) Been seeing it as the failsafe.
I do think this should be changed as well anyhow, maybe it could
only filter paths not in ROOT.. or so I'd like to say, but that
doesn't handle the T or WORKDIR cases.
--
ionen
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2025-03-09 15:22 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-09 3:34 [gentoo-dev] [PATCH] ffmpeg-compat.eclass: new eclass Ionen Wolkens
2025-03-09 10:17 ` James Le Cuirot
2025-03-09 10:27 ` Ionen Wolkens
2025-03-09 10:33 ` James Le Cuirot
2025-03-09 15:22 ` Ionen Wolkens [this message]
2025-03-09 16:45 ` Eli Schwartz
2025-03-09 18:47 ` Ionen Wolkens
2025-03-09 19:34 ` Ionen Wolkens
2025-03-11 4:37 ` [gentoo-dev] " Duncan
2025-03-11 5:14 ` Ionen Wolkens
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=Z82yIQ2SgWgk3LPF@eversor \
--to=ionen@gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox