Lines 173-184
has returned.
Link Here
|
173 |
|
173 |
|
174 |
\featurelabel{econf-options} |
174 |
\featurelabel{econf-options} |
175 |
\begin{itemize} |
175 |
\begin{itemize} |
176 |
\item -{}-prefix must default to \t{/usr} unless overridden by \t{econf}'s caller. |
176 |
\item -{}-prefix must default to \t{\$\{EPREFIX\}/usr} unless overridden by \t{econf}'s caller. |
177 |
\item -{}-mandir must be \t{/usr/share/man} |
177 |
\item -{}-mandir must be \t{\$\{EPREFIX\}/usr/share/man} |
178 |
\item -{}-infodir must be \t{/usr/share/info} |
178 |
\item -{}-infodir must be \t{\$\{EPREFIX\}/usr/share/info} |
179 |
\item -{}-datadir must be \t{/usr/share} |
179 |
\item -{}-datadir must be \t{\$\{EPREFIX\}/usr/share} |
180 |
\item -{}-sysconfdir must be \t{/etc} |
180 |
\item -{}-sysconfdir must be \t{\$\{EPREFIX\}/etc} |
181 |
\item -{}-localstatedir must be \t{/var/lib} |
181 |
\item -{}-localstatedir must be \t{\$\{EPREFIX\}/var/lib} |
182 |
\item -{}-host must be the value of the \t{CHOST} environment variable. |
182 |
\item -{}-host must be the value of the \t{CHOST} environment variable. |
183 |
\item -{}-libdir must be set according to Algorithm~\ref{alg:econf-libdir}. |
183 |
\item -{}-libdir must be set according to Algorithm~\ref{alg:econf-libdir}. |
184 |
\item -{}-disable-dependency-tracking, if the EAPI is listed in |
184 |
\item -{}-disable-dependency-tracking, if the EAPI is listed in |
Lines 217-222
has returned.
Link Here
|
217 |
} |
217 |
} |
218 |
\end{centertable} |
218 |
\end{centertable} |
219 |
|
219 |
|
|
|
220 |
Note that the \t{\$\{EPREFIX\}} component represents the same |
221 |
offset-prefix as described in Table~\ref{tab:defined_vars}. It |
222 |
facilitates offset-prefix installations which is supported by EAPIs |
223 |
listed in Table~\ref{tab:offset-prefix-table}. When no |
224 |
offset-prefix installation is in effect, \t{EPREFIX} becomes the |
225 |
empty string, making the behaviour of \t{econf} equal for both |
226 |
offset-prefix supporting and agnostic EAPIs. |
227 |
|
220 |
\t{econf} must be implemented internally---that is, as a bash function and not an external |
228 |
\t{econf} must be implemented internally---that is, as a bash function and not an external |
221 |
script. Should any portion of it fail, it must abort the build using \t{die}, unless run using |
229 |
script. Should any portion of it fail, it must abort the build using \t{die}, unless run using |
222 |
\t{nonfatal}, in which case it must return non-zero exit status. |
230 |
\t{nonfatal}, in which case it must return non-zero exit status. |
Lines 224-230
has returned.
Link Here
|
224 |
\begin{algorithm} |
232 |
\begin{algorithm} |
225 |
\caption{econf -{}-libdir logic} \label{alg:econf-libdir} |
233 |
\caption{econf -{}-libdir logic} \label{alg:econf-libdir} |
226 |
\begin{algorithmic}[1] |
234 |
\begin{algorithmic}[1] |
227 |
\STATE let prefix=/usr |
235 |
\STATE let prefix=\$\{EPREFIX\}/usr |
228 |
\IF{the caller specified -{}-prefix=\$p} |
236 |
\IF{the caller specified -{}-prefix=\$p} |
229 |
\STATE let prefix=\$p |
237 |
\STATE let prefix=\$p |
230 |
\ENDIF |
238 |
\ENDIF |
Lines 251-264
has returned.
Link Here
|
251 |
to \t{einstall} are passed verbatim to \t{emake}, as shown. Failure behaviour is EAPI dependent |
259 |
to \t{einstall} are passed verbatim to \t{emake}, as shown. Failure behaviour is EAPI dependent |
252 |
as per section~\ref{sec:failure-behaviour}. |
260 |
as per section~\ref{sec:failure-behaviour}. |
253 |
|
261 |
|
|
|
262 |
The variable \t{ED} is defined as in Table~\ref{tab:defined_vars} |
263 |
and depends on the use of an offset-prefix. When such offset-prefix |
264 |
is absent, \t{ED} is equivalent to \t{D}. \t{ED} is always |
265 |
available in EAPIs that support offset-prefix installations as |
266 |
listed in Table~\ref{tab:offset-env-vars-table}, hence EAPIs lacking |
267 |
offset-prefix support should use \t{D} instead of \t{ED} in the |
268 |
command given in Listing~\ref{lst:einstall}. |
254 |
\begin{listing}[H] |
269 |
\begin{listing}[H] |
255 |
\caption{einstall command}\label{lst:einstall} |
270 |
\caption{einstall command}\label{lst:einstall} |
256 |
\begin{verbatim} |
271 |
\begin{verbatim} |
257 |
emake \ |
272 |
emake \ |
258 |
prefix="${D}"/usr \ |
273 |
prefix="${ED}"/usr \ |
259 |
mandir="${D}"/usr/share/man \ |
274 |
mandir="${ED}"/usr/share/man \ |
260 |
infodir="${D}"/usr/share/info \ |
275 |
infodir="${ED}"/usr/share/info \ |
261 |
libdir="${D}"/usr/$(get_libdir) \ |
276 |
libdir="${ED}"/usr/$(get_libdir) \ |
262 |
"$@" \ |
277 |
"$@" \ |
263 |
install |
278 |
install |
264 |
\end{verbatim} |
279 |
\end{verbatim} |
Lines 269-283
emake \
Link Here
|
269 |
\subsubsection{Installation commands} |
284 |
\subsubsection{Installation commands} |
270 |
These commands are used to install files into the staging area, in cases where the package's \t{make |
285 |
These commands are used to install files into the staging area, in cases where the package's \t{make |
271 |
install} target cannot be used or does not install all needed files. Except where otherwise stated, |
286 |
install} target cannot be used or does not install all needed files. Except where otherwise stated, |
272 |
all filenames created or modified are relative to the staging directory, given by \t{D}. These |
287 |
all filenames created or modified are relative to the staging directory |
|
|
288 |
including the offset-prefix \t{ED} in offset-prefix aware EAPIs, or |
289 |
just the staging directory \t{D} in offset-prefix agnostic EAPIs. |
273 |
commands must all be external programs and not bash functions or aliases---that is, they must be |
290 |
commands must all be external programs and not bash functions or aliases---that is, they must be |
274 |
callable from \t{xargs}. Ebuilds must not run any of these commands once the current phase function |
291 |
callable from \t{xargs}. Ebuilds must not run any of these commands once the current phase function |
275 |
has returned. |
292 |
has returned. |
276 |
|
293 |
|
277 |
\begin{description} |
294 |
\begin{description} |
278 |
\item[dobin] Installs the given files into \t{DESTTREE/bin}, where \t{DESTTREE} defaults to |
295 |
\item[dobin] Installs the given files into \t{DESTTREE/bin}, where \t{DESTTREE} defaults to |
279 |
\t{/usr}. Gives the files mode \t{0755} and ownership \t{root:root}. Failure behaviour is EAPI |
296 |
\t{/usr}. Gives the files mode \t{0755} and transfers file ownership |
280 |
dependent as per section~\ref{sec:failure-behaviour}. |
297 |
to the superuser or its equivalent on the system or installation at |
|
|
298 |
hand. For instance on Gentoo Linux in a non-offset-prefix |
299 |
installation this ownership is \t{root:root}, while on an |
300 |
offset-prefix aware installation this may be \t{joe:users}. Failure |
301 |
behaviour is EAPI dependent as per |
302 |
section~\ref{sec:failure-behaviour}. |
281 |
|
303 |
|
282 |
\item[doconfd] Installs the given config files into \t{/etc/conf.d/}, by default with file mode |
304 |
\item[doconfd] Installs the given config files into \t{/etc/conf.d/}, by default with file mode |
283 |
\t{0644}. This can be overridden by setting \t{INSOPTIONS} with the \t{insopts} function. |
305 |
\t{0644}. This can be overridden by setting \t{INSOPTIONS} with the \t{insopts} function. |
Lines 323-329
that can be passed to \t{dohtml} are as follows:
Link Here
|
323 |
\item{\t{-f}} --- list of files that are able to be installed. |
345 |
\item{\t{-f}} --- list of files that are able to be installed. |
324 |
\item{\t{-x}} --- list of directories that files will not be installed from (only used in |
346 |
\item{\t{-x}} --- list of directories that files will not be installed from (only used in |
325 |
conjunction with \t{-r}). |
347 |
conjunction with \t{-r}). |
326 |
\item{\t{-p}} --- sets a document prefix for installed files. |
348 |
\item{\t{-p}} --- sets a document prefix for installed files, not to |
|
|
349 |
be confused with the global offset-prefix. |
327 |
\end{description} |
350 |
\end{description} |
328 |
|
351 |
|
329 |
Failure behaviour is EAPI dependent as per section~\ref{sec:failure-behaviour}. |
352 |
Failure behaviour is EAPI dependent as per section~\ref{sec:failure-behaviour}. |
Lines 569-575
that can be passed to \t{dohtml} are as follows:
Link Here
|
569 |
} |
592 |
} |
570 |
|
593 |
|
571 |
\subsubsection{Commands affecting install destinations} |
594 |
\subsubsection{Commands affecting install destinations} |
572 |
The following commands are used to set the various destination trees, all relative to \t{\$\{D\}}, |
595 |
The following commands are used to set the various destination trees, |
|
|
596 |
all relative to \t{\$\{ED\}} in offset-prefix aware EAPIs and relative to |
597 |
\t{\$\{D\}} in offset-prefix agnostic EAPIs, |
573 |
used by the above installation commands. They must be shell functions or aliases, due to the need to |
598 |
used by the above installation commands. They must be shell functions or aliases, due to the need to |
574 |
set variables read by the above commands. Ebuilds must not run any of these commands once the |
599 |
set variables read by the above commands. Ebuilds must not run any of these commands once the |
575 |
current phase function has returned. |
600 |
current phase function has returned. |
Lines 577-583
current phase function has returned.
Link Here
|
577 |
\begin{description} |
602 |
\begin{description} |
578 |
|
603 |
|
579 |
\item[into] Sets the value of \t{DESTTREE} for future invocations of the above utilities. Creates |
604 |
\item[into] Sets the value of \t{DESTTREE} for future invocations of the above utilities. Creates |
580 |
the directory under \t{\$\{D\}}, using \t{install -d} with no additional options, if it does not |
605 |
the directory under \t{\$\{ED\}} in offset-prefix aware EAPIs or under |
|
|
606 |
\t{\$\{D\}} in offset-prefix agnostic EAPIs, using \t{install -d} with |
607 |
no additional options, if it does not |
581 |
already exist. Failure behaviour is EAPI dependent as per section~\ref{sec:failure-behaviour}. |
608 |
already exist. Failure behaviour is EAPI dependent as per section~\ref{sec:failure-behaviour}. |
582 |
|
609 |
|
583 |
\item[insinto] Sets the value of \t{INSDESTTREE} for future invocations of the above utilities. May |
610 |
\item[insinto] Sets the value of \t{INSDESTTREE} for future invocations of the above utilities. May |
Lines 601-610
already exist. Failure behaviour is EAPI dependent as per section~\ref{sec:failu
Link Here
|
601 |
|
628 |
|
602 |
\subsubsection{Commands affecting install compression} |
629 |
\subsubsection{Commands affecting install compression} |
603 |
|
630 |
|
604 |
\featurelabel{controllable-compress} In EAPIs listed in table~\ref{tab:compression-table} as |
631 |
\featurelabel{controllable-compress} In EAPIs listed in |
605 |
supporting controllable compression, the package manager may optionally compress a subset of the |
632 |
table~\ref{tab:compression-table} as supporting controllable |
606 |
files under the \t{D} directory. To control which directories may or may not be compressed, the |
633 |
compression, the package manager may optionally compress a subset of the |
607 |
package manager shall maintain two lists: |
634 |
files under the \t{ED} in offset-prefix aware EAPIs or the \t{D} in |
|
|
635 |
offset-prefix agnostic EAPIs directory. To control which directories may |
636 |
or may not be compressed, the package manager shall maintain two lists: |
608 |
|
637 |
|
609 |
\begin{compactitem} |
638 |
\begin{compactitem} |
610 |
\item An inclusion list, which initially contains \t{/usr/share/doc}, \t{/usr/share/info} and |
639 |
\item An inclusion list, which initially contains \t{/usr/share/doc}, \t{/usr/share/info} and |
Lines 614-620
package manager shall maintain two lists:
Link Here
|
614 |
|
643 |
|
615 |
The optional compression shall be carried out after \t{src\_install} has completed, and before the |
644 |
The optional compression shall be carried out after \t{src\_install} has completed, and before the |
616 |
execution of any subsequent phase function. For each item in the inclusion list, pretend it has the |
645 |
execution of any subsequent phase function. For each item in the inclusion list, pretend it has the |
617 |
value of the \t{D} variable prepended, then: |
646 |
value of the \t{ED} variable in offset-prefix aware EAPIs or the \t{D} |
|
|
647 |
variable in offset-prefix agnostic EAPIs prepended, then: |
618 |
|
648 |
|
619 |
\begin{compactitem} |
649 |
\begin{compactitem} |
620 |
\item If it is a directory, act as if every file or directory immediately under this directory |
650 |
\item If it is a directory, act as if every file or directory immediately under this directory |
Lines 624-630
value of the \t{D} variable prepended, then:
Link Here
|
624 |
\end{compactitem} |
654 |
\end{compactitem} |
625 |
|
655 |
|
626 |
Whether an item is to be excluded is determined as follows: For each item in the exclusion list, |
656 |
Whether an item is to be excluded is determined as follows: For each item in the exclusion list, |
627 |
pretend it has the value of the \t{D} variable prepended, then: |
657 |
pretend it has the value of the \t{ED} variable in offset-prefix aware |
|
|
658 |
EAPIs or the \t{D} variable in offset-prefix agnostic EAPIs prepended, |
659 |
then: |
628 |
|
660 |
|
629 |
\begin{compactitem} |
661 |
\begin{compactitem} |
630 |
\item If it is a directory, act as if every file or directory immediately under this directory |
662 |
\item If it is a directory, act as if every file or directory immediately under this directory |
Lines 753-761
has returned.
Link Here
|
753 |
|
785 |
|
754 |
\begin{description} |
786 |
\begin{description} |
755 |
\item[dosed] Takes any number of arguments, which can be files or \t{sed} expressions. For each |
787 |
\item[dosed] Takes any number of arguments, which can be files or \t{sed} expressions. For each |
756 |
argument, if it names, relative to \t{D} a file which exists, then \t{sed} is run with the |
788 |
argument, if it names, relative to \t{ED} (offset-prefix aware |
|
|
789 |
EAPIs) or \t{D} (offset-prefix agnostic EAPIs) a file which exists, |
790 |
then \t{sed} is run with the |
757 |
current expression on that file. Otherwise, the current expression is set to the text of the |
791 |
current expression on that file. Otherwise, the current expression is set to the text of the |
758 |
argument. The initial value of the expression is \t{s:\$\{D\}::g}. In EAPIs listed in |
792 |
argument. The initial value of the expression is \t{s:\$\{ED\}::g} |
|
|
793 |
in offset-prefix aware EAPIs and \t{s:\$\{D\}::g} in offset-prefix |
794 |
agnostic EAPIs. In EAPIs listed in |
759 |
table~\ref{tab:banned-commands-table}, this command is banned as per |
795 |
table~\ref{tab:banned-commands-table}, this command is banned as per |
760 |
section~\ref{sec:banned-commands}. Failure behaviour is EAPI dependent as per |
796 |
section~\ref{sec:banned-commands}. Failure behaviour is EAPI dependent as per |
761 |
section~\ref{sec:failure-behaviour}. |
797 |
section~\ref{sec:failure-behaviour}. |
Lines 787-793
has returned.
Link Here
|
787 |
\item rar files (\t{*.rar, *.RAR}). Ebuilds must ensure that RARLAB's unrar is installed. |
823 |
\item rar files (\t{*.rar, *.RAR}). Ebuilds must ensure that RARLAB's unrar is installed. |
788 |
\item LHA archives (\t{*.LHA, *.LHa, *.lha, *.lhz}). Ebuilds must ensure that the lha program is |
824 |
\item LHA archives (\t{*.LHA, *.LHa, *.lha, *.lhz}). Ebuilds must ensure that the lha program is |
789 |
installed. |
825 |
installed. |
790 |
\item ar archives (\t{*.a, *.deb}). Ebuilds must ensure that GNU binutils is installed. |
826 |
\item ar archives (\t{*.a}). Ebuilds must ensure that GNU binutils is installed. |
|
|
827 |
\item deb packages (\t{*.deb}). Ebuilds must ensure that the |
828 |
deb2targz program is installed on those platforms where GNU binutils |
829 |
ar program is not available and the installed ar program is |
830 |
incompatible with GNU archives. Otherwise, ebuilds must ensure that |
831 |
GNU binutils is installed. |
791 |
\item lzma-compressed files (\t{*.lzma}). Ebuilds must ensure that LZMA Utils is installed. |
832 |
\item lzma-compressed files (\t{*.lzma}). Ebuilds must ensure that LZMA Utils is installed. |
792 |
\item lzma-compressed tar files (\t{*.tar.lzma}). Ebuilds must ensure that LZMA Utils and |
833 |
\item lzma-compressed tar files (\t{*.tar.lzma}). Ebuilds must ensure that LZMA Utils and |
793 |
GNU tar are installed. |
834 |
GNU tar are installed. |