diff options
author | Sergey Torokhov <torokhov-s-a@yandex.ru> | 2021-05-12 23:35:29 +0300 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2021-05-30 09:52:55 +0000 |
commit | 64ef96bc67f5033124d34df1329775cb09065203 (patch) | |
tree | acbeac14af598a2d205059f49c349d581fd2eaf8 /dev-vcs/tortoisehg | |
parent | dev-util/glib-utils: stable 2.66.8 for sparc, bug #775632 (diff) | |
download | gentoo-64ef96bc67f5033124d34df1329775cb09065203.tar.gz gentoo-64ef96bc67f5033124d34df1329775cb09065203.tar.bz2 gentoo-64ef96bc67f5033124d34df1329775cb09065203.zip |
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 <torokhov-s-a@yandex.ru>
Closes: https://github.com/gentoo/gentoo/pull/20788
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-vcs/tortoisehg')
-rw-r--r-- | dev-vcs/tortoisehg/Manifest | 1 | ||||
-rw-r--r-- | dev-vcs/tortoisehg/tortoisehg-5.8.ebuild | 80 | ||||
-rw-r--r-- | dev-vcs/tortoisehg/tortoisehg-9999.ebuild | 32 |
3 files changed, 106 insertions, 7 deletions
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}] + <dev-vcs/mercurial-5.9[${PYTHON_USEDEP}]" + S="${WORKDIR}/thg-${PV}" +else + inherit mercurial + EHG_REPO_URI="https://foss.heptapod.net/mercurial/${PN}/thg" + EHG_REVISION="stable" + HG_DEPEND=">=dev-vcs/mercurial-5.7[${PYTHON_USEDEP}]" +fi + +DESCRIPTION="Set of graphical tools for Mercurial" +HOMEPAGE="https://tortoisehg.bitbucket.io/" + +LICENSE="GPL-2" +SLOT="0" +IUSE="test" +RESTRICT="!test? ( test )" + +RDEPEND=" + ${HG_DEPEND} + dev-python/iniparse[${PYTHON_USEDEP}] + dev-python/pygments[${PYTHON_USEDEP}] + dev-python/PyQt5[network,svg,${PYTHON_USEDEP}] + >=dev-python/qscintilla-python-2.9.4[qt5(+),${PYTHON_USEDEP}] +" +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 + 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-vcs/mercurial-5.8[${PYTHON_USEDEP}]" + 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}] + <dev-vcs/mercurial-5.9[${PYTHON_USEDEP}]" + S="${WORKDIR}/thg-${PV}" else inherit mercurial - EHG_REPO_URI="https://foss.heptapod.net/mercurial/tortoisehg/thg" + EHG_REPO_URI="https://foss.heptapod.net/mercurial/${PN}/thg" EHG_REVISION="stable" - HG_DEPEND=">=dev-vcs/mercurial-5.6[${PYTHON_USEDEP}]" + HG_DEPEND=">=dev-vcs/mercurial-5.7[${PYTHON_USEDEP}]" fi DESCRIPTION="Set of graphical tools for Mercurial" @@ -25,6 +26,8 @@ HOMEPAGE="https://tortoisehg.bitbucket.io/" LICENSE="GPL-2" SLOT="0" +IUSE="test" +RESTRICT="!test? ( test )" RDEPEND=" ${HG_DEPEND} @@ -33,16 +36,29 @@ RDEPEND=" dev-python/PyQt5[network,svg,${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() { |