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 for which support was added |
223 |
in EAPI 3. When no offset-prefix installation is in effect, |
224 |
\t{EPREFIX} becomes the empty string, making the behaviour of econf |
225 |
equal to EAPIs prior to EAPI 3 and later. |
226 |
|
220 |
\t{econf} must be implemented internally---that is, as a bash function and not an external |
227 |
\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 |
228 |
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. |
229 |
\t{nonfatal}, in which case it must return non-zero exit status. |
Lines 224-230
has returned.
Link Here
|
224 |
\begin{algorithm} |
231 |
\begin{algorithm} |
225 |
\caption{econf -{}-libdir logic} \label{alg:econf-libdir} |
232 |
\caption{econf -{}-libdir logic} \label{alg:econf-libdir} |
226 |
\begin{algorithmic}[1] |
233 |
\begin{algorithmic}[1] |
227 |
\STATE let prefix=/usr |
234 |
\STATE let prefix=\$EPREFIX/usr |
228 |
\IF{the caller specified -{}-prefix=\$p} |
235 |
\IF{the caller specified -{}-prefix=\$p} |
229 |
\STATE let prefix=\$p |
236 |
\STATE let prefix=\$p |
230 |
\ENDIF |
237 |
\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 |
258 |
to \t{einstall} are passed verbatim to \t{emake}, as shown. Failure behaviour is EAPI dependent |
252 |
as per section~\ref{sec:failure-behaviour}. |
259 |
as per section~\ref{sec:failure-behaviour}. |
253 |
|
260 |
|
|
|
261 |
The variable \t{ED} is defined as in Table~\ref{tab:defined_vars} |
262 |
and depends on the use of an offset-prefix. When such offset-prefix |
263 |
is absent, \t{ED} is equivalent to \t{D}. \t{ED} was introduced in |
264 |
EAPI 3 and is available in later EAPIs, hence in prior EAPIs, \t{D} |
265 |
should be used instead of \t{ED} in the command given in |
266 |
Listing~\ref{lst:einstall}. |
254 |
\begin{listing}[H] |
267 |
\begin{listing}[H] |
255 |
\caption{einstall command}\label{lst:einstall} |
268 |
\caption{einstall command}\label{lst:einstall} |
256 |
\begin{verbatim} |
269 |
\begin{verbatim} |
257 |
emake \ |
270 |
emake \ |
258 |
prefix="${D}"/usr \ |
271 |
prefix="${ED}"/usr \ |
259 |
mandir="${D}"/usr/share/man \ |
272 |
mandir="${ED}"/usr/share/man \ |
260 |
infodir="${D}"/usr/share/info \ |
273 |
infodir="${ED}"/usr/share/info \ |
261 |
libdir="${D}"/usr/$(get_libdir) \ |
274 |
libdir="${ED}"/usr/$(get_libdir) \ |
262 |
"$@" \ |
275 |
"$@" \ |
263 |
install |
276 |
install |
264 |
\end{verbatim} |
277 |
\end{verbatim} |
Lines 269-275
emake \
Link Here
|
269 |
\subsubsection{Installation commands} |
282 |
\subsubsection{Installation commands} |
270 |
These commands are used to install files into the staging area, in cases where the package's \t{make |
283 |
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, |
284 |
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 |
285 |
all filenames created or modified are relative to the staging directory, |
|
|
286 |
given by \t{ED} for EAPI 3 and later, and \t{D} for EAPIs prior to EAPI 3. These |
273 |
commands must all be external programs and not bash functions or aliases---that is, they must be |
287 |
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 |
288 |
callable from \t{xargs}. Ebuilds must not run any of these commands once the current phase function |
275 |
has returned. |
289 |
has returned. |
Lines 278-283
has returned.
Link Here
|
278 |
\item[dobin] Installs the given files into \t{DESTTREE/bin}, where \t{DESTTREE} defaults to |
292 |
\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 |
293 |
\t{/usr}. Gives the files mode \t{0755} and ownership \t{root:root}. Failure behaviour is EAPI |
280 |
dependent as per section~\ref{sec:failure-behaviour}. |
294 |
dependent as per section~\ref{sec:failure-behaviour}. |
|
|
295 |
% todo: Portage does not behave like this, and Prefix relies on that |
296 |
% root:root -> 0:0 (for systems where root name/group are different) |
297 |
% PORTAGE_INST_UID:PORTAGE_INST_GID <- Prefix sets that to user ids |
281 |
|
298 |
|
282 |
\item[doconfd] Installs the given config files into \t{/etc/conf.d/}, by default with file mode |
299 |
\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. |
300 |
\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. |
340 |
\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 |
341 |
\item{\t{-x}} --- list of directories that files will not be installed from (only used in |
325 |
conjunction with \t{-r}). |
342 |
conjunction with \t{-r}). |
326 |
\item{\t{-p}} --- sets a document prefix for installed files. |
343 |
\item{\t{-p}} --- sets a document prefix for installed files, not to |
|
|
344 |
be confused with the global offset-prefix. |
327 |
\end{description} |
345 |
\end{description} |
328 |
|
346 |
|
329 |
Failure behaviour is EAPI dependent as per section~\ref{sec:failure-behaviour}. |
347 |
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 |
} |
587 |
} |
570 |
|
588 |
|
571 |
\subsubsection{Commands affecting install destinations} |
589 |
\subsubsection{Commands affecting install destinations} |
572 |
The following commands are used to set the various destination trees, all relative to \t{\$\{D\}}, |
590 |
The following commands are used to set the various destination trees, |
|
|
591 |
all relative to \t{\$\{ED\}} onward from EAPI 3 and relative to |
592 |
\t{\$\{D\}} in prior EAPIs, |
573 |
used by the above installation commands. They must be shell functions or aliases, due to the need to |
593 |
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 |
594 |
set variables read by the above commands. Ebuilds must not run any of these commands once the |
575 |
current phase function has returned. |
595 |
current phase function has returned. |
Lines 577-583
current phase function has returned.
Link Here
|
577 |
\begin{description} |
597 |
\begin{description} |
578 |
|
598 |
|
579 |
\item[into] Sets the value of \t{DESTTREE} for future invocations of the above utilities. Creates |
599 |
\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 |
600 |
the directory under \t{\$\{ED\}} in EAPI 3 and later or \t{\$\{D\}} for prior |
|
|
601 |
EAPIs, using \t{install -d} with no additional options, if it does not |
581 |
already exist. Failure behaviour is EAPI dependent as per section~\ref{sec:failure-behaviour}. |
602 |
already exist. Failure behaviour is EAPI dependent as per section~\ref{sec:failure-behaviour}. |
582 |
|
603 |
|
583 |
\item[insinto] Sets the value of \t{INSDESTTREE} for future invocations of the above utilities. May |
604 |
\item[insinto] Sets the value of \t{INSDESTTREE} for future invocations of the above utilities. May |
Lines 603-609
already exist. Failure behaviour is EAPI dependent as per section~\ref{sec:failu
Link Here
|
603 |
|
624 |
|
604 |
\featurelabel{controllable-compress} In EAPIs listed in table~\ref{tab:compression-table} as |
625 |
\featurelabel{controllable-compress} In EAPIs listed in table~\ref{tab:compression-table} as |
605 |
supporting controllable compression, the package manager may optionally compress a subset of the |
626 |
supporting controllable compression, the package manager may optionally compress a subset of the |
606 |
files under the \t{D} directory. To control which directories may or may not be compressed, the |
627 |
files under the \t{ED} onward from EAPI 3 and \t{D} for prior EAPIs directory. To control which directories may or may not be compressed, the |
607 |
package manager shall maintain two lists: |
628 |
package manager shall maintain two lists: |
608 |
|
629 |
|
609 |
\begin{compactitem} |
630 |
\begin{compactitem} |
Lines 614-620
package manager shall maintain two lists:
Link Here
|
614 |
|
635 |
|
615 |
The optional compression shall be carried out after \t{src\_install} has completed, and before the |
636 |
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 |
637 |
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: |
638 |
value of the \t{ED} variable in EAPI 3 and later or the \t{D} variable in prior |
|
|
639 |
EAPIs prepended, then: |
618 |
|
640 |
|
619 |
\begin{compactitem} |
641 |
\begin{compactitem} |
620 |
\item If it is a directory, act as if every file or directory immediately under this directory |
642 |
\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} |
646 |
\end{compactitem} |
625 |
|
647 |
|
626 |
Whether an item is to be excluded is determined as follows: For each item in the exclusion list, |
648 |
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: |
649 |
pretend it has the value of the \t{ED} variable in EAPI 3 and later or the \t{D} |
|
|
650 |
variable in prior EAPIs prepended, then: |
628 |
|
651 |
|
629 |
\begin{compactitem} |
652 |
\begin{compactitem} |
630 |
\item If it is a directory, act as if every file or directory immediately under this directory |
653 |
\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 |
|
776 |
|
754 |
\begin{description} |
777 |
\begin{description} |
755 |
\item[dosed] Takes any number of arguments, which can be files or \t{sed} expressions. For each |
778 |
\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 |
779 |
argument, if it names, relative to \t{ED} (EAPI 3 and later) or \t{D} (EAPIs |
|
|
780 |
prior to 3) a file which exists, then \t{sed} is run with the |
757 |
current expression on that file. Otherwise, the current expression is set to the text of the |
781 |
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 |
782 |
argument. The initial value of the expression is \t{s:\$\{ED\}::g} |
|
|
783 |
in EAPI 3 and \t{s:\$\{D\}::g} in prior EAPIs. In EAPIs listed in |
759 |
table~\ref{tab:banned-commands-table}, this command is banned as per |
784 |
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 |
785 |
section~\ref{sec:banned-commands}. Failure behaviour is EAPI dependent as per |
761 |
section~\ref{sec:failure-behaviour}. |
786 |
section~\ref{sec:failure-behaviour}. |
Lines 788-793
has returned.
Link Here
|
788 |
\item LHA archives (\t{*.LHA, *.LHa, *.lha, *.lhz}). Ebuilds must ensure that the lha program is |
813 |
\item LHA archives (\t{*.LHA, *.LHa, *.lha, *.lhz}). Ebuilds must ensure that the lha program is |
789 |
installed. |
814 |
installed. |
790 |
\item ar archives (\t{*.a, *.deb}). Ebuilds must ensure that GNU binutils is installed. |
815 |
\item ar archives (\t{*.a, *.deb}). Ebuilds must ensure that GNU binutils is installed. |
|
|
816 |
% todo: Portage's implementation is different and required for Prefix |
817 |
% these files are unpacked with deb2targz if available, else it |
818 |
% falls back to "ar", which cannot be required to be GNU binutils |
791 |
\item lzma-compressed files (\t{*.lzma}). Ebuilds must ensure that LZMA Utils is installed. |
819 |
\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 |
820 |
\item lzma-compressed tar files (\t{*.tar.lzma}). Ebuilds must ensure that LZMA Utils and |
793 |
GNU tar are installed. |
821 |
GNU tar are installed. |