From: Bruno Victal <mirai@makinata.eu>
To: 60826@debbugs.gnu.org
Cc: Bruno Victal <mirai@makinata.eu>, liliana.prikler@gmail.com
Subject: [bug#60826] [PATCH gnome-team v3 4/5] gnu: shared-mime-info: Update to 2.2.
Date: Mon, 19 Jun 2023 23:07:07 +0100 [thread overview]
Message-ID: <f4e3822bec6012104faba087bac194d59d225768.1687212109.git.mirai@makinata.eu> (raw)
In-Reply-To: <c8c976b9d2598c46cc0c688095aabf9db43650d9.1673749940.git.mirai@makinata.eu>
* 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
next prev parent reply other threads:[~2023-06-19 22:08 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
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-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
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
2023-06-20 16:56 ` Liliana Marie Prikler
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 [this message]
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 ` [bug#60826] [PATCH gnome-team v4 1/4] gnu: shared-mime-info: Move to (gnu packages freedesktop) Bruno Victal
2023-06-22 19:33 ` [bug#60826] [PATCH gnome-team v4 2/4] gnu: Add xdgmime 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: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
2023-06-22 19:56 ` Liliana Marie Prikler
2023-06-25 6:21 ` bug#60826: " Liliana Marie Prikler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f4e3822bec6012104faba087bac194d59d225768.1687212109.git.mirai@makinata.eu \
--to=mirai@makinata.eu \
--cc=60826@debbugs.gnu.org \
--cc=liliana.prikler@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).