From 85f026f36ae93ac3ce3fa50150848eab9b31b69f Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Tue, 15 Feb 2022 13:29:55 +0100 Subject: gnu: asymptote: Use G-expressions. * gnu/packages/plotutils.scm (asymptote)[arguments]<#:phases>: Use G-expressions. --- gnu/packages/plotutils.scm | 124 ++++++++++++++++++++++----------------------- 1 file changed, 62 insertions(+), 62 deletions(-) (limited to 'gnu/packages/plotutils.scm') diff --git a/gnu/packages/plotutils.scm b/gnu/packages/plotutils.scm index 738fc771c2..d74b7afca2 100644 --- a/gnu/packages/plotutils.scm +++ b/gnu/packages/plotutils.scm @@ -345,68 +345,68 @@ colors, styles, options and details.") #$output "/share/texmf/tex/context/third")) #:phases - `(modify-phases %standard-phases - (add-after 'unpack 'locate-tirpc - (lambda* (#:key inputs #:allow-other-keys) - (substitute* (list "configure.ac") - (("/usr/include/tirpc") - (search-input-directory inputs "include/tirpc"))))) - (add-after 'unpack 'unbundle-rapidjson - (lambda* (#:key inputs #:allow-other-keys) - (substitute* (list "Makefile.in") - (("\\$\\(CMAKE\\)" all) - (string-append all " -DUSE_SYSTEM_RAPIDJSON=ON"))))) - (add-after 'unpack 'fix-includes - (lambda _ - (substitute* (find-files "." "\\.in$") - (("#include ") "#include \"primitives.h\"")) - (substitute* (find-files "prc" "\\.h$") - (("#include \"config.h\"") "#include \"../config.h\"")) - (substitute* "prc/oPRCFile.h" - (("#include \"xstream.h\"") "#include \"../xstream.h\"")) - (substitute* "v3dfile.h" - (("#include ") "#include \"prc/oPRCFile.h\"")) - (substitute* "LspCpp/src/lsp/ParentProcessWatcher.cpp" - (("#include " all) - (string-append "#include \n" all))))) - (replace 'bootstrap - (lambda _ - (invoke "autoreconf" "-vfi"))) - (add-after 'unpack 'move-info-location - ;; Build process installs info file in the unusual - ;; "%out/share/info/asymptote/" location. Move it to - ;; "%out/share/info/" so it appears in the top-level directory. - (lambda _ - (substitute* "doc/png/Makefile.in" - (("(\\$\\(infodir\\))/asymptote" _ infodir) infodir)) - (substitute* "doc/asymptote.texi" - (("asymptote/asymptote") "asymptote")))) - (add-before 'build 'patch-pdf-viewer - (lambda _ - ;; Default to a free pdf viewer. - (substitute* "settings.cc" - (("defaultPDFViewer=\"acroread\"") - "defaultPDFViewer=\"gv\"")))) - (add-before 'check 'set-HOME - ;; Some tests require write access to $HOME, otherwise leading to - ;; "failed to create directory /homeless-shelter/.asy" error. - (lambda _ - (setenv "HOME" "/tmp"))) - (add-after 'install 'install-Emacs-data - (lambda* (#:key outputs #:allow-other-keys) - ;; Install related Emacs libraries into an appropriate location. - (let* ((out (assoc-ref outputs "out")) - (lisp-dir (string-append out "/share/emacs/site-lisp"))) - (for-each (cut install-file <> lisp-dir) - (find-files "." "\\.el$")) - (emacs-generate-autoloads ,name lisp-dir)))) - (add-after 'install-Emacs-data 'wrap-python-script - (lambda* (#:key inputs outputs #:allow-other-keys) - ;; Make sure 'xasy' runs with the correct PYTHONPATH. - (let* ((out (assoc-ref outputs "out")) - (path (getenv "GUIX_PYTHONPATH"))) - (wrap-program (string-append out "/share/asymptote/GUI/xasy.py") - `("GUIX_PYTHONPATH" ":" prefix (,path))))))))) + #~(modify-phases %standard-phases + (add-after 'unpack 'locate-tirpc + (lambda* (#:key inputs #:allow-other-keys) + (substitute* (list "configure.ac") + (("/usr/include/tirpc") + (search-input-directory inputs "include/tirpc"))))) + (add-after 'unpack 'unbundle-rapidjson + (lambda* (#:key inputs #:allow-other-keys) + (substitute* (list "Makefile.in") + (("\\$\\(CMAKE\\)" all) + (string-append all " -DUSE_SYSTEM_RAPIDJSON=ON"))))) + (add-after 'unpack 'fix-includes + (lambda _ + (substitute* (find-files "." "\\.in$") + (("#include ") "#include \"primitives.h\"")) + (substitute* (find-files "prc" "\\.h$") + (("#include \"config.h\"") "#include \"../config.h\"")) + (substitute* "prc/oPRCFile.h" + (("#include \"xstream.h\"") "#include \"../xstream.h\"")) + (substitute* "v3dfile.h" + (("#include ") "#include \"prc/oPRCFile.h\"")) + (substitute* "LspCpp/src/lsp/ParentProcessWatcher.cpp" + (("#include " all) + (string-append "#include \n" all))))) + (replace 'bootstrap + (lambda _ + (invoke "autoreconf" "-vfi"))) + (add-after 'unpack 'move-info-location + ;; Build process installs info file in the unusual + ;; "%out/share/info/asymptote/" location. Move it to + ;; "%out/share/info/" so it appears in the top-level directory. + (lambda _ + (substitute* "doc/png/Makefile.in" + (("(\\$\\(infodir\\))/asymptote" _ infodir) infodir)) + (substitute* "doc/asymptote.texi" + (("asymptote/asymptote") "asymptote")))) + (add-before 'build 'patch-pdf-viewer + (lambda _ + ;; Default to a free pdf viewer. + (substitute* "settings.cc" + (("defaultPDFViewer=\"acroread\"") + "defaultPDFViewer=\"gv\"")))) + (add-before 'check 'set-HOME + ;; Some tests require write access to $HOME, otherwise leading to + ;; "failed to create directory /homeless-shelter/.asy" error. + (lambda _ + (setenv "HOME" "/tmp"))) + (add-after 'install 'install-Emacs-data + (lambda* (#:key outputs #:allow-other-keys) + ;; Install related Emacs libraries into an appropriate location. + (let ((lisp-dir + (string-append #$output "/share/emacs/site-lisp"))) + (for-each (cut install-file <> lisp-dir) + (find-files "." "\\.el$")) + (emacs-generate-autoloads #$name lisp-dir)))) + (add-after 'install-Emacs-data 'wrap-python-script + (lambda* (#:key inputs outputs #:allow-other-keys) + ;; Make sure 'xasy' runs with the correct PYTHONPATH. + (let ((path (getenv "GUIX_PYTHONPATH"))) + (wrap-program + (string-append #$output "/share/asymptote/GUI/xasy.py") + `("GUIX_PYTHONPATH" ":" prefix (,path))))))))) (home-page "http://asymptote.sourceforge.net") (synopsis "Script-based vector graphics language") (description -- cgit v1.2.3