1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 # Original Author: l29ah
13 0|
1|
2|
3|
4) die
"this eclass doesn't support older EAPIs" ;;
14 5|
6|
7) inherit eutils
;;
17 EXPORT_FUNCTIONS src_unpack
21 [[ -z ${EFOSSIL_STORE_DIR} ]] && EFOSSIL_STORE_DIR
="${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}/fossil-src"
24 EFOSSIL_PROJECT
="${EFOSSIL_PROJECT:-${PN/-fossil}}"
27 local repo_uri
="${1:-${EFOSSIL_REPO_URI}}"
30 addwrite
"${EFOSSIL_STORE_DIR}"
31 if [[ ! -d ${EFOSSIL_STORE_DIR} ]]; then
32 debug-print
"${FUNCNAME}: initial checkout. creating fossil directory"
33 mkdir
-m 775 -p "${EFOSSIL_STORE_DIR}" || die "${EFOSSIL}: can't mkdir ${EFOSSIL_STORE_DIR}."
35 pushd "${EFOSSIL_STORE_DIR}" >/dev/null || die "${EFOSSIL}: can't chdir to ${EFOSSIL_STORE_DIR}"
36 mkdir
-m 775 -p "${EFOSSIL_PROJECT}" || die "${EFOSSIL}: can't mkdir ${EFOSSIL_PROJECT}."
37 cloned_repo
="${EFOSSIL_STORE_DIR}/${EFOSSIL_PROJECT}/${repo_uri##*/}"
38 if [[ -e "$cloned_repo" ]]; then
39 fossil pull
-R "$cloned_repo" "$repo_uri" || die
"${EFOSSIL}: can't pull ${repo_uri}."
41 fossil clone
"$repo_uri" "$cloned_repo" || die
"${EFOSSIL}: can't clone ${repo_uri}."
44 if ! has
"export" ${EFOSSIL_RESTRICT}; then
45 local S
="${S}/${S_dest}"
48 fossil open
--nested "$cloned_repo"
58 DEPEND
+=" dev-vcs/fossil"