toolchain-binutils.eclass: add PATCH_BINUTILS_VER handling
authorSergei Trofimovich <slyfox@gentoo.org>
Mon, 25 Sep 2017 22:30:15 +0000 (23:30 +0100)
committerSergei Trofimovich <slyfox@gentoo.org>
Mon, 25 Sep 2017 23:18:00 +0000 (00:18 +0100)
PATCH_BINUTILS_VER is handy when one wants to apply
patchset from a different binutils version. For example
to apply a 2.29 patchset on top of 2.29.1 version ebuild
will refer to it as:
    PATCH_BINUTILS_VER="2.29"

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
eclass/toolchain-binutils.eclass

index 8c366aa4a6b1099f1a1aca9bfe6843d5c6533cd4..3fbbc57e638ea3d5a0427729090ffd619ca42ea4 100644 (file)
@@ -78,8 +78,9 @@ add_src_uri() {
        set -- mirror://gentoo https://dev.gentoo.org/~vapier/dist https://dev.gentoo.org/~tamiko/distfiles
        SRC_URI="${SRC_URI} ${@/%//${a}}"
 }
-add_src_uri binutils-${BVER}-patches-${PATCHVER}.tar ${PATCHVER}
-add_src_uri binutils-${BVER}-uclibc-patches-${UCLIBC_PATCHVER}.tar ${UCLIBC_PATCHVER}
+PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${BVER}}
+add_src_uri binutils-${PATCH_BINUTILS_VER}-patches-${PATCHVER}.tar ${PATCHVER}
+add_src_uri binutils-${PATCH_BINUTILS_VER}-uclibc-patches-${UCLIBC_PATCHVER}.tar ${UCLIBC_PATCHVER}
 add_src_uri elf2flt-${ELF2FLT_VER}.tar ${ELF2FLT_VER}
 
 if version_is_at_least 2.18 ; then