diff options
| author | Alexander Kanavin <alex.kanavin@gmail.com> | 2021-11-10 20:39:35 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-11-11 17:09:16 +0000 |
| commit | bd2368d2bf22ee823d409ae76ec422ffcd0166c5 (patch) | |
| tree | 7a139f54e54f0ca8a4b8d4d63fc7081295889e85 | |
| parent | e1691b1c84083a06b9ed44305f854375a8fbab37 (diff) | |
| download | poky-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.patch | 70 | ||||
| -rw-r--r-- | meta/recipes-support/shared-mime-info/shared-mime-info_git.bb | 4 |
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 @@ | |||
| 1 | From 5ca815cb79f64fab9cbb428b95a861fc0c30c116 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Eli Schwartz <eschwartz@archlinux.org> | ||
| 3 | Date: Mon, 8 Nov 2021 18:22:47 -0500 | ||
| 4 | Subject: [PATCH] migrate from custom itstool to builtin msgfmt for creating | ||
| 5 | translated XML | ||
| 6 | |||
| 7 | gettext upstream has supported this for a very long time, and using it | ||
| 8 | means we don't need to jump through hoops to run ninja inside ninja in | ||
| 9 | order to generate the .mo files for itstool. | ||
| 10 | |||
| 11 | Although meson 0.60.0 added support for real targets for the built .mo | ||
| 12 | files, this changed the rules for output filenames, breaking the script. | ||
| 13 | But msgfmt does not care, and anyways comes with builtin meson functions | ||
| 14 | for convenient use. | ||
| 15 | |||
| 16 | Fixes #170 | ||
| 17 | Upstream-Status: Submitted [https://gitlab.freedesktop.org/xdg/shared-mime-info/-/merge_requests/162] | ||
| 18 | Signed-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 | |||
| 25 | diff --git a/data/freedesktop_generate.sh b/data/freedesktop_generate.sh | ||
| 26 | deleted file mode 100755 | ||
| 27 | index 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" | ||
| 43 | diff --git a/data/meson.build b/data/meson.build | ||
| 44 | index 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 | ||
| 9 | DEPENDS = "libxml2 itstool-native glib-2.0 shared-mime-info-native xmlto-native" | 9 | DEPENDS = "libxml2 itstool-native glib-2.0 shared-mime-info-native xmlto-native" |
| 10 | 10 | ||
| 11 | SRC_URI = "git://gitlab.freedesktop.org/xdg/shared-mime-info.git;protocol=https;branch=master" | 11 | SRC_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 | " | ||
| 12 | SRCREV = "18e558fa1c8b90b86757ade09a4ba4d6a6cf8f70" | 14 | SRCREV = "18e558fa1c8b90b86757ade09a4ba4d6a6cf8f70" |
| 13 | PV = "2.1" | 15 | PV = "2.1" |
| 14 | S = "${WORKDIR}/git" | 16 | S = "${WORKDIR}/git" |
