Gentoo Archives: gentoo-dev

From: Ingmar Vanhassel <ingmar.stdin@×××××.com>
To: gentoo-dev <gentoo-dev@l.g.o>
Subject: Re: [gentoo-dev] Re: New eclass: cmake-utils.eclass
Date: Fri, 28 Dec 2007 01:48:39
Message-Id: 1194576034-sup-8763@indigo
In Reply to: Re: [gentoo-dev] Re: New eclass: cmake-utils.eclass by "René 'Necoro' Neumann"
1 Excerpts from René 'Necoro' Neumann's message of Fri Nov 09 00:28:47 +0100 2007:
2 > -----BEGIN PGP SIGNED MESSAGE-----
3 > Hash: SHA1
4 >
5 > Steve Long schrieb:
6 > > René 'Necoro' Neumann wrote:
7 > >> cmake-utils_src_enable python => -DENABLE_python=...
8 > >>
9 > >> Wanted would be that it returned -DENABLE_PYTHON=...
10 > >>
11 > >> I'm not into bash scripting that much, so I do not know a way to do so -
12 > >> but I guess someone else is ;)
13 > >>
14 > > Unfortunately BASH doesn't support ksh93 or zsh style casting to uppercase.
15 > > The best way really is via tr:
16 > > alias toUpper='tr [[:lower:]] [[:upper:]]'
17 > > alias toLower='tr [[:upper:]] [[:lower:]]'
18 > >
19 > > (er aliases don't normally work in scripts, but you get the idea.) Bear in
20 > > mind that tr reads stdin and writes to stdout. It has the advantage of
21 > > being locale-safe. Every other method I've looked at is much slower and
22 > > only works with ASCII.
23 > >
24 > > A function wouldn't be too hard:
25 > > toUpper() {
26 > > for i; do
27 > > echo "$i" |tr [[:lower:]] [[:upper:]]
28 > > done
29 > > }
30 > >
31 > > Usage depends on the parameters you pass.
32 > > var=$(toUpper $var) # for single vars with no newlines in
33 >
34 > This is right the version I've chosen ... so with the help of Steve: a
35 > small patch ;)
36 >
37 > Regards,
38 > Necoro
39 > -----BEGIN PGP SIGNATURE-----
40 > Version: GnuPG v1.4.7 (GNU/Linux)
41 > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
42 >
43 > iD4DBQFHM5uv4UOg/zhYFuARAuELAJjnlDCFDMm3e2mJqYuyT4nkFoaaAJ4go9qp
44 > Qca9r8Y7LpD0YSSylUh2BQ==
45 > =517n
46 > -----END PGP SIGNATURE-----
47
48 Hi Necoro,
49
50 It looks like you want to use
51
52 'cmake-utils_use_enable python PYTHON'
53
54 It's mentioned in the cmake-utils.eclass manpage (app-portage/eclass-manpages),
55 as well as in the patch you just sent: cmake-utils_use_enable <USE flag> [flag name]
56
57 :-)
58
59 Regards,
60 Ingmar Vanhassel
61
62 --
63 gentoo-dev@g.o mailing list