Gentoo Archives: gentoo-portage-dev

From: Mike Gilbert <floppym@g.o>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] [PATCH] 80libraries: add support for Darwin targets
Date: Mon, 25 Jul 2022 23:34:02
Message-Id: CAJ0EP41jZ9EvXPpQSMsJz4aoYLaXmy-kmpYfx_KzsHAARdgV=g@mail.gmail.com
In Reply to: [gentoo-portage-dev] [PATCH] 80libraries: add support for Darwin targets by Fabian Groffen
1 On Mon, Jul 25, 2022 at 11:38 AM Fabian Groffen <grobian@g.o> wrote:
2 >
3 > bin/install-qa-check.d/80libraries: support Darwin/Mach-O objects
4 >
5 > Check for dylib on Darwin, so on everything else.
6 >
7 > Signed-off-by: Fabian Groffen <grobian@g.o>
8 >
9 > diff --git a/bin/install-qa-check.d/80libraries b/bin/install-qa-check.d/80libraries
10 > index 8dc35bb87..a477ec9cb 100644
11 > --- a/bin/install-qa-check.d/80libraries
12 > +++ b/bin/install-qa-check.d/80libraries
13 > @@ -140,7 +140,9 @@ lib_check() {
14 > local abort="no"
15 > local a s
16 > for a in "${ED%/}"/usr/lib*/*.a ; do
17 > - s=${a%.a}.so
18 > + [[ ${CHOST} == *-darwin* ]] \
19 > + && s=${a%.a}.dylib \
20 > + || s=${a%.a}.so
21
22 I would find this much easier to read if you converted it to an
23 if/else statement instead of chaining && and ||.

Replies