From 8101ca1cbc0ff4bb763fa524864d9864b30db910 Mon Sep 17 00:00:00 2001 From: Georgy Yakovlev Date: Sat, 2 Feb 2019 21:40:13 -0800 Subject: 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 --- eclass/opam.eclass | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'eclass/opam.eclass') 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 } -- cgit v1.2.3-65-gdbad