| 1 | # Copyright 1999-2007 Gentoo Foundation |
1 | # Copyright 1999-2007 Gentoo Foundation |
| 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/eclass/toolchain-funcs.eclass,v 1.93 2009/08/15 15:12:56 grobian Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.94 2009/09/02 09:00:08 grobian Exp $ |
| 4 | |
4 | |
| 5 | # @ECLASS: toolchain-funcs.eclass |
5 | # @ECLASS: toolchain-funcs.eclass |
| 6 | # @MAINTAINER: |
6 | # @MAINTAINER: |
| 7 | # Toolchain Ninjas <toolchain@gentoo.org> |
7 | # Toolchain Ninjas <toolchain@gentoo.org> |
| 8 | # @BLURB: functions to query common info about the toolchain |
8 | # @BLURB: functions to query common info about the toolchain |
| … | |
… | |
| 469 | # Since we moved the lib from usr/lib into lib this reference is |
469 | # Since we moved the lib from usr/lib into lib this reference is |
| 470 | # wrong. Hence, we update it here. We don't configure with |
470 | # wrong. Hence, we update it here. We don't configure with |
| 471 | # libdir=/lib because that messes up libtool files. |
471 | # libdir=/lib because that messes up libtool files. |
| 472 | # Make sure we don't lose the specific version, so just modify the |
472 | # Make sure we don't lose the specific version, so just modify the |
| 473 | # existing install_name |
473 | # existing install_name |
|
|
474 | if [[ ! -w "${ED}/${libdir}/${tlib}" ]] ; then |
|
|
475 | fperms u+w "${libdir}/${tlib}" # needed to write to it |
|
|
476 | local nowrite=yes |
|
|
477 | fi |
| 474 | install_name_tool \ |
478 | install_name_tool \ |
| 475 | -id "${EPREFIX}"/${libdir}/${tlib} \ |
479 | -id "${EPREFIX}"/${libdir}/${tlib} \ |
| 476 | "${ED}"/${libdir}/${tlib} |
480 | "${ED}"/${libdir}/${tlib} || die "install_name_tool failed" |
|
|
481 | [[ -n ${nowrite} ]] && fperms u-w "${libdir}/${tlib}" |
| 477 | # Now as we don't use GNU binutils and our linker doesn't |
482 | # Now as we don't use GNU binutils and our linker doesn't |
| 478 | # understand linker scripts, just create a symlink. |
483 | # understand linker scripts, just create a symlink. |
| 479 | pushd "${ED}/usr/${libdir}" > /dev/null |
484 | pushd "${ED}/usr/${libdir}" > /dev/null |
| 480 | ln -snf "../../${libdir}/${tlib}" "${lib}" |
485 | ln -snf "../../${libdir}/${tlib}" "${lib}" |
| 481 | popd > /dev/null |
486 | popd > /dev/null |