aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSardem FF7 <sardemff7.pub@gmail.com>2011-04-16 16:05:16 +0200
committerSardem FF7 <sardemff7.pub@gmail.com>2011-04-16 16:07:22 +0200
commit5917aab490d278cb15cec2aff6d92f5cb74516bf (patch)
tree769ab90d1368b7b0eb1722a9e363ae5d6d37b33c /meta-sync
parentDisable old libstdc++ hacks (diff)
downloadsardemff7-5917aab490d278cb15cec2aff6d92f5cb74516bf.tar.gz
sardemff7-5917aab490d278cb15cec2aff6d92f5cb74516bf.tar.bz2
sardemff7-5917aab490d278cb15cec2aff6d92f5cb74516bf.zip
Ebuildize the cloning/updating mozilla stuff
Diffstat (limited to 'meta-sync')
-rw-r--r--meta-sync/mozilla-repositories/Manifest1
-rw-r--r--meta-sync/mozilla-repositories/mozilla-repositories-9999.ebuild98
2 files changed, 99 insertions, 0 deletions
diff --git a/meta-sync/mozilla-repositories/Manifest b/meta-sync/mozilla-repositories/Manifest
new file mode 100644
index 0000000..a17efd1
--- /dev/null
+++ b/meta-sync/mozilla-repositories/Manifest
@@ -0,0 +1 @@
+EBUILD mozilla-repositories-9999.ebuild 2588 RMD160 bccefd1db3b3cbf149b7277e5a7225611524ea26 SHA1 2a4efc37e3caf05e0df58772c345b3fd4770bb21 SHA256 ef883bbc23d266839dd545677a8f877ddf7685fa417e13e43766b9ba878cd5a8
diff --git a/meta-sync/mozilla-repositories/mozilla-repositories-9999.ebuild b/meta-sync/mozilla-repositories/mozilla-repositories-9999.ebuild
new file mode 100644
index 0000000..a0beb5e
--- /dev/null
+++ b/meta-sync/mozilla-repositories/mozilla-repositories-9999.ebuild
@@ -0,0 +1,98 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI="4"
+
+inherit eutils
+use enigmail && inherit cvs
+
+MOZ_HG_BASE_URI="http://hg.mozilla.org"
+
+DESCRIPTION="Mozilla Mercurial repositories"
+HOMEPAGE="${MOZ_HG_BASE_URI}"
+SRC_URI=""
+
+XULRUNNER_HG_MODULE="mozilla-central"
+MOZDOM_HG_MODULE="dom-inspector"
+THUNDERBIRD_HG_MODULE="comm-central"
+LDAP_SDKS_HG_MODULE="projects/ldap-sdks"
+
+# Enigmail CVS stuff
+ECVS_USER="guest"
+ECVS_PASS="guest"
+ECVS_SERVER="mozdev.org:/cvs"
+ECVS_MODULE="enigmail/src"
+
+KEYWORDS="~amd64 ~x86"
+IUSE="enigmail mozdom thunderbird"
+
+REQUIRE_USE="
+ enigmail? ( thunderbird )
+ "
+
+LICENSE="|| ( MPL-1.1 GPL-2 LGPL-2.1 )"
+SLOT="0"
+
+: ${EHG_STORE_DIR:=${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}/hg-src}
+: ${EHG_CLONE_CMD:=hg clone ${EHG_QUIET:+--quiet} --pull --noupdate}
+: ${EHG_PULL_CMD:=hg pull ${EHG_QUIET:+--quiet}}
+: ${EHG_OFFLINE:=${ESCM_OFFLINE}}
+
+DEPEND="
+ dev-vcs/mercurial
+ "
+RDEPEND=""
+
+S="${WORKDIR}"
+
+function moz_hg_fetch {
+ debug-print-function ${FUNCNAME} ${*}
+
+ local repo=${1}
+ local module="$(basename "${repo}")"
+
+
+ # Should be set but blank to prevent using $HOME/.hgrc
+ export HGRCPATH=
+
+ # Check ${EHG_STORE_DIR} directory:
+ addwrite "$(dirname "${EHG_STORE_DIR}")" || die "addwrite failed"
+ if [[ ! -d "${EHG_STORE_DIR}" ]]; then
+ mkdir -p "${EHG_STORE_DIR}" || die "failed to create ${EHG_STORE_DIR}"
+ chmod -f g+rw "${EHG_STORE_DIR}" || \
+ die "failed to chown ${EHG_STORE_DIR}"
+ fi
+
+ # Create project directory:
+ mkdir -p "${EHG_STORE_DIR}/mozilla" || \
+ die "failed to create ${EHG_STORE_DIR}/mozilla"
+ chmod -f g+rw "${EHG_STORE_DIR}/mozilla" || \
+ echo "Warning: failed to chmod g+rw mozilla"
+ cd "${EHG_STORE_DIR}/mozilla" || \
+ die "failed to cd to ${EHG_STORE_DIR}/mozilla"
+
+ # Clone/update repository:
+ if [[ ! -d "${module}" ]]; then
+ einfo "Cloning ${repo} to ${EHG_STORE_DIR}/mozilla/${module}"
+ ${EHG_CLONE_CMD} "${repo}" "${module}" || {
+ rm -rf "${module}"
+ die "failed to clone ${repo}"
+ }
+ cd "${module}"
+ elif [[ -z "${EHG_OFFLINE}" ]]; then
+ einfo "Updating ${EHG_STORE_DIR}/mozilla/${module} from ${repo}"
+ cd "${module}" || die "failed to cd to ${module}"
+ ${EHG_PULL_CMD} || die "update failed"
+ fi
+}
+
+function src_unpack {
+ moz_hg_fetch "${MOZ_HG_BASE_URI}/${XULRUNNER_HG_MODULE}/"
+ use mozdom && moz_hg_fetch "${MOZ_HG_BASE_URI}/${MOZDOM_HG_MODULE}/"
+ if use thunderbird; then
+ moz_hg_fetch "${MOZ_HG_BASE_URI}/${THUNDERBIRD_HG_MODULE}"
+ moz_hg_fetch "${MOZ_HG_BASE_URI}/${LDAP_SDKS_HG_MODULE}"
+ use enigmail && cvs_src_unpack
+ fi
+}