Re: [PATCH] 80libraries: add support for Darwin targets
Mike Gilbert <[email protected]> Mon, 25 Jul 2022 19:33:45 -0400
| Newsgroups | gmane.linux.gentoo.portage.devel |
|---|---|
| Message-ID | <CAJ0EP41jZ9EvXPpQSMsJz4aoYLaXmy-kmpYfx_KzsHAARdgV=g@mail.gmail.com> |
On Mon, Jul 25, 2022 at 11:38 AM Fabian Groffen <[email protected]> wrote: > > bin/install-qa-check.d/80libraries: support Darwin/Mach-O objects > > Check for dylib on Darwin, so on everything else. > > Signed-off-by: Fabian Groffen <[email protected]> > > diff --git a/bin/install-qa-check.d/80libraries b/bin/install-qa-check.d/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="no" > local a s > for a in "${ED%/}"/usr/lib*/*.a ; do > - s=${a%.a}.so > + [[ ${CHOST} == *-darwin* ]] \ > + && s=${a%.a}.dylib \ > + || s=${a%.a}.so I would find this much easier to read if you converted it to an if/else statement instead of chaining && and ||.