Gentoo Archives: gentoo-commits

From: Ian Stakenvicius <axs@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/mozilla:master commit in: x11-plugins/enigmail/
Date: Thu, 23 Nov 2017 19:47:46
Message-Id: 1511465603.573341008f21c6d1d406e91b70d541a451fac9cb.axs@gentoo
1 commit: 573341008f21c6d1d406e91b70d541a451fac9cb
2 Author: Ian Stakenvicius <axs <AT> gentoo <DOT> org>
3 AuthorDate: Thu Nov 23 19:33:13 2017 +0000
4 Commit: Ian Stakenvicius <axs <AT> gentoo <DOT> org>
5 CommitDate: Thu Nov 23 19:33:23 2017 +0000
6 URL: https://gitweb.gentoo.org/proj/mozilla.git/commit/?id=57334100
7
8 enigmail: make extension installation fully standalone
9
10 This change in the installation method allows thunderbird and seamonkey
11 to load enigmail without the need for any compile-time (and therefore
12 use-flag) dependency.
13
14 ...l-1.9.8.3.ebuild => enigmail-1.9.8.3-r1.ebuild} | 24 +++++++++++++++++++---
15 x11-plugins/enigmail/enigmail-9999.ebuild | 19 +++++++++++++++--
16 2 files changed, 38 insertions(+), 5 deletions(-)
17
18 diff --git a/x11-plugins/enigmail/enigmail-1.9.8.3.ebuild b/x11-plugins/enigmail/enigmail-1.9.8.3-r1.ebuild
19 similarity index 61%
20 rename from x11-plugins/enigmail/enigmail-1.9.8.3.ebuild
21 rename to x11-plugins/enigmail/enigmail-1.9.8.3-r1.ebuild
22 index ff5e7f5..ac2762a 100644
23 --- a/x11-plugins/enigmail/enigmail-1.9.8.3.ebuild
24 +++ b/x11-plugins/enigmail/enigmail-1.9.8.3-r1.ebuild
25 @@ -24,7 +24,10 @@ RDEPEND="|| (
26 )
27 )
28 =app-crypt/gnupg-1.4*
29 - )"
30 + )
31 + !<=mail-client/thunderbird-52.5.0
32 + !<=mail-client/thunderbird-2.49.5.0_p0
33 + "
34 DEPEND="${RDEPEND}
35 ${PYTHON_DEPS}
36 app-arch/zip
37 @@ -40,8 +43,18 @@ src_compile() {
38 }
39
40 src_install() {
41 - insinto /usr/share/${PN}
42 - doins -r build/dist/{chrome,components,defaults,modules,wrappers,chrome.manifest,install.rdf}
43 + local emid=$(sed -n '/<em:id>/!d; s/.*\({.*}\).*/\1/; p; q' build/dist/install.rdf)
44 + [[ -n ${emid} ]] || die "Could not scrape EM:ID from install.rdf"
45 +
46 + mv build/enigmail*.xpi build/"${emid}.xpi" || die 'Could not rename XPI to match EM:ID'
47 +
48 + # thunderbird
49 + insinto "/usr/share/mozilla/extensions/{3550f703-e582-4d05-9a08-453d09bdfdc6}"
50 + doins build/"${emid}.xpi"
51 +
52 + # seamonkey
53 + insinto "/usr/share/mozilla/extensions/{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}"
54 + doins build/"${emid}.xpi"
55 }
56
57 pkg_postinst() {
58 @@ -53,4 +66,9 @@ pkg_postinst() {
59 ewarn "Please use 'eselect pinentry' to select either the gtk or qt front-end"
60 ;;
61 esac
62 + if [[ -n ${REPLACING_VERSIONS} ]]; then
63 + elog ""
64 + elog "Please restart thunderbird and/or seamonkey in order for them to use"
65 + elog "the newly installed version of enigmail."
66 + fi
67 }
68
69 diff --git a/x11-plugins/enigmail/enigmail-9999.ebuild b/x11-plugins/enigmail/enigmail-9999.ebuild
70 index edffcc2..ec95bc9 100644
71 --- a/x11-plugins/enigmail/enigmail-9999.ebuild
72 +++ b/x11-plugins/enigmail/enigmail-9999.ebuild
73 @@ -44,8 +44,18 @@ src_compile() {
74 }
75
76 src_install() {
77 - insinto /usr/share/${PN}
78 - doins -r build/dist/{chrome,components,defaults,modules,wrappers,chrome.manifest,install.rdf}
79 + local emid=$(sed -n '/<em:id>/!d; s/.*\({.*}\).*/\1/; p; q' build/dist/install.rdf)
80 + [[ -n ${emid} ]] || die "Could not scrape EM:ID from install.rdf"
81 +
82 + mv build/enigmail*.xpi build/"${emid}.xpi" || die 'Could not rename XPI to match EM:ID'
83 +
84 + # thunderbird
85 + insinto "/usr/share/mozilla/extensions/{3550f703-e582-4d05-9a08-453d09bdfdc6}"
86 + doins build/"${emid}.xpi"
87 +
88 + # seamonkey
89 + insinto "/usr/share/mozilla/extensions/{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}"
90 + doins build/"${emid}.xpi"
91 }
92
93 pkg_postinst() {
94 @@ -57,4 +67,9 @@ pkg_postinst() {
95 ewarn "Please use 'eselect pinentry' to select either the gtk or qt front-end"
96 ;;
97 esac
98 + if [[ -n ${REPLACING_VERSIONS} ]]; then
99 + elog
100 + elog "Please restart thunderbird and/or seamonkey in order for them to use"
101 + elog "the newly installed version of enigmail."
102 + fi
103 }