diff options
author | Ludovic Courtès <ludo@gnu.org> | 2015-07-12 23:09:44 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2015-07-12 23:10:43 +0200 |
commit | 98b385d15bbaa66785490337259577969cc355dc (patch) | |
tree | 62fe1a233aa74d09cdf25b3c43d86a2bd8b1566e /gnu/packages | |
parent | e662d6448138eaa275c8d25297cd494ad47c8426 (diff) | |
download | guix-patches-98b385d15bbaa66785490337259577969cc355dc.tar guix-patches-98b385d15bbaa66785490337259577969cc355dc.tar.gz |
gnu: Add 'libstdc++-doc'.
* gnu/packages/gcc.scm (make-libstdc++-doc): New procedure.
(libstdc++-doc-4.9, libstdc++-doc-5.1): New variables.
Diffstat (limited to 'gnu/packages')
-rw-r--r-- | gnu/packages/gcc.scm | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm index 39e99c1228..d2fe122f62 100644 --- a/gnu/packages/gcc.scm +++ b/gnu/packages/gcc.scm @@ -27,6 +27,10 @@ #:use-module (gnu packages compression) #:use-module (gnu packages multiprecision) #:use-module (gnu packages texinfo) + #:use-module (gnu packages doxygen) + #:use-module (gnu packages xml) + #:use-module (gnu packages docbook) + #:use-module (gnu packages graphviz) #:use-module (gnu packages elf) #:use-module (gnu packages perl) #:use-module (guix packages) @@ -548,6 +552,65 @@ using compilers other than GCC." (define-public gcc-objc++-4.8 (custom-gcc gcc-4.8 "gcc-objc++" '("obj-c++"))) +(define (make-libstdc++-doc gcc) + "Return a package with the libstdc++ documentation for GCC." + (package + (inherit gcc) + (name "libstdc++-doc") + (version (package-version gcc)) + (synopsis "GNU libstdc++ documentation") + (outputs '("out")) + (native-inputs `(("doxygen" ,doxygen) + ("texinfo" ,texinfo) + ("libxml2" ,libxml2) + ("libxslt" ,libxslt) + ("docbook-xml" ,docbook-xml) + ("docbook-xsl" ,docbook-xsl) + ("graphviz" ,graphviz))) ;for 'dot', invoked by 'doxygen' + (inputs '()) + (propagated-inputs '()) + (arguments + '(#:out-of-source? #t + #:tests? #f ;it's just documentation + #:phases (modify-phases %standard-phases + (add-before 'configure 'chdir + (lambda _ + (chdir "libstdc++-v3"))) + (add-before 'configure 'set-xsl-directory + (lambda* (#:key inputs #:allow-other-keys) + (let ((docbook (assoc-ref inputs "docbook-xsl"))) + (substitute* (find-files "doc" + "^Makefile\\.in$") + (("@XSL_STYLE_DIR@") + (string-append + docbook "/xml/xsl/" + (string-drop + docbook + (+ 34 + (string-length + (%store-directory)))))))))) + (replace 'build + (lambda _ + ;; XXX: There's also a 'doc-info' target, but it + ;; relies on docbook2X, which itself relies on + ;; DocBook 4.1.2, which is not really usable + ;; (lacks a catalog.xml.) + (zero? (system* "make" + "doc-html" + "doc-man")))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (zero? (system* "make" + "doc-install-html" + "doc-install-man")))))))))) + +(define-public libstdc++-doc-4.9 + (make-libstdc++-doc gcc-4.9)) + +(define-public libstdc++-doc-5.1 + (make-libstdc++-doc gcc-5.1)) + (define-public isl (package (name "isl") |