commit: d022b71b74ea02b3bd35dea5c32a6788b241bfa0
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Mon Jul 24 14:00:39 2017 +0000
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Mon Jul 24 14:00:39 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d022b71b
www-client/seamonkey: Fixing support of external enigmail package.
Package-Manager: Portage-2.3.6, Repoman-2.3.3
www-client/seamonkey/seamonkey-2.48-r1.ebuild | 34 +++++++++++++++++++++++----
1 file changed, 30 insertions(+), 4 deletions(-)
diff --git a/www-client/seamonkey/seamonkey-2.48-r1.ebuild
b/www-client/seamonkey/seamonkey-2.48-r1.ebuild
index ba09e5498e9..e68716cfeda 100644
--- a/www-client/seamonkey/seamonkey-2.48-r1.ebuild
+++ b/www-client/seamonkey/seamonkey-2.48-r1.ebuild
@@ -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() {