1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 # Original Author: l29ah
15 0|
1|
2|
3|
4) die
"this eclass doesn't support older EAPIs" ;;
18 EXPORT_FUNCTIONS src_unpack
22 [[ -z ${EFOSSIL_STORE_DIR} ]] && EFOSSIL_STORE_DIR
="${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}/fossil-src"
25 EFOSSIL_PROJECT
="${EFOSSIL_PROJECT:-${PN/-fossil}}"
28 local repo_uri
="${1:-${EFOSSIL_REPO_URI}}"
31 addwrite
"${EFOSSIL_STORE_DIR}"
32 if [[ ! -d ${EFOSSIL_STORE_DIR} ]]; then
33 debug-print
"${FUNCNAME}: initial checkout. creating fossil directory"
34 mkdir
-m 775 -p "${EFOSSIL_STORE_DIR}" || die "${EFOSSIL}: can't mkdir ${EFOSSIL_STORE_DIR}."
36 pushd "${EFOSSIL_STORE_DIR}" >/dev/null || die "${EFOSSIL}: can't chdir to ${EFOSSIL_STORE_DIR}"
37 mkdir
-m 775 -p "${EFOSSIL_PROJECT}" || die "${EFOSSIL}: can't mkdir ${EFOSSIL_PROJECT}."
38 cloned_repo
="${EFOSSIL_STORE_DIR}/${EFOSSIL_PROJECT}/${repo_uri##*/}"
39 if [[ -e "$cloned_repo" ]]; then
40 fossil
--user portage pull
-R "$cloned_repo" "$repo_uri" || die
"${EFOSSIL}: can't pull ${repo_uri}."
42 fossil
--user portage clone
"$repo_uri" "$cloned_repo" || die
"${EFOSSIL}: can't clone ${repo_uri}."
45 if ! has
"export" ${EFOSSIL_RESTRICT}; then
46 local S
="${S}/${S_dest}"
49 fossil open
--nested "$cloned_repo"
59 DEPEND
+=" dev-vcs/fossil"