1 |
Signed-off-by: Göktürk Yüksek <gokturk@××××××××××.edu> |
2 |
--- |
3 |
ebuild-writing/misc-files/metadata/text.xml | 52 ++++++++++++++++++++++++++++- |
4 |
1 file changed, 51 insertions(+), 1 deletion(-) |
5 |
|
6 |
diff --git a/ebuild-writing/misc-files/metadata/text.xml b/ebuild-writing/misc-files/metadata/text.xml |
7 |
index a0946e8..66da375 100644 |
8 |
--- a/ebuild-writing/misc-files/metadata/text.xml |
9 |
+++ b/ebuild-writing/misc-files/metadata/text.xml |
10 |
@@ -494,7 +494,7 @@ project. Note the use of "&gt;" as opposed to ">" in |
11 |
|
12 |
<p> |
13 |
The example also uses the <c><pkg></c> tag in USE flag |
14 |
-descriptions. Slot operators are not allowed inside <pkg>, |
15 |
+descriptions. Slot operators are not preferred inside <pkg>, |
16 |
therefore the notation <pkg>sys-boot/grub</pkg><c>:2</c> |
17 |
is adopted as opposed to |
18 |
<pkg>sys-boot/grub<c>:2</c></pkg>. |
19 |
@@ -547,6 +547,56 @@ is demonstrated. |
20 |
|
21 |
</body> |
22 |
</subsubsection> |
23 |
+<subsubsection> |
24 |
+<title>Slots and Subslots</title> |
25 |
+<body> |
26 |
+ |
27 |
+<p> |
28 |
+The main focus of this example is to demonstrate how slots and |
29 |
+subslots are specified, by examining the metadata of |
30 |
+<path>media-libs/libpng</path>. There may be multiple reasons for |
31 |
+slotting depending on the nature of the package. For this particular |
32 |
+package, it can be seen that the slots are used to provide different |
33 |
+versions of the library with varying binary compatibility and that |
34 |
+developers are advised to build against the slot 0. Furthermore, |
35 |
+different versions of this package with the same subslot provide the |
36 |
+same Application Binary Interface (ABI), according to the description |
37 |
+specified in the <c><subslots></c> tag. |
38 |
+</p> |
39 |
+ |
40 |
+<codesample lang="sgml"> |
41 |
+<?xml version="1.0" encoding="UTF-8"?> |
42 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
43 |
+<pkgmetadata> |
44 |
+ <maintainer type="project"> |
45 |
+ <email>base-system@g.o</email> |
46 |
+ <name>Gentoo Base System</name> |
47 |
+ </maintainer> |
48 |
+ <use> |
49 |
+ <flag name="apng">support unofficial APNG (Animated PNG) spec</flag> |
50 |
+ </use> |
51 |
+ <upstream> |
52 |
+ <remote-id type="cpe">cpe:/a:libpng:libpng</remote-id> |
53 |
+ <remote-id type="sourceforge">apng</remote-id> |
54 |
+ </upstream> |
55 |
+ <slots> |
56 |
+ <slot name="0"> |
57 |
+ For building against. This is the only slot |
58 |
+ that provides headers and command line tools. |
59 |
+ </slot> |
60 |
+ <slot name="1.2"> |
61 |
+ For binary compatibility, provides libpng12.so.0 only. |
62 |
+ </slot> |
63 |
+ <slot name="1.5"> |
64 |
+ For binary compatibility, provides libpng15.so.15 only. |
65 |
+ </slot> |
66 |
+ <subslots>Reflect ABI compatibility for libpng.so.</subslots> |
67 |
+ </slots> |
68 |
+</pkgmetadata> |
69 |
+</codesample> |
70 |
+ |
71 |
+</body> |
72 |
+</subsubsection> |
73 |
</body> |
74 |
</subsection> |
75 |
<subsection> |
76 |
-- |
77 |
2.7.3 |