unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Marius Bakke <mbakke@fastmail.com>
To: Arun Isaac <arunisaac@systemreboot.net>, 27657@debbugs.gnu.org
Subject: [bug#27657] [PATCH 1/3] gnu: graphviz: Use modify-phases.
Date: Wed, 12 Jul 2017 22:07:52 +0200	[thread overview]
Message-ID: <87inixju5j.fsf@fastmail.com> (raw)
In-Reply-To: <cb5a73fa.AEMAM67WnBMAAAAAAAAAAAPUoLsAAAACwQwAAAAAAAW9WABZZjGZ@mailjet.com>

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

Arun Isaac <arunisaac@systemreboot.net> 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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

  reply	other threads:[~2017-07-12 20:09 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-11 21:21 [bug#27657] [PATCH] gnu: graphviz: Update to 2.40.1 Arun Isaac
     [not found] ` <handler.27657.B.149980812621470.ack@debbugs.gnu.org>
2017-07-11 21:34   ` [bug#27657] Acknowledgement ([PATCH] gnu: graphviz: Update to 2.40.1.) Arun Isaac
2017-07-11 22:02     ` Tobias Geerinckx-Rice
2017-07-11 22:07     ` Marius Bakke
2017-07-12 14:32       ` Arun Isaac
2017-07-11 21:52 ` [bug#27657] [PATCH] gnu: graphviz: Update to 2.40.1 Marius Bakke
2017-07-12 12:19   ` Ludovic Courtès
2017-07-12 14:44     ` Arun Isaac
     [not found]     ` <6e577250.AEQAM_HdOgAAAAAAAAAAAAOzWv8AAAACwQwAAAAAAAW9WABZZjXO@mailjet.com>
2017-07-12 20:48       ` Ludovic Courtès
2017-07-14 11:15     ` Arun Isaac
2017-07-14 13:58       ` Leo Famulari
2017-07-14 14:16         ` Arun Isaac
2017-07-12 14:41   ` Arun Isaac
2017-07-12 14:25 ` [bug#27657] [PATCH 1/3] gnu: graphviz: Use modify-phases Arun Isaac
2017-07-12 20:07   ` Marius Bakke [this message]
2017-07-14 11:37 ` [bug#27657] [PATCH] gnu: graphviz: Remove unnecessary inputs Arun Isaac
2017-07-17  9:31   ` Ludovic Courtès
2017-07-20  1:38     ` Arun Isaac
     [not found]     ` <cc8cb77c.ADkAACVAtRsAAAAAAAAAAAOzWv8AAAACwQwAAAAAAAW9WABZcAmW@mailjet.com>
2017-07-20  8:32       ` Ludovic Courtès
2017-07-20  1:35 ` [bug#27657] [PATCH] gnu: wayland: Improve fix-graphviz phase Arun Isaac
2017-07-20  8:34   ` Ludovic Courtès
2017-07-20 14:13     ` bug#27657: " Arun Isaac

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87inixju5j.fsf@fastmail.com \
    --to=mbakke@fastmail.com \
    --cc=27657@debbugs.gnu.org \
    --cc=arunisaac@systemreboot.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).