diff options
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/multilib.eclass | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/eclass/multilib.eclass b/eclass/multilib.eclass index 23c6d09f3060..87a0cfc8b4ed 100644 --- a/eclass/multilib.eclass +++ b/eclass/multilib.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/multilib.eclass,v 1.75 2009/10/08 19:54:40 grobian Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/multilib.eclass,v 1.76 2009/10/08 19:56:14 grobian Exp $ # @ECLASS: multilib.eclass # @MAINTAINER: @@ -550,6 +550,26 @@ get_libname() { fi } +# @FUNCTION: get_modname +# @USAGE: +# @DESCRIPTION: +# Returns modulename with proper suffix {.so,.bundle,etc} for the current +# platform identified by CHOST. +# +# Example: +# libfoo$(get_modname) +# Returns: libfoo.so (ELF) || libfoo.bundle (MACH) || ... +get_modname() { + local modname + local ver=$1 + case ${CHOST} in + *-darwin*) modname="bundle";; + *) modname="so";; + esac + + echo ".${modname}" +} + # This is for the toolchain to setup profile variables when pulling in # a crosscompiler (and thus they aren't set in the profile) multilib_env() { |