Support EAPI 8 and drop support for EAPI 5.
Set DUNE_PKG_NAME to PN by default.
Move "Move docs to the appropriate place" block to dune-install
to make dune-install now handle a list of subpackages correctly.
Use ebegin and eend for dune calls instead of "|| die".
Thanks to ULM for bash fixes.
Signed-off-by: Maciej Barć <
xgqt@gentoo.org>
---
eclass/dune.eclass | 56 +++++++++++++++++++++++++++++-----------------
1 file changed, 35 insertions(+), 21 deletions(-)
diff --git a/eclass/dune.eclass b/eclass/dune.eclass
index 02a8a870e..69aad3692 100644
--- a/eclass/dune.eclass
+++ b/eclass/dune.eclass
@@ -8,7 +8,7 @@
# ML <
ml@gentoo.org>
# @AUTHOR:
# Rafael Kitover <
rkitover@gmail.com>
-# @SUPPORTED_EAPIS: 5 6 7
+# @SUPPORTED_EAPIS: 6 7 8
# @BLURB: Provides functions for installing Dune packages.
# @DESCRIPTION:
# Provides dependencies on dDne and OCaml and default src_compile, src_test and
@@ -19,9 +19,10 @@
# @DESCRIPTION:
# Sets the actual Dune package name, if different from Gentoo package name.
# Set before inheriting the eclass.
+: ${DUNE_PKG_NAME:-${PN}}
case ${EAPI:-0} in
- 5|6|7) ;;
+ 6|7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI} not supported" ;;
esac
@@ -32,7 +33,7 @@ EXPORT_FUNCTIONS src_compile src_test src_install
RDEPEND=">=dev-lang/ocaml-4:=[ocamlopt?] dev-ml/dune:="
case ${EAPI:-0} in