aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'eclass/mpi.eclass')
-rw-r--r--eclass/mpi.eclass7
1 files changed, 6 insertions, 1 deletions
diff --git a/eclass/mpi.eclass b/eclass/mpi.eclass
index 9bfe77df3..01c3a76d4 100644
--- a/eclass/mpi.eclass
+++ b/eclass/mpi.eclass
@@ -141,12 +141,17 @@ _mpi_do() {
[ -d "${D}"usr/share/${cmd} ] && mv "${D}"usr/share/${cmd}{,-orig}
[ ! -d "${D}"${mdir}usr/share/${cmd} ] \
&& install -d "${D}"${mdir}usr/share/${cmd}
+ [ ! -d "${D}"usr/share ] \
+ && install -d "${D}"usr/share
ln -snf ../../${mdir}usr/share/${cmd} ${D}usr/share/${cmd}
${prefix}${cmd} $*
rc=$?
rm "${D}"usr/share/${cmd}
- [ -d "${D}"usr/share/${cmd}-orig ] && mv "${D}"usr/share/${cmd}{-orig,}
+ [ -d "${D}"usr/share/${cmd}-orig ] \
+ && mv "${D}"usr/share/${cmd}{-orig,}
+ [ "$(find "${D}"usr/share/)" == "${D}usr/share/" ] \
+ && rmdir "${D}usr/share"
;;
dir)
dodir "${@/#${slash}/${mdir}${slash}}"; rc=$?;;