elisp.eclass: Depend on virtual/emacs on the build system.
authorUlrich Müller <ulm@gentoo.org>
Fri, 1 Jun 2018 16:51:24 +0000 (18:51 +0200)
committerUlrich Müller <ulm@gentoo.org>
Tue, 5 Jun 2018 22:03:32 +0000 (00:03 +0200)
For byte-compilation, Emacs is required to run on the native
build system. Therefore BDEPEND on virtual/emacs in EAPI 7.

Reorganise EAPI conditionals to be more compact.

eclass/elisp.eclass

index 9a66ec58ce5052eb40153a4a9c76d2e39b5c2360..0f07a3ef1f7eba165407968bd54fb6b6e852c639 100644 (file)
 # files by dodoc in src_install().
 
 inherit elisp-common
+case ${EAPI:-0} in
+       0|1|2|3|4|5) inherit epatch ;;
+       6|7) ;;
+       *) die "${ECLASS}: EAPI ${EAPI} not supported" ;;
+esac
 
 case ${EAPI:-0} in
-       0|1)
-               inherit epatch
-               EXPORT_FUNCTIONS src_{unpack,compile,install} \
-                       pkg_{setup,postinst,postrm} ;;
-       2|3|4|5)
-               inherit epatch
-               EXPORT_FUNCTIONS src_{unpack,prepare,configure,compile,install} \
+       0|1) EXPORT_FUNCTIONS src_{unpack,compile,install} \
                        pkg_{setup,postinst,postrm} ;;
-       6|7)
-               EXPORT_FUNCTIONS src_{unpack,prepare,configure,compile,install} \
+       *) EXPORT_FUNCTIONS src_{unpack,prepare,configure,compile,install} \
                        pkg_{setup,postinst,postrm} ;;
-       *) die "${ECLASS}: EAPI ${EAPI} not supported" ;;
 esac
 
-DEPEND=">=virtual/emacs-${NEED_EMACS:-23}"
-RDEPEND="${DEPEND}"
+RDEPEND=">=virtual/emacs-${NEED_EMACS:-23}"
+case ${EAPI:-0} in
+       0|1|2|3|4|5|6) DEPEND="${RDEPEND}" ;;
+       *) BDEPEND="${RDEPEND}" ;;
+esac
 
 # @FUNCTION: elisp_pkg_setup
 # @DESCRIPTION: