guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#36477] [PATCH v3 06/48] gnu: groff: Fix cross compilation.


From: Ludovic Courtès
Subject: [bug#36477] [PATCH v3 06/48] gnu: groff: Fix cross compilation.
Date: Wed, 04 Sep 2019 15:23:59 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

Mathieu Othacehe <address@hidden> skribis:

> * gnu/packages/groff.scm (groff)[arguments]: Replace build phase to pass
> GROFF_BIN_PATH and GROFFBIN variables when cross-compiling.
>
> Also add native groff as a native-input when cross-compiling.

Please mention changes to ‘groff-minimal’.


[...]

> +     ,@(if (%current-target-system)
> +              '((replace 'build
> +               (lambda* (#:key
> +                         make-flags parallel-build?
> +                         native-inputs target #:allow-other-keys)
> +                 ;; When cross-compiling, native groff is needed, see:
> +                 ;; http://www.mail-archive.com/address@hidden/msg01335.html
> +                 (let ((parallel
> +                        (if parallel-build?
> +                            `("-j" ,(number->string (parallel-job-count)))
> +                            '()))
> +                       (flags
> +                        (if target
> +                            (let ((groff (or
> +                                          (assoc-ref native-inputs "groff")
> +                                          (assoc-ref native-inputs "self"))))
> +                              (append
> +                               make-flags
> +                               (list
> +                                (string-append "GROFF_BIN_PATH=" groff)
> +                                (string-append "GROFFBIN=" groff
> +                                               "/bin/groff"))))
> +                            make-flags)))

Wouldn’t it be easier to have:

  (arguments
    `(,@(if (%current-target-system)
            `(#:make-flags (list (string-append "GROFF_BIN_PATH="
                                                (assoc-ref %build-native-inputs 
"self)
                                                …)))
             '()
      …))

?

>      (native-inputs `(("bison" ,bison)
> -                     ("perl" ,perl)))
> +                     ("perl" ,perl)
> +                     ("groff" ,groff)))

Should probably be:

  ("self" ,this-package)

for consistency.

Thanks,
Ludo’.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]