From e4dbe0cd2e5645f3ae86b004c05fe20b06cb47fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Thu, 23 Jan 2020 11:10:14 +0100 Subject: gnu: guile-cairo: Add "guile3.0-cairo" variant. * gnu/packages/gtk.scm (guile-cairo)[source](snippet): Add #include everywhere #include appears. (guile3.0-cairo): New variable. --- gnu/packages/gtk.scm | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'gnu/packages/gtk.scm') diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm index a3e19827f5..6f7344c6e3 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, 2017, 2018, 2019 Ludovic Courtès +;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès ;;; Copyright © 2014, 2015, 2017, 2018, 2019 Mark H Weaver ;;; Copyright © 2014 Eric Bavier ;;; Copyright © 2015 Federico Beffa @@ -833,6 +833,12 @@ application suites.") (string-append name "dir = " prefix "/guile/site/@GUILE_EFFECTIVE_VERSION@" suffix))) + + ;; Guile 2.x used to pull in and + ;; other headers but this is no longer the case in 3.0. + (substitute* (find-files "." "\\.[ch]$") + (("^ *# *include.*libguile\\.h.*$") + "#include \n#include \n")) #t))))) (build-system gnu-build-system) (inputs @@ -855,6 +861,22 @@ graphics library with all of the benefits of Scheme: memory management, exceptions, macros, and a dynamic programming environment.") (license license:lgpl3+))) +(define-public guile3.0-cairo + (package + (inherit guile-cairo) + (name "guile3.0-cairo") + (arguments + (substitute-keyword-arguments (package-arguments guile-cairo) + ((#:configure-flags flags ''()) + ;; Uses of 'scm_t_uint8' & co. are deprecated; don't stop the build + ;; because of them. + `(cons "--disable-Werror" ,flags)))) + (inputs + `(("guile" ,guile-3.0) + ("guile-lib" ,guile3.0-lib) + ,@(fold alist-delete (package-inputs guile-cairo) + '("guile" "guile-lib")))))) + (define-public guile-rsvg ;; Use a recent snapshot that supports Guile 2.2 and beyond. (let ((commit "05c6a2fd67e4fea1a7c3ff776729dc931bae6678") -- cgit v1.2.3 From 46378df05010f3f9f54fe7d0f3a17c1abc238166 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Thu, 23 Jan 2020 11:15:39 +0100 Subject: gnu: guile-rsvg: Add "guile3.0-rsvg" variant. * gnu/packages/gtk.scm (guile3.0-rsvg): New variable. --- gnu/packages/gtk.scm | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'gnu/packages/gtk.scm') diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm index 6f7344c6e3..93e90fa450 100644 --- a/gnu/packages/gtk.scm +++ b/gnu/packages/gtk.scm @@ -924,6 +924,17 @@ images onto Cairo surfaces.") (home-page "http://wingolog.org/projects/guile-rsvg/") (license license:lgpl2.1+)))) +(define-public guile3.0-rsvg + (package + (inherit guile-rsvg) + (name "guile3.0-rsvg") + (inputs + `(("guile" ,guile-3.0) + ("guile-lib" ,guile3.0-lib) + ,@(fold alist-delete (package-inputs guile-rsvg) + '("guile" "guile-lib")))) + (propagated-inputs `(("guile-cairo" ,guile3.0-cairo))))) + (define-public guile-present (package (name "guile-present") -- cgit v1.2.3 From b93cde3d8cf52af02083cdc23e5819699f5aea67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Thu, 23 Jan 2020 11:18:14 +0100 Subject: gnu: guile-present: Install .go files in /site-ccache. * gnu/packages/gtk.scm (guile-present)[source]: Add 'modules' and 'snippet'. --- gnu/packages/gtk.scm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'gnu/packages/gtk.scm') diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm index 93e90fa450..6b61e9c7a9 100644 --- a/gnu/packages/gtk.scm +++ b/gnu/packages/gtk.scm @@ -946,7 +946,14 @@ images onto Cairo surfaces.") (sha256 (base32 "1qam447m05sxxv6x8dlzg7qnyfc4dh8apjw1idpfhpns671gfr6m")) - (patches (search-patches "guile-present-coding.patch")))) + (patches (search-patches "guile-present-coding.patch")) + (modules '((guix build utils))) + (snippet + '(begin + ;; Install .go files in the right place. + (substitute* "Makefile.in" + (("/ccache") "/site-ccache")) + #t)))) (build-system gnu-build-system) (arguments '(#:phases -- cgit v1.2.3 From 897186c1554e18a187429683d2eafdbfc0caac96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Thu, 23 Jan 2020 11:22:20 +0100 Subject: gnu: guile-present: Pass the right module directories in scripts. * gnu/packages/gtk.scm (guile-present)[arguments]: In 'post-install' phase, remove hard-coded "2.0" and replace it by a computed effective version. Also, pass "/site-ccache" to -C. --- gnu/packages/gtk.scm | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'gnu/packages/gtk.scm') diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm index 6b61e9c7a9..88c4b56e9d 100644 --- a/gnu/packages/gtk.scm +++ b/gnu/packages/gtk.scm @@ -84,7 +84,8 @@ #:use-module (gnu packages xorg) #:use-module (gnu packages xdisorg) #:use-module (srfi srfi-1) - #:use-module (srfi srfi-26)) + #:use-module (srfi srfi-26) + #:use-module (ice-9 match)) (define-public atk (package @@ -956,18 +957,22 @@ images onto Cairo surfaces.") #t)))) (build-system gnu-build-system) (arguments - '(#:phases + `(#:phases (modify-phases %standard-phases (add-after 'install 'post-install (lambda* (#:key inputs outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (bin (string-append out "/bin")) - (guile (assoc-ref inputs "guile"))) + (guile (assoc-ref inputs "guile")) + (version + ,(match (assoc "guile" (package-inputs this-package)) + (("guile" guile) + (version-major+minor (package-version guile)))))) (substitute* (find-files bin ".*") (("guile") (string-append guile "/bin/guile -L " - out "/share/guile/site/2.0 -C " - out "/share/guile/site/2.0 ")))) + out "/share/guile/site/" version " -C " + out "/lib/guile/" version "/site-ccache ")))) #t))))) (native-inputs `(("pkg-config" ,pkg-config))) (inputs `(("guile" ,guile-2.2))) -- cgit v1.2.3 From 2c9fd7636f1ec43c864516de4b1787df84572e9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Thu, 23 Jan 2020 11:26:08 +0100 Subject: gnu: guile-present: Add "guile3.0-present". * gnu/packages/gtk.scm (guile-present)[source](snippet): Add "3.0" to the supported Guile versions. (guile3.0-present): New variable. --- gnu/packages/gtk.scm | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'gnu/packages/gtk.scm') diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm index 88c4b56e9d..f934eabe27 100644 --- a/gnu/packages/gtk.scm +++ b/gnu/packages/gtk.scm @@ -951,6 +951,11 @@ images onto Cairo surfaces.") (modules '((guix build utils))) (snippet '(begin + ;; Allow builds with Guile 3.0. + (substitute* "configure" + (("2\\.2 2\\.0") + "3.0 2.2 2.0")) + ;; Install .go files in the right place. (substitute* "Makefile.in" (("/ccache") "/site-ccache")) @@ -991,6 +996,16 @@ includes a tools to generate PDF presentations out of Org mode and Texinfo documents.") (license license:lgpl3+))) +(define-public guile3.0-present + (package + (inherit guile-present) + (name "guile3.0-present") + (inputs `(("guile" ,guile-3.0))) + (propagated-inputs + `(("guile-lib" ,guile3.0-lib) + ("guile-cairo" ,guile3.0-cairo) + ("guile-rsvg" ,guile3.0-rsvg))))) + (define-public guile-gnome (package (name "guile-gnome") -- cgit v1.2.3