commit:     404265ebc3cd062402d737dc120f872c3330fa86
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Fri Sep 14 17:08:48 2018 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Wed Oct 24 12:51:35 2018 +0000
URL:        https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=404265eb

src_prepare: Show new EAPI 6 default_src_prepare

Signed-off-by: Brian Evans <grknight <AT> gentoo.org>

 ebuild-writing/functions/src_prepare/text.xml | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/ebuild-writing/functions/src_prepare/text.xml 
b/ebuild-writing/functions/src_prepare/text.xml
index 2a8cb84..4ff2074 100644
--- a/ebuild-writing/functions/src_prepare/text.xml
+++ b/ebuild-writing/functions/src_prepare/text.xml
@@ -40,6 +40,19 @@ src_prepare() {
        true;
 }
 </codesample>
+<p>
+Beginning with EAPI=6, the src_prepare function gained a new default 
implementation:
+</p>
+<codesample lang="ebuild">
+src_prepare() {  
+    if declare -p PATCHES | grep -q "^declare -a "; then  
+        [[ -n ${PATCHES[@]} ]] && eapply "${PATCHES[@]}"  
+    else  
+        [[ -n ${PATCHES} ]] && eapply ${PATCHES}  
+    fi  
+    eapply_user  
+}
+</codesample>
 </body>
 </section>
 

Reply via email to