1 |
grobian 11/09/03 20:33:22 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: binutils-apple-4.1.ebuild |
5 |
Removed: binutils-apple-4.0.ebuild |
6 |
Log: |
7 |
Bump to version from Developer Tools 4.1, drop 4.0 version as it never compiled. Slot 4.x series as they are significantly different from 3.x series. |
8 |
|
9 |
(Portage version: 2.2.01.19120-prefix/cvs/Darwin i386) |
10 |
|
11 |
Revision Changes Path |
12 |
1.18 sys-devel/binutils-apple/ChangeLog |
13 |
|
14 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/binutils-apple/ChangeLog?rev=1.18&view=markup |
15 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/binutils-apple/ChangeLog?rev=1.18&content-type=text/plain |
16 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/binutils-apple/ChangeLog?r1=1.17&r2=1.18 |
17 |
|
18 |
Index: ChangeLog |
19 |
=================================================================== |
20 |
RCS file: /var/cvsroot/gentoo-x86/sys-devel/binutils-apple/ChangeLog,v |
21 |
retrieving revision 1.17 |
22 |
retrieving revision 1.18 |
23 |
diff -u -r1.17 -r1.18 |
24 |
--- ChangeLog 11 May 2011 20:06:45 -0000 1.17 |
25 |
+++ ChangeLog 3 Sep 2011 20:33:22 -0000 1.18 |
26 |
@@ -1,6 +1,15 @@ |
27 |
# ChangeLog for sys-devel/binutils-apple |
28 |
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 |
29 |
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/binutils-apple/ChangeLog,v 1.17 2011/05/11 20:06:45 grobian Exp $ |
30 |
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/binutils-apple/ChangeLog,v 1.18 2011/09/03 20:33:22 grobian Exp $ |
31 |
+ |
32 |
+*binutils-apple-4.1 (03 Sep 2011) |
33 |
+ |
34 |
+ 03 Sep 2011; Fabian Groffen <grobian@g.o> -binutils-apple-4.0.ebuild, |
35 |
+ +binutils-apple-4.1.ebuild, +files/libunwind-30-Makefile, |
36 |
+ +files/ld64-123.2.1-lto.patch, files/ld64-123.2-Makefile: |
37 |
+ Bump to version from Developer Tools 4.1, drop 4.0 version as it never |
38 |
+ compiled. Slot 4.x series as they are significantly different from 3.x |
39 |
+ series. |
40 |
|
41 |
*binutils-apple-4.0 (11 May 2011) |
42 |
*binutils-apple-3.2.6 (11 May 2011) |
43 |
|
44 |
|
45 |
|
46 |
1.1 sys-devel/binutils-apple/binutils-apple-4.1.ebuild |
47 |
|
48 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/binutils-apple/binutils-apple-4.1.ebuild?rev=1.1&view=markup |
49 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/binutils-apple/binutils-apple-4.1.ebuild?rev=1.1&content-type=text/plain |
50 |
|
51 |
Index: binutils-apple-4.1.ebuild |
52 |
=================================================================== |
53 |
# Copyright 1999-2011 Gentoo Foundation |
54 |
# Distributed under the terms of the GNU General Public License v2 |
55 |
# $Header: /var/cvsroot/gentoo-x86/sys-devel/binutils-apple/binutils-apple-4.1.ebuild,v 1.1 2011/09/03 20:33:22 grobian Exp $ |
56 |
|
57 |
EAPI="3" |
58 |
|
59 |
inherit eutils flag-o-matic toolchain-funcs |
60 |
|
61 |
RESTRICT="test" # the test suite will test what's installed. |
62 |
|
63 |
LD64=ld64-123.2.1 |
64 |
CCTOOLS=cctools-806 |
65 |
LIBUNWIND=libunwind-30 |
66 |
DYLD=dyld-195.5 |
67 |
# http://lists.apple.com/archives/Darwin-dev/2009/Sep/msg00025.html |
68 |
UNWIND=binutils-apple-3.2-unwind-patches-5 |
69 |
|
70 |
DESCRIPTION="Darwin assembler as(1) and static linker ld(1), Xcode Tools ${PV}" |
71 |
HOMEPAGE="http://www.opensource.apple.com/darwinsource/" |
72 |
SRC_URI="http://www.opensource.apple.com/tarballs/ld64/${LD64}.tar.gz |
73 |
http://www.opensource.apple.com/tarballs/cctools/${CCTOOLS}.tar.gz |
74 |
http://www.opensource.apple.com/tarballs/libunwind/${LIBUNWIND}.tar.gz |
75 |
http://www.opensource.apple.com/tarballs/dyld/${DYLD}.tar.gz |
76 |
http://www.gentoo.org/~grobian/distfiles/${UNWIND}.tar.xz |
77 |
http://www.gentoo.org/~grobian/distfiles/libunwind-llvm-115426.tar.bz2" |
78 |
|
79 |
LICENSE="APSL-2" |
80 |
#KEYWORDS="~ppc-macos ~x64-macos ~x86-macos" |
81 |
KEYWORDS="" |
82 |
IUSE="lto test" |
83 |
|
84 |
RDEPEND="sys-devel/binutils-config |
85 |
lto? ( sys-devel/llvm ) |
86 |
test? ( >=dev-lang/perl-5.8.8 )" |
87 |
DEPEND="${RDEPEND} |
88 |
>=sys-devel/gcc-apple-4.2.1" |
89 |
|
90 |
export CTARGET=${CTARGET:-${CHOST}} |
91 |
if [[ ${CTARGET} == ${CHOST} ]] ; then |
92 |
if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then |
93 |
export CTARGET=${CATEGORY/cross-} |
94 |
fi |
95 |
fi |
96 |
is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; } |
97 |
|
98 |
if is_cross ; then |
99 |
SLOT="${CTARGET}-4" |
100 |
else |
101 |
SLOT="4" |
102 |
fi |
103 |
|
104 |
LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV} |
105 |
INCPATH=${LIBPATH}/include |
106 |
DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV} |
107 |
if is_cross ; then |
108 |
BINPATH=/usr/${CHOST}/${CTARGET}/binutils-bin/${PV} |
109 |
else |
110 |
BINPATH=/usr/${CTARGET}/binutils-bin/${PV} |
111 |
fi |
112 |
|
113 |
S=${WORKDIR} |
114 |
|
115 |
src_prepare() { |
116 |
cd "${S}"/${LIBUNWIND}/src |
117 |
cp "${FILESDIR}"/${LIBUNWIND}-Makefile Makefile |
118 |
|
119 |
cd "${S}"/${LD64}/src |
120 |
cp "${FILESDIR}"/${LD64%.1}-Makefile Makefile |
121 |
epatch "${FILESDIR}"/${LD64}-lto.patch |
122 |
|
123 |
ln -s ../../${CCTOOLS}/include |
124 |
cp other/prune_trie.h include/mach-o/ || die |
125 |
# use our own copy of lto.h, which doesn't require llvm build-env |
126 |
mkdir -p include/llvm-c || die |
127 |
cp "${WORKDIR}"/ld64-unwind/ld64-97.14-llvm-lto.h include/llvm-c/lto.h || die |
128 |
# make libunwind sources known |
129 |
#pushd "${WORKDIR}"/libunwind/include > /dev/null |
130 |
ln -s ../../${LIBUNWIND}/src libunwind || die |
131 |
cp ../../${LIBUNWIND}/include/*.h include/ || die |
132 |
#popd > /dev/null |
133 |
|
134 |
echo '' > configure.h |
135 |
echo '' > linker_opts |
136 |
local VER_STR="\"@(#)PROGRAM:ld PROJECT:${LD64} (Gentoo ${PN}-${PVR})\\n\"" |
137 |
echo "char ldVersionString[] = ${VER_STR};" > version.cpp |
138 |
|
139 |
epatch "${FILESDIR}"/${LD64%.1}-debug-backtrace.patch |
140 |
[[ ${CHOST} == powerpc*-darwin* ]] && \ |
141 |
epatch "${FILESDIR}"/${LD64%.1}-darwin8-no-mlong-branch-warning.patch |
142 |
if use !lto ; then |
143 |
sed -i -e '/#define LTO_SUPPORT 1/d' other/ObjectDump.cpp || die |
144 |
fi |
145 |
|
146 |
cd "${S}"/${CCTOOLS} |
147 |
epatch "${FILESDIR}"/${PN}-4.0-as.patch |
148 |
epatch "${FILESDIR}"/${PN}-4.0-as-dir.patch |
149 |
epatch "${FILESDIR}"/${PN}-3.2.3-ranlib.patch |
150 |
epatch "${FILESDIR}"/${PN}-3.1.1-libtool-ranlib.patch |
151 |
epatch "${FILESDIR}"/${PN}-3.1.1-nmedit.patch |
152 |
epatch "${FILESDIR}"/${PN}-3.1.1-no-headers.patch |
153 |
epatch "${FILESDIR}"/${PN}-4.0-no-oss-dir.patch |
154 |
|
155 |
# clean up test suite |
156 |
cd "${S}"/${LD64} |
157 |
# epatch "${FILESDIR}"/${PN}-3.1.1-testsuite.patch |
158 |
|
159 |
cd "${S}"/${LD64}/unit-tests/test-cases |
160 |
local c |
161 |
|
162 |
# we don't have llvm |
163 |
((++c)); rm -rf llvm-integration; |
164 |
|
165 |
# we don't have dtrace |
166 |
((++c)); rm -rf dtrace-static-probes-coalescing; |
167 |
((++c)); rm -rf dtrace-static-probes; |
168 |
|
169 |
# a file is missing |
170 |
((++c)); rm -rf eh-coalescing-r |
171 |
|
172 |
# we don't do universal binaries |
173 |
((++c)); rm -rf blank-stubs; |
174 |
|
175 |
# looks like a problem with apple's result-filter.pl |
176 |
((++c)); rm -rf implicit-common3; |
177 |
((++c)); rm -rf order_file-ans; |
178 |
|
179 |
# TODO no idea what goes wrong here |
180 |
((++c)); rm -rf dwarf-debug-notes; |
181 |
|
182 |
einfo "Deleted $c tests that were bound to fail" |
183 |
|
184 |
cd "${S}" |
185 |
ebegin "cleaning Makefiles from unwanted CFLAGS" |
186 |
find . -name "Makefile" -print0 | xargs -0 sed \ |
187 |
-i \ |
188 |
-e 's/ -g / /g' \ |
189 |
-e 's/^OFLAG =.*$/OFLAG =/' \ |
190 |
-e 's/install -c -s/install/g' |
191 |
eend $? |
192 |
|
193 |
# -pg is used and the two are incompatible |
194 |
filter-flags -fomit-frame-pointer |
195 |
} |
196 |
|
197 |
src_configure() { |
198 |
tc-export CC CXX AR |
199 |
if use lto ; then |
200 |
append-flags -DLTO_SUPPORT |
201 |
append-ldflags -L"${EPREFIX}"/usr/$(get_libdir)/llvm |
202 |
append-libs LTO |
203 |
LTO=1 |
204 |
else |
205 |
append-flags -ULTO_SUPPORT |
206 |
LTO=0 |
207 |
fi |
208 |
append-flags -DNDEBUG |
209 |
append-flags -I${WORKDIR}/libunwind/include |
210 |
} |
211 |
|
212 |
compile_libunwind() { |
213 |
einfo "building ${LIBUNWIND}" |
214 |
cd "${S}"/${LIBUNWIND}/src |
215 |
emake DYLDINCS=-I../../${DYLD}/include || die |
216 |
} |
217 |
|
218 |
compile_ld64() { |
219 |
einfo "building ${LD64}" |
220 |
cd "${S}"/${LD64}/src |
221 |
# remove antiquated copy that's available on any OSX system and |
222 |
# breaks ld64 compilation |
223 |
mv include/mach-o/dyld.h{,.disable} |
224 |
emake \ |
225 |
LTO=${LTO} \ |
226 |
CFLAGS="${CFLAGS}" \ |
227 |
CXXFLAGS="${CXXFLAGS} -I../../${DYLD}/include" \ |
228 |
LDFLAGS="${LDFLAGS} ${LIBS}" \ |
229 |
|| die "emake failed for ld64" |
230 |
use test && emake build_test |
231 |
# restore, it's necessary for cctools' install |
232 |
mv include/mach-o/dyld.h{.disable,} |
233 |
} |
234 |
|
235 |
compile_cctools() { |
236 |
einfo "building ${CCTOOLS}" |
237 |
cd "${S}"/${CCTOOLS} |
238 |
emake \ |
239 |
LIB_PRUNETRIE="-L../../${LD64}/src -lprunetrie" \ |
240 |
EFITOOLS= LTO= \ |
241 |
COMMON_SUBDIRS='libstuff ar misc otool' \ |
242 |
SUBDIRS_32= \ |
243 |
RC_CFLAGS="${CFLAGS}" OFLAG="${CFLAGS}" \ |
244 |
|| die "emake failed for the cctools" |
245 |
cd "${S}"/${CCTOOLS}/as |
246 |
emake \ |
247 |
BUILD_OBSOLETE_ARCH= \ |
248 |
RC_CFLAGS="-DASLIBEXECDIR=\"\\\"${EPREFIX}${LIBPATH}/\\\"\" ${CFLAGS}" \ |
249 |
|| die "emake failed for as" |
250 |
} |
251 |
|
252 |
src_compile() { |
253 |
compile_libunwind |
254 |
compile_ld64 |
255 |
compile_cctools |
256 |
} |
257 |
|
258 |
install_ld64() { |
259 |
exeinto ${BINPATH} |
260 |
doexe "${S}"/${LD64}/src/{ld64,rebase,dyldinfo,unwinddump,ObjectDump} |
261 |
dosym ld64 ${BINPATH}/ld |
262 |
insinto ${DATAPATH}/man/man1 |
263 |
doins "${S}"/${LD64}/doc/man/man1/{ld,ld64,rebase}.1 |
264 |
} |
265 |
|
266 |
install_cctools() { |
267 |
cd "${S}"/${CCTOOLS} |
268 |
emake install_all_but_headers \ |
269 |
EFITOOLS= LTO= \ |
270 |
COMMON_SUBDIRS='ar misc otool' \ |
271 |
SUBDIRS_32= \ |
272 |
RC_CFLAGS="${CFLAGS}" OFLAG="${CFLAGS}" \ |
273 |
DSTROOT=\"${D}\" \ |
274 |
BINDIR=\"${EPREFIX}\"${BINPATH} \ |
275 |
LOCBINDIR=\"${EPREFIX}\"${BINPATH} \ |
276 |
USRBINDIR=\"${EPREFIX}\"${BINPATH} \ |
277 |
LOCLIBDIR=\"${EPREFIX}\"${LIBPATH} \ |
278 |
MANDIR=\"${EPREFIX}\"${DATAPATH}/man/ |
279 |
cd "${S}"/${CCTOOLS}/as |
280 |
emake install \ |
281 |
BUILD_OBSOLETE_ARCH= \ |
282 |
DSTROOT=\"${D}\" \ |
283 |
USRBINDIR=\"${EPREFIX}\"${BINPATH} \ |
284 |
LIBDIR=\"${EPREFIX}\"${LIBPATH} \ |
285 |
LOCLIBDIR=\"${EPREFIX}\"${LIBPATH} |
286 |
|
287 |
cd "${ED}"${BINPATH} |
288 |
insinto ${DATAPATH}/man/man1 |
289 |
local skips manpage |
290 |
# ar brings an up-to-date manpage with it |
291 |
skips=( ar ) |
292 |
for bin in *; do |
293 |
for skip in ${skips[@]}; do |
294 |
if [[ ${bin} == ${skip} ]]; then |
295 |
continue 2; |
296 |
fi |
297 |
done |
298 |
manpage=${S}/${CCTOOLS}/man/${bin}.1 |
299 |
if [[ -f "${manpage}" ]]; then |
300 |
doins "${manpage}" |
301 |
fi |
302 |
done |
303 |
insinto ${DATAPATH}/man/man5 |
304 |
doins "${S}"/${CCTOOLS}/man/*.5 |
305 |
} |
306 |
|
307 |
src_test() { |
308 |
einfo "Running unit tests" |
309 |
cd "${S}"/${LD64}/unit-tests/test-cases |
310 |
# need host arch, since GNU arch doesn't do what Apple's does |
311 |
tc-export CC CXX |
312 |
perl ../bin/make-recursive.pl \ |
313 |
ARCH="$(/usr/bin/arch)" \ |
314 |
RELEASEDIR="${S}"/${LD64}/src \ |
315 |
| perl ../bin/result-filter.pl |
316 |
} |
317 |
|
318 |
src_install() { |
319 |
install_ld64 |
320 |
install_cctools |
321 |
|
322 |
cd "${S}" |
323 |
insinto /etc/env.d/binutils |
324 |
cat <<-EOF > env.d |
325 |
TARGET="${CHOST}" |
326 |
VER="${PV}" |
327 |
FAKE_TARGETS="${CHOST}" |
328 |
EOF |
329 |
newins env.d ${CHOST}-${PV} |
330 |
} |
331 |
|
332 |
pkg_postinst() { |
333 |
binutils-config ${CHOST}-${PV} |
334 |
} |