/[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.17 Revision 1.18
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.17 2003/05/27 23:41:45 gmsoft Exp $ 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 $
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
116# Hack used to patch Makefiles to install into the build dir 116# Hack used to patch Makefiles to install into the build dir
117FAKE_ROOT="" 117FAKE_ROOT=""
118 118
119chk_gcc_version() { 119chk_gcc_version() {
120 # This next bit is for updating libtool linker scripts ... 120 # This next bit is for updating libtool linker scripts ...
121 OLD_GCC_VERSION="`gcc -dumpversion`" 121 local OLD_GCC_VERSION="`gcc -dumpversion`"
122 local OLD_GCC_CHOST="$(gcc -v 2>&1 | egrep '^Reading specs' |\
123 sed -e 's:^.*/gcc-lib/\([^/]*\)/[0-9]\+.*$:\1:')"
122 124
123 if [ "${OLD_GCC_VERSION}" != "${MY_PV_FULL}" ] 125 if [ "${OLD_GCC_VERSION}" != "${MY_PV_FULL}" ]
124 then 126 then
125 echo "${OLD_GCC_VERSION}" > ${WORKDIR}/.oldgccversion 127 echo "${OLD_GCC_VERSION}" > "${WORKDIR}/.oldgccversion"
128 fi
129
130 if [ -n "${OLD_GCC_CHOST}" ]
131 then
132 if [ "${CHOST}" = "${CCHOST}" -a "${OLD_GCC_CHOST}" != "${CHOST}" ]
133 then
134 echo "${OLD_GCC_CHOST}" > "${WORKDIR}/.oldgccchost"
135 fi
126 fi 136 fi
127 137
128 # Did we check the version ? 138 # Did we check the version ?
129 touch ${WORKDIR}/.chkgccversion 139 touch "${WORKDIR}/.chkgccversion"
130} 140}
131 141
132src_unpack() { 142src_unpack() {
133 if [ -z "${SNAPSHOT}" ] 143 if [ -z "${SNAPSHOT}" ]
134 then 144 then
518 then 528 then
519 gcc-config --use-portage-chost ${CCHOST}-${MY_PV_FULL} 529 gcc-config --use-portage-chost ${CCHOST}-${MY_PV_FULL}
520 fi 530 fi
521 531
522 # Update libtool linker scripts to reference new gcc version ... 532 # Update libtool linker scripts to reference new gcc version ...
523 if [ -f ${WORKDIR}/.oldgccversion -a "${ROOT}" = "/" ] 533 if [ "${ROOT}" = "/" ] && \
534 [ -f "${WORKDIR}/.oldgccversion" -o -f "${WORKDIR}/.oldgccchost" ]
524 then 535 then
536 local OLD_GCC_VERSION=
537 local OLD_GCC_CHOST=
538
539 if [ -f "${WORKDIR}/.oldgccversion" ] && \
540 [ -n "$(cat "${WORKDIR}/.oldgccversion")" ]
541 then
525 OLD_GCC_VERSION="`cat ${WORKDIR}/.oldgccversion`" 542 OLD_GCC_VERSION="$(cat "${WORKDIR}/.oldgccversion")"
543 else
544 OLD_GCC_VERSION="${MY_PV_FULL}"
545 fi
546
547 if [ -f "${WORKDIR}/.oldgccchost" ] && \
548 [ -n "$(cat "${WORKDIR}/.oldgccchost")" ]
549 then
550 OLD_GCC_CHOST="--oldarch $(cat "${WORKDIR}/.oldgccchost")"
551 fi
526 552
527 /sbin/fix_libtool_files.sh ${OLD_GCC_VERSION} 553 /sbin/fix_libtool_files.sh ${OLD_GCC_VERSION} ${OLD_GCC_CHOST}
528 fi 554 fi
529 555
530 # Fix ncurses b0rking (if r5 isn't unmerged) 556 # Fix ncurses b0rking (if r5 isn't unmerged)
531 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 {} \;
532} 558}

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

  ViewVC Help
Powered by ViewVC 1.1.20