From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id B64C01382C5 for ; Mon, 7 May 2018 07:43:41 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 145E6E0870; Mon, 7 May 2018 07:43:41 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id E1797E0870 for ; Mon, 7 May 2018 07:43:40 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B4C7F335C78 for ; Mon, 7 May 2018 07:43:39 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id D0432243 for ; Mon, 7 May 2018 07:43:37 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1525679005.e70d65f11549d06beab46835ab67a6b30edb1798.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/ X-VCS-Repository: repo/gentoo X-VCS-Files: eclass/git-r3.eclass X-VCS-Directories: eclass/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: e70d65f11549d06beab46835ab67a6b30edb1798 X-VCS-Branch: master Date: Mon, 7 May 2018 07:43:37 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: e0e61992-8607-47e3-8675-5dfcf2ed4461 X-Archives-Hash: bdbb3753d895d1685065ee829fae8525 commit: e70d65f11549d06beab46835ab67a6b30edb1798 Author: Michał Górny gentoo org> AuthorDate: Thu May 3 09:43:46 2018 +0000 Commit: Michał Górny gentoo org> CommitDate: Mon May 7 07:43:25 2018 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e70d65f1 git-r3.eclass: Support EAPI 7 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 75a589d0168..279f0326931 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