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 5400E13835A for ; Wed, 19 May 2021 15:38:51 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5B091E087E; Wed, 19 May 2021 15:38:50 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (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 4344EE087E for ; Wed, 19 May 2021 15:38:50 +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 26D63340CC7 for ; Wed, 19 May 2021 15:38:49 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 896C1798 for ; Wed, 19 May 2021 15:38:46 +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: <1621438660.e37fd85b6c2879bc176354f08b29a7dabe4ffb7a.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: e37fd85b6c2879bc176354f08b29a7dabe4ffb7a X-VCS-Branch: eapi-8 Date: Wed, 19 May 2021 15:38:46 +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: 33a14f46-77df-4fa6-a13f-a38fb8a0cf09 X-Archives-Hash: 5ea55538a38cf4d688adc5b74f000658 commit: e37fd85b6c2879bc176354f08b29a7dabe4ffb7a Author: Ulrich Müller gentoo org> AuthorDate: Sun May 16 19:06:02 2021 +0000 Commit: Ulrich Müller gentoo org> CommitDate: Wed May 19 15:37:40 2021 +0000 URL: https://gitweb.gentoo.org/proj/pms.git/commit/?id=e37fd85b EAPI 8: Default src_prepare doesn't accept options in PATCHES Bug: https://bugs.gentoo.org/752486 Signed-off-by: Ulrich Müller gentoo.org> eapi-differences.tex | 3 ++- ebuild-functions.tex | 21 ++++++++++++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/eapi-differences.tex b/eapi-differences.tex index f3af563..5d7170d 100644 --- a/eapi-differences.tex +++ b/eapi-differences.tex @@ -121,7 +121,7 @@ Use dependencies & \compactfeatureref{use-deps} & * & Yes & Yes & Yes & Yes \\ \t{src_prepare} style & \compactfeatureref{src-prepare} & - * & no-op & 6 & 6 & 6 \\ + * & no-op & 6 & 6 & 8 \\ \t{src_configure} & \compactfeatureref{src-configure} & * & Yes & Yes & Yes & Yes \\ @@ -494,6 +494,7 @@ EAPI 8 is EAPI 7 with the following changes: \item Bash version is 5.0, \featureref{bash-version}. \item Selective fetch/mirror restriction, \featureref{uri-restrict}. \item \t{IDEPEND}, \featureref{idepend}. +\item Different \t{src_prepare} implementation, \featureref{src-prepare-8}. \end{compactitem} \ChangeWhenAddingAnEAPI{8} diff --git a/ebuild-functions.tex b/ebuild-functions.tex index 108b8bc..c8e02db 100644 --- a/ebuild-functions.tex +++ b/ebuild-functions.tex @@ -144,6 +144,24 @@ src_prepare() { \end{verbatim} \end{listing} +\featurelabel{src-prepare-8} For EAPIs listed in table~\ref{tab:src-prepare-table} as using format +8, the default implementation used when the ebuild lacks the \t{src_prepare} function shall behave +as: + +\begin{listing}[H] +\caption{\t{src_prepare}, format~8} +\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 other EAPIs supporting \t{src_prepare}, the default implementation used when the ebuild lacks the \t{src_prepare} function is a no-op. @@ -158,7 +176,8 @@ the \t{src_prepare} function is a no-op. \midrule 0, 1 & No & Not applicable \\ 2, 3, 4, 5 & Yes & no-op \\ - 6, 7, 8 & Yes & 6 \\ + 6, 7 & Yes & 6 \\ + 8 & Yes & 8 \\ \bottomrule \end{tabular} \end{centertable}