From 29aabba0ea759c6a2864ff5631735b67ee38e5e0 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 5 Feb 2020 18:44:56 +0000 Subject: gentoo resync : 05.02.2020 --- dev-vcs/mercurial/mercurial-9999.ebuild | 107 +++++++++++++++++--------------- 1 file changed, 57 insertions(+), 50 deletions(-) (limited to 'dev-vcs/mercurial/mercurial-9999.ebuild') diff --git a/dev-vcs/mercurial/mercurial-9999.ebuild b/dev-vcs/mercurial/mercurial-9999.ebuild index 4715bed5111f..8c12d545eb87 100644 --- a/dev-vcs/mercurial/mercurial-9999.ebuild +++ b/dev-vcs/mercurial/mercurial-9999.ebuild @@ -1,32 +1,42 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=5 +EAPI=7 -PYTHON_COMPAT=( python2_7 ) -PYTHON_REQ_USE="threads" +PYTHON_COMPAT=( python2_7 python3_{6..7} ) +PYTHON_REQ_USE="threads(+)" inherit bash-completion-r1 elisp-common eutils distutils-r1 mercurial flag-o-matic DESCRIPTION="Scalable distributed SCM" HOMEPAGE="https://www.mercurial-scm.org/" -EHG_REPO_URI="http://selenic.com/repo/hg" -EHG_REVISION="@" +EHG_REPO_URI="https://www.mercurial-scm.org/repo/hg" LICENSE="GPL-2+" SLOT="0" KEYWORDS="" IUSE="+chg bugzilla emacs gpg test tk zsh-completion" -RDEPEND="bugzilla? ( dev-python/mysql-python[${PYTHON_USEDEP}] ) +BROKEN_PYTHON=" + !~dev-python/python-3.5.0 + !~dev-python/python-3.5.1 + !~dev-python/python-3.5.2 + !~dev-python/python-3.6.0 + !~dev-python/python-3.6.1" + +BDEPEND="${BROKEN_PYTHON} + dev-python/docutils[${PYTHON_USEDEP}]" + +RDEPEND="${BROKEN_PYTHON} + app-misc/ca-certificates + dev-python/zstandard[${PYTHON_USEDEP}] gpg? ( app-crypt/gnupg ) tk? ( dev-lang/tk ) - zsh-completion? ( app-shells/zsh ) - app-misc/ca-certificates" + zsh-completion? ( app-shells/zsh )" + DEPEND="emacs? ( >=app-editors/emacs-23.1:* ) test? ( app-arch/unzip - dev-python/pygments[${PYTHON_USEDEP}] ) - dev-python/docutils[${PYTHON_USEDEP}]" + dev-python/pygments[${PYTHON_USEDEP}] )" SITEFILE="70${PN}-gentoo.el" @@ -37,20 +47,23 @@ python_prepare_all() { # fix up logic that won't work in Gentoo Prefix (also won't outside in # certain cases), bug #362891 sed -i -e 's:xcodebuild:nocodebuild:' setup.py || die + sed -i -e '/ hgenv =/a\' -e ' hgenv.pop("PYTHONPATH", None)' setup.py || die + # Use absolute import for zstd + sed -i -e 's/from \.* import zstd/import zstd/' \ + mercurial/utils/compression.py \ + mercurial/wireprotoframing.py || die distutils-r1_python_prepare_all } -python_configure_all() { +python_compile() { strip-flags -ftracer -ftree-vectorize - # Note: make it impl-conditional if py3 is supported - append-flags -fno-strict-aliasing - - "${PYTHON}" setup.py build_mo || die + python_is_python3 || local -x CFLAGS="${CFLAGS} -fno-strict-aliasing" + distutils-r1_python_compile build_ext --no-zstd } python_compile_all() { - rm -r contrib/{win32,macosx} || die + rm -r contrib/win32 || die emake doc if use chg; then emake -C contrib/chg @@ -61,6 +74,10 @@ python_compile_all() { fi } +python_install() { + distutils-r1_python_install build_ext --no-zstd +} + python_install_all() { distutils-r1_python_install_all @@ -71,12 +88,10 @@ python_install_all() { newins contrib/zsh_completion _hg fi - rm -f doc/*.?.txt || die - dodoc CONTRIBUTORS doc/*.txt - cp hgweb*.cgi "${ED}"/usr/share/doc/${PF}/ || die - dobin hgeditor - dobin contrib/hgk + if use tk; then + dobin contrib/hgk + fi python_foreach_impl python_doscript contrib/hg-ssh if use emacs; then @@ -84,8 +99,7 @@ python_install_all() { elisp-site-file-install "${FILESDIR}"/${SITEFILE} fi - local RM_CONTRIB=(hgk hg-ssh bash_completion zsh_completion wix buildrpm plan9 - *.el mercurial.spec) + local RM_CONTRIB=( hgk hg-ssh bash_completion zsh_completion plan9 *.el ) if use chg; then dobin contrib/chg/chg @@ -94,47 +108,40 @@ python_install_all() { fi for f in ${RM_CONTRIB[@]}; do - rm -rf contrib/$f || die + rm -rf contrib/${f} || die done dodoc -r contrib docompress -x /usr/share/doc/${PF}/contrib doman doc/*.? - - cat > "${T}/80mercurial" <<-EOF -HG="${EPREFIX}/usr/bin/hg" -EOF - doenvd "${T}/80mercurial" + dodoc CONTRIBUTORS hgweb.cgi insinto /etc/mercurial/hgrc.d doins "${FILESDIR}/cacerts.rc" } src_test() { - cd tests || die - rm -rf *svn* || die # Subversion tests fail with 1.5 - rm -f test-archive* || die # Fails due to verbose tar output changes - rm -f test-convert-baz* || die # GNU Arch baz - rm -f test-convert-cvs* || die # CVS - rm -f test-convert-darcs* || die # Darcs - rm -f test-convert-git* || die # git - rm -f test-convert-mtn* || die # monotone - rm -f test-convert-tla* || die # GNU Arch tla - rm -f test-doctest* || die # doctest always fails with python 2.5.x - rm -f test-largefiles* || die # tends to time out + pushd tests &>/dev/null || die + rm -rf *svn* # Subversion tests fail with 1.5 + rm -f test-archive* # Fails due to verbose tar output changes + rm -f test-convert-baz* # GNU Arch baz + rm -f test-convert-cvs* # CVS + rm -f test-convert-darcs* # Darcs + rm -f test-convert-git* # git + rm -f test-convert-mtn* # monotone + rm -f test-convert-tla* # GNU Arch tla + rm -f test-largefiles* # tends to time out if [[ ${EUID} -eq 0 ]]; then einfo "Removing tests which require user privileges to succeed" - rm -f test-command-template* || die # Test is broken when run as root - rm -f test-convert* || die # Test is broken when run as root - rm -f test-lock-badness* || die # Test is broken when run as root - rm -f test-permissions* || die # Test is broken when run as root - rm -f test-pull-permission* || die # Test is broken when run as root - rm -f test-clone-failure* || die - rm -f test-journal-exists* || die - rm -f test-repair-strip* || die + rm -f test-convert* + rm -f test-lock-badness* + rm -f test-permissions* + rm -f test-pull-permission* + rm -f test-journal-exists* + rm -f test-repair-strip* fi - cd .. || die + popd &>/dev/null || die distutils-r1_src_test } -- cgit v1.2.3