summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2009-04-04 18:02:33 +0000
committerFabian Groffen <grobian@gentoo.org>2009-04-04 18:02:33 +0000
commit89c7bb5759f0c1a5f4b3b2fe5f3fba5542b4f2ef (patch)
tree2c713e00c0834e0fb82916b37268a32e89b7106d
parentbackport fix for x86-macos in filter-flags from Prefix (diff)
downloadgentoo-2-89c7bb5759f0c1a5f4b3b2fe5f3fba5542b4f2ef.tar.gz
gentoo-2-89c7bb5759f0c1a5f4b3b2fe5f3fba5542b4f2ef.tar.bz2
gentoo-2-89c7bb5759f0c1a5f4b3b2fe5f3fba5542b4f2ef.zip
backport fix from Prefix for get_libname to support AIX and FreeMiNT
-rw-r--r--eclass/multilib.eclass12
1 files changed, 8 insertions, 4 deletions
diff --git a/eclass/multilib.eclass b/eclass/multilib.eclass
index eccb9573cb7e..ba9fc1544e25 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.72 2009/02/20 23:20:22 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/multilib.eclass,v 1.73 2009/04/04 18:02:33 grobian Exp $
# @ECLASS: multilib.eclass
# @MAINTAINER:
@@ -518,18 +518,20 @@ create_ml_includes-sym_for_dir() {
# @FUNCTION: get_libname
# @USAGE: [version]
# @DESCRIPTION:
-# Returns libname with proper suffix {.so,.dylib} and optionally supplied version
-# for ELF/MACH-O shared objects
+# Returns libname with proper suffix {.so,.dylib,.dll,etc} and optionally
+# supplied version for the current platform identified by CHOST.
#
# Example:
# get_libname libfoo ${PV}
-# Returns: libfoo.so.${PV} (ELF) || libfoo.${PV}.dylib (MACH)
+# Returns: libfoo.so.${PV} (ELF) || libfoo.${PV}.dylib (MACH) || ...
get_libname() {
local libname
local ver=$1
case ${CHOST} in
*-cygwin|mingw*|*-mingw*) libname="dll";;
*-darwin*) libname="dylib";;
+ *-aix*) libname="a";;
+ *-mint*) libname="irrelevant";;
*) libname="so";;
esac
@@ -539,6 +541,8 @@ get_libname() {
for ver in "$@" ; do
case ${CHOST} in
*-darwin*) echo ".${ver}.${libname}";;
+ *-aix*) echo ".${libname}";;
+ *-mint*) echo ".${libname}";;
*) echo ".${libname}.${ver}";;
esac
done