summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorGeorgy Yakovlev <gyakovlev@gentoo.org>2019-02-02 21:40:13 -0800
committerGeorgy Yakovlev <gyakovlev@gentoo.org>2019-02-05 11:22:00 -0800
commit8101ca1cbc0ff4bb763fa524864d9864b30db910 (patch)
tree6f40f67af05e4ed95130dad6024bc149966e12d9 /eclass
parentmail-client/novell-groupwise-client: don't reference ${DISTDIR} (diff)
downloadgentoo-8101ca1cbc0ff4bb763fa524864d9864b30db910.tar.gz
gentoo-8101ca1cbc0ff4bb763fa524864d9864b30db910.tar.bz2
gentoo-8101ca1cbc0ff4bb763fa524864d9864b30db910.zip
opam.eclass: unbreak on EAPI=7
Since D, ED, ROOT, EROOT no longer have a trailing slash in EAPI=7 This eclass is terribly broken, installing things into imageusr/... Reported by AnAverageHuman on #gentoo-dev-help Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
Diffstat (limited to '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
}