From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-dev+bounces-102490-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 0B01D158083
	for <garchives@archives.gentoo.org>; Sun,  8 Sep 2024 18:20:25 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id E7087E2A3A;
	Sun,  8 Sep 2024 18:19:49 +0000 (UTC)
Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id A5C32E2A37
	for <gentoo-dev@lists.gentoo.org>; Sun,  8 Sep 2024 18:19:49 +0000 (UTC)
From: Sam James <sam@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Cc: Sam James <sam@gentoo.org>
Subject: [gentoo-dev] [PATCH 02/44] autotools.eclass: add global-scope ewarn for deprecated < EAPI 7
Date: Sun,  8 Sep 2024 19:16:11 +0100
Message-ID: <be9565cd70d9527e3b884d1f1c33f2982c25f806.1725819408.git.sam@gentoo.org>
X-Mailer: git-send-email 2.46.0
In-Reply-To: <cover.1725819408.git.sam@gentoo.org>
References: <cover.1725819408.git.sam@gentoo.org>
Precedence: bulk
List-Post: <mailto:gentoo-dev@lists.gentoo.org>
List-Help: <mailto:gentoo-dev+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-dev+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-dev+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-dev.gentoo.org>
X-BeenThere: gentoo-dev@lists.gentoo.org
Reply-to: gentoo-dev@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Archives-Salt: bc606694-126e-4f8b-9683-bc3c3aa42c08
X-Archives-Hash: 078e5f0f607ae47c8492df58cac34b04

Signed-off-by: Sam James <sam@gentoo.org>
---
 eclass/autotools.eclass | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/eclass/autotools.eclass b/eclass/autotools.eclass
index 3c9e89bda90ed..0571b18ba5252 100644
--- a/eclass/autotools.eclass
+++ b/eclass/autotools.eclass
@@ -13,11 +13,6 @@
 # Note: We require GNU m4, as does autoconf.  So feel free to use any features
 # from the GNU version of m4 without worrying about other variants (i.e. BSD).
 
-case ${EAPI} in
-	6|7|8) ;;
-	*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
-esac
-
 if [[ ${_AUTOTOOLS_AUTO_DEPEND+set} == "set" ]] ; then
 	# See if we were included already, but someone changed the value
 	# of AUTOTOOLS_AUTO_DEPEND on us.  We could reload the entire
@@ -31,6 +26,15 @@ fi
 if [[ -z ${_AUTOTOOLS_ECLASS} ]] ; then
 _AUTOTOOLS_ECLASS=1
 
+case ${EAPI} in
+	6)
+		ewarn "${CATEGORY}/${PF}: ebuild uses ${ECLASS} with deprecated EAPI ${EAPI}!"
+		ewarn "${CATEGORY}/${PF}: Support will be removed on 2024-10-08. Please port to newer EAPI."
+		;;
+	7|8) ;;
+	*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
+esac
+
 [[ ${EAPI} == 6 ]] && inherit eqawarn
 
 GNUCONFIG_AUTO_DEPEND=no
-- 
2.46.0