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