x11-plugins/enigmail: bump for CVE-2018-12019
[gentoo.git] / x11-plugins / enigmail / enigmail-2.0.6.1.ebuild
1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5 PYTHON_COMPAT=( python2_7 )
6
7 inherit python-any-r1
8
9 DESCRIPTION="Mozilla extension to provide GPG support in mail clients"
10 HOMEPAGE="http://www.enigmail.net/"
11
12 SLOT="0"
13 LICENSE="MPL-2.0 GPL-3"
14 IUSE=""
15 if [[ ${PV} == *9999 ]]; then
16         inherit git-r3
17         EGIT_REPO_URI="https://git.code.sf.net/p/enigmail/source"
18         S="${WORKDIR}/${P}"
19 else
20         if [[ ${PV} = *_beta* ]] ; then
21                 SRC_URI="http://www.enigmail.net/download/beta/${P/_/-}.tar.gz"
22         else
23                 SRC_URI="http://www.enigmail.net/download/source/${P}.tar.gz"
24                 KEYWORDS="~alpha ~amd64 ~arm ~ppc ~ppc64 ~x86 ~x86-fbsd ~amd64-linux ~x86-linux"
25         fi
26         S="${WORKDIR}/${PN}"
27 fi
28
29 RDEPEND="|| (
30                 ( >=app-crypt/gnupg-2.0
31                         || (
32                                 app-crypt/pinentry[gtk(-)]
33                                 app-crypt/pinentry[qt4(-)]
34                                 app-crypt/pinentry[qt5(-)]
35                         )
36                 )
37                 =app-crypt/gnupg-1.4*
38         )
39         !<mail-client/thunderbird-52.5.0
40         !<www-client/seamonkey-2.49.5.0_p0
41 "
42 DEPEND="${RDEPEND}
43         ${PYTHON_DEPS}
44         app-arch/zip
45         dev-lang/perl
46         "
47
48 src_compile() {
49         emake ipc public ui package lang stdlib
50         emake xpi
51
52 }
53
54 src_install() {
55         local emid=$(sed -n '/<em:id>/!d; s/.*\({.*}\).*/\1/; p; q' build/dist/install.rdf)
56         [[ -n ${emid} ]] || die "Could not scrape EM:ID from install.rdf"
57
58         mv build/enigmail*.xpi build/"${emid}.xpi" || die 'Could not rename XPI to match EM:ID'
59
60         # thunderbird
61         insinto "/usr/share/mozilla/extensions/{3550f703-e582-4d05-9a08-453d09bdfdc6}"
62         doins build/"${emid}.xpi"
63
64         # seamonkey
65         insinto "/usr/share/mozilla/extensions/{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}"
66         doins build/"${emid}.xpi"
67 }
68
69 pkg_postinst() {
70         local peimpl=$(eselect --brief --colour=no pinentry show)
71         case "${peimpl}" in
72         *gtk*|*qt*) ;;
73         *)      ewarn "The pinentry front-end currently selected is not one supported by thunderbird."
74                 ewarn "You may be prompted for your password in an inaccessible shell!!"
75                 ewarn "Please use 'eselect pinentry' to select either the gtk or qt front-end"
76                 ;;
77         esac
78         if [[ -n ${REPLACING_VERSIONS} ]]; then
79                 elog
80                 elog "Please restart thunderbird and/or seamonkey in order for them to use"
81                 elog "the newly installed version of enigmail."
82         fi
83 }