guix-commits
[Top][All Lists]
Advanced

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

206/295: gnu: json-glib: Update package definition.


From: guix-commits
Subject: 206/295: gnu: json-glib: Update package definition.
Date: Mon, 27 Jul 2020 06:26:12 -0400 (EDT)

dannym pushed a commit to branch wip-desktop
in repository guix.

commit 42cdba806f6dac9cb6b2f5b72a9f77a4463eee4d
Author: Raghav Gururajan <raghavgururajan@disroot.org>
AuthorDate: Wed Jul 8 13:44:36 2020 -0400

    gnu: json-glib: Update package definition.
    
    * gnu/packages/gnome.scm (json-glib): Update package definition.
    [outputs]: New output "doc".
    [arguments]<#:glib-or-gtk?>: New argument.
    <#:configure-flags>[-Ddocs]: New flag.
    [-Dman]: New flag.
    <#:phases>['patch-docbook]: New phase.
    ['move-doc]: New phase.
    [native-inputs]: Add docbook-xml, docbook-xsl, gtk-doc and libxslt.
    [synopsis]: Modify.
    [description]: Modify.
    
    Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
---
 gnu/packages/gnome.scm | 71 ++++++++++++++++++++++++++++++++++++--------------
 1 file changed, 52 insertions(+), 19 deletions(-)

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index a739225..f0982b2 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -3943,30 +3943,63 @@ configuration storage systems.")
   (package
     (name "json-glib")
     (version "1.4.4")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "mirror://gnome/sources/" name "/"
-                                  (version-major+minor version) "/"
-                                  name "-" version ".tar.xz"))
-              (sha256
-               (base32
-                "0ixwyis47v5bkx6h8a1iqlw3638cxcv57ivxv4gw2gaig51my33j"))))
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        (string-append "mirror://gnome/sources/" name "/"
+                       (version-major+minor version) "/"
+                       name "-" version ".tar.xz"))
+       (sha256
+        (base32 "0ixwyis47v5bkx6h8a1iqlw3638cxcv57ivxv4gw2gaig51my33j"))))
     (build-system meson-build-system)
+    (outputs '("out" "doc"))
+    (arguments
+     `(#:glib-or-gtk? #t     ; To wrap binaries and/or compile schemas
+       #:configure-flags
+       (list
+        "-Ddocs=true"
+        "-Dman=true")
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-docbook
+           (lambda* (#:key inputs #:allow-other-keys)
+             (with-directory-excursion "doc"
+               (substitute* "json-glib-docs.xml"
+                 (("http://www.oasis-open.org/docbook/xml/4.3/";)
+                  (string-append (assoc-ref inputs "docbook-xml")
+                                 "/xml/dtd/docbook/")))
+               (substitute* "meson.build"
+                 (("http://docbook.sourceforge.net/release/xsl/current/";)
+                  (string-append (assoc-ref inputs "docbook-xsl")
+                                 "/xml/xsl/docbook-xsl-1.79.1/"))))
+             #t))
+         (add-after 'install 'move-docs
+           (lambda* (#:key outputs #:allow-other-keys)
+             (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
-     `(("gettext" ,gettext-minimal)
-       ("glib" ,glib "bin")              ;for glib-mkenums and glib-genmarshal
+     `(("docbook-xml" ,docbook-xml-4.3)
+       ("docbook-xsl" ,docbook-xsl)
+       ("gettext" ,gettext-minimal)
+       ("glib" ,glib "bin")
        ("gobject-introspection" ,gobject-introspection)
-       ("pkg-config" ,pkg-config)))
+       ("gtk-doc" ,gtk-doc)
+       ("pkg-config" ,pkg-config)
+       ("xsltproc" ,libxslt)))
     (propagated-inputs
-     `(("glib" ,glib)))                         ;according to json-glib-1.0.pc
-    (home-page "https://wiki.gnome.org/Projects/JsonGlib";)
-    (synopsis "Compiler for the GObject type system")
-    (description
-     "JSON-GLib is a C library based on GLib providing serialization and
+     `(("glib" ,glib)))
+    (synopsis "Glib and GObject implementation of JSON")
+    (description "JSON-GLib is a library providing serialization and
 deserialization support for the JavaScript Object Notation (JSON) format
-described by RFC 4627.  It provides parser and generator GObject classes and
-various wrappers for the complex data types employed by JSON, such as arrays
-and objects.")
+described by RFC 4627.  It implements a full JSON parser and generator using
+GLib and GObject, and integrates JSON with GLib data types.")
+    (home-page "https://wiki.gnome.org/Projects/JsonGlib";)
     (license license:lgpl2.1+)))
 
 (define-public libxklavier



reply via email to

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