diff options
author | Mike Frysinger <vapier@gentoo.org> | 2011-12-12 22:47:55 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2011-12-12 22:47:55 +0000 |
commit | 23fe077ec21cf3e2027079181d004a2dde2f88a1 (patch) | |
tree | a8b1be7066d78d8ab77a7a76bf615be628ba4159 /eclass | |
parent | Version bump. Accessibility fixes, translation updates. (diff) | |
download | gentoo-2-23fe077ec21cf3e2027079181d004a2dde2f88a1.tar.gz gentoo-2-23fe077ec21cf3e2027079181d004a2dde2f88a1.tar.bz2 gentoo-2-23fe077ec21cf3e2027079181d004a2dde2f88a1.zip |
add git support
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/toolchain-binutils.eclass | 43 |
1 files changed, 31 insertions, 12 deletions
diff --git a/eclass/toolchain-binutils.eclass b/eclass/toolchain-binutils.eclass index 6eb66de707fe..c00cb7bbfbd8 100644 --- a/eclass/toolchain-binutils.eclass +++ b/eclass/toolchain-binutils.eclass @@ -1,6 +1,6 @@ -# Copyright 1999-2010 Gentoo Foundation +# Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-binutils.eclass,v 1.105 2011/12/12 22:23:10 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-binutils.eclass,v 1.106 2011/12/12 22:47:55 vapier Exp $ # # Maintainer: Toolchain Ninjas <toolchain@gentoo.org> # @@ -8,7 +8,8 @@ # us easily merge multiple versions for multiple targets (if we wish) and # then switch the versions on the fly (with `binutils-config`). # -# binutils-9999 -> live cvs +# binutils-99999999 -> live cvs +# binutils-9999 -> live git # binutils-9999_preYYMMDD -> nightly snapshot date YYMMDD # binutils-# -> normal release @@ -17,26 +18,37 @@ if [[ -n ${BINUTILS_TYPE} ]] ; then BTYPE=${BINUTILS_TYPE} else case ${PV} in - 9999) BTYPE="cvs";; + 99999999) BTYPE="cvs";; + 9999) BTYPE="git";; 9999_pre*) BTYPE="snap";; *) BTYPE="rel";; esac fi -if [[ ${BTYPE} == "cvs" ]] ; then +case ${BTYPE} in +cvs) extra_eclass="cvs" ECVS_SERVER="sourceware.org:/cvs/src" ECVS_MODULE="binutils" ECVS_USER="anoncvs" ECVS_PASS="anoncvs" BVER="cvs" -elif [[ ${BTYPE} == "snap" ]] ; then + ;; +git) + extra_eclass="git-2" + BVER="git" + EGIT_REPO_URI="git://sourceware.org/git/binutils.git" + ;; +snap) BVER=${PV/9999_pre} -elif [[ ${BTYPE} == "rel" ]] ; then + ;; +rel) BVER=${PV} -else + ;; +*) BVER=${BINUTILS_VER} -fi + ;; +esac inherit eutils libtool flag-o-matic gnuconfig multilib versionator ${extra_eclass} EXPORT_FUNCTIONS src_unpack src_compile src_test src_install pkg_postinst pkg_postrm @@ -53,7 +65,7 @@ DESCRIPTION="Tools necessary to build programs" HOMEPAGE="http://sources.redhat.com/binutils/" case ${BTYPE} in - cvs) SRC_URI="";; + cvs|git) SRC_URI="" ;; snap) SRC_URI="ftp://gcc.gnu.org/pub/binutils/snapshots/binutils-${BVER}.tar.bz2";; rel) SRC_URI="mirror://kernel/linux/devel/binutils/binutils-${PV}.tar.bz2 @@ -98,7 +110,10 @@ DEPEND="${RDEPEND} virtual/yacc" S=${WORKDIR}/binutils -[[ ${BVER} != "cvs" ]] && S=${S}-${BVER} +case ${BVER} in +cvs|git) ;; +*) S=${S}-${BVER} ;; +esac LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${BVER} INCPATH=${LIBPATH}/include @@ -111,7 +126,11 @@ else fi tc-binutils_unpack() { - unpack ${A} + case ${BTYPE} in + cvs) cvs_src_unpack ;; + git) git-2_src_unpack ;; + *) unpack ${A} ;; + esac mkdir -p "${MY_BUILDDIR}" [[ -d ${WORKDIR}/patch ]] && mkdir "${WORKDIR}"/patch/skip } |