Lines 556-561
src_install() {
Link Here
|
556 |
<body> |
556 |
<body> |
557 |
<ul> |
557 |
<ul> |
558 |
<li> |
558 |
<li> |
|
|
559 |
<p><b>REQUIRED_USE</b></p> |
560 |
<p> |
561 |
The <c>REQUIRED_USE</c> variable contains a list of assertions that |
562 |
must be met by the configuration of USE flags to be valid for this |
563 |
ebuild. In order to be matched, a USE flag in a terminal element |
564 |
must be enabled (or disabled if it has an exclamation mark prefix). |
565 |
</p> |
566 |
<p> |
567 |
Essentially, <c>REQUIRED_USE</c> is an analogue of <c>DEPEND</c> |
568 |
style syntax. For example, to state that some combination is |
569 |
forbidden, i.e. "if <c>foo</c> is set, <c>bar</c> must be unset": |
570 |
</p> |
571 |
<codesample lang="ebuild"> |
572 |
REQUIRED_USE="foo? ( !bar )" |
573 |
</codesample> |
574 |
<p> |
575 |
To state "if <c>foo</c> is set, then at least one of <c>bar</c>, |
576 |
<c>baz</c>, and <c>quux</c> must be activated": |
577 |
</p> |
578 |
<codesample lang="ebuild"> |
579 |
REQUIRED_USE="foo? ( || ( bar baz quux ) )" |
580 |
</codesample> |
581 |
<p> |
582 |
To state "exactly one of <c>foo</c>, <c>bar</c>, or <c>baz</c> must |
583 |
be set, but not several": |
584 |
</p> |
585 |
<codesample lang="ebuild"> |
586 |
REQUIRED_USE="^^ ( foo bar baz )" |
587 |
</codesample> |
588 |
<p> |
589 |
Note that the last relationship is that of an Exclusive OR (XOR). |
590 |
While an XOR could be formed from usual <c>DEPEND</c> syntax, a |
591 |
specific <c>^^</c> operator has been added for this case. |
592 |
</p> |
593 |
<important> |
594 |
See section |
595 |
<uri link="::general-concepts/use-flags/#conflicting-use-flags" /> |
596 |
for when (and when not) to use <c>REQUIRED_USE</c>. |
597 |
</important> |
598 |
</li> |
599 |
<li> |
559 |
<p><b>REPLACING_VERSIONS and REPLACED_BY_VERSION</b></p> |
600 |
<p><b>REPLACING_VERSIONS and REPLACED_BY_VERSION</b></p> |
560 |
<p> |
601 |
<p> |
561 |
The <c>REPLACING_VERSIONS</c> variable contains a |
602 |
The <c>REPLACING_VERSIONS</c> variable contains a |