guix-commits
[Top][All Lists]
Advanced

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

205/334: gnu: libgweather: Update package definition.


From: guix-commits
Subject: 205/334: gnu: libgweather: Update package definition.
Date: Sat, 15 Aug 2020 16:27:08 -0400 (EDT)

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

commit 867cd67ab92a7f240c80652bb8a47e0dfcd5acb7
Author: Raghav Gururajan <raghavgururajan@disroot.org>
AuthorDate: Sun Jul 26 07:04:25 2020 -0400

    gnu: libgweather: Update package definition.
    
    * gnu/packages/gnome.scm (libgweather) [version]: Update to 3.36.1.
    [source]<origin>[sha256]: Modify base32.
    [outputs]: New output "doc".
    [arguments]<#:glib-or-gtk?>: New argument.
    <#:configure-flags>[-Dowm_apikey=]: New flag.
    [-Dgtk_doc]: New flag.
    <#:phases>['patch-docbook-xml]: New phase.
    ['move-doc]: New phase.
    [native-inputs]: Add docbook-xml and gtk-doc.
    [inputs]: Add glade.
    [propagated-inputs]: Add glib and glib-networking. Remove gdk-pixbuf.
    [synopsis]: Modify.
    [description]: Modify.
    [home-page]: Modify.
    
    Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
---
 gnu/packages/gnome.scm | 91 ++++++++++++++++++++++++++++++++++----------------
 1 file changed, 62 insertions(+), 29 deletions(-)

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 8b43970..4875867 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -5443,43 +5443,76 @@ service via the system message bus.")
 (define-public libgweather
   (package
     (name "libgweather")
-    (version "3.34.0")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "mirror://gnome/sources/" name "/"
-                                  (version-major+minor version) "/"
-                                  name "-" version ".tar.xz"))
-              (sha256
-               (base32
-                "1fgiqswkhiaijanml3mb16ajn5aanrk7x6yiwagp9n9rssam6902"))))
+    (version "3.36.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        (string-append "mirror://gnome/sources/" name "/"
+                       (version-major+minor version) "/"
+                       name "-" version ".tar.xz"))
+       (sha256
+        (base32 "0l74hc02rvzm4p530y539a67jwb080fqdaazdl8j0fr3xvq0j9yy"))))
     (build-system meson-build-system)
+    (outputs '("out" "doc"))
     (arguments
-     `(#:tests? #f ; one of two tests requires network access
+     `(#:glib-or-gtk? #t     ; To wrap binaries and/or compile schemas
+       #:tests? #f           ; Tests require networking
        #:configure-flags
-       `(,(string-append "-Dzoneinfo_dir="
-                         (assoc-ref %build-inputs "tzdata")
-                         "/share/zoneinfo"))))
+       (list
+        (string-append "-Dzoneinfo_dir="
+                       (assoc-ref %build-inputs "tzdata")
+                       "/share/zoneinfo")
+        ;; NOTE: This is the API-Key for OpenWeatherMaps.
+        ;; It has been generated from my OWM account.
+        ;; Currently, the account subscription is on "Free Plan".
+        ;; It provides 3 hour forecast for 5 days.
+        ;; It allows 60 calls/minute and 1,000,000 calls/month.
+        ;; Feel free to use it.
+        ;; Raghav (RG) Gururajan <raghavgururajan@disroot.org>
+        "-Dowm_apikey=9c052a3406aa129d5261cfb999104cb7"
+        "-Dgtk_doc=true")
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-docbook-xml
+           (lambda* (#:key inputs #:allow-other-keys)
+             (with-directory-excursion "doc"
+               (substitute* "libgweather-docs.xml"
+                 (("http://www.oasis-open.org/docbook/xml/4.3/";)
+                  (string-append (assoc-ref inputs "docbook-xml")
+                                 "/xml/dtd/docbook/"))))
+             #t))
+         (add-after 'install 'move-doc
+           (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
-     `(("glib:bin" ,glib "bin") ; for glib-mkenums
+     `(("docbook-xml" ,docbook-xml-4.3)
+       ("glib:bin" ,glib "bin")
        ("gobject-introspection" ,gobject-introspection)
+       ("gtk-doc" ,gtk-doc)
+       ("intltool" ,intltool)
        ("pkg-config" ,pkg-config)
-       ("vala" ,vala)
-       ("intltool" ,intltool)))
+       ("vala" ,vala)))
+    (inputs
+     `(("glade" ,glade)
+       ("tzdata" ,tzdata)))
     (propagated-inputs
-     ;; gweather-3.0.pc refers to GTK+, GDK-Pixbuf, GLib/GObject, libxml, and
-     ;; libsoup.
-     `(("gtk+" ,gtk+)
-       ("gdk-pixbuf" ,gdk-pixbuf)
-       ("libxml2" ,libxml2)
+     `(("glib" ,glib)
+       ("glib-networking" ,glib-networking)
+       ("geocode-glib" ,geocode-glib)
+       ("gtk+" ,gtk+)
        ("libsoup" ,libsoup)
-       ("geocode-glib" ,geocode-glib)))
-    (inputs
-     `(("tzdata" ,tzdata)))
-    (home-page "https://wiki.gnome.org/action/show/Projects/LibGWeather";)
-    (synopsis "Location, time zone, and weather library for GNOME")
-    (description
-     "libgweather is a library to access weather information from online
-services for numerous locations.")
+       ("libxml2" ,libxml2)))
+    (synopsis "Weather information library and database")
+    (description "LibGWeather is a library to access weather information from
+online services for numerous locations.")
+    (home-page "https://wiki.gnome.org/Projects/LibGWeather";)
     (license license:gpl2+)))
 
 (define-public gnome-settings-daemon



reply via email to

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