aboutsummaryrefslogtreecommitdiff
blob: 4809394c0963f052d9436050b10489188052c428 (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
<?xml version="1.0"?>
<guide self="general-concepts/virtuals/">
<chapter>
<title>Virtuals</title>

<body>
<p>
Virtuals are merely packages that are in the category of <c>virtual</c>.  They
use their dependency string to specify the providers for the virtual and should
not install any files.  Since they are regular ebuilds, there can be several
versions of a virtual (which can be helpful when a package may be provided by
another in some versions, and not others <d/> see the perl virtuals for an
example of this).  One other difference (besides not installing any files) is
that a virtual does not define <c>HOMEPAGE</c> and <c>LICENSE</c> variables.
Since it installs no files, it really does not have a license.
</p>

<p>
Before adding a new virtual, it should be discussed on <c>gentoo-dev</c>.
</p>

<p>
An example of a virtual:

<codesample lang="ebuild">
EAPI=4

DESCRIPTION="Virtual for C++ tr1 &lt;type_traits&gt;"
SLOT="0"
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 sparc x86 ~x86-fbsd"

RDEPEND="|| ( >=sys-devel/gcc-4.1 dev-libs/boost )"
</codesample>

Looks familar...right?  It should since its going to look just like a regular
ebuild.
</p>

<note>
The so-called <e>old-style</e> or <c>PROVIDE</c> type virtuals have been banned
from the Gentoo repository.
</note>
</body>

<section>
<title>KEYWORDS in virtual packages</title>

<body>
<p>
Since virtual packages do not install any files, they do not follow the regular
arch testing procedure. Instead, the developer can immediately set
the <c>KEYWORDS</c> of a virtual to the union of <c>KEYWORDS</c> of its
providers. In particular, if a new virtual is created for a stable package,
the virtual is committed straight to stable.
</p>

<p>
For example, if you have two packages: <c>dev-libs/liblinux</c> with
<c>KEYWORDS="amd64 ~x86"</c> and <c>dev-libs/libbsd</c> with
<c>KEYWORDS="~amd64-fbsd ~x86-fbsd"</c>, the resulting virtual will
have:
</p>

<codesample lang="ebuild">
KEYWORDS="amd64 ~x86 ~amd64-fbsd ~x86-fbsd"

RDEPEND="|| ( dev-libs/liblinux dev-libs/libbsd )"
</codesample>
</body>

</section>

</chapter>
</guide>