commit:     29ace82844506914a4bc6af204e140ccdc730800
Author:     Gilles Dartiguelongue <eva <AT> gentoo <DOT> org>
AuthorDate: Sun Oct 30 11:36:40 2016 +0000
Commit:     Gilles Dartiguelongue <eva <AT> gentoo <DOT> org>
CommitDate: Sun Oct 30 11:36:40 2016 +0000
URL:        https://gitweb.gentoo.org/proj/gnome.git/commit/?id=29ace828

eclass/gnome2-live: add EAPI 6 support

 eclass/gnome2-live.eclass | 36 ++++++++++++++++++++++++------------
 1 file changed, 24 insertions(+), 12 deletions(-)

diff --git a/eclass/gnome2-live.eclass b/eclass/gnome2-live.eclass
index 0e725d0..8bcc4ea 100644
--- a/eclass/gnome2-live.eclass
+++ b/eclass/gnome2-live.eclass
@@ -21,6 +21,9 @@ case "${EAPI:-0}" in
        4|5)
                EXPORT_FUNCTIONS src_unpack src_prepare pkg_postinst
                ;;
+       6)
+               EXPORT_FUNCTIONS src_prepare pkg_postinst
+               ;;
        *)
                die "Unknown EAPI, Bug eclass maintainers." ;;
 esac
@@ -75,11 +78,15 @@ gnome2-live_get_var() {
 # Calls git-2_src_unpack, and unpacks ${A} if required.
 # Also calls gnome2-live_src_prepare for older EAPI.
 gnome2-live_src_unpack() {
-       if test -n "${A}"; then
-               unpack ${A}
+       if has ${EAPI:-0} 4 5 ; then
+               if test -n "${A}"; then
+                       unpack ${A}
+               fi
+               git-r3_src_unpack
+               gnome2-live_src_prepare
+       else
+               die "gnome2-live_src_unpack is banned starting with EAPI=6"
        fi
-       git-r3_src_unpack
-       gnome2-live_src_prepare
 }
 
 # @FUNCTION: gnome2-live_src_prepare
@@ -88,11 +95,13 @@ gnome2-live_src_unpack() {
 # Creates blank ChangeLog and necessary macro dirs. Runs various autotools
 # programs if required, and finally runs eautoreconf.
 gnome2-live_src_prepare() {
-       for i in ${PATCHES}; do
-               epatch "${i}"
-       done
+       if has ${EAPI:-0} 4 5 ; then
+               for i in ${PATCHES}; do
+                       epatch "${i}"
+               done
 
-       epatch_user
+               epatch_user
+       fi
 
        # If ChangeLog doesn't exist, maybe it's autogenerated
        # Avoid a `dodoc` failure by adding an empty ChangeLog
@@ -100,18 +109,21 @@ gnome2-live_src_prepare() {
                echo > ChangeLog
        fi
 
-       # eautoreconf is smart enough to run all necessary commands
-       eautoreconf
-
        ### Keep this in-sync with gnome2.eclass!
 
        xdg_src_prepare
 
+       # eautoreconf is smart enough to run all necessary commands
+       eautoreconf
+
        # Prevent assorted access violations and test failures
        gnome2_environment_reset
 
        # Prevent scrollkeeper access violations
-       gnome2_omf_fix
+       # We stop to run it from EAPI=6 as scrollkeeper helpers from
+       # rarian are not running anything and, then, access violations
+       # shouldn't occur.
+       has ${EAPI:-0} 4 5 && gnome2_omf_fix
 
        # Run libtoolize
        # https://bugzilla.gnome.org/show_bug.cgi?id=655517

Reply via email to