* [bug#60826] [PATCH staging] gnu: shared-mime-info: Update to 2.2.
2023-01-15 2:32 [bug#60826] [PATCH staging] gnu: shared-mime-info: Update to 2.2 Bruno Victal
@ 2023-03-22 0:52 ` Maxim Cournoyer
2023-06-17 1:26 ` [bug#60826] [PATCH v2] " Bruno Victal
` (9 subsequent siblings)
10 siblings, 0 replies; 19+ messages in thread
From: Maxim Cournoyer @ 2023-03-22 0:52 UTC (permalink / raw)
To: Bruno Victal; +Cc: 60826
Hi!
Bruno Victal <mirai@makinata.eu> writes:
> * 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 <nanuui@protonmail.com>
> ;;; Copyright © 2022 Alexandros Theodotou <alex@zrythm.org>
> ;;; Copyright © 2022 Arjan Adriaanse <arjan@adriaan.se>
> +;;; Copyright © 2023 Bruno Victal <mirai@makinata.eu>
> ;;;
> ;;; 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
What do you mean by "not independent"; do you mean that it's been
patched/customized by this project?
> + (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.
Sorry, but I don't understand; could you try rephrase that comment? :-)
> + (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
The last sentence of the comment misses a period.
> + (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
--
Thanks,
Maxim
^ permalink raw reply [flat|nested] 19+ messages in thread
* [bug#60826] [PATCH v2] gnu: shared-mime-info: Update to 2.2.
2023-01-15 2:32 [bug#60826] [PATCH staging] gnu: shared-mime-info: Update to 2.2 Bruno Victal
2023-03-22 0:52 ` Maxim Cournoyer
@ 2023-06-17 1:26 ` Bruno Victal
2023-06-17 4:40 ` Liliana Marie Prikler
2023-06-19 22:07 ` [bug#60826] [PATCH gnome-team v3 1/5] gnu: shared-mime-info: Move to (gnu packages freedesktop) Bruno Victal
` (8 subsequent siblings)
10 siblings, 1 reply; 19+ messages in thread
From: Bruno Victal @ 2023-06-17 1:26 UTC (permalink / raw)
To: 60826; +Cc: Bruno Victal, liliana.prikler
* gnu/packages/gnome.scm (shared-mime-info): Update to 2.2.
[source]: Switch to git source. Patch xdgmime location.
[build-system]: Switch to meson.
[arguments]: Enable parallel builds. Do not patch test files.
[native-inputs]: Switch to new style. Add python, xmlto,
docbook-xml-4.1.2 and docbook-xsl.
(xdgmime): New variable.
---
Notable changes since v1:
* Rebased against gnome-team.
(this package should probably be relocated to freedesktop.scm instead)
* Refactored package definition. (the testsuite now works!)
* Removed nonsense comments present in v1. (leftovers from squashing?)
gnu/packages/gnome.scm | 92 ++++++++++++++++++++++++++++++++++++------
1 file changed, 79 insertions(+), 13 deletions(-)
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 6db2d6569e..58d0e25c1d 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -73,6 +73,7 @@
;;; Copyright © 2022 Rene Saavedra <nanuui@protonmail.com>
;;; Copyright © 2022 Alexandros Theodotou <alex@zrythm.org>
;;; Copyright © 2022 Arjan Adriaanse <arjan@adriaan.se>
+;;; Copyright © 2023 Bruno Victal <mirai@makinata.eu>
;;; Copyright © 2023 Kaelyn Takata <kaelyn.alexi@protonmail.com>
;;; Copyright © 2023 Juliana Sims <juli@incana.org>
;;; Copyright © 2023 Dominik Delgado Steuter <d@delgado.nrw>
@@ -2913,29 +2914,94 @@ (define-public tango-icon-theme
guidelines.")
(license license:public-domain)))
+;; Private package used by shared-mime-info.
+(define xdgmime
+ ;; No public release, match commit to the one used in the
+ ;; shared-mime-info release.
+ (let ((commit "de283fc430460b9b3a7e61432a6d273cd64cb102")
+ (revision "1"))
+ (package
+ (name "xdgmime")
+ ;; set version to 0.0 and change commit instead
+ (version (git-version "0.0" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://gitlab.freedesktop.org/xdg/xdgmime.git")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0m9k7nfxgchb9j0xh9cwsldz6564qisqdkvlhgkcgc0grd4nfbn9"))
+ (modules '((guix build utils)))
+ (snippet
+ #~(substitute* "src/Makefile"
+ (("all: (.+)$" all targets)
+ (format #f "~a
+install: ~a
+~/install -Dm755 -t $(DESTDIR)/bin $^~%" all targets))))))
+ (arguments
+ (list
+ #:tests? #f ; no tests
+ #:make-flags #~(list (string-append "DESTDIR=" #$output)
+ #$(string-append "CC=" (cc-for-target)))
+ #:phases
+ #~(modify-phases %standard-phases
+ ;; Package uses a hand-crafted Makefile.
+ (delete 'configure)
+ ;; Use the patched install rule in src/Makefile.
+ (add-before 'install 'change-directory
+ (lambda _
+ (chdir "src"))))))
+ (build-system gnu-build-system)
+ (home-page "https://gitlab.freedesktop.org/xdg/xdgmime/")
+ (synopsis "Module that parses the freedesktop.org MIME spec")
+ (description "This module is used for shared-mime-info package tests.")
+ (license (list license:lgpl2.1+ license:artistic2.0)))))
+
(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")
+ (commit version)))
+ (file-name (git-file-name name version))
(sha256
(base32
- "146vynj78wcwdq0ms52jzm1r4m6dzi1rhyh3h4xyb6bw8ckv10pl"))))
- (build-system gnu-build-system)
+ "04dfnnflspprxg7qia3whz1754lfvgi4ihvmihg379936zy5xd22"))
+ (modules '((guix build utils)))
+ ;; Override the suffix assumed by meson.build.
+ (snippet
+ #~(substitute* "meson.build"
+ (("^(xdgmime = get_option\\('xdgmime-path'\\)) / 'src'"
+ _ stem)
+ stem)))))
(arguments
- ;; The build system appears not to be parallel-safe.
- '(#:parallel-build? #f))
+ (list
+ #:configure-flags
+ #~(list (string-append "-Dxdgmime-path="
+ #$(this-package-native-input "xdgmime")
+ "/bin"))
+ #:phases
+ #~(modify-phases %standard-phases
+ ;; Don't patch shebangs for the test files.
+ (replace 'patch-source-shebangs
+ (lambda* (#:key source #:allow-other-keys)
+ (let ((pred (lambda (file stat)
+ (and (eq? 'regular (stat:type stat))
+ (not (string-prefix? "./tests/mime-detection"
+ file))))))
+ (for-each patch-shebang
+ (find-files "." pred #:stat lstat))))))))
+ (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 xmlto
+ docbook-xml-4.1.2 docbook-xsl xdgmime))
(home-page "https://www.freedesktop.org/wiki/Software/shared-mime-info")
(synopsis "Database of common MIME types")
(description
base-commit: 909788c0aebd8098084c009afa98d1209c9ec869
--
2.39.2
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [bug#60826] [PATCH v2] gnu: shared-mime-info: Update to 2.2.
2023-06-17 1:26 ` [bug#60826] [PATCH v2] " Bruno Victal
@ 2023-06-17 4:40 ` Liliana Marie Prikler
0 siblings, 0 replies; 19+ messages in thread
From: Liliana Marie Prikler @ 2023-06-17 4:40 UTC (permalink / raw)
To: Bruno Victal, 60826
Am Samstag, dem 17.06.2023 um 02:26 +0100 schrieb Bruno Victal:
> * gnu/packages/gnome.scm (shared-mime-info): Update to 2.2.
> [source]: Switch to git source. Patch xdgmime location.
> [build-system]: Switch to meson.
> [arguments]: Enable parallel builds. Do not patch test files.
> [native-inputs]: Switch to new style. Add python, xmlto,
> docbook-xml-4.1.2 and docbook-xsl.
> (xdgmime): New variable.
This variable should be added in a patch 1/3.
> ---
> Notable changes since v1:
> * Rebased against gnome-team.
> (this package should probably be relocated to freedesktop.scm
> instead)
Can you do this relocation in a patch 3/3? We ought to have the
resources to do this change on the gnome-team branch.
> * Refactored package definition. (the testsuite now works!)
> * Removed nonsense comments present in v1. (leftovers from
> squashing?)
>
> gnu/packages/gnome.scm | 92 ++++++++++++++++++++++++++++++++++++----
> --
> 1 file changed, 79 insertions(+), 13 deletions(-)
>
> diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
> index 6db2d6569e..58d0e25c1d 100644
> --- a/gnu/packages/gnome.scm
> +++ b/gnu/packages/gnome.scm
> @@ -73,6 +73,7 @@
> ;;; Copyright © 2022 Rene Saavedra <nanuui@protonmail.com>
> ;;; Copyright © 2022 Alexandros Theodotou <alex@zrythm.org>
> ;;; Copyright © 2022 Arjan Adriaanse <arjan@adriaan.se>
> +;;; Copyright © 2023 Bruno Victal <mirai@makinata.eu>
> ;;; Copyright © 2023 Kaelyn Takata <kaelyn.alexi@protonmail.com>
> ;;; Copyright © 2023 Juliana Sims <juli@incana.org>
> ;;; Copyright © 2023 Dominik Delgado Steuter <d@delgado.nrw>
> @@ -2913,29 +2914,94 @@ (define-public tango-icon-theme
> guidelines.")
> (license license:public-domain)))
>
> +;; Private package used by shared-mime-info.
> +(define xdgmime
> + ;; No public release, match commit to the one used in the
> + ;; shared-mime-info release.
> + (let ((commit "de283fc430460b9b3a7e61432a6d273cd64cb102")
> + (revision "1"))
> + (package
> + (name "xdgmime")
> + ;; set version to 0.0 and change commit instead
> + (version (git-version "0.0" revision commit))
> + (source (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url
> "https://gitlab.freedesktop.org/xdg/xdgmime.git")
> + (commit commit)))
> + (file-name (git-file-name name version))
> + (sha256
> + (base32
> +
> "0m9k7nfxgchb9j0xh9cwsldz6564qisqdkvlhgkcgc0grd4nfbn9"))
> + (modules '((guix build utils)))
> + (snippet
> + #~(substitute* "src/Makefile"
> + (("all: (.+)$" all targets)
> + (format #f "~a
> +install: ~a
> +~/install -Dm755 -t $(DESTDIR)/bin $^~%" all targets))))))
Why not just use a custom install phase?
> + (arguments
> + (list
> + #:tests? #f ; no tests
> + #:make-flags #~(list (string-append "DESTDIR=" #$output)
> + #$(string-append "CC=" (cc-for-
> target)))
> + #:phases
> + #~(modify-phases %standard-phases
> + ;; Package uses a hand-crafted Makefile.
> + (delete 'configure)
> + ;; Use the patched install rule in src/Makefile.
> + (add-before 'install 'change-directory
> + (lambda _
> + (chdir "src"))))))
> + (build-system gnu-build-system)
> + (home-page "https://gitlab.freedesktop.org/xdg/xdgmime/")
> + (synopsis "Module that parses the freedesktop.org MIME spec")
> + (description "This module is used for shared-mime-info package
> tests.")
> + (license (list license:lgpl2.1+ license:artistic2.0)))))
> +
> (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")
> + (commit version)))
> + (file-name (git-file-name name version))
> (sha256
> (base32
> -
> "146vynj78wcwdq0ms52jzm1r4m6dzi1rhyh3h4xyb6bw8ckv10pl"))))
> - (build-system gnu-build-system)
> +
> "04dfnnflspprxg7qia3whz1754lfvgi4ihvmihg379936zy5xd22"))
> + (modules '((guix build utils)))
> + ;; Override the suffix assumed by meson.build.
> + (snippet
> + #~(substitute* "meson.build"
> + (("^(xdgmime = get_option\\('xdgmime-path'\\)) /
> 'src'"
> + _ stem)
> + stem)))))
Given that you also have to fix stuff in a phase, I think it'd be
better to use a patch that allows users to specify an xdgmime-bin.
WDYT?
> (arguments
> - ;; The build system appears not to be parallel-safe.
> - '(#:parallel-build? #f))
> + (list
> + #:configure-flags
> + #~(list (string-append "-Dxdgmime-path="
> + #$(this-package-native-input "xdgmime")
> + "/bin"))
> + #:phases
> + #~(modify-phases %standard-phases
> + ;; Don't patch shebangs for the test files.
> + (replace 'patch-source-shebangs
> + (lambda* (#:key source #:allow-other-keys)
> + (let ((pred (lambda (file stat)
> + (and (eq? 'regular (stat:type stat))
> + (not (string-prefix? "./tests/mime-
> detection"
> + file))))))
> + (for-each patch-shebang
> + (find-files "." pred #:stat lstat))))))))
> + (build-system meson-build-system)
Build-system normally goes before arguments.
> (inputs
> (list glib libxml2))
> (native-inputs
> - `(("gettext" ,gettext-minimal)
> - ("itstool" ,itstool)
> - ("pkg-config" ,pkg-config)))
> + (list gettext-minimal itstool pkg-config python xmlto
> + docbook-xml-4.1.2 docbook-xsl xdgmime))
> (home-page
> "https://www.freedesktop.org/wiki/Software/shared-mime-info")
> (synopsis "Database of common MIME types")
> (description
>
> base-commit: 909788c0aebd8098084c009afa98d1209c9ec869
Cheers
^ permalink raw reply [flat|nested] 19+ messages in thread
* [bug#60826] [PATCH gnome-team v3 1/5] gnu: shared-mime-info: Move to (gnu packages freedesktop).
2023-01-15 2:32 [bug#60826] [PATCH staging] gnu: shared-mime-info: Update to 2.2 Bruno Victal
2023-03-22 0:52 ` Maxim Cournoyer
2023-06-17 1:26 ` [bug#60826] [PATCH v2] " Bruno Victal
@ 2023-06-19 22:07 ` Bruno Victal
2023-06-19 22:07 ` [bug#60826] [PATCH gnome-team v3 2/5] build: gnu: Export a %gnu-default-modules variable Bruno Victal
` (7 subsequent siblings)
10 siblings, 0 replies; 19+ messages in thread
From: Bruno Victal @ 2023-06-19 22:07 UTC (permalink / raw)
To: 60826; +Cc: Bruno Victal, liliana.prikler
* gnu/packages/gnome.scm (shared-mime-info): Move to …
* gnu/packages/freedesktop.scm: … here.
* gnu/packages/gnuzilla.scm: Use (gnu packages freedesktop).
* gnu/packages/kde-games.scm: Ditto.
* gnu/packages/kde-multimedia.scm: Ditto.
* gnu/packages/kde-pim.scm: Ditto.
* gnu/packages/kde-utils.scm: Ditto.
* gnu/packages/maths.scm: Ditto.
* gnu/packages/mp3.scm: Ditto.
* gnu/packages/ruby.scm: Ditto.
* guix/profiles.scm (xdg-mime-database): Adjust to new location.
---
Notable changes since v2:
* Relocated shared-mime-info to (gnu packages freedesktop).
* Prefer .patch over substitution*.
* Adds a 'doc' output for shared-mime-info.
* Adds a %gnu-default-modules variable.
Important Notes:
* gdk-pixbuf fails to build with an updated shared-mime-info, this
needs to be investigated & fixed.
gnu/packages/freedesktop.scm | 33 +++++++++++++++++++++++++++++++++
gnu/packages/gnome.scm | 33 ---------------------------------
gnu/packages/gnuzilla.scm | 1 +
gnu/packages/kde-games.scm | 2 +-
gnu/packages/kde-multimedia.scm | 1 +
gnu/packages/kde-pim.scm | 1 +
gnu/packages/kde-utils.scm | 1 +
gnu/packages/maths.scm | 1 +
gnu/packages/mp3.scm | 1 +
gnu/packages/ruby.scm | 1 +
guix/profiles.scm | 2 +-
11 files changed, 42 insertions(+), 35 deletions(-)
diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index 6385741d89..bd3df9ee68 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -465,6 +465,39 @@ (define-public maliit-keyboard
display servers. It supports many different languages and emoji.")
(license license:gpl3+)))
+(define-public shared-mime-info
+ (package
+ (name "shared-mime-info")
+ (version "1.15")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://gitlab.freedesktop.org/xdg/shared-mime-info/uploads/"
+ "b27eb88e4155d8fccb8bb3cd12025d5b/shared-mime-info-" version
+ ".tar.xz"))
+ (sha256
+ (base32
+ "146vynj78wcwdq0ms52jzm1r4m6dzi1rhyh3h4xyb6bw8ckv10pl"))))
+ (build-system gnu-build-system)
+ (arguments
+ ;; The build system appears not to be parallel-safe.
+ '(#:parallel-build? #f))
+ (inputs
+ (list glib libxml2))
+ (native-inputs
+ `(("gettext" ,gettext-minimal)
+ ("itstool" ,itstool)
+ ("pkg-config" ,pkg-config)))
+ (home-page "https://www.freedesktop.org/wiki/Software/shared-mime-info")
+ (synopsis "Database of common MIME types")
+ (description
+ "The shared-mime-info package contains the core database of common types
+and the update-mime-database command used to extend it. It requires glib2 to
+be installed for building the update command. Additionally, it uses intltool
+for translations, though this is only a dependency for the maintainers. This
+database is translated at Transifex.")
+ (license license:gpl2+)))
+
(define-public xdg-utils
(package
(name "xdg-utils")
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 6db2d6569e..ebabd1a84e 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -2913,39 +2913,6 @@ (define-public tango-icon-theme
guidelines.")
(license license:public-domain)))
-(define-public shared-mime-info
- (package
- (name "shared-mime-info")
- (version "1.15")
- (source (origin
- (method url-fetch)
- (uri (string-append
- "https://gitlab.freedesktop.org/xdg/shared-mime-info/uploads/"
- "b27eb88e4155d8fccb8bb3cd12025d5b/shared-mime-info-" version
- ".tar.xz"))
- (sha256
- (base32
- "146vynj78wcwdq0ms52jzm1r4m6dzi1rhyh3h4xyb6bw8ckv10pl"))))
- (build-system gnu-build-system)
- (arguments
- ;; The build system appears not to be parallel-safe.
- '(#:parallel-build? #f))
- (inputs
- (list glib libxml2))
- (native-inputs
- `(("gettext" ,gettext-minimal)
- ("itstool" ,itstool)
- ("pkg-config" ,pkg-config)))
- (home-page "https://www.freedesktop.org/wiki/Software/shared-mime-info")
- (synopsis "Database of common MIME types")
- (description
- "The shared-mime-info package contains the core database of common types
-and the update-mime-database command used to extend it. It requires glib2 to
-be installed for building the update command. Additionally, it uses intltool
-for translations, though this is only a dependency for the maintainers. This
-database is translated at Transifex.")
- (license license:gpl2+)))
-
(define-public system-config-printer
(package
(name "system-config-printer")
diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm
index e40d2b8922..4608d3d7ae 100644
--- a/gnu/packages/gnuzilla.scm
+++ b/gnu/packages/gnuzilla.scm
@@ -63,6 +63,7 @@ (define-module (gnu packages gnuzilla)
#:use-module (gnu packages base)
#:use-module (gnu packages bash)
#:use-module (gnu packages databases)
+ #:use-module (gnu packages freedesktop)
#:use-module (gnu packages glib)
#:use-module (gnu packages gtk)
#:use-module (gnu packages gnome)
diff --git a/gnu/packages/kde-games.scm b/gnu/packages/kde-games.scm
index 9be889f6aa..73fb88c4cb 100644
--- a/gnu/packages/kde-games.scm
+++ b/gnu/packages/kde-games.scm
@@ -30,7 +30,7 @@ (define-module (gnu packages kde-games)
#:use-module (gnu packages bash)
#:use-module (gnu packages compression)
#:use-module (gnu packages gl)
- #:use-module ((gnu packages gnome) #:select (shared-mime-info))
+ #:use-module ((gnu packages freedesktop) #:select (shared-mime-info))
#:use-module (gnu packages kde)
#:use-module (gnu packages kde-frameworks)
#:use-module (gnu packages perl)
diff --git a/gnu/packages/kde-multimedia.scm b/gnu/packages/kde-multimedia.scm
index e3de6db432..6460345c47 100644
--- a/gnu/packages/kde-multimedia.scm
+++ b/gnu/packages/kde-multimedia.scm
@@ -35,6 +35,7 @@ (define-module (gnu packages kde-multimedia)
#:use-module (gnu packages compression)
#:use-module (gnu packages cdrom)
#:use-module (gnu packages docbook)
+ #:use-module (gnu packages freedesktop)
#:use-module (gnu packages glib)
#:use-module (gnu packages gtk)
#:use-module (gnu packages gnome)
diff --git a/gnu/packages/kde-pim.scm b/gnu/packages/kde-pim.scm
index 6f3cbf2999..dc0533d24b 100644
--- a/gnu/packages/kde-pim.scm
+++ b/gnu/packages/kde-pim.scm
@@ -34,6 +34,7 @@ (define-module (gnu packages kde-pim)
#:use-module (gnu packages cyrus-sasl)
#:use-module (gnu packages databases)
#:use-module (gnu packages documentation)
+ #:use-module (gnu packages freedesktop)
#:use-module (gnu packages glib)
#:use-module (gnu packages gnome)
#:use-module (gnu packages gnupg)
diff --git a/gnu/packages/kde-utils.scm b/gnu/packages/kde-utils.scm
index 5774fa9910..35ad20f541 100644
--- a/gnu/packages/kde-utils.scm
+++ b/gnu/packages/kde-utils.scm
@@ -35,6 +35,7 @@ (define-module (gnu packages kde-utils)
#:use-module (gnu packages compression)
#:use-module (gnu packages crypto)
#:use-module (gnu packages cups)
+ #:use-module (gnu packages freedesktop)
#:use-module (gnu packages glib) ; dbus for tests
#:use-module (gnu packages gnome)
#:use-module (gnu packages gstreamer)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index f89e70c0bb..8f1b88ef6b 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -122,6 +122,7 @@ (define-module (gnu packages maths)
#:use-module (gnu packages flex)
#:use-module (gnu packages fltk)
#:use-module (gnu packages fontutils)
+ #:use-module (gnu packages freedesktop)
#:use-module (gnu packages gettext)
#:use-module (gnu packages gcc)
#:use-module (gnu packages gd)
diff --git a/gnu/packages/mp3.scm b/gnu/packages/mp3.scm
index 7ede16f4bb..85f45d3271 100644
--- a/gnu/packages/mp3.scm
+++ b/gnu/packages/mp3.scm
@@ -40,6 +40,7 @@ (define-module (gnu packages mp3)
#:use-module (gnu packages check)
#:use-module (gnu packages cmake)
#:use-module (gnu packages compression)
+ #:use-module (gnu packages freedesktop)
#:use-module (gnu packages gettext)
#:use-module (gnu packages ghostscript)
#:use-module (gnu packages gnome)
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index eb84367d15..44bea787a6 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -60,6 +60,7 @@ (define-module (gnu packages ruby)
#:use-module (gnu packages curl)
#:use-module (gnu packages databases)
#:use-module (gnu packages dbm)
+ #:use-module (gnu packages freedesktop)
#:use-module (gnu packages rails)
#:use-module (gnu packages readline)
#:use-module (gnu packages autotools)
diff --git a/guix/profiles.scm b/guix/profiles.scm
index 6467e464c8..2e2466ccbc 100644
--- a/guix/profiles.scm
+++ b/guix/profiles.scm
@@ -1562,7 +1562,7 @@ (define (xdg-mime-database manifest)
"Return a derivation that builds the @file{mime.cache} database from manifest
entries. It's used to query the MIME type of a given file."
(define shared-mime-info ; lazy reference
- (module-ref (resolve-interface '(gnu packages gnome)) 'shared-mime-info))
+ (module-ref (resolve-interface '(gnu packages freedesktop)) 'shared-mime-info))
(mlet %store-monad ((glib (manifest-lookup-package manifest "glib")))
(define build
base-commit: 909788c0aebd8098084c009afa98d1209c9ec869
--
2.39.2
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [bug#60826] [PATCH gnome-team v3 2/5] build: gnu: Export a %gnu-default-modules variable.
2023-01-15 2:32 [bug#60826] [PATCH staging] gnu: shared-mime-info: Update to 2.2 Bruno Victal
` (2 preceding siblings ...)
2023-06-19 22:07 ` [bug#60826] [PATCH gnome-team v3 1/5] gnu: shared-mime-info: Move to (gnu packages freedesktop) Bruno Victal
@ 2023-06-19 22:07 ` Bruno Victal
2023-06-20 4:18 ` Liliana Marie Prikler
2023-06-19 22:07 ` [bug#60826] [PATCH gnome-team v3 3/5] gnu: Add xdgmime Bruno Victal
` (6 subsequent siblings)
10 siblings, 1 reply; 19+ messages in thread
From: Bruno Victal @ 2023-06-19 22:07 UTC (permalink / raw)
To: 60826; +Cc: Bruno Victal, liliana.prikler
This makes tweaking the #:module argument less reliant on the programmers
astral wisdom to divine the right module imports.
* guix/build-system/gnu.scm (%default-modules): Rename to …
(%gnu-default-modules): … this and export it as well.
---
guix/build-system/gnu.scm | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/guix/build-system/gnu.scm b/guix/build-system/gnu.scm
index 3308302472..448a2b2a44 100644
--- a/guix/build-system/gnu.scm
+++ b/guix/build-system/gnu.scm
@@ -28,6 +28,7 @@ (define-module (guix build-system gnu)
#:use-module (srfi srfi-1)
#:use-module (ice-9 match)
#:export (%gnu-build-system-modules
+ %gnu-default-modules
%strip-flags
%strip-directories
gnu-build
@@ -55,7 +56,7 @@ (define %gnu-build-system-modules
(guix build gremlin)
(guix elf)))
-(define %default-modules
+(define %gnu-default-modules
;; Modules in scope in the build-side environment.
'((guix build gnu-build-system)
(guix build utils)))
@@ -237,7 +238,7 @@ (define* (dist-package p source #:key (phases '%dist-phases))
(arguments
;; Use the right phases and modules.
(substitute-keyword-arguments (package-arguments p)
- ((#:modules modules %default-modules)
+ ((#:modules modules %gnu-default-modules)
`((guix build gnu-dist)
,@modules))
((#:imported-modules modules %gnu-build-system-modules)
@@ -360,7 +361,7 @@ (define* (gnu-build name inputs
(system (%current-system))
(build (nix-system->gnu-triplet system))
(imported-modules %gnu-build-system-modules)
- (modules %default-modules)
+ (modules %gnu-default-modules)
(substitutable? #t)
allowed-references
disallowed-references)
@@ -500,7 +501,7 @@ (define* (gnu-cross-build name
(system (%current-system))
(build (nix-system->gnu-triplet system))
(imported-modules %gnu-build-system-modules)
- (modules %default-modules)
+ (modules %gnu-default-modules)
(substitutable? #t)
allowed-references
disallowed-references)
--
2.39.2
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [bug#60826] [PATCH gnome-team v3 2/5] build: gnu: Export a %gnu-default-modules variable.
2023-06-19 22:07 ` [bug#60826] [PATCH gnome-team v3 2/5] build: gnu: Export a %gnu-default-modules variable Bruno Victal
@ 2023-06-20 4:18 ` Liliana Marie Prikler
2023-06-20 6:59 ` Bruno Victal
0 siblings, 1 reply; 19+ messages in thread
From: Liliana Marie Prikler @ 2023-06-20 4:18 UTC (permalink / raw)
To: Bruno Victal, 60826
Am Montag, dem 19.06.2023 um 23:07 +0100 schrieb Bruno Victal:
> This makes tweaking the #:module argument less reliant on the
> programmers astral wisdom to divine the right module imports.
>
> * guix/build-system/gnu.scm (%default-modules): Rename to …
> (%gnu-default-modules): … this and export it as well.
> ---
Uhm, is this required? I see it used in xdgmime, but I'd very much
like to do without it.
Cheers
^ permalink raw reply [flat|nested] 19+ messages in thread
* [bug#60826] [PATCH gnome-team v3 2/5] build: gnu: Export a %gnu-default-modules variable.
2023-06-20 4:18 ` Liliana Marie Prikler
@ 2023-06-20 6:59 ` Bruno Victal
2023-06-20 16:56 ` Liliana Marie Prikler
0 siblings, 1 reply; 19+ messages in thread
From: Bruno Victal @ 2023-06-20 6:59 UTC (permalink / raw)
To: Liliana Marie Prikler; +Cc: 60826
Hi Liliana,
On 2023-06-20 05:18, Liliana Marie Prikler wrote:
> Am Montag, dem 19.06.2023 um 23:07 +0100 schrieb Bruno Victal:
>> This makes tweaking the #:module argument less reliant on the
>> programmers astral wisdom to divine the right module imports.
>>
>> * guix/build-system/gnu.scm (%default-modules): Rename to …
>> (%gnu-default-modules): … this and export it as well.
>> ---
> Uhm, is this required? I see it used in xdgmime, but I'd very much
> like to do without it.
As indicated in the commit message, its purpose is to make things
easier. (I've taken inspiration from elm-build-system here)
I think the most compelling arguments to this approach is that in
some packages you see things like:
--8<---------------cut here---------------start------------->8---
gnu/packages/boost.scm- (list
gnu/packages/boost.scm: #:imported-modules `((guix build python-build-system)
gnu/packages/boost.scm- ,@%gnu-build-system-modules)
gnu/packages/boost.scm: #:modules `(((guix build python-build-system) #:select (python-version))
gnu/packages/boost.scm- ,@%gnu-build-system-modules)
gnu/packages/boost.scm- #:tests? #f
gnu/packages/boost.scm- #:configure-flags
--8<---------------cut here---------------end--------------->8---
Which is most likely a mistake since the actual #:module should
be about %default-modules which is a subset of %gnu-build-system-modules.
(albeit one with seemingly little impact)
The divination comment stems from the following reasoning:
“How can I know what gnu-build-system actually imports if not by
guessing/cargo-culting or peering at the private %default-modules?“
(at that point, why not export it as well?)
I'd argue it's a nice addition though strictly speaking its not fundamental
for this patch-series and can be left out, by manually expanding the
%gnu-default-modules value in the xdgmime arguments.
--
Furthermore, I consider that nonfree software must be eradicated.
Cheers,
Bruno.
^ permalink raw reply [flat|nested] 19+ messages in thread
* [bug#60826] [PATCH gnome-team v3 2/5] build: gnu: Export a %gnu-default-modules variable.
2023-06-20 6:59 ` Bruno Victal
@ 2023-06-20 16:56 ` Liliana Marie Prikler
0 siblings, 0 replies; 19+ messages in thread
From: Liliana Marie Prikler @ 2023-06-20 16:56 UTC (permalink / raw)
To: Bruno Victal; +Cc: 60826
Am Dienstag, dem 20.06.2023 um 07:59 +0100 schrieb Bruno Victal:
> The divination comment stems from the following reasoning:
> “How can I know what gnu-build-system actually imports if not by
> guessing/cargo-culting or peering at the private %default-modules?“
> (at that point, why not export it as well?)
>
> I'd argue it's a nice addition though strictly speaking its not
> fundamental for this patch-series and can be left out, by manually
> expanding the %gnu-default-modules value in the xdgmime arguments.
The point is you shouldn't need to "divine" anything. It doesn't take
much guesswork to find that the things you need for gnu-build-system
belong to either (guix build gnu-build-system) or (guix build utils) –
the latter being a module you ought to already be familiar with when
mixing phases, the former being named after the build system.
%elm-default-modules OTOH requires four modules which aren't obvious to
the uninitiated or even slightly more initiated Guix hacker.
Cheers
^ permalink raw reply [flat|nested] 19+ messages in thread
* [bug#60826] [PATCH gnome-team v3 3/5] gnu: Add xdgmime.
2023-01-15 2:32 [bug#60826] [PATCH staging] gnu: shared-mime-info: Update to 2.2 Bruno Victal
` (3 preceding siblings ...)
2023-06-19 22:07 ` [bug#60826] [PATCH gnome-team v3 2/5] build: gnu: Export a %gnu-default-modules variable Bruno Victal
@ 2023-06-19 22:07 ` Bruno Victal
2023-06-19 22:07 ` [bug#60826] [PATCH gnome-team v3 4/5] gnu: shared-mime-info: Update to 2.2 Bruno Victal
` (5 subsequent siblings)
10 siblings, 0 replies; 19+ messages in thread
From: Bruno Victal @ 2023-06-19 22:07 UTC (permalink / raw)
To: 60826; +Cc: Bruno Victal, liliana.prikler
This package is only used for testing shared-mime-info, and thus not exported.
* gnu/packages/freedesktop.scm (xdgmime): New variable.
---
gnu/packages/freedesktop.scm | 46 ++++++++++++++++++++++++++++++++++++
1 file changed, 46 insertions(+)
diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index bd3df9ee68..a7e2aef6d1 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -33,6 +33,7 @@
;;; Copyright © 2022 Petr Hodina <phodina@protonmail.com>
;;; Copyright © 2022 muradm <mail@muradm.net>
;;; Copyright © 2023 Alex Devaure <ajadevaure@gmail.com>
+;;; Copyright © 2023 Bruno Victal <mirai@makinata.eu>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -465,6 +466,51 @@ (define-public maliit-keyboard
display servers. It supports many different languages and emoji.")
(license license:gpl3+)))
+;; Private package used by shared-mime-info.
+(define xdgmime
+ ;; No public release, match commit to the one used in the
+ ;; shared-mime-info release.
+ (let ((commit "de283fc430460b9b3a7e61432a6d273cd64cb102")
+ (revision "1"))
+ (package
+ (name "xdgmime")
+ (version (git-version "0.0" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://gitlab.freedesktop.org/xdg/xdgmime.git")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0m9k7nfxgchb9j0xh9cwsldz6564qisqdkvlhgkcgc0grd4nfbn9"))))
+ (build-system gnu-build-system)
+ (arguments
+ (list
+ #:tests? #f ; no tests
+ #:make-flags #~(list (string-append "DESTDIR=" #$output)
+ #$(string-append "CC=" (cc-for-target)))
+ #:imported-modules `((guix build copy-build-system)
+ ,@%gnu-build-system-modules)
+ #:modules `(,@%gnu-default-modules
+ ((guix build copy-build-system) #:prefix copy:))
+ #:phases
+ #~(modify-phases %standard-phases
+ ;; Package uses a hand-crafted Makefile.
+ (delete 'configure)
+ (replace 'install
+ (lambda args
+ (apply (assoc-ref copy:%standard-phases 'install)
+ #:install-plan
+ '(("src" "bin/" #:include ("print-mime-data"
+ "test-mime-data"
+ "test-mime")))
+ args))))))
+ (home-page "https://gitlab.freedesktop.org/xdg/xdgmime/")
+ (synopsis "Module that parses the freedesktop.org MIME spec")
+ (description "This module is used for shared-mime-info package tests.")
+ (license (list license:lgpl2.1+ license:artistic2.0)))))
+
(define-public shared-mime-info
(package
(name "shared-mime-info")
--
2.39.2
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [bug#60826] [PATCH gnome-team v3 4/5] gnu: shared-mime-info: Update to 2.2.
2023-01-15 2:32 [bug#60826] [PATCH staging] gnu: shared-mime-info: Update to 2.2 Bruno Victal
` (4 preceding siblings ...)
2023-06-19 22:07 ` [bug#60826] [PATCH gnome-team v3 3/5] gnu: Add xdgmime Bruno Victal
@ 2023-06-19 22:07 ` Bruno Victal
2023-06-19 22:07 ` [bug#60826] [PATCH gnome-team v3 5/5] gnu: shared-mime-info: Add doc output Bruno Victal
` (4 subsequent siblings)
10 siblings, 0 replies; 19+ messages in thread
From: Bruno Victal @ 2023-06-19 22:07 UTC (permalink / raw)
To: 60826; +Cc: Bruno Victal, liliana.prikler
* gnu/packages/gnome.scm (shared-mime-info): Update to 2.2.
[source]: Switch to git source.
[build-system]: Switch to meson-build-system.
[arguments]: Enable parallel builds. Do not patch test files.
[native-inputs]: Switch to new style. Add python, xdgmime. Remove itstool.
* gnu/packages/patches/shared-mime-info-xdgmime-path.patch: New file.
* gnu/packages/freedesktop.scm: Register it.
---
gnu/local.mk | 2 +
gnu/packages/freedesktop.scm | 41 +++++++++++++------
.../shared-mime-info-xdgmime-path.patch | 22 ++++++++++
3 files changed, 52 insertions(+), 13 deletions(-)
create mode 100644 gnu/packages/patches/shared-mime-info-xdgmime-path.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index 4d0e34cf09..50d47234c9 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -58,6 +58,7 @@
# Copyright © 2022 jgart <jgart@dismail.de>
# Copyright © 2023 Zheng Junjie <873216071@qq.com>
# Copyright © 2023 Ivana Drazovic <iv.dra@hotmail.com>
+# Copyright © 2023 Bruno Victal <mirai@makinata.eu>
#
# This file is part of GNU Guix.
#
@@ -1911,6 +1912,7 @@ dist_patch_DATA = \
%D%/packages/patches/libsequoia-remove-store.patch \
%D%/packages/patches/serf-python3.patch \
%D%/packages/patches/shakespeare-spl-fix-grammar.patch \
+ %D%/packages/patches/shared-mime-info-xdgmime-path.patch \
%D%/packages/patches/sharutils-CVE-2018-1000097.patch \
%D%/packages/patches/slim-session.patch \
%D%/packages/patches/slim-config.patch \
diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index a7e2aef6d1..50321fd9a7 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -511,29 +511,44 @@ (define xdgmime
(description "This module is used for shared-mime-info package tests.")
(license (list license:lgpl2.1+ license:artistic2.0)))))
+;; Note: when updating shared-mime-info, don't forget to update xdgmime's commit
+;; to the one used in the release.
(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")
+ (commit version)))
+ (file-name (git-file-name name version))
(sha256
(base32
- "146vynj78wcwdq0ms52jzm1r4m6dzi1rhyh3h4xyb6bw8ckv10pl"))))
- (build-system gnu-build-system)
+ "04dfnnflspprxg7qia3whz1754lfvgi4ihvmihg379936zy5xd22"))
+ (patches (search-patches "shared-mime-info-xdgmime-path.patch"))))
+ (build-system meson-build-system)
(arguments
- ;; The build system appears not to be parallel-safe.
- '(#:parallel-build? #f))
+ (list
+ #:configure-flags
+ #~(list (string-append "-Dxdgmime-path="
+ #$(this-package-native-input "xdgmime")
+ "/bin"))
+ #:phases
+ #~(modify-phases %standard-phases
+ ;; Don't patch shebangs for the test files.
+ (replace 'patch-source-shebangs
+ (lambda _
+ (let ((pred (lambda (file stat)
+ (and (eq? 'regular (stat:type stat))
+ (not (string-prefix? "./tests/mime-detection"
+ file))))))
+ (for-each patch-shebang
+ (find-files "." pred #:stat lstat))))))))
(inputs
(list glib libxml2))
(native-inputs
- `(("gettext" ,gettext-minimal)
- ("itstool" ,itstool)
- ("pkg-config" ,pkg-config)))
+ (list gettext-minimal pkg-config python xdgmime))
(home-page "https://www.freedesktop.org/wiki/Software/shared-mime-info")
(synopsis "Database of common MIME types")
(description
diff --git a/gnu/packages/patches/shared-mime-info-xdgmime-path.patch b/gnu/packages/patches/shared-mime-info-xdgmime-path.patch
new file mode 100644
index 0000000000..27c578f3fa
--- /dev/null
+++ b/gnu/packages/patches/shared-mime-info-xdgmime-path.patch
@@ -0,0 +1,22 @@
+Adapted from <https://gitlab.freedesktop.org/xdg/shared-mime-info/-/merge_requests/182>.
+
+diff --git a/meson.build b/meson.build
+index 3c75424..7058562 100644
+--- a/meson.build
++++ b/meson.build
+@@ -26,11 +26,11 @@ xmlto = find_program('xmlto', required: false)
+ ###############################################################################
+ # Find xdgmime
+
+-xdgmime = get_option('xdgmime-path') / 'src'
++xdgmime = get_option('xdgmime-path')
+
+-xdgmime_print_mime_data = find_program(xdgmime/'print-mime-data', required: false)
+-xdgmime_test_mime_data = find_program(xdgmime/'test-mime-data', required: false)
+-xdgmime_test_mime = find_program(xdgmime/'test-mime', required: false)
++xdgmime_print_mime_data = find_program('print-mime-data', xdgmime/'print-mime-data', required: false)
++xdgmime_test_mime_data = find_program('test-mime-data', xdgmime/'test-mime-data', required: false)
++xdgmime_test_mime = find_program('test-mime', xdgmime/'test-mime', required: false)
+ xdgmime_found = (
+ xdgmime_print_mime_data.found() and
+ xdgmime_test_mime_data.found() and
--
2.39.2
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [bug#60826] [PATCH gnome-team v3 5/5] gnu: shared-mime-info: Add doc output.
2023-01-15 2:32 [bug#60826] [PATCH staging] gnu: shared-mime-info: Update to 2.2 Bruno Victal
` (5 preceding siblings ...)
2023-06-19 22:07 ` [bug#60826] [PATCH gnome-team v3 4/5] gnu: shared-mime-info: Update to 2.2 Bruno Victal
@ 2023-06-19 22:07 ` Bruno Victal
2023-06-22 19:33 ` [bug#60826] [PATCH gnome-team v4 1/4] gnu: shared-mime-info: Move to (gnu packages freedesktop) Bruno Victal
` (3 subsequent siblings)
10 siblings, 0 replies; 19+ messages in thread
From: Bruno Victal @ 2023-06-19 22:07 UTC (permalink / raw)
To: 60826; +Cc: Bruno Victal, liliana.prikler
* 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.
---
gnu/packages/freedesktop.scm | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index 50321fd9a7..9f0447d89b 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -544,11 +544,24 @@ (define-public shared-mime-info
(not (string-prefix? "./tests/mime-detection"
file))))))
(for-each patch-shebang
- (find-files "." pred #:stat lstat))))))))
+ (find-files "." pred #:stat lstat)))))
+ ;; The docs have no install rule.
+ (add-after 'install 'install-doc
+ (lambda* (#:key source #:allow-other-keys)
+ (let ((dest (string-append #$output:doc "/share/doc")))
+ (with-directory-excursion "data/shared-mime-info-spec-html"
+ (install-file "shared-mime-info-spec.html"
+ (string-append dest "/html")))
+ (install-file (string-append source
+ "/data/shared-mime-info-spec.xml")
+ dest)))))))
(inputs
(list glib libxml2))
(native-inputs
- (list gettext-minimal pkg-config python xdgmime))
+ (list gettext-minimal pkg-config python xdgmime
+ ;; For 'doc' output.
+ docbook-xml-4.1.2 docbook-xsl xmlto))
+ (outputs (list "out" "doc"))
(home-page "https://www.freedesktop.org/wiki/Software/shared-mime-info")
(synopsis "Database of common MIME types")
(description
--
2.39.2
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [bug#60826] [PATCH gnome-team v4 1/4] gnu: shared-mime-info: Move to (gnu packages freedesktop).
2023-01-15 2:32 [bug#60826] [PATCH staging] gnu: shared-mime-info: Update to 2.2 Bruno Victal
` (6 preceding siblings ...)
2023-06-19 22:07 ` [bug#60826] [PATCH gnome-team v3 5/5] gnu: shared-mime-info: Add doc output Bruno Victal
@ 2023-06-22 19:33 ` Bruno Victal
2023-06-22 19:33 ` [bug#60826] [PATCH gnome-team v4 2/4] gnu: Add xdgmime Bruno Victal
` (2 subsequent siblings)
10 siblings, 0 replies; 19+ messages in thread
From: Bruno Victal @ 2023-06-22 19:33 UTC (permalink / raw)
To: 60826; +Cc: Bruno Victal, liliana.prikler
* gnu/packages/gnome.scm (shared-mime-info): Move to …
* gnu/packages/freedesktop.scm: … here.
* gnu/packages/gnuzilla.scm: Use (gnu packages freedesktop).
* gnu/packages/kde-games.scm: Ditto.
* gnu/packages/kde-multimedia.scm: Ditto.
* gnu/packages/kde-pim.scm: Ditto.
* gnu/packages/kde-utils.scm: Ditto.
* gnu/packages/maths.scm: Ditto.
* gnu/packages/mp3.scm: Ditto.
* gnu/packages/ruby.scm: Ditto.
* guix/profiles.scm (xdg-mime-database): Adjust to new location.
---
gnu/packages/freedesktop.scm | 33 +++++++++++++++++++++++++++++++++
gnu/packages/gnome.scm | 33 ---------------------------------
gnu/packages/gnuzilla.scm | 1 +
gnu/packages/kde-games.scm | 2 +-
gnu/packages/kde-multimedia.scm | 1 +
gnu/packages/kde-pim.scm | 1 +
gnu/packages/kde-utils.scm | 1 +
gnu/packages/maths.scm | 1 +
gnu/packages/mp3.scm | 1 +
gnu/packages/ruby.scm | 1 +
guix/profiles.scm | 2 +-
11 files changed, 42 insertions(+), 35 deletions(-)
diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index 6385741d89..bd3df9ee68 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -465,6 +465,39 @@ (define-public maliit-keyboard
display servers. It supports many different languages and emoji.")
(license license:gpl3+)))
+(define-public shared-mime-info
+ (package
+ (name "shared-mime-info")
+ (version "1.15")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://gitlab.freedesktop.org/xdg/shared-mime-info/uploads/"
+ "b27eb88e4155d8fccb8bb3cd12025d5b/shared-mime-info-" version
+ ".tar.xz"))
+ (sha256
+ (base32
+ "146vynj78wcwdq0ms52jzm1r4m6dzi1rhyh3h4xyb6bw8ckv10pl"))))
+ (build-system gnu-build-system)
+ (arguments
+ ;; The build system appears not to be parallel-safe.
+ '(#:parallel-build? #f))
+ (inputs
+ (list glib libxml2))
+ (native-inputs
+ `(("gettext" ,gettext-minimal)
+ ("itstool" ,itstool)
+ ("pkg-config" ,pkg-config)))
+ (home-page "https://www.freedesktop.org/wiki/Software/shared-mime-info")
+ (synopsis "Database of common MIME types")
+ (description
+ "The shared-mime-info package contains the core database of common types
+and the update-mime-database command used to extend it. It requires glib2 to
+be installed for building the update command. Additionally, it uses intltool
+for translations, though this is only a dependency for the maintainers. This
+database is translated at Transifex.")
+ (license license:gpl2+)))
+
(define-public xdg-utils
(package
(name "xdg-utils")
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 6db2d6569e..ebabd1a84e 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -2913,39 +2913,6 @@ (define-public tango-icon-theme
guidelines.")
(license license:public-domain)))
-(define-public shared-mime-info
- (package
- (name "shared-mime-info")
- (version "1.15")
- (source (origin
- (method url-fetch)
- (uri (string-append
- "https://gitlab.freedesktop.org/xdg/shared-mime-info/uploads/"
- "b27eb88e4155d8fccb8bb3cd12025d5b/shared-mime-info-" version
- ".tar.xz"))
- (sha256
- (base32
- "146vynj78wcwdq0ms52jzm1r4m6dzi1rhyh3h4xyb6bw8ckv10pl"))))
- (build-system gnu-build-system)
- (arguments
- ;; The build system appears not to be parallel-safe.
- '(#:parallel-build? #f))
- (inputs
- (list glib libxml2))
- (native-inputs
- `(("gettext" ,gettext-minimal)
- ("itstool" ,itstool)
- ("pkg-config" ,pkg-config)))
- (home-page "https://www.freedesktop.org/wiki/Software/shared-mime-info")
- (synopsis "Database of common MIME types")
- (description
- "The shared-mime-info package contains the core database of common types
-and the update-mime-database command used to extend it. It requires glib2 to
-be installed for building the update command. Additionally, it uses intltool
-for translations, though this is only a dependency for the maintainers. This
-database is translated at Transifex.")
- (license license:gpl2+)))
-
(define-public system-config-printer
(package
(name "system-config-printer")
diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm
index e40d2b8922..4608d3d7ae 100644
--- a/gnu/packages/gnuzilla.scm
+++ b/gnu/packages/gnuzilla.scm
@@ -63,6 +63,7 @@ (define-module (gnu packages gnuzilla)
#:use-module (gnu packages base)
#:use-module (gnu packages bash)
#:use-module (gnu packages databases)
+ #:use-module (gnu packages freedesktop)
#:use-module (gnu packages glib)
#:use-module (gnu packages gtk)
#:use-module (gnu packages gnome)
diff --git a/gnu/packages/kde-games.scm b/gnu/packages/kde-games.scm
index 9be889f6aa..73fb88c4cb 100644
--- a/gnu/packages/kde-games.scm
+++ b/gnu/packages/kde-games.scm
@@ -30,7 +30,7 @@ (define-module (gnu packages kde-games)
#:use-module (gnu packages bash)
#:use-module (gnu packages compression)
#:use-module (gnu packages gl)
- #:use-module ((gnu packages gnome) #:select (shared-mime-info))
+ #:use-module ((gnu packages freedesktop) #:select (shared-mime-info))
#:use-module (gnu packages kde)
#:use-module (gnu packages kde-frameworks)
#:use-module (gnu packages perl)
diff --git a/gnu/packages/kde-multimedia.scm b/gnu/packages/kde-multimedia.scm
index e3de6db432..6460345c47 100644
--- a/gnu/packages/kde-multimedia.scm
+++ b/gnu/packages/kde-multimedia.scm
@@ -35,6 +35,7 @@ (define-module (gnu packages kde-multimedia)
#:use-module (gnu packages compression)
#:use-module (gnu packages cdrom)
#:use-module (gnu packages docbook)
+ #:use-module (gnu packages freedesktop)
#:use-module (gnu packages glib)
#:use-module (gnu packages gtk)
#:use-module (gnu packages gnome)
diff --git a/gnu/packages/kde-pim.scm b/gnu/packages/kde-pim.scm
index 6f3cbf2999..dc0533d24b 100644
--- a/gnu/packages/kde-pim.scm
+++ b/gnu/packages/kde-pim.scm
@@ -34,6 +34,7 @@ (define-module (gnu packages kde-pim)
#:use-module (gnu packages cyrus-sasl)
#:use-module (gnu packages databases)
#:use-module (gnu packages documentation)
+ #:use-module (gnu packages freedesktop)
#:use-module (gnu packages glib)
#:use-module (gnu packages gnome)
#:use-module (gnu packages gnupg)
diff --git a/gnu/packages/kde-utils.scm b/gnu/packages/kde-utils.scm
index 5774fa9910..35ad20f541 100644
--- a/gnu/packages/kde-utils.scm
+++ b/gnu/packages/kde-utils.scm
@@ -35,6 +35,7 @@ (define-module (gnu packages kde-utils)
#:use-module (gnu packages compression)
#:use-module (gnu packages crypto)
#:use-module (gnu packages cups)
+ #:use-module (gnu packages freedesktop)
#:use-module (gnu packages glib) ; dbus for tests
#:use-module (gnu packages gnome)
#:use-module (gnu packages gstreamer)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index f89e70c0bb..8f1b88ef6b 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -122,6 +122,7 @@ (define-module (gnu packages maths)
#:use-module (gnu packages flex)
#:use-module (gnu packages fltk)
#:use-module (gnu packages fontutils)
+ #:use-module (gnu packages freedesktop)
#:use-module (gnu packages gettext)
#:use-module (gnu packages gcc)
#:use-module (gnu packages gd)
diff --git a/gnu/packages/mp3.scm b/gnu/packages/mp3.scm
index 7ede16f4bb..85f45d3271 100644
--- a/gnu/packages/mp3.scm
+++ b/gnu/packages/mp3.scm
@@ -40,6 +40,7 @@ (define-module (gnu packages mp3)
#:use-module (gnu packages check)
#:use-module (gnu packages cmake)
#:use-module (gnu packages compression)
+ #:use-module (gnu packages freedesktop)
#:use-module (gnu packages gettext)
#:use-module (gnu packages ghostscript)
#:use-module (gnu packages gnome)
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index eb84367d15..44bea787a6 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -60,6 +60,7 @@ (define-module (gnu packages ruby)
#:use-module (gnu packages curl)
#:use-module (gnu packages databases)
#:use-module (gnu packages dbm)
+ #:use-module (gnu packages freedesktop)
#:use-module (gnu packages rails)
#:use-module (gnu packages readline)
#:use-module (gnu packages autotools)
diff --git a/guix/profiles.scm b/guix/profiles.scm
index 6467e464c8..2e2466ccbc 100644
--- a/guix/profiles.scm
+++ b/guix/profiles.scm
@@ -1562,7 +1562,7 @@ (define (xdg-mime-database manifest)
"Return a derivation that builds the @file{mime.cache} database from manifest
entries. It's used to query the MIME type of a given file."
(define shared-mime-info ; lazy reference
- (module-ref (resolve-interface '(gnu packages gnome)) 'shared-mime-info))
+ (module-ref (resolve-interface '(gnu packages freedesktop)) 'shared-mime-info))
(mlet %store-monad ((glib (manifest-lookup-package manifest "glib")))
(define build
base-commit: 909788c0aebd8098084c009afa98d1209c9ec869
--
2.39.2
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [bug#60826] [PATCH gnome-team v4 2/4] gnu: Add xdgmime.
2023-01-15 2:32 [bug#60826] [PATCH staging] gnu: shared-mime-info: Update to 2.2 Bruno Victal
` (7 preceding siblings ...)
2023-06-22 19:33 ` [bug#60826] [PATCH gnome-team v4 1/4] gnu: shared-mime-info: Move to (gnu packages freedesktop) Bruno Victal
@ 2023-06-22 19:33 ` Bruno Victal
2023-06-22 19:33 ` [bug#60826] [PATCH gnome-team v4 3/4] gnu: shared-mime-info: Update to 2.2 Bruno Victal
2023-06-22 19:33 ` [bug#60826] [PATCH gnome-team v4 4/4] gnu: shared-mime-info: Add doc output Bruno Victal
10 siblings, 0 replies; 19+ messages in thread
From: Bruno Victal @ 2023-06-22 19:33 UTC (permalink / raw)
To: 60826; +Cc: Bruno Victal, liliana.prikler
This package is only used for testing shared-mime-info, and thus not exported.
* gnu/packages/freedesktop.scm (xdgmime): New variable.
---
gnu/packages/freedesktop.scm | 47 ++++++++++++++++++++++++++++++++++++
1 file changed, 47 insertions(+)
diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index bd3df9ee68..b6b9f5d4ee 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -33,6 +33,7 @@
;;; Copyright © 2022 Petr Hodina <phodina@protonmail.com>
;;; Copyright © 2022 muradm <mail@muradm.net>
;;; Copyright © 2023 Alex Devaure <ajadevaure@gmail.com>
+;;; Copyright © 2023 Bruno Victal <mirai@makinata.eu>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -465,6 +466,52 @@ (define-public maliit-keyboard
display servers. It supports many different languages and emoji.")
(license license:gpl3+)))
+;; Private package used by shared-mime-info.
+(define xdgmime
+ ;; No public release, match commit to the one used in the
+ ;; shared-mime-info release.
+ (let ((commit "de283fc430460b9b3a7e61432a6d273cd64cb102")
+ (revision "1"))
+ (package
+ (name "xdgmime")
+ (version (git-version "0.0" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://gitlab.freedesktop.org/xdg/xdgmime.git")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0m9k7nfxgchb9j0xh9cwsldz6564qisqdkvlhgkcgc0grd4nfbn9"))))
+ (build-system gnu-build-system)
+ (arguments
+ (list
+ #:tests? #f ; no tests
+ #:make-flags #~(list (string-append "DESTDIR=" #$output)
+ #$(string-append "CC=" (cc-for-target)))
+ #:imported-modules `((guix build copy-build-system)
+ ,@%gnu-build-system-modules)
+ #:modules `((guix build gnu-build-system)
+ ((guix build copy-build-system) #:prefix copy:)
+ (guix build utils))
+ #:phases
+ #~(modify-phases %standard-phases
+ ;; Package uses a hand-crafted Makefile.
+ (delete 'configure)
+ (replace 'install
+ (lambda args
+ (apply (assoc-ref copy:%standard-phases 'install)
+ #:install-plan
+ '(("src" "bin/" #:include ("print-mime-data"
+ "test-mime-data"
+ "test-mime")))
+ args))))))
+ (home-page "https://gitlab.freedesktop.org/xdg/xdgmime/")
+ (synopsis "Module that parses the freedesktop.org MIME spec")
+ (description "This module is used for shared-mime-info package tests.")
+ (license (list license:lgpl2.1+ license:artistic2.0)))))
+
(define-public shared-mime-info
(package
(name "shared-mime-info")
--
2.39.2
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [bug#60826] [PATCH gnome-team v4 3/4] gnu: shared-mime-info: Update to 2.2.
2023-01-15 2:32 [bug#60826] [PATCH staging] gnu: shared-mime-info: Update to 2.2 Bruno Victal
` (8 preceding siblings ...)
2023-06-22 19:33 ` [bug#60826] [PATCH gnome-team v4 2/4] gnu: Add xdgmime Bruno Victal
@ 2023-06-22 19:33 ` Bruno Victal
2023-06-22 19:54 ` Liliana Marie Prikler
2023-06-22 19:33 ` [bug#60826] [PATCH gnome-team v4 4/4] gnu: shared-mime-info: Add doc output Bruno Victal
10 siblings, 1 reply; 19+ messages in thread
From: Bruno Victal @ 2023-06-22 19:33 UTC (permalink / raw)
To: 60826; +Cc: Bruno Victal, liliana.prikler
* gnu/packages/gnome.scm (shared-mime-info): Update to 2.2.
[source]: Switch to git source.
[build-system]: Switch to meson-build-system.
[arguments]: Enable parallel builds. Do not patch test files.
[native-inputs]: Switch to new style. Add python, xdgmime. Remove itstool.
* gnu/packages/patches/shared-mime-info-xdgmime-path.patch: New file.
* gnu/packages/freedesktop.scm: Register it.
---
gnu/local.mk | 2 +
gnu/packages/freedesktop.scm | 41 +++++++++++++------
.../shared-mime-info-xdgmime-path.patch | 22 ++++++++++
3 files changed, 52 insertions(+), 13 deletions(-)
create mode 100644 gnu/packages/patches/shared-mime-info-xdgmime-path.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index 4d0e34cf09..50d47234c9 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -58,6 +58,7 @@
# Copyright © 2022 jgart <jgart@dismail.de>
# Copyright © 2023 Zheng Junjie <873216071@qq.com>
# Copyright © 2023 Ivana Drazovic <iv.dra@hotmail.com>
+# Copyright © 2023 Bruno Victal <mirai@makinata.eu>
#
# This file is part of GNU Guix.
#
@@ -1911,6 +1912,7 @@ dist_patch_DATA = \
%D%/packages/patches/libsequoia-remove-store.patch \
%D%/packages/patches/serf-python3.patch \
%D%/packages/patches/shakespeare-spl-fix-grammar.patch \
+ %D%/packages/patches/shared-mime-info-xdgmime-path.patch \
%D%/packages/patches/sharutils-CVE-2018-1000097.patch \
%D%/packages/patches/slim-session.patch \
%D%/packages/patches/slim-config.patch \
diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index b6b9f5d4ee..b16fa5d387 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -512,29 +512,44 @@ (define xdgmime
(description "This module is used for shared-mime-info package tests.")
(license (list license:lgpl2.1+ license:artistic2.0)))))
+;; Note: when updating shared-mime-info, don't forget to update xdgmime's commit
+;; to the one used in the release.
(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")
+ (commit version)))
+ (file-name (git-file-name name version))
(sha256
(base32
- "146vynj78wcwdq0ms52jzm1r4m6dzi1rhyh3h4xyb6bw8ckv10pl"))))
- (build-system gnu-build-system)
+ "04dfnnflspprxg7qia3whz1754lfvgi4ihvmihg379936zy5xd22"))
+ (patches (search-patches "shared-mime-info-xdgmime-path.patch"))))
+ (build-system meson-build-system)
(arguments
- ;; The build system appears not to be parallel-safe.
- '(#:parallel-build? #f))
+ (list
+ #:configure-flags
+ #~(list #$(format #f "-Dxdgmime-path=~a/bin"
+ (this-package-native-input "xdgmime"))
+ "-Dupdate-mimedb=true")
+ #:phases
+ #~(modify-phases %standard-phases
+ ;; Don't patch shebangs for the test files.
+ (replace 'patch-source-shebangs
+ (lambda _
+ (let ((pred (lambda (file stat)
+ (and (eq? 'regular (stat:type stat))
+ (not (string-prefix? "./tests/mime-detection"
+ file))))))
+ (for-each patch-shebang
+ (find-files "." pred #:stat lstat))))))))
(inputs
(list glib libxml2))
(native-inputs
- `(("gettext" ,gettext-minimal)
- ("itstool" ,itstool)
- ("pkg-config" ,pkg-config)))
+ (list gettext-minimal pkg-config python xdgmime))
(home-page "https://www.freedesktop.org/wiki/Software/shared-mime-info")
(synopsis "Database of common MIME types")
(description
diff --git a/gnu/packages/patches/shared-mime-info-xdgmime-path.patch b/gnu/packages/patches/shared-mime-info-xdgmime-path.patch
new file mode 100644
index 0000000000..27c578f3fa
--- /dev/null
+++ b/gnu/packages/patches/shared-mime-info-xdgmime-path.patch
@@ -0,0 +1,22 @@
+Adapted from <https://gitlab.freedesktop.org/xdg/shared-mime-info/-/merge_requests/182>.
+
+diff --git a/meson.build b/meson.build
+index 3c75424..7058562 100644
+--- a/meson.build
++++ b/meson.build
+@@ -26,11 +26,11 @@ xmlto = find_program('xmlto', required: false)
+ ###############################################################################
+ # Find xdgmime
+
+-xdgmime = get_option('xdgmime-path') / 'src'
++xdgmime = get_option('xdgmime-path')
+
+-xdgmime_print_mime_data = find_program(xdgmime/'print-mime-data', required: false)
+-xdgmime_test_mime_data = find_program(xdgmime/'test-mime-data', required: false)
+-xdgmime_test_mime = find_program(xdgmime/'test-mime', required: false)
++xdgmime_print_mime_data = find_program('print-mime-data', xdgmime/'print-mime-data', required: false)
++xdgmime_test_mime_data = find_program('test-mime-data', xdgmime/'test-mime-data', required: false)
++xdgmime_test_mime = find_program('test-mime', xdgmime/'test-mime', required: false)
+ xdgmime_found = (
+ xdgmime_print_mime_data.found() and
+ xdgmime_test_mime_data.found() and
--
2.39.2
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [bug#60826] [PATCH gnome-team v4 3/4] gnu: shared-mime-info: Update to 2.2.
2023-06-22 19:33 ` [bug#60826] [PATCH gnome-team v4 3/4] gnu: shared-mime-info: Update to 2.2 Bruno Victal
@ 2023-06-22 19:54 ` Liliana Marie Prikler
0 siblings, 0 replies; 19+ messages in thread
From: Liliana Marie Prikler @ 2023-06-22 19:54 UTC (permalink / raw)
To: Bruno Victal, 60826
Am Donnerstag, dem 22.06.2023 um 20:33 +0100 schrieb Bruno Victal:
> * gnu/packages/gnome.scm (shared-mime-info): Update to 2.2.
> [source]: Switch to git source.
> [build-system]: Switch to meson-build-system.
> [arguments]: Enable parallel builds. Do not patch test files.
> [native-inputs]: Switch to new style. Add python, xdgmime. Remove
> itstool.
> * gnu/packages/patches/shared-mime-info-xdgmime-path.patch: New file.
> * gnu/packages/freedesktop.scm: Register it.
Should probably be * gnu/local.mk (dist_patch_DATA), right?
^ permalink raw reply [flat|nested] 19+ messages in thread
* [bug#60826] [PATCH gnome-team v4 4/4] gnu: shared-mime-info: Add doc output.
2023-01-15 2:32 [bug#60826] [PATCH staging] gnu: shared-mime-info: Update to 2.2 Bruno Victal
` (9 preceding siblings ...)
2023-06-22 19:33 ` [bug#60826] [PATCH gnome-team v4 3/4] gnu: shared-mime-info: Update to 2.2 Bruno Victal
@ 2023-06-22 19:33 ` Bruno Victal
2023-06-22 19:56 ` Liliana Marie Prikler
10 siblings, 1 reply; 19+ messages in thread
From: Bruno Victal @ 2023-06-22 19:33 UTC (permalink / raw)
To: 60826; +Cc: Bruno Victal, liliana.prikler
* 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.
---
gnu/packages/freedesktop.scm | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index b16fa5d387..65781fed11 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -545,11 +545,24 @@ (define-public shared-mime-info
(not (string-prefix? "./tests/mime-detection"
file))))))
(for-each patch-shebang
- (find-files "." pred #:stat lstat))))))))
+ (find-files "." pred #:stat lstat)))))
+ ;; The docs have no install rule.
+ (add-after 'install 'install-doc
+ (lambda* (#:key source #:allow-other-keys)
+ (let ((dest (string-append #$output:doc "/share/doc")))
+ (with-directory-excursion "data/shared-mime-info-spec-html"
+ (install-file "shared-mime-info-spec.html"
+ (string-append dest "/html")))
+ (install-file (string-append source
+ "/data/shared-mime-info-spec.xml")
+ dest)))))))
(inputs
(list glib libxml2))
(native-inputs
- (list gettext-minimal pkg-config python xdgmime))
+ (list gettext-minimal pkg-config python xdgmime
+ ;; For 'doc' output.
+ docbook-xml-4.1.2 docbook-xsl xmlto))
+ (outputs (list "out" "doc"))
(home-page "https://www.freedesktop.org/wiki/Software/shared-mime-info")
(synopsis "Database of common MIME types")
(description
--
2.39.2
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [bug#60826] [PATCH gnome-team v4 4/4] gnu: shared-mime-info: Add doc output.
2023-06-22 19:33 ` [bug#60826] [PATCH gnome-team v4 4/4] gnu: shared-mime-info: Add doc output Bruno Victal
@ 2023-06-22 19:56 ` Liliana Marie Prikler
2023-06-25 6:21 ` bug#60826: " Liliana Marie Prikler
0 siblings, 1 reply; 19+ messages in thread
From: Liliana Marie Prikler @ 2023-06-22 19:56 UTC (permalink / raw)
To: Bruno Victal, 60826
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.
Cheers
^ permalink raw reply [flat|nested] 19+ messages in thread
* bug#60826: [PATCH gnome-team v4 4/4] gnu: shared-mime-info: Add doc output.
2023-06-22 19:56 ` Liliana Marie Prikler
@ 2023-06-25 6:21 ` Liliana Marie Prikler
0 siblings, 0 replies; 19+ messages in thread
From: Liliana Marie Prikler @ 2023-06-25 6:21 UTC (permalink / raw)
To: Bruno Victal, 60826-done
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
^ permalink raw reply [flat|nested] 19+ messages in thread