/[gentoo-x86]/sys-devel/gcc/gcc-3.2.2.ebuild
Gentoo

Diff of /sys-devel/gcc/gcc-3.2.2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.18 Revision 1.19
1# Copyright 1999-2003 Gentoo Technologies, Inc. 1# Copyright 1999-2003 Gentoo Technologies, Inc.
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/Attic/gcc-3.2.2.ebuild,v 1.18 2003/08/24 08:40:43 azarah Exp $ 3# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/Attic/gcc-3.2.2.ebuild,v 1.19 2003/09/05 02:01:09 msterret Exp $
4 4
5IUSE="static nls bootstrap java build" 5IUSE="static nls bootstrap java build"
6 6
7inherit eutils flag-o-matic libtool 7inherit eutils flag-o-matic libtool
8 8
60 60
61if [ -z "${SNAPSHOT}" ] 61if [ -z "${SNAPSHOT}" ]
62then 62then
63 S="${WORKDIR}/${PN}-${MAIN_BRANCH}" 63 S="${WORKDIR}/${PN}-${MAIN_BRANCH}"
64 SRC_URI="ftp://gcc.gnu.org/pub/gcc/releases/${P}/${PN}-${MAIN_BRANCH}.tar.bz2" 64 SRC_URI="ftp://gcc.gnu.org/pub/gcc/releases/${P}/${PN}-${MAIN_BRANCH}.tar.bz2"
65 65
66 if [ -n "${PATCH_VER}" ] 66 if [ -n "${PATCH_VER}" ]
67 then 67 then
68 SRC_URI="${SRC_URI} 68 SRC_URI="${SRC_URI}
69 mirror://gentoo/${P}-patches-${PATCH_VER}.tar.bz2" 69 mirror://gentoo/${P}-patches-${PATCH_VER}.tar.bz2"
70 fi 70 fi
101 !hppa? ( mips? >=sys-devel/binutils-2.13.90.0.16 : >=sys-devel/binutils-2.13.90.0.18 ) 101 !hppa? ( mips? >=sys-devel/binutils-2.13.90.0.16 : >=sys-devel/binutils-2.13.90.0.18 )
102 hppa? ( >=sys-devel/binutils-2.13.90.0.16 ) 102 hppa? ( >=sys-devel/binutils-2.13.90.0.16 )
103 >=sys-devel/gcc-config-1.3.1 103 >=sys-devel/gcc-config-1.3.1
104 !build? ( >=sys-libs/ncurses-5.2-r2 104 !build? ( >=sys-libs/ncurses-5.2-r2
105 nls? ( sys-devel/gettext ) )" 105 nls? ( sys-devel/gettext ) )"
106 106
107RDEPEND="virtual/glibc 107RDEPEND="virtual/glibc
108 >=sys-devel/gcc-config-1.3.1 108 >=sys-devel/gcc-config-1.3.1
109 >=sys-libs/zlib-1.1.4 109 >=sys-libs/zlib-1.1.4
110 >=sys-apps/texinfo-4.2-r4 110 >=sys-apps/texinfo-4.2-r4
111 !build? ( >=sys-libs/ncurses-5.2-r2 )" 111 !build? ( >=sys-libs/ncurses-5.2-r2 )"
141 141
142src_unpack() { 142src_unpack() {
143 if [ -z "${SNAPSHOT}" ] 143 if [ -z "${SNAPSHOT}" ]
144 then 144 then
145 unpack ${PN}-${MAIN_BRANCH}.tar.bz2 145 unpack ${PN}-${MAIN_BRANCH}.tar.bz2
146 146
147 if [ -n "${PATCH_VER}" ] 147 if [ -n "${PATCH_VER}" ]
148 then 148 then
149 unpack ${P}-patches-${PATCH_VER}.tar.bz2 149 unpack ${P}-patches-${PATCH_VER}.tar.bz2
150 fi 150 fi
151 else 151 else
203 do 203 do
204 # Fix --datadir= 204 # Fix --datadir=
205 cp ${x} ${x}.orig 205 cp ${x} ${x}.orig
206 sed -e 's:datadir = @datadir@:datadir = $(FAKE_ROOT)@datadir@:' \ 206 sed -e 's:datadir = @datadir@:datadir = $(FAKE_ROOT)@datadir@:' \
207 ${x}.orig > ${x} 207 ${x}.orig > ${x}
208 208
209 # Fix --bindir= 209 # Fix --bindir=
210 cp ${x} ${x}.orig 210 cp ${x} ${x}.orig
211 sed -e 's:bindir = @bindir@:bindir = $(FAKE_ROOT)@bindir@:' \ 211 sed -e 's:bindir = @bindir@:bindir = $(FAKE_ROOT)@bindir@:' \
212 ${x}.orig > ${x} 212 ${x}.orig > ${x}
213 213
219 # Fix --with-gxx-include-dir= 219 # Fix --with-gxx-include-dir=
220 cp ${x} ${x}.orig 220 cp ${x} ${x}.orig
221 sed -e 's:gxx_include_dir = @gxx_:gxx_include_dir = $(FAKE_ROOT)@gxx_:' \ 221 sed -e 's:gxx_include_dir = @gxx_:gxx_include_dir = $(FAKE_ROOT)@gxx_:' \
222 -e 's:glibcppinstalldir = @gxx_:glibcppinstalldir = $(FAKE_ROOT)@gxx_:' \ 222 -e 's:glibcppinstalldir = @gxx_:glibcppinstalldir = $(FAKE_ROOT)@gxx_:' \
223 ${x}.orig > ${x} 223 ${x}.orig > ${x}
224 224
225 # Where java security stuff should be installed 225 # Where java security stuff should be installed
226 cp ${x} ${x}.orig 226 cp ${x} ${x}.orig
227 sed -e 's:secdir = $(libdir)/security:secdir = $(FAKE_ROOT)$(LIBPATH)/security:' \ 227 sed -e 's:secdir = $(libdir)/security:secdir = $(FAKE_ROOT)$(LIBPATH)/security:' \
228 ${x}.orig > ${x} 228 ${x}.orig > ${x}
229 229
230 rm -f ${x}.orig 230 rm -f ${x}.orig
231 done 231 done
232} 232}
233 233
234src_compile() { 234src_compile() {
235 local myconf="" 235 local myconf=""
236 local gcc_lang="" 236 local gcc_lang=""
237 237
238 if [ -z "`use build`" ] 238 if [ -z "`use build`" ]
239 then 239 then
240 myconf="${myconf} --enable-shared" 240 myconf="${myconf} --enable-shared"
241 gcc_lang="c,c++,ada,f77,objc" 241 gcc_lang="c,c++,ada,f77,objc"
242 else 242 else
288 288
289 touch ${S}/gcc/c-gperf.h 289 touch ${S}/gcc/c-gperf.h
290 290
291 # Do not make manpages if we do not have perl ... 291 # Do not make manpages if we do not have perl ...
292 if [ ! -x /usr/bin/perl ] 292 if [ ! -x /usr/bin/perl ]
293 then 293 then
294 find ${S} -name '*.[17]' -exec touch {} \; || : 294 find ${S} -name '*.[17]' -exec touch {} \; || :
295 fi 295 fi
296 296
297 # Setup -j in MAKEOPTS 297 # Setup -j in MAKEOPTS
298 get_number_of_jobs 298 get_number_of_jobs
340 mandir=${D}${DATAPATH}/man \ 340 mandir=${D}${DATAPATH}/man \
341 infodir=${D}${DATAPATH}/info \ 341 infodir=${D}${DATAPATH}/info \
342 LIBPATH="${LIBPATH}" \ 342 LIBPATH="${LIBPATH}" \
343 FAKE_ROOT="${D}" \ 343 FAKE_ROOT="${D}" \
344 install || die 344 install || die
345 345
346 [ -r ${D}${BINPATH}/gcc ] || die "gcc not found in ${D}" 346 [ -r ${D}${BINPATH}/gcc ] || die "gcc not found in ${D}"
347 347
348 dodir /lib /usr/bin 348 dodir /lib /usr/bin
349 dodir /etc/env.d/gcc 349 dodir /etc/env.d/gcc
350 echo "PATH=\"${BINPATH}\"" > ${D}/etc/env.d/gcc/${CCHOST}-${MY_PV_FULL} 350 echo "PATH=\"${BINPATH}\"" > ${D}/etc/env.d/gcc/${CCHOST}-${MY_PV_FULL}
351 echo "ROOTPATH=\"${BINPATH}\"" >> ${D}/etc/env.d/gcc/${CCHOST}-${MY_PV_FULL} 351 echo "ROOTPATH=\"${BINPATH}\"" >> ${D}/etc/env.d/gcc/${CCHOST}-${MY_PV_FULL}
352 echo "LDPATH=\"${LIBPATH}\"" >> ${D}/etc/env.d/gcc/${CCHOST}-${MY_PV_FULL} 352 echo "LDPATH=\"${LIBPATH}\"" >> ${D}/etc/env.d/gcc/${CCHOST}-${MY_PV_FULL}
354 echo "INFOPATH=\"${DATAPATH}/info\"" >> ${D}/etc/env.d/gcc/${CCHOST}-${MY_PV_FULL} 354 echo "INFOPATH=\"${DATAPATH}/info\"" >> ${D}/etc/env.d/gcc/${CCHOST}-${MY_PV_FULL}
355 echo "STDCXX_INCDIR=\"${STDCXX_INCDIR##*/}\"" >> ${D}/etc/env.d/gcc/${CCHOST}-${MY_PV_FULL} 355 echo "STDCXX_INCDIR=\"${STDCXX_INCDIR##*/}\"" >> ${D}/etc/env.d/gcc/${CCHOST}-${MY_PV_FULL}
356 # Also set CC and CXX 356 # Also set CC and CXX
357 echo "CC=\"gcc\"" >> ${D}/etc/env.d/gcc/${CCHOST}-${MY_PV_FULL} 357 echo "CC=\"gcc\"" >> ${D}/etc/env.d/gcc/${CCHOST}-${MY_PV_FULL}
358 echo "CXX=\"g++\"" >> ${D}/etc/env.d/gcc/${CCHOST}-${MY_PV_FULL} 358 echo "CXX=\"g++\"" >> ${D}/etc/env.d/gcc/${CCHOST}-${MY_PV_FULL}
359 359
360 # Install wrappers 360 # Install wrappers
361# Handled by gcc-config now ... 361# Handled by gcc-config now ...
362# exeinto /lib 362# exeinto /lib
363# doexe ${FILESDIR}/cpp 363# doexe ${FILESDIR}/cpp
364# exeinto /usr/bin 364# exeinto /usr/bin
365# doexe ${FILESDIR}/cc 365# doexe ${FILESDIR}/cc
366 366
367# This should be invalidated by the linker scripts we have as the latest 367# This should be invalidated by the linker scripts we have as the latest
368# fix for bug #4411 368# fix for bug #4411
369# 369#
370# # gcc-3.1 have a problem with the ordering of Search Directories. For 370# # gcc-3.1 have a problem with the ordering of Search Directories. For
371# # instance, if you have libreadline.so in /lib, and libreadline.a in 371# # instance, if you have libreadline.so in /lib, and libreadline.a in
480 dodoc ChangeLog* README 480 dodoc ChangeLog* README
481 docinto ${CCHOST}/libstdc++-v3/html 481 docinto ${CCHOST}/libstdc++-v3/html
482 dohtml -r -a css,diff,html,txt,xml docs/html/* 482 dohtml -r -a css,diff,html,txt,xml docs/html/*
483 cp -f docs/html/17_intro/[A-Z]* \ 483 cp -f docs/html/17_intro/[A-Z]* \
484 ${D}/usr/share/doc/${PF}/${DOCDESTTREE}/17_intro/ 484 ${D}/usr/share/doc/${PF}/${DOCDESTTREE}/17_intro/
485 485
486 if [ -n "`use java`" ] 486 if [ -n "`use java`" ]
487 then 487 then
488 cd ${S}/fastjar 488 cd ${S}/fastjar
489 docinto ${CCHOST}/fastjar 489 docinto ${CCHOST}/fastjar
490 dodoc AUTHORS CHANGES COPYING ChangeLog NEWS README 490 dodoc AUTHORS CHANGES COPYING ChangeLog NEWS README
530 fi 530 fi
531 531
532 # Update libtool linker scripts to reference new gcc version ... 532 # Update libtool linker scripts to reference new gcc version ...
533 if [ "${ROOT}" = "/" ] && \ 533 if [ "${ROOT}" = "/" ] && \
534 [ -f "${WORKDIR}/.oldgccversion" -o -f "${WORKDIR}/.oldgccchost" ] 534 [ -f "${WORKDIR}/.oldgccversion" -o -f "${WORKDIR}/.oldgccchost" ]
535 then 535 then
536 local OLD_GCC_VERSION= 536 local OLD_GCC_VERSION=
537 local OLD_GCC_CHOST= 537 local OLD_GCC_CHOST=
538 538
539 if [ -f "${WORKDIR}/.oldgccversion" ] && \ 539 if [ -f "${WORKDIR}/.oldgccversion" ] && \
540 [ -n "$(cat "${WORKDIR}/.oldgccversion")" ] 540 [ -n "$(cat "${WORKDIR}/.oldgccversion")" ]
541 then 541 then
542 OLD_GCC_VERSION="$(cat "${WORKDIR}/.oldgccversion")" 542 OLD_GCC_VERSION="$(cat "${WORKDIR}/.oldgccversion")"
543 else 543 else
544 OLD_GCC_VERSION="${MY_PV_FULL}" 544 OLD_GCC_VERSION="${MY_PV_FULL}"
545 fi 545 fi
546 546
547 if [ -f "${WORKDIR}/.oldgccchost" ] && \ 547 if [ -f "${WORKDIR}/.oldgccchost" ] && \
548 [ -n "$(cat "${WORKDIR}/.oldgccchost")" ] 548 [ -n "$(cat "${WORKDIR}/.oldgccchost")" ]
549 then 549 then
550 OLD_GCC_CHOST="--oldarch $(cat "${WORKDIR}/.oldgccchost")" 550 OLD_GCC_CHOST="--oldarch $(cat "${WORKDIR}/.oldgccchost")"
551 fi 551 fi
552 552
553 /sbin/fix_libtool_files.sh ${OLD_GCC_VERSION} ${OLD_GCC_CHOST} 553 /sbin/fix_libtool_files.sh ${OLD_GCC_VERSION} ${OLD_GCC_CHOST}
554 fi 554 fi
555 555
556 # Fix ncurses b0rking (if r5 isn't unmerged) 556 # Fix ncurses b0rking (if r5 isn't unmerged)
557 find ${ROOT}/usr/lib/gcc-lib -name '*curses.h' -exec rm -f {} \; 557 find ${ROOT}/usr/lib/gcc-lib -name '*curses.h' -exec rm -f {} \;
558} 558}
559 559

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.19

  ViewVC Help
Powered by ViewVC 1.1.20