me
/
guix
Archived
1
0
Fork 0

gnu: libmodulemd: Fix build and use new style inputs and gexps.

* gnu/packages/rpm.scm (libmodulemd)
[arguments]: Use gexps.
[phases]{fix-glib-doc-prefix}: Use search-input-directory.
{fix-docbook-references}: Use search-input-file.
{move-documentation}: Use search-input-directory.
[native-inputs]: Use new style.  Add python.
[inputs]: Use new style.
Maxim Cournoyer 2022-08-02 14:58:39 -04:00
parent b316ddbd83
commit 5ee30cfa84
No known key found for this signature in database
GPG Key ID: 1260E46482E63562
1 changed files with 39 additions and 41 deletions

View File

@ -86,52 +86,50 @@ applying deltarpms, compatible with the original deltarpm packages.")
(build-system meson-build-system) (build-system meson-build-system)
(outputs '("out" "doc")) ;2.6 MiB of HTML documentation (outputs '("out" "doc")) ;2.6 MiB of HTML documentation
(arguments (arguments
`(#:configure-flags (list
(list (string-append "-Dgobject_overrides_dir_py3=" #:configure-flags
(python:site-packages %build-inputs %outputs))) #~(list (string-append "-Dgobject_overrides_dir_py3="
#:imported-modules (,@%meson-build-system-modules (python:site-packages %build-inputs %outputs)))
#:imported-modules `(,@%meson-build-system-modules
(guix build python-build-system)) (guix build python-build-system))
#:modules ((guix build meson-build-system) #:modules '((guix build meson-build-system)
((guix build python-build-system) #:prefix python:) ((guix build python-build-system) #:prefix python:)
(guix build utils)) (guix build utils))
#:phases #:phases
(modify-phases %standard-phases #~(modify-phases %standard-phases
(add-after 'unpack 'fix-glib-doc-prefix (add-after 'unpack 'fix-glib-doc-prefix
(lambda* (#:key inputs #:allow-other-keys) (lambda* (#:key native-inputs inputs #:allow-other-keys)
(let ((glib:doc (assoc-ref inputs "glib:doc"))) (substitute* "meson.build"
(substitute* "meson.build" (("glib_docpath = .*")
(("glib_docpath = .*") (format #f "glib_docpath = '~a'~%"
(format #f "glib_docpath = '~a'~%" (search-input-directory (or native-inputs inputs)
(string-append glib:doc "share/gtk-doc/html"))))))
"/share/gtk-doc/html"))))))) (add-after 'unpack 'fix-docbook-references
(add-after 'unpack 'fix-docbook-references ;; gtk-doc doesn't seem to honor DocBook 4.1.2's docbook.cat's
;; gtk-doc doesn't seem to honor DocBook 4.1.2's docbook.cat's ;; catalog file, even when adding it to XML_CATALOG_FILES. Work
;; catalog file, even when adding it to XML_CATALOG_FILES. Work ;; around it by adjusting the DocBook references directly.
;; around it by adjusting the DocBook references directly. (lambda* (#:key inputs #:allow-other-keys)
(lambda* (#:key inputs #:allow-other-keys) (substitute* "modulemd/modulemd-docs.xml"
(substitute* "modulemd/modulemd-docs.xml" (("http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd")
(("http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd") (search-input-file inputs "xml/dtd/docbook/docbookx.dtd")))))
(string-append (assoc-ref inputs "docbook-xml") (add-after 'install 'move-documentation
"/xml/dtd/docbook/docbookx.dtd"))))) (lambda* (#:key outputs #:allow-other-keys)
(add-after 'install 'move-documentation (let ((dst (string-append #$output:doc "/share/gtk-doc")))
(lambda* (#:key outputs #:allow-other-keys) (mkdir-p (dirname dst))
(let* ((out (assoc-ref outputs "out")) (rename-file (search-input-directory outputs "share/gtk-doc")
(doc (assoc-ref outputs "doc")) dst)))))))
(src (string-append out "/share/gtk-doc"))
(dst (string-append doc "/share/gtk-doc")))
(mkdir-p (dirname dst))
(rename-file src dst)))))))
(native-inputs (native-inputs
`(("docbook-xml" ,docbook-xml-4.1.2) (list docbook-xml-4.1.2
("glib:bin" ,glib "bin") `(,glib "bin")
("glib:doc" ,glib-with-documentation "doc") `(,glib-with-documentation "doc")
("gobject-introspection" ,gobject-introspection) ;for g-ir-scanner gobject-introspection ;for g-ir-scanner
("gtk-doc" ,gtk-doc) gtk-doc
("help2man" ,help2man) help2man
("pkg-config" ,pkg-config))) pkg-config
python)) ;for 'site-packages' call
(inputs (inputs
`(("gtk" ,gtk+) (list gtk+
("python-pygobject" ,python-pygobject))) python-pygobject))
(propagated-inputs (propagated-inputs
;; glib and gobject are listed as 'Requires' in modulemd-2.0.pc. ;; glib and gobject are listed as 'Requires' in modulemd-2.0.pc.
(list glib (list glib