public inbox for gentoo-pms@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Ulrich Müller" <ulm@gentoo.org>
To: gentoo-pms@lists.gentoo.org
Subject: [gentoo-pms] [PATCH 13/22] EAPI 6 has a default src_prepare.
Date: Thu, 15 Oct 2015 12:50:12 +0200	[thread overview]
Message-ID: <1444906221-30505-14-git-send-email-ulm@gentoo.org> (raw)
In-Reply-To: <1444906221-30505-1-git-send-email-ulm@gentoo.org>

This adds support for the PATCHES array and for user patches.

Bug: 463692
---
 eapi-differences.tex |  4 ++++
 ebuild-functions.tex | 36 +++++++++++++++++++++++++++---------
 2 files changed, 31 insertions(+), 9 deletions(-)

diff --git a/eapi-differences.tex b/eapi-differences.tex
index be8563c..980cbd8 100644
--- a/eapi-differences.tex
+++ b/eapi-differences.tex
@@ -92,6 +92,9 @@ Use dependencies & \compactfeatureref{use-deps} &
 \t{src\_prepare} & \compactfeatureref{src-prepare} &
     * & Yes & Yes & Yes & Yes \\
 
+\t{src\_prepare} style & \compactfeatureref{src-prepare} &
+    * & no-op & no-op & no-op & 6 \\
+
 \t{src\_configure} & \compactfeatureref{src-configure} &
     * & Yes & Yes & Yes & Yes \\
 
@@ -326,6 +329,7 @@ EAPI 6 is EAPI 5 with the following changes:
 
 \begin{compactitem}
 \item Profile \t{package*} and \t{use*} can be directories, \featureref{profile-file-dirs}.
+\item Default \t{src\_prepare} no longer a no-op, \featureref{src-prepare-6}.
 \item Bash version is 4.2, \featureref{bash-version}.
 \item \t{failglob} is enabled in global scope, \featureref{failglob}.
 \item \t{einstall} banned, \featureref{banned-commands}.
diff --git a/ebuild-functions.tex b/ebuild-functions.tex
index 23f02b4..1f996f0 100644
--- a/ebuild-functions.tex
+++ b/ebuild-functions.tex
@@ -121,24 +121,42 @@ src_unpack() {
 \label{sec:src-prepare-function}
 
 \featurelabel{src-prepare} The \t{src\_prepare} function is only called for EAPIs listed in
-table~\ref{tab:src-prepare-table} as supporting it.
-
-The \t{src\_prepare} function can be used for post-unpack source preparation. The default
-implementation does nothing.
+table~\ref{tab:src-prepare-table} as supporting it. The \t{src\_prepare} function can be used for
+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{verbatim}
+src_prepare() {
+    if declare -p PATCHES | grep -q "^declare -a "; then
+        [[ -n ${PATCHES[@]} ]] && eapply "${PATCHES[@]}"
+    else
+        [[ -n ${PATCHES} ]] && eapply ${PATCHES}
+    fi
+    eapply_user
+}
+\end{verbatim}
+
+For other EAPIs supporting \t{src\_prepare}, the default implementation used when the ebuild lacks
+the \t{src\_prepare} function is a no-op.
+
 \ChangeWhenAddingAnEAPI{6}
-\begin{centertable}{EAPIs supporting \t{src\_prepare}}
+\begin{centertable}{\t{src\_prepare} support and behaviour for EAPIs}
     \label{tab:src-prepare-table}
-    \begin{tabular}{ l l }
+    \begin{tabular}{ l l l }
       \toprule
       \multicolumn{1}{c}{\textbf{EAPI}} &
-      \multicolumn{1}{c}{\textbf{Supports \t{src\_prepare}?}} \\
+      \multicolumn{1}{c}{\textbf{Supports \t{src\_prepare}?}} &
+      \multicolumn{1}{c}{\textbf{Format}} \\
       \midrule
-      0, 1              & No  \\
-      2, 3, 4, 5, 6     & Yes \\
+      0, 1              & No  & Not applicable \\
+      2, 3, 4, 5        & Yes & no-op          \\
+      6                 & Yes & 6              \\
       \bottomrule
     \end{tabular}
 \end{centertable}
-- 
2.6.1



  parent reply	other threads:[~2015-10-15 10:50 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-15 10:49 [gentoo-pms] EAPI 6 draft for review Ulrich Müller
2015-10-15 10:50 ` [gentoo-pms] [PATCH 01/22] Add an EAPI 6 identical to EAPI 5 Ulrich Müller
2015-10-15 10:50 ` [gentoo-pms] [PATCH 02/22] Rework the EAPI feature table Ulrich Müller
2015-10-15 10:50 ` [gentoo-pms] [PATCH 03/22] Reformat EAPI tables to be more compact Ulrich Müller
2015-10-15 10:50 ` [gentoo-pms] [PATCH 04/22] Delete redundant sentence in the list of defined EAPIs Ulrich Müller
2015-10-15 10:50 ` [gentoo-pms] [PATCH 05/22] EAPI 6 supports package.* and use.* directories Ulrich Müller
2015-11-05 18:38   ` David Leverton
2015-11-05 19:11     ` Ulrich Mueller
2015-11-05 22:14     ` Michał Górny
2015-11-05 22:25       ` Ulrich Mueller
2015-11-06 21:38         ` Michał Górny
2015-11-06 22:52           ` Ulrich Mueller
2015-11-05 22:07   ` Michał Górny
2015-11-06 21:32   ` David Leverton
2015-11-06 23:27     ` Ulrich Mueller
2015-11-07  0:08       ` Ulrich Mueller
2015-11-07  0:12       ` David Leverton
2015-11-07  0:58         ` Ulrich Mueller
2015-11-07  9:03         ` Michał Górny
2015-10-15 10:50 ` [gentoo-pms] [PATCH 06/22] EAPI 6: Bash version is 4.2 Ulrich Müller
2015-10-15 10:50 ` [gentoo-pms] [PATCH 07/22] EAPI 6 enables failglob in global scope Ulrich Müller
2015-10-15 10:50 ` [gentoo-pms] [PATCH 08/22] EAPI 6: einstall banned Ulrich Müller
2015-10-15 10:50 ` [gentoo-pms] [PATCH 09/22] EAPI 6: die and assert called with -n respect nonfatal Ulrich Müller
2015-10-15 10:50 ` [gentoo-pms] [PATCH 10/22] EAPI 6 has eapply Ulrich Müller
2015-10-15 10:50 ` [gentoo-pms] [PATCH 11/22] EAPI 6: Explain eapply behavior Ulrich Müller
2015-10-16 10:08   ` Michał Górny
2015-10-16 15:45     ` Ulrich Mueller
2015-10-15 10:50 ` [gentoo-pms] [PATCH 12/22] EAPI 6 has eapply_user Ulrich Müller
2015-10-15 10:50 ` Ulrich Müller [this message]
2015-10-15 10:50 ` [gentoo-pms] [PATCH 14/22] EAPI 6: econf adds --docdir and --htmldir Ulrich Müller
2015-10-15 10:50 ` [gentoo-pms] [PATCH 15/22] EAPI 6 has in_iuse Ulrich Müller
2015-10-15 16:40   ` Ciaran McCreesh
2015-10-15 16:49     ` Ulrich Mueller
2015-10-15 16:56       ` Ciaran McCreesh
2015-10-15 17:05         ` Ulrich Mueller
2015-10-15 17:11           ` Ciaran McCreesh
2015-10-15 17:51             ` [gentoo-pms] [PATCH] Calling a USE list function in global scope is an error Ulrich Müller
2015-10-18 11:14               ` [gentoo-pms] " Ulrich Mueller
2015-10-15 18:34         ` [gentoo-pms] [PATCH 15/22] EAPI 6 has in_iuse Michał Górny
2015-10-15 18:33     ` Michał Górny
2015-10-15 10:50 ` [gentoo-pms] [PATCH 16/22] EAPI 6: unpack supports absolute and relative paths Ulrich Müller
2015-10-15 10:50 ` [gentoo-pms] [PATCH 17/22] EAPI 6: unpack supports txz Ulrich Müller
2015-10-15 10:50 ` [gentoo-pms] [PATCH 18/22] EAPI 6: unpack matches filename extensions case-insensitively Ulrich Müller
2015-10-15 10:50 ` [gentoo-pms] [PATCH 19/22] EAPI 6 has einstalldocs Ulrich Müller
2015-11-03 17:24   ` David Leverton
2015-11-03 17:53     ` Michał Górny
2015-11-03 19:51       ` Ulrich Mueller
2015-11-03 19:44     ` Ulrich Mueller
2015-11-03 20:36       ` Ulrich Mueller
2015-11-03 23:07         ` David Leverton
2015-10-15 10:50 ` [gentoo-pms] [PATCH 20/22] EAPI 6 has a different src_install implementation Ulrich Müller
2015-10-15 10:50 ` [gentoo-pms] [PATCH 21/22] EAPI 6 has get_libdir Ulrich Müller
2015-10-15 10:50 ` [gentoo-pms] [PATCH 22/22] Merge several EAPI feature tables Ulrich Müller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1444906221-30505-14-git-send-email-ulm@gentoo.org \
    --to=ulm@gentoo.org \
    --cc=gentoo-pms@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox