From 64ef96bc67f5033124d34df1329775cb09065203 Mon Sep 17 00:00:00 2001 From: Sergey Torokhov Date: Wed, 12 May 2021 23:35:29 +0300 Subject: dev-vcs/tortoisehg: 5.8 version bump; 9999.ebuild update Since tarball from 'https://www.mercurial-scm.org/release/tortoisehg/targz/' doesn't provide 'tests' directory the SRC_URI is replaced with url for upstream repository 'https://foss.heptapod.net/mercurial/tortoisehg/' like as for 9999.ebuild is curretly used. This allows to add USE="test" both for 5.8 and 9999 ebuilds with conditional DEPEND="dev-python/mock dev-python/pytest" and appropriate calls for tests run in python_test() phase. Additionally the QA issue is fixed: "The ebuild is installing to one or more unexpected paths: /usr/share/doc/tortoisehg Please fix the ebuild to use correct FHS/Gentoo policy paths." for "COPYING.txt" file installation by patching 'setup.py' within python_prepare_all() phase. New runtime dependency 'dev-python/pygit2' for the core git extension support is added via optfeature call. Signed-off-by: Sergey Torokhov Closes: https://github.com/gentoo/gentoo/pull/20788 Signed-off-by: Sam James --- dev-vcs/tortoisehg/Manifest | 1 + dev-vcs/tortoisehg/tortoisehg-5.8.ebuild | 80 +++++++++++++++++++++++++++++++ dev-vcs/tortoisehg/tortoisehg-9999.ebuild | 32 ++++++++++--- 3 files changed, 106 insertions(+), 7 deletions(-) create mode 100644 dev-vcs/tortoisehg/tortoisehg-5.8.ebuild (limited to 'dev-vcs') diff --git a/dev-vcs/tortoisehg/Manifest b/dev-vcs/tortoisehg/Manifest index e9ead221698c..2c89d8773a51 100644 --- a/dev-vcs/tortoisehg/Manifest +++ b/dev-vcs/tortoisehg/Manifest @@ -1 +1,2 @@ DIST tortoisehg-5.7.tar.gz 8910721 BLAKE2B ebca9526fc39c94c26f28db6dd70527c528308d9003fca0d9cfb61f984a9a5d80f910d68d0d1449221bbb4e040d2919ed34fec1e0aee4d9f5ed55cbcdb8ba714 SHA512 d143c9e83d3b0771ffd4a3bd9cd50e8bc169e5d29e33a0681c3234898a7566427f070ff3ad8668709b5e4d63be92fd700211dee03e98ff16c7c23fc0870c9e4c +DIST tortoisehg-5.8.tar.gz 8636455 BLAKE2B 1f4171ca4eb465aabacaf53b97785c5f05fc501a11329af008695f706d8d2cb9c5eee5e64bb5a60fdf7234f33ed6a937dfacce49cb36ac9e9b8505be271b4f35 SHA512 b9fe80a98cfafe0dbc90be5fe6f83b466fe596b4ec135d0eacc5618e39c0249a3a352bed640a7cecb99d53eaf60908d60d7748009492cbd8202fc191ef428278 diff --git a/dev-vcs/tortoisehg/tortoisehg-5.8.ebuild b/dev-vcs/tortoisehg/tortoisehg-5.8.ebuild new file mode 100644 index 000000000000..f54b981fe3da --- /dev/null +++ b/dev-vcs/tortoisehg/tortoisehg-5.8.ebuild @@ -0,0 +1,80 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +PYTHON_COMPAT=( python3_{7..9} ) + +DISTUTILS_USE_SETUPTOOLS=no + +inherit desktop distutils-r1 optfeature xdg-utils + +if [[ ${PV} != *9999* ]]; then + KEYWORDS="~amd64 ~arm64 ~x86" + SRC_URI="https://foss.heptapod.net/mercurial/${PN}/thg/-/archive/${PV}/thg-${PV}.tar.gz -> ${P}.tar.gz" + HG_DEPEND=">=dev-vcs/mercurial-5.7[${PYTHON_USEDEP}] + =mercurial-4.0 (bug #599266). + rm "${S}"/hgext3rd/__init__.py || die "can't remove /hgext3rd/__init__.py" + + sed -i -e 's:share/doc/tortoisehg:share/doc/'"${PF}"':' setup.py || die + distutils-r1_python_prepare_all +} + +python_test() { + ${EPYTHON} tests/run-tests.py -m 'not largefiles' --doctest-modules tests || die + ${EPYTHON} tests/run-tests.py -m largefiles tests || die +} + +python_install_all() { + distutils-r1_python_install_all + dodoc doc/ReadMe*.txt doc/TODO contrib/mergetools.rc + newicon -s scalable icons/scalable/apps/thg.svg thg_logo.svg + domenu contrib/thg.desktop +} + +pkg_postinst() { + xdg_icon_cache_update + elog "When startup of ${PN} fails with an API version mismatch error" + elog "between dev-python/sip and dev-python/PyQt5 please rebuild" + elog "dev-python/qscintilla-python." + + optfeature "the core git extension support" dev-python/pygit2 +} + +pkg_postrm() { + xdg_icon_cache_update +} diff --git a/dev-vcs/tortoisehg/tortoisehg-9999.ebuild b/dev-vcs/tortoisehg/tortoisehg-9999.ebuild index 439a13c2c812..f54b981fe3da 100644 --- a/dev-vcs/tortoisehg/tortoisehg-9999.ebuild +++ b/dev-vcs/tortoisehg/tortoisehg-9999.ebuild @@ -6,18 +6,19 @@ PYTHON_COMPAT=( python3_{7..9} ) DISTUTILS_USE_SETUPTOOLS=no -inherit desktop distutils-r1 xdg-utils +inherit desktop distutils-r1 optfeature xdg-utils if [[ ${PV} != *9999* ]]; then KEYWORDS="~amd64 ~arm64 ~x86" - SRC_URI="https://www.mercurial-scm.org/release/tortoisehg/targz/${P}.tar.gz" - HG_DEPEND=">=dev-vcs/mercurial-5.6[${PYTHON_USEDEP}] - =dev-python/qscintilla-python-2.9.4[qt5(+),${PYTHON_USEDEP}] " -DEPEND="${RDEPEND}" +DEPEND=" + ${RDEPEND} + test? ( + dev-python/mock + dev-python/pytest + ) +" distutils_enable_sphinx doc/source python_prepare_all() { # Remove file that collides with >=mercurial-4.0 (bug #599266). rm "${S}"/hgext3rd/__init__.py || die "can't remove /hgext3rd/__init__.py" + + sed -i -e 's:share/doc/tortoisehg:share/doc/'"${PF}"':' setup.py || die distutils-r1_python_prepare_all } +python_test() { + ${EPYTHON} tests/run-tests.py -m 'not largefiles' --doctest-modules tests || die + ${EPYTHON} tests/run-tests.py -m largefiles tests || die +} + python_install_all() { distutils-r1_python_install_all dodoc doc/ReadMe*.txt doc/TODO contrib/mergetools.rc @@ -55,6 +71,8 @@ pkg_postinst() { elog "When startup of ${PN} fails with an API version mismatch error" elog "between dev-python/sip and dev-python/PyQt5 please rebuild" elog "dev-python/qscintilla-python." + + optfeature "the core git extension support" dev-python/pygit2 } pkg_postrm() { -- cgit v1.2.3-65-gdbad