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 v2 4/4] ebuild-writing/misc-files/metadata: add an example for slots and subslots
Date: Sun, 15 May 2016 00:59:16
Message-Id: 1463273870-28502-5-git-send-email-gokturk@binghamton.edu
In Reply to: [gentoo-dev] [PATCH v2 0/4] 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 | 50 +++++++++++++++++++++++++++++
4 1 file changed, 50 insertions(+)
5
6 diff --git a/ebuild-writing/misc-files/metadata/text.xml b/ebuild-writing/misc-files/metadata/text.xml
7 index 3d135a6..486af11 100644
8 --- a/ebuild-writing/misc-files/metadata/text.xml
9 +++ b/ebuild-writing/misc-files/metadata/text.xml
10 @@ -549,6 +549,56 @@ is demonstrated.
11
12 </body>
13 </subsubsection>
14 +<subsubsection>
15 +<title>Slots and Subslots</title>
16 +<body>
17 +
18 +<p>
19 +The main focus of this example is to demonstrate how slots and
20 +subslots are specified, by examining the metadata of
21 +<path>media-libs/libpng</path>. There may be multiple reasons for
22 +slotting depending on the nature of the package. For this particular
23 +package, it can be seen that the slots are used to provide different
24 +versions of the library with varying binary compatibility and that
25 +developers are advised to build against the slot 0. Furthermore,
26 +different versions of this package with the same subslot provide the
27 +same Application Binary Interface (ABI), according to the description
28 +specified in the <c>&lt;subslots&gt;</c> tag.
29 +</p>
30 +
31 +<codesample lang="sgml">
32 +&lt;?xml version="1.0" encoding="UTF-8"?&gt;
33 +&lt;!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"&gt;
34 +&lt;pkgmetadata&gt;
35 + &lt;maintainer type="project"&gt;
36 + &lt;email&gt;base-system@g.o&lt;/email&gt;
37 + &lt;name&gt;Gentoo Base System&lt;/name&gt;
38 + &lt;/maintainer&gt;
39 + &lt;use&gt;
40 + &lt;flag name="apng"&gt;support unofficial APNG (Animated PNG) spec&lt;/flag&gt;
41 + &lt;/use&gt;
42 + &lt;upstream&gt;
43 + &lt;remote-id type="cpe"&gt;cpe:/a:libpng:libpng&lt;/remote-id&gt;
44 + &lt;remote-id type="sourceforge"&gt;apng&lt;/remote-id&gt;
45 + &lt;/upstream&gt;
46 + &lt;slots&gt;
47 + &lt;slot name="0"&gt;
48 + For building against. This is the only slot
49 + that provides headers and command line tools.
50 + &lt;/slot&gt;
51 + &lt;slot name="1.2"&gt;
52 + For binary compatibility, provides libpng12.so.0 only.
53 + &lt;/slot&gt;
54 + &lt;slot name="1.5"&gt;
55 + For binary compatibility, provides libpng15.so.15 only.
56 + &lt;/slot&gt;
57 + &lt;subslots&gt;Reflect ABI compatibility for libpng.so.&lt;/subslots&gt;
58 + &lt;/slots&gt;
59 +&lt;/pkgmetadata&gt;
60 +</codesample>
61 +
62 +</body>
63 +</subsubsection>
64 </body>
65 </subsection>
66 <subsection>
67 --
68 2.7.3