aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Bronder <jsbronder@gentoo.org>2009-07-11 17:08:59 -0400
committerJustin Bronder <jsbronder@gentoo.org>2009-07-11 17:08:59 -0400
commitdb4325efaad7456a4462c382b0115af7f5876c86 (patch)
tree82484379c14a9a2853b4b194d61123a39dee65f0 /eclass/mpi.eclass
parentVersion bump. Changed dependency and added test (diff)
downloadsci-db4325efaad7456a4462c382b0115af7f5876c86.tar.gz
sci-db4325efaad7456a4462c382b0115af7f5876c86.tar.bz2
sci-db4325efaad7456a4462c382b0115af7f5876c86.zip
mpi.eclass: mpi_doman fixes.
Create usr/share if it doesn't already exist. Remove usr/share if it's empty after installing man pages.
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=$?;;