guix-commits
[Top][All Lists]
Advanced

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

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


From: guix-commits
Subject: 03/07: gnu: libmodulemd: Fix build and use new style inputs and gexps.
Date: Tue, 2 Aug 2022 15:11:40 -0400 (EDT)

apteryx pushed a commit to branch master
in repository guix.

commit 5ee30cfa84a7d66cab5803c334e81579f6797200
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Tue Aug 2 14:58:39 2022 -0400

    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.
---
 gnu/packages/rpm.scm | 80 +++++++++++++++++++++++++---------------------------
 1 file changed, 39 insertions(+), 41 deletions(-)

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



reply via email to

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