aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSardem FF7 <sardemff7.pub@gmail.com>2011-03-09 14:30:57 +0100
committerSardem FF7 <sardemff7.pub@gmail.com>2011-03-09 14:42:06 +0100
commit061c0a4e04034e7b3725aaa1ec5ebec7b4787164 (patch)
tree755d2be5f51243a52056b52c07f4064b29748376
parentSome fixes (diff)
downloadsardemff7-061c0a4e04034e7b3725aaa1ec5ebec7b4787164.tar.gz
sardemff7-061c0a4e04034e7b3725aaa1ec5ebec7b4787164.tar.bz2
sardemff7-061c0a4e04034e7b3725aaa1ec5ebec7b4787164.zip
More flexible fetching system
-rw-r--r--eclass/mozilla-scm.eclass26
1 files changed, 14 insertions, 12 deletions
diff --git a/eclass/mozilla-scm.eclass b/eclass/mozilla-scm.eclass
index 19ddd45..5faf996 100644
--- a/eclass/mozilla-scm.eclass
+++ b/eclass/mozilla-scm.eclass
@@ -14,10 +14,15 @@ inherit base eutils multilib toolchain-funcs autotools python
MAJ_XUL_PV="2.0"
+MOZ_HG_BASE_URI="http://hg.mozilla.org"
+
+XULRUNNER_HG_MODULE="mozilla-central"
+MOZDOM_HG_MODULE="dom-inspector"
+
LICENSE="|| ( MPL-1.1 GPL-2 LGPL-2.1 )"
SLOT="0"
SRC_URI=""
-S="${WORKDIR}/mozilla-central"
+S="${WORKDIR}/${XULRUNNER_HG_MODULE}"
#
# Some per-application stuff
@@ -78,9 +83,6 @@ EXPORT_FUNCTIONS pkg_setup src_unpack src_configure src_install pkg_postinst
: ${EHG_OFFLINE:=${ESCM_OFFLINE}}
-# @ECLASS-VARIABLE: MOZILLA_BONUS_REPOS_URIS
-: ${MOZILLA_BONUS_REPOS_URIS:=}
-
##
## Base common stuff
##
@@ -102,12 +104,13 @@ DEPEND="${RDEPEND}
IUSE=""
-function mercurial_fetch {
+function moz_hg_fetch {
debug-print-function ${FUNCNAME} ${*}
local repo=${1}
-
local module="$(basename "${repo}")"
+ local dest="${WORKDIR}/${2:-${module}}"
+
# Should be set but blank to prevent using $HOME/.hgrc
export HGRCPATH=
@@ -148,8 +151,8 @@ function mercurial_fetch {
${EHG_QUIET_CMD_OPT} \
--rev="${EHG_REVISION}" \
-R "${EHG_STORE_DIR}/mozilla/${module}" \
- "${WORKDIR}/${module}" || die "hg clone failed"
- einfo "Work directory: ${WORKDIR}/${module}"
+ "${dest}" || die "hg clone failed"
+ einfo "Work directory: ${dest}"
}
@@ -158,10 +161,9 @@ function mercurial_fetch {
## src_unpack
##
function mozilla-scm_src_unpack {
- mercurial_fetch "http://hg.mozilla.org/mozilla-central/"
- for repo in ${MOZILLA_BONUS_REPOS_URIS}; do
- mercurial_fetch "${repo}"
- done
+ local base_module=${1:-${XULRUNNER_HG_MODULE}}
+ moz_hg_fetch "${MOZ_HG_BASE_URI}/${XULRUNNER_HG_MODULE}/" "${base_module}"
+ moz_hg_fetch "${MOZ_HG_BASE_URI}/${MOZDOM_HG_MODULE}/" "${base_module}/extensions/inspector"
}
##