me
/
guix
Archived
1
0
Fork 0

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.
master
Nicolas Goaziou 2019-04-28 21:31:08 +02:00
parent 0e09c099cb
commit 9f73ac242c
No known key found for this signature in database
GPG Key ID: DA00B4F048E92F2D
1 changed files with 21 additions and 24 deletions

View File

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