summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2021-05-01 19:39:50 +0200
committerUlrich Müller <ulm@gentoo.org>2021-05-01 19:39:50 +0200
commit026faf9709db1f546b981e71239dd7b87f2a3baa (patch)
tree565f62f674d094e8db8e98f991bc281971e6f4be /eclass/elisp.eclass
parentelisp*.eclass: Sync from Gentoo repository (diff)
downloademacs-026faf9709db1f546b981e71239dd7b87f2a3baa.tar.gz
emacs-026faf9709db1f546b981e71239dd7b87f2a3baa.tar.bz2
emacs-026faf9709db1f546b981e71239dd7b87f2a3baa.zip
elisp*.eclass: Restore support for EAPIs 4 and 5eclass-old-eapi
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
Diffstat (limited to 'eclass/elisp.eclass')
-rw-r--r--eclass/elisp.eclass25
1 files changed, 18 insertions, 7 deletions
diff --git a/eclass/elisp.eclass b/eclass/elisp.eclass
index d763a49..10c16ce 100644
--- a/eclass/elisp.eclass
+++ b/eclass/elisp.eclass
@@ -9,7 +9,7 @@
# Jeremy Maitin-Shepard <jbms@attbi.com>
# Christian Faulhammer <fauli@gentoo.org>
# Ulrich Müller <ulm@gentoo.org>
-# @SUPPORTED_EAPIS: 6 7
+# @SUPPORTED_EAPIS: 4 5 6 7
# @BLURB: Eclass for Emacs Lisp packages
# @DESCRIPTION:
#
@@ -40,7 +40,7 @@
# 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.
+# PATCHES array instead if the EAPI supports it.
# @ECLASS-VARIABLE: ELISP_REMOVE
# @DEFAULT_UNSET
@@ -64,6 +64,7 @@
inherit elisp-common
case ${EAPI:-0} in
+ 4|5) inherit epatch ;;
6|7) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
@@ -73,7 +74,8 @@ EXPORT_FUNCTIONS src_{unpack,prepare,configure,compile,install} \
RDEPEND=">=app-editors/emacs-${NEED_EMACS}:*"
case ${EAPI} in
- 6) DEPEND="${RDEPEND}" ;;
+ 4) RDEPEND="${RDEPEND%:*}"; DEPEND="${RDEPEND}" ;;
+ 5|6) DEPEND="${RDEPEND}" ;;
*) BDEPEND="${RDEPEND}" ;;
esac
@@ -117,11 +119,17 @@ elisp_src_prepare() {
else
die "Cannot find ${patch}"
fi
- eapply "${file}"
+ case ${EAPI} in
+ 4|5) epatch "${file}" ;;
+ *) eapply "${file}" ;;
+ esac
done
- # apply PATCHES and any user patches
- default
+ # apply PATCHES (if supported in EAPI), and any user patches
+ case ${EAPI} in
+ 4|5) epatch_user ;;
+ *) default ;;
+ esac
if [[ -n ${ELISP_REMOVE} ]]; then
rm ${ELISP_REMOVE} || die
@@ -165,7 +173,10 @@ elisp_src_install() {
doinfo ${@/%.*/.info*}
fi
# install documentation only when explicitly requested
- [[ $(declare -p DOCS 2>/dev/null) == *=* ]] && einstalldocs
+ case ${EAPI} in
+ 4|5) [[ -n ${DOCS} ]] && dodoc ${DOCS} ;;
+ *) [[ $(declare -p DOCS 2>/dev/null) == *=* ]] && einstalldocs ;;
+ esac
if declare -f readme.gentoo_create_doc >/dev/null; then
readme.gentoo_create_doc
fi