diff options
author | Sardem FF7 <sardemff7.pub@gmail.com> | 2011-04-16 16:05:16 +0200 |
---|---|---|
committer | Sardem FF7 <sardemff7.pub@gmail.com> | 2011-04-16 16:07:22 +0200 |
commit | 5917aab490d278cb15cec2aff6d92f5cb74516bf (patch) | |
tree | 769ab90d1368b7b0eb1722a9e363ae5d6d37b33c | |
parent | Disable old libstdc++ hacks (diff) | |
download | sardemff7-5917aab490d278cb15cec2aff6d92f5cb74516bf.tar.gz sardemff7-5917aab490d278cb15cec2aff6d92f5cb74516bf.tar.bz2 sardemff7-5917aab490d278cb15cec2aff6d92f5cb74516bf.zip |
Ebuildize the cloning/updating mozilla stuff
-rw-r--r-- | eclass/mozilla-scm.eclass | 71 | ||||
-rw-r--r-- | meta-sync/mozilla-repositories/Manifest | 1 | ||||
-rw-r--r-- | meta-sync/mozilla-repositories/mozilla-repositories-9999.ebuild | 98 | ||||
-rw-r--r-- | profiles/categories | 1 |
4 files changed, 108 insertions, 63 deletions
diff --git a/eclass/mozilla-scm.eclass b/eclass/mozilla-scm.eclass index 2e3e1f0..0a25eb7 100644 --- a/eclass/mozilla-scm.eclass +++ b/eclass/mozilla-scm.eclass @@ -8,7 +8,7 @@ # @BLURB: This eclass provides Mozilla SCM support WANT_AUTOCONF="2.1" -EAPI="3" +EAPI="4" inherit base eutils multilib toolchain-funcs autotools python @@ -63,27 +63,6 @@ EXPORT_FUNCTIONS pkg_setup src_unpack src_configure src_install pkg_postinst # Mercurial sources store directory. Users may override this in /etc/make.conf : ${EHG_STORE_DIR:=${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}/hg-src} -# @ECLASS-VARIABLE: EHG_QUIET -# @DESCRIPTION: -# Suppress some extra noise from mercurial, set it to be quiet. - -# @ECLASS-VARIABLE: EHG_CLONE_CMD -# @DESCRIPTION: -# Command used to perform initial repository clone. -: ${EHG_CLONE_CMD:=hg clone ${EHG_QUIET:+--quiet} --pull --noupdate} - -# @ECLASS-VARIABLE: EHG_PULL_CMD -# @DESCRIPTION: -# Command used to update repository. -: ${EHG_PULL_CMD:=hg pull ${EHG_QUIET:+--quiet}} - -# @ECLASS-VARIABLE: EHG_OFFLINE -# @DESCRIPTION: -# Set this variable to a non-empty value to disable the automatic updating of -# a mercurial source tree. This is intended to be set outside the ebuild by -# users. -: ${EHG_OFFLINE:=${ESCM_OFFLINE}} - ## ## Base common stuff @@ -98,55 +77,25 @@ RDEPEND=" ${IS_LIBXUL} || RDEPEND+="~net-libs/xulrunner-9999[libnotify=,mozdom=,raw=,system-sqlite=,webm=,wifi=]" DEPEND="${RDEPEND} + meta-sync/mozilla-repositories[mozdom=] + app-arch/zip - dev-vcs/mercurial dev-util/pkgconfig =dev-lang/python-2*[threads] " IUSE="" -function moz_hg_fetch { +function moz_hg_unpack { debug-print-function ${FUNCNAME} ${*} - local repo=${1} - local module="$(basename "${repo}")" + local module=${1} local dest="${WORKDIR}/${2:-${module}}" # 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 - # Checkout working copy: einfo "Creating working directory for ${module} (target revision: ${EHG_REVISION})" hg archive \ @@ -163,13 +112,9 @@ function moz_hg_fetch { ## src_unpack ## function mozilla-scm_src_unpack { - local base_module=${1:-${XULRUNNER_HG_MODULE}} - local old_offline="${EHG_OFFLINE}" - # It is xul stuff, so xul only can update them - ${IS_LIBXUL} || EHG_OFFLINE=yes - moz_hg_fetch "${MOZ_HG_BASE_URI}/${XULRUNNER_HG_MODULE}/" "${base_module}" - use mozdom && moz_hg_fetch "${MOZ_HG_BASE_URI}/${MOZDOM_HG_MODULE}/" "${base_module}/extensions/inspector" - EHG_OFFLINE="${old_offline}" + local base_dest=${1:-${XULRUNNER_HG_MODULE}} + moz_hg_unpack "${XULRUNNER_HG_MODULE}" "${base_dest}" + use mozdom && moz_hg_unpack "${MOZDOM_HG_MODULE}" "${base_dest}/extensions/inspector" } ## 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 +} diff --git a/profiles/categories b/profiles/categories index 440340c..39eaa4d 100644 --- a/profiles/categories +++ b/profiles/categories @@ -10,3 +10,4 @@ x11-misc x11-plugins x11-themes x11-wm +meta-sync |