Gentoo Archives: gentoo-commits

From: Jory Pratt <anarchy@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/mozilla:master commit in: www-client/firefox/, mail-client/thunderbird/
Date: Sat, 02 May 2015 16:41:11
Message-Id: 1430584699.d7ebd7738625d9a6758029f0e06ed64bb8a4cc23.anarchy@gentoo
1 commit: d7ebd7738625d9a6758029f0e06ed64bb8a4cc23
2 Author: Jory A. Pratt <anarchy <AT> gentoo <DOT> org>
3 AuthorDate: Sat May 2 16:38:19 2015 +0000
4 Commit: Jory Pratt <anarchy <AT> gentoo <DOT> org>
5 CommitDate: Sat May 2 16:38:19 2015 +0000
6 URL: https://gitweb.gentoo.org/proj/mozilla.git/commit/?id=d7ebd773
7
8 Update enigmail, bump fx-38.0_beta9
9
10 .../thunderbird/thunderbird-31.6.0-r1.ebuild | 398 +++++++++++++++++++++
11 www-client/firefox/Manifest | 2 +-
12 ...38.0_beta7.ebuild => firefox-38.0_beta9.ebuild} | 0
13 3 files changed, 399 insertions(+), 1 deletion(-)
14
15 diff --git a/mail-client/thunderbird/thunderbird-31.6.0-r1.ebuild b/mail-client/thunderbird/thunderbird-31.6.0-r1.ebuild
16 new file mode 100644
17 index 0000000..0ab7683
18 --- /dev/null
19 +++ b/mail-client/thunderbird/thunderbird-31.6.0-r1.ebuild
20 @@ -0,0 +1,398 @@
21 +# Copyright 1999-2015 Gentoo Foundation
22 +# Distributed under the terms of the GNU General Public License v2
23 +# $Header: /var/cvsroot/gentoo-x86/mail-client/thunderbird/thunderbird-31.6.0.ebuild,v 1.1 2015/04/06 08:01:03 polynomial-c Exp $
24 +
25 +EAPI=5
26 +WANT_AUTOCONF="2.1"
27 +MOZ_ESR=""
28 +MOZ_LIGHTNING_VER="3.3"
29 +#MOZ_LIGHTNING_GDATA_VER="2.6.3"
30 +MOZ_LIGHTNING_GDATA_VER="1.0.3"
31 +
32 +# This list can be updated using scripts/get_langs.sh from the mozilla overlay
33 +MOZ_LANGS=(ar ast be bg bn-BD br ca cs da de el en en-GB en-US es-AR
34 +es-ES et eu fi fr fy-NL ga-IE gd gl he hr hu hy-AM id is it ja ko lt nb-NO
35 +nl nn-NO pa-IN pl pt-BR pt-PT rm ro ru si sk sl sq sr sv-SE ta-LK tr uk vi
36 +zh-CN zh-TW )
37 +
38 +# Convert the ebuild version to th firefox-24.0-patches-0.4.tar.xze upstream mozilla version, used by mozlinguas
39 +MOZ_PV="${PV/_beta/b}"
40 +# ESR releases have slightly version numbers
41 +if [[ ${MOZ_ESR} == 1 ]]; then
42 + MOZ_PV="${MOZ_PV}esr"
43 +fi
44 +MOZ_P="${PN}-${MOZ_PV}"
45 +
46 +# Enigmail version
47 +EMVER="1.8.1"
48 +# Upstream ftp release URI that's used by mozlinguas.eclass
49 +# We don't use the http mirror because it deletes old tarballs.
50 +MOZ_FTP_URI="ftp://ftp.mozilla.org/pub/${PN}/releases/"
51 +MOZ_HTTP_URI="http://ftp.mozilla.org/pub/${PN}/releases/"
52 +
53 +MOZCONFIG_OPTIONAL_JIT="enabled"
54 +inherit flag-o-matic toolchain-funcs mozconfig-v5.31 makeedit multilib autotools pax-utils check-reqs nsplugins mozlinguas
55 +
56 +DESCRIPTION="Thunderbird Mail Client"
57 +HOMEPAGE="http://www.mozilla.com/en-US/thunderbird/"
58 +
59 +KEYWORDS="~alpha ~amd64 ~arm ~ppc ~ppc64 ~x86 ~x86-fbsd ~amd64-linux ~x86-linux"
60 +SLOT="0"
61 +LICENSE="MPL-2.0 GPL-2 LGPL-2.1"
62 +IUSE="bindist crypt hardened ldap +lightning +minimal mozdom selinux"
63 +RESTRICT="!bindist? ( bindist )"
64 +
65 +PATCH="thunderbird-31.0-patches-0.1"
66 +PATCHFF="firefox-31.0-patches-0.2"
67 +
68 +SRC_URI="${SRC_URI}
69 + ${MOZ_FTP_URI}${MOZ_PV}/source/${MOZ_P}.source.tar.bz2
70 + ${MOZ_HTTP_URI}${MOZ_PV}/source/${MOZ_P}.source.tar.bz2
71 + crypt? ( http://www.enigmail.net/download/source/enigmail-${EMVER}.tar.gz )
72 + lightning? (
73 + ${MOZ_HTTP_URI/${PN}/calendar/lightning}${MOZ_LIGHTNING_VER}/linux/lightning.xpi -> lightning-${MOZ_LIGHTNING_VER}.xpi
74 + http://dev.gentoo.org/~axs/distfiles/gdata-provider-${MOZ_LIGHTNING_GDATA_VER}.tar.xz
75 + )
76 + http://dev.gentoo.org/~anarchy/mozilla/patchsets/${PATCH}.tar.xz
77 + http://dev.gentoo.org/~anarchy/mozilla/patchsets/${PATCHFF}.tar.xz
78 + http://dev.gentoo.org/~axs/distfiles/${PATCH}.tar.xz
79 + http://dev.gentoo.org/~axs/distfiles/${PATCHFF}.tar.xz
80 + http://dev.gentoo.org/~polynomial-c/mozilla/patchsets/${PATCH}.tar.xz"
81 +
82 +ASM_DEPEND=">=dev-lang/yasm-1.1"
83 +
84 +CDEPEND="
85 + >=dev-libs/nss-3.17.1
86 + >=dev-libs/nspr-4.10.6
87 + !x11-plugins/enigmail
88 + crypt? ( || (
89 + ( >=app-crypt/gnupg-2.0
90 + || (
91 + app-crypt/pinentry[gtk]
92 + app-crypt/pinentry[qt4]
93 + )
94 + )
95 + =app-crypt/gnupg-1.4*
96 + ) )"
97 +
98 +DEPEND="${CDEPEND}
99 + amd64? ( ${ASM_DEPEND}
100 + virtual/opengl )
101 + x86? ( ${ASM_DEPEND}
102 + virtual/opengl )"
103 +
104 +RDEPEND="${CDEPEND}
105 + selinux? ( sec-policy/selinux-thunderbird )
106 +"
107 +
108 +if [[ ${PV} =~ beta ]]; then
109 + S="${WORKDIR}/comm-beta"
110 +else
111 + S="${WORKDIR}/comm-esr${PV%%.*}"
112 +fi
113 +
114 +BUILD_OBJ_DIR="${S}/tbird"
115 +
116 +pkg_setup() {
117 + moz_pkgsetup
118 +
119 + export MOZILLA_DIR="${S}/mozilla"
120 +
121 + if ! use bindist ; then
122 + elog "You are enabling official branding. You may not redistribute this build"
123 + elog "to any users on your network or the internet. Doing so puts yourself into"
124 + elog "a legal problem with Mozilla Foundation"
125 + elog "You can disable it by emerging ${PN} _with_ the bindist USE-flag"
126 + elog
127 + fi
128 +}
129 +
130 +pkg_pretend() {
131 + # Ensure we have enough disk space to compile
132 + CHECKREQS_DISK_BUILD="4G"
133 + check-reqs_pkg_setup
134 +
135 + if use jit && [[ -n ${PROFILE_IS_HARDENED} ]]; then
136 + ewarn "You are emerging this package on a hardened profile with USE=jit enabled."
137 + ewarn "This is horribly insecure as it disables all PAGEEXEC restrictions."
138 + ewarn "Please ensure you know what you are doing. If you don't, please consider"
139 + ewarn "emerging the package with USE=-jit"
140 + fi
141 +}
142 +
143 +src_unpack() {
144 + unpack ${A}
145 +
146 + # Unpack language packs
147 + mozlinguas_src_unpack
148 +
149 + # Unpack lightning for calendar locales
150 + if use lightning ; then
151 + xpi_unpack lightning-${MOZ_LIGHTNING_VER}.xpi
152 + fi
153 +}
154 +
155 +src_prepare() {
156 + # Apply our Thunderbird patchset
157 + EPATCH_SUFFIX="patch" \
158 + EPATCH_FORCE="yes" \
159 + epatch "${WORKDIR}/thunderbird"
160 +
161 + # Apply our patchset from firefox to thunderbird as well
162 + pushd "${S}"/mozilla &>/dev/null || die
163 + EPATCH_SUFFIX="patch" \
164 + EPATCH_FORCE="yes" \
165 + epatch "${WORKDIR}/firefox"
166 + popd &>/dev/null || die
167 +
168 + # Ensure that are plugins dir is enabled as default
169 + sed -i -e "s:/usr/lib/mozilla/plugins:/usr/lib/nsbrowser/plugins:" \
170 + "${S}"/mozilla/xpcom/io/nsAppFileLocationProvider.cpp || die "sed failed to replace plugin path for 32bit!"
171 + sed -i -e "s:/usr/lib64/mozilla/plugins:/usr/lib64/nsbrowser/plugins:" \
172 + "${S}"/mozilla/xpcom/io/nsAppFileLocationProvider.cpp || die "sed failed to replace plugin path for 64bit!"
173 +
174 + # Don't exit with error when some libs are missing which we have in
175 + # system.
176 + sed '/^MOZ_PKG_FATAL_WARNINGS/s@= 1@= 0@' \
177 + -i "${S}"/mail/installer/Makefile.in || die
178 +
179 + # Don't error out when there's no files to be removed:
180 + sed 's@\(xargs rm\)$@\1 -f@' \
181 + -i "${S}"/mozilla/toolkit/mozapps/installer/packager.mk || die
182 +
183 + # Shell scripts sometimes contain DOS line endings; bug 391889
184 + grep -rlZ --include="*.sh" $'\r$' . |
185 + while read -r -d $'\0' file ; do
186 + einfo edos2unix "${file}"
187 + edos2unix "${file}"
188 + done
189 +
190 + # Confirm the version of lightning being grabbed for langpacks is the same
191 + # as that used in thunderbird
192 + local THIS_MOZ_LIGHTNING_VER=$(python "${S}"/calendar/lightning/build/makeversion.py ${PV})
193 + if [[ ${MOZ_LIGHTNING_VER} != ${THIS_MOZ_LIGHTNING_VER} ]]; then
194 + eqawarn "The version of lightning used for localization differs from the version"
195 + eqawarn "in thunderbird. Please update MOZ_LIGHTNING_VER in the ebuild from ${MOZ_LIGHTNING_VER}"
196 + eqawarn "to ${THIS_MOZ_LIGHTNING_VER}"
197 + fi
198 +
199 + # Allow user to apply any additional patches without modifing ebuild
200 + epatch_user
201 +
202 + eautoreconf
203 + # Ensure we run eautoreconf in mozilla to regenerate configure
204 + cd "${S}"/mozilla || die
205 + eautoconf
206 + cd "${S}"/mozilla/js/src || die
207 + eautoconf
208 +}
209 +
210 +src_configure() {
211 + declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
212 + MEXTENSIONS="default"
213 +
214 + ####################################
215 + #
216 + # mozconfig, CFLAGS and CXXFLAGS setup
217 + #
218 + ####################################
219 +
220 + mozconfig_init
221 + mozconfig_config
222 +
223 + # It doesn't compile on alpha without this LDFLAGS
224 + use alpha && append-ldflags "-Wl,--no-relax"
225 +
226 + # Add full relro support for hardened
227 + use hardened && append-ldflags "-Wl,-z,relro,-z,now"
228 +
229 + mozconfig_annotate '' --enable-extensions="${MEXTENSIONS}"
230 + mozconfig_annotate '' --disable-mailnews
231 +
232 + # Other tb-specific settings
233 + mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME}
234 + mozconfig_annotate '' --with-user-appdir=.thunderbird
235 +
236 + mozconfig_use_enable lightning calendar
237 + mozconfig_use_enable ldap
238 +
239 + # Bug #72667
240 + if use mozdom; then
241 + MEXTENSIONS="${MEXTENSIONS},inspector"
242 + fi
243 +
244 + # Use an objdir to keep things organized.
245 + echo "mk_add_options MOZ_OBJDIR=${BUILD_OBJ_DIR}" >> "${S}"/.mozconfig
246 +
247 + # Finalize and report settings
248 + mozconfig_final
249 +
250 + ####################################
251 + #
252 + # Configure and build
253 + #
254 + ####################################
255 +
256 + # Disable no-print-directory
257 + MAKEOPTS=${MAKEOPTS/--no-print-directory/}
258 +
259 + if [[ $(gcc-major-version) -lt 4 ]]; then
260 + append-cxxflags -fno-stack-protector
261 + elif [[ $(gcc-major-version) -gt 4 || $(gcc-minor-version) -gt 3 ]]; then
262 + if use amd64 || use x86; then
263 + append-flags -mno-avx
264 + fi
265 + fi
266 +
267 + if use crypt; then
268 + pushd "${WORKDIR}"/enigmail &>/dev/null ||die
269 + econf
270 + popd &>/dev/null ||die
271 + fi
272 +}
273 +
274 +src_compile() {
275 + mkdir -p "${BUILD_OBJ_DIR}" && cd "${BUILD_OBJ_DIR}" || die
276 +
277 + CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \
278 + MOZ_MAKE_FLAGS="${MAKEOPTS}" SHELL="${SHELL}" \
279 + emake -f "${S}"/client.mk
280 +
281 + # Only build enigmail extension if crypt enabled.
282 + if use crypt ; then
283 + einfo "Building enigmail"
284 + pushd "${WORKDIR}"/enigmail &>/dev/null || die
285 + emake -j1
286 + emake -j1 xpi
287 + popd &>/dev/null || die
288 + fi
289 +}
290 +
291 +src_install() {
292 + declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
293 + DICTPATH="\"${EPREFIX}/usr/share/myspell\""
294 +
295 + declare emid
296 + cd "${BUILD_OBJ_DIR}" || die
297 +
298 + # Copy our preference before omnijar is created.
299 + cp "${FILESDIR}"/thunderbird-gentoo-default-prefs-1.js-1 \
300 + "${BUILD_OBJ_DIR}/mozilla/dist/bin/defaults/pref/all-gentoo.js" \
301 + || die
302 +
303 + # Set default path to search for dictionaries.
304 + echo "pref(\"spellchecker.dictionary_path\", ${DICTPATH});" \
305 + >> "${BUILD_OBJ_DIR}/mozilla/dist/bin/defaults/pref/all-gentoo.js" \
306 + || die
307 +
308 + # Pax mark xpcshell for hardened support, only used for startupcache creation.
309 + pax-mark m "${BUILD_OBJ_DIR}"/mozilla/dist/bin/xpcshell
310 +
311 + MOZ_MAKE_FLAGS="${MAKEOPTS}" \
312 + emake DESTDIR="${D}" install
313 +
314 + # Install language packs
315 + mozlinguas_src_install
316 +
317 + if ! use bindist; then
318 + newicon "${S}"/other-licenses/branding/thunderbird/content/icon48.png thunderbird-icon.png
319 + domenu "${FILESDIR}"/icon/${PN}.desktop
320 + else
321 + newicon "${S}"/mail/branding/aurora/content/icon48.png thunderbird-icon-unbranded.png
322 + newmenu "${FILESDIR}"/icon/${PN}-unbranded.desktop \
323 + ${PN}.desktop
324 +
325 + sed -i -e "s:Mozilla\ Thunderbird:EarlyBird:g" \
326 + "${ED}"/usr/share/applications/${PN}.desktop
327 + fi
328 +
329 + if use crypt ; then
330 + local enigmail_xpipath="${WORKDIR}/enigmail/build"
331 + cd "${T}" || die
332 + unzip "${enigmail_xpipath}"/enigmail*.xpi install.rdf || die
333 + emid=$(sed -n '/<em:id>/!d; s/.*\({.*}\).*/\1/; p; q' install.rdf)
334 +
335 + dodir ${MOZILLA_FIVE_HOME}/extensions/${emid} || die
336 + cd "${D}"${MOZILLA_FIVE_HOME}/extensions/${emid} || die
337 + unzip "${enigmail_xpipath}"/enigmail*.xpi || die
338 + fi
339 +
340 + if use lightning ; then
341 + local l c
342 + mozlinguas_export
343 +
344 + emid="{a62ef8ec-5fdc-40c2-873c-223b8a6925cc}"
345 + # just for ESR31, install custom-rolled gdata-provider
346 + cd "${WORKDIR}/gdata-provider-${MOZ_LIGHTNING_GDATA_VER}" || die
347 + insinto ${MOZILLA_FIVE_HOME}/extensions/${emid}
348 + if [[ -e chrome.manifest.original ]]; then
349 + cp chrome.manifest.original chrome.manifest || die
350 + fi
351 + doins -r chrome.manifest components defaults modules install.rdf
352 + cd "${WORKDIR}/gdata-provider-${MOZ_LIGHTNING_GDATA_VER}/chrome" || die
353 + insinto ${MOZILLA_FIVE_HOME}/extensions/${emid}/chrome
354 + doins -r gdata-provider gdata-provider-en-US
355 + # Install locales for gdata-provider -- each locale is a directory tree
356 + for l in "${mozlinguas[@]}"; do if [[ -d gdata-provider-${l} ]]; then
357 + doins -r gdata-provider-${l}
358 + echo "locale gdata-provider ${l} chrome/gdata-provider-${l}/locale/${l}/" \
359 + >> "${ED}"/${MOZILLA_FIVE_HOME}/extensions/${emid}/chrome.manifest \
360 + || die "Error adding gdata-provider-${l} to chrome.manifest"
361 + else
362 + ewarn "Sorry, but lightning gdata-provider in ${P} does not support the ${l} locale"
363 + fi; done
364 +
365 + emid="{e2fda1a4-762b-4020-b5ad-a41df1933103}"
366 + dodir ${MOZILLA_FIVE_HOME}/extensions/${emid}
367 + cd "${ED}"${MOZILLA_FIVE_HOME}/extensions/${emid} || die
368 + unzip "${BUILD_OBJ_DIR}"/mozilla/dist/xpi-stage/lightning-*.xpi || die
369 + # Install locales for lightning - each locale is a jar file
370 + insinto ${MOZILLA_FIVE_HOME}/extensions/${emid}/chrome
371 + cd "${WORKDIR}"/lightning-${MOZ_LIGHTNING_VER}/chrome || die
372 + for l in "${mozlinguas[@]}"; do if [[ -e calendar-${l}.jar ]]; then
373 + for c in calendar lightning; do
374 + doins ${c}-${l}.jar
375 + echo "locale ${c} $l jar:chrome/${c}-${l}.jar!/locale/${l}/${c}/" \
376 + >> "${ED}"/${MOZILLA_FIVE_HOME}/extensions/${emid}/chrome.manifest \
377 + || die "Error adding ${c}-${l} to chrome.manifest"
378 + done
379 + else
380 + ewarn "Sorry, but lightning calendar in ${P} does not support the ${l} locale"
381 + fi; done
382 +
383 + # Fix mimetype so it shows up as a calendar application in GNOME 3
384 + # This requires that the .desktop file was already installed earlier
385 + sed -e "s:^\(MimeType=\):\1text/calendar;:" \
386 + -e "s:^\(Categories=\):\1Calendar;:" \
387 + -i "${ED}"/usr/share/applications/${PN}.desktop || die
388 + fi
389 +
390 + # Required in order for jit to work on hardened, for mozilla-31
391 + use jit && pax-mark pm "${ED}"${MOZILLA_FIVE_HOME}/{thunderbird,thunderbird-bin}
392 +
393 + # Plugin-container needs to be pax-marked for hardened to ensure plugins such as flash
394 + # continue to work as expected.
395 + pax-mark m "${ED}"${MOZILLA_FIVE_HOME}/plugin-container
396 +
397 + if use minimal; then
398 + rm -r "${ED}"/usr/include "${ED}"${MOZILLA_FIVE_HOME}/{idl,include,lib,sdk} || \
399 + die "Failed to remove sdk and headers"
400 + fi
401 +}
402 +
403 +pkg_postinst() {
404 + if use crypt; then
405 + local peimpl=$(eselect --brief --colour=no pinentry show)
406 + case "${peimpl}" in
407 + *gtk*|*qt*) ;;
408 + *) ewarn "The pinentry front-end currently selected is not one supported by thunderbird."
409 + ewarn "You may be prompted for your password in an inaccessible shell!!"
410 + ewarn "Please use 'eselect pinentry' to select either the gtk or qt front-end"
411 + ;;
412 + esac
413 + fi
414 + elog
415 + elog "If you experience problems with plugins please issue the"
416 + elog "following command : rm \${HOME}/.thunderbird/*/extensions.sqlite ,"
417 + elog "then restart thunderbird"
418 +}
419
420 diff --git a/www-client/firefox/Manifest b/www-client/firefox/Manifest
421 index 46401c1..5eeebfb 100644
422 --- a/www-client/firefox/Manifest
423 +++ b/www-client/firefox/Manifest
424 @@ -1,2 +1,2 @@
425 DIST firefox-38.0-patches-0.1.tar.xz 4464 SHA256 c3c5716633e0b1c0fcebb25ef9b1cb3d481e17b143fdefcd3c6e64946817efcf SHA512 002907ce6404cafb7218ff4dcafc47952857c2415f067a319e66d66518aa6f85f60debeb61ad57c2f8fa93e5350c155629e34edf1092b6b0bcc186e0dfd47524 WHIRLPOOL aa41e43820fc2f5b207feddad8c68355930fc0cb0300194690fa0731bb85b096d38201f0f01fd945d9b2eae7801a5831c33f34d2894f70a3986bef467b166387
426 -DIST firefox-38.0b7.source.tar.bz2 179854697 SHA256 d647099184259f6abc8551d5f80d08444152285c64d15796864884d1254f79a7 SHA512 2ff4f43cf907251b5339fff1ff5733b27cf7e559aa05a1fdf22bc0c9effba40f598cdcf1c942445a302a585a364063f7de20b554e69342add3d3a84843dfbc3c WHIRLPOOL 741518a73212b3b58da4579e3bc54840b3fa2f105a0ff32811c0350e949837d360ff0aa02c15c1bd1231e2329a0f15e5d85e8ab539a29d00a1f3b6cb7d65c5c3
427 +DIST firefox-38.0b9.source.tar.bz2 179820911 SHA256 3a9ed4315c5f83612dab3ba644bc54b188db6b4b51c2aee5a5f68ebd994430c0 SHA512 b4e835a47f0b79cee0fa29aaff346254806a64465a6552129fcc5fce04c58cc18eb2b1cd25fae6c5f6bb8e89f9b2c6aa8e18c002805cb2665f374b7fbcf0c0cb WHIRLPOOL b7c7bb009af6ed22a5538ee4e837ba7c6192196a395c4c71b8618febd18168143b52bf6a0dad309335af8c550aa0e13b01c0615bd11deec1a357fe940529ef24
428
429 diff --git a/www-client/firefox/firefox-38.0_beta7.ebuild b/www-client/firefox/firefox-38.0_beta9.ebuild
430 similarity index 100%
431 rename from www-client/firefox/firefox-38.0_beta7.ebuild
432 rename to www-client/firefox/firefox-38.0_beta9.ebuild