guix-patches
[Top][All Lists]
Advanced

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

[bug#27657] [PATCH 1/3] gnu: graphviz: Use modify-phases.


From: Marius Bakke
Subject: [bug#27657] [PATCH 1/3] gnu: graphviz: Use modify-phases.
Date: Wed, 12 Jul 2017 22:07:52 +0200
User-agent: Notmuch/0.24.2 (https://notmuchmail.org) Emacs/25.2.1 (x86_64-unknown-linux-gnu)

Arun Isaac <address@hidden> writes:

> * gnu/packages/graphviz.scm (graphviz): Re-indent.
> [arguments]: Use modify-phases instead of alist-cons-before and
> alist-cons-after.

Thanks!

[...]

> -       #:phases (alist-cons-before
> -                 'build 'pre-build
> -                 (lambda _
> -                   ;; Work around bogus makefile when using an external
> -                   ;; libltdl.  Failing to do so, one hits this error:
> -                   ;; "No rule to make target `-lltdl', needed by 
> `libgvc.la'."
> -                   (substitute* "lib/gvc/Makefile"
> -                     (("am__append_5 *=.*")
> -                      "am_append_5 =\n")))
> -                 (alist-cons-after
> -                  'install 'move-docs
> -                  (lambda* (#:key outputs #:allow-other-keys)
> -                           (let ((out (assoc-ref outputs "out"))
> -                                 (doc (assoc-ref outputs "doc")))
> -                             (mkdir-p (string-append doc "/share/graphviz"))
> -                             (rename-file (string-append out 
> "/share/graphviz/doc")
> -                                          (string-append doc 
> "/share/graphviz/doc"))
> -                             #t))
> -                  (alist-cons-after
> -                   'move-docs 'move-guile-bindings
> -                   (lambda* (#:key outputs #:allow-other-keys)
> -                     (let* ((out (assoc-ref outputs "out"))
> -                            (lib (string-append out "/lib"))
> -                            (extdir (string-append lib
> -                                                   "/guile/2.0/extensions")))
> -                       (mkdir-p extdir)
> -                       (rename-file (string-append
> -                                     lib "/graphviz/guile/libgv_guile.so")
> -                                    (string-append extdir
> -                                                   "/libgv_guile.so"))))
> -                   %standard-phases)))))
> +       #:phases
> +       (modify-phases %standard-phases
> +         (add-before 'build 'pre-build
> +           (lambda _
> +             ;; Work around bogus makefile when using an external
> +             ;; libltdl.  Failing to do so, one hits this error:
> +             ;; "No rule to make target `-lltdl', needed by `libgvc.la'."
> +             (substitute* "lib/gvc/Makefile"
> +               (("am__append_5 *=.*")
> +                "am_append_5 =\n"))))
> +         (add-after
> +             'install 'move-docs

Maybe change this to current conventions while at it?

> +           (lambda* (#:key outputs #:allow-other-keys)
> +             (let ((out (assoc-ref outputs "out"))
> +                   (doc (assoc-ref outputs "doc")))
> +               (mkdir-p (string-append doc "/share/graphviz"))
> +               (rename-file (string-append out "/share/graphviz/doc")
> +                            (string-append doc "/share/graphviz/doc"))
> +               #t)))
> +         (add-after
> +             'move-docs 'move-guile-bindings

And this.

> +           (lambda* (#:key outputs #:allow-other-keys)
> +             (let* ((out (assoc-ref outputs "out"))
> +                    (lib (string-append out "/lib"))
> +                    (extdir (string-append lib
> +                                           "/guile/2.0/extensions")))
> +               (mkdir-p extdir)
> +               (rename-file (string-append
> +                             lib "/graphviz/guile/libgv_guile.so")
> +                            (string-append extdir
> +                                           "/libgv_guile.so"))))))))

Similarly, (rename-file ...) has an unspecified return value, so please
add a #t at the end of this phase (even though it wasn't before). LGTM!

Attachment: signature.asc
Description: PGP signature


reply via email to

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