summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2021-11-10 20:39:35 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-11-11 17:09:16 +0000
commitbd2368d2bf22ee823d409ae76ec422ffcd0166c5 (patch)
tree7a139f54e54f0ca8a4b8d4d63fc7081295889e85
parente1691b1c84083a06b9ed44305f854375a8fbab37 (diff)
downloadpoky-bd2368d2bf22ee823d409ae76ec422ffcd0166c5.tar.gz
shared-mime-info: fix meson 0.60 builds
(From OE-Core rev: 268400236a73ebdb1b6acf75fdd0a4a6d7965a7c) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-support/shared-mime-info/files/0001-migrate-from-custom-itstool-to-builtin-msgfmt-for-cr.patch70
-rw-r--r--meta/recipes-support/shared-mime-info/shared-mime-info_git.bb4
2 files changed, 73 insertions, 1 deletions
diff --git a/meta/recipes-support/shared-mime-info/files/0001-migrate-from-custom-itstool-to-builtin-msgfmt-for-cr.patch b/meta/recipes-support/shared-mime-info/files/0001-migrate-from-custom-itstool-to-builtin-msgfmt-for-cr.patch
new file mode 100644
index 0000000000..d09013bb3c
--- /dev/null
+++ b/meta/recipes-support/shared-mime-info/files/0001-migrate-from-custom-itstool-to-builtin-msgfmt-for-cr.patch
@@ -0,0 +1,70 @@
1From 5ca815cb79f64fab9cbb428b95a861fc0c30c116 Mon Sep 17 00:00:00 2001
2From: Eli Schwartz <eschwartz@archlinux.org>
3Date: Mon, 8 Nov 2021 18:22:47 -0500
4Subject: [PATCH] migrate from custom itstool to builtin msgfmt for creating
5 translated XML
6
7gettext upstream has supported this for a very long time, and using it
8means we don't need to jump through hoops to run ninja inside ninja in
9order to generate the .mo files for itstool.
10
11Although meson 0.60.0 added support for real targets for the built .mo
12files, this changed the rules for output filenames, breaking the script.
13But msgfmt does not care, and anyways comes with builtin meson functions
14for convenient use.
15
16Fixes #170
17Upstream-Status: Submitted [https://gitlab.freedesktop.org/xdg/shared-mime-info/-/merge_requests/162]
18Signed-off-by: Alexander Kanavin <alex@linutronix.de>
19---
20 data/freedesktop_generate.sh | 12 ------------
21 data/meson.build | 16 +++++-----------
22 2 files changed, 5 insertions(+), 23 deletions(-)
23 delete mode 100755 data/freedesktop_generate.sh
24
25diff --git a/data/freedesktop_generate.sh b/data/freedesktop_generate.sh
26deleted file mode 100755
27index ff13e75..0000000
28--- a/data/freedesktop_generate.sh
29+++ /dev/null
30@@ -1,12 +0,0 @@
31-#!/bin/sh -e
32-
33-src_root="$1"
34-build_root="$2"
35-
36-ninja -C "${build_root}" shared-mime-info-gmo
37-
38-itstool \
39- --its "${src_root}/data/its/shared-mime-info.its" \
40- --join "${src_root}/data/freedesktop.org.xml.in" \
41- -o "${build_root}/data/freedesktop.org.xml" \
42- "${build_root}/po/"*".gmo"
43diff --git a/data/meson.build b/data/meson.build
44index 263567d..c5696f2 100644
45--- a/data/meson.build
46+++ b/data/meson.build
47@@ -1,18 +1,12 @@
48
49 install_man('update-mime-database.1')
50
51-freedesktop_org_xml = custom_target('freedesktop.org.xml',
52- input : files(
53- 'freedesktop.org.xml.in',
54- 'its/shared-mime-info.its',
55- 'its/shared-mime-info.loc',
56- ),
57+freedesktop_org_xml = i18n.merge_file(
58+ input: 'freedesktop.org.xml.in',
59 output: 'freedesktop.org.xml',
60- command: [
61- find_program('freedesktop_generate.sh'),
62- meson.source_root(),
63- meson.build_root()
64- ],
65+ data_dirs: '.',
66+ po_dir: '../po',
67+ type: 'xml',
68 install: true,
69 install_dir: get_option('datadir') / 'mime' / 'packages',
70 )
diff --git a/meta/recipes-support/shared-mime-info/shared-mime-info_git.bb b/meta/recipes-support/shared-mime-info/shared-mime-info_git.bb
index 2dca36a7df..69f147ebce 100644
--- a/meta/recipes-support/shared-mime-info/shared-mime-info_git.bb
+++ b/meta/recipes-support/shared-mime-info/shared-mime-info_git.bb
@@ -8,7 +8,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
8 8
9DEPENDS = "libxml2 itstool-native glib-2.0 shared-mime-info-native xmlto-native" 9DEPENDS = "libxml2 itstool-native glib-2.0 shared-mime-info-native xmlto-native"
10 10
11SRC_URI = "git://gitlab.freedesktop.org/xdg/shared-mime-info.git;protocol=https;branch=master" 11SRC_URI = "git://gitlab.freedesktop.org/xdg/shared-mime-info.git;protocol=https;branch=master \
12 file://0001-migrate-from-custom-itstool-to-builtin-msgfmt-for-cr.patch \
13 "
12SRCREV = "18e558fa1c8b90b86757ade09a4ba4d6a6cf8f70" 14SRCREV = "18e558fa1c8b90b86757ade09a4ba4d6a6cf8f70"
13PV = "2.1" 15PV = "2.1"
14S = "${WORKDIR}/git" 16S = "${WORKDIR}/git"