From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id C09621582EF for ; Sun, 09 Mar 2025 15:22:56 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id A7BF734311F for ; Sun, 09 Mar 2025 15:22:56 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id 81B011103E1; Sun, 09 Mar 2025 15:22:13 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id B86F6110370 for ; Sun, 09 Mar 2025 15:22:12 +0000 (UTC) Received: from eversor (unknown [24.157.215.217]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: ionen) by smtp.gentoo.org (Postfix) with ESMTPSA id 5882A3430AE for ; Sun, 09 Mar 2025 15:22:12 +0000 (UTC) Date: Sun, 9 Mar 2025 11:22:09 -0400 From: Ionen Wolkens To: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] [PATCH] ffmpeg-compat.eclass: new eclass Message-ID: Mail-Followup-To: gentoo-dev@lists.gentoo.org References: <20250309033514.576-1-ionen@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="085TomYkuIjbRl0k" Content-Disposition: inline In-Reply-To: X-Archives-Salt: 2c4c34c8-92b4-41d4-845e-c87edb076fbd X-Archives-Hash: 7fb3de4d148b0f75fb21961c198fd980 --085TomYkuIjbRl0k Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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() { > > > > + (( ${#} =3D=3D 1 )) || die "Usage: ${FUNCNAME} " > > > > + > > > > + local path=3D${SYSROOT}$(ffmpeg_compat_get_prefix "${1}") > > > > + [[ ${PKG_CONFIG_PATH} =3D~ (.*)"${path}"/[^/]+/pkgconfig:(.*) ]] = && > > > > + PKG_CONFIG_PATH=3D${BASH_REMATCH[1]}${BASH_REMATCH[2]} > > > > + export PKG_CONFIG_PATH=3D${path}/$(get_libdir)/pkgconfig:${PKG_CO= NFIG_PATH} > > > > +} > > > > + > > > > +fi > > >=20 > > > I like this approach. We've generally been quite good at dragging ups= treams to > > > the latest, so it would be a shame to go fully slotted. > > >=20 > > > The regex check seems like overkill to me, but perhaps I've missed so= mething. > >=20 > > 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. > >=20 >=20 > 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 cu= rrently > > > 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. > >=20 > > Really? There's a few others eclasses that set PKG_CONFIG_PATH.. does > > nothing work? >=20 > 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. --=20 ionen --085TomYkuIjbRl0k Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEx3SLh1HBoPy/yLVYskQGsLCsQzQFAmfNsiEACgkQskQGsLCs QzSNSQf/aKsROyMFFuxXWi0uTujqBfZP3mgonRRwg9lPqPMj7FRiIeOrD/iyRpCJ /tVLU86nORFcSOvVsFDynLFxiqID9m95oOW2P/aRYmf45+wQMMEz5xvP2LO6J/MT UTDGTmzxNCDPpU5fKc3yNClLMPvEVM1mt0KTQf3plIsWGBL+wp8jRcEQ+p19HzTc ClS/8g6pMyukk4YADtjY0WXftQqDHSpa8Hy97ODePs5moIjlbEVi3SB1hyVUmqhV E66J7G1yKvj6wmS//3ZOBVDKA254MmX/OnF+V6yr8SCImkrXuMrvx/YWYM/JrHM6 LtVAAV0K/rHS6GcjEuj0McDyPSpMxQ== =enbH -----END PGP SIGNATURE----- --085TomYkuIjbRl0k--