Gentoo Archives: gentoo-dev

From: "Göktürk Yüksek" <gokturk@××××××××××.edu>
To: devmanual@g.o
Cc: gentoo-dev@l.g.o
Subject: [gentoo-dev] [PATCH v1 5/5] ebuild-writing/misc-files/metadata: add an example for slots and subslots
Date: Mon, 02 May 2016 10:18:29
Message-Id: 1462184205-5644-6-git-send-email-gokturk@binghamton.edu
In Reply to: [gentoo-dev] [PATCH v1 0/5] devmanual: update the docs per GLEP 67 and 68 by "Göktürk Yüksek"
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 "&amp;gt;" as opposed to "&gt;" in
11
12 <p>
13 The example also uses the <c>&lt;pkg&gt;</c> tag in USE flag
14 -descriptions. Slot operators are not allowed inside &lt;pkg&gt;,
15 +descriptions. Slot operators are not preferred inside &lt;pkg&gt;,
16 therefore the notation &lt;pkg&gt;sys-boot/grub&lt;/pkg&gt;<c>:2</c>
17 is adopted as opposed to
18 &lt;pkg&gt;sys-boot/grub<c>:2</c>&lt;/pkg&gt;.
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>&lt;subslots&gt;</c> tag.
38 +</p>
39 +
40 +<codesample lang="sgml">
41 +&lt;?xml version="1.0" encoding="UTF-8"?&gt;
42 +&lt;!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"&gt;
43 +&lt;pkgmetadata&gt;
44 + &lt;maintainer type="project"&gt;
45 + &lt;email&gt;base-system@g.o&lt;/email&gt;
46 + &lt;name&gt;Gentoo Base System&lt;/name&gt;
47 + &lt;/maintainer&gt;
48 + &lt;use&gt;
49 + &lt;flag name="apng"&gt;support unofficial APNG (Animated PNG) spec&lt;/flag&gt;
50 + &lt;/use&gt;
51 + &lt;upstream&gt;
52 + &lt;remote-id type="cpe"&gt;cpe:/a:libpng:libpng&lt;/remote-id&gt;
53 + &lt;remote-id type="sourceforge"&gt;apng&lt;/remote-id&gt;
54 + &lt;/upstream&gt;
55 + &lt;slots&gt;
56 + &lt;slot name="0"&gt;
57 + For building against. This is the only slot
58 + that provides headers and command line tools.
59 + &lt;/slot&gt;
60 + &lt;slot name="1.2"&gt;
61 + For binary compatibility, provides libpng12.so.0 only.
62 + &lt;/slot&gt;
63 + &lt;slot name="1.5"&gt;
64 + For binary compatibility, provides libpng15.so.15 only.
65 + &lt;/slot&gt;
66 + &lt;subslots&gt;Reflect ABI compatibility for libpng.so.&lt;/subslots&gt;
67 + &lt;/slots&gt;
68 +&lt;/pkgmetadata&gt;
69 +</codesample>
70 +
71 +</body>
72 +</subsubsection>
73 </body>
74 </subsection>
75 <subsection>
76 --
77 2.7.3

Replies