summaryrefslogtreecommitdiff
path: root/dev-vcs/mercurial/mercurial-9999.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-11-25 22:39:15 +0000
committerV3n3RiX <venerix@redcorelinux.org>2020-11-25 22:39:15 +0000
commitd934827bf44b7cfcf6711964418148fa60877668 (patch)
tree0625f358789b5e015e49db139cc1dbc9be00428f /dev-vcs/mercurial/mercurial-9999.ebuild
parent2e34d110f164bf74d55fced27fe0000201b3eec5 (diff)
gentoo resync : 25.11.2020
Diffstat (limited to 'dev-vcs/mercurial/mercurial-9999.ebuild')
-rw-r--r--dev-vcs/mercurial/mercurial-9999.ebuild37
1 files changed, 34 insertions, 3 deletions
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
}