Gentoo Archives: gentoo-portage-dev

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

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies