diff options
author | Ulrich Müller <ulm@gentoo.org> | 2017-05-13 11:34:44 +0200 |
---|---|---|
committer | Ulrich Müller <ulm@gentoo.org> | 2017-05-15 23:01:42 +0200 |
commit | 40612826e416cd4cd96d2dbdae7904ed4ee25833 (patch) | |
tree | ac2b0895a09685aeec89820f1848558334ded329 /eclasses.tex | |
parent | Require underscore.sty package. (diff) | |
download | pms-40612826e416cd4cd96d2dbdae7904ed4ee25833.tar.gz pms-40612826e416cd4cd96d2dbdae7904ed4ee25833.tar.bz2 pms-40612826e416cd4cd96d2dbdae7904ed4ee25833.zip |
Use simple underscores throughout.
Replacement was done using "sed -i 's/\\_/_/g' *.tex".
This does not change the resulting PDF and HTML output.
Diffstat (limited to 'eclasses.tex')
-rw-r--r-- | eclasses.tex | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/eclasses.tex b/eclasses.tex index 7569caf..49c6c4e 100644 --- a/eclasses.tex +++ b/eclasses.tex @@ -9,7 +9,7 @@ hold. Eclasses must be located in the \t{eclass} directory in the top level of the repository---see section~\ref{sec:eclass-dir}. Each eclass is a single file named \t{<name>.eclass}, where \t{<name>} is -the name of this eclass, used by \t{inherit} and \t{EXPORT\_FUNCTIONS} among other places. +the name of this eclass, used by \t{inherit} and \t{EXPORT_FUNCTIONS} among other places. \section{The inherit Command} \label{sec:inherit} @@ -34,22 +34,22 @@ The \t{inherit} command must also ensure that: \section{Eclass-defined Metadata Keys} -The \t{IUSE}, \t{REQUIRED\_USE}, \t{DEPEND}, \t{RDEPEND} and \t{PDEPEND} variables are handled +The \t{IUSE}, \t{REQUIRED_USE}, \t{DEPEND}, \t{RDEPEND} and \t{PDEPEND} variables are handled specially when set by an eclass. They must be accumulated across eclasses, appending the value set by each eclass to the resulting value after the previous one is loaded. Then the eclass-defined value is appended to that defined by the ebuild. In the case of \t{RDEPEND}, this is done after the implicit \t{RDEPEND} rules in section~\ref{sec:rdepend-depend} are applied. -\section{EXPORT\_FUNCTIONS} +\section{EXPORT_FUNCTIONS} There is one command available in the eclass environment that is neither available nor meaningful -in ebuilds---\t{EXPORT\_FUNCTIONS}\@. This can be used to alias ebuild phase functions from the +in ebuilds---\t{EXPORT_FUNCTIONS}\@. This can be used to alias ebuild phase functions from the eclass so that an ebuild inherits a default definition whilst retaining the ability to override and call the eclass-defined version from it. The use of it is best illustrated by an example; this is given in listing~\ref{lst:export-functions} and is a snippet from a hypothetical \t{foo.eclass}. \begin{listing} -\caption{\t{EXPORT\_FUNCTIONS} example: \t{foo.eclass}} \label{lst:export-functions} +\caption{\t{EXPORT_FUNCTIONS} example: \t{foo.eclass}} \label{lst:export-functions} \begin{verbatim} foo_src_compile() { @@ -63,13 +63,13 @@ EXPORT_FUNCTIONS src_compile \end{verbatim} \end{listing} -This example defines an eclass \t{src\_compile} function and uses \t{EXPORT\_FUNCTIONS} to alias -it. Then any ebuild that inherits \t{foo.eclass} will have a default \t{src\_compile} defined, but +This example defines an eclass \t{src_compile} function and uses \t{EXPORT_FUNCTIONS} to alias +it. Then any ebuild that inherits \t{foo.eclass} will have a default \t{src_compile} defined, but should the author wish to override it he can access the function in \t{foo.eclass} by calling -\t{foo\_src\_compile}. +\t{foo_src_compile}. -\t{EXPORT\_FUNCTIONS} must only be used on ebuild phase functions. The function that is aliased -must be named \t{eclassname\_phasefunctionname}, where \t{eclassname} is the name of the eclass. +\t{EXPORT_FUNCTIONS} must only be used on ebuild phase functions. The function that is aliased +must be named \t{eclassname_phasefunctionname}, where \t{eclassname} is the name of the eclass. % vim: set filetype=tex fileencoding=utf8 et tw=100 spell spelllang=en : |