Gentoo Archives: gentoo-dev

From: Ingmar Vanhassel <ingmar.stdin@×××××.com>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Re: New eclass: cmake-utils.eclass
Date: Fri, 09 Nov 2007 03:09:42
Message-Id: 5f442c70711081904y68dc85b1s8c12f09b77fc1b9e@mail.gmail.com
In Reply to: Re: [gentoo-dev] Re: New eclass: cmake-utils.eclass by "René 'Necoro' Neumann"
1 2007/11/9, René 'Necoro' Neumann <lists@××××××.eu>:
2 > Steve Long schrieb:
3 > > René 'Necoro' Neumann wrote:
4 > >> cmake-utils_src_enable python => -DENABLE_python=...
5 > >>
6 > >> Wanted would be that it returned -DENABLE_PYTHON=...
7 > >>
8 > >> I'm not into bash scripting that much, so I do not know a way to do so -
9 > >> but I guess someone else is ;)
10 > >>
11 > > Unfortunately BASH doesn't support ksh93 or zsh style casting to
12 > uppercase.
13 > > The best way really is via tr:
14 > > alias toUpper='tr [[:lower:]] [[:upper:]]'
15 > > alias toLower='tr [[:upper:]] [[:lower:]]'
16 > >
17 > > (er aliases don't normally work in scripts, but you get the idea.) Bear in
18 > > mind that tr reads stdin and writes to stdout. It has the advantage of
19 > > being locale-safe. Every other method I've looked at is much slower and
20 > > only works with ASCII.
21 > >
22 > > A function wouldn't be too hard:
23 > > toUpper() {
24 > > for i; do
25 > > echo "$i" |tr [[:lower:]] [[:upper:]]
26 > > done
27 > > }
28 > >
29 > > Usage depends on the parameters you pass.
30 > > var=$(toUpper $var) # for single vars with no newlines in
31 >
32 > This is right the version I've chosen ... so with the help of Steve: a
33 > small patch ;)
34 >
35 > Regards,
36 > Necoro
37
38 Hi Necoro,
39
40 You can just use 'cmake-utils_use_enable python PYTHON'
41
42 It's mentioned in the cmake-utils.eclass manpage (app-portage/eclass-manpages),
43 as well as in the patch you just sent: cmake-utils_use_enable <USE
44 flag> [flag name]
45
46 :-)
47
48 Regards,
49 Ingmar Vanhassel

Replies

Subject Author
Re: [gentoo-dev] Re: New eclass: cmake-utils.eclass "René 'Necoro' Neumann" <lists@××××××.eu>