repo/proj/emacs:master commit in: eclass/

Ulrich Müller <[email protected]>
Newsgroups gmane.linux.gentoo.cvs
Message-ID <1787074060.746fbd54b0ee040ac8301b9c209600b0697e6c9b.ulm@gentoo>
commit:     746fbd54b0ee040ac8301b9c209600b0697e6c9b
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 18 17:27:40 2026 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Tue Aug 18 17:27:40 2026 +0000
URL:        https://gitweb.gentoo.org/repo/proj/emacs.git/commit/?id=746fbd54

elisp.eclass: Sync from Gentoo repository

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 0d1fce26..2b81e8b6 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.