1 |
-----BEGIN PGP SIGNED MESSAGE----- |
2 |
Hash: SHA1 |
3 |
|
4 |
Marijn Schouten (hkBst) wrote: |
5 |
> In gambit I used: |
6 |
> |
7 |
> econf $(if use static; then echo --disable-shared; else echo --enable-shared; |
8 |
> fi) \ |
9 |
> |
10 |
> could become: |
11 |
> |
12 |
> econf $(_use static --disable-shared --enable-shared) \ |
13 |
|
14 |
as zlin rightly pointed out on irc. That should really be $(use_enable !static |
15 |
shared) so scrap this ``example``. Unfortunately my rewrite has a bug such |
16 |
that it doesn't handle !blah correctly. Fixed version: |
17 |
|
18 |
_use() { |
19 |
local flag=$1 |
20 |
local string_success=$2 |
21 |
local string_failure=$3 |
22 |
local success=0 |
23 |
|
24 |
# invert the return value for "!blah" and strip the '!' |
25 |
[[ ${flag} = !* ]] && { success=1 ; flag=${flag:1} } |
26 |
|
27 |
# Make sure we have this USE flag in IUSE |
28 |
if ! hasq "${flag}" ${IUSE} ${E_IUSE} && ! hasq "${flag}" |
29 |
${PORTAGE_ARCHLIST} selinux; then |
30 |
eqawarn "QA Notice: USE Flag '${flag}' not in IUSE for ${CATEGORY}/${PF}" |
31 |
fi |
32 |
|
33 |
hasq ${flag} ${USE} || ((success=1-success)) |
34 |
|
35 |
echo $(_if success "${string_success}" "${string_failure}") |
36 |
return success |
37 |
} |
38 |
|
39 |
Marijn |
40 |
|
41 |
- -- |
42 |
Marijn Schouten (hkBst), Gentoo Lisp project |
43 |
<http://www.gentoo.org/proj/en/lisp/>, #gentoo-lisp on FreeNode |
44 |
-----BEGIN PGP SIGNATURE----- |
45 |
Version: GnuPG v2.0.7 (GNU/Linux) |
46 |
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org |
47 |
|
48 |
iD8DBQFHKgT2p/VmCx0OL2wRAl5eAKCRpLUiH4k3l6bxmCIP7611FG4bIQCgpkeo |
49 |
j+nSg9Dl4rAHX39rg08bWoY= |
50 |
=isO1 |
51 |
-----END PGP SIGNATURE----- |
52 |
-- |
53 |
gentoo-portage-dev@g.o mailing list |