Skip to content

Commit

Permalink
elisp.eclass: Drop support for EAPIs 0 to 3.
Browse files Browse the repository at this point in the history
Reviewed-by: Hans de Graaff <[email protected]>
Signed-off-by: Ulrich Müller <[email protected]>
  • Loading branch information
ulm committed Jul 17, 2019
1 parent fbcdaf5 commit 013a934
Showing 1 changed file with 13 additions and 23 deletions.
36 changes: 13 additions & 23 deletions eclass/elisp.eclass
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 1999-2018 Gentoo Foundation
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

# @ECLASS: elisp.eclass
Expand All @@ -9,7 +9,7 @@
# Jeremy Maitin-Shepard <[email protected]>
# Christian Faulhammer <[email protected]>
# Ulrich Müller <[email protected]>
# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 7
# @SUPPORTED_EAPIS: 4 5 6 7
# @BLURB: Eclass for Emacs Lisp packages
# @DESCRIPTION:
#
Expand Down Expand Up @@ -67,21 +67,17 @@

inherit elisp-common
case ${EAPI:-0} in
0|1|2|3|4|5) inherit epatch ;;
4|5) inherit epatch ;;
6|7) ;;
*) die "${ECLASS}: EAPI ${EAPI} not supported" ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac

case ${EAPI:-0} in
0|1) EXPORT_FUNCTIONS src_{unpack,compile,install} \
pkg_{setup,postinst,postrm} ;;
*) EXPORT_FUNCTIONS src_{unpack,prepare,configure,compile,install} \
pkg_{setup,postinst,postrm} ;;
esac
EXPORT_FUNCTIONS src_{unpack,prepare,configure,compile,install} \
pkg_{setup,postinst,postrm}

RDEPEND=">=virtual/emacs-${NEED_EMACS:-23}"
case ${EAPI:-0} in
0|1|2|3|4|5|6) DEPEND="${RDEPEND}" ;;
case ${EAPI} in
4|5|6) DEPEND="${RDEPEND}" ;;
*) BDEPEND="${RDEPEND}" ;;
esac

Expand All @@ -102,8 +98,7 @@ elisp_pkg_setup() {
# @FUNCTION: elisp_src_unpack
# @DESCRIPTION:
# Unpack the sources; also handle the case of a single *.el file in
# WORKDIR for packages distributed that way. For EAPIs without
# src_prepare, call elisp_src_prepare.
# WORKDIR for packages distributed that way.

elisp_src_unpack() {
[[ -n ${A} ]] && unpack ${A}
Expand All @@ -112,11 +107,6 @@ elisp_src_unpack() {
mv ${P}.el ${PN}.el || die
[[ -d ${S} ]] || S=${WORKDIR}
fi

case ${EAPI:-0} in
0|1) [[ -d ${S} ]] && cd "${S}"
elisp_src_prepare ;;
esac
}

# @FUNCTION: elisp_src_prepare
Expand All @@ -136,15 +126,15 @@ elisp_src_prepare() {
else
die "Cannot find ${patch}"
fi
case ${EAPI:-0} in
0|1|2|3|4|5) epatch "${file}" ;;
case ${EAPI} in
4|5) epatch "${file}" ;;
*) eapply "${file}" ;;
esac
done

# apply any user patches
case ${EAPI:-0} in
0|1|2|3|4|5) epatch_user ;;
case ${EAPI} in
4|5) epatch_user ;;
*) eapply_user ;;
esac

Expand Down

0 comments on commit 013a934

Please sign in to comment.