Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 140180 | Differences between
and this patch

Collapse All | Expand All

(-)general-concepts/text.xml (+1 lines)
Lines 43-46 Link Here
43
<include href="tree/"/>
43
<include href="tree/"/>
44
<include href="use-flags/"/>
44
<include href="use-flags/"/>
45
<include href="user-environment/"/>
45
<include href="user-environment/"/>
46
<include href="virtuals/"/>
46
</guide>
47
</guide>
(-)general-concepts/virtuals/text.xml (+73 lines)
Line 0 Link Here
1
<?xml version="1.0"?>
2
<guide self="general-concepts/viruals/">
3
<chapter>
4
<title>Virtuals</title>
5
6
<body>
7
<p>
8
Currently there exist two different forms of virtuals, our regular
9
<c>PROVIDE</c> type virtuals, and so called <e>new-style</e> virtuals.
10
</p>
11
</body>
12
13
<section>
14
<title><e>Old-style</e> Virtuals</title>
15
<body>
16
<p>
17
<e>Old-style</e> virtuals are not really packages, but are something you can depend
18
upon and install.  All <e>old-style</e> virtuals must have a category of
19
"virtual".  In order to use an <e>old-style</e> virtual there are a few things
20
that need to be present in the tree:
21
22
<ul>
23
  <li>
24
    Atleast one ebuild must <c>PROVIDE</c> the virtual <d/> see
25
    <uri link="::ebuild-writing/variables#Optional Variables" />
26
  </li>
27
  <li>
28
    An entry in the virtuals file for each profile to list the default provider
29
  </li>
30
</ul>
31
32
<e>Old-style</e> virtuals are not as flexible as <e>new-style</e> virtuals
33
because there is no concept of a version.  You can only depend upon a virtual,
34
but not a particular version of that virtual.
35
</p>
36
</body>
37
</section>
38
39
<section>
40
<title><e>New-style</e> Virtuals</title>
41
<body>
42
<p>
43
<e>New-style</e> virtuals are merely packages that are in the category of
44
<c>virtual</c>.  They use their dependency string to specify the providers for
45
the virtual and should not install any files.  Since they are regular ebuilds,
46
there can be several versions of a virtual (which can be helpful when a package
47
may be provided by another in some versions, and not others <d/> see the perl
48
virtuals for an example of this).
49
</p>
50
51
<p>
52
An example of a <e>new-style</e> virtual:
53
54
<codesample lang="ebuild">
55
DESCRIPTION="Virtual for C++ tr1 &lt;type_traits&gt;"
56
HOMEPAGE="http://www.gentoo.org/proj/en/base/"
57
SRC_URI=""
58
LICENSE="as-is"
59
SLOT="0"
60
KEYWORDS="alpha amd64 arm hppa ia64 mips ppc ppc64 s390 sparc x86 ~x86-fbsd"
61
IUSE=""
62
RDEPEND="|| ( >=sys-devel/gcc-4.1 dev-libs/boost )"
63
DEPEND=""
64
</codesample>
65
66
Looks familar...right?  It should since its going to look just like a regular
67
ebuild.
68
</p>
69
</body>
70
</section>
71
72
</chapter>
73
</guide>

Return to bug 140180