1 |
commit: f590e4543709513429cab89952a8166b4ee8ef6f |
2 |
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Jan 12 22:03:42 2019 +0000 |
4 |
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Jan 12 22:05:42 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f590e454 |
7 |
|
8 |
mail-client/thunderbird-bin: fix localization |
9 |
|
10 |
Closes: https://bugs.gentoo.org/673442 |
11 |
Package-Manager: Portage-2.3.55, Repoman-2.3.12 |
12 |
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org> |
13 |
|
14 |
.../files/thunderbird-gentoo-default-prefs-r1.js | 12 ++ |
15 |
.../thunderbird-bin-60.4.0-r1.ebuild | 187 +++++++++++++++++++++ |
16 |
2 files changed, 199 insertions(+) |
17 |
|
18 |
diff --git a/mail-client/thunderbird-bin/files/thunderbird-gentoo-default-prefs-r1.js b/mail-client/thunderbird-bin/files/thunderbird-gentoo-default-prefs-r1.js |
19 |
new file mode 100644 |
20 |
index 00000000000..6c5a4dc6b6e |
21 |
--- /dev/null |
22 |
+++ b/mail-client/thunderbird-bin/files/thunderbird-gentoo-default-prefs-r1.js |
23 |
@@ -0,0 +1,12 @@ |
24 |
+// disable auto-update |
25 |
+pref("app.update.enabled", false); |
26 |
+pref("app.update.autoInstallEnabled", false); |
27 |
+ |
28 |
+// localization |
29 |
+// "intl.locale.matchOS" doesn't exist anymore, see https://mail.mozilla.org/pipermail/firefox-dev/2017-December/005991.html |
30 |
+pref("intl.locale.requested", ""); |
31 |
+ |
32 |
+// misc |
33 |
+pref("browser.display.use_system_colors", true); |
34 |
+pref("mail.folder.views.version", "1"); |
35 |
+pref("mail.shell.checkDefaultClient", false); |
36 |
|
37 |
diff --git a/mail-client/thunderbird-bin/thunderbird-bin-60.4.0-r1.ebuild b/mail-client/thunderbird-bin/thunderbird-bin-60.4.0-r1.ebuild |
38 |
new file mode 100644 |
39 |
index 00000000000..8837f75f140 |
40 |
--- /dev/null |
41 |
+++ b/mail-client/thunderbird-bin/thunderbird-bin-60.4.0-r1.ebuild |
42 |
@@ -0,0 +1,187 @@ |
43 |
+# Copyright 1999-2019 Gentoo Authors |
44 |
+# Distributed under the terms of the GNU General Public License v2 |
45 |
+ |
46 |
+EAPI=6 |
47 |
+MOZ_ESR="" |
48 |
+MOZ_LIGHTNING_VER="6.2.2.1" |
49 |
+ |
50 |
+# Can be updated using scripts/get_langs.sh from mozilla overlay |
51 |
+MOZ_LANGS=(ar ast be bg br ca cs cy da de el en en-GB en-US es-AR |
52 |
+es-ES et eu fi fr fy-NL ga-IE gd gl he hr hsb hu hy-AM id is it ja ko lt |
53 |
+nb-NO nl nn-NO pl pt-BR pt-PT rm ro ru si sk sl sq sr sv-SE tr |
54 |
+uk vi zh-CN zh-TW ) |
55 |
+ |
56 |
+# Convert the ebuild version to the upstream mozilla version, used by |
57 |
+MOZ_PN="${PN/-bin}" |
58 |
+MOZ_PV="${PV/_beta/b}" |
59 |
+MOZ_PV="${MOZ_PV/_rc/rc}" |
60 |
+ |
61 |
+if [[ ${MOZ_ESR} == 1 ]]; then |
62 |
+ # ESR releases have slightly version numbers |
63 |
+ MOZ_PV="${MOZ_PV}esr" |
64 |
+fi |
65 |
+ |
66 |
+MOZ_P="${MOZ_PN}-${MOZ_PV}" |
67 |
+ |
68 |
+MOZ_HTTP_URI="https://archive.mozilla.org/pub/${MOZ_PN}/releases" |
69 |
+ |
70 |
+inherit eutils multilib pax-utils xdg-utils gnome2-utils nsplugins mozlinguas-v2 |
71 |
+ |
72 |
+DESCRIPTION="Thunderbird Mail Client" |
73 |
+SRC_URI="${SRC_URI} |
74 |
+ amd64? ( ${MOZ_HTTP_URI}/${MOZ_PV}/linux-x86_64/en-US/${MOZ_P}.tar.bz2 -> ${PN}_x86_64-${PV}.tar.bz2 ) |
75 |
+ x86? ( ${MOZ_HTTP_URI}/${MOZ_PV}/linux-i686/en-US/${MOZ_P}.tar.bz2 -> ${PN}_i686-${PV}.tar.bz2 ) |
76 |
+ https://dev.gentoo.org/~axs/distfiles/lightning-${MOZ_LIGHTNING_VER}.tar.xz |
77 |
+" |
78 |
+# the below only works when upstream releases the xpi with all locales bundled |
79 |
+# ${MOZ_HTTP_URI/${MOZ_PN}/calendar/lightning}/${MOZ_LIGHTNING_VER}/linux/lightning.xpi -> lightning-${MOZ_LIGHTNING_VER}.xpi |
80 |
+ |
81 |
+HOMEPAGE="https://www.thunderbird.net/" |
82 |
+RESTRICT="strip mirror" |
83 |
+ |
84 |
+KEYWORDS="-* amd64 x86" |
85 |
+SLOT="0" |
86 |
+LICENSE="MPL-2.0 GPL-2 LGPL-2.1" |
87 |
+IUSE="+crashreporter +ffmpeg +pulseaudio selinux" |
88 |
+ |
89 |
+DEPEND="app-arch/unzip |
90 |
+ app-arch/zip" |
91 |
+ |
92 |
+RDEPEND="virtual/freedesktop-icon-theme |
93 |
+ dev-libs/atk |
94 |
+ >=sys-apps/dbus-0.60 |
95 |
+ >=dev-libs/dbus-glib-0.72 |
96 |
+ >=dev-libs/glib-2.26:2 |
97 |
+ >=media-libs/alsa-lib-1.0.16 |
98 |
+ media-libs/fontconfig |
99 |
+ >=media-libs/freetype-2.4.10:2 |
100 |
+ >=x11-libs/cairo-1.10[X] |
101 |
+ x11-libs/gdk-pixbuf:2 |
102 |
+ >=x11-libs/gtk+-2.18:2 |
103 |
+ >=x11-libs/gtk+-3.4.0:3 |
104 |
+ x11-libs/libX11 |
105 |
+ x11-libs/libXext |
106 |
+ x11-libs/libXrender |
107 |
+ x11-libs/libXt |
108 |
+ >=x11-libs/pango-1.22.0 |
109 |
+ pulseaudio? ( !<media-sound/apulse-0.1.9 |
110 |
+ || ( media-sound/pulseaudio media-sound/apulse ) ) |
111 |
+ ffmpeg? ( media-video/ffmpeg ) |
112 |
+ crashreporter? ( net-misc/curl ) |
113 |
+ selinux? ( sec-policy/selinux-thunderbird ) |
114 |
+" |
115 |
+ |
116 |
+QA_PREBUILT=" |
117 |
+ opt/${MOZ_PN}/*.so |
118 |
+ opt/${MOZ_PN}/${MOZ_PN} |
119 |
+ opt/${MOZ_PN}/${PN} |
120 |
+ opt/${MOZ_PN}/crashreporter |
121 |
+ opt/${MOZ_PN}/plugin-container |
122 |
+ opt/${MOZ_PN}/mozilla-xremote-client |
123 |
+ opt/${MOZ_PN}/updater |
124 |
+" |
125 |
+ |
126 |
+S="${WORKDIR}/${MOZ_PN}" |
127 |
+ |
128 |
+src_unpack() { |
129 |
+ unpack ${A} |
130 |
+ |
131 |
+ # Unpack language packs |
132 |
+ mozlinguas_src_unpack |
133 |
+ #xpi_unpack lightning-${MOZ_LIGHTNING_VER}.xpi |
134 |
+} |
135 |
+ |
136 |
+src_prepare() { |
137 |
+ default |
138 |
+ |
139 |
+ # Lightning |
140 |
+ local emid='{e2fda1a4-762b-4020-b5ad-a41df1933103}' |
141 |
+ local emxpi="${S}/distribution/extensions/${emid}.xpi" |
142 |
+ if [[ ! -f "${emxpi}" ]]; then |
143 |
+ die "Lightning is missing -- something is wrong. Please check ebuild/src!" |
144 |
+ else |
145 |
+ ebegin "Add localization to Lightning ..." |
146 |
+ # hide warning regarding extra bytes at beginning or within zipfile |
147 |
+ unzip -qo "${emxpi}" -d "${WORKDIR}/${emid}" 2>/dev/null |
148 |
+ rm -f "${emxpi}" || die |
149 |
+ |
150 |
+ # Install language packs for calendar |
151 |
+ mozlinguas_xpistage_langpacks \ |
152 |
+ "${WORKDIR}/${emid}" \ |
153 |
+ "${WORKDIR}"/lightning-${MOZ_LIGHTNING_VER} lightning calendar |
154 |
+ |
155 |
+ # roll a .xpi that mimicks what upstream would roll |
156 |
+ pushd "${WORKDIR}/${emid}" &>/dev/null || die |
157 |
+ zip -9 -q -r "${emxpi}" * || die |
158 |
+ popd &>/dev/null || die |
159 |
+ eend 0 |
160 |
+ fi |
161 |
+} |
162 |
+ |
163 |
+src_install() { |
164 |
+ declare MOZILLA_FIVE_HOME="/opt/${MOZ_PN}" |
165 |
+ |
166 |
+ local size sizes icon_path icon name |
167 |
+ sizes="16 22 24 32 48 128" |
168 |
+ icon_path="${S}/chrome/icons/default" |
169 |
+ icon="${PN}-icon" |
170 |
+ name="Thunderbird" |
171 |
+ |
172 |
+ # Install icons and .desktop for menu entry |
173 |
+ for size in ${sizes}; do |
174 |
+ insinto "/usr/share/icons/hicolor/${size}x${size}/apps" |
175 |
+ newins "${icon_path}/default${size}.png" "${icon}.png" |
176 |
+ done |
177 |
+ # Install a 48x48 icon into /usr/share/pixmaps for legacy DEs |
178 |
+ newicon "${S}"/chrome/icons/default/default48.png "${icon}.png" |
179 |
+ domenu "${FILESDIR}"/icon/${PN}.desktop |
180 |
+ |
181 |
+ # Install thunderbird in /opt |
182 |
+ dodir ${MOZILLA_FIVE_HOME%/*} |
183 |
+ mv "${S}" "${ED}"${MOZILLA_FIVE_HOME} |
184 |
+ cd "${WORKDIR}" || die # PWD no longer exists so move to somewhere that does |
185 |
+ |
186 |
+ # Install language packs |
187 |
+ MOZEXTENSION_TARGET="distribution/extensions" \ |
188 |
+ mozlinguas_src_install |
189 |
+ |
190 |
+ # Create /usr/bin/thunderbird-bin |
191 |
+ dodir /usr/bin/ |
192 |
+ local apulselib=$(usex pulseaudio "/usr/$(get_libdir)/apulse:" "") |
193 |
+ cat <<EOF >"${D}"/usr/bin/${PN} |
194 |
+#!/bin/sh |
195 |
+unset LD_PRELOAD |
196 |
+LD_LIBRARY_PATH="${apulselib}${MOZILLA_FIVE_HOME}" \\ |
197 |
+exec ${MOZILLA_FIVE_HOME}/thunderbird "\$@" |
198 |
+EOF |
199 |
+ fperms 0755 /usr/bin/${PN} |
200 |
+ |
201 |
+ # revdep-rebuild entry |
202 |
+ insinto /etc/revdep-rebuild |
203 |
+ doins "${FILESDIR}"/10${PN} |
204 |
+ |
205 |
+ # Enable very specific settings for thunderbird |
206 |
+ insinto ${MOZILLA_FIVE_HOME}/defaults/pref/ |
207 |
+ newins "${FILESDIR}"/thunderbird-gentoo-default-prefs-r1.js all-gentoo.js |
208 |
+ |
209 |
+ # Plugins dir |
210 |
+ share_plugins_dir |
211 |
+ |
212 |
+ pax-mark mr "${ED}"${MOZILLA_FIVE_HOME}/{thunderbird-bin,thunderbird,plugin-container} |
213 |
+} |
214 |
+ |
215 |
+pkg_preinst() { |
216 |
+ gnome2_icon_savelist |
217 |
+} |
218 |
+ |
219 |
+pkg_postinst() { |
220 |
+ xdg_desktop_database_update |
221 |
+ gnome2_icon_cache_update |
222 |
+ |
223 |
+ use ffmpeg || ewarn "USE=-ffmpeg : HTML5 video will not render without media-video/ffmpeg installed" |
224 |
+ use pulseaudio || ewarn "USE=-pulseaudio : audio will not play without pulseaudio installed" |
225 |
+} |
226 |
+ |
227 |
+pkg_postrm() { |
228 |
+ gnome2_icon_cache_update |
229 |
+} |