From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50511) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVNwY-000332-GF for guix-patches@gnu.org; Wed, 12 Jul 2017 16:09:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dVNwU-0004Dg-GV for guix-patches@gnu.org; Wed, 12 Jul 2017 16:09:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:33154) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dVNwU-0004DW-AY for guix-patches@gnu.org; Wed, 12 Jul 2017 16:09:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dVNwU-0005Jv-0v for guix-patches@gnu.org; Wed, 12 Jul 2017 16:09:02 -0400 Subject: [bug#27657] [PATCH 1/3] gnu: graphviz: Use modify-phases. Resent-Message-ID: From: Marius Bakke In-Reply-To: References: <81625ecf.AEMAM5Q5T1QAAAAAAAAAAAOtUOAAAAACwQwAAAAAAAW9WABZZUFu@mailjet.com> Date: Wed, 12 Jul 2017 22:07:52 +0200 Message-ID: <87inixju5j.fsf@fastmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Arun Isaac , 27657@debbugs.gnu.org --=-=-= Content-Type: text/plain Arun Isaac 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! --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAllmgZgACgkQoqBt8qM6 VPqZpggAv+aMV8eO7JKpAtBtt9PsNbE489CHRmzMgMN1HbzmI1jVaJn9QK1mecn6 CClpT0x0zXdU5AI9EaNZ/0/w5x85g/+lGN1aG2zWsyTLjMLeAvDojO8nPRqKU7eI qIHfKHbA4KH7GAlrELNxXQSdjOBreRyAKmN6NNBEaoIEnajw//DMA3cbBp3YjYcQ dSCOcNI2C33OtBYTa0nZYVhdnYFWHLBD1YE07gNc1wqma8hFYEXaSFV0Eg11rmh0 uS7n1/Sw8TvH9nl0NLJZuhCGBR/4Js37XasvPltjWpsNcConDvldSzfnrXlXdijj F2JJegpX+ZCM2NQP4wcrqjfWBhY1hw== =L7JJ -----END PGP SIGNATURE----- --=-=-=--