Subject: bug#60826: closed (Re: [PATCH gnome-team v4 4/4] gnu: shared-mime-info: Add doc output.)

From: [email-masked] (GNU bug Tracking System)
Date: Sun, 25 Jun 2023 06:22:02 +0000

Your bug report

#60826: [PATCH staging] gnu: shared-mime-info: Update to 2.2.

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
60826: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=60826
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: [PATCH gnome-team v4 4/4] gnu: shared-mime-info: Add doc output.
From: Liliana Marie Prikler <[email-masked]>
To: Bruno Victal <[email-masked]>, [email-masked]
Date: Sun, 25 Jun 2023 08:21:00 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Am Donnerstag, dem 22.06.2023 um 21:56 +0200 schrieb Liliana Marie
Prikler:
> Am Donnerstag, dem 22.06.2023 um 20:33 +0100 schrieb Bruno Victal:
> > * gnu/packages/freedesktop.scm (shared-mime-info)
> > [arguments]<#:phases>: Add 'install-doc phase.
> > [outputs]: Add 'doc' output.
> > [native-inputs]: Add docbook-xml-4.1.2, docbook-xsl and xmlto.
> For the commit message, "Install documentation." is preferable.  The
> ChangeLog LGTM, for the implementation I'll wait for CI.
Pushed with some of the announced changes, though notably I forgot to
the headline of this commit.

Cheers

Subject: [PATCH staging] gnu: shared-mime-info: Update to 2.2.
From: Bruno Victal <[email-masked]>
To: [email-masked]
Cc: Bruno Victal <[email-masked]>
Date: Sun, 15 Jan 2023 02:32:50 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

* gnu/packages/gnome.scm (shared-mime-info): Update to 2.2.
[source]: Switch to git source.
[build-system]: Switch to meson.
[arguments]: Enable parallel builds. Patch source for docbook-xml.
[native-inputs]: Switch to new style. Add python, perl, xmlto,
docbook-xml-4.1.2 and docbook-xsl.
---
 gnu/packages/gnome.scm | 39 ++++++++++++++++++++++++++-------------
 1 file changed, 26 insertions(+), 13 deletions(-)

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 09b8056cc9..aedd1df17f 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -73,6 +73,7 @@
 ;;; Copyright © 2022 Rene Saavedra <[email-masked]>
 ;;; Copyright © 2022 Alexandros Theodotou <[email-masked]>
 ;;; Copyright © 2022 Arjan Adriaanse <[email-masked]>
+;;; Copyright © 2023 Bruno Victal <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -2920,26 +2921,38 @@ (define-public tango-icon-theme
 (define-public shared-mime-info
   (package
     (name "shared-mime-info")
-    (version "1.15")
+    (version "2.2")
     (source (origin
-             (method url-fetch)
-             (uri (string-append
-                   "https://gitlab.freedesktop.org/xdg/shared-mime-info/uploads/"
-                   "b27eb88e4155d8fccb8bb3cd12025d5b/shared-mime-info-" version
-                   ".tar.xz"))
+             (method git-fetch)
+             (uri (git-reference
+                   (url "https://gitlab.freedesktop.org/xdg/shared-mime-info.git")
+                   ;; XXX: needs to fetch submodule 'xdgmime' which is not independent
+                   (recursive? #t)
+                   (commit version)))
+             (file-name (git-file-name name version))
              (sha256
               (base32
-               "146vynj78wcwdq0ms52jzm1r4m6dzi1rhyh3h4xyb6bw8ckv10pl"))))
-    (build-system gnu-build-system)
+               "04dfnnflspprxg7qia3whz1754lfvgi4ihvmihg379936zy5xd22"))))
     (arguments
-     ;; The build system appears not to be parallel-safe.
-     '(#:parallel-build? #f))
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          ;; FIXME: xdgmime presence is required for building but
+          ;; it can also be built to provide additional tests.
+          (add-after 'unpack 'patch-docbook-xml
+            (lambda* (#:key inputs #:allow-other-keys)
+              ;; FIXME: xmlto fails to find docbook DTDs because
+              ;; there's no xmlcatalog available for docbook-4.1.2.
+              ;; Modify the man XML otherwise xmlto tries to access the network
+              (substitute* "data/shared-mime-info-spec.xml"
+                (("http://www.oasis-open.org/docbook/xml/4.1.2/")
+                 (string-append #$docbook-xml "/xml/dtd/docbook/"))))))))
+    (build-system meson-build-system)
     (inputs
      (list glib libxml2))
     (native-inputs
-     `(("gettext" ,gettext-minimal)
-       ("itstool" ,itstool)
-       ("pkg-config" ,pkg-config)))
+     (list gettext-minimal itstool pkg-config python perl xmlto
+           docbook-xml-4.1.2 docbook-xsl))
     (home-page "https://www.freedesktop.org/wiki/Software/shared-mime-info")
     (synopsis "Database of common MIME types")
     (description

base-commit: d9bcd1a8d6300b79f5884e48b2cefff05de8dce4
-- 
2.38.1