diff options
author | Mike Frysinger <vapier@gentoo.org> | 2005-01-21 01:24:29 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2005-01-21 01:24:29 +0000 |
commit | 782942b74f10bf508c8828e08942817356862c81 (patch) | |
tree | 0acce0027e26acfdd4344f7cb65c03213db0548d /eclass | |
parent | added ebuild for 0.7.8, renamed a patch (used by 0.7.7 and 0.7.8) (diff) | |
download | historical-782942b74f10bf508c8828e08942817356862c81.tar.gz historical-782942b74f10bf508c8828e08942817356862c81.tar.bz2 historical-782942b74f10bf508c8828e08942817356862c81.zip |
ok, really fix the libtool script logic and include a lot of comments this time
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/toolchain.eclass | 44 |
1 files changed, 24 insertions, 20 deletions
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index 83d2d07868a1..775709596eda 100644 --- a/eclass/toolchain.eclass +++ b/eclass/toolchain.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v 1.91 2005/01/20 06:50:36 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v 1.92 2005/01/21 01:24:29 vapier Exp $ HOMEPAGE="http://www.gnu.org/software/gcc/gcc.html" LICENSE="GPL-2 LGPL-2.1" @@ -666,25 +666,16 @@ gcc_pkg_setup() { } gcc-compiler_pkg_preinst() { - : - # wtf is this for !? - #export LD_LIBRARY_PATH=${LIBPATH}:${LD_LIBRARY_PATH} - #"${ROOT}"/sbin/ldconfig -} - -gcc-compiler_pkg_postinst() { - export LD_LIBRARY_PATH=${LIBPATH}:${LD_LIBRARY_PATH} - do_gcc_config - - echo - einfo "If you have issues with packages unable to locate libstdc++.la," - einfo "then try running 'fix_libtool_files.sh' on the old gcc versions." - echo - # Now we have to figure out if all the little libtool linker scripts # need updating to our new gcc version. Basically we only want to # do this if the old gcc version is being cleaned out due to this # new version. + # We check to see if we need to run fix_libtool_files in pkg_preinst() + # and then we run the script in pkg_postinst(). The reason being + # that portage updates the package database between these functions, + # so we have to gather information on the state of the system before + # the new gcc is emerged into ${ROOT}, but we want to fix the .la + # files after the new gcc is emerged. Whoo ! # USE=multislot ... no compilers get cleaned out during an upgrade use multislot && return 0 @@ -695,13 +686,26 @@ gcc-compiler_pkg_postinst() { # Now check to see if we already have a version installed in this # SLOT ... if we do, then bail if it's a minor upgrade (like we # go from 3.3.4 to 3.3.4-r1 vs 3.3.4 to 3.3.5) - local old_gcc_release=$(portageq match =sys-devel/gcc-${GCC_RELEASE_VER}*) + local old_gcc_release=$(portageq match ${ROOT} =sys-devel/gcc-${GCC_RELEASE_VER}*) [[ -n ${old_gcc_release} ]] && return 0 - local old_gcc_branch=$(portageq match =sys-devel/gcc-${GCC_BRANCH_VER}*) + local old_gcc_branch=$(portageq match ${ROOT} =sys-devel/gcc-${GCC_BRANCH_VER}*) [[ -z ${old_gcc_branch} ]] && return 0 - local old_gcc_ver=${old_gcc_branch%%-*} + local old_gcc_ver=${old_gcc_branch/*gcc-} + echo ${old_gcc_ver%%-*} > "${T}"/libtool-old-gcc-ver +} + +gcc-compiler_pkg_postinst() { + export LD_LIBRARY_PATH=${LIBPATH}:${LD_LIBRARY_PATH} + do_gcc_config - /sbin/fix_libtool_files.sh ${old_gcc_ver} + if [[ -e ${T}/libtool-old-gcc-ver ]] ; then + /sbin/fix_libtool_files.sh $(<"${T}"/libtool-old-gcc-ver) + fi + + echo + einfo "If you have issues with packages unable to locate libstdc++.la," + einfo "then try running 'fix_libtool_files.sh' on the old gcc versions." + echo } gcc-compiler_pkg_prerm() { |