Gentoo Archives: gentoo-commits

From: Fabian Groffen <grobian@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-devel/gcc-apple/
Date: Mon, 06 Feb 2017 19:32:46
Message-Id: 1486409552.9f23086e359dff075c17452007379dfd53a1f030.grobian@gentoo
1 commit: 9f23086e359dff075c17452007379dfd53a1f030
2 Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
3 AuthorDate: Mon Feb 6 19:30:56 2017 +0000
4 Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
5 CommitDate: Mon Feb 6 19:32:32 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9f23086e
7
8 sys-devel/gcc-apple: drop old versions, fix missing bootstrap from IUSE, bug #608348
9
10 Package-Manager: portage-2.3.3
11
12 sys-devel/gcc-apple/Manifest | 2 -
13 sys-devel/gcc-apple/gcc-apple-4.0.1_p5493.ebuild | 255 ----------------
14 sys-devel/gcc-apple/gcc-apple-4.2.1_p5664.ebuild | 325 --------------------
15 .../gcc-apple/gcc-apple-4.2.1_p5666-r1.ebuild | 337 ---------------------
16 .../gcc-apple/gcc-apple-4.2.1_p5666-r2.ebuild | 4 +-
17 5 files changed, 2 insertions(+), 921 deletions(-)
18
19 diff --git a/sys-devel/gcc-apple/Manifest b/sys-devel/gcc-apple/Manifest
20 index cffe6c8..77bc3be 100644
21 --- a/sys-devel/gcc-apple/Manifest
22 +++ b/sys-devel/gcc-apple/Manifest
23 @@ -1,5 +1,3 @@
24 -DIST gcc-5493.tar.gz 40601890 SHA256 acdb2cc0abf049bfda433806fc82e235c6b6c5f86a0e8fd54f62ed3a8606452f SHA512 a874134e9fb11131d958c475a8d9ffeb659b30509e11b47d80b2d1bf6d1f9ec0dbbd338ff5754dc8dece7af8b486d554860469d240eb37dd480ede9fd6afc8fc WHIRLPOOL 327c554ebdd8b23392264fc4d5b00ad5eec4b4888c952051ef84d11f18bee463ff4b87711ddd8ce14708aa0fcb57209043d6d27973dda4f8dcb7ba14590b70a3
25 -DIST gcc-5664.tar.gz 24688506 SHA256 9e1533b6a894e8cf90b0d56c353fc1175d0f14ec19e03c307726af4de883c987 SHA512 7676de5f8eece8b9ae3a119379df0ad9e5b53ea37ce6fc60fa12fcaaa903188b116b35d997e0baff2b7cac4bd3a8462bc52d6955d05de0ab399c6c11c87ff6d5 WHIRLPOOL e663055409299ba8d0cf57694dc7b8e665ffef7c79f37bd27d6f855c6264e5815f09654f75f8a9495e5a582fb360215939ee7a84abfd4bc6e8aa777edd892790
26 DIST gcc-5666.3.tar.gz 19367320 SHA256 6c46f4376d11ada5be0cfc3894b9296edf574af3c616ab71803ea78edfd7015b SHA512 31cf52a00f31bcd7c47382888152cfe9851688c8fb7b1f236197b06b8acdd96b1943d327f8fab0fd305531c99a8fbf4865b2214dc2d1a236bb8ad39f710ce931 WHIRLPOOL 03711b56d38b2cb3b5af735802a82ef435cf42c3aa4fa74fa754b016edea447d011e626115fe59449def14ac34422788340165faab567b6fb992d1fe1684f93d
27 DIST gcc-fortran-4.2.4.tar.bz2 905688 SHA256 6fc2056cd62921b2859381749710af765a46877bd46f9fe5ef6fab0671c47e04 SHA512 1a36587a3691b8d7ecd23938efcdfca42642b6b260a1c830f6d791bb1b8ac32953998c45d77eee2d557861d631431569503c796b61aeaea9ac5fffbce1982faa WHIRLPOOL 5db1f448b3c08985ee2d0b1a9101e72733f4859184892da67268650c1010c26487b5ff15670151e67fdde5e4bd9053ed2e98b1582d1f4f99375b1bcdaf94351a
28 DIST libstdcxx-16.tar.gz 64695692 SHA256 a7d8041e50e110f5a503e188a05cb217f0c99c51f248a0a1387cc07a0b6f167f SHA512 2f0e8d694aaaf94fc2a0463ebd4a5775865421dedb431a6f6f701a8d33078e768bef232f72e2cf1f8e2d278eb60ff54030f5ad22b43eb0643d49bc4717e96b05 WHIRLPOOL fb90a1df90e60717906d227fb1dc2b8639fd063dbf6eec39d3a840dc8025c5384bd2c8b0a86158f8c072a1008ac2561e8e9f512ef4a4f84c081903154bb9d378
29
30 diff --git a/sys-devel/gcc-apple/gcc-apple-4.0.1_p5493.ebuild b/sys-devel/gcc-apple/gcc-apple-4.0.1_p5493.ebuild
31 deleted file mode 100644
32 index fb49629..00000000
33 --- a/sys-devel/gcc-apple/gcc-apple-4.0.1_p5493.ebuild
34 +++ /dev/null
35 @@ -1,255 +0,0 @@
36 -# Copyright 1999-2016 Gentoo Foundation
37 -# Distributed under the terms of the GNU General Public License v2
38 -# $Id$
39 -
40 -EAPI="5"
41 -
42 -inherit eutils toolchain prefix
43 -
44 -GCC_VERS=${PV/_p*/}
45 -APPLE_VERS=${PV/*_p/}
46 -DESCRIPTION="Apple branch of the GNU Compiler Collection, Developer Tools 3.1.3"
47 -HOMEPAGE="https://gcc.gnu.org"
48 -SRC_URI="http://www.opensource.apple.com/darwinsource/tarballs/other/gcc-${APPLE_VERS}.tar.gz"
49 -LICENSE="APSL-2 GPL-2"
50 -
51 -SLOT="40"
52 -KEYWORDS="~ppc-macos ~x64-macos ~x86-macos"
53 -IUSE="nls objc objc++ +cxx"
54 -
55 -RDEPEND=">=sys-libs/zlib-1.1.4
56 - >=sys-libs/ncurses-5.2-r2
57 - nls? ( sys-devel/gettext )"
58 -DEPEND="${RDEPEND}
59 - >=sys-apps/texinfo-4.2-r4
60 - >=sys-devel/bison-1.875
61 - ${CATEGORY}/binutils-apple"
62 -
63 -S=${WORKDIR}/gcc-${APPLE_VERS}
64 -
65 -# TPREFIX is the prefix of the CTARGET installation
66 -export TPREFIX=${TPREFIX:-${EPREFIX}}
67 -
68 -src_unpack() {
69 - # override toolchain.eclass func
70 - unpack ${A}
71 -}
72 -
73 -src_prepare() {
74 - # we use our libtool
75 - sed -i -e "s:/usr/bin/libtool:${EPREFIX}/usr/bin/${CTARGET}-libtool:" \
76 - gcc/config/darwin.h || die "sed gcc/config/darwin.h failed"
77 - # add prefixed Frameworks to default search paths (may want to change this
78 - # in a cross-compile)
79 - sed -i -e "/\"\/System\/Library\/Frameworks\"\,/i\ \ \"${EPREFIX}/Frameworks\"\, " \
80 - gcc/config/darwin-c.c || die "sed gcc/config/darwin-c.c failed"
81 -
82 - # Workaround deprecated "+Nc" syntax for GNU tail(1)
83 - sed -i -e "s:tail +16c:tail -c +16:g" \
84 - gcc/Makefile.in || die "sed gcc/Makefile.in failed."
85 -
86 - epatch "${FILESDIR}"/${PN}-4.0.1_p5465-default-altivec.patch
87 -
88 - epatch "${FILESDIR}"/${PN}-4.2.1-prefix-search-dirs.patch
89 - eprefixify "${S}"/gcc/gcc.c
90 -}
91 -
92 -src_configure() {
93 - local langs="c"
94 - use cxx && langs="${langs},c++"
95 - use objc && langs="${langs},objc"
96 - use objc++ && langs="${langs/,objc/},objc,obj-c++" # need objc with objc++
97 -
98 - LIBPATH=${EPREFIX}/usr/lib/gcc/${CTARGET}/${GCC_VERS}
99 - if is_crosscompile ; then
100 - BINPATH=${EPREFIX}/usr/${CHOST}/${CTARGET}/gcc-bin/${GCC_VERS}
101 - else
102 - BINPATH=${EPREFIX}/usr/${CTARGET}/gcc-bin/${GCC_VERS}
103 - fi
104 - STDCXX_INCDIR=${LIBPATH}/include/g++-v${GCC_VERS/\.*/}
105 -
106 - local myconf="${myconf} \
107 - --prefix=${EPREFIX}/usr \
108 - --bindir=${BINPATH} \
109 - --includedir=${LIBPATH}/include \
110 - --datadir=${EPREFIX}/usr/share/gcc-data/${CTARGET}/${GCC_VERS} \
111 - --mandir=${EPREFIX}/usr/share/gcc-data/${CTARGET}/${GCC_VERS}/man \
112 - --infodir=${EPREFIX}/usr/share/gcc-data/${CTARGET}/${GCC_VERS}/info \
113 - --with-gxx-include-dir=${STDCXX_INCDIR} \
114 - --host=${CHOST}
115 - --enable-version-specific-runtime-libs"
116 -
117 - if is_crosscompile ; then
118 - # Straight from the GCC install doc:
119 - # "GCC has code to correctly determine the correct value for target
120 - # for nearly all native systems. Therefore, we highly recommend you
121 - # not provide a configure target when configuring a native compiler."
122 - myconf="${myconf} --target=${CTARGET}"
123 -
124 - # Tell compiler where to find what it needs
125 - myconf="${myconf} --with-sysroot=${EPREFIX}/usr/${CTARGET}"
126 -
127 - # Set this to something sane for both native and target
128 - CFLAGS="-O2 -pipe"
129 -
130 - local VAR="CFLAGS_"${CTARGET//-/_}
131 - CXXFLAGS=${!VAR}
132 - fi
133 - [[ -n ${CBUILD} ]] && myconf="${myconf} --build=${CBUILD}"
134 -
135 - # Native Language Support
136 - if use nls ; then
137 - myconf="${myconf} --enable-nls --without-included-gettext"
138 - else
139 - myconf="${myconf} --disable-nls"
140 - fi
141 -
142 - # reasonably sane globals (hopefully)
143 - myconf="${myconf} \
144 - --with-system-zlib \
145 - --disable-checking \
146 - --disable-werror"
147 -
148 - # languages to build
149 - myconf="${myconf} --enable-languages=${langs}"
150 -
151 - # ???
152 - myconf="${myconf} --enable-shared --enable-threads=posix"
153 -
154 - # make clear we're in an offset
155 - use prefix && myconf="${myconf} --with-local-prefix=${TPREFIX}/usr"
156 -
157 - # we don't use a GNU linker, so tell GCC where to find the linker stuff we
158 - # want it to use
159 - myconf="${myconf} \
160 - --with-as=${EPREFIX}/usr/bin/${CTARGET}-as \
161 - --with-ld=${EPREFIX}/usr/bin/${CTARGET}-ld"
162 -
163 - # make sure we never do multilib stuff, for that we need a different Prefix
164 - [[ -z ${I_KNOW_WHAT_IM_DOING_I_WANT_APPLE_MULTILIB} ]] \
165 - && myconf="${myconf} --disable-multilib"
166 -
167 - # The produced libgcc_s.dylib is faulty if using a bit too much
168 - # optimisation. Nail it down to something sane
169 - CFLAGS="-O2 -pipe"
170 - CXXFLAGS=${CFLAGS}
171 -
172 - # https://gcc.gnu.org/ml/gcc-patches/2006-11/msg00765.html
173 - # (won't hurt if already 64-bits, but is essential when coming from a
174 - # multilib compiler -- the default)
175 - [[ ${CTARGET} == powerpc64-* || ${CTARGET} == x86_64-* ]] && \
176 - export CC="gcc -m64"
177 -
178 - mkdir -p "${WORKDIR}"/build
179 - cd "${WORKDIR}"/build
180 - einfo "Configuring GCC with: ${myconf//--/\n\t--}"
181 - "${S}"/configure ${myconf} || die "conf failed"
182 -}
183 -
184 -src_compile() {
185 - cd "${WORKDIR}"/build || die
186 - emake bootstrap || die "emake failed"
187 -}
188 -
189 -src_install() {
190 - cd "${WORKDIR}"/build
191 - # -jX doesn't work
192 - emake -j1 DESTDIR="${D}" install || die
193 -
194 - # Punt some tools which are really only useful while building gcc
195 - find "${ED}" -name install-tools -prune -type d -exec rm -rf "{}" \;
196 - # This one comes with binutils
197 - find "${ED}" -name libiberty.a -exec rm -f "{}" \;
198 -
199 - # Basic sanity check
200 - if ! is_crosscompile ; then
201 - local EXEEXT
202 - eval $(grep ^EXEEXT= "${WORKDIR}"/build/gcc/config.log)
203 - [[ -r ${D}${BINPATH}/gcc${EXEEXT} ]] || die "gcc not found in ${ED}"
204 - fi
205 -
206 - # create gcc-config entry
207 - dodir /etc/env.d/gcc
208 - local gcc_envd_base="/etc/env.d/gcc/${CHOST}-${GCC_VERS}"
209 -
210 - gcc_envd_file="${ED}${gcc_envd_base}"
211 -
212 - # phase PATH/ROOTPATH out ...
213 - echo "PATH=\"${BINPATH}\"" > ${gcc_envd_file}
214 - echo "ROOTPATH=\"${BINPATH}\"" >> ${gcc_envd_file}
215 - echo "GCC_PATH=\"${BINPATH}\"" >> ${gcc_envd_file}
216 -
217 - # we don't do multilib
218 - LDPATH="${LIBPATH}"
219 - echo "LDPATH=\"${LDPATH}\"" >> ${gcc_envd_file}
220 - echo "MANPATH=\"${EPREFIX}/usr/share/gcc-data/${CHOST}/${GCC_VERS}/man\"" >> ${gcc_envd_file}
221 - echo "INFOPATH=\"${EPREFIX}/usr/share/gcc-data/${CHOST}/${GCC_VERS}/info\"" >> ${gcc_envd_file}
222 - echo "STDCXX_INCDIR=\"g++-v${GCC_VERS/\.*/}\"" >> ${gcc_envd_file}
223 - is_crosscompile && echo "CTARGET=${CTARGET}" >> ${gcc_envd_file}
224 -
225 - # Move <cxxabi.h> to compiler-specific directories
226 - [[ -f ${D}${STDCXX_INCDIR}/cxxabi.h ]] && \
227 - mv -f "${D}"${STDCXX_INCDIR}/cxxabi.h "${D}"${LIBPATH}/include/
228 -
229 - # These should be symlinks
230 - dodir /usr/bin
231 - cd "${D}"${BINPATH}
232 - for x in cpp gcc g++ c++ g77 gcj gcjh gfortran ; do
233 - # For some reason, g77 gets made instead of ${CTARGET}-g77...
234 - # this should take care of that
235 - [[ -f ${x} ]] && mv ${x} ${CTARGET}-${x}
236 -
237 - if [[ -f ${CTARGET}-${x} ]] && ! is_crosscompile ; then
238 - ln -sf ${CTARGET}-${x} ${x}
239 -
240 - # Create version-ed symlinks
241 - dosym ${BINPATH#${EPREFIX}}/${CTARGET}-${x} \
242 - /usr/bin/${CTARGET}-${x}-${GCC_VERS}
243 - dosym ${BINPATH#${EPREFIX}}/${CTARGET}-${x} \
244 - /usr/bin/${x}-${GCC_VERS}
245 - fi
246 -
247 - if [[ -f ${CTARGET}-${x}-${GCC_VERS} ]] ; then
248 - rm -f ${CTARGET}-${x}-${GCC_VERS}
249 - ln -sf ${CTARGET}-${x} ${CTARGET}-${x}-${GCC_VERS}
250 - fi
251 - done
252 -
253 - # I do not know if this will break gcj stuff, so I'll only do it for
254 - # objc for now; basically "ffi.h" is the correct file to include,
255 - # but it gets installed in .../GCCVER/include and yet it does
256 - # "#include <ffitarget.h>" which (correctly, as it's an "extra" file)
257 - # is installed in .../GCCVER/include/libffi; the following fixes
258 - # ffi.'s include of ffitarget.h - Armando Di Cianno <fafhrd@g.o>
259 - if [[ -d ${D}${LIBPATH}/include/libffi ]] ; then
260 - mv -i "${D}"${LIBPATH}/include/libffi/* "${D}"${LIBPATH}/include || die
261 - rm -r "${D}"${LIBPATH}/include/libffi || die
262 - fi
263 -
264 - # Now do the fun stripping stuff
265 - env RESTRICT="" CHOST=${CHOST} prepstrip "${D}${BINPATH}"
266 - env RESTRICT="" CHOST=${CTARGET} prepstrip "${D}${LIBPATH}"
267 - # gcc used to install helper binaries in lib/ but then moved to libexec/
268 - [[ -d ${ED}/usr/libexec/gcc ]] && \
269 - env RESTRICT="" CHOST=${CHOST} prepstrip "${ED}/usr/libexec/gcc/${CTARGET}/${GCC_VERS}"
270 -
271 - # prune empty dirs left behind
272 - find "${ED}" -type d | xargs rmdir >& /dev/null
273 -}
274 -
275 -pkg_postinst() {
276 - # beware this also switches when it's on another branch version of GCC
277 - gcc-config ${CTARGET}-${GCC_VERS}
278 -}
279 -
280 -pkg_postrm() {
281 - # clean up the cruft left behind by cross-compilers
282 - if is_crosscompile ; then
283 - if [[ -z $(ls "${EROOT}"/etc/env.d/gcc/${CTARGET}* 2>/dev/null) ]] ; then
284 - rm -f "${EROOT}"/etc/env.d/gcc/config-${CTARGET}
285 - rm -f "${EROOT}"/etc/env.d/??gcc-${CTARGET}
286 - rm -f "${EROOT}"/usr/bin/${CTARGET}-{gcc,{g,c}++}{,32,64}
287 - fi
288 - return 0
289 - fi
290 -}
291
292 diff --git a/sys-devel/gcc-apple/gcc-apple-4.2.1_p5664.ebuild b/sys-devel/gcc-apple/gcc-apple-4.2.1_p5664.ebuild
293 deleted file mode 100644
294 index aaf9307..00000000
295 --- a/sys-devel/gcc-apple/gcc-apple-4.2.1_p5664.ebuild
296 +++ /dev/null
297 @@ -1,325 +0,0 @@
298 -# Copyright 1999-2016 Gentoo Foundation
299 -# Distributed under the terms of the GNU General Public License v2
300 -# $Id$
301 -
302 -EAPI="5"
303 -
304 -inherit eutils toolchain flag-o-matic autotools prefix
305 -
306 -GCC_VERS=${PV/_p*/}
307 -APPLE_VERS="${PV/*_p/}"
308 -DESCRIPTION="Apple branch of the GNU Compiler Collection, Developer Tools 3.2.3"
309 -HOMEPAGE="https://gcc.gnu.org"
310 -SRC_URI="http://www.opensource.apple.com/darwinsource/tarballs/other/gcc-${APPLE_VERS}.tar.gz
311 - http://www.opensource.apple.com/darwinsource/tarballs/other/libstdcxx-16.tar.gz
312 - http://www.opensource.apple.com/darwinsource/tarballs/other/libstdcxx-39.tar.gz
313 - fortran? ( mirror://gnu/gcc/gcc-4.2.4/gcc-fortran-4.2.4.tar.bz2 )"
314 -LICENSE="GPL-2 GPL-3"
315 -
316 -SLOT="42"
317 -KEYWORDS="~ppc-macos ~x64-macos ~x86-macos"
318 -IUSE="fortran nls +openmp objc objc++ +cxx"
319 -
320 -RDEPEND=">=sys-libs/zlib-1.1.4
321 - >=sys-libs/ncurses-5.2-r2
322 - nls? ( sys-devel/gettext )
323 - >=sys-devel/gcc-config-1.3.12-r4
324 - fortran? (
325 - >=dev-libs/gmp-4.2.1
326 - >=dev-libs/mpfr-2.2.0_p10
327 - )"
328 -DEPEND="${RDEPEND}
329 - >=sys-apps/texinfo-4.2-r4
330 - >=sys-devel/bison-1.875
331 - ${CATEGORY}/binutils-apple
332 - >=dev-libs/mpfr-2.2.0_p10"
333 -
334 -S=${WORKDIR}/gcc-${APPLE_VERS}
335 -
336 -# TPREFIX is the prefix of the CTARGET installation
337 -export TPREFIX=${TPREFIX:-${EPREFIX}}
338 -
339 -src_unpack() {
340 - # override toolchain.eclass func
341 - unpack ${A}
342 -}
343 -
344 -src_prepare() {
345 - # Support for fortran
346 - if use fortran ; then
347 - mv "${WORKDIR}"/gcc-4.2.4/gcc/fortran gcc/ || die
348 - mv "${WORKDIR}"/gcc-4.2.4/libgfortran . || die
349 - # from: substracted from http://r.research.att.com/tools/
350 - epatch "${FILESDIR}"/${PN}-4.2.1_p5646-gfortran.patch
351 - fi
352 -
353 - # move in libstdc++
354 - case ${CHOST} in
355 - *-darwin1*|i?86-*-darwin9|powerpc-*-darwin9)
356 - LIBSTDCXX_APPLE_VERSION=39
357 - ;;
358 - *)
359 - # pre Leopard has no dtrace, which is required by 37.11 and above
360 - # Leopard only has 32-bits version of dtrace
361 - LIBSTDCXX_APPLE_VERSION=16
362 - ;;
363 - esac
364 - mv "${WORKDIR}"/libstdcxx-${LIBSTDCXX_APPLE_VERSION}/libstdcxx/libstdc++-v3 .
365 - if [[ ${LIBSTDCXX_APPLE_VERSION} == 16 ]] ; then
366 - epatch "${FILESDIR}"/libstdc++-${LIBSTDCXX_APPLE_VERSION}.patch # does it apply on 37?
367 - sed -i -e 's/__block\([^_]\)/__blk\1/g' \
368 - libstdc++-v3/include/ext/mt_allocator.h \
369 - libstdc++-v3/src/mt_allocator.cc || die "conflict fix failed"
370 - fi
371 -
372 - # we use our libtool
373 - sed -i -e "s:/usr/bin/libtool:${EPREFIX}/usr/bin/${CTARGET}-libtool:" \
374 - gcc/config/darwin.h || die "sed gcc/config/darwin.h failed"
375 - # add prefixed Frameworks to default search paths (may want to change this
376 - # in a cross-compile)
377 - sed -i -e "/\"\/System\/Library\/Frameworks\"\,/i\ \ \"${EPREFIX}/Frameworks\"\, " \
378 - gcc/config/darwin-c.c || die "sed gcc/config/darwin-c.c failed"
379 -
380 - # Workaround deprecated "+Nc" syntax for GNU tail(1)
381 - sed -i -e "s:tail +16c:tail -c +16:g" \
382 - gcc/Makefile.in || die "sed gcc/Makefile.in failed."
383 -
384 - epatch "${FILESDIR}"/${PN}-4.0.1_p5465-default-altivec.patch
385 -
386 - # dsymutil stuff breaks on 10.4/x86, revert it
387 - [[ ${CHOST} == *86*-apple-darwin8 ]] && \
388 - epatch "${FILESDIR}"/${PN}-${GCC_VERS}-dsymutil.patch
389 -
390 - # bootstrapping might fail with host provided gcc on 10.4/x86
391 - if ! is_crosscompile && ! echo "int main(){return 0;}" | gcc -o "${T}"/foo \
392 - -mdynamic-no-pic -x c - >/dev/null 2>&1;
393 - then
394 - einfo "-mdynamic-no-pic doesn't work - disabling..."
395 - echo "BOOT_CFLAGS=-g -O2" > config/mh-x86-darwin
396 - XD=gcc/config/i386/x-darwin
397 - awk 'BEGIN{x=1}{if ($0 ~ "use -mdynamic-no-pic to build x86")
398 - {x=1-x} else if (x) print}' $XD > t && mv t $XD \
399 - || die "Failed to rewrite $XD"
400 - fi
401 -
402 - epatch "${FILESDIR}"/${PN}-4.2.1-prefix-search-dirs.patch
403 - eprefixify "${S}"/gcc/gcc.c
404 -
405 - if use !bootstrap ; then
406 - # this only occurs with up-to-date tools from the Prefix, and actually
407 - # breaks the bootstrap since the autoconf needs a very recent automake
408 - epatch "${FILESDIR}"/${PN}-${GCC_VERS}-texinfo.patch
409 - epatch "${FILESDIR}"/${PN}-${GCC_VERS}-autoconf-m4-precious.patch
410 - cd "${S}"/gcc && eautoconf
411 - cd "${S}"/libgomp && eautoconf
412 - fi
413 -
414 - local BRANDING_GCC_PKGVERSION="$(sed -n -e '/^#define VERSUFFIX/s/^[^"]*"\([^"]\+\)".*$/\1/p' "${S}"/gcc/version.c)"
415 - BRANDING_GCC_PKGVERSION=${BRANDING_GCC_PKGVERSION/(/(Gentoo ${PVR}, }
416 - einfo "patching gcc version: ${GCC_VERS}${BRANDING_GCC_PKGVERSION}"
417 -
418 - sed -i -e "s~VERSUFFIX \"[^\"]*~VERSUFFIX \"${BRANDING_GCC_PKGVERSION}~" \
419 - "${S}"/gcc/version.c || die "failed to update VERSUFFIX with Gentoo branding"
420 - sed -i -e 's~developer\.apple\.com\/bugreporter~bugs\.gentoo\.org\/~' \
421 - "${S}"/gcc/version.c || die "Failed to change the bug URL"
422 -}
423 -
424 -src_configure() {
425 - local langs="c"
426 - use cxx && langs="${langs},c++"
427 - use objc && langs="${langs},objc"
428 - use objc++ && langs="${langs/,objc/},objc,obj-c++" # need objc with objc++
429 - use fortran && langs="${langs},fortran"
430 -
431 - LIBPATH=${EPREFIX}/usr/lib/gcc/${CTARGET}/${GCC_VERS}
432 - if is_crosscompile ; then
433 - BINPATH=${EPREFIX}/usr/${CHOST}/${CTARGET}/gcc-bin/${GCC_VERS}
434 - else
435 - BINPATH=${EPREFIX}/usr/${CTARGET}/gcc-bin/${GCC_VERS}
436 - fi
437 - STDCXX_INCDIR=${LIBPATH}/include/g++-v${GCC_VERS/\.*/}
438 -
439 - local myconf="${myconf} \
440 - --prefix=${EPREFIX}/usr \
441 - --bindir=${BINPATH} \
442 - --includedir=${LIBPATH}/include \
443 - --datadir=${EPREFIX}/usr/share/gcc-data/${CTARGET}/${GCC_VERS} \
444 - --mandir=${EPREFIX}/usr/share/gcc-data/${CTARGET}/${GCC_VERS}/man \
445 - --infodir=${EPREFIX}/usr/share/gcc-data/${CTARGET}/${GCC_VERS}/info \
446 - --with-gxx-include-dir=${STDCXX_INCDIR} \
447 - --host=${CHOST}
448 - --enable-version-specific-runtime-libs"
449 -
450 - if is_crosscompile ; then
451 - # Straight from the GCC install doc:
452 - # "GCC has code to correctly determine the correct value for target
453 - # for nearly all native systems. Therefore, we highly recommend you
454 - # not provide a configure target when configuring a native compiler."
455 - myconf="${myconf} --target=${CTARGET}"
456 -
457 - # Tell compiler where to find what it needs
458 - myconf="${myconf} --with-sysroot=${EPREFIX}/usr/${CTARGET}"
459 -
460 - # Set this to something sane for both native and target
461 - CFLAGS="-O2 -pipe"
462 -
463 - local VAR="CFLAGS_"${CTARGET//-/_}
464 - CXXFLAGS=${!VAR}
465 - fi
466 - [[ -n ${CBUILD} ]] && myconf="${myconf} --build=${CBUILD}"
467 -
468 - # Native Language Support
469 - if use nls ; then
470 - myconf="${myconf} --enable-nls --without-included-gettext"
471 - else
472 - myconf="${myconf} --disable-nls"
473 - fi
474 -
475 - # reasonably sane globals (hopefully)
476 - myconf="${myconf} \
477 - --with-system-zlib \
478 - --disable-checking \
479 - --disable-werror"
480 -
481 - # ???
482 - myconf="${myconf} --enable-shared --enable-threads=posix"
483 -
484 - # make clear we're in an offset
485 - use prefix && myconf="${myconf} --with-local-prefix=${TPREFIX}/usr"
486 -
487 - # we don't use a GNU linker, so tell GCC where to find the linker stuff we
488 - # want it to use
489 - myconf="${myconf} \
490 - --with-as=${EPREFIX}/usr/bin/${CTARGET}-as \
491 - --with-ld=${EPREFIX}/usr/bin/${CTARGET}-ld"
492 -
493 - # make sure we never do multilib stuff, for that we need a different Prefix
494 - [[ -z ${I_KNOW_WHAT_IM_DOING_I_WANT_APPLE_MULTILIB} ]] \
495 - && myconf="${myconf} --disable-multilib"
496 -
497 - myconf="${myconf} --enable-languages=${langs} $(use_enable openmp libgomp)"
498 -
499 - # The produced libgcc_s.dylib is faulty if using a bit too much
500 - # optimisation. Nail it down to something sane
501 - CFLAGS="-O2 -pipe"
502 - CXXFLAGS=${CFLAGS}
503 -
504 - # https://gcc.gnu.org/ml/gcc-patches/2006-11/msg00765.html
505 - # (won't hurt if already 64-bits, but is essential when coming from a
506 - # multilib compiler -- the default)
507 - [[ ${CTARGET} == powerpc64-* || ${CTARGET} == x86_64-* ]] && \
508 - export CC="gcc -m64"
509 -
510 - mkdir -p "${WORKDIR}"/build
511 - cd "${WORKDIR}"/build
512 - einfo "Configuring GCC with: ${myconf//--/\n\t--}"
513 - "${S}"/configure ${myconf} || die "conf failed"
514 -}
515 -
516 -src_compile() {
517 - cd "${WORKDIR}"/build || die
518 - emake bootstrap || die "emake failed"
519 -}
520 -
521 -src_install() {
522 - cd "${WORKDIR}"/build
523 - # -jX doesn't work
524 - emake -j1 DESTDIR="${D}" install || die
525 -
526 - # Punt some tools which are really only useful while building gcc
527 - find "${ED}" -name install-tools -prune -type d -exec rm -rf "{}" \;
528 - # This one comes with binutils
529 - find "${ED}" -name libiberty.a -exec rm -f "{}" \;
530 -
531 - # Basic sanity check
532 - if ! is_crosscompile ; then
533 - local EXEEXT
534 - eval $(grep ^EXEEXT= "${WORKDIR}"/build/gcc/config.log)
535 - [[ -r ${D}${BINPATH}/gcc${EXEEXT} ]] || die "gcc not found in ${ED}"
536 - fi
537 -
538 - # create gcc-config entry
539 - dodir /etc/env.d/gcc
540 - local gcc_envd_base="/etc/env.d/gcc/${CHOST}-${GCC_VERS}"
541 -
542 - gcc_envd_file="${ED}${gcc_envd_base}"
543 -
544 - # phase PATH/ROOTPATH out ...
545 - echo "PATH=\"${BINPATH}\"" > ${gcc_envd_file}
546 - echo "ROOTPATH=\"${BINPATH}\"" >> ${gcc_envd_file}
547 - echo "GCC_PATH=\"${BINPATH}\"" >> ${gcc_envd_file}
548 -
549 - # we don't do multilib
550 - LDPATH="${LIBPATH}"
551 - echo "LDPATH=\"${LDPATH}\"" >> ${gcc_envd_file}
552 - echo "MANPATH=\"${EPREFIX}/usr/share/gcc-data/${CHOST}/${GCC_VERS}/man\"" >> ${gcc_envd_file}
553 - echo "INFOPATH=\"${EPREFIX}/usr/share/gcc-data/${CHOST}/${GCC_VERS}/info\"" >> ${gcc_envd_file}
554 - echo "STDCXX_INCDIR=\"g++-v${GCC_VERS/\.*/}\"" >> ${gcc_envd_file}
555 - is_crosscompile && echo "CTARGET=${CTARGET}" >> ${gcc_envd_file}
556 -
557 - # Move <cxxabi.h> to compiler-specific directories
558 - [[ -f ${D}${STDCXX_INCDIR}/cxxabi.h ]] && \
559 - mv -f "${D}"${STDCXX_INCDIR}/cxxabi.h "${D}"${LIBPATH}/include/
560 -
561 - # These should be symlinks
562 - dodir /usr/bin
563 - cd "${D}"${BINPATH}
564 - for x in cpp gcc g++ c++ g77 gcj gcjh gfortran ; do
565 - # For some reason, g77 gets made instead of ${CTARGET}-g77...
566 - # this should take care of that
567 - [[ -f ${x} ]] && mv ${x} ${CTARGET}-${x}
568 -
569 - if [[ -f ${CTARGET}-${x} ]] && ! is_crosscompile ; then
570 - ln -sf ${CTARGET}-${x} ${x}
571 -
572 - # Create version-ed symlinks
573 - dosym ${BINPATH#${EPREFIX}}/${CTARGET}-${x} \
574 - /usr/bin/${CTARGET}-${x}-${GCC_VERS}
575 - dosym ${BINPATH#${EPREFIX}}/${CTARGET}-${x} \
576 - /usr/bin/${x}-${GCC_VERS}
577 - fi
578 -
579 - if [[ -f ${CTARGET}-${x}-${GCC_VERS} ]] ; then
580 - rm -f ${CTARGET}-${x}-${GCC_VERS}
581 - ln -sf ${CTARGET}-${x} ${CTARGET}-${x}-${GCC_VERS}
582 - fi
583 - done
584 -
585 - # I do not know if this will break gcj stuff, so I'll only do it for
586 - # objc for now; basically "ffi.h" is the correct file to include,
587 - # but it gets installed in .../GCCVER/include and yet it does
588 - # "#include <ffitarget.h>" which (correctly, as it's an "extra" file)
589 - # is installed in .../GCCVER/include/libffi; the following fixes
590 - # ffi.'s include of ffitarget.h - Armando Di Cianno <fafhrd@g.o>
591 - if [[ -d ${D}${LIBPATH}/include/libffi ]] ; then
592 - mv -i "${D}"${LIBPATH}/include/libffi/* "${D}"${LIBPATH}/include || die
593 - rm -r "${D}"${LIBPATH}/include/libffi || die
594 - fi
595 -
596 - # Now do the fun stripping stuff
597 - env RESTRICT="" CHOST=${CHOST} prepstrip "${D}${BINPATH}"
598 - env RESTRICT="" CHOST=${CTARGET} prepstrip "${D}${LIBPATH}"
599 - # gcc used to install helper binaries in lib/ but then moved to libexec/
600 - [[ -d ${ED}/usr/libexec/gcc ]] && \
601 - env RESTRICT="" CHOST=${CHOST} prepstrip "${ED}/usr/libexec/gcc/${CTARGET}/${GCC_VERS}"
602 -
603 - # prune empty dirs left behind
604 - find "${ED}" -type d | xargs rmdir >& /dev/null
605 -}
606 -
607 -pkg_postinst() {
608 - # beware this also switches when it's on another branch version of GCC
609 - gcc-config ${CTARGET}-${GCC_VERS}
610 -}
611 -
612 -pkg_postrm() {
613 - # clean up the cruft left behind by cross-compilers
614 - if is_crosscompile ; then
615 - if [[ -z $(ls "${EROOT}"/etc/env.d/gcc/${CTARGET}* 2>/dev/null) ]] ; then
616 - rm -f "${EROOT}"/etc/env.d/gcc/config-${CTARGET}
617 - rm -f "${EROOT}"/etc/env.d/??gcc-${CTARGET}
618 - rm -f "${EROOT}"/usr/bin/${CTARGET}-{gcc,{g,c}++}{,32,64}
619 - fi
620 - return 0
621 - fi
622 -}
623
624 diff --git a/sys-devel/gcc-apple/gcc-apple-4.2.1_p5666-r1.ebuild b/sys-devel/gcc-apple/gcc-apple-4.2.1_p5666-r1.ebuild
625 deleted file mode 100644
626 index a180a2d..00000000
627 --- a/sys-devel/gcc-apple/gcc-apple-4.2.1_p5666-r1.ebuild
628 +++ /dev/null
629 @@ -1,337 +0,0 @@
630 -# Copyright 1999-2016 Gentoo Foundation
631 -# Distributed under the terms of the GNU General Public License v2
632 -# $Id$
633 -
634 -EAPI="5"
635 -
636 -inherit eutils toolchain flag-o-matic autotools prefix
637 -
638 -GCC_VERS=${PV/_p*/}
639 -APPLE_VERS="${PV/*_p/}.3"
640 -DESCRIPTION="Apple branch of the GNU Compiler Collection, Developer Tools 4.0"
641 -HOMEPAGE="https://gcc.gnu.org"
642 -SRC_URI="http://www.opensource.apple.com/darwinsource/tarballs/other/gcc-${APPLE_VERS}.tar.gz
643 - http://www.opensource.apple.com/darwinsource/tarballs/other/libstdcxx-16.tar.gz
644 - http://www.opensource.apple.com/darwinsource/tarballs/other/libstdcxx-39.tar.gz
645 - fortran? ( mirror://gnu/gcc/gcc-4.2.4/gcc-fortran-4.2.4.tar.bz2 )"
646 -LICENSE="GPL-2 GPL-3"
647 -
648 -SLOT="42"
649 -KEYWORDS="~ppc-macos ~x64-macos ~x86-macos"
650 -IUSE="fortran nls +openmp objc objc++ +cxx"
651 -
652 -RDEPEND=">=sys-libs/zlib-1.1.4
653 - >=sys-libs/ncurses-5.2-r2
654 - nls? ( sys-devel/gettext )
655 - >=sys-devel/gcc-config-1.3.12-r4
656 - sys-libs/csu
657 - fortran? (
658 - >=dev-libs/gmp-4.2.1
659 - >=dev-libs/mpfr-2.2.0_p10
660 - )"
661 -DEPEND="${RDEPEND}
662 - >=sys-apps/texinfo-4.2-r4
663 - >=sys-devel/bison-1.875
664 - ${CATEGORY}/binutils-apple
665 - >=dev-libs/mpfr-2.2.0_p10"
666 -
667 -S=${WORKDIR}/gcc-${APPLE_VERS}
668 -
669 -# TPREFIX is the prefix of the CTARGET installation
670 -export TPREFIX=${TPREFIX:-${EPREFIX}}
671 -
672 -src_unpack() {
673 - # override toolchain.eclass func
674 - unpack ${A}
675 -}
676 -
677 -src_prepare() {
678 - # Support for fortran
679 - if use fortran ; then
680 - mv "${WORKDIR}"/gcc-4.2.4/gcc/fortran gcc/ || die
681 - mv "${WORKDIR}"/gcc-4.2.4/libgfortran . || die
682 - # from: substracted from http://r.research.att.com/tools/
683 - epatch "${FILESDIR}"/${PN}-4.2.1_p5646-gfortran.patch
684 - fi
685 -
686 - # move in libstdc++
687 - case ${CHOST} in
688 - *-darwin1*|i?86-*-darwin9|powerpc-*-darwin9)
689 - LIBSTDCXX_APPLE_VERSION=39
690 - ;;
691 - *)
692 - # pre Leopard has no dtrace, which is required by 37.11 and above
693 - # Leopard only has 32-bits version of dtrace
694 - LIBSTDCXX_APPLE_VERSION=16
695 - ;;
696 - esac
697 - mv "${WORKDIR}"/libstdcxx-${LIBSTDCXX_APPLE_VERSION}/libstdcxx/libstdc++-v3 .
698 - if [[ ${LIBSTDCXX_APPLE_VERSION} == 16 ]] ; then
699 - epatch "${FILESDIR}"/libstdc++-${LIBSTDCXX_APPLE_VERSION}.patch # does it apply on 37?
700 - sed -i -e 's/__block\([^_]\)/__blk\1/g' \
701 - libstdc++-v3/include/ext/mt_allocator.h \
702 - libstdc++-v3/src/mt_allocator.cc || die "conflict fix failed"
703 - fi
704 -
705 - # we use our libtool
706 - sed -i -e "s:/usr/bin/libtool:${EPREFIX}/usr/bin/${CTARGET}-libtool:" \
707 - gcc/config/darwin.h || die "sed gcc/config/darwin.h failed"
708 - # add prefixed Frameworks to default search paths (may want to change this
709 - # in a cross-compile)
710 - sed -i -e "/\"\/System\/Library\/Frameworks\"\,/i\ \ \"${EPREFIX}/Frameworks\"\, " \
711 - gcc/config/darwin-c.c || die "sed gcc/config/darwin-c.c failed"
712 -
713 - # Workaround deprecated "+Nc" syntax for GNU tail(1)
714 - sed -i -e "s:tail +16c:tail -c +16:g" \
715 - gcc/Makefile.in || die "sed gcc/Makefile.in failed."
716 -
717 - # default to AltiVec on PPC, like for older releases
718 - epatch "${FILESDIR}"/${PN}-4.0.1_p5465-default-altivec.patch
719 -
720 - # support -arch XXX if XXX is actually what the toolchain targets because
721 - # some upstreams insist on setting it
722 - epatch "${FILESDIR}"/${PN}-4.2.1-arch-option.patch
723 -
724 - # dsymutil stuff breaks on 10.4/x86, revert it
725 - [[ ${CHOST} == *86*-apple-darwin8 ]] && \
726 - epatch "${FILESDIR}"/${PN}-${GCC_VERS}-dsymutil.patch
727 -
728 - # Pseudo-support OS X 10.10
729 - [[ ${CHOST} == *-darwin14 ]] && \
730 - epatch "${FILESDIR}"/${P}-darwin14.patch
731 -
732 - # bootstrapping might fail with host provided gcc on 10.4/x86
733 - if ! is_crosscompile && ! echo "int main(){return 0;}" | gcc -o "${T}"/foo \
734 - -mdynamic-no-pic -x c - >/dev/null 2>&1;
735 - then
736 - einfo "-mdynamic-no-pic doesn't work - disabling..."
737 - echo "BOOT_CFLAGS=-g -O2" > config/mh-x86-darwin
738 - XD=gcc/config/i386/x-darwin
739 - awk 'BEGIN{x=1}{if ($0 ~ "use -mdynamic-no-pic to build x86")
740 - {x=1-x} else if (x) print}' $XD > t && mv t $XD \
741 - || die "Failed to rewrite $XD"
742 - fi
743 -
744 - epatch "${FILESDIR}"/${P}-perl-5.18.patch
745 -
746 - epatch "${FILESDIR}"/${PN}-4.2.1-prefix-search-dirs.patch
747 - eprefixify "${S}"/gcc/gcc.c
748 -
749 - if use !bootstrap ; then
750 - # this only occurs with up-to-date tools from the Prefix, and actually
751 - # breaks the bootstrap since the autoconf needs a very recent automake
752 - epatch "${FILESDIR}"/${PN}-${GCC_VERS}-texinfo.patch
753 - epatch "${FILESDIR}"/${PN}-${GCC_VERS}-autoconf-m4-precious.patch
754 - cd "${S}"/gcc && eautoconf
755 - cd "${S}"/libgomp && eautoconf
756 - fi
757 -
758 - local BRANDING_GCC_PKGVERSION="$(sed -n -e '/^#define VERSUFFIX/s/^[^"]*"\([^"]\+\)".*$/\1/p' "${S}"/gcc/version.c)"
759 - BRANDING_GCC_PKGVERSION=${BRANDING_GCC_PKGVERSION/(/(Gentoo ${PVR}, }
760 - einfo "patching gcc version: ${GCC_VERS}${BRANDING_GCC_PKGVERSION}"
761 -
762 - sed -i -e "s~VERSUFFIX \"[^\"]*~VERSUFFIX \"${BRANDING_GCC_PKGVERSION}~" \
763 - "${S}"/gcc/version.c || die "failed to update VERSUFFIX with Gentoo branding"
764 - sed -i -e 's~developer\.apple\.com\/bugreporter~bugs\.gentoo\.org\/~' \
765 - "${S}"/gcc/version.c || die "Failed to change the bug URL"
766 -}
767 -
768 -src_configure() {
769 - local langs="c"
770 - use cxx && langs="${langs},c++"
771 - use objc && langs="${langs},objc"
772 - use objc++ && langs="${langs/,objc/},objc,obj-c++" # need objc with objc++
773 - use fortran && langs="${langs},fortran"
774 -
775 - LIBPATH=${EPREFIX}/usr/lib/gcc/${CTARGET}/${GCC_VERS}
776 - if is_crosscompile ; then
777 - BINPATH=${EPREFIX}/usr/${CHOST}/${CTARGET}/gcc-bin/${GCC_VERS}
778 - else
779 - BINPATH=${EPREFIX}/usr/${CTARGET}/gcc-bin/${GCC_VERS}
780 - fi
781 - STDCXX_INCDIR=${LIBPATH}/include/g++-v${GCC_VERS/\.*/}
782 -
783 - local myconf="${myconf} \
784 - --prefix=${EPREFIX}/usr \
785 - --bindir=${BINPATH} \
786 - --includedir=${LIBPATH}/include \
787 - --datadir=${EPREFIX}/usr/share/gcc-data/${CTARGET}/${GCC_VERS} \
788 - --mandir=${EPREFIX}/usr/share/gcc-data/${CTARGET}/${GCC_VERS}/man \
789 - --infodir=${EPREFIX}/usr/share/gcc-data/${CTARGET}/${GCC_VERS}/info \
790 - --with-gxx-include-dir=${STDCXX_INCDIR} \
791 - --host=${CHOST} \
792 - --enable-version-specific-runtime-libs"
793 -
794 - if is_crosscompile ; then
795 - # Straight from the GCC install doc:
796 - # "GCC has code to correctly determine the correct value for target
797 - # for nearly all native systems. Therefore, we highly recommend you
798 - # not provide a configure target when configuring a native compiler."
799 - myconf="${myconf} --target=${CTARGET}"
800 -
801 - # Tell compiler where to find what it needs
802 - myconf="${myconf} --with-sysroot=${EPREFIX}/usr/${CTARGET}"
803 -
804 - # Set this to something sane for both native and target
805 - CFLAGS="-O2 -pipe"
806 -
807 - local VAR="CFLAGS_"${CTARGET//-/_}
808 - CXXFLAGS=${!VAR}
809 - fi
810 - [[ -n ${CBUILD} ]] && myconf="${myconf} --build=${CBUILD}"
811 -
812 - # Native Language Support
813 - if use nls ; then
814 - myconf="${myconf} --enable-nls --without-included-gettext"
815 - else
816 - myconf="${myconf} --disable-nls"
817 - fi
818 -
819 - # reasonably sane globals (hopefully)
820 - myconf="${myconf} \
821 - --with-system-zlib \
822 - --disable-checking \
823 - --disable-werror"
824 -
825 - # ???
826 - myconf="${myconf} --enable-shared --enable-threads=posix"
827 -
828 - # make clear we're in an offset
829 - use prefix && myconf="${myconf} --with-local-prefix=${TPREFIX}/usr"
830 -
831 - # we don't use a GNU linker, so tell GCC where to find the linker stuff we
832 - # want it to use
833 - myconf="${myconf} \
834 - --with-as=${EPREFIX}/usr/bin/${CTARGET}-as \
835 - --with-ld=${EPREFIX}/usr/bin/${CTARGET}-ld"
836 -
837 - # make sure we never do multilib stuff, for that we need a different Prefix
838 - [[ -z ${I_KNOW_WHAT_IM_DOING_I_WANT_APPLE_MULTILIB} ]] \
839 - && myconf="${myconf} --disable-multilib"
840 -
841 - myconf="${myconf} --enable-languages=${langs} $(use_enable openmp libgomp)"
842 -
843 - # The produced libgcc_s.dylib is faulty if using a bit too much
844 - # optimisation. Nail it down to something sane
845 - CFLAGS="-O2 -pipe"
846 - CXXFLAGS=${CFLAGS}
847 -
848 - # https://gcc.gnu.org/ml/gcc-patches/2006-11/msg00765.html
849 - # (won't hurt if already 64-bits, but is essential when coming from a
850 - # multilib compiler -- the default)
851 - [[ ${CTARGET} == powerpc64-* || ${CTARGET} == x86_64-* ]] && \
852 - export CC="${CC:-$(tc-getCC)} -m64"
853 -
854 - mkdir -p "${WORKDIR}"/build
855 - cd "${WORKDIR}"/build
856 - einfo "Configuring GCC with: ${myconf//--/\n\t--}"
857 - "${S}"/configure ${myconf} || die "conf failed"
858 -}
859 -
860 -src_compile() {
861 - cd "${WORKDIR}"/build || die
862 - emake bootstrap || die "emake failed"
863 -}
864 -
865 -src_install() {
866 - cd "${WORKDIR}"/build
867 - # -jX doesn't work
868 - emake -j1 DESTDIR="${D}" install || die
869 -
870 - # Punt some tools which are really only useful while building gcc
871 - find "${ED}" -name install-tools -prune -type d -exec rm -rf "{}" \;
872 - # This one comes with binutils
873 - find "${ED}" -name libiberty.a -exec rm -f "{}" \;
874 -
875 - # Basic sanity check
876 - if ! is_crosscompile ; then
877 - local EXEEXT
878 - eval $(grep ^EXEEXT= "${WORKDIR}"/build/gcc/config.log)
879 - [[ -r ${D}${BINPATH}/gcc${EXEEXT} ]] || die "gcc not found in ${ED}"
880 - fi
881 -
882 - # create gcc-config entry
883 - dodir /etc/env.d/gcc
884 - local gcc_envd_base="/etc/env.d/gcc/${CHOST}-${GCC_VERS}"
885 -
886 - gcc_envd_file="${ED}${gcc_envd_base}"
887 -
888 - # phase PATH/ROOTPATH out ...
889 - echo "PATH=\"${BINPATH}\"" > ${gcc_envd_file}
890 - echo "ROOTPATH=\"${BINPATH}\"" >> ${gcc_envd_file}
891 - echo "GCC_PATH=\"${BINPATH}\"" >> ${gcc_envd_file}
892 -
893 - # we don't do multilib
894 - LDPATH="${LIBPATH}"
895 - echo "LDPATH=\"${LDPATH}\"" >> ${gcc_envd_file}
896 - echo "MANPATH=\"${EPREFIX}/usr/share/gcc-data/${CHOST}/${GCC_VERS}/man\"" >> ${gcc_envd_file}
897 - echo "INFOPATH=\"${EPREFIX}/usr/share/gcc-data/${CHOST}/${GCC_VERS}/info\"" >> ${gcc_envd_file}
898 - echo "STDCXX_INCDIR=\"g++-v${GCC_VERS/\.*/}\"" >> ${gcc_envd_file}
899 - is_crosscompile && echo "CTARGET=${CTARGET}" >> ${gcc_envd_file}
900 -
901 - # Move <cxxabi.h> to compiler-specific directories
902 - [[ -f ${D}${STDCXX_INCDIR}/cxxabi.h ]] && \
903 - mv -f "${D}"${STDCXX_INCDIR}/cxxabi.h "${D}"${LIBPATH}/include/
904 -
905 - # These should be symlinks
906 - dodir /usr/bin
907 - cd "${D}"${BINPATH}
908 - for x in cpp gcc g++ c++ g77 gcj gcjh gfortran ; do
909 - # For some reason, g77 gets made instead of ${CTARGET}-g77...
910 - # this should take care of that
911 - [[ -f ${x} ]] && mv ${x} ${CTARGET}-${x}
912 -
913 - if [[ -f ${CTARGET}-${x} ]] && ! is_crosscompile ; then
914 - ln -sf ${CTARGET}-${x} ${x}
915 -
916 - # Create version-ed symlinks
917 - dosym ${BINPATH#${EPREFIX}}/${CTARGET}-${x} \
918 - /usr/bin/${CTARGET}-${x}-${GCC_VERS}
919 - dosym ${BINPATH#${EPREFIX}}/${CTARGET}-${x} \
920 - /usr/bin/${x}-${GCC_VERS}
921 - fi
922 -
923 - if [[ -f ${CTARGET}-${x}-${GCC_VERS} ]] ; then
924 - rm -f ${CTARGET}-${x}-${GCC_VERS}
925 - ln -sf ${CTARGET}-${x} ${CTARGET}-${x}-${GCC_VERS}
926 - fi
927 - done
928 -
929 - # I do not know if this will break gcj stuff, so I'll only do it for
930 - # objc for now; basically "ffi.h" is the correct file to include,
931 - # but it gets installed in .../GCCVER/include and yet it does
932 - # "#include <ffitarget.h>" which (correctly, as it's an "extra" file)
933 - # is installed in .../GCCVER/include/libffi; the following fixes
934 - # ffi.'s include of ffitarget.h - Armando Di Cianno <fafhrd@g.o>
935 - if [[ -d ${D}${LIBPATH}/include/libffi ]] ; then
936 - mv -i "${D}"${LIBPATH}/include/libffi/* "${D}"${LIBPATH}/include || die
937 - rm -r "${D}"${LIBPATH}/include/libffi || die
938 - fi
939 -
940 - # Now do the fun stripping stuff
941 - env RESTRICT="" CHOST=${CHOST} prepstrip "${D}${BINPATH}"
942 - env RESTRICT="" CHOST=${CTARGET} prepstrip "${D}${LIBPATH}"
943 - # gcc used to install helper binaries in lib/ but then moved to libexec/
944 - [[ -d ${ED}/usr/libexec/gcc ]] && \
945 - env RESTRICT="" CHOST=${CHOST} prepstrip "${ED}/usr/libexec/gcc/${CTARGET}/${GCC_VERS}"
946 -
947 - # prune empty dirs left behind
948 - find "${ED}" -type d | xargs rmdir >& /dev/null
949 -}
950 -
951 -pkg_postinst() {
952 - # beware this also switches when it's on another branch version of GCC
953 - gcc-config ${CTARGET}-${GCC_VERS}
954 -}
955 -
956 -pkg_postrm() {
957 - # clean up the cruft left behind by cross-compilers
958 - if is_crosscompile ; then
959 - if [[ -z $(ls "${EROOT}"/etc/env.d/gcc/${CTARGET}* 2>/dev/null) ]] ; then
960 - rm -f "${EROOT}"/etc/env.d/gcc/config-${CTARGET}
961 - rm -f "${EROOT}"/etc/env.d/??gcc-${CTARGET}
962 - rm -f "${EROOT}"/usr/bin/${CTARGET}-{gcc,{g,c}++}{,32,64}
963 - fi
964 - return 0
965 - fi
966 -}
967
968 diff --git a/sys-devel/gcc-apple/gcc-apple-4.2.1_p5666-r2.ebuild b/sys-devel/gcc-apple/gcc-apple-4.2.1_p5666-r2.ebuild
969 index 3540664..7230faf 100644
970 --- a/sys-devel/gcc-apple/gcc-apple-4.2.1_p5666-r2.ebuild
971 +++ b/sys-devel/gcc-apple/gcc-apple-4.2.1_p5666-r2.ebuild
972 @@ -1,4 +1,4 @@
973 -# Copyright 1999-2016 Gentoo Foundation
974 +# Copyright 1999-2017 Gentoo Foundation
975 # Distributed under the terms of the GNU General Public License v2
976 # $Id$
977
978 @@ -18,7 +18,7 @@ LICENSE="GPL-2 GPL-3"
979
980 SLOT="42"
981 KEYWORDS="~ppc-macos ~x64-macos ~x86-macos"
982 -IUSE="fortran nls +openmp objc objc++ +cxx"
983 +IUSE="bootstrap fortran nls +openmp objc objc++ +cxx"
984
985 RDEPEND=">=sys-libs/zlib-1.1.4
986 >=sys-libs/ncurses-5.2-r2