mirror of
https://github.com/flatcar/scripts.git
synced 2025-10-01 02:22:11 +02:00
eclass/mercurial: Sync with gentoo
It's from gentoo commit 9f24bebc8dd0d5dd6b8c683ea8bc1b39c64481d4.
This commit is contained in:
parent
c6a76af95b
commit
c2353cfbbb
@ -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
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
# @ECLASS: mercurial.eclass
|
# @ECLASS: mercurial.eclass
|
||||||
@ -7,6 +7,7 @@
|
|||||||
# @AUTHOR:
|
# @AUTHOR:
|
||||||
# Next gen author: Krzysztof Pawlik <nelchael@gentoo.org>
|
# Next gen author: Krzysztof Pawlik <nelchael@gentoo.org>
|
||||||
# Original author: Aron Griffis <agriffis@gentoo.org>
|
# Original author: Aron Griffis <agriffis@gentoo.org>
|
||||||
|
# @SUPPORTED_EAPIS: 7 8
|
||||||
# @BLURB: This eclass provides generic mercurial fetching functions
|
# @BLURB: This eclass provides generic mercurial fetching functions
|
||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
# This eclass provides generic mercurial fetching functions. To fetch sources
|
# This eclass provides generic mercurial fetching functions. To fetch sources
|
||||||
@ -14,11 +15,25 @@
|
|||||||
# you need to share single repository between several ebuilds set EHG_PROJECT to
|
# you need to share single repository between several ebuilds set EHG_PROJECT to
|
||||||
# project name in all of them.
|
# 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
|
||||||
|
|
||||||
DEPEND="dev-vcs/mercurial"
|
PROPERTIES+=" live"
|
||||||
|
|
||||||
|
case ${EAPI:-0} in
|
||||||
|
7)
|
||||||
|
# For compatibiilty only (indirect inherits).
|
||||||
|
# Eclass itself doesn't need it.
|
||||||
|
inherit eutils
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
BDEPEND="dev-vcs/mercurial"
|
||||||
|
|
||||||
# @ECLASS-VARIABLE: EHG_REPO_URI
|
# @ECLASS-VARIABLE: EHG_REPO_URI
|
||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
@ -33,6 +48,7 @@ DEPEND="dev-vcs/mercurial"
|
|||||||
: ${EHG_REVISION:="default"}
|
: ${EHG_REVISION:="default"}
|
||||||
|
|
||||||
# @ECLASS-VARIABLE: EHG_STORE_DIR
|
# @ECLASS-VARIABLE: EHG_STORE_DIR
|
||||||
|
# @USER_VARIABLE
|
||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
# Mercurial sources store directory. Users may override this in /etc/portage/make.conf
|
# 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"
|
[[ -z "${EHG_STORE_DIR}" ]] && EHG_STORE_DIR="${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}/hg-src"
|
||||||
@ -45,7 +61,7 @@ DEPEND="dev-vcs/mercurial"
|
|||||||
# between several ebuilds.
|
# between several ebuilds.
|
||||||
[[ -z "${EHG_PROJECT}" ]] && EHG_PROJECT="${PN}"
|
[[ -z "${EHG_PROJECT}" ]] && EHG_PROJECT="${PN}"
|
||||||
|
|
||||||
# @ECLASS-VARIABLE: EGIT_CHECKOUT_DIR
|
# @ECLASS-VARIABLE: EHG_CHECKOUT_DIR
|
||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
# The directory to check the hg sources out to.
|
# The directory to check the hg sources out to.
|
||||||
#
|
#
|
||||||
@ -199,3 +215,7 @@ function mercurial_src_unpack {
|
|||||||
mercurial_fetch
|
mercurial_fetch
|
||||||
mercurial_bootstrap
|
mercurial_bootstrap
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
EXPORT_FUNCTIONS src_unpack
|
||||||
|
Loading…
x
Reference in New Issue
Block a user