repo/gentoo:master commit in: eclass/

Ulrich Müller <[email protected]>
Newsgroups gmane.linux.gentoo.cvs
Message-ID <1787073943.8af6789a3216ff2521821aeabd3e6802e207fa85.ulm@gentoo>
commit:     8af6789a3216ff2521821aeabd3e6802e207fa85
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Sun Aug  9 12:39:17 2026 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Tue Aug 18 17:25:43 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8af6789a

elisp.eclass: Deprecate ELISP_PATCHES

Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 eclass/elisp.eclass | 37 ++++++++++++++++++++-----------------
 1 file changed, 20 insertions(+), 17 deletions(-)

diff --git a/eclass/elisp.eclass b/eclass/elisp.eclass
index 0d1fce261608..2b81e8b67d0f 100644
--- a/eclass/elisp.eclass
+++ b/eclass/elisp.eclass
@@ -38,11 +38,11 @@
 
 # @ECLASS_VARIABLE: ELISP_PATCHES
 # @DEFAULT_UNSET
+# @DEPRECATED: PATCHES
 # @DESCRIPTION:
 # Space separated list of patches to apply after unpacking the sources.
 # Patch files are searched for in the current working dir, WORKDIR, and
-# FILESDIR.  This variable is semi-deprecated, preferably use the
-# PATCHES array instead.
+# FILESDIR.  This variable is deprecated, use the PATCHES array instead.
 
 # @ECLASS_VARIABLE: ELISP_REMOVE
 # @DEFAULT_UNSET
@@ -98,23 +98,26 @@ elisp_src_unpack() {
 
 # @FUNCTION: elisp_src_prepare
 # @DESCRIPTION:
-# Apply any patches listed in ELISP_PATCHES.  Patch files are searched
-# for in the current working dir, WORKDIR, and FILESDIR.
+# Apply patches and remove any files listed in ELISP_REMOVE.
 
 elisp_src_prepare() {
-	local patch file
-	for patch in ${ELISP_PATCHES}; do
-		if [[ -f ${patch} ]]; then
-			file="${patch}"
-		elif [[ -f ${WORKDIR}/${patch} ]]; then
-			file="${WORKDIR}/${patch}"
-		elif [[ -f ${FILESDIR}/${patch} ]]; then
-			file="${FILESDIR}/${patch}"
-		else
-			die "Cannot find ${patch}"
-		fi
-		eapply "${file}"
-	done
+	if has "${EAPI}" 7 8; then
+		local patch file
+		for patch in ${ELISP_PATCHES}; do
+			if [[ -f ${patch} ]]; then
+				file="${patch}"
+			elif [[ -f ${WORKDIR}/${patch} ]]; then
+				file="${WORKDIR}/${patch}"
+			elif [[ -f ${FILESDIR}/${patch} ]]; then
+				file="${FILESDIR}/${patch}"
+			else
+				die "Cannot find ${patch}"
+			fi
+			eapply "${file}"
+		done
+	elif [[ -n ${ELISP_PATCHES} ]]; then
+		die "ELISP_PATCHES is banned in EAPI ${EAPI}"
+	fi
 
 	# apply PATCHES and any user patches
 	default
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.