summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Callen <abcd@gentoo.org>2010-04-02 02:50:29 +0000
committerJonathan Callen <abcd@gentoo.org>2010-04-02 02:50:29 +0000
commite0f8186c7ac97c6feb1f744722f78b2fe2e00afd (patch)
tree28833ee29d65ed814176f04a34ed78e3e92bfe5e /eclass/flag-o-matic.eclass
parentRevision bump for new genpatches. (diff)
downloadgentoo-2-e0f8186c7ac97c6feb1f744722f78b2fe2e00afd.tar.gz
gentoo-2-e0f8186c7ac97c6feb1f744722f78b2fe2e00afd.tar.bz2
gentoo-2-e0f8186c7ac97c6feb1f744722f78b2fe2e00afd.zip
Add append-libs() function
Diffstat (limited to 'eclass/flag-o-matic.eclass')
-rw-r--r--eclass/flag-o-matic.eclass17
1 files changed, 16 insertions, 1 deletions
diff --git a/eclass/flag-o-matic.eclass b/eclass/flag-o-matic.eclass
index b63eca4fa2df..0a0d565e87c6 100644
--- a/eclass/flag-o-matic.eclass
+++ b/eclass/flag-o-matic.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.146 2010/02/17 18:20:49 ssuominen Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.147 2010/04/02 02:50:29 abcd Exp $
# @ECLASS: flag-o-matic.eclass
# @MAINTAINER:
@@ -668,6 +668,21 @@ replace-sparc64-flags() {
export CFLAGS CXXFLAGS
}
+# @FUNCTION: append-libs
+# @USAGE: <libs>
+# @DESCRIPTION:
+# Add extra <libs> to the current LIBS.
+append-libs() {
+ [[ -z $* ]] && return 0
+ local flag
+ for flag in "$@"; do
+ [[ ${flag} == -l* ]] && flag=${flag#-l}
+ export LIBS="${LIBS} -l${flag}"
+ done
+
+ return 0
+}
+
# @FUNCTION: append-ldflags
# @USAGE: <flags>
# @DESCRIPTION: