/[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.11 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.11 2003/02/25 13:50:16 dragon 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
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
203 sed -e 's:secdir = $(libdir)/security:secdir = $(FAKE_ROOT)$(LIBPATH)/security:' \ 216 sed -e 's:secdir = $(libdir)/security:secdir = $(FAKE_ROOT)$(LIBPATH)/security:' \
204 ${x}.orig > ${x} 217 ${x}.orig > ${x}
205 218
206 rm -f ${x}.orig 219 rm -f ${x}.orig
207 done 220 done
208
209 # This next bit is for updating libtool linker scripts ...
210 OLD_GCC_VERSION="`gcc -dumpversion`"
211
212 if [ "${OLD_GCC_VERSION}" != "${MY_PV_FULL}" ]
213 then
214 echo "${OLD_GCC_VERSION}" > ${WORKDIR}/.oldgccversion
215 fi
216} 221}
217 222
218src_compile() { 223src_compile() {
219 local myconf="" 224 local myconf=""
220 local gcc_lang="" 225 local gcc_lang=""
475 fi 480 fi
476 else 481 else
477 rm -rf ${D}/usr/share/{man,info} 482 rm -rf ${D}/usr/share/{man,info}
478 fi 483 fi
479 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
480 # Fix ncurses b0rking 492 # Fix ncurses b0rking
481 find ${D}/ -name '*curses.h' -exec rm -f {} \; 493 find ${D}/ -name '*curses.h' -exec rm -f {} \;
482} 494}
483 495
496pkg_preinst() {
497
498 if [ ! -f "${WORKDIR}/.chkgccversion" ]
499 then
500 chk_gcc_version
501 fi
502}
503
484pkg_postinst() { 504pkg_postinst() {
485 505
506 export LD_LIBRARY_PATH="${LIBPATH}:${LD_LIBRARY_PATH}"
507
486 if [ "${ROOT}" = "/" -a "${COMPILER}" = "gcc3" -a "${CHOST}" == "${CCHOST}" ] 508 if [ "${ROOT}" = "/" -a "${COMPILER}" = "gcc3" -a "${CHOST}" = "${CCHOST}" ]
487 then 509 then
488 gcc-config --use-portage-chost ${CCHOST}-${MY_PV_FULL} 510 gcc-config --use-portage-chost ${CCHOST}-${MY_PV_FULL}
489 fi 511 fi
490 512
491 # Update libtool linker scripts to reference new gcc version ... 513 # Update libtool linker scripts to reference new gcc version ...
492 if [ -f ${WORKDIR}/.oldgccversion -a "${ROOT}" = "/" ] 514 if [ -f ${WORKDIR}/.oldgccversion -a "${ROOT}" = "/" ]
493 then 515 then
494 OLD_GCC_VERSION="`cat ${WORKDIR}/.oldgccversion`" 516 OLD_GCC_VERSION="`cat ${WORKDIR}/.oldgccversion`"
495 517
496 cp -f ${FILESDIR}/fix_libtool_files.sh ${T}
497 chmod +x ${T}/fix_libtool_files.sh
498 ${T}/fix_libtool_files.sh ${OLD_GCC_VERSION} 518 /sbin/fix_libtool_files.sh ${OLD_GCC_VERSION}
499 fi 519 fi
500 520
501 # Fix ncurses b0rking (if r5 isn't unmerged) 521 # Fix ncurses b0rking (if r5 isn't unmerged)
502 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 {} \;
503} 523}

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

  ViewVC Help
Powered by ViewVC 1.1.20