From 87cdfa61759795f14aff54a189e876f180d1619f Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 26 Apr 2012 02:14:55 +0000 Subject: use .xz tarballs with newer hjlu releases --- eclass/toolchain-binutils.eclass | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'eclass') diff --git a/eclass/toolchain-binutils.eclass b/eclass/toolchain-binutils.eclass index 34b42b7e1f22..f2631856f470 100644 --- a/eclass/toolchain-binutils.eclass +++ b/eclass/toolchain-binutils.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-binutils.eclass,v 1.111 2012/03/05 18:55:47 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-binutils.eclass,v 1.112 2012/04/26 02:14:55 vapier Exp $ # # Maintainer: Toolchain Ninjas # @@ -48,7 +48,7 @@ snap) ;; esac -inherit eutils libtool flag-o-matic gnuconfig multilib versionator ${extra_eclass} +inherit eutils libtool flag-o-matic gnuconfig multilib versionator unpacker ${extra_eclass} EXPORT_FUNCTIONS src_unpack src_compile src_test src_install pkg_postinst pkg_postrm export CTARGET=${CTARGET:-${CHOST}} @@ -65,18 +65,25 @@ HOMEPAGE="http://sources.redhat.com/binutils/" case ${BTYPE} in cvs|git) SRC_URI="" ;; snap) SRC_URI="ftp://gcc.gnu.org/pub/binutils/snapshots/binutils-${BVER}.tar.bz2" ;; - hjlu) SRC_URI="mirror://kernel/linux/devel/binutils/binutils-${BVER}.tar.bz2" ;; + hjlu) + SRC_URI="mirror://kernel/linux/devel/binutils/binutils-${BVER}.tar." + version_is_at_least 2.21 && SRC_URI+="xz" || SRC_URI+="bz2" ;; rel) SRC_URI="mirror://gnu/binutils/binutils-${BVER}.tar.bz2" ;; esac add_src_uri() { [[ -z $2 ]] && return local a=$1 + if [[ ${BTYPE} == "hjlu" ]] && version_is_at_least 2.22.52.0.2 ; then + a+=".xz" + else + a+=".bz2" + fi set -- mirror://gentoo http://dev.gentoo.org/~vapier/dist SRC_URI="${SRC_URI} ${@/%//${a}}" } -add_src_uri binutils-${BVER}-patches-${PATCHVER}.tar.bz2 ${PATCHVER} -add_src_uri binutils-${BVER}-uclibc-patches-${UCLIBC_PATCHVER}.tar.bz2 ${UCLIBC_PATCHVER} -add_src_uri elf2flt-${ELF2FLT_VER}.tar.bz2 ${ELF2FLT_VER} +add_src_uri binutils-${BVER}-patches-${PATCHVER}.tar ${PATCHVER} +add_src_uri binutils-${BVER}-uclibc-patches-${UCLIBC_PATCHVER}.tar ${UCLIBC_PATCHVER} +add_src_uri elf2flt-${ELF2FLT_VER}.tar ${ELF2FLT_VER} if version_is_at_least 2.18 ; then LICENSE="|| ( GPL-3 LGPL-3 )" @@ -121,7 +128,7 @@ tc-binutils_unpack() { case ${BTYPE} in cvs) cvs_src_unpack ;; git) git-2_src_unpack ;; - *) unpack ${A} ;; + *) unpacker ${A} ;; esac mkdir -p "${MY_BUILDDIR}" [[ -d ${WORKDIR}/patch ]] && mkdir "${WORKDIR}"/patch/skip -- cgit v1.2.3-65-gdbad