guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/03: gnu: giac-xcas: Fix documentation.


From: guix-commits
Subject: 01/03: gnu: giac-xcas: Fix documentation.
Date: Sun, 28 Apr 2019 15:43:13 -0400 (EDT)

ngz pushed a commit to branch master
in repository guix.

commit 9f73ac242c1e6c40498b6778a1c10a10881b93b2
Author: Nicolas Goaziou <address@hidden>
Date:   Sun Apr 28 21:31:08 2019 +0200

    gnu: giac-xcas: Fix documentation.
    
    * gnu/packages/algebra.scm (giac-xcas): Use a single output.  Fix licensing
      issues in documentation.
    
    Xcas expects documentation to be located at a fixed location, not compatible
    with a "doc" output.
---
 gnu/packages/algebra.scm | 45 +++++++++++++++++++++------------------------
 1 file changed, 21 insertions(+), 24 deletions(-)

diff --git a/gnu/packages/algebra.scm b/gnu/packages/algebra.scm
index ba1c12d..93dc756 100644
--- a/gnu/packages/algebra.scm
+++ b/gnu/packages/algebra.scm
@@ -263,7 +263,6 @@ precision.")
                (base32
                 "0f4pkand9vmqfayw18jm5qxbhcwi1405qfd7ibzh9lwzz6amkm3l"))))
     (build-system gnu-build-system)
-    (outputs '("out" "doc"))            ;77MiB of documentation
     (arguments
      `(#:modules ((ice-9 ftw)
                   (guix build utils)
@@ -282,28 +281,25 @@ precision.")
              (substitute* "check/Makefile.in"
                (("chk_fhan11") ""))
              #t))
-         (add-after 'install 'install-doc
-           ;; Setting --docdir to "doc" output isn't sufficient as
-           ;; documentation and examples are scattered throughout the source.
+         (add-after 'install 'fix-doc
            (lambda* (#:key outputs #:allow-other-keys)
-             (let* ((out (assoc-ref outputs "out"))
-                    (doc (assoc-ref outputs "doc"))
-                    (docdir (string-append doc
-                                           "/share/doc/"
-                                           (string-append ,name "-" 
,version))))
-               ;; For some reason, the install process moves
-               ;; "share/giac/examples" instead of "share/giac/doc" to
-               ;; "$(docdir)".  Clean up the mess and start over.
-               (delete-file-recursively (string-append doc "/share"))
-               (mkdir-p docdir)
-               (with-directory-excursion out
-                 (for-each (lambda (f)
-                             (unless (member f '("." ".."))
-                               (copy-recursively (string-append "share/giac/" 
f)
-                                                 (string-append docdir "/" 
f))))
-                           (scandir "share/giac"))
-                 (delete-file-recursively "share/giac")))
-             #t)))))
+             (let ((out (assoc-ref outputs "out")))
+               ;; Most French documentation has a non-commercial
+               ;; license, so we need to remove it.
+               (with-directory-excursion (string-append out 
"/share/giac/doc/fr")
+                 (for-each delete-file-recursively
+                           '("cascas" "casexo" "casgeo" "casrouge" "cassim"
+                             "castor")))
+               ;; Remove duplicate documentation in
+               ;; "%out/share/doc/giac/", where Xcas does not expect
+               ;; to find it.
+               (delete-file-recursively (string-append out "/share/doc/giac"))
+               #t)))
+         (add-after 'install 'remove-unnecessary-executable
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (delete-file (string-append out "/bin/xcasnew"))
+               #t))))))
     (inputs
      `(("fltk" ,fltk)
        ("gmp" ,gmp)
@@ -322,9 +318,10 @@ precision.")
        ("ntl" ,ntl)
        ("perl" ,perl)
        ("pari-gp" ,pari-gp)
-       ("tcsh" ,tcsh)
+       ("tcsh" ,tcsh)))
+    (native-inputs
+     `(("readline" ,readline)
        ("texlive" ,texlive-tiny)))
-    (native-inputs `(("readline" ,readline)))
     (home-page "https://www-fourier.ujf-grenoble.fr/~parisse/giac.html";)
     (synopsis "Computer algebra system")
     (description



reply via email to

[Prev in Thread] Current Thread [Next in Thread]