diff --git a/eapi-cheatsheet.tex b/eapi-cheatsheet.tex index 6dfc0b9..824800d 100644 --- a/eapi-cheatsheet.tex +++ b/eapi-cheatsheet.tex @@ -2,8 +2,8 @@ \input{vc} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} +\usepackage[obeyspaces]{url} \usepackage{ - url, xr-hyper, hyperref, listings, @@ -13,11 +13,11 @@ } \usepackage[orig,english]{isodate} \usepackage[scaled=.90]{helvet} -\newcommand{\code}[1]{\texttt{#1}} % This should reflect the latest approved EAPI version \newcommand{\version}{4.0} \newcommand{\featureref}[1]{\textsc{#1} on page~\pageref{feat:#1}} \renewcommand{\familydefault}{\sfdefault} +\DeclareUrlCommand{\code}{\urlstyle{tt}} \urlstyle{sf} \externaldocument{pms} @@ -84,21 +84,22 @@ nonetheless. not disabled explicitly by user configuration) with a \code{+} sign in front. See \featureref{iuse-defaults}. \item[Named slot dependencies] Dependencies can explicitly request - a specific slot by using the \code{dev-libs/foo:\emph{SLOT\_name}} - syntax. See \featureref{slot-deps}. + a specific slot by using the + \code{dev-libs/foo:}\emph{\texttt{SLOT\_name}} syntax. See + \featureref{slot-deps}. \end{description} \section{EAPI 2 (2008-09-25)} \label{sec:cs:eapi2} \subsection{Additions/Changes} \label{sec:cs:eapi2-additions} \begin{description} - \item[\code{SRC\_URI} arrows] Allows redirection of upstream file - naming scheme. By using \code{SRC\_URI="http://some/url -> foo"} + \item[\code{SRC_URI} arrows] Allows redirection of upstream file + naming scheme. By using \code{SRC_URI="http://some/url -> foo"} the file is saved as \code{foo} in DISTDIR. See \featureref{src-uri-arrows}. \item[USE dependencies] Dependencies can specify USE flag requirements on their target, removing the need for - \code{built\_with\_use} checks. A more powerful syntax that does + \code{built_with_use} checks. A more powerful syntax that does not require the flag to be in IUSE is in EAPI 4. \begin{description} \item[{[opt]}] The flag must be enabled. @@ -119,20 +120,20 @@ nonetheless. be ignored by the package manager as long as the stated package is uninstalled later on. Two exclamation marks are a strong blocker and will always be respected. See \featureref{bang-strength}. - \item[\code{src\_configure, src\_prepare}] Both new phases provide + \item[\code{src_configure, src_prepare}] Both new phases provide finer granularity in the ebuild's structure. Configure calls - should be moved from \code{src\_compile} to \code{src\_configure}. + should be moved from \code{src_compile} to \code{src_configure}. Patching and similar preparation must now be done in - \code{src\_prepare}, not \code{src\_unpack}. See + \code{src_prepare}, not \code{src_unpack}. See \featureref{src-prepare} and \featureref{src-configure}. \item[Default phase functions] The default functions for the - phases \code{pkg\_nofetch}, \code{src\_unpack}, - \code{src\_prepare}, \code{src\_configure}, \code{src\_compile} - and \code{src\_test} can be called via - \code{default\_\emph{phasename}}, so duplicating the standard + phases \code{pkg_nofetch}, \code{src_unpack}, + \code{src_prepare}, \code{src_configure}, \code{src_compile} + and \code{src_test} can be called via + \code{default_}\emph{\texttt{phasename}}, so duplicating the standard implementation is no longer necessary for small additions. The short-hand \code{default} function calls the current phase's - \code{default\_} function automatically, so any small additions + \code{default_} function automatically, so any small additions you need will not be accompanied by a complete reimplementation of the phase. See \featureref{default-phase-funcs} and \featureref{default-func}. @@ -150,83 +151,80 @@ nonetheless. \begin{description} \item[Support for \code{.xz}] Unpack of \code{.xz} and \code{.tar.xz} files is possible without any custom - \code{src\_unpack} functions. See \featureref{unpack-extensions}. + \code{src_unpack} functions. See \featureref{unpack-extensions}. \item[Offset prefix] Supporting installation on Prefix-enabled systems\footnote{\url{http://prefix.gentoo.org/}} will be easier with this EAPI. \end{description} - -\section{EAPI 4 (2010-12-30)} +\section{EAPI 4 (not yet approved)} \label{sec:cs:eapi4} \subsection{Additions/Changes} \label{sec:cs:eapi4-additions} \begin{description} - \item[\code{pkg\_pretend}] Some useful checks (kernel options for + \item[\code{pkg_pretend}] Some useful checks (kernel options for example) can be placed in this new phase to inform the user early (when just pretending to emerge the package). Most checks should - usually be repeated in \code{pkg\_setup}. - See \featureref{pkg-pretend}. - \item[\code{src\_install}] The \code{src\_install} phase is no + usually be repeated in \code{pkg_setup}. See + \featureref{pkg-pretend}. + \item[\code{src_install}] The \code{src_install} phase is no longer empty but has a default now. This comes along with an - accompanying \code{default} function. - See \featureref{src-install-4}. - \item[\code{pkg\_info} on non-installed packages] The - \code{pkg\_info} phase can be called even for non-installed + accompanying \code{default} function. See + \featureref{src-install-4}. + \item[\code{pkg_info} on non-installed packages] The + \code{pkg_info} phase can be called even for non-installed packages. Be warned that dependencies might not have been installed at execution time. See \featureref{pkg-info}. \item[\code{econf} changes] The helper function now always - activates \code{--disable-dependency-tracking}. - See \featureref{econf-options}. + activates \code{--disable-dependency-tracking}. See + \featureref{econf-options}. \item[USE dependency defaults] In addition to the features offered in EAPI 2 for USE dependencies, a \code{(+)} or \code{(-)} can be added after a USE flag (mind the parentheses). The former specifies that flags not in IUSE should be treated as enabled; the latter, disabled. Cannot be used with USE\_EXPAND flags. This - mimics parts of the behaviour of \code{-{}-missing} in - \code{built\_with\_use}. See \featureref{use-dep-defaults}. + mimics parts of the behaviour of \code{--missing} in + \code{built_with_use}. See \featureref{use-dep-defaults}. \item[Controllable compression] All items in the \code{doc}, \code{info}, \code{man} subdirectories of \code{/usr/share/} may - be compressed on-disk after \code{src\_install}, except for - \code{/usr/share/doc/\$\{PF\}/html}. \code{docompress path \dots} + be compressed on-disk after \code{src_install}, except for + \code{/usr/share/doc/${PF}/html}. \code{docompress path ...} adds paths to the inclusion list for compression. - \code{docompress -x path \dots} adds paths to the exclusion list. + \code{docompress -x path ...} adds paths to the exclusion list. \featureref{controllable-compress}. \item[\code{dodoc} recursion] If the \code{-r} switch is given as first argument and followed by directories, files from there are installed recursively. See \featureref{dodoc}. \item[\code{doins} symlink support] Symbolic links are now - properly installed when using recursion (\code{-r} switch). - See \featureref{doins}. + properly installed when using recursion (\code{-r} switch). See + \featureref{doins}. \item[\code{nonfatal} for commands] If you call \code{nonfatal} the command given as argument will not abort the build process in case of a failure (as is the default) but will return non-zero on - failure rather than aborting the build. - See \featureref{nonfatal}. + failure rather than aborting the build. See + \featureref{nonfatal}. \item[\code{PROPERTIES}] Is mandatory for all package managers now to support interactive installs. - \item[\code{REPLACING\_VERSIONS} and \code{REPLACED\_BY\_VERSION}] + \item[\code{REPLACING_VERSIONS} and \code{REPLACED_BY_VERSION}] For corner cases in upgrade paths those variables can be defined - in \code{pkg\_*} functions to define a package version that is - replaced by or is the replacement for the current one. - See \featureref{replace-version-vars}. - \item[\code{MERGE\_TYPE}] This variable contains one of three + in \code{pkg_*} functions to define a package version that is + replaced by or is the replacement for the current one. See + \featureref{replace-version-vars}. + \item[\code{MERGE_TYPE}] This variable contains one of three possible values to allow checks if it is normal merge with compilation and installation (\code{source}), installation of a binary package (\code{binary}), or a compilation without installation (\code{buildonly}). See \featureref{merge-type}. - \item[\code{REQUIRED\_USE}] This variable can be used similar to + \item[\code{REQUIRED_USE}] This variable can be used similar to the \code{(R|P)DEPEND} variables and define sets of USE flag combinations that are not allowed. All elements can be further nested to achieve more functionality. \begin{description} \item[Forbidden combination] To prevent activation of - \code{flag1} if \code{flag2} is enabled use - "\code{flag2? ( !flag1 )}". + \code{flag1} if \code{flag2} is enabled use "\code{flag2? ( !flag1 )}". \item[OR] If at least one USE flag out of many must be - activated on \code{flag1} use - "\code{flag1? || ( flag2 flag3 \dots )}". + activated on \code{flag1} use "\code{flag1? || ( flag2 flag3 ... )}". \item[XOR] To allow exactly one USE flag out of many use - "\code{^^ ( flag1 flag2 \dots )}". + "\code{^^ ( flag1 flag2 ... )}". \end{description} See \featureref{required-use}. \end{description} @@ -234,16 +232,16 @@ nonetheless. \label{sec:cs:eapi4-removalsbans} \begin{description} \item[\code{dohard}, \code{dosed}] Both functions are not allowed - any more. See \featureref{banned-commands}. - \item[No \code{RDEPEND} fall-back] The package manager will not - fall back to \code{RDEPEND=DEPEND} if \code{RDEPEND} is undefined. - See \featureref{rdepend-depend}. + anymore. See \featureref{banned-commands}. + \item[No \code{RDEPEND} fall-back] The package manager will not fall back + to \code{RDEPEND=DEPEND} if \code{RDEPEND} is undefined. See + \featureref{rdepend-depend}. \item[\code{S} fallback changes] The value of the variable \code{S} will not automatically be changed to \code{WORKDIR}, if - \code{S} is not a directory, but abort. Virtual packages are the - only exception. See \featureref{s-workdir-fallback}. - \item[\code{AA}, \code{KV}] These variables are not defined - any more. See \featureref{aa} and \featureref{kv}. + \code{S} is not a directory, but abort. Virtual packages are the only + exception. See \featureref{s-workdir-fallback}. + \item[\code{KV}, \code{AA}] These variables are not defined + anymore, see \featureref{kv} and \featureref{aa}. \end{description} \end{document}