Signed-off-by: Göktürk Yüksek <gokt...@binghamton.edu> --- ebuild-writing/misc-files/metadata/text.xml | 52 ++++++++++++++++++++++++++++- 1 file changed, 51 insertions(+), 1 deletion(-)
diff --git a/ebuild-writing/misc-files/metadata/text.xml b/ebuild-writing/misc-files/metadata/text.xml index a0946e8..66da375 100644 --- a/ebuild-writing/misc-files/metadata/text.xml +++ b/ebuild-writing/misc-files/metadata/text.xml @@ -494,7 +494,7 @@ project. Note the use of "&gt;" as opposed to ">" in <p> The example also uses the <c><pkg></c> tag in USE flag -descriptions. Slot operators are not allowed inside <pkg>, +descriptions. Slot operators are not preferred inside <pkg>, therefore the notation <pkg>sys-boot/grub</pkg><c>:2</c> is adopted as opposed to <pkg>sys-boot/grub<c>:2</c></pkg>. @@ -547,6 +547,56 @@ is demonstrated. </body> </subsubsection> +<subsubsection> +<title>Slots and Subslots</title> +<body> + +<p> +The main focus of this example is to demonstrate how slots and +subslots are specified, by examining the metadata of +<path>media-libs/libpng</path>. There may be multiple reasons for +slotting depending on the nature of the package. For this particular +package, it can be seen that the slots are used to provide different +versions of the library with varying binary compatibility and that +developers are advised to build against the slot 0. Furthermore, +different versions of this package with the same subslot provide the +same Application Binary Interface (ABI), according to the description +specified in the <c><subslots></c> tag. +</p> + +<codesample lang="sgml"> +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>base-sys...@gentoo.org</email> + <name>Gentoo Base System</name> + </maintainer> + <use> + <flag name="apng">support unofficial APNG (Animated PNG) spec</flag> + </use> + <upstream> + <remote-id type="cpe">cpe:/a:libpng:libpng</remote-id> + <remote-id type="sourceforge">apng</remote-id> + </upstream> + <slots> + <slot name="0"> + For building against. This is the only slot + that provides headers and command line tools. + </slot> + <slot name="1.2"> + For binary compatibility, provides libpng12.so.0 only. + </slot> + <slot name="1.5"> + For binary compatibility, provides libpng15.so.15 only. + </slot> + <subslots>Reflect ABI compatibility for libpng.so.</subslots> + </slots> +</pkgmetadata> +</codesample> + +</body> +</subsubsection> </body> </subsection> <subsection> -- 2.7.3