/[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.3 Revision 1.12
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.3 2003/02/13 16:31:36 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/Attic/gcc-3.2.2.ebuild,v 1.12 2003/03/09 03:23:08 azarah 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
82 82
83DESCRIPTION="The GNU Compiler Collection. Includes C/C++ and java compilers" 83DESCRIPTION="The GNU Compiler Collection. Includes C/C++ and java compilers"
84HOMEPAGE="http://www.gnu.org/software/gcc/gcc.html" 84HOMEPAGE="http://www.gnu.org/software/gcc/gcc.html"
85 85
86LICENSE="GPL-2 LGPL-2.1" 86LICENSE="GPL-2 LGPL-2.1"
87KEYWORDS="~x86 ~ppc ~sparc ~alpha ~hppa" 87KEYWORDS="x86 ~ppc ~sparc alpha hppa arm mips"
88 88
89# Ok, this is a hairy one again, but lets assume that we 89# Ok, this is a hairy one again, but lets assume that we
90# are not cross compiling, than we want SLOT to only contain 90# are not cross compiling, than we want SLOT to only contain
91# $PV, as people upgrading to new gcc layout will not have 91# $PV, as people upgrading to new gcc layout will not have
92# their old gcc unmerged ... 92# their old gcc unmerged ...
96else 96else
97 SLOT="${CCHOST}-${MY_PV}" 97 SLOT="${CCHOST}-${MY_PV}"
98fi 98fi
99 99
100DEPEND="virtual/glibc 100DEPEND="virtual/glibc
101 >=sys-devel/binutils-2.13.90.0.18 101 mips? >=sys-devel/binutils-2.13.90.0.16 : >=sys-devel/binutils-2.13.90.0.18
102 >=sys-devel/gcc-config-1.3.1 102 >=sys-devel/gcc-config-1.3.1
103 !build? ( >=sys-libs/ncurses-5.2-r2 103 !build? ( >=sys-libs/ncurses-5.2-r2
104 nls? ( sys-devel/gettext ) )" 104 nls? ( sys-devel/gettext ) )"
105 105
106RDEPEND="virtual/glibc 106RDEPEND="virtual/glibc
113 113
114 114
115# Hack used to patch Makefiles to install into the build dir 115# Hack used to patch Makefiles to install into the build dir
116FAKE_ROOT="" 116FAKE_ROOT=""
117 117
118chk_gcc_version() {
119 # This next bit is for updating libtool linker scripts ...
120 OLD_GCC_VERSION="`gcc -dumpversion`"
121
122 if [ "${OLD_GCC_VERSION}" != "${MY_PV_FULL}" ]
123 then
124 echo "${OLD_GCC_VERSION}" > ${WORKDIR}/.oldgccversion
125 fi
126
127 # Did we check the version ?
128 touch ${WORKDIR}/.chkgccversion
129}
130
118src_unpack() { 131src_unpack() {
119 if [ -z "${SNAPSHOT}" ] 132 if [ -z "${SNAPSHOT}" ]
120 then 133 then
121 unpack ${PN}-${MAIN_BRANCH}.tar.bz2 134 unpack ${PN}-${MAIN_BRANCH}.tar.bz2
122 135
154 # Patches from Mandrake/Suse ... 167 # Patches from Mandrake/Suse ...
155 epatch ${FILESDIR}/3.2.1/gcc31-loop-load-final-value.patch 168 epatch ${FILESDIR}/3.2.1/gcc31-loop-load-final-value.patch
156 epatch ${FILESDIR}/3.2.1/gcc32-pr8213.patch 169 epatch ${FILESDIR}/3.2.1/gcc32-pr8213.patch
157 epatch ${FILESDIR}/3.2.1/gcc32-strip-dotdot.patch 170 epatch ${FILESDIR}/3.2.1/gcc32-strip-dotdot.patch
158 epatch ${FILESDIR}/3.2.1/gcc32-athlon-alignment.patch 171 epatch ${FILESDIR}/3.2.1/gcc32-athlon-alignment.patch
172
173 # Patches from debian-arm
174 if [ "${ARCH}" = "arm" ]; then
175 epatch ${FILESDIR}/3.2.1/gcc32-arm-disable-mathf.patch
176 epatch ${FILESDIR}/3.2.1/gcc32-arm-reload1-fix.patch
177 fi
159 178
160 # Install our pre generated manpages if we do not have perl ... 179 # Install our pre generated manpages if we do not have perl ...
161# if [ ! -x /usr/bin/perl ] 180# if [ ! -x /usr/bin/perl ]
162# then 181# then
163# cd ${S}; unpack ${P}-manpages.tar.bz2 182# cd ${S}; unpack ${P}-manpages.tar.bz2
197 sed -e 's:secdir = $(libdir)/security:secdir = $(FAKE_ROOT)$(LIBPATH)/security:' \ 216 sed -e 's:secdir = $(libdir)/security:secdir = $(FAKE_ROOT)$(LIBPATH)/security:' \
198 ${x}.orig > ${x} 217 ${x}.orig > ${x}
199 218
200 rm -f ${x}.orig 219 rm -f ${x}.orig
201 done 220 done
202
203 # This next bit is for updating libtool linker scripts ...
204 OLD_GCC_VERSION="`gcc -dumpversion`"
205
206 if [ "${OLD_GCC_VERSION}" != "${MY_PV_FULL}" ]
207 then
208 echo "${OLD_GCC_VERSION}" > ${WORKDIR}/.oldgccversion
209 fi
210} 221}
211 222
212src_compile() { 223src_compile() {
213 local myconf="" 224 local myconf=""
214 local gcc_lang="" 225 local gcc_lang=""
469 fi 480 fi
470 else 481 else
471 rm -rf ${D}/usr/share/{man,info} 482 rm -rf ${D}/usr/share/{man,info}
472 fi 483 fi
473 484
485 # Rather install the script, else portage with changing $FILESDIR
486 # between binary and source package borks things ....
487 insinto /lib/rcscripts/awk
488 doins ${FILESDIR}/awk/fixlafiles.awk
489 exeinto /sbin
490 doexe ${FILESDIR}/fix_libtool_files.sh
491
474 # Fix ncurses b0rking 492 # Fix ncurses b0rking
475 find ${D}/ -name '*curses.h' -exec rm -f {} \; 493 find ${D}/ -name '*curses.h' -exec rm -f {} \;
476} 494}
477 495
496pkg_preinst() {
497
498 if [ ! -f "${WORKDIR}/.chkgccversion" ]
499 then
500 chk_gcc_version
501 fi
502}
503
478pkg_postinst() { 504pkg_postinst() {
479 505
506 export LD_LIBRARY_PATH="${LIBPATH}:${LD_LIBRARY_PATH}"
507
480 if [ "${ROOT}" = "/" -a "${COMPILER}" = "gcc3" -a "${CHOST}" == "${CCHOST}" ] 508 if [ "${ROOT}" = "/" -a "${COMPILER}" = "gcc3" -a "${CHOST}" = "${CCHOST}" ]
481 then 509 then
482 gcc-config --use-portage-chost ${CCHOST}-${MY_PV_FULL} 510 gcc-config --use-portage-chost ${CCHOST}-${MY_PV_FULL}
483 fi 511 fi
484 512
485 # Update libtool linker scripts to reference new gcc version ... 513 # Update libtool linker scripts to reference new gcc version ...
486 if [ -f ${WORKDIR}/.oldgccversion -a "${ROOT}" = "/" ] 514 if [ -f ${WORKDIR}/.oldgccversion -a "${ROOT}" = "/" ]
487 then 515 then
488 OLD_GCC_VERSION="`cat ${WORKDIR}/.oldgccversion`" 516 OLD_GCC_VERSION="`cat ${WORKDIR}/.oldgccversion`"
489 517
490 cp -f ${FILESDIR}/fix_libtool_files.sh ${T}
491 chmod +x ${T}/fix_libtool_files.sh
492 ${T}/fix_libtool_files.sh ${OLD_GCC_VERSION} 518 /sbin/fix_libtool_files.sh ${OLD_GCC_VERSION}
493 fi 519 fi
494 520
495 # Fix ncurses b0rking (if r5 isn't unmerged) 521 # Fix ncurses b0rking (if r5 isn't unmerged)
496 find ${ROOT}/usr/lib/gcc-lib -name '*curses.h' -exec rm -f {} \; 522 find ${ROOT}/usr/lib/gcc-lib -name '*curses.h' -exec rm -f {} \;
497} 523}

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.12

  ViewVC Help
Powered by ViewVC 1.1.20