Closes: https://bugs.gentoo.org/717100
Signed-off-by: Matt Turner <matts...@gentoo.org>
---
leio noted that the previous patch would potentially change the
installed .la files in EAPI 5 and 6 ebuilds. So just continue using
ltprune in those EAPIs and ban GNOME2_LA_PUNT in EAPI 7.

 eclass/gnome2.eclass | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)

diff --git a/eclass/gnome2.eclass b/eclass/gnome2.eclass
index 341802f8c80..546438f289c 100644
--- a/eclass/gnome2.eclass
+++ b/eclass/gnome2.eclass
@@ -4,7 +4,7 @@
 # @ECLASS: gnome2.eclass
 # @MAINTAINER:
 # gn...@gentoo.org
-# @SUPPORTED_EAPIS: 5 6
+# @SUPPORTED_EAPIS: 5 6 7
 # @BLURB: Provides phases for Gnome/Gtk+ based packages.
 # @DESCRIPTION:
 # Exports portage base functions used by ebuilds written for packages using the
@@ -17,13 +17,14 @@
 GNOME2_EAUTORECONF=${GNOME2_EAUTORECONF:-""}
 
 [[ ${GNOME2_EAUTORECONF} == 'yes' ]] && inherit autotools
-inherit eutils libtool ltprune gnome.org gnome2-utils xdg
+[[ ${EAPI} == [56] ]] && inherit eutils ltprune
+inherit libtool gnome.org gnome2-utils xdg
 
 case ${EAPI:-0} in
        5)
                EXPORT_FUNCTIONS src_unpack src_prepare src_configure 
src_compile src_install pkg_preinst pkg_postinst pkg_postrm
                ;;
-       6)
+       6|7)
                EXPORT_FUNCTIONS src_prepare src_configure src_compile 
src_install pkg_preinst pkg_postinst pkg_postrm
                ;;
        *) die "EAPI=${EAPI} is not supported" ;;
@@ -75,7 +76,14 @@ fi
 # - "no": will not clean any .la files
 # - "yes": will run prune_libtool_files --modules
 # - If it is not set, it will run prune_libtool_files
-GNOME2_LA_PUNT=${GNOME2_LA_PUNT:-""}
+# Banned since eapi7.
+if has ${EAPI} 5 6; then
+       GNOME2_LA_PUNT=${GNOME2_LA_PUNT:-""}
+elif [[ -n $GNOME_LA_PUNT ]]; then
+       die "GNOME2_LA_PUNT is banned since eapi7"
+else
+       GNOME2_LA_PUNT="no"
+fi
 
 # @FUNCTION: gnome2_src_unpack
 # @DESCRIPTION:
@@ -85,7 +93,7 @@ gnome2_src_unpack() {
                unpack ${A}
                cd "${S}"
        else
-               die "gnome2_src_unpack is banned from eapi6"
+               die "gnome2_src_unpack is banned since eapi6"
        fi
 }
 
-- 
2.26.2


Reply via email to