Skip to content
This repository has been archived by the owner on May 30, 2023. It is now read-only.

Commit

Permalink
eclass/mercurial: Sync with gentoo
Browse files Browse the repository at this point in the history
It's from gentoo commit 9f24bebc8dd0d5dd6b8c683ea8bc1b39c64481d4.
  • Loading branch information
krnowak committed Feb 22, 2022
1 parent 104eee1 commit b74b363
Showing 1 changed file with 25 additions and 5 deletions.
30 changes: 25 additions & 5 deletions eclass/mercurial.eclass
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 1999-2014 Gentoo Foundation
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

# @ECLASS: mercurial.eclass
Expand All @@ -7,18 +7,33 @@
# @AUTHOR:
# Next gen author: Krzysztof Pawlik <nelchael@gentoo.org>
# Original author: Aron Griffis <agriffis@gentoo.org>
# @SUPPORTED_EAPIS: 7 8
# @BLURB: This eclass provides generic mercurial fetching functions
# @DESCRIPTION:
# This eclass provides generic mercurial fetching functions. To fetch sources
# from mercurial repository just set EHG_REPO_URI to correct repository URI. If
# you need to share single repository between several ebuilds set EHG_PROJECT to
# project name in all of them.

inherit eutils
case ${EAPI:-0} in
[78]) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac

EXPORT_FUNCTIONS src_unpack
if [[ -z ${_MERCURIAL_ECLASS} ]] ; then
_MERCURIAL_ECLASS=1

PROPERTIES+=" live"

case ${EAPI:-0} in
7)
# For compatibiilty only (indirect inherits).
# Eclass itself doesn't need it.
inherit eutils
;;
esac

DEPEND="dev-vcs/mercurial"
BDEPEND="dev-vcs/mercurial"

# @ECLASS-VARIABLE: EHG_REPO_URI
# @DESCRIPTION:
Expand All @@ -33,6 +48,7 @@ DEPEND="dev-vcs/mercurial"
: ${EHG_REVISION:="default"}

# @ECLASS-VARIABLE: EHG_STORE_DIR
# @USER_VARIABLE
# @DESCRIPTION:
# Mercurial sources store directory. Users may override this in /etc/portage/make.conf
[[ -z "${EHG_STORE_DIR}" ]] && EHG_STORE_DIR="${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}/hg-src"
Expand All @@ -45,7 +61,7 @@ DEPEND="dev-vcs/mercurial"
# between several ebuilds.
[[ -z "${EHG_PROJECT}" ]] && EHG_PROJECT="${PN}"

# @ECLASS-VARIABLE: EGIT_CHECKOUT_DIR
# @ECLASS-VARIABLE: EHG_CHECKOUT_DIR
# @DESCRIPTION:
# The directory to check the hg sources out to.
#
Expand Down Expand Up @@ -199,3 +215,7 @@ function mercurial_src_unpack {
mercurial_fetch
mercurial_bootstrap
}

fi

EXPORT_FUNCTIONS src_unpack

0 comments on commit b74b363

Please sign in to comment.