public inbox for gentoo-portage-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-portage-dev] [PATCH] 80libraries: add support for Darwin targets
@ 2022-07-25 15:38 Fabian Groffen
  2022-07-25 23:33 ` Mike Gilbert
  0 siblings, 1 reply; 4+ messages in thread
From: Fabian Groffen @ 2022-07-25 15:38 UTC (permalink / raw
  To: gentoo-portage-dev

[-- Attachment #1: Type: text/plain, Size: 728 bytes --]

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 <grobian@gentoo.org>

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
 		if [[ ! -e ${s} ]] ; then
 			s=${s%usr/*}${s##*/usr/}
 			if [[ -e ${s} ]] ; then

-- 
Fabian Groffen
Gentoo on a different level

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [gentoo-portage-dev] [PATCH] 80libraries: add support for Darwin targets
  2022-07-25 15:38 [gentoo-portage-dev] [PATCH] 80libraries: add support for Darwin targets Fabian Groffen
@ 2022-07-25 23:33 ` Mike Gilbert
  2022-07-26  3:01   ` Sam James
  0 siblings, 1 reply; 4+ messages in thread
From: Mike Gilbert @ 2022-07-25 23:33 UTC (permalink / raw
  To: gentoo-portage-dev

On Mon, Jul 25, 2022 at 11:38 AM Fabian Groffen <grobian@gentoo.org> 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 <grobian@gentoo.org>
>
> 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 ||.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [gentoo-portage-dev] [PATCH] 80libraries: add support for Darwin targets
  2022-07-25 23:33 ` Mike Gilbert
@ 2022-07-26  3:01   ` Sam James
  2022-07-26 18:43     ` Fabian Groffen
  0 siblings, 1 reply; 4+ messages in thread
From: Sam James @ 2022-07-26  3:01 UTC (permalink / raw
  To: gentoo-portage-dev

[-- Attachment #1: Type: text/plain, Size: 1023 bytes --]



> On 26 Jul 2022, at 00:33, Mike Gilbert <floppym@gentoo.org> wrote:
> 
> On Mon, Jul 25, 2022 at 11:38 AM Fabian Groffen <grobian@gentoo.org> 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 <grobian@gentoo.org>
>> 
>> 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 ||.

Yes, please.

[-- Attachment #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 358 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [gentoo-portage-dev] [PATCH] 80libraries: add support for Darwin targets
  2022-07-26  3:01   ` Sam James
@ 2022-07-26 18:43     ` Fabian Groffen
  0 siblings, 0 replies; 4+ messages in thread
From: Fabian Groffen @ 2022-07-26 18:43 UTC (permalink / raw
  To: gentoo-portage-dev

[-- Attachment #1: Type: text/plain, Size: 1239 bytes --]

On 26-07-2022 04:01:37 +0100, Sam James wrote:
> 
> 
> > On 26 Jul 2022, at 00:33, Mike Gilbert <floppym@gentoo.org> wrote:
> > 
> > On Mon, Jul 25, 2022 at 11:38 AM Fabian Groffen <grobian@gentoo.org> 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 <grobian@gentoo.org>
> >> 
> >> 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 ||.
> 
> Yes, please.

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

Thanks


-- 
Fabian Groffen
Gentoo on a different level

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-07-26 18:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-25 15:38 [gentoo-portage-dev] [PATCH] 80libraries: add support for Darwin targets Fabian Groffen
2022-07-25 23:33 ` Mike Gilbert
2022-07-26  3:01   ` Sam James
2022-07-26 18:43     ` Fabian Groffen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox