Gentoo Archives: gentoo-commits

From: "Jonathan Callen (abcd)" <abcd@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in eclass: flag-o-matic.eclass
Date: Fri, 02 Apr 2010 02:50:35
Message-Id: E1NxWxr-0006Z8-55@stork.gentoo.org
1 abcd 10/04/02 02:50:31
2
3 Modified: flag-o-matic.eclass
4 Log:
5 Add append-libs() function
6
7 Revision Changes Path
8 1.147 eclass/flag-o-matic.eclass
9
10 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.147&view=markup
11 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.147&content-type=text/plain
12 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?r1=1.146&r2=1.147
13
14 Index: flag-o-matic.eclass
15 ===================================================================
16 RCS file: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v
17 retrieving revision 1.146
18 retrieving revision 1.147
19 diff -u -r1.146 -r1.147
20 --- flag-o-matic.eclass 17 Feb 2010 18:20:49 -0000 1.146
21 +++ flag-o-matic.eclass 2 Apr 2010 02:50:29 -0000 1.147
22 @@ -1,6 +1,6 @@
23 # Copyright 1999-2009 Gentoo Foundation
24 # Distributed under the terms of the GNU General Public License v2
25 -# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.146 2010/02/17 18:20:49 ssuominen Exp $
26 +# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.147 2010/04/02 02:50:29 abcd Exp $
27
28 # @ECLASS: flag-o-matic.eclass
29 # @MAINTAINER:
30 @@ -668,6 +668,21 @@
31 export CFLAGS CXXFLAGS
32 }
33
34 +# @FUNCTION: append-libs
35 +# @USAGE: <libs>
36 +# @DESCRIPTION:
37 +# Add extra <libs> to the current LIBS.
38 +append-libs() {
39 + [[ -z $* ]] && return 0
40 + local flag
41 + for flag in "$@"; do
42 + [[ ${flag} == -l* ]] && flag=${flag#-l}
43 + export LIBS="${LIBS} -l${flag}"
44 + done
45 +
46 + return 0
47 +}
48 +
49 # @FUNCTION: append-ldflags
50 # @USAGE: <flags>
51 # @DESCRIPTION: