From e4ba886dbc21e22556650552d55c8541e824c620 Mon Sep 17 00:00:00 2001 From: Raghav Gururajan Date: Tue, 21 Jul 2020 04:29:16 -0400 Subject: [PATCH 12/36] gnu: geocode-glib: Update package definition. * gnu/packages/gnome.scm (geocode-glib) [version]: Update to 3.26.2. [source][sha256]: Modify base32. [outputs]: New output "doc". [arguments]<#:glib-or-gtk?>: New argument. <#:configure-flags>[-D-Denable-installed-tests]: New flag. <#:phases>['patch-docbook-xml]: New phase. ['move-doc]: New phase. [native-inputs]: Add docbook-xml and python-wrapper. Remove json-glib. [inputs]: Add json-glib. [propagated-inputs]: Add glib-networking. --- gnu/packages/gnome.scm | 72 ++++++++++++++++++++++++++++-------------- 1 file changed, 48 insertions(+), 24 deletions(-) diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index 13d2db6b5e..fb526f3df5 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -5071,46 +5071,70 @@ possible.") (define-public geocode-glib (package (name "geocode-glib") - (version "3.26.1") - (source (origin - (method url-fetch) - (uri (string-append "mirror://gnome/sources/geocode-glib/" - (version-major+minor version) "/" - "geocode-glib-" version ".tar.xz")) - (sha256 - (base32 - "076ydfpyc4n5c9dbqmf26i4pilfi5jpw6cjcgrbgrjbndavnmajv")))) + (version "3.26.2") + (source + (origin + (method url-fetch) + (uri + (string-append "mirror://gnome/sources/geocode-glib/" + (version-major+minor version) "/" + "geocode-glib-" version ".tar.xz")) + (sha256 + (base32 "1l8g0f13xgkrk335afr9w8k46mziwb2jnyhl07jccl5yl37q9zh1")))) (build-system meson-build-system) + (outputs '("out" "doc")) (arguments - `(#:phases + `(#:glib-or-gtk? #t ; To wrap binaries and/or compile schemas + #:configure-flags + (list + "-Denable-installed-tests=false") + #:phases (modify-phases %standard-phases + (add-after 'unpack 'patch-docbook-xml + (lambda* (#:key inputs #:allow-other-keys) + (with-directory-excursion "docs" + (substitute* "geocode-glib-docs.xml" + (("http://www.oasis-open.org/docbook/xml/4.3/") + (string-append (assoc-ref inputs "docbook-xml") + "/xml/dtd/docbook/")))) + #t)) ;; The tests require a bunch of locales. (add-before 'check 'set-locales (lambda* (#:key inputs #:allow-other-keys) (setenv "GUIX_LOCPATH" (string-append (assoc-ref inputs "glibc-locales") "/lib/locale")) - #t))))) + #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 - ("glibc-locales" ,glibc-locales) ; for tests + `(("docbook-xml" ,docbook-xml-4.3) ("gettext" ,gettext-minimal) + ("glib:bin" ,glib "bin") + ("glibc-locales" ,glibc-locales) ("gobject-introspection" ,gobject-introspection) ("gtk-doc" ,gtk-doc) ("pkg-config" ,pkg-config) - ("json-glib" ,json-glib))) - (propagated-inputs - ;; geocode-glib-1.0.pc refers to GIO. - `(("glib" ,glib))) + ("python" ,python-wrapper))) (inputs - `(("libsoup" ,libsoup))) - (home-page "https://github.com/GNOME/geocode-glib/") + `(("json-glib" ,json-glib) + ("libsoup" ,libsoup))) + (propagated-inputs + `(("glib" ,glib) + ("glib-networking" ,glib-networking))) (synopsis "Geocoding and reverse-geocoding library") - (description - "geocode-glib is a convenience library for geocoding (finding longitude, -and latitude from an address) and reverse geocoding (finding an address from -coordinates) using the Nominatim service. geocode-glib caches requests for -faster results and to avoid unnecessary server load.") + (description "Geocode-Glib is a convenience library for geocoding (finding +longitude, and latitude from an address) and reverse geocoding (finding an +address from coordinates) using the Nominatim service. It also caches requests +for faster results and to avoid unnecessary server load.") + (home-page "https://developer.gnome.org/geocode-glib/") (license license:lgpl2.0+))) (define-public upower -- 2.27.0