summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2019-09-05 12:33:48 +0200
committerUlrich Müller <ulm@gentoo.org>2019-09-09 10:10:41 +0200
commit8a9982a334c2028211d7eee1700a3dfe4199463d (patch)
treef0d156441da8e40c3adc6601ed4349e38ead1300 /eclass
parentbzr.eclass: Respect the EVCS_UMASK variable. (diff)
downloadgentoo-8a9982a334c2028211d7eee1700a3dfe4199463d.tar.gz
gentoo-8a9982a334c2028211d7eee1700a3dfe4199463d.tar.bz2
gentoo-8a9982a334c2028211d7eee1700a3dfe4199463d.zip
elisp.eclass: Use EAPI defaults where possible.
src_unpack: Call default instead of explicit unpack. src_prepare: Call default, so that the PATCHES variable will be respected in EAPIs 6 and 7. src_install: Call einstalldocs in EAPIs where it is supported. Drop unnecessary die statements, because helpers die by themselves in all supported EAPIs. Signed-off-by: Ulrich Müller <ulm@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r--eclass/elisp.eclass25
1 files changed, 11 insertions, 14 deletions
diff --git a/eclass/elisp.eclass b/eclass/elisp.eclass
index c885345a7a83..bcd80a9ee9ca 100644
--- a/eclass/elisp.eclass
+++ b/eclass/elisp.eclass
@@ -38,7 +38,8 @@
# @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.
+# FILESDIR. This variable is semi-deprecated, preferably use the
+# PATCHES array instead if the EAPI supports it.
# @ECLASS-VARIABLE: ELISP_REMOVE
# @DEFAULT_UNSET
@@ -59,12 +60,6 @@
# Space separated list of Texinfo sources. Respective GNU Info files
# will be generated in src_compile() and installed in src_install().
-# @ECLASS-VARIABLE: DOCS
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# DOCS="blah.txt ChangeLog" is automatically used to install the given
-# files by dodoc in src_install().
-
inherit elisp-common
case ${EAPI:-0} in
4|5) inherit epatch ;;
@@ -101,7 +96,7 @@ elisp_pkg_setup() {
# WORKDIR for packages distributed that way.
elisp_src_unpack() {
- [[ -n ${A} ]] && unpack ${A}
+ default
if [[ -f ${P}.el ]]; then
# the "simple elisp" case with a single *.el file in WORKDIR
mv ${P}.el ${PN}.el || die
@@ -132,10 +127,10 @@ elisp_src_prepare() {
esac
done
- # apply any user patches
+ # apply PATCHES (if supported in EAPI), and any user patches
case ${EAPI} in
4|5) epatch_user ;;
- *) eapply_user ;;
+ *) default ;;
esac
if [[ -n ${ELISP_REMOVE} ]]; then
@@ -177,11 +172,13 @@ elisp_src_install() {
if [[ -n ${ELISP_TEXINFO} ]]; then
set -- ${ELISP_TEXINFO}
set -- ${@##*/}
- doinfo ${@/%.*/.info*} || die
- fi
- if [[ -n ${DOCS} ]]; then
- dodoc ${DOCS} || die
+ doinfo ${@/%.*/.info*}
fi
+ # install documentation only when explicitly requested
+ case ${EAPI} in
+ 4|5) [[ -n ${DOCS} ]] && dodoc ${DOCS} ;;
+ *) declare -p DOCS &>/dev/null && einstalldocs ;;
+ esac
if declare -f readme.gentoo_create_doc >/dev/null; then
readme.gentoo_create_doc
fi