diff mbox series

[bug#64711,40/43] gnu: pango: Support build for the Hurd.

Message ID da11d1165f646f350af8e8b4fc614f374dc02f59.1689690897.git.janneke@gnu.org
State New
Headers show
Series Fix builds and skip failing tests for the Hurd. | expand

Commit Message

Janneke Nieuwenhuizen July 18, 2023, 2:40 p.m. UTC
* gnu/packages/gtk.scm (pango)[native-inputs]: Do not include
gobject-introspection when building for the Hurd.
---
 gnu/packages/gtk.scm | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

Comments

Maxim Cournoyer July 18, 2023, 8:04 p.m. UTC | #1
Hi Janneke,

Thanks for your efforts on this.

Janneke Nieuwenhuizen <janneke@gnu.org> writes:

> * gnu/packages/gtk.scm (pango)[native-inputs]: Do not include
> gobject-introspection when building for the Hurd.
> ---
>  gnu/packages/gtk.scm | 14 ++++++++------
>  1 file changed, 8 insertions(+), 6 deletions(-)
>
> diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
> index 853696c7f5..15dea2852b 100644
> --- a/gnu/packages/gtk.scm
> +++ b/gnu/packages/gtk.scm
> @@ -401,12 +401,14 @@ (define-public pango
>       (list bash-minimal
>             zlib))
>      (native-inputs
> -     (list `(,glib "bin")               ;glib-mkenums, etc.
> -           gobject-introspection        ;g-ir-compiler, etc.
> -           help2man
> -           perl
> -           pkg-config
> -           python-wrapper))
> +     `((,glib "bin")               ;glib-mkenums, etc.
> +       ,@(if (target-hurd?)
> +             '()
> +             (list gobject-introspection)) ;g-ir-compiler, etc.
> +       ,help2man
> +       ,perl
> +       ,pkg-config
> +       ,python-wrapper))

Stylistically, I think it'd be better to use append (and 'if') here than
quasiquotes (to avoid having to unquote all inputs).

Otherwise it LGTM.
Janneke Nieuwenhuizen July 18, 2023, 8:15 p.m. UTC | #2
Maxim Cournoyer writes:

Hi Maxim,

> Thanks for your efforts on this.

Sure.  It's been fun, but a lot of work (world rebuilds) indeed.  Things
will get a lot better once we have CI for these native Hurd builds.

> Janneke Nieuwenhuizen <janneke@gnu.org> writes:
>
>> * gnu/packages/gtk.scm (pango)[native-inputs]: Do not include
>> gobject-introspection when building for the Hurd.
>> ---
>>  gnu/packages/gtk.scm | 14 ++++++++------
>>  1 file changed, 8 insertions(+), 6 deletions(-)
>>
>> diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
>> index 853696c7f5..15dea2852b 100644
>> --- a/gnu/packages/gtk.scm
>> +++ b/gnu/packages/gtk.scm
>> @@ -401,12 +401,14 @@ (define-public pango
>>       (list bash-minimal
>>             zlib))
>>      (native-inputs
>> -     (list `(,glib "bin")               ;glib-mkenums, etc.
>> -           gobject-introspection        ;g-ir-compiler, etc.
>> -           help2man
>> -           perl
>> -           pkg-config
>> -           python-wrapper))
>> +     `((,glib "bin")               ;glib-mkenums, etc.
>> +       ,@(if (target-hurd?)
>> +             '()
>> +             (list gobject-introspection)) ;g-ir-compiler, etc.
>> +       ,help2man
>> +       ,perl
>> +       ,pkg-config
>> +       ,python-wrapper))
>
> Stylistically, I think it'd be better to use append (and 'if') here than
> quasiquotes (to avoid having to unquote all inputs).

Okay, I can change it to

     (cons `(,glib "bin")               ;glib-mkenums, etc.
           (append (if (target-hurd?)
                       '()
                       (list gobject-introspection)) ;g-ir-compiler, etc.
                   (list help2man
                         perl
                         pkg-config
                         python-wrapper)))

> Otherwise it LGTM.

Thanks!
Maxim Cournoyer July 19, 2023, 12:56 a.m. UTC | #3
Hi,

Janneke Nieuwenhuizen <janneke@gnu.org> writes:

[...]

> Okay, I can change it to
>
>      (cons `(,glib "bin")               ;glib-mkenums, etc.
>            (append (if (target-hurd?)
>                        '()
>                        (list gobject-introspection)) ;g-ir-compiler, etc.
>                    (list help2man
>                          perl
>                          pkg-config
>                          python-wrapper)))

You can avoid 'cons' by moving `(,glib "bin") to the front of the
trailing list (the one starting with help2man ...), I think.
Janneke Nieuwenhuizen July 19, 2023, 6:14 a.m. UTC | #4
Maxim Cournoyer writes:

Hello,

> Janneke Nieuwenhuizen <janneke@gnu.org> writes:
>
> [...]
>
>> Okay, I can change it to
>>
>>      (cons `(,glib "bin")               ;glib-mkenums, etc.
>>            (append (if (target-hurd?)
>>                        '()
>>                        (list gobject-introspection)) ;g-ir-compiler, etc.
>>                    (list help2man
>>                          perl
>>                          pkg-config
>>                          python-wrapper)))
>
> You can avoid 'cons' by moving `(,glib "bin") to the front of the
> trailing list (the one starting with help2man ...), I think.

Eh..I think that I don't understand; you mean moving `(,glib ,bin) after
gobject-introspection like this?

     (append (if (target-hurd?)
                 '()
                 (list gobject-introspection)) ;g-ir-compiler, etc.
             (list
              `(,glib "bin")               ;glib-mkenums, etc.
              help2man
              perl
              pkg-config
              python-wrapper)))

That will trigger a rebuild that I would like to avoid.

We could avoid cons by doing

     (append (list `(,glib "bin"))      ;glib-mkenums, etc.
             (if (target-hurd?)
                 '()
                 (list gobject-introspection)) ;g-ir-compiler, etc.
             (list
              help2man
              perl
              pkg-config
              python-wrapper))

perhaps the best option?

Greetings,
Janneke
Maxim Cournoyer July 19, 2023, 4:22 p.m. UTC | #5
Hi Janneke,

Janneke Nieuwenhuizen <janneke@gnu.org> writes:

> Maxim Cournoyer writes:
>
> Hello,
>
>> Janneke Nieuwenhuizen <janneke@gnu.org> writes:
>>
>> [...]
>>
>>> Okay, I can change it to
>>>
>>>      (cons `(,glib "bin")               ;glib-mkenums, etc.
>>>            (append (if (target-hurd?)
>>>                        '()
>>>                        (list gobject-introspection)) ;g-ir-compiler, etc.
>>>                    (list help2man
>>>                          perl
>>>                          pkg-config
>>>                          python-wrapper)))
>>
>> You can avoid 'cons' by moving `(,glib "bin") to the front of the
>> trailing list (the one starting with help2man ...), I think.
>
> Eh..I think that I don't understand; you mean moving `(,glib ,bin) after
> gobject-introspection like this?
>
>      (append (if (target-hurd?)
>                  '()
>                  (list gobject-introspection)) ;g-ir-compiler, etc.
>              (list
>               `(,glib "bin")               ;glib-mkenums, etc.
>               help2man
>               perl
>               pkg-config
>               python-wrapper)))
>
> That will trigger a rebuild that I would like to avoid.

Ah, apologies, I had not thought about this causing rebuilds.

> We could avoid cons by doing
>
>      (append (list `(,glib "bin"))      ;glib-mkenums, etc.
>              (if (target-hurd?)
>                  '()
>                  (list gobject-introspection)) ;g-ir-compiler, etc.
>              (list
>               help2man
>               perl
>               pkg-config
>               python-wrapper))
>
> perhaps the best option?

Either ways are fine, sorry for the noise :-).
Janneke Nieuwenhuizen July 19, 2023, 8:51 p.m. UTC | #6
Maxim Cournoyer writes:

Hi Maxim,

> Janneke Nieuwenhuizen <janneke@gnu.org> writes:
>
>> Maxim Cournoyer writes:
>>
>> Hello,
>>
>>> Janneke Nieuwenhuizen <janneke@gnu.org> writes:
>>>
>>> [...]

[..]

>> That will trigger a rebuild that I would like to avoid.
>
> Ah, apologies, I had not thought about this causing rebuilds.

Yeah, tricky.

>> We could avoid cons by doing
>>
>>      (append (list `(,glib "bin"))      ;glib-mkenums, etc.
>>              (if (target-hurd?)
>>                  '()
>>                  (list gobject-introspection)) ;g-ir-compiler, etc.
>>              (list
>>               help2man
>>               perl
>>               pkg-config
>>               python-wrapper))
>>
>> perhaps the best option?
>
> Either ways are fine, sorry for the noise :-).

No problem, thanks for chiming in and caring enough about stylistics!
I like the last variant probably slightly better, so I'll keep that
for harfbuzz and pango.

Greetings,
Janneke
diff mbox series

Patch

diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index 853696c7f5..15dea2852b 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -401,12 +401,14 @@  (define-public pango
      (list bash-minimal
            zlib))
     (native-inputs
-     (list `(,glib "bin")               ;glib-mkenums, etc.
-           gobject-introspection        ;g-ir-compiler, etc.
-           help2man
-           perl
-           pkg-config
-           python-wrapper))
+     `((,glib "bin")               ;glib-mkenums, etc.
+       ,@(if (target-hurd?)
+             '()
+             (list gobject-introspection)) ;g-ir-compiler, etc.
+       ,help2man
+       ,perl
+       ,pkg-config
+       ,python-wrapper))
     (synopsis "Text and font handling library")
     (description "Pango is a library for laying out and rendering of text, with
 an emphasis on internationalization.  Pango can be used anywhere that text