From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 6FB17158086 for ; Sun, 21 Nov 2021 23:39:05 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B80E8E08FC; Sun, 21 Nov 2021 23:39:04 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 7AC5FE08FC for ; Sun, 21 Nov 2021 23:39:03 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B1F06343275 for ; Sun, 21 Nov 2021 23:39:02 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 06AEA1B3 for ; Sun, 21 Nov 2021 23:39:01 +0000 (UTC) From: "Mike Gilbert" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Gilbert" Message-ID: <1637537938.40fb79f4c69cdc4331ba21d12b65d70c8175b7e8.floppym@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: x11-misc/shared-mime-info/files/, x11-misc/shared-mime-info/ X-VCS-Repository: repo/gentoo X-VCS-Files: x11-misc/shared-mime-info/files/shared-mime-info-2.1-itstool.patch x11-misc/shared-mime-info/shared-mime-info-2.1.ebuild X-VCS-Directories: x11-misc/shared-mime-info/ x11-misc/shared-mime-info/files/ X-VCS-Committer: floppym X-VCS-Committer-Name: Mike Gilbert X-VCS-Revision: 40fb79f4c69cdc4331ba21d12b65d70c8175b7e8 X-VCS-Branch: master Date: Sun, 21 Nov 2021 23:39:01 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 109207fb-9cff-4a19-861b-8565f8769709 X-Archives-Hash: 950c0370321c38e0470644c46b889902 commit: 40fb79f4c69cdc4331ba21d12b65d70c8175b7e8 Author: Mike Gilbert gentoo org> AuthorDate: Sun Nov 21 23:36:15 2021 +0000 Commit: Mike Gilbert gentoo org> CommitDate: Sun Nov 21 23:38:58 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=40fb79f4 x11-misc/shared-mime-info: avoid calling broken translation script Closes: https://bugs.gentoo.org/824142 Signed-off-by: Mike Gilbert gentoo.org> .../files/shared-mime-info-2.1-itstool.patch | 82 ++++++++++++++++++++++ .../shared-mime-info/shared-mime-info-2.1.ebuild | 5 +- 2 files changed, 86 insertions(+), 1 deletion(-) diff --git a/x11-misc/shared-mime-info/files/shared-mime-info-2.1-itstool.patch b/x11-misc/shared-mime-info/files/shared-mime-info-2.1-itstool.patch new file mode 100644 index 000000000000..dedeb61e29cf --- /dev/null +++ b/x11-misc/shared-mime-info/files/shared-mime-info-2.1-itstool.patch @@ -0,0 +1,82 @@ +From 5a406b06792e26a83c7346b3c2443c0bd8d4cdb2 Mon Sep 17 00:00:00 2001 +From: Eli Schwartz +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 +--- + .gitlab-ci.yml | 2 -- + 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/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 @@ + ############################################################################### + # Find tools + +-itstool = find_program('itstool') + xmllint = find_program('xmllint') + xmlto = find_program('xmlto') + +-- +GitLab + diff --git a/x11-misc/shared-mime-info/shared-mime-info-2.1.ebuild b/x11-misc/shared-mime-info/shared-mime-info-2.1.ebuild index 440f28e1465b..0957f1fa1a14 100644 --- a/x11-misc/shared-mime-info/shared-mime-info-2.1.ebuild +++ b/x11-misc/shared-mime-info/shared-mime-info-2.1.ebuild @@ -20,7 +20,6 @@ RESTRICT="test" BDEPEND=" app-text/docbook-xml-dtd:4.1.2 app-text/xmlto - dev-util/itstool sys-devel/gettext virtual/pkgconfig " @@ -32,6 +31,10 @@ DEPEND="${RDEPEND}" DOCS=( HACKING.md NEWS README.md ) +PATCHES=( + "${FILESDIR}/shared-mime-info-2.1-itstool.patch" +) + src_install() { meson_src_install