/[gentoo-x86]/eclass/git-r3.eclass
Gentoo

Diff of /eclass/git-r3.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.34 Revision 1.35
1# Copyright 1999-2014 Gentoo Foundation 1# Copyright 1999-2014 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v 1.34 2014/03/02 11:48:28 mgorny Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v 1.35 2014/03/02 11:49:05 mgorny Exp $
4 4
5# @ECLASS: git-r3.eclass 5# @ECLASS: git-r3.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# Michał Górny <mgorny@gentoo.org> 7# Michał Górny <mgorny@gentoo.org>
8# @BLURB: Eclass for fetching and unpacking git repositories. 8# @BLURB: Eclass for fetching and unpacking git repositories.
56# unavailable calls like 'git describe' will not reference prior tags. 56# unavailable calls like 'git describe' will not reference prior tags.
57# No purging of old references is done. This mode is intended mostly for 57# No purging of old references is done. This mode is intended mostly for
58# embedded systems with limited disk space. 58# embedded systems with limited disk space.
59: ${EGIT_CLONE_TYPE:=single} 59: ${EGIT_CLONE_TYPE:=single}
60 60
61# @ECLASS-VARIABLE: EGIT_MIN_CLONE_TYPE
62# @DESCRIPTION:
63# 'Minimum' clone type supported by the ebuild. Takes same values
64# as EGIT_CLONE_TYPE. When user sets a type that's 'lower' (that is,
65# later on the list) than EGIT_MIN_CLONE_TYPE, the eclass uses
66# EGIT_MIN_CLONE_TYPE instead.
67#
68# A common case is to use 'single' whenever the build system requires
69# access to full branch history or the remote (Google Code) does not
70# support shallow clones. Please use sparingly, and to fix fatal errors
71# rather than 'non-pretty versions'.
72: ${EGIT_MIN_CLONE_TYPE:=shallow}
73
61# @ECLASS-VARIABLE: EGIT3_STORE_DIR 74# @ECLASS-VARIABLE: EGIT3_STORE_DIR
62# @DESCRIPTION: 75# @DESCRIPTION:
63# Storage directory for git sources. 76# Storage directory for git sources.
64# 77#
65# This is intended to be set by user in make.conf. Ebuilds must not set 78# This is intended to be set by user in make.conf. Ebuilds must not set
137 case "${EGIT_CLONE_TYPE}" in 150 case "${EGIT_CLONE_TYPE}" in
138 mirror|single|shallow) 151 mirror|single|shallow)
139 ;; 152 ;;
140 *) 153 *)
141 die "Invalid EGIT_CLONE_TYPE=${EGIT_CLONE_TYPE}" 154 die "Invalid EGIT_CLONE_TYPE=${EGIT_CLONE_TYPE}"
155 esac
156 case "${EGIT_MIN_CLONE_TYPE}" in
157 shallow)
158 ;;
159 single)
160 if [[ ${EGIT_CLONE_TYPE} == shallow ]]; then
161 einfo "git-r3: ebuild needs to be cloned in 'single' mode, adjusting"
162 EGIT_CLONE_TYPE=single
163 fi
164 ;;
165 mirror)
166 if [[ ${EGIT_CLONE_TYPE} != mirror ]]; then
167 einfo "git-r3: ebuild needs to be cloned in 'mirror' mode, adjusting"
168 EGIT_CLONE_TYPE=mirror
169 fi
170 ;;
171 *)
172 die "Invalid EGIT_MIN_CLONE_TYPE=${EGIT_MIN_CLONE_TYPE}"
142 esac 173 esac
143 174
144 local esc_pn livevar 175 local esc_pn livevar
145 esc_pn=${PN//[-+]/_} 176 esc_pn=${PN//[-+]/_}
146 177

Legend:
Removed from v.1.34  
changed lines
  Added in v.1.35

  ViewVC Help
Powered by ViewVC 1.1.20