From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 94E341382C5 for ; Mon, 24 May 2021 10:35:29 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3631DE084E; Mon, 24 May 2021 10:35:28 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 07384E0848 for ; Mon, 24 May 2021 10:35:28 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id D0BA0340C80 for ; Mon, 24 May 2021 10:35:26 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E26E179F for ; Mon, 24 May 2021 10:35:23 +0000 (UTC) From: "Ulrich Müller" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Ulrich Müller" Message-ID: <1621848289.7ab6f4ddfcea6170da764e5d2bca30001f42564a.ulm@gentoo> Subject: [gentoo-commits] proj/pms:eapi-8 commit in: / X-VCS-Repository: proj/pms X-VCS-Files: eapi-differences.tex ebuild-functions.tex X-VCS-Directories: / X-VCS-Committer: ulm X-VCS-Committer-Name: Ulrich Müller X-VCS-Revision: 7ab6f4ddfcea6170da764e5d2bca30001f42564a X-VCS-Branch: eapi-8 Date: Mon, 24 May 2021 10:35:23 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 3d107a8c-8723-4ad6-bb4b-949ed3034ca2 X-Archives-Hash: f21486442a527f63bc44f26c499a5b0e commit: 7ab6f4ddfcea6170da764e5d2bca30001f42564a Author: Ulrich Müller gentoo org> AuthorDate: Sun May 23 14:37:05 2021 +0000 Commit: Ulrich Müller gentoo org> CommitDate: Mon May 24 09:24:49 2021 +0000 URL: https://gitweb.gentoo.org/proj/pms.git/commit/?id=7ab6f4dd Rearrange listings of phase functions Signed-off-by: Ulrich Müller gentoo.org> eapi-differences.tex | 10 ++-- ebuild-functions.tex | 164 ++++++++++++++++++++++++--------------------------- 2 files changed, 82 insertions(+), 92 deletions(-) diff --git a/eapi-differences.tex b/eapi-differences.tex index 2c1073a..1174052 100644 --- a/eapi-differences.tex +++ b/eapi-differences.tex @@ -349,7 +349,7 @@ EAPI 1 is EAPI 0 with the following changes: \begin{compactitem} \item \t{IUSE} defaults, \featureref{iuse-defaults}. \item Slot dependencies, \featureref{slot-deps}. -\item Different \t{src_compile} implementation, \featureref{src-compile-1}. +\item Different \t{src_compile} implementation, \featureref{src-compile}. \end{compactitem} \section{EAPI 2} @@ -362,7 +362,7 @@ EAPI 2 is EAPI 1 with the following changes: \item \t{!}\ and \t{!!}\ blockers, \featureref{bang-strength}. \item \t{src_prepare}, \featureref{src-prepare}. \item \t{src_configure}, \featureref{src-configure}. -\item Different \t{src_compile} implementation, \featureref{src-compile-2}. +\item Different \t{src_compile} implementation, \featureref{src-compile}. \item \t{default_} phase functions for phases \t{pkg_nofetch}, \t{src_unpack}, \t{src_prepare}, \t{src_configure}, \t{src_compile} and \t{src_test}; \featureref{default-phase-funcs}. \item \t{doman} language detection by filename, \featureref{doman-langs}. @@ -391,7 +391,7 @@ EAPI 4 is EAPI 3 with the following changes: \item Use dependency defaults, \featureref{use-dep-defaults}. \item \t{S} to \t{WORKDIR} fallback restricted, \featureref{s-workdir-fallback}. \item \t{pkg_pretend}, \featureref{pkg-pretend}. -\item Default \t{src_install} no longer a no-op, \featureref{src-install-4}. +\item Default \t{src_install} no longer a no-op, \featureref{src-install}. \item \t{pkg_info} can run on non-installed packages, \featureref{pkg-info}. \item \t{AA} is gone, \featureref{aa}. \item \t{KV} is gone, \featureref{kv}. @@ -436,8 +436,8 @@ EAPI 6 is EAPI 5 with the following changes: \begin{compactitem} \item Bash version is 4.2, \featureref{bash-version}. \item \t{failglob} is enabled in global scope, \featureref{failglob}. -\item Default \t{src_prepare} no longer a no-op, \featureref{src-prepare-6}. -\item Different \t{src_install} implementation, \featureref{src-install-6}. +\item Default \t{src_prepare} no longer a no-op, \featureref{src-prepare}. +\item Different \t{src_install} implementation, \featureref{src-install}. \item \t{LC_CTYPE} and \t{LC_COLLATE} compatible with POSIX locale, \featureref{locale-settings}. \item \t{einstall} banned, \featureref{banned-commands}. \item \t{die} and \t{assert} called with \t{-n} respect \t{nonfatal}, \featureref{nonfatal-die}. diff --git a/ebuild-functions.tex b/ebuild-functions.tex index 44b8b43..1bfa957 100644 --- a/ebuild-functions.tex +++ b/ebuild-functions.tex @@ -120,10 +120,10 @@ The \t{src_unpack} function extracts all of the package's sources. In EAPIs lack \t{src_prepare}, it may also apply patches and set up the package's build system for further use. The initial working directory must be \t{WORKDIR}, and the default implementation used when -the ebuild lacks the \t{src_unpack} function shall behave as: +the ebuild lacks the \t{src_unpack} function shall behave as in listing~\ref{lst:src-unpack-0}. \begin{listing}[H] -\caption{\t{src_unpack}} +\caption{\t{src_unpack}} \label{lst:src-unpack-0} \begin{verbatim} src_unpack() { if [[ -n ${A} ]]; then @@ -142,23 +142,9 @@ post-unpack source preparation. The initial working directory is \t{S}, with an error or fallback to \t{WORKDIR} as discussed in section~\ref{sec:s-to-workdir-fallback}. -\featurelabel{src-prepare-6} For EAPIs listed in table~\ref{tab:src-prepare-table} as using format -6, the default implementation used when the ebuild lacks the \t{src_prepare} function shall behave -as: - -\begin{listing}[H] -\caption{\t{src_prepare}, format~6} -\begin{verbatim} -src_prepare() { - if [[ $(declare -p PATCHES 2>/dev/null) == "declare -a"* ]]; then - [[ -n ${PATCHES[@]} ]] && eapply "${PATCHES[@]}" - else - [[ -n ${PATCHES} ]] && eapply ${PATCHES} - fi - eapply_user -} -\end{verbatim} -\end{listing} +For EAPIs listed in table~\ref{tab:src-prepare-table} as using format~6, the default +implementation used when the ebuild lacks the \t{src_prepare} function shall behave as in +listing~\ref{lst:src-prepare-6}. For other EAPIs supporting \t{src_prepare}, the default implementation used when the ebuild lacks the \t{src_prepare} function is a no-op. @@ -179,6 +165,20 @@ the \t{src_prepare} function is a no-op. \end{tabular} \end{centertable} +\begin{listing}[H] +\caption{\t{src_prepare}, format~6} \label{lst:src-prepare-6} +\begin{verbatim} +src_prepare() { + if [[ $(declare -p PATCHES 2>/dev/null) == "declare -a"* ]]; then + [[ -n ${PATCHES[@]} ]] && eapply "${PATCHES[@]}" + else + [[ -n ${PATCHES} ]] && eapply ${PATCHES} + fi + eapply_user +} +\end{verbatim} +\end{listing} + \subsection{src_configure} \featurelabel{src-configure} The \t{src_configure} function is only called for EAPIs listed in @@ -188,18 +188,8 @@ The initial working directory is \t{S}, with an error or fallback to \t{WORKDIR} section~\ref{sec:s-to-workdir-fallback}. The \t{src_configure} function configures the package's build environment. The default -implementation used when the ebuild lacks the \t{src_configure} function shall behave as: - -\begin{listing}[H] -\caption{\t{src_configure}} -\begin{verbatim} -src_configure() { - if [[ -x ${ECONF_SOURCE:-.}/configure ]]; then - econf - fi -} -\end{verbatim} -\end{listing} +implementation used when the ebuild lacks the \t{src_configure} function shall behave as in +listing~\ref{lst:src-configure-2}. \ChangeWhenAddingAnEAPI{8} \begin{centertable}{EAPIs supporting \t{src_configure}} @@ -215,6 +205,17 @@ src_configure() { \end{tabular} \end{centertable} +\begin{listing}[H] +\caption{\t{src_configure}} \label{lst:src-configure-2} +\begin{verbatim} +src_configure() { + if [[ -x ${ECONF_SOURCE:-.}/configure ]]; then + econf + fi +} +\end{verbatim} +\end{listing} + \subsection{src_compile} \featurelabel{src-compile} The \t{src_compile} function configures the package's build environment @@ -223,12 +224,28 @@ in EAPIs lacking \t{src_configure}, and builds the package in all EAPIs. The initial working directory is \t{S}, with an error or fallback to \t{WORKDIR} as discussed in section~\ref{sec:s-to-workdir-fallback}. -\featurelabel{src-compile-0} For EAPIs listed in table~\ref{tab:src-compile-table} as using format -0, the default implementation used when the ebuild lacks the \t{src_compile} function shall behave -as: +For EAPIs listed in table~\ref{tab:src-compile-table} as using format 0, 1 or~2, the default +implementation used when the ebuild lacks the \t{src_prepare} function shall behave as in +listing~\ref{lst:src-compile-0}, listing~\ref{lst:src-compile-1} or listing~\ref{lst:src-compile-2}, +respectively. + +\ChangeWhenAddingAnEAPI{8} +\begin{centertable}{\t{src_compile} behaviour for EAPIs} + \label{tab:src-compile-table} + \begin{tabular}{ll} + \toprule + \multicolumn{1}{c}{\textbf{EAPI}} & + \multicolumn{1}{c}{\textbf{Format}} \\ + \midrule + 0 & 0 \\ + 1 & 1 \\ + 2, 3, 4, 5, 6, 7, 8 & 2 \\ + \bottomrule + \end{tabular} +\end{centertable} \begin{listing}[H] -\caption{\t{src_compile}, format~0} +\caption{\t{src_compile}, format~0} \label{lst:src-compile-0} \begin{verbatim} src_compile() { if [[ -x ./configure ]]; then @@ -241,12 +258,8 @@ src_compile() { \end{verbatim} \end{listing} -\featurelabel{src-compile-1} For EAPIs listed in table~\ref{tab:src-compile-table} as using format -1, the default implementation used when the ebuild lacks the \t{src_compile} function shall behave -as: - \begin{listing}[H] -\caption{\t{src_compile}, format~1} +\caption{\t{src_compile}, format~1} \label{lst:src-compile-1} \begin{verbatim} src_compile() { if [[ -x ${ECONF_SOURCE:-.}/configure ]]; then @@ -259,12 +272,8 @@ src_compile() { \end{verbatim} \end{listing} -\featurelabel{src-compile-2} For EAPIs listed in table~\ref{tab:src-compile-table} as using format -2, the default implementation used when the ebuild lacks the \t{src_compile} function shall behave -as: - \begin{listing}[H] -\caption{\t{src_compile}, format~2} +\caption{\t{src_compile}, format~2} \label{lst:src-compile-2} \begin{verbatim} src_compile() { if [[ -f Makefile ]] || [[ -f GNUmakefile ]] || [[ -f makefile ]]; then @@ -274,21 +283,6 @@ src_compile() { \end{verbatim} \end{listing} -\ChangeWhenAddingAnEAPI{8} -\begin{centertable}{\t{src_compile} behaviour for EAPIs} - \label{tab:src-compile-table} - \begin{tabular}{ll} - \toprule - \multicolumn{1}{c}{\textbf{EAPI}} & - \multicolumn{1}{c}{\textbf{Format}} \\ - \midrule - 0 & 0 \\ - 1 & 1 \\ - 2, 3, 4, 5, 6, 7, 8 & 2 \\ - \bottomrule - \end{tabular} -\end{centertable} - \subsection{src_test} The \t{src_test} function runs unit tests for the newly built but not yet installed package as @@ -330,12 +324,30 @@ directory specified in \t{D}. The initial working directory is \t{S}, with an error or fallback to \t{WORKDIR} as discussed in section~\ref{sec:s-to-workdir-fallback}. -\featurelabel{src-install-4} For EAPIs listed in table~\ref{tab:src-install-table} as using format -4, the default implementation used when the ebuild lacks the \t{src_install} function shall behave -as: +For EAPIs listed in table~\ref{tab:src-install-table} as using format 4 or~6, the default +implementation used when the ebuild lacks the \t{src_prepare} function shall behave as in +listing~\ref{lst:src-install-4} or listing~\ref{lst:src-install-6}, respectively. + +For other EAPIs, the default implementation used when the ebuild lacks the \t{src_install} function +is a no-op. + +\ChangeWhenAddingAnEAPI{8} +\begin{centertable}{\t{src_install} behaviour for EAPIs} + \label{tab:src-install-table} + \begin{tabular}{ll} + \toprule + \multicolumn{1}{c}{\textbf{EAPI}} & + \multicolumn{1}{c}{\textbf{Format}} \\ + \midrule + 0, 1, 2, 3 & no-op \\ + 4, 5 & 4 \\ + 6, 7, 8 & 6 \\ + \bottomrule + \end{tabular} +\end{centertable} \begin{listing}[H] -\caption{\t{src_install}, format~4} +\caption{\t{src_install}, format~4} \label{lst:src-install-4} \begin{verbatim} src_install() { if [[ -f Makefile ]] || [[ -f GNUmakefile ]] || [[ -f makefile ]]; then @@ -357,12 +369,8 @@ src_install() { \end{verbatim} \end{listing} -\featurelabel{src-install-6} For EAPIs listed in table~\ref{tab:src-install-table} as using format -6, the default implementation used when the ebuild lacks the \t{src_install} function shall behave -as: - \begin{listing}[H] -\caption{\t{src_install}, format~6} +\caption{\t{src_install}, format~6} \label{lst:src-install-6} \begin{verbatim} src_install() { if [[ -f Makefile ]] || [[ -f GNUmakefile ]] || [[ -f makefile ]]; then @@ -373,24 +381,6 @@ src_install() { \end{verbatim} \end{listing} -For other EAPIs, the default implementation used when the ebuild lacks the \t{src_install} function -is a no-op. - -\ChangeWhenAddingAnEAPI{8} -\begin{centertable}{\t{src_install} behaviour for EAPIs} - \label{tab:src-install-table} - \begin{tabular}{ll} - \toprule - \multicolumn{1}{c}{\textbf{EAPI}} & - \multicolumn{1}{c}{\textbf{Format}} \\ - \midrule - 0, 1, 2, 3 & no-op \\ - 4, 5 & 4 \\ - 6, 7, 8 & 6 \\ - \bottomrule - \end{tabular} -\end{centertable} - \subsection{pkg_preinst} The \t{pkg_preinst} function performs any special tasks that are required immediately before