1 |
ottxor 13/09/30 02:28:42 |
2 |
|
3 |
Modified: ChangeLog toolchain-binutils.eclass |
4 |
Log: |
5 |
add prefix support |
6 |
|
7 |
Revision Changes Path |
8 |
1.1001 eclass/ChangeLog |
9 |
|
10 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1001&view=markup |
11 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1001&content-type=text/plain |
12 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1000&r2=1.1001 |
13 |
|
14 |
Index: ChangeLog |
15 |
=================================================================== |
16 |
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v |
17 |
retrieving revision 1.1000 |
18 |
retrieving revision 1.1001 |
19 |
diff -u -r1.1000 -r1.1001 |
20 |
--- ChangeLog 29 Sep 2013 18:00:30 -0000 1.1000 |
21 |
+++ ChangeLog 30 Sep 2013 02:28:42 -0000 1.1001 |
22 |
@@ -1,6 +1,10 @@ |
23 |
# ChangeLog for eclass directory |
24 |
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 |
25 |
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1000 2013/09/29 18:00:30 ottxor Exp $ |
26 |
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1001 2013/09/30 02:28:42 ottxor Exp $ |
27 |
+ |
28 |
+ 30 Sep 2013; Christoph Junghans <ottxor@g.o> |
29 |
+ toolchain-binutils.eclass: |
30 |
+ add prefix support |
31 |
|
32 |
29 Sep 2013; Christoph Junghans <ottxor@g.o> intel-sdp.eclass: |
33 |
EAPI bump, ccache support |
34 |
|
35 |
|
36 |
|
37 |
1.124 eclass/toolchain-binutils.eclass |
38 |
|
39 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-binutils.eclass?rev=1.124&view=markup |
40 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-binutils.eclass?rev=1.124&content-type=text/plain |
41 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-binutils.eclass?r1=1.123&r2=1.124 |
42 |
|
43 |
Index: toolchain-binutils.eclass |
44 |
=================================================================== |
45 |
RCS file: /var/cvsroot/gentoo-x86/eclass/toolchain-binutils.eclass,v |
46 |
retrieving revision 1.123 |
47 |
retrieving revision 1.124 |
48 |
diff -u -r1.123 -r1.124 |
49 |
--- toolchain-binutils.eclass 9 Feb 2013 04:32:48 -0000 1.123 |
50 |
+++ toolchain-binutils.eclass 30 Sep 2013 02:28:42 -0000 1.124 |
51 |
@@ -1,6 +1,6 @@ |
52 |
-# Copyright 1999-2012 Gentoo Foundation |
53 |
+# Copyright 1999-2013 Gentoo Foundation |
54 |
# Distributed under the terms of the GNU General Public License v2 |
55 |
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-binutils.eclass,v 1.123 2013/02/09 04:32:48 vapier Exp $ |
56 |
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-binutils.eclass,v 1.124 2013/09/30 02:28:42 ottxor Exp $ |
57 |
# |
58 |
# Maintainer: Toolchain Ninjas <toolchain@g.o> |
59 |
# |
60 |
@@ -60,6 +60,9 @@ |
61 |
fi |
62 |
is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; } |
63 |
|
64 |
+: ${ED:=${D}} |
65 |
+: ${EROOT:=${ROOT}} |
66 |
+ |
67 |
DESCRIPTION="Tools necessary to build programs" |
68 |
HOMEPAGE="http://sourceware.org/binutils/" |
69 |
|
70 |
@@ -262,7 +265,7 @@ |
71 |
|
72 |
use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd ) |
73 |
[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} ) |
74 |
- is_cross && myconf+=( --with-sysroot=/usr/${CTARGET} ) |
75 |
+ is_cross && myconf+=( --with-sysroot="${EPREFIX}"/usr/${CTARGET} ) |
76 |
|
77 |
# glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+ |
78 |
# on everyone in alpha (for now), we'll just enable it when possible |
79 |
@@ -270,16 +273,16 @@ |
80 |
has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt ) |
81 |
|
82 |
myconf+=( |
83 |
- --prefix=/usr |
84 |
+ --prefix="${EPREFIX}"/usr |
85 |
--host=${CHOST} |
86 |
--target=${CTARGET} |
87 |
- --datadir=${DATAPATH} |
88 |
- --infodir=${DATAPATH}/info |
89 |
- --mandir=${DATAPATH}/man |
90 |
- --bindir=${BINPATH} |
91 |
- --libdir=${LIBPATH} |
92 |
- --libexecdir=${LIBPATH} |
93 |
- --includedir=${INCPATH} |
94 |
+ --datadir="${EPREFIX}"${DATAPATH} |
95 |
+ --infodir="${EPREFIX}"${DATAPATH}/info |
96 |
+ --mandir="${EPREFIX}"${DATAPATH}/man |
97 |
+ --bindir="${EPREFIX}"${BINPATH} |
98 |
+ --libdir="${EPREFIX}"${LIBPATH} |
99 |
+ --libexecdir="${EPREFIX}"${LIBPATH} |
100 |
+ --includedir="${EPREFIX}"${INCPATH} |
101 |
--enable-obsolete |
102 |
--enable-shared |
103 |
--enable-threads |
104 |
@@ -317,7 +320,7 @@ |
105 |
--with-bfd-include-dir=${MY_BUILDDIR}/bfd |
106 |
--with-libbfd=${MY_BUILDDIR}/bfd/libbfd.a |
107 |
--with-libiberty=${MY_BUILDDIR}/libiberty/libiberty.a |
108 |
- --with-binutils-ldscript-dir=${LIBPATH}/ldscripts |
109 |
+ --with-binutils-ldscript-dir="${EPREFIX}"${LIBPATH}/ldscripts |
110 |
) |
111 |
echo ./configure "${myconf[@]}" |
112 |
./configure "${myconf[@]}" || die |
113 |
@@ -335,12 +338,12 @@ |
114 |
local x d |
115 |
|
116 |
cd "${MY_BUILDDIR}" |
117 |
- emake DESTDIR="${D}" tooldir="${LIBPATH}" install || die |
118 |
- rm -rf "${D}"/${LIBPATH}/bin |
119 |
- use static-libs || find "${D}" -name '*.la' -delete |
120 |
+ emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install || die |
121 |
+ rm -rf "${ED}"/${LIBPATH}/bin |
122 |
+ use static-libs || find "${ED}" -name '*.la' -delete |
123 |
|
124 |
# Newer versions of binutils get fancy with ${LIBPATH} #171905 |
125 |
- cd "${D}"/${LIBPATH} |
126 |
+ cd "${ED}"/${LIBPATH} |
127 |
for d in ../* ; do |
128 |
[[ ${d} == ../${BVER} ]] && continue |
129 |
mv ${d}/* . || die |
130 |
@@ -351,15 +354,15 @@ |
131 |
# When something is built to cross-compile, it installs into |
132 |
# /usr/$CHOST/ by default ... we have to 'fix' that :) |
133 |
if is_cross ; then |
134 |
- cd "${D}"/${BINPATH} |
135 |
+ cd "${ED}"/${BINPATH} |
136 |
for x in * ; do |
137 |
mv ${x} ${x/${CTARGET}-} |
138 |
done |
139 |
|
140 |
- if [[ -d ${D}/usr/${CHOST}/${CTARGET} ]] ; then |
141 |
- mv "${D}"/usr/${CHOST}/${CTARGET}/include "${D}"/${INCPATH} |
142 |
- mv "${D}"/usr/${CHOST}/${CTARGET}/lib/* "${D}"/${LIBPATH}/ |
143 |
- rm -r "${D}"/usr/${CHOST}/{include,lib} |
144 |
+ if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then |
145 |
+ mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH} |
146 |
+ mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/ |
147 |
+ rm -r "${ED}"/usr/${CHOST}/{include,lib} |
148 |
fi |
149 |
fi |
150 |
insinto ${INCPATH} |
151 |
@@ -374,9 +377,9 @@ |
152 |
splay-tree.h |
153 |
) |
154 |
doins "${libiberty_headers[@]/#/${S}/include/}" || die |
155 |
- if [[ -d ${D}/${LIBPATH}/lib ]] ; then |
156 |
- mv "${D}"/${LIBPATH}/lib/* "${D}"/${LIBPATH}/ |
157 |
- rm -r "${D}"/${LIBPATH}/lib |
158 |
+ if [[ -d ${ED}/${LIBPATH}/lib ]] ; then |
159 |
+ mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/ |
160 |
+ rm -r "${ED}"/${LIBPATH}/lib |
161 |
fi |
162 |
|
163 |
# Insert elf2flt where appropriate |
164 |
@@ -386,7 +389,7 @@ |
165 |
doins elf2flt.ld || die "doins elf2flt.ld failed" |
166 |
exeinto ${BINPATH} |
167 |
doexe elf2flt flthdr || die "doexe elf2flt flthdr failed" |
168 |
- mv "${D}"/${BINPATH}/{ld,ld.real} || die |
169 |
+ mv "${ED}"/${BINPATH}/{ld,ld.real} || die |
170 |
newexe ld-elf2flt ld || die "doexe ld-elf2flt failed" |
171 |
newdoc README README.elf2flt |
172 |
fi |
173 |
@@ -416,7 +419,7 @@ |
174 |
cat <<-EOF > env.d |
175 |
TARGET="${CTARGET}" |
176 |
VER="${BVER}" |
177 |
- LIBPATH="${LIBPATH}" |
178 |
+ LIBPATH="${EPREFIX}${LIBPATH}" |
179 |
FAKE_TARGETS="${FAKE_TARGETS}" |
180 |
EOF |
181 |
newins env.d ${CTARGET}-${BVER} |
182 |
@@ -441,14 +444,14 @@ |
183 |
dodoc opcodes/ChangeLog* |
184 |
fi |
185 |
# Remove shared info pages |
186 |
- rm -f "${D}"/${DATAPATH}/info/{dir,configure.info,standards.info} |
187 |
+ rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info} |
188 |
# Trim all empty dirs |
189 |
- find "${D}" -type d | xargs rmdir >& /dev/null |
190 |
+ find "${ED}" -type d | xargs rmdir >& /dev/null |
191 |
} |
192 |
|
193 |
toolchain-binutils_pkg_postinst() { |
194 |
# Make sure this ${CTARGET} has a binutils version selected |
195 |
- [[ -e ${ROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0 |
196 |
+ [[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0 |
197 |
binutils-config ${CTARGET}-${BVER} |
198 |
} |
199 |
|
200 |
@@ -461,7 +464,7 @@ |
201 |
# rerun binutils-config if this is a remerge, as |
202 |
# we want the mtimes on the symlinks updated (if |
203 |
# it is the same as the current selected profile) |
204 |
- if [[ ! -e ${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${BVER} ]] ; then |
205 |
+ if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${BVER} ]] ; then |
206 |
local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}') |
207 |
choice=${choice//$'\n'/ } |
208 |
choice=${choice/* } |