www-client/seamonkey: Fixing support of external enigmail package.

Package-Manager: Portage-2.3.6, Repoman-2.3.3
This commit is contained in:
Lars Wendler
2017-07-24 16:00:39 +02:00
parent 47b1fad081
commit d022b71b74

View File

@@ -94,6 +94,7 @@ RDEPEND="
)
)
=app-crypt/gnupg-1.4* )
x11-plugins/enigmail
)
jack? ( virtual/jack )
"
@@ -108,10 +109,6 @@ DEPEND="
virtual/opengl )
"
PDEPEND="
crypt? ( x11-plugins/enigmail )
"
BUILD_OBJ_DIR="${S}/seamonk"
# allow GMP_PLUGIN_LIST to be set in an eclass or
@@ -350,6 +347,16 @@ src_install() {
rm -rf "${ED}"/usr/include "${ED}${MOZILLA_FIVE_HOME}"/{idl,include,lib,sdk}
fi
if use crypt ; then
emid=$(sed -n '/<em:id>/!d; s/.*\({.*}\).*/\1/; p; q' "${EROOT%/}"/usr/share/enigmail/install.rdf)
if [[ -n ${emid} ]]; then
dosym "${EPREFIX%/}"/usr/share/enigmail ${MOZILLA_FIVE_HOME}/extensions/${emid}
else
eerror "${EPREFIX%/}/usr/share/enigmail/install.rdf: No such file or directory"
die "<EM:ID> tag for x11-plugins/enigmail could not be found!"
fi
fi
if use chatzilla ; then
local emid='{59c81df5-4b7a-477b-912d-4e0fdf64e5f2}'
@@ -383,6 +390,25 @@ pkg_preinst() {
if [ -d ${MOZILLA_FIVE_HOME}/plugins ] ; then
rm ${MOZILLA_FIVE_HOME}/plugins -rf
fi
# Because PM's dont seem to properly merge a symlink replacing a directory
if use crypt ; then
local emid=$(sed -n '/<em:id>/!d; s/.*\({.*}\).*/\1/; p; q' "${EROOT%/}"/usr/share/enigmail/install.rdf)
local emidpath="${EROOT%/}"${MOZILLA_FIVE_HOME}/extensions/${emid}
if [[ -z ${emid} ]]; then
eerror "${EROOT%/}/usr/share/enigmail/install.rdf: No such file or directory"
die "Could not find enigmail on disk during pkg_preinst()"
fi
if [[ ! -h "${emidpath}" ]] && [[ -d "${emidpath}" ]]; then
rm -Rf "${emidpath}" || (
eerror "Could not remove enigmail directory from previous installation,"
eerror "You must remove this by hand and rename the symbolic link yourself:"
eerror
eerror "\t cd ${EPREFIX}${MOZILLA_FIVE_HOME}/extensions"
eerror "\t rm -Rf ${emid}"
eerror "\t mv ${emid}.backup* ${emid}" )
fi
fi
}
pkg_postinst() {