Lines 132-143
has returned.
Link Here
|
132 |
|
132 |
|
133 |
\featurelabel{econf-options} |
133 |
\featurelabel{econf-options} |
134 |
\begin{itemize} |
134 |
\begin{itemize} |
135 |
\item -{}-prefix must default to \t{/usr} unless overridden by \t{econf}'s caller. |
135 |
\item -{}-prefix must default to \t{\$\{EPREFIX\}/usr} unless overridden by \t{econf}'s caller. |
136 |
\item -{}-mandir must be \t{/usr/share/man} |
136 |
\item -{}-mandir must be \t{\$\{EPREFIX\}/usr/share/man} |
137 |
\item -{}-infodir must be \t{/usr/share/info} |
137 |
\item -{}-infodir must be \t{\$\{EPREFIX\}/usr/share/info} |
138 |
\item -{}-datadir must be \t{/usr/share} |
138 |
\item -{}-datadir must be \t{\$\{EPREFIX\}/usr/share} |
139 |
\item -{}-sysconfdir must be \t{/etc} |
139 |
\item -{}-sysconfdir must be \t{\$\{EPREFIX\}/etc} |
140 |
\item -{}-localstatedir must be \t{/var/lib} |
140 |
\item -{}-localstatedir must be \t{\$\{EPREFIX\}/var/lib} |
141 |
\item -{}-host must be the value of the \t{CHOST} environment variable. |
141 |
\item -{}-host must be the value of the \t{CHOST} environment variable. |
142 |
\item -{}-libdir must be set according to Algorithm~\ref{alg:econf-libdir}. |
142 |
\item -{}-libdir must be set according to Algorithm~\ref{alg:econf-libdir}. |
143 |
\item -{}-disable-dependency-tracking, if the EAPI is listed in |
143 |
\item -{}-disable-dependency-tracking, if the EAPI is listed in |
Lines 159-164
has returned.
Link Here
|
159 |
\end{tabular} |
159 |
\end{tabular} |
160 |
\end{centertable} |
160 |
\end{centertable} |
161 |
|
161 |
|
|
|
162 |
Note that the \t{\$\{EPREFIX\}} component represents the same |
163 |
offset-prefix as described in Table~\ref{tab:defined_vars}. It |
164 |
facilitates offset-prefix installations which is supported by EAPIs |
165 |
listed in Table~\ref{tab:offset-prefix-table}. When no |
166 |
offset-prefix installation is in effect, \t{EPREFIX} becomes the |
167 |
empty string, making the behaviour of \t{econf} equal for both |
168 |
offset-prefix supporting and agnostic EAPIs. |
169 |
|
162 |
\t{econf} must be implemented internally---that is, as a bash function and not an external |
170 |
\t{econf} must be implemented internally---that is, as a bash function and not an external |
163 |
script. Should any portion of it fail, it must abort the build using \t{die}, unless run using |
171 |
script. Should any portion of it fail, it must abort the build using \t{die}, unless run using |
164 |
\t{nonfatal}, in which case it must return non-zero exit status. |
172 |
\t{nonfatal}, in which case it must return non-zero exit status. |
Lines 166-172
has returned.
Link Here
|
166 |
\begin{algorithm} |
174 |
\begin{algorithm} |
167 |
\caption{econf -{}-libdir logic} \label{alg:econf-libdir} |
175 |
\caption{econf -{}-libdir logic} \label{alg:econf-libdir} |
168 |
\begin{algorithmic}[1] |
176 |
\begin{algorithmic}[1] |
169 |
\STATE let prefix=/usr |
177 |
\STATE let prefix=\$\{EPREFIX\}/usr |
170 |
\IF{the caller specified -{}-prefix=\$p} |
178 |
\IF{the caller specified -{}-prefix=\$p} |
171 |
\STATE let prefix=\$p |
179 |
\STATE let prefix=\$p |
172 |
\ENDIF |
180 |
\ENDIF |
Lines 193-206
has returned.
Link Here
|
193 |
to \t{einstall} are passed verbatim to \t{emake}, as shown. Failure behaviour is EAPI dependent |
201 |
to \t{einstall} are passed verbatim to \t{emake}, as shown. Failure behaviour is EAPI dependent |
194 |
as per section~\ref{sec:failure-behaviour}. |
202 |
as per section~\ref{sec:failure-behaviour}. |
195 |
|
203 |
|
|
|
204 |
The variable \t{ED} is defined as in Table~\ref{tab:defined_vars} |
205 |
and depends on the use of an offset-prefix. When such offset-prefix |
206 |
is absent, \t{ED} is equivalent to \t{D}. \t{ED} is always |
207 |
available in EAPIs that support offset-prefix installations as |
208 |
listed in Table~\ref{tab:offset-env-vars-table}, hence EAPIs lacking |
209 |
offset-prefix support should use \t{D} instead of \t{ED} in the |
210 |
command given in Listing~\ref{lst:einstall}. |
196 |
\begin{listing}[H] |
211 |
\begin{listing}[H] |
197 |
\caption{einstall command}\label{lst:einstall} |
212 |
\caption{einstall command}\label{lst:einstall} |
198 |
\begin{verbatim} |
213 |
\begin{verbatim} |
199 |
emake \ |
214 |
emake \ |
200 |
prefix="${D}"/usr \ |
215 |
prefix="${ED}"/usr \ |
201 |
mandir="${D}"/usr/share/man \ |
216 |
mandir="${ED}"/usr/share/man \ |
202 |
infodir="${D}"/usr/share/info \ |
217 |
infodir="${ED}"/usr/share/info \ |
203 |
libdir="${D}"/usr/$(get_libdir) \ |
218 |
libdir="${ED}"/usr/$(get_libdir) \ |
204 |
"$@" \ |
219 |
"$@" \ |
205 |
install |
220 |
install |
206 |
\end{verbatim} |
221 |
\end{verbatim} |
Lines 211-225
emake \
Link Here
|
211 |
\subsubsection{Installation commands} |
226 |
\subsubsection{Installation commands} |
212 |
These commands are used to install files into the staging area, in cases where the package's \t{make |
227 |
These commands are used to install files into the staging area, in cases where the package's \t{make |
213 |
install} target cannot be used or does not install all needed files. Except where otherwise stated, |
228 |
install} target cannot be used or does not install all needed files. Except where otherwise stated, |
214 |
all filenames created or modified are relative to the staging directory, given by \t{D}. These |
229 |
all filenames created or modified are relative to the staging directory |
|
|
230 |
including the offset-prefix \t{ED} in offset-prefix aware EAPIs, or |
231 |
just the staging directory \t{D} in offset-prefix agnostic EAPIs. |
215 |
commands must all be external programs and not bash functions or aliases---that is, they must be |
232 |
commands must all be external programs and not bash functions or aliases---that is, they must be |
216 |
callable from \t{xargs}. Ebuilds must not run any of these commands once the current phase function |
233 |
callable from \t{xargs}. Ebuilds must not run any of these commands once the current phase function |
217 |
has returned. |
234 |
has returned. |
218 |
|
235 |
|
219 |
\begin{description} |
236 |
\begin{description} |
220 |
\item[dobin] Installs the given files into \t{DESTTREE/bin}, where \t{DESTTREE} defaults to |
237 |
\item[dobin] Installs the given files into \t{DESTTREE/bin}, where \t{DESTTREE} defaults to |
221 |
\t{/usr}. Gives the files mode \t{0755} and ownership \t{root:root}. Failure behaviour is EAPI |
238 |
\t{/usr}. Gives the files mode \t{0755} and transfers file ownership |
222 |
dependent as per section~\ref{sec:failure-behaviour}. |
239 |
to the superuser or its equivalent on the system or installation at |
|
|
240 |
hand. For instance on Gentoo Linux in a non-offset-prefix |
241 |
installation this ownership is \t{root:root}, while on an |
242 |
offset-prefix aware installation this may be \t{joe:users}. Failure |
243 |
behaviour is EAPI dependent as per |
244 |
section~\ref{sec:failure-behaviour}. |
223 |
|
245 |
|
224 |
\item[doconfd] Installs the given config files into \t{/etc/conf.d/}, by default with file mode |
246 |
\item[doconfd] Installs the given config files into \t{/etc/conf.d/}, by default with file mode |
225 |
\t{0644}. This can be overridden by setting \t{INSOPTIONS} with the \t{insopts} function. |
247 |
\t{0644}. This can be overridden by setting \t{INSOPTIONS} with the \t{insopts} function. |
Lines 265-271
that can be passed to \t{dohtml} are as follows:
Link Here
|
265 |
\item{\t{-f}} --- list of files that are able to be installed. |
287 |
\item{\t{-f}} --- list of files that are able to be installed. |
266 |
\item{\t{-x}} --- list of directories that files will not be installed from (only used in |
288 |
\item{\t{-x}} --- list of directories that files will not be installed from (only used in |
267 |
conjunction with \t{-r}). |
289 |
conjunction with \t{-r}). |
268 |
\item{\t{-p}} --- sets a document prefix for installed files. |
290 |
\item{\t{-p}} --- sets a document prefix for installed files, not to |
|
|
291 |
be confused with the global offset-prefix. |
269 |
\end{description} |
292 |
\end{description} |
270 |
|
293 |
|
271 |
Failure behaviour is EAPI dependent as per section~\ref{sec:failure-behaviour}. |
294 |
Failure behaviour is EAPI dependent as per section~\ref{sec:failure-behaviour}. |
Lines 423-429
that can be passed to \t{dohtml} are as follows:
Link Here
|
423 |
\end{centertable} |
446 |
\end{centertable} |
424 |
|
447 |
|
425 |
\subsubsection{Commands affecting install destinations} |
448 |
\subsubsection{Commands affecting install destinations} |
426 |
The following commands are used to set the various destination trees, all relative to \t{\$\{D\}}, |
449 |
The following commands are used to set the various destination trees, |
|
|
450 |
all relative to \t{\$\{ED\}} in offset-prefix aware EAPIs and relative to |
451 |
\t{\$\{D\}} in offset-prefix agnostic EAPIs, |
427 |
used by the above installation commands. They must be shell functions or aliases, due to the need to |
452 |
used by the above installation commands. They must be shell functions or aliases, due to the need to |
428 |
set variables read by the above commands. Ebuilds must not run any of these commands once the |
453 |
set variables read by the above commands. Ebuilds must not run any of these commands once the |
429 |
current phase function has returned. |
454 |
current phase function has returned. |
Lines 431-437
current phase function has returned.
Link Here
|
431 |
\begin{description} |
456 |
\begin{description} |
432 |
|
457 |
|
433 |
\item[into] Sets the value of \t{DESTTREE} for future invocations of the above utilities. Creates |
458 |
\item[into] Sets the value of \t{DESTTREE} for future invocations of the above utilities. Creates |
434 |
the directory under \t{\$\{D\}}, using \t{install -d} with no additional options, if it does not |
459 |
the directory under \t{\$\{ED\}} in offset-prefix aware EAPIs or under |
|
|
460 |
\t{\$\{D\}} in offset-prefix agnostic EAPIs, using \t{install -d} with |
461 |
no additional options, if it does not |
435 |
already exist. Failure behaviour is EAPI dependent as per section~\ref{sec:failure-behaviour}. |
462 |
already exist. Failure behaviour is EAPI dependent as per section~\ref{sec:failure-behaviour}. |
436 |
|
463 |
|
437 |
\item[insinto] Sets the value of \t{INSDESTTREE} for future invocations of the above utilities. May |
464 |
\item[insinto] Sets the value of \t{INSDESTTREE} for future invocations of the above utilities. May |
Lines 455-464
already exist. Failure behaviour is EAPI dependent as per section~\ref{sec:failu
Link Here
|
455 |
|
482 |
|
456 |
\subsubsection{Commands affecting install compression} |
483 |
\subsubsection{Commands affecting install compression} |
457 |
|
484 |
|
458 |
\featurelabel{controllable-compress} In EAPIs listed in table~\ref{tab:compression-table} as |
485 |
\featurelabel{controllable-compress} In EAPIs listed in |
459 |
supporting controllable compression, the package manager may optionally compress a subset of the |
486 |
table~\ref{tab:compression-table} as supporting controllable |
460 |
files under the \t{D} directory. To control which directories may or may not be compressed, the |
487 |
compression, the package manager may optionally compress a subset of the |
461 |
package manager shall maintain two lists: |
488 |
files under the \t{ED} in offset-prefix aware EAPIs or the \t{D} in |
|
|
489 |
offset-prefix agnostic EAPIs directory. To control which directories may |
490 |
or may not be compressed, the package manager shall maintain two lists: |
462 |
|
491 |
|
463 |
\begin{compactitem} |
492 |
\begin{compactitem} |
464 |
\item An inclusion list, which initially contains \t{/usr/share/doc}, \t{/usr/share/info} and |
493 |
\item An inclusion list, which initially contains \t{/usr/share/doc}, \t{/usr/share/info} and |
Lines 468-474
package manager shall maintain two lists:
Link Here
|
468 |
|
497 |
|
469 |
The optional compression shall be carried out after \t{src\_install} has completed, and before the |
498 |
The optional compression shall be carried out after \t{src\_install} has completed, and before the |
470 |
execution of any subsequent phase function. For each item in the inclusion list, pretend it has the |
499 |
execution of any subsequent phase function. For each item in the inclusion list, pretend it has the |
471 |
value of the \t{D} variable prepended, then: |
500 |
value of the \t{ED} variable in offset-prefix aware EAPIs or the \t{D} |
|
|
501 |
variable in offset-prefix agnostic EAPIs prepended, then: |
472 |
|
502 |
|
473 |
\begin{compactitem} |
503 |
\begin{compactitem} |
474 |
\item If it is a directory, act as if every file or directory immediately under this directory |
504 |
\item If it is a directory, act as if every file or directory immediately under this directory |
Lines 478-484
value of the \t{D} variable prepended, then:
Link Here
|
478 |
\end{compactitem} |
508 |
\end{compactitem} |
479 |
|
509 |
|
480 |
Whether an item is to be excluded is determined as follows: For each item in the exclusion list, |
510 |
Whether an item is to be excluded is determined as follows: For each item in the exclusion list, |
481 |
pretend it has the value of the \t{D} variable prepended, then: |
511 |
pretend it has the value of the \t{ED} variable in offset-prefix aware |
|
|
512 |
EAPIs or the \t{D} variable in offset-prefix agnostic EAPIs prepended, |
513 |
then: |
482 |
|
514 |
|
483 |
\begin{compactitem} |
515 |
\begin{compactitem} |
484 |
\item If it is a directory, act as if every file or directory immediately under this directory |
516 |
\item If it is a directory, act as if every file or directory immediately under this directory |
Lines 572-580
has returned.
Link Here
|
572 |
|
604 |
|
573 |
\begin{description} |
605 |
\begin{description} |
574 |
\item[dosed] Takes any number of arguments, which can be files or \t{sed} expressions. For each |
606 |
\item[dosed] Takes any number of arguments, which can be files or \t{sed} expressions. For each |
575 |
argument, if it names, relative to \t{D} a file which exists, then \t{sed} is run with the |
607 |
argument, if it names, relative to \t{ED} (offset-prefix aware |
|
|
608 |
EAPIs) or \t{D} (offset-prefix agnostic EAPIs) a file which exists, |
609 |
then \t{sed} is run with the |
576 |
current expression on that file. Otherwise, the current expression is set to the text of the |
610 |
current expression on that file. Otherwise, the current expression is set to the text of the |
577 |
argument. The initial value of the expression is \t{s:\$\{D\}::g}. In EAPIs listed in |
611 |
argument. The initial value of the expression is \t{s:\$\{ED\}::g} |
|
|
612 |
in offset-prefix aware EAPIs and \t{s:\$\{D\}::g} in offset-prefix |
613 |
agnostic EAPIs. In EAPIs listed in |
578 |
table~\ref{tab:banned-commands-table}, this command is banned as per |
614 |
table~\ref{tab:banned-commands-table}, this command is banned as per |
579 |
section~\ref{sec:banned-commands}. Failure behaviour is EAPI dependent as per |
615 |
section~\ref{sec:banned-commands}. Failure behaviour is EAPI dependent as per |
580 |
section~\ref{sec:failure-behaviour}. |
616 |
section~\ref{sec:failure-behaviour}. |
Lines 606-612
has returned.
Link Here
|
606 |
\item rar files (\t{*.rar, *.RAR}). Ebuilds must ensure that RARLAB's unrar is installed. |
642 |
\item rar files (\t{*.rar, *.RAR}). Ebuilds must ensure that RARLAB's unrar is installed. |
607 |
\item LHA archives (\t{*.LHA, *.LHa, *.lha, *.lhz}). Ebuilds must ensure that the lha program is |
643 |
\item LHA archives (\t{*.LHA, *.LHa, *.lha, *.lhz}). Ebuilds must ensure that the lha program is |
608 |
installed. |
644 |
installed. |
609 |
\item ar archives (\t{*.a, *.deb}). Ebuilds must ensure that GNU binutils is installed. |
645 |
\item ar archives (\t{*.a}). Ebuilds must ensure that GNU binutils is installed. |
|
|
646 |
\item deb packages (\t{*.deb}). Ebuilds must ensure that the |
647 |
deb2targz program is installed on those platforms where GNU binutils |
648 |
ar program is not available and the installed ar program is |
649 |
incompatible with GNU archives. Otherwise, ebuilds must ensure that |
650 |
GNU binutils is installed. |
610 |
\item lzma-compressed files (\t{*.lzma}). Ebuilds must ensure that LZMA Utils is installed. |
651 |
\item lzma-compressed files (\t{*.lzma}). Ebuilds must ensure that LZMA Utils is installed. |
611 |
\item lzma-compressed tar files (\t{*.tar.lzma}). Ebuilds must ensure that LZMA Utils and |
652 |
\item lzma-compressed tar files (\t{*.tar.lzma}). Ebuilds must ensure that LZMA Utils and |
612 |
GNU tar are installed. |
653 |
GNU tar are installed. |
613 |
- |
|
|