mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 15:36:20 -05:00
gnu: json-glib: Don't build gtk documentation when cross-compiling.
* gnu/packages/gnome.scm (json-glib)[arguments]<#:configue-flags>: Set gtk_doc=disables when cross-compiling. (json-glib)[arguments]<#:phases>{move-docs}: Don't run when cross-compiling ... (json-glib)[arguments]<#:phases>{stub-docs}: ... instead, create an empty directory where the documentation would be.
This commit is contained in:
parent
d0cf033661
commit
b67ea49e2c
1 changed files with 21 additions and 10 deletions
|
@ -4595,7 +4595,12 @@ (define-public json-glib
|
||||||
#:configure-flags
|
#:configure-flags
|
||||||
(list
|
(list
|
||||||
"-Ddocs=true"
|
"-Ddocs=true"
|
||||||
"-Dman=true")
|
"-Dman=true"
|
||||||
|
,@(if (%current-target-system)
|
||||||
|
;; If enabled, gtkdoc-scangobj will try to execute a
|
||||||
|
;; cross-compiled binary.
|
||||||
|
'("-Dgtk_doc=disabled")
|
||||||
|
'()))
|
||||||
#:phases
|
#:phases
|
||||||
(modify-phases %standard-phases
|
(modify-phases %standard-phases
|
||||||
(add-after 'unpack 'patch-docbook
|
(add-after 'unpack 'patch-docbook
|
||||||
|
@ -4619,15 +4624,21 @@ (define-public json-glib
|
||||||
'inputs) "docbook-xsl")
|
'inputs) "docbook-xsl")
|
||||||
"/xml/xsl/docbook-xsl-1.79.2/"))))
|
"/xml/xsl/docbook-xsl-1.79.2/"))))
|
||||||
#t))
|
#t))
|
||||||
(add-after 'install 'move-docs
|
;; When cross-compiling, there are no docs to move.
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
,(if (%current-target-system)
|
||||||
(let* ((out (assoc-ref outputs "out"))
|
'(add-after 'install 'stub-docs
|
||||||
(doc (assoc-ref outputs "doc")))
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
(mkdir-p (string-append doc "/share"))
|
;; The daemon doesn't like empty output paths.
|
||||||
(rename-file
|
(mkdir (assoc-ref outputs "doc"))))
|
||||||
(string-append out "/share/gtk-doc")
|
'(add-after 'install 'move-docs
|
||||||
(string-append doc "/share/gtk-doc"))
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
#t))))))
|
(let* ((out (assoc-ref outputs "out"))
|
||||||
|
(doc (assoc-ref outputs "doc")))
|
||||||
|
(mkdir-p (string-append doc "/share"))
|
||||||
|
(rename-file
|
||||||
|
(string-append out "/share/gtk-doc")
|
||||||
|
(string-append doc "/share/gtk-doc"))
|
||||||
|
#t)))))))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
`(("docbook-xml" ,docbook-xml-4.3)
|
`(("docbook-xml" ,docbook-xml-4.3)
|
||||||
("docbook-xsl" ,docbook-xsl)
|
("docbook-xsl" ,docbook-xsl)
|
||||||
|
|
Loading…
Reference in a new issue