summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2022-07-26 21:27:18 +0200
committerDavid Seifert <soap@gentoo.org>2022-07-26 21:27:18 +0200
commit24b018e8b8a166edd0c9a8ab7737949af491352f (patch)
treeec7171a23262b549a9fecbfd4a3110fd70cc3f3a /eclass
parentopam.eclass: [QA] use bash [[ ... ]] brackets (diff)
downloadgentoo-24b018e8b8a166edd0c9a8ab7737949af491352f.tar.gz
gentoo-24b018e8b8a166edd0c9a8ab7737949af491352f.tar.bz2
gentoo-24b018e8b8a166edd0c9a8ab7737949af491352f.zip
opam.eclass: remove EAPI 5 and 6
Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r--eclass/opam.eclass33
1 files changed, 13 insertions, 20 deletions
diff --git a/eclass/opam.eclass b/eclass/opam.eclass
index 3edc2aa86919..b667bf31f151 100644
--- a/eclass/opam.eclass
+++ b/eclass/opam.eclass
@@ -7,15 +7,15 @@
# ML <ml@gentoo.org>
# @AUTHOR:
# Alexis Ballier <aballier@gentoo.org>
-# @SUPPORTED_EAPIS: 5 6 7
+# @SUPPORTED_EAPIS: 7
# @BLURB: Provides functions for installing opam packages.
# @DESCRIPTION:
# Provides dependencies on opam and ocaml, opam-install and a default
# src_install for opam-based packages.
-case ${EAPI:-0} in
- 5|6|7) ;;
- *) die "${ECLASS}: EAPI ${EAPI} not supported" ;;
+case ${EAPI} in
+ 7) ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
# Do not complain about CFLAGS etc since ml projects do not use them.
@@ -28,15 +28,8 @@ QA_FLAGS_IGNORED='.*'
: ${OPAM_INSTALLER_DEP:="dev-ml/opam-installer"}
RDEPEND=">=dev-lang/ocaml-4:="
-case ${EAPI:-0} in
- 5|6)
- DEPEND="${RDEPEND} ${OPAM_INSTALLER_DEP}"
- ;;
- *)
- BDEPEND="${OPAM_INSTALLER_DEP} dev-lang/ocaml"
- DEPEND="${RDEPEND}"
- ;;
-esac
+BDEPEND="${OPAM_INSTALLER_DEP} dev-lang/ocaml"
+DEPEND="${RDEPEND}"
# @ECLASS_VARIABLE: OPAM_INSTALLER
# @DESCRIPTION:
@@ -52,10 +45,10 @@ opam-install() {
local pkg
for pkg ; do
${OPAM_INSTALLER} -i \
- --prefix="${ED%/}/usr" \
- --libdir="${D%/}/$(ocamlc -where)" \
- --docdir="${ED%/}/usr/share/doc/${PF}" \
- --mandir="${ED%/}/usr/share/man" \
+ --prefix="${ED}/usr" \
+ --libdir="${D}/$(ocamlc -where)" \
+ --docdir="${ED}/usr/share/doc/${PF}" \
+ --mandir="${ED}/usr/share/man" \
"${pkg}.install" || die
done
}
@@ -64,9 +57,9 @@ opam_src_install() {
local pkg="${1:-${PN}}"
opam-install "${pkg}"
# Handle opam putting doc in a subdir
- if [[ -d ${ED%/}/usr/share/doc/${PF}/${pkg} ]] ; then
- mv "${ED%/}/usr/share/doc/${PF}/${pkg}/"* "${ED%/}/usr/share/doc/${PF}/" || die
- rmdir "${ED%/}/usr/share/doc/${PF}/${pkg}" || die
+ if [[ -d ${ED}/usr/share/doc/${PF}/${pkg} ]] ; then
+ mv "${ED}/usr/share/doc/${PF}/${pkg}/"* "${ED}/usr/share/doc/${PF}/" || die
+ rmdir "${ED}/usr/share/doc/${PF}/${pkg}" || die
fi
}