blob: 97d2dfbd3f0fbd41bca897ed43cc9007009daf7e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
|
<?xml version="1.0"?>
<guide self="function-reference/query-functions/">
<chapter>
<title>Query Functions Reference</title>
<body>
<p>
The following functions, which are provided by <c>ebuild.sh</c>, can be used to
query variables and similar state.
</p>
<table>
<tr>
<th>
Function
</th>
<th>
Details
</th>
</tr>
<tr>
<ti>
<c>use flagname</c>
</ti>
<ti>
Returns a true value if and only if <c>flagname</c> is enabled.
The condition is inverted if prefixed with an exclamation mark,
<c>!flagname</c>.
It is guaranteed that <c>use</c> produces no output.
</ti>
</tr>
<tr>
<ti>
<c>useq flagname</c>
</ti>
<ti>
Deprecated synonym for <c>use</c>.
</ti>
</tr>
<tr>
<ti>
<c>usev flagname</c>
</ti>
<ti>
As <c>use</c>, echoes <c>flagname</c> upon success.
</ti>
</tr>
<tr>
<ti>
<c>use_enable flag str val</c>
</ti>
<ti>
Echoes either <c>--enable-str=val</c> or <c>--disable-str</c> depending upon <c>useq flag</c>.
If <c>str</c> is not specified, uses <c>flag</c> instead. If <c>val</c> is not specified, omits
the assignment part.
</ti>
</tr>
<tr>
<ti>
<c>use_with flag str val</c>
</ti>
<ti>
As <c>use_enable</c>, but <c>--with-</c> or <c>--without-</c>.
</ti>
</tr>
<tr>
<ti>
<c>has flag string</c>
</ti>
<ti>
Returns true if <c>flag</c> is included in the flag list <c>string</c>
(example: <c>if has ccache $FEATURES ; then</c>).
The condition is inverted if prefixed with an exclamation mark,
<c>!flag</c>.
It is guaranteed that <c>has</c> produces no output.
</ti>
</tr>
<tr>
<ti>
<c>hasq flag string</c>
</ti>
<ti>
Deprecated synonym for <c>has</c>.
</ti>
</tr>
<tr>
<ti>
<c>hasv flag string</c>
</ti>
<ti>
As <c>has</c>, echoes <c>flag</c> on success.
</ti>
</tr>
<tr>
<ti>
<c>best_version pkg</c>
</ti>
<ti>
Echoes category, name and version of the highest version of <c>pkg</c>
that is currently installed.
Example: <c>best_version app-editors/emacs:24</c> will output
<c>app-editors/emacs-24.5-r3</c>.
</ti>
</tr>
<tr>
<ti>
<c>has_version pkg[flag]</c>
</ti>
<ti>
True if <c>pkg</c> (can include
<uri link="::general-concepts/dependencies#version specifiers"/>
and
<uri link="::general-concepts/dependencies#built with use dependencies"/>)
is installed. Example: <c>has_version
"=app-editors/nano-2.5.3[nls,spell]"</c>.
</ti>
</tr>
</table>
</body>
</chapter>
</guide>
|