gentoo/dev-util/itstool/itstool-2.0.7_p20250326.ebuild
Holger Hoffstätte 681fc965dd
dev-util/itstool: add 2.0.7_p20250326 snapshot
- add git snapshot due to lack of releases
- add patch to move from libxml2 to lxml
- drop a patch that fixed a UAF in libxml2
- drop python-3.10, add python 3.14
- enable tests, successfully run with python-3.13/14

Closes: https://bugs.gentoo.org/964167
Signed-off-by: Holger Hoffstätte <holger@applied-asynchrony.com>
Part-of: https://github.com/gentoo/gentoo/pull/44143
Closes: https://github.com/gentoo/gentoo/pull/44143
Signed-off-by: Sam James <sam@gentoo.org>
2025-10-12 17:46:58 +01:00

48 lines
1.3 KiB
Bash

# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{11..14} )
PYTHON_REQ_USE="xml(+)"
inherit autotools python-single-r1
DESCRIPTION="Translation tool for XML documents that uses gettext files and ITS rules"
HOMEPAGE="https://itstool.org/"
# use snapshot due to a lack of releases
COMMIT="19f9580f27aa261ea383b395fdef7e153f3f9e6d"
SRC_URI="https://github.com/itstool/itstool/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${PN}-2.0.7-switch-to-lxml.patch.xz"
S="${WORKDIR}/${PN}-${COMMIT}"
# files in /usr/share/itstool/its are under a special exception || GPL-3+
LICENSE="GPL-3+"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~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-python/lxml[${PYTHON_USEDEP}]
')"
DEPEND="${RDEPEND}"
DOCS=( NEWS ) # Changelog is missing; AUTHORS, README are empty
PATCHES=(
"${WORKDIR}"/${PN}-2.0.7-switch-to-lxml.patch
"${FILESDIR}"/${PN}-2.0.7-raw-string-testrunner.patch
)
src_prepare() {
default
eautoreconf
}
src_test() {
"${PYTHON}" tests/run_tests.py || die "test suite failed"
}