import shared-mime-info-2.1-5.el9
This commit is contained in:
parent
3f8d678527
commit
f28e5dca36
@ -0,0 +1,28 @@
|
|||||||
|
From 136cb8f1d3bedc79343cad51ed744d69f5508adf Mon Sep 17 00:00:00 2001
|
||||||
|
From: orbea <orbea@riseup.net>
|
||||||
|
Date: Fri, 1 Oct 2021 14:57:47 -0700
|
||||||
|
Subject: [PATCH] freedesktop_generate.sh: Don't hardcode ninja
|
||||||
|
|
||||||
|
Another ninja implementation that works is samurai
|
||||||
|
|
||||||
|
https://github.com/michaelforney/samurai
|
||||||
|
---
|
||||||
|
data/freedesktop_generate.sh | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/data/freedesktop_generate.sh b/data/freedesktop_generate.sh
|
||||||
|
index ff13e75..62ccffa 100755
|
||||||
|
--- a/data/freedesktop_generate.sh
|
||||||
|
+++ b/data/freedesktop_generate.sh
|
||||||
|
@@ -3,7 +3,7 @@
|
||||||
|
src_root="$1"
|
||||||
|
build_root="$2"
|
||||||
|
|
||||||
|
-ninja -C "${build_root}" shared-mime-info-gmo
|
||||||
|
+${NINJA:-ninja} -C "${build_root}" shared-mime-info-gmo
|
||||||
|
|
||||||
|
itstool \
|
||||||
|
--its "${src_root}/data/its/shared-mime-info.its" \
|
||||||
|
--
|
||||||
|
2.37.3
|
||||||
|
|
@ -0,0 +1,58 @@
|
|||||||
|
From 6148b0ced86e37aa461eb4a399a6573e2bc687fd Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Ville=20Skytt=C3=A4?= <ville.skytta@iki.fi>
|
||||||
|
Date: Sun, 24 Jan 2021 11:45:52 +0200
|
||||||
|
Subject: [PATCH] meson: make xmlto optional, build spec only if found
|
||||||
|
|
||||||
|
Refs https://gitlab.freedesktop.org/xdg/shared-mime-info/-/issues/150
|
||||||
|
---
|
||||||
|
data/meson.build | 22 ++++++++++++----------
|
||||||
|
meson.build | 2 +-
|
||||||
|
2 files changed, 13 insertions(+), 11 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/data/meson.build b/data/meson.build
|
||||||
|
index 263567d..24361c9 100644
|
||||||
|
--- a/data/meson.build
|
||||||
|
+++ b/data/meson.build
|
||||||
|
@@ -22,14 +22,16 @@ install_data(
|
||||||
|
install_dir : get_option('datadir') / 'gettext/its'
|
||||||
|
)
|
||||||
|
|
||||||
|
-custom_target('shared-mime-info-spec-html',
|
||||||
|
- input : 'shared-mime-info-spec.xml',
|
||||||
|
- output: 'shared-mime-info-spec-html',
|
||||||
|
- command: [
|
||||||
|
- xmlto,
|
||||||
|
- '-o', '@OUTPUT@',
|
||||||
|
- 'html-nochunks',
|
||||||
|
- '@INPUT@',
|
||||||
|
- ],
|
||||||
|
- build_by_default: true,
|
||||||
|
+if xmlto.found()
|
||||||
|
+ custom_target('shared-mime-info-spec-html',
|
||||||
|
+ input : 'shared-mime-info-spec.xml',
|
||||||
|
+ output: 'shared-mime-info-spec-html',
|
||||||
|
+ command: [
|
||||||
|
+ xmlto,
|
||||||
|
+ '-o', '@OUTPUT@',
|
||||||
|
+ 'html-nochunks',
|
||||||
|
+ '@INPUT@',
|
||||||
|
+ ],
|
||||||
|
+ build_by_default: true,
|
||||||
|
)
|
||||||
|
+endif
|
||||||
|
diff --git a/meson.build b/meson.build
|
||||||
|
index 9a28573..0d08c8a 100644
|
||||||
|
--- a/meson.build
|
||||||
|
+++ b/meson.build
|
||||||
|
@@ -22,7 +22,7 @@ config.set_quoted('VERSION', meson.project_version())
|
||||||
|
|
||||||
|
itstool = find_program('itstool')
|
||||||
|
xmllint = find_program('xmllint')
|
||||||
|
-xmlto = find_program('xmlto')
|
||||||
|
+xmlto = find_program('xmlto', required: false)
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# Find xdgmime
|
||||||
|
--
|
||||||
|
2.37.3
|
||||||
|
|
@ -0,0 +1,112 @@
|
|||||||
|
From 5a406b06792e26a83c7346b3c2443c0bd8d4cdb2 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Eli Schwartz <eschwartz@archlinux.org>
|
||||||
|
Date: Mon, 8 Nov 2021 18:22:47 -0500
|
||||||
|
Subject: [PATCH] migrate from custom itstool to builtin msgfmt for creating
|
||||||
|
translated XML
|
||||||
|
|
||||||
|
gettext upstream has supported this for a very long time (since 0.19.7
|
||||||
|
via commit b3c2a5a242c36fbbaa0c5b17f975d6c638598a23, released in 2015),
|
||||||
|
and itstool is (mostly) a legacy of the time before gettext had proper
|
||||||
|
support for these sorts of use cases.
|
||||||
|
|
||||||
|
This is similar to the state of intltool, which is described at
|
||||||
|
https://wiki.gnome.org/MigratingFromIntltoolToGettext
|
||||||
|
|
||||||
|
During the port from autotools to meson, the legacy use of itstool was
|
||||||
|
faithfully translated to meson in the only way possible: by jumping
|
||||||
|
through hoops to run ninja inside ninja in order to generate the .mo
|
||||||
|
files for itstool, because meson's i18n module used a flawed design and
|
||||||
|
there was no "real" target to create those files, only a .PHONY
|
||||||
|
run_target which other rules cannot depend on.
|
||||||
|
|
||||||
|
Although meson 0.60.0 added support for real targets for the built .mo
|
||||||
|
files, this changed the rules for output filenames, breaking the script.
|
||||||
|
|
||||||
|
But msgfmt does not care, and anyways comes with builtin meson functions
|
||||||
|
for convenient use with XML files. So let's take this opportunity to
|
||||||
|
drop legacy dependencies and use the modern, builtin tooling, which
|
||||||
|
fixes this bug as a side effect.
|
||||||
|
|
||||||
|
Fixes #170
|
||||||
|
---
|
||||||
|
README.md | 2 +-
|
||||||
|
data/freedesktop_generate.sh | 12 ------------
|
||||||
|
data/meson.build | 16 +++++-----------
|
||||||
|
meson.build | 1 -
|
||||||
|
5 files changed, 6 insertions(+), 27 deletions(-)
|
||||||
|
delete mode 100755 data/freedesktop_generate.sh
|
||||||
|
|
||||||
|
diff --git a/README.md b/README.md
|
||||||
|
index c23d9d5..b2fb0ac 100644
|
||||||
|
--- a/README.md
|
||||||
|
+++ b/README.md
|
||||||
|
@@ -19,7 +19,7 @@ $ ninja -v -C _build install
|
||||||
|
```
|
||||||
|
|
||||||
|
It requires the glib development package to be installed as well as
|
||||||
|
-gettext and itstool.
|
||||||
|
+gettext.
|
||||||
|
This database is translated at Transifex.
|
||||||
|
|
||||||
|
|
||||||
|
diff --git a/data/freedesktop_generate.sh b/data/freedesktop_generate.sh
|
||||||
|
deleted file mode 100755
|
||||||
|
index 62ccffa..0000000
|
||||||
|
--- a/data/freedesktop_generate.sh
|
||||||
|
+++ /dev/null
|
||||||
|
@@ -1,12 +0,0 @@
|
||||||
|
-#!/bin/sh -e
|
||||||
|
-
|
||||||
|
-src_root="$1"
|
||||||
|
-build_root="$2"
|
||||||
|
-
|
||||||
|
-${NINJA:-ninja} -C "${build_root}" shared-mime-info-gmo
|
||||||
|
-
|
||||||
|
-itstool \
|
||||||
|
- --its "${src_root}/data/its/shared-mime-info.its" \
|
||||||
|
- --join "${src_root}/data/freedesktop.org.xml.in" \
|
||||||
|
- -o "${build_root}/data/freedesktop.org.xml" \
|
||||||
|
- "${build_root}/po/"*".gmo"
|
||||||
|
diff --git a/data/meson.build b/data/meson.build
|
||||||
|
index 24361c9..09ed7a9 100644
|
||||||
|
--- a/data/meson.build
|
||||||
|
+++ b/data/meson.build
|
||||||
|
@@ -1,18 +1,12 @@
|
||||||
|
|
||||||
|
install_man('update-mime-database.1')
|
||||||
|
|
||||||
|
-freedesktop_org_xml = custom_target('freedesktop.org.xml',
|
||||||
|
- input : files(
|
||||||
|
- 'freedesktop.org.xml.in',
|
||||||
|
- 'its/shared-mime-info.its',
|
||||||
|
- 'its/shared-mime-info.loc',
|
||||||
|
- ),
|
||||||
|
+freedesktop_org_xml = i18n.merge_file(
|
||||||
|
+ input: 'freedesktop.org.xml.in',
|
||||||
|
output: 'freedesktop.org.xml',
|
||||||
|
- command: [
|
||||||
|
- find_program('freedesktop_generate.sh'),
|
||||||
|
- meson.source_root(),
|
||||||
|
- meson.build_root()
|
||||||
|
- ],
|
||||||
|
+ data_dirs: '.',
|
||||||
|
+ po_dir: '../po',
|
||||||
|
+ type: 'xml',
|
||||||
|
install: true,
|
||||||
|
install_dir: get_option('datadir') / 'mime' / 'packages',
|
||||||
|
)
|
||||||
|
diff --git a/meson.build b/meson.build
|
||||||
|
index 0d08c8a..60f17ae 100644
|
||||||
|
--- a/meson.build
|
||||||
|
+++ b/meson.build
|
||||||
|
@@ -20,7 +20,6 @@ config.set_quoted('VERSION', meson.project_version())
|
||||||
|
###############################################################################
|
||||||
|
# Find tools
|
||||||
|
|
||||||
|
-itstool = find_program('itstool')
|
||||||
|
xmllint = find_program('xmllint')
|
||||||
|
xmlto = find_program('xmlto', required: false)
|
||||||
|
|
||||||
|
--
|
||||||
|
2.37.3
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
Summary: Shared MIME information database
|
Summary: Shared MIME information database
|
||||||
Name: shared-mime-info
|
Name: shared-mime-info
|
||||||
Version: 2.1
|
Version: 2.1
|
||||||
Release: 4%{?dist}
|
Release: 5%{?dist}
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
URL: http://freedesktop.org/Software/shared-mime-info
|
URL: http://freedesktop.org/Software/shared-mime-info
|
||||||
Source0: https://gitlab.freedesktop.org/xdg/shared-mime-info/uploads/0ee50652091363ab0d17e335e5e74fbe/shared-mime-info-2.1.tar.xz
|
Source0: https://gitlab.freedesktop.org/xdg/shared-mime-info/uploads/0ee50652091363ab0d17e335e5e74fbe/shared-mime-info-2.1.tar.xz
|
||||||
@ -14,6 +14,10 @@ Source6: https://gitlab.freedesktop.org/xdg/xdgmime/-/archive/%{xdgmime_commit}/
|
|||||||
|
|
||||||
# Work-around for https://bugs.freedesktop.org/show_bug.cgi?id=40354
|
# Work-around for https://bugs.freedesktop.org/show_bug.cgi?id=40354
|
||||||
Patch0: 0001-Remove-sub-classing-from-OO.o-mime-types.patch
|
Patch0: 0001-Remove-sub-classing-from-OO.o-mime-types.patch
|
||||||
|
# Fix build with meson 0.60+
|
||||||
|
Patch1: 0001-freedesktop_generate.sh-Don-t-hardcode-ninja.patch
|
||||||
|
Patch2: 0002-meson-make-xmlto-optional-build-spec-only-if-found.patch
|
||||||
|
Patch3: 0003-migrate-from-custom-itstool-to-builtin-msgfmt-for-cr.patch
|
||||||
|
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
BuildRequires: libxml2-devel
|
BuildRequires: libxml2-devel
|
||||||
@ -93,6 +97,10 @@ update-mime-database -n %{_datadir}/mime &> /dev/null ||:
|
|||||||
%{_datadir}/gettext/its/shared-mime-info.loc
|
%{_datadir}/gettext/its/shared-mime-info.loc
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Nov 07 2022 Tomas Popela <tpopela@redhat.com> - 2.1-5
|
||||||
|
- Fix build with a newer Meson (that we might rebase to)
|
||||||
|
- Resolves: rhbz#2140541
|
||||||
|
|
||||||
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 2.1-4
|
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 2.1-4
|
||||||
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
||||||
Related: rhbz#1991688
|
Related: rhbz#1991688
|
||||||
|
Loading…
Reference in New Issue
Block a user