From b97438650d43f59e7f836b3471fc0e9b321c4c59 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 13 Mar 2017 22:18:13 +0100 Subject: gnu: guile-cairo: Use 'modify-phases'. * gnu/packages/gtk.scm (guile-cairo)[arguments]: Use 'modify-phases'. --- gnu/packages/gtk.scm | 62 +++++++++++++++++++++++++--------------------------- 1 file changed, 30 insertions(+), 32 deletions(-) (limited to 'gnu/packages/gtk.scm') diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm index 0a291370e7..380fae594b 100644 --- a/gnu/packages/gtk.scm +++ b/gnu/packages/gtk.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013 Andreas Enge -;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès +;;; Copyright © 2013, 2014, 2015, 2016, 2017 Ludovic Courtès ;;; Copyright © 2014, 2015, 2017 Mark H Weaver ;;; Copyright © 2014 Eric Bavier ;;; Copyright © 2015 Federico Beffa @@ -730,38 +730,36 @@ application suites.") (name "guile-cairo") (version "1.4.1") (source (origin - (method url-fetch) - (uri (string-append - "http://download.gna.org/guile-cairo/guile-cairo-" - version - ".tar.gz")) - (sha256 - (base32 - "1f5nd9n46n6cwfl1byjml02q3y2hgn7nkx98km1czgwarxl7ws3x")))) + (method url-fetch) + (uri (string-append + "http://download.gna.org/guile-cairo/guile-cairo-" + version + ".tar.gz")) + (sha256 + (base32 + "1f5nd9n46n6cwfl1byjml02q3y2hgn7nkx98km1czgwarxl7ws3x")))) (build-system gnu-build-system) (arguments - '(#:phases (alist-cons-before - 'configure 'set-module-directory - (lambda* (#:key outputs #:allow-other-keys) - ;; Install modules under $out/share/guile/site/2.0. - (let ((out (assoc-ref outputs "out"))) - (substitute* "Makefile.in" - (("scmdir = ([[:graph:]]+).*" _ value) - (string-append "scmdir = " value "/2.0\n"))) - (substitute* "cairo/Makefile.in" - (("moduledir = ([[:graph:]]+).*" _ value) - (string-append "moduledir = " - "$(prefix)/share/guile/site/2.0/cairo\n'"))))) - (alist-cons-after - 'install 'install-missing-file - (lambda* (#:key outputs #:allow-other-keys) - ;; By default 'vector-types.scm' is not installed, so do - ;; it here. - (let ((out (assoc-ref outputs "out"))) - (copy-file "cairo/vector-types.scm" - (string-append out "/share/guile/site/2.0" - "/cairo/vector-types.scm")))) - %standard-phases)))) + '(#:phases (modify-phases %standard-phases + (add-before 'configure 'set-module-directory + (lambda* (#:key outputs #:allow-other-keys) + ;; Install modules under $out/share/guile/site/2.0. + (let ((out (assoc-ref outputs "out"))) + (substitute* "Makefile.in" + (("scmdir = ([[:graph:]]+).*" _ value) + (string-append "scmdir = " value "/2.0\n"))) + (substitute* "cairo/Makefile.in" + (("moduledir = ([[:graph:]]+).*" _ value) + (string-append "moduledir = " + "$(prefix)/share/guile/site/2.0/cairo\n'")))))) + (add-after 'install 'install-missing-file + (lambda* (#:key outputs #:allow-other-keys) + ;; By default 'vector-types.scm' is not installed, so do + ;; it here. + (let ((out (assoc-ref outputs "out"))) + (copy-file "cairo/vector-types.scm" + (string-append out "/share/guile/site/2.0" + "/cairo/vector-types.scm")))))))) (inputs `(("guile-lib" ,guile-lib) ("expat" ,expat) @@ -770,7 +768,7 @@ application suites.") ;; The .pc file refers to 'cairo'. `(("cairo" ,cairo))) (native-inputs - `(("pkg-config" ,pkg-config))) + `(("pkg-config" ,pkg-config))) (home-page "http://www.nongnu.org/guile-cairo/") (synopsis "Cairo bindings for GNU Guile") (description -- cgit v1.2.3 From 0f11f64022afbd82600b5c301f0af40fcb60fb9a Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 13 Mar 2017 22:26:54 +0100 Subject: gnu: guile-cairo: Honor the Guile effective version. * gnu/packages/gtk.scm (guile-cairo)[arguments]: Add #:modules. Get the effective version of Guile and use that in installation directory names. --- gnu/packages/gtk.scm | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) (limited to 'gnu/packages/gtk.scm') diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm index 380fae594b..db19c9c931 100644 --- a/gnu/packages/gtk.scm +++ b/gnu/packages/gtk.scm @@ -740,26 +740,42 @@ application suites.") "1f5nd9n46n6cwfl1byjml02q3y2hgn7nkx98km1czgwarxl7ws3x")))) (build-system gnu-build-system) (arguments - '(#:phases (modify-phases %standard-phases + '(#:modules ((guix build utils) + (guix build gnu-build-system) + (ice-9 popen) + (ice-9 rdelim)) + + #:phases (modify-phases %standard-phases (add-before 'configure 'set-module-directory (lambda* (#:key outputs #:allow-other-keys) ;; Install modules under $out/share/guile/site/2.0. - (let ((out (assoc-ref outputs "out"))) + (let ((out (assoc-ref outputs "out")) + (effective + (read-line + (open-pipe* OPEN_READ "guile" "-c" + "(display (effective-version))")))) (substitute* "Makefile.in" (("scmdir = ([[:graph:]]+).*" _ value) - (string-append "scmdir = " value "/2.0\n"))) + (string-append "scmdir = " value "/" effective "\n"))) (substitute* "cairo/Makefile.in" (("moduledir = ([[:graph:]]+).*" _ value) (string-append "moduledir = " - "$(prefix)/share/guile/site/2.0/cairo\n'")))))) + "$(prefix)/share/guile/site/" + effective "/cairo\n'"))) + #t))) (add-after 'install 'install-missing-file (lambda* (#:key outputs #:allow-other-keys) ;; By default 'vector-types.scm' is not installed, so do ;; it here. - (let ((out (assoc-ref outputs "out"))) - (copy-file "cairo/vector-types.scm" - (string-append out "/share/guile/site/2.0" - "/cairo/vector-types.scm")))))))) + (let ((out (assoc-ref outputs "out")) + (effective + (read-line + (open-pipe* OPEN_READ "guile" "-c" + "(display (effective-version))")))) + (install-file "cairo/vector-types.scm" + (string-append out "/share/guile/site/" + effective "/cairo")) + #t)))))) (inputs `(("guile-lib" ,guile-lib) ("expat" ,expat) -- cgit v1.2.3