From f8ce9f2b903374606b4f44deb7727aca194ef970 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 1 Jan 2024 23:49:35 +0000 Subject: gentoo auto-resync : 01:01:2024 - 23:49:35 --- dev-util/Manifest.gz | Bin 70727 -> 70732 bytes dev-util/itstool/Manifest | 2 ++ .../itstool-2.0.7-missing-translation-fix.patch | 28 ++++++++++++++++ dev-util/itstool/itstool-2.0.7-r1.ebuild | 37 +++++++++++++++++++++ 4 files changed, 67 insertions(+) create mode 100644 dev-util/itstool/files/itstool-2.0.7-missing-translation-fix.patch create mode 100644 dev-util/itstool/itstool-2.0.7-r1.ebuild (limited to 'dev-util') diff --git a/dev-util/Manifest.gz b/dev-util/Manifest.gz index eac9d005c55c..2db94ab75967 100644 Binary files a/dev-util/Manifest.gz and b/dev-util/Manifest.gz differ diff --git a/dev-util/itstool/Manifest b/dev-util/itstool/Manifest index a0f80b8d5439..09b1d5a7bcb9 100644 --- a/dev-util/itstool/Manifest +++ b/dev-util/itstool/Manifest @@ -1,3 +1,5 @@ +AUX itstool-2.0.7-missing-translation-fix.patch 1260 BLAKE2B af0023bb175919f58ce3150b714f28059c39991e6b1a223b3599b3776690a4457b4ca67d267599ae562ff1633c4c6c93fa064d0a6221abf8b889cb9975f9a0bd SHA512 4536552d4587f4ce5573367c274854710e3df56485fefb00c9d3ca5efcff3cce91e2ff4b0b67d604f4b3884b57493e4ff282d4bafce6c1e257eeb0686cd824d9 DIST itstool-2.0.7.tar.bz2 104648 BLAKE2B e2d27d7b0a772596a0fa02b157bbef65b132b839c908c114596d21a54c245a0c941419a3555a8b9b7255800f9ef65d557a5b0f6847103b0a3934c908d43128ab SHA512 710c188e518a7eccbf9d31df59692fd6acc79430589a93ef4333f33f74440c311c340614ca74cc43191830567a98024d0981325ccd83a8fd9b75410d9dd91992 +EBUILD itstool-2.0.7-r1.ebuild 1042 BLAKE2B 4226d3f84c08272d6c796127fe779197706652792f0f1f33b0e0f270076e57f31c772b96c04266ab0892f7577d1f1faa91a17ff0e4a38bf7be6a01f430f0649c SHA512 ca08ee256f80cc6b7b2163b6edb8ec3f4f50b9fd0a26dbf2716b6bfa4473ac0d57fa16cda00ce45d2d448c2da668f95012847d36acc53ee81ba4d6468b887d23 EBUILD itstool-2.0.7.ebuild 964 BLAKE2B 7eef310838935bc5b47d23706e3e4ad6410c137e868f662f83e86a7e7c66d703b893625d7645fd878e818ff818016805b75833ea82361d75cac42f51ec809333 SHA512 588c133c33a90f5f81886a89f632a6d0bec501b7089b05385aed0adbb88c7255ce09c30962620a902739c7f49334d90e4d72f7f87414f29234d784f263fe979b MISC metadata.xml 612 BLAKE2B 0d4784d03f20c26f28f64015ee59a119b1059fd75f27352b0e99f07b5c3914ea3541674d4970620b1bbd6278951e524e687807d1275da1999d3a2fa311fb8206 SHA512 dcf3e043d41747edbd72e8081b75617b88d76e6c46fea1e112e5c2a8e7049f74f1b5ece6de4681863994eeb18bade3b793c3944269ddc5d3b6c6ead1a72dc8f9 diff --git a/dev-util/itstool/files/itstool-2.0.7-missing-translation-fix.patch b/dev-util/itstool/files/itstool-2.0.7-missing-translation-fix.patch new file mode 100644 index 000000000000..bdd45e40eb80 --- /dev/null +++ b/dev-util/itstool/files/itstool-2.0.7-missing-translation-fix.patch @@ -0,0 +1,28 @@ +Bug: https://github.com/mate-desktop/mate-utils/issues/210 +Bug: https://github.com/itstool/itstool/issues/36# + +From: https://github.com/itstool/itstool/pull/47/commits/e9b053be5c50c2bd69442a8484a4c9c371bc3a45 +From: Harald van Dijk +Date: Thu, 15 Jun 2023 23:18:11 +0100 +Subject: [PATCH] Fix handling of untranslated nodes + +If a translation is missing, get_translated returns the node it was +called with. But ph_node when passed to get_translated is part of +another document and cannot just be reparented, it needs to be cloned. +The reparenting leaves things in an inconsistent state where references +intended to refer to nodes in the original document no longer do so, and +they may then be accessed from those references after the new document +has already been freed. + +Fixes bug #36. +--- a/itstool.in ++++ b/itstool.in +@@ -1096,6 +1096,8 @@ class Document (object): + child.replaceNode(newnode) + else: + repl = self.get_translated(ph_node, translations, strict=strict, lang=lang) ++ if repl == ph_node: ++ repl = repl.copyNode(1) + child.replaceNode(repl) + scan_node(child) + try: diff --git a/dev-util/itstool/itstool-2.0.7-r1.ebuild b/dev-util/itstool/itstool-2.0.7-r1.ebuild new file mode 100644 index 000000000000..d1fa04395f8c --- /dev/null +++ b/dev-util/itstool/itstool-2.0.7-r1.ebuild @@ -0,0 +1,37 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..11} ) +PYTHON_REQ_USE="xml(+)" + +inherit python-single-r1 + +DESCRIPTION="Translation tool for XML documents that uses gettext files and ITS rules" +HOMEPAGE="http://itstool.org/" +SRC_URI="http://files.itstool.org/itstool/${P}.tar.bz2" + +# files in /usr/share/itstool/its are under a special exception || GPL-3+ +LICENSE="GPL-3+" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris" + +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +RDEPEND="${PYTHON_DEPS} + $(python_gen_cond_dep ' + dev-libs/libxml2[python,${PYTHON_USEDEP}] + ')" +DEPEND="${RDEPEND}" +BDEPEND="" + +DOCS=(ChangeLog NEWS) # AUTHORS, README are empty + +PATCHES=" + "${FILESDIR}"/${PN}-2.0.7-missing-translation-fix.patch" + +src_test() { + : + #"${PYTHON}" tests/run_tests.py || die "test suite failed" # Test suite not shipped in tarball +} -- cgit v1.2.3