summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'eclass/opam.eclass')
-rw-r--r--eclass/opam.eclass14
1 files changed, 7 insertions, 7 deletions
diff --git a/eclass/opam.eclass b/eclass/opam.eclass
index 5c9c4950dd26..03ffc0276412 100644
--- a/eclass/opam.eclass
+++ b/eclass/opam.eclass
@@ -30,10 +30,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
}
@@ -42,9 +42,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
}