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 |