/[gentoo-x86]/eclass/toolchain-funcs.eclass
Gentoo

Diff of /eclass/toolchain-funcs.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.92 Revision 1.93
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.92 2009/08/15 15:11:17 grobian Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.93 2009/08/15 15:12:56 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
478 # understand linker scripts, just create a symlink. 478 # understand linker scripts, just create a symlink.
479 pushd "${ED}/usr/${libdir}" > /dev/null 479 pushd "${ED}/usr/${libdir}" > /dev/null
480 ln -snf "../../${libdir}/${tlib}" "${lib}" 480 ln -snf "../../${libdir}/${tlib}" "${lib}"
481 popd > /dev/null 481 popd > /dev/null
482 ;; 482 ;;
483 *-aix*|*-irix*|*-hpux*|*-interix*|*-winnt*) 483 *-aix*|*-irix*|*64*-hpux*|*-interix*|*-winnt*)
484 if ${auto} ; then 484 if ${auto} ; then
485 mv "${ED}"/usr/${libdir}/${lib}* "${ED}"/${libdir}/ || die 485 mv "${ED}"/usr/${libdir}/${lib}* "${ED}"/${libdir}/ || die
486 # no way to retrieve soname on these platforms (?) 486 # no way to retrieve soname on these platforms (?)
487 tlib=$(readlink "${ED}"/${libdir}/${lib}) 487 tlib=$(readlink "${ED}"/${libdir}/${lib})
488 tlib=${tlib##*/} 488 tlib=${tlib##*/}
512 # command line by itself). 512 # command line by itself).
513 pushd "${ED}/usr/${libdir}" > /dev/null 513 pushd "${ED}/usr/${libdir}" > /dev/null
514 ln -snf "../../${libdir}/${tlib}" "${lib}" 514 ln -snf "../../${libdir}/${tlib}" "${lib}"
515 popd > /dev/null 515 popd > /dev/null
516 ;; 516 ;;
517 hppa*-hpux*) # PA-RISC 32bit (SOM) only, others (ELF) match *64*-hpux* above.
518 if ${auto} ; then
519 tlib=$(chatr "${ED}"/usr/${libdir}/${lib} | sed -n '/internal name:/{n;s/^ *//;p;q}')
520 [[ -z ${tlib} ]] && tlib=${lib}
521 tlib=${tlib##*/} # 'internal name' can have a path component
522 mv "${ED}"/usr/${libdir}/${lib}* "${ED}"/${libdir}/ || die
523 # some SONAMEs are funky: they encode a version before the .so
524 if [[ ${tlib} != ${lib}* ]] ; then
525 mv "${ED}"/usr/${libdir}/${tlib}* "${ED}"/${libdir}/ || die
526 fi
527 [[ ${tlib} != ${lib} ]] &&
528 rm -f "${ED}"/${libdir}/${lib}
529 else
530 tlib=$(chatr "${ED}"/${libdir}/${lib} | sed -n '/internal name:/{n;s/^ *//;p;q}')
531 [[ -z ${tlib} ]] && tlib=${lib}
532 tlib=${tlib##*/} # 'internal name' can have a path component
533 fi
534 pushd "${ED}"/usr/${libdir} >/dev/null
535 ln -snf "../../${libdir}/${tlib}" "${lib}"
536 # need the internal name in usr/lib too, to be available at runtime
537 # when linked with /path/to/lib.sl (hardcode_direct_absolute=yes)
538 [[ ${tlib} != ${lib} ]] &&
539 ln -snf "../../${libdir}/${tlib}" "${tlib}"
540 popd >/dev/null
541 ;;
517 *) 542 *)
518 if ${auto} ; then 543 if ${auto} ; then
519 tlib=$(scanelf -qF'%S#F' "${ED}"/usr/${libdir}/${lib}) 544 tlib=$(scanelf -qF'%S#F' "${ED}"/usr/${libdir}/${lib})
520 [[ -z ${tlib} ]] && die "unable to read SONAME from ${lib}" 545 [[ -z ${tlib} ]] && die "unable to read SONAME from ${lib}"
521 mv "${ED}"/usr/${libdir}/${lib}* "${ED}"/${libdir}/ || die 546 mv "${ED}"/usr/${libdir}/${lib}* "${ED}"/${libdir}/ || die

Legend:
Removed from v.1.92  
changed lines
  Added in v.1.93

  ViewVC Help
Powered by ViewVC 1.1.20