From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Cc: "Michał Górny" <mgorny@gentoo.org>
Subject: [gentoo-dev] [PATCH 2/8] git-r3.eclass: Support EAPI 7
Date: Thu, 3 May 2018 12:18:05 +0200 [thread overview]
Message-ID: <20180503101811.28837-3-mgorny@gentoo.org> (raw)
In-Reply-To: <20180503101811.28837-1-mgorny@gentoo.org>
Enable support for EAPI 7. Use BDEPEND for dev-vcs/git dependency
since git is run at build time. Update has_version logic appropriately.
---
eclass/git-r3.eclass | 39 +++++++++++++++++++++++++++------------
1 file changed, 27 insertions(+), 12 deletions(-)
diff --git a/eclass/git-r3.eclass b/eclass/git-r3.eclass
index 75a589d0168d..279f03269314 100644
--- a/eclass/git-r3.eclass
+++ b/eclass/git-r3.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: git-r3.eclass
@@ -10,7 +10,7 @@
# git as remote repository.
case "${EAPI:-0}" in
- 0|1|2|3|4|5|6)
+ 0|1|2|3|4|5|6|7)
;;
*)
die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}"
@@ -22,7 +22,11 @@ EXPORT_FUNCTIONS src_unpack
if [[ ! ${_GIT_R3} ]]; then
if [[ ! ${_INHERITED_BY_GIT_2} ]]; then
- DEPEND=">=dev-vcs/git-1.8.2.1"
+ if [[ ${EAPI:-0} != [0123456] ]]; then
+ BDEPEND=">=dev-vcs/git-1.8.2.1"
+ else
+ DEPEND=">=dev-vcs/git-1.8.2.1"
+ fi
fi
# @ECLASS-VARIABLE: EGIT_CLONE_TYPE
@@ -648,16 +652,27 @@ git-r3_fetch() {
local clone_type=${EGIT_CLONE_TYPE}
if [[ ${r} == http://* || ${r} == https://* ]] &&
- [[ ! ${EGIT_CURL_WARNED} ]] &&
- ! ROOT=/ has_version 'dev-vcs/git[curl]'
+ [[ ! ${EGIT_CURL_WARNED} ]]
then
- ewarn "git-r3: fetching from HTTP(S) requested. In order to support HTTP(S),"
- ewarn "dev-vcs/git needs to be built with USE=curl. Example solution:"
- ewarn
- ewarn " echo dev-vcs/git curl >> /etc/portage/package.use"
- ewarn " emerge -1v dev-vcs/git"
- ewarn
- ewarn "HTTP(S) URIs will be skipped."
+ case ${EAPI:-0} in
+ 0|1|2|3|4)
+ ROOT=/ has_version 'dev-vcs/git[curl]';;
+ 5|6)
+ has_version --host-root 'dev-vcs/git[curl]';;
+ *)
+ has_version -b 'dev-vcs/git[curl]';;
+ esac
+
+ if [[ ${?} -ne 0 ]]; then
+ ewarn "git-r3: fetching from HTTP(S) requested. In order to support HTTP(S),"
+ ewarn "dev-vcs/git needs to be built with USE=curl. Example solution:"
+ ewarn
+ ewarn " echo dev-vcs/git curl >> /etc/portage/package.use"
+ ewarn " emerge -1v dev-vcs/git"
+ ewarn
+ ewarn "HTTP(S) URIs will be skipped."
+ fi
+
EGIT_CURL_WARNED=1
fi
--
2.17.0
next prev parent reply other threads:[~2018-05-03 10:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-03 10:18 [gentoo-dev] [PATCH 0/8] EAPI 7 in my eclasses, part one Michał Górny
2018-05-03 10:18 ` [gentoo-dev] [PATCH 1/8] bash-completion-r1.eclass: Allow EAPI 7 (no changes) Michał Górny
2018-05-03 10:18 ` Michał Górny [this message]
2018-05-03 10:18 ` [gentoo-dev] [PATCH 3/8] multibuild.eclass: Enable " Michał Górny
2018-05-03 10:18 ` [gentoo-dev] [PATCH 4/8] multilib-build.eclass: Enable EAPI 7 support Michał Górny
2018-05-03 10:18 ` [gentoo-dev] [PATCH 5/8] ninja-utils.eclass: Enable EAPI 7 (no changes) Michał Górny
2018-05-03 10:18 ` [gentoo-dev] [PATCH 6/8] out-of-source.eclass: " Michał Górny
2018-05-03 10:18 ` [gentoo-dev] [PATCH 7/8] scons-utils.eclass: Support EAPI 7 Michał Górny
2018-05-03 10:18 ` [gentoo-dev] [PATCH 8/8] multilib-minimal.eclass: Enable EAPI 7 (no changes) Michał Górny
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180503101811.28837-3-mgorny@gentoo.org \
--to=mgorny@gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox