Re: [PATCH] 80libraries: add support for Darwin targets

Fabian Groffen <[email protected]> Tue, 26 Jul 2022 20:43:06 +0200
Newsgroups gmane.linux.gentoo.portage.devel
Organization Gentoo Foundation, Inc.
Message-ID <[email protected]>
--wrefMtiCA2MaJq9O
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On 26-07-2022 04:01:37 +0100, Sam James wrote:
>=20
>=20
> > On 26 Jul 2022, at 00:33, Mike Gilbert <[email protected]> wrote:
> >=20
> > On Mon, Jul 25, 2022 at 11:38 AM Fabian Groffen <[email protected]> wr=
ote:
> >>=20
> >> bin/install-qa-check.d/80libraries: support Darwin/Mach-O objects
> >>=20
> >> Check for dylib on Darwin, so on everything else.
> >>=20
> >> Signed-off-by: Fabian Groffen <[email protected]>
> >>=20
> >> diff --git a/bin/install-qa-check.d/80libraries b/bin/install-qa-check=
=2Ed/80libraries
> >> index 8dc35bb87..a477ec9cb 100644
> >> --- a/bin/install-qa-check.d/80libraries
> >> +++ b/bin/install-qa-check.d/80libraries
> >> @@ -140,7 +140,9 @@ lib_check() {
> >>        local abort=3D"no"
> >>        local a s
> >>        for a in "${ED%/}"/usr/lib*/*.a ; do
> >> -               s=3D${a%.a}.so
> >> +               [[ ${CHOST} =3D=3D *-darwin* ]] \
> >> +                       && s=3D${a%.a}.dylib \
> >> +                       || s=3D${a%.a}.so
> >=20
> > I would find this much easier to read if you converted it to an
> > if/else statement instead of chaining && and ||.
>=20
> Yes, please.

https://github.com/gentoo/portage/pull/867

Thanks


--=20
Fabian Groffen
Gentoo on a different level

--wrefMtiCA2MaJq9O
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQEzBAABCgAdFiEELUvHd/Gtp7LaU1vuzpXahU5EQpMFAmLgNboACgkQzpXahU5E
QpOPfAf8CSCyFXIUFi8O7ezi/9vkr02xEQ0OsEbku288prMlQVaLeK1p8dojxwkE
F+uDCXpBhYsiUJfF4vb5+sER3Aw9G6sNGjRAB8CGUNylrsHFrsJCBg/4/HpWsONf
wzrcNXKjHZKin7TnD/ArBMHv6oovhBPi4IINl37ndELZ2NgMXQwDhDvdYCv8XDK4
NR8iBh5zc95Qf0FHHIgARiT5rX50uS11rYX92dsaYsSk6wr730PMw7+LMA28yZyq
TBKX1yk35mADiV4OpTeCBwhv12W/DT27fhLV+aYmpQ2Tk+MIydO/W+WB5O3PKTS5
9eiNmERXvSTOPA65FDx7j7UDkYPEww==
=x6r8
-----END PGP SIGNATURE-----

--wrefMtiCA2MaJq9O--