From d934827bf44b7cfcf6711964418148fa60877668 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 25 Nov 2020 22:39:15 +0000 Subject: gentoo resync : 25.11.2020 --- dev-vcs/mercurial/mercurial-9999.ebuild | 37 ++++++++++++++++++++++++++++++--- 1 file changed, 34 insertions(+), 3 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 a008a42e4067..e30523a3f04d 100644 --- a/dev-vcs/mercurial/mercurial-9999.ebuild +++ b/dev-vcs/mercurial/mercurial-9999.ebuild @@ -5,8 +5,10 @@ EAPI=7 PYTHON_COMPAT=( python3_{6..8} ) PYTHON_REQ_USE="threads(+)" +DISTUTILS_USE_SETUPTOOLS=no +CARGO_OPTIONAL=1 -inherit bash-completion-r1 elisp-common eutils distutils-r1 mercurial flag-o-matic +inherit bash-completion-r1 cargo elisp-common eutils distutils-r1 mercurial flag-o-matic DESCRIPTION="Scalable distributed SCM" HOMEPAGE="https://www.mercurial-scm.org/" @@ -15,9 +17,11 @@ EHG_REPO_URI="https://www.mercurial-scm.org/repo/hg" LICENSE="GPL-2+" SLOT="0" KEYWORDS="" -IUSE="+chg emacs gpg test tk zsh-completion" +IUSE="+chg emacs gpg test tk rust zsh-completion" -BDEPEND="dev-python/docutils[${PYTHON_USEDEP}]" +BDEPEND=" + dev-python/docutils[${PYTHON_USEDEP}] + rust? ( ${RUST_DEPEND} )" RDEPEND=" app-misc/ca-certificates @@ -35,6 +39,14 @@ SITEFILE="70${PN}-gentoo.el" # Too many tests fail #608720 RESTRICT="test" +src_unpack() { + mercurial_src_unpack + if use rust; then + local S="${S}/rust/hg-cpython" + cargo_live_src_unpack + fi +} + python_prepare_all() { # fix up logic that won't work in Gentoo Prefix (also won't outside in # certain cases), bug #362891 @@ -48,9 +60,21 @@ python_prepare_all() { distutils-r1_python_prepare_all } +src_compile() { + if use rust; then + pushd rust/hg-cpython || die + cargo_src_compile + popd + fi + distutils-r1_src_compile +} + python_compile() { filter-flags -ftracer -ftree-vectorize python_is_python3 || local -x CFLAGS="${CFLAGS} -fno-strict-aliasing" + if use rust; then + local -x HGWITHRUSTEXT="cpython" + fi distutils-r1_python_compile build_ext --no-zstd } @@ -66,7 +90,14 @@ python_compile_all() { fi } +src_install() { + distutils-r1_src_install +} + python_install() { + if use rust; then + local -x HGWITHRUSTEXT="cpython" + fi distutils-r1_python_install build_ext --no-zstd } -- cgit v1.2.3