1 |
vapier 11/12/21 21:01:22 |
2 |
|
3 |
Modified: toolchain-binutils.eclass |
4 |
Log: |
5 |
restore BINUTILS_VER support a bit for releases (for msp430-binutils), and allow ebuilds to specify additional patches via ${PATCHES[@]} |
6 |
|
7 |
Revision Changes Path |
8 |
1.107 eclass/toolchain-binutils.eclass |
9 |
|
10 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-binutils.eclass?rev=1.107&view=markup |
11 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-binutils.eclass?rev=1.107&content-type=text/plain |
12 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-binutils.eclass?r1=1.106&r2=1.107 |
13 |
|
14 |
Index: toolchain-binutils.eclass |
15 |
=================================================================== |
16 |
RCS file: /var/cvsroot/gentoo-x86/eclass/toolchain-binutils.eclass,v |
17 |
retrieving revision 1.106 |
18 |
retrieving revision 1.107 |
19 |
diff -u -r1.106 -r1.107 |
20 |
--- toolchain-binutils.eclass 12 Dec 2011 22:47:55 -0000 1.106 |
21 |
+++ toolchain-binutils.eclass 21 Dec 2011 21:01:22 -0000 1.107 |
22 |
@@ -1,6 +1,6 @@ |
23 |
# Copyright 1999-2011 Gentoo Foundation |
24 |
# Distributed under the terms of the GNU General Public License v2 |
25 |
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-binutils.eclass,v 1.106 2011/12/12 22:47:55 vapier Exp $ |
26 |
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-binutils.eclass,v 1.107 2011/12/21 21:01:22 vapier Exp $ |
27 |
# |
28 |
# Maintainer: Toolchain Ninjas <toolchain@g.o> |
29 |
# |
30 |
@@ -42,11 +42,8 @@ |
31 |
snap) |
32 |
BVER=${PV/9999_pre} |
33 |
;; |
34 |
-rel) |
35 |
- BVER=${PV} |
36 |
- ;; |
37 |
*) |
38 |
- BVER=${BINUTILS_VER} |
39 |
+ BVER=${BINUTILS_VER:-${PV}} |
40 |
;; |
41 |
esac |
42 |
|
43 |
@@ -68,11 +65,11 @@ |
44 |
cvs|git) SRC_URI="" ;; |
45 |
snap) SRC_URI="ftp://gcc.gnu.org/pub/binutils/snapshots/binutils-${BVER}.tar.bz2";; |
46 |
rel) |
47 |
- SRC_URI="mirror://kernel/linux/devel/binutils/binutils-${PV}.tar.bz2 |
48 |
- mirror://kernel/linux/devel/binutils/test/binutils-${PV}.tar.bz2 |
49 |
- mirror://gnu/binutils/binutils-${PV}.tar.bz2" |
50 |
+ SRC_URI="mirror://kernel/linux/devel/binutils/binutils-${BVER}.tar.bz2 |
51 |
+ mirror://kernel/linux/devel/binutils/test/binutils-${BVER}.tar.bz2 |
52 |
+ mirror://gnu/binutils/binutils-${BVER}.tar.bz2" |
53 |
# disable kernel mirrors until kernel.org is back up #383579 |
54 |
- SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.bz2" |
55 |
+ SRC_URI="mirror://gnu/binutils/binutils-${BVER}.tar.bz2" |
56 |
esac |
57 |
add_src_uri() { |
58 |
[[ -z $2 ]] && return |
59 |
@@ -80,8 +77,8 @@ |
60 |
set -- mirror://gentoo http://dev.gentoo.org/~vapier/dist |
61 |
SRC_URI="${SRC_URI} ${@/%//${a}}" |
62 |
} |
63 |
-add_src_uri binutils-${PV}-patches-${PATCHVER}.tar.bz2 ${PATCHVER} |
64 |
-add_src_uri binutils-${PV}-uclibc-patches-${UCLIBC_PATCHVER}.tar.bz2 ${UCLIBC_PATCHVER} |
65 |
+add_src_uri binutils-${BVER}-patches-${PATCHVER}.tar.bz2 ${PATCHVER} |
66 |
+add_src_uri binutils-${BVER}-uclibc-patches-${UCLIBC_PATCHVER}.tar.bz2 ${UCLIBC_PATCHVER} |
67 |
add_src_uri elf2flt-${ELF2FLT_VER}.tar.bz2 ${ELF2FLT_VER} |
68 |
|
69 |
if version_is_at_least 2.18 ; then |
70 |
@@ -135,6 +132,9 @@ |
71 |
[[ -d ${WORKDIR}/patch ]] && mkdir "${WORKDIR}"/patch/skip |
72 |
} |
73 |
|
74 |
+# In case the ebuild wants to add a few of their own. |
75 |
+PATCHES=() |
76 |
+ |
77 |
tc-binutils_apply_patches() { |
78 |
cd "${S}" |
79 |
|
80 |
@@ -165,6 +165,7 @@ |
81 |
die "sorry, but this binutils doesn't yet support uClibc :(" |
82 |
fi |
83 |
fi |
84 |
+ [[ ${PATCHES[@]} -gt 0 ]] && epatch "${PATCHES[@]}" |
85 |
epatch_user |
86 |
fi |