1 |
commit: dfa00e1c23e56373cbf353ed2c256d9d2f762357 |
2 |
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Nov 3 20:03:01 2015 +0000 |
4 |
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Nov 4 22:42:01 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/pms.git/commit/?id=dfa00e1c |
7 |
|
8 |
Move listings of ebuild functions into listing environments. |
9 |
|
10 |
ebuild-functions.tex | 18 ++++++++++++++++++ |
11 |
1 file changed, 18 insertions(+) |
12 |
|
13 |
diff --git a/ebuild-functions.tex b/ebuild-functions.tex |
14 |
index 480ccda..084e866 100644 |
15 |
--- a/ebuild-functions.tex |
16 |
+++ b/ebuild-functions.tex |
17 |
@@ -115,6 +115,8 @@ apply patches and set up the package's build system for further use. |
18 |
The initial working directory must be \t{WORKDIR}, and the default implementation used when |
19 |
the ebuild lacks the \t{src\_unpack} function shall behave as: |
20 |
|
21 |
+\begin{listing}[H] |
22 |
+\caption{src\_unpack} \label{lst:src-unpack} |
23 |
\begin{verbatim} |
24 |
src_unpack() { |
25 |
if [[ -n ${A} ]]; then |
26 |
@@ -122,6 +124,7 @@ src_unpack() { |
27 |
fi |
28 |
} |
29 |
\end{verbatim} |
30 |
+\end{listing} |
31 |
|
32 |
\subsection{src\_prepare} |
33 |
\label{sec:src-prepare-function} |
34 |
@@ -164,6 +167,8 @@ section~\ref{sec:s-to-workdir-fallback}. |
35 |
The \t{src\_configure} function configures the package's build environment. The default |
36 |
implementation used when the ebuild lacks the \t{src\_configure} function shall behave as: |
37 |
|
38 |
+\begin{listing}[H] |
39 |
+\caption{src\_configure} \label{lst:src-configure} |
40 |
\begin{verbatim} |
41 |
src_configure() { |
42 |
if [[ -x ${ECONF_SOURCE:-.}/configure ]]; then |
43 |
@@ -171,6 +176,7 @@ src_configure() { |
44 |
fi |
45 |
} |
46 |
\end{verbatim} |
47 |
+\end{listing} |
48 |
|
49 |
\ChangeWhenAddingAnEAPI{5} |
50 |
\begin{centertable}{EAPIs supporting \t{src\_configure}} \label{tab:src-configure-table} |
51 |
@@ -202,6 +208,8 @@ section~\ref{sec:s-to-workdir-fallback}. |
52 |
0, the default implementation used when the ebuild lacks the \t{src\_compile} function shall behave |
53 |
as: |
54 |
|
55 |
+\begin{listing}[H] |
56 |
+\caption{src\_compile, format~0} \label{lst:src-compile-0} |
57 |
\begin{verbatim} |
58 |
src_compile() { |
59 |
if [[ -x ./configure ]]; then |
60 |
@@ -212,11 +220,14 @@ src_compile() { |
61 |
fi |
62 |
} |
63 |
\end{verbatim} |
64 |
+\end{listing} |
65 |
|
66 |
\featurelabel{src-compile-1} For EAPIs listed in table~\ref{tab:src-compile-table} as using format |
67 |
1, the default implementation used when the ebuild lacks the \t{src\_compile} function shall behave |
68 |
as: |
69 |
|
70 |
+\begin{listing}[H] |
71 |
+\caption{src\_compile, format~1} \label{lst:src-compile-1} |
72 |
\begin{verbatim} |
73 |
src_compile() { |
74 |
if [[ -x ${ECONF_SOURCE:-.}/configure ]]; then |
75 |
@@ -227,11 +238,14 @@ src_compile() { |
76 |
fi |
77 |
} |
78 |
\end{verbatim} |
79 |
+\end{listing} |
80 |
|
81 |
\featurelabel{src-compile-2} For EAPIs listed in table~\ref{tab:src-compile-table} as using format |
82 |
2, the default implementation used when the ebuild lacks the \t{src\_compile} function shall behave |
83 |
as: |
84 |
|
85 |
+\begin{listing}[H] |
86 |
+\caption{src\_compile, format~2} \label{lst:src-compile-2} |
87 |
\begin{verbatim} |
88 |
src_compile() { |
89 |
if [[ -f Makefile ]] || [[ -f GNUmakefile ]] || [[ -f makefile ]]; then |
90 |
@@ -239,6 +253,7 @@ src_compile() { |
91 |
fi |
92 |
} |
93 |
\end{verbatim} |
94 |
+\end{listing} |
95 |
|
96 |
\ChangeWhenAddingAnEAPI{5} |
97 |
\begin{centertable}{\t{src\_compile} behaviour for EAPIs} \label{tab:src-compile-table} |
98 |
@@ -305,6 +320,8 @@ section~\ref{sec:s-to-workdir-fallback}. |
99 |
4, the default implementation used when the ebuild lacks the \t{src\_install} function shall behave |
100 |
as: |
101 |
|
102 |
+\begin{listing}[H] |
103 |
+\caption{src\_install, format~4} \label{lst:src-install-4} |
104 |
\begin{verbatim} |
105 |
src_install() { |
106 |
if [[ -f Makefile ]] || [[ -f GNUmakefile ]] || [[ -f makefile ]]; then |
107 |
@@ -324,6 +341,7 @@ src_install() { |
108 |
fi |
109 |
} |
110 |
\end{verbatim} |
111 |
+\end{listing} |
112 |
|
113 |
For other EAPIs, the default implementation used when the ebuild lacks the \t{src\_install} function |
114 |
is a no-op. |