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

Diff of /eclass/git.eclass

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

Revision 1.28 Revision 1.31
1# Copyright 1999-2009 Gentoo Foundation 1# Copyright 1999-2009 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/Attic/git.eclass,v 1.28 2009/08/24 21:48:58 scarabeus Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/Attic/git.eclass,v 1.31 2009/10/20 10:05:47 scarabeus Exp $
4 4
5# @ECLASS: git.eclass 5# @ECLASS: git.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# Tomas Chvatal <scarabeus@gentoo.org> 7# Tomas Chvatal <scarabeus@gentoo.org>
8# Donnie Berkholz <dberkholz@gentoo.org> 8# Donnie Berkholz <dberkholz@gentoo.org>
73# https:// 73# https://
74# git:// 74# git://
75# git+ssh:// 75# git+ssh://
76# rsync:// 76# rsync://
77# ssh:// 77# ssh://
78eval X="\$${PN//-/_}_LIVE_REPO" 78eval X="\$${PN//[-+]/_}_LIVE_REPO"
79if [[ ${X} = "" ]]; then 79if [[ ${X} = "" ]]; then
80 EGIT_REPO_URI=${EGIT_REPO_URI:=} 80 EGIT_REPO_URI=${EGIT_REPO_URI:=}
81else 81else
82 EGIT_REPO_URI="${X}" 82 EGIT_REPO_URI="${X}"
83fi 83fi
90# http://git.collab.net/repo/git. and PN is subversion-git. 90# http://git.collab.net/repo/git. and PN is subversion-git.
91# it will check out like: 91# it will check out like:
92# ${EGIT_STORE_DIR}/subversion 92# ${EGIT_STORE_DIR}/subversion
93: ${EGIT_PROJECT:=${PN/-git}} 93: ${EGIT_PROJECT:=${PN/-git}}
94 94
95# @ECLASS-VARIABLE: EGIT_BOOSTRAP 95# @ECLASS-VARIABLE: EGIT_BOOTSTRAP
96# @DESCRIPTION: 96# @DESCRIPTION:
97# bootstrap script or command like autogen.sh or etc... 97# bootstrap script or command like autogen.sh or etc...
98: ${EGIT_BOOTSTRAP:=} 98: ${EGIT_BOOTSTRAP:=}
99 99
100# @ECLASS-VARIABLE: EGIT_OFFLINE 100# @ECLASS-VARIABLE: EGIT_OFFLINE
111# Please take note that this variable should be bash array. 111# Please take note that this variable should be bash array.
112 112
113# @ECLASS-VARIABLE: EGIT_BRANCH 113# @ECLASS-VARIABLE: EGIT_BRANCH
114# @DESCRIPTION: 114# @DESCRIPTION:
115# git eclass can fetch any branch in git_fetch(). 115# git eclass can fetch any branch in git_fetch().
116eval X="\$${PN//-/_}_LIVE_BRANCH" 116eval X="\$${PN//[-+]/_}_LIVE_BRANCH"
117if [[ ${X} = "" ]]; then 117if [[ ${X} = "" ]]; then
118 EGIT_BRANCH=${EGIT_BRANCH:=master} 118 EGIT_BRANCH=${EGIT_BRANCH:=master}
119else 119else
120 EGIT_BRANCH="${X}" 120 EGIT_BRANCH="${X}"
121fi 121fi
122 122
123# @ECLASS-VARIABLE: EGIT_TREE 123# @ECLASS-VARIABLE: EGIT_TREE
124# @DESCRIPTION: 124# @DESCRIPTION:
125# git eclass can checkout any tree (commit). 125# git eclass can checkout any tree (commit).
126eval X="\$${PN//-/_}_LIVE_TREE" 126eval X="\$${PN//[-+]/_}_LIVE_TREE"
127if [[ ${X} = "" ]]; then 127if [[ ${X} = "" ]]; then
128 : ${EGIT_TREE:=${EGIT_BRANCH}} 128 : ${EGIT_TREE:=${EGIT_BRANCH}}
129else 129else
130 EGIT_TREE="${X}" 130 EGIT_TREE="${X}"
131fi 131fi
261 if ${EGIT_REPACK} || ${EGIT_PRUNE} ; then 261 if ${EGIT_REPACK} || ${EGIT_PRUNE} ; then
262 ebegin "Garbage collecting the repository" 262 ebegin "Garbage collecting the repository"
263 git gc $(${EGIT_PRUNE} && echo '--prune') 263 git gc $(${EGIT_PRUNE} && echo '--prune')
264 eend $? 264 eend $?
265 fi 265 fi
266 266
267 # export the git version 267 # export the git version
268 export EGIT_VERSION="${cursha1}" 268 export EGIT_VERSION="${cursha1}"
269 269
270 [[ ${EGIT_TREE} != ${EGIT_BRANCH} ]] && elog " tree: ${EGIT_TREE}" 270 [[ ${EGIT_TREE} != ${EGIT_BRANCH} ]] && elog " tree: ${EGIT_TREE}"
271 ${elogcmd} " branch: ${EGIT_BRANCH}" 271 ${elogcmd} " branch: ${EGIT_BRANCH}"
273 273
274 # unpack to the ${S} 274 # unpack to the ${S}
275 unset GIT_DIR 275 unset GIT_DIR
276 debug-print "git clone -l -s -n \"${EGIT_STORE_DIR}/${EGIT_CLONE_DIR}\" \"${S}\"" 276 debug-print "git clone -l -s -n \"${EGIT_STORE_DIR}/${EGIT_CLONE_DIR}\" \"${S}\""
277 git clone -l -s -n "${EGIT_STORE_DIR}/${EGIT_CLONE_DIR}" "${S}" 277 git clone -l -s -n "${EGIT_STORE_DIR}/${EGIT_CLONE_DIR}" "${S}"
278 278
279 # set correct branch and the tree ebuild specified 279 # set correct branch and the tree ebuild specified
280 pushd "${S}" > /dev/null 280 pushd "${S}" > /dev/null
281 local branchname=branch-${EGIT_BRANCH} src=origin/${EGIT_BRANCH} 281 local branchname=branch-${EGIT_BRANCH} src=origin/${EGIT_BRANCH}
282 if [[ ${EGIT_TREE} != ${EGIT_BRANCH} ]]; then 282 if [[ ${EGIT_TREE} != ${EGIT_BRANCH} ]]; then
283 branchname=tree-${EGIT_TREE} 283 branchname=tree-${EGIT_TREE}
371# @FUNCTION: git_src_prepare 371# @FUNCTION: git_src_prepare
372# @DESCRIPTION: 372# @DESCRIPTION:
373# src_prepare function for git stuff. Patches, bootstrap... 373# src_prepare function for git stuff. Patches, bootstrap...
374git_src_prepare() { 374git_src_prepare() {
375 debug-print-function ${FUNCNAME} "$@" 375 debug-print-function ${FUNCNAME} "$@"
376 376
377 git_apply_patches 377 git_apply_patches
378 git_bootstrap 378 git_bootstrap
379} 379}

Legend:
Removed from v.1.28  
changed lines
  Added in v.1.31

  ViewVC Help
Powered by ViewVC 1.1.20