| 1 | # Copyright 1999-2004 Gentoo Foundation |
1 | # Copyright 1999-2004 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/multilib.eclass,v 1.43 2005/10/12 22:39:07 vapier Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/multilib.eclass,v 1.44 2005/10/13 03:43:55 vapier Exp $ |
| 4 | # |
4 | # |
| 5 | # Author: Jeremy Huddleston <eradicator@gentoo.org> |
5 | # Author: Jeremy Huddleston <eradicator@gentoo.org> |
| 6 | # |
6 | # |
| 7 | # This eclass is for all functions pertaining to handling multilib. |
7 | # This eclass is for all functions pertaining to handling multilib. |
| 8 | # configurations. |
8 | # configurations. |
| … | |
… | |
| 531 | # exit because we'll likely be called from a subshell |
531 | # exit because we'll likely be called from a subshell |
| 532 | exit 1 |
532 | exit 1 |
| 533 | } |
533 | } |
| 534 | |
534 | |
| 535 | get_libname() { |
535 | get_libname() { |
|
|
536 | local libname |
| 536 | local ver=$1 |
537 | local ver=$1 |
| 537 | if use userland_Darwin ; then |
538 | case ${CHOST} in |
|
|
539 | *-darwin*) libname="dylib";; |
|
|
540 | *) libname="so";; |
|
|
541 | esac |
|
|
542 | |
| 538 | if [ -z ${ver} ] ; then |
543 | if [[ -z $@ ]] ; then |
| 539 | echo ".dylib" |
544 | echo ".${libname}" |
| 540 | else |
|
|
| 541 | echo ".${ver}.dylib" |
|
|
| 542 | fi |
|
|
| 543 | else |
545 | else |
| 544 | if [ -z ${ver} ] ; then |
546 | for ver in "$@" ; do |
| 545 | echo ".so" |
547 | case ${CHOST} in |
| 546 | else |
548 | *-darwin*) echo ".${ver}.${libname}";; |
| 547 | echo ".so.${ver}" |
549 | *) echo ".${libname}.${ver}";; |
| 548 | fi |
550 | esac |
|
|
551 | done |
| 549 | fi |
552 | fi |
| 550 | } |
553 | } |
| 551 | |
554 | |
| 552 | # This is for the toolchain to setup profile variables when pulling in |
555 | # This is for the toolchain to setup profile variables when pulling in |
| 553 | # a crosscompiler (and thus they aren't set in the profile) |
556 | # a crosscompiler (and thus they aren't set in the profile) |