Gentoo Archives: gentoo-commits

From: Lars Wendler <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: www-client/seamonkey/
Date: Thu, 02 Jul 2020 08:48:08
Message-Id: 1593679682.8e3c533dbb49d9b2d194a602c36ae6e47e9d520c.polynomial-c@gentoo
1 commit: 8e3c533dbb49d9b2d194a602c36ae6e47e9d520c
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jul 2 08:47:54 2020 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Thu Jul 2 08:48:02 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8e3c533d
7
8 www-client/seamonkey: Bump to version 2.53.3_beta1
9
10 Package-Manager: Portage-2.3.103, Repoman-2.3.23
11 Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
12
13 www-client/seamonkey/Manifest | 2 +
14 www-client/seamonkey/seamonkey-2.53.3_beta1.ebuild | 529 +++++++++++++++++++++
15 2 files changed, 531 insertions(+)
16
17 diff --git a/www-client/seamonkey/Manifest b/www-client/seamonkey/Manifest
18 index 9893cf2fa94..9ac7d979a57 100644
19 --- a/www-client/seamonkey/Manifest
20 +++ b/www-client/seamonkey/Manifest
21 @@ -1,3 +1,5 @@
22 DIST seamonkey-2.53.2-patches-01.tar.xz 41408 BLAKE2B f59ef0b85a85c69363c5d510fb4b81f562bcaa3cf6f3a2f45c6471b8498d7e19455bada6e8571609aa1869b9ea17b827290b9769fd02137e61b70cccf45558f9 SHA512 3304ce6d0c1cfa82f99c795456068664561ebe48ecdb0a4411b1b476e633c9beafac617ac45c6bbe633874c2627811235235d3c1a10db34d7dd37365347947d5
23 DIST seamonkey-2.53.2.source-l10n.tar.xz 12117368 BLAKE2B def32428c93f8c00318140a4e18458242166d5a2f96d40335dea89f7e3932249b14f97dfc309c7ef6af4274e43ad69ee9b8ceb30a5991c9819e85b72c9f9ba5d SHA512 47489182eeb31fdf103570cdbb7490a0a6c3ac5b48385e517bfc27cff600fd6d8c77ac1bd0e323ad50041e5b01659c00cba401ab5bd7baeb7634db909865584e
24 DIST seamonkey-2.53.2.source.tar.xz 291744036 BLAKE2B 23908f875a70fba1a8034a447e838dbbe362b5ba6527d2e0617c0c2e896c0566150fcaba8a4af5a2a5ba157492f95fefe6a8045492e38f10614edd6450ce0eb6 SHA512 58dd605a916ef7fb9cad112bb54fffc837690e458e1254b685f21df1bc8808a9b53d27147cad1064294c789d1f77f17c9f6adecf2be906afa44128496f72a805
25 +DIST seamonkey-2.53.3_beta1.source-l10n.tar.xz 12088948 BLAKE2B 5f3d2f3d0cf70d923d47a0536f1bfa873c6d852e3db2f7a9a381b85117c22df8c18e98f15dc87bf046915248766d001d08abfc48f318d0427326d33bd6e17816 SHA512 c4f8773cb9d3f526fa54cd767e88173e0794aea615958fae60d3241ece37b52fe36db1739252bc75d5e59bbf7f4c292393059b7dee8d4e46ba044a58ff60e7b6
26 +DIST seamonkey-2.53.3_beta1.source.tar.xz 294211732 BLAKE2B 6223a283dcaa873e990bbc6cec97f9d23033f7c9dd79c8f2c6d029376374c5159155898e00649e90cb4e001c26702f815fed030cf8ed23b5bc30addf7519f9ab SHA512 14d55a8f6594f42c582a2c9520da5475ce0a19ad6260a268d5908073909a34ab7b17a2aaf436721bbaff32700db8f94404f4326011ac599c93757d41df451465
27
28 diff --git a/www-client/seamonkey/seamonkey-2.53.3_beta1.ebuild b/www-client/seamonkey/seamonkey-2.53.3_beta1.ebuild
29 new file mode 100644
30 index 00000000000..8d4b46d1b78
31 --- /dev/null
32 +++ b/www-client/seamonkey/seamonkey-2.53.3_beta1.ebuild
33 @@ -0,0 +1,529 @@
34 +# Copyright 1999-2020 Gentoo Authors
35 +# Distributed under the terms of the GNU General Public License v2
36 +
37 +EAPI=6
38 +WANT_AUTOCONF="2.1"
39 +
40 +PYTHON_COMPAT=( python3_{6,7,8} )
41 +PYTHON_REQ_USE='ncurses,sqlite,ssl,threads(+)'
42 +
43 +# This list can be updated with scripts/get_langs.sh from the mozilla overlay
44 +# note - could not roll langpacks for: ca fi
45 +#MOZ_LANGS=(ca cs de en-GB es-AR es-ES fi fr gl hu it ja lt nb-NO nl pl pt-PT
46 +# ru sk sv-SE tr uk zh-CN zh-TW)
47 +MOZ_LANGS=(cs de en-GB es-AR es-ES fr hu it ja lt nl pl pt-PT
48 + ru sk sv-SE zh-CN zh-TW)
49 +
50 +MOZ_PV="${PV/_pre*}"
51 +MOZ_PV="${MOZ_PV/_alpha/a}"
52 +MOZ_PV="${MOZ_PV/_beta/b}"
53 +MOZ_PV="${MOZ_PV/_rc/rc}"
54 +MOZ_PV="${MOZ_PV/_p[0-9]}"
55 +MOZ_P="${P}"
56 +MY_MOZ_P="${PN}-${MOZ_PV}"
57 +
58 +if [[ ${PV} == *_pre* ]] ; then
59 + MOZ_HTTP_URI="https://archive.mozilla.org/pub/${PN}/candidates/${MOZ_PV}-candidates/build${PV##*_pre}"
60 +else
61 + MOZ_HTTP_URI="https://archive.mozilla.org/pub/${PN}/releases/${MOZ_PV}"
62 +fi
63 +
64 +S="${WORKDIR}/${MY_MOZ_P}"
65 +SRC_URI="${MOZ_HTTP_URI}/source/${MY_MOZ_P}.source.tar.xz -> ${P}.source.tar.xz
66 + ${MOZ_HTTP_URI}/source/${MY_MOZ_P}.source-l10n.tar.xz -> ${P}.source-l10n.tar.xz"
67 +
68 +MOZ_GENERATE_LANGPACKS=1
69 +MOZ_L10N_SOURCEDIR="${S}/${P}-l10n"
70 +inherit autotools check-reqs flag-o-matic mozcoreconf-v6 mozextension mozlinguas-v2 nsplugins pax-utils toolchain-funcs xdg-utils
71 +
72 +PATCH="${PN}-2.53.2-patches-01"
73 +
74 +DESCRIPTION="Seamonkey Web Browser"
75 +HOMEPAGE="http://www.seamonkey-project.org"
76 +KEYWORDS="~amd64 ~ppc64 ~x86"
77 +
78 +SLOT="0"
79 +LICENSE="MPL-2.0 GPL-2 LGPL-2.1"
80 +IUSE="+calendar +chatzilla +crypt dbus debug +gmp-autoupdate +ipc jack minimal
81 +neon pulseaudio +roaming selinux startup-notification system-harfbuzz system-icu
82 +system-jpeg system-libevent system-sqlite system-libvpx test wifi"
83 +RESTRICT="!test? ( test )"
84 +
85 +SRC_URI+="
86 + https://dev.gentoo.org/~polynomial-c/mozilla/patchsets/${PATCH}.tar.xz
87 +"
88 +
89 +ASM_DEPEND=">=dev-lang/yasm-1.1"
90 +
91 +DEPEND="
92 + >=app-text/hunspell-1.5.4:=
93 + dev-libs/atk
94 + >=dev-libs/glib-2.26:2
95 + >=dev-libs/libffi-3.0.10:=
96 + >=dev-libs/nspr-4.23
97 + >=dev-libs/nss-3.47.1
98 + media-libs/fontconfig
99 + >=media-libs/freetype-2.4.10
100 + >=media-libs/libpng-1.6.31:0=[apng]
101 + >=media-libs/mesa-10.2:=
102 + >=sys-libs/zlib-1.2.3
103 + >=x11-libs/cairo-1.10[X]
104 + x11-libs/gdk-pixbuf
105 + >=x11-libs/gtk+-2.18:2
106 + >=x11-libs/gtk+-3.4.0:3
107 + x11-libs/libX11
108 + x11-libs/libXcomposite
109 + x11-libs/libXdamage
110 + x11-libs/libXext
111 + x11-libs/libXfixes
112 + x11-libs/libXrender
113 + x11-libs/libXt
114 + >=x11-libs/pango-1.22.0
115 + >=x11-libs/pixman-0.19.2
116 + media-video/ffmpeg
117 + virtual/freedesktop-icon-theme
118 + dbus? (
119 + >=dev-libs/dbus-glib-0.72
120 + >=sys-apps/dbus-0.60
121 + )
122 + jack? ( virtual/jack )
123 + crypt? ( <x11-plugins/enigmail-2.1.0 )
124 + kernel_linux? ( !pulseaudio? ( media-libs/alsa-lib ) )
125 + pulseaudio? ( || (
126 + media-sound/pulseaudio
127 + >=media-sound/apulse-0.1.9
128 + ) )
129 + startup-notification? ( >=x11-libs/startup-notification-0.8 )
130 + system-harfbuzz? (
131 + >=media-gfx/graphite2-1.3.9-r1
132 + >=media-libs/harfbuzz-1.3.3:0=
133 + )
134 + system-icu? ( >=dev-libs/icu-59.1:= )
135 + system-jpeg? ( >=media-libs/libjpeg-turbo-1.2.1 )
136 + system-libevent? ( >=dev-libs/libevent-2.0:0= )
137 + system-libvpx? ( >=media-libs/libvpx-1.5.0:0=[postproc] )
138 + system-sqlite? ( >=dev-db/sqlite-3.19.3:3[secure-delete,debug=] )
139 + wifi? (
140 + kernel_linux? (
141 + >=dev-libs/dbus-glib-0.72
142 + net-misc/networkmanager
143 + >=sys-apps/dbus-0.60
144 + )
145 + )
146 +"
147 +RDEPEND="
148 + ${DEPEND}
149 + selinux? ( sec-policy/selinux-mozilla )
150 +"
151 +# Convert to BDEPEND once the ebuild goes EAPI-7
152 +DEPEND+="
153 + app-arch/unzip
154 + app-arch/zip
155 + dev-lang/perl
156 + sys-apps/findutils
157 + >=sys-devel/binutils-2.16.1
158 + virtual/pkgconfig
159 + >=virtual/rust-1.34.0
160 + amd64? (
161 + ${ASM_DEPEND}
162 + virtual/opengl
163 + )
164 + x86? (
165 + ${ASM_DEPEND}
166 + virtual/opengl
167 + )
168 +"
169 +
170 +# allow GMP_PLUGIN_LIST to be set in an eclass or
171 +# overridden in the enviromnent (advanced hackers only)
172 +if [[ -z $GMP_PLUGIN_LIST ]] ; then
173 + GMP_PLUGIN_LIST=( gmp-gmpopenh264 gmp-widevinecdm )
174 +fi
175 +
176 +BUILD_OBJ_DIR="${S}/seamonk"
177 +
178 +pkg_setup() {
179 + if [[ ${PV} == *_pre* ]] ; then
180 + ewarn "You're using an unofficial release of ${PN}. Don't file any bug in"
181 + ewarn "Gentoo's Bugtracker against this package in case it breaks for you."
182 + ewarn "Those belong to upstream: https://bugzilla.mozilla.org"
183 + fi
184 +
185 + moz_pkgsetup
186 +}
187 +
188 +pkg_pretend() {
189 + # Ensure we have enough disk space to compile
190 + if use debug || use test ; then
191 + CHECKREQS_DISK_BUILD="16G"
192 + else
193 + CHECKREQS_DISK_BUILD="12G"
194 + fi
195 + check-reqs_pkg_setup
196 +}
197 +
198 +src_unpack() {
199 + local l10n_sources="${P}.source-l10n.tar.xz"
200 + unpack ${A/ ${l10n_sources}}
201 +
202 + mkdir "${S}/${P}-l10n" || die
203 + cd "${S}/${P}-l10n" || die
204 + unpack ${l10n_sources}
205 +}
206 +
207 +src_prepare() {
208 + # Apply our patches
209 + eapply "${WORKDIR}"/seamonkey
210 +
211 + rm "${WORKDIR}/firefox/2005_rust-1.33.0-missing-docs.patch" || die
212 +
213 + # browser patches go here
214 + pushd "${S}"/mozilla &>/dev/null || die
215 + eapply "${WORKDIR}"/firefox
216 + popd &>/dev/null || die
217 +
218 + # Shell scripts sometimes contain DOS line endings; bug 391889
219 + grep -rlZ --include="*.sh" $'\r$' . |
220 + while read -r -d $'\0' file ; do
221 + einfo edos2unix "${file}"
222 + edos2unix "${file}"
223 + done
224 +
225 + # Allow user to apply any additional patches without modifing ebuild
226 + eapply_user
227 +
228 + local ms="${S}/mozilla"
229 +
230 + # Don't error for format with gcc-9
231 + grep -rl -- '-Werror=format' | xargs sed -i 's/error=format/no-&/' || die "sed failed"
232 +
233 + # Enable gnomebreakpad
234 + if use debug ; then
235 + sed -i -e "s:GNOME_DISABLE_CRASH_DIALOG=1:GNOME_DISABLE_CRASH_DIALOG=0:g" \
236 + "${ms}"/build/unix/run-mozilla.sh || die "sed failed!"
237 + fi
238 +
239 + # Ensure that are plugins dir is enabled as default
240 + sed -i -e "s:/usr/lib/mozilla/plugins:/usr/lib/nsbrowser/plugins:" \
241 + "${ms}"/xpcom/io/nsAppFileLocationProvider.cpp || die "sed failed to replace plugin path for 32bit!"
242 + sed -i -e "s:/usr/lib64/mozilla/plugins:/usr/lib64/nsbrowser/plugins:" \
243 + "${ms}"/xpcom/io/nsAppFileLocationProvider.cpp || die "sed failed to replace plugin path for 64bit!"
244 +
245 + # Don't exit with error when some libs are missing which we have in
246 + # system.
247 + sed '/^MOZ_PKG_FATAL_WARNINGS/s@= 1@= 0@' \
248 + -i "${S}"/suite/installer/Makefile.in || die
249 + # Don't error out when there's no files to be removed:
250 + sed 's@\(xargs rm\)$@\1 -f@' \
251 + -i "${ms}"/toolkit/mozapps/installer/packager.mk || die
252 +
253 + # Don't build libs-% locale files for chatzilla if we are not building chatzilla
254 + # (this is hard-coded in the build system at present rather than being based on configuration)
255 + if ! use chatzilla ; then
256 + sed '/extensions\/irc\/locales libs-/s@^@#@' \
257 + -i "${S}"/suite/locales/Makefile.in || die
258 + fi
259 +
260 + eautoreconf old-configure.in
261 + cd "${S}"/mozilla || die
262 + eautoconf old-configure.in
263 + cd "${S}"/mozilla/js/src || die
264 + eautoconf old-configure.in
265 +}
266 +
267 +src_configure() {
268 + MEXTENSIONS="default"
269 + # Google API keys (see http://www.chromium.org/developers/how-tos/api-keys)
270 + # Note: These are for Gentoo Linux use ONLY. For your own distribution, please
271 + # get your own set of keys.
272 + _google_api_key=AIzaSyDEAOvatFo0eTgsV_ZlEzx0ObmepsMzfAc
273 +
274 + ####################################
275 + #
276 + # mozconfig, CFLAGS and CXXFLAGS setup
277 + #
278 + ####################################
279 +
280 + mozconfig_init
281 +
282 + ##################################
283 + # Former mozconfig_config() part #
284 + ##################################
285 +
286 + # Migrated from mozcoreconf-2
287 + mozconfig_annotate 'system_libs' --with-system-bz2
288 + mozconfig_annotate 'system_libs' --with-system-zlib
289 +
290 + # Disable for testing purposes only
291 + mozconfig_annotate 'Upstream bug 1341234' --disable-stylo
292 +
293 + # Must pass release in order to properly select linker via gold useflag
294 + mozconfig_annotate 'Enable by Gentoo' --enable-release
295 +
296 + # Must pass --enable-gold if using ld.gold
297 + if tc-ld-is-gold ; then
298 + mozconfig_annotate 'tc-ld-is-gold=true' --enable-gold
299 + else
300 + mozconfig_annotate 'tc-ld-is-gold=false' --disable-gold
301 + fi
302 +
303 + # Enable position independent executables
304 + mozconfig_annotate 'enabled by Gentoo' --enable-pie
305 +
306 + mozconfig_use_enable debug
307 + mozconfig_use_enable debug tests
308 + if ! use debug ; then
309 + mozconfig_annotate 'disabled by Gentoo' --disable-debug-symbols
310 + else
311 + mozconfig_annotate 'enabled by Gentoo' --enable-debug-symbols
312 + fi
313 +
314 + mozconfig_use_enable startup-notification
315 +
316 + # wifi pulls in dbus so manage both here
317 + mozconfig_use_enable wifi necko-wifi
318 + if use kernel_linux && use wifi && ! use dbus ; then
319 + echo "Enabling dbus support due to wifi request"
320 + mozconfig_annotate 'dbus required by necko-wifi on linux' --enable-dbus
321 + else
322 + mozconfig_use_enable dbus
323 + mozconfig_annotate 'disabled' --disable-necko-wifi
324 + fi
325 +
326 + # These are enabled by default in all mozilla applications
327 + mozconfig_annotate '' --with-system-nspr --with-nspr-prefix="${SYSROOT}${EPREFIX}"/usr
328 + mozconfig_annotate '' --with-system-nss --with-nss-prefix="${SYSROOT}${EPREFIX}"/usr
329 + mozconfig_annotate '' --x-includes="${SYSROOT}${EPREFIX}"/usr/include --x-libraries="${SYSROOT}${EPREFIX}"/usr/$(get_libdir)
330 + if use system-libevent ; then
331 + mozconfig_annotate '' --with-system-libevent="${SYSROOT}${EPREFIX}"/usr
332 + fi
333 + mozconfig_annotate '' --prefix="${EPREFIX}"/usr
334 + mozconfig_annotate '' --libdir="${EPREFIX}"/usr/$(get_libdir)
335 + mozconfig_annotate 'Gentoo default' --enable-system-hunspell
336 + mozconfig_annotate '' --disable-crashreporter
337 + mozconfig_annotate 'Gentoo default' --with-system-png
338 + mozconfig_annotate '' --enable-system-ffi
339 + mozconfig_annotate '' --disable-gconf
340 + mozconfig_annotate '' --with-intl-api
341 +
342 + # skia has no support for big-endian platforms
343 + if [[ $(tc-endian) == "big" ]] ; then
344 + mozconfig_annotate 'big endian target' --disable-skia
345 + else
346 + mozconfig_annotate '' --enable-skia
347 + fi
348 +
349 + # default toolkit is cairo-gtk3, optional use flags can change this
350 + mozconfig_annotate '' --enable-default-toolkit=cairo-gtk3
351 +
352 + # Instead of the standard --build= and --host=, mozilla uses --host instead
353 + # of --build, and --target intstead of --host.
354 + # Note, mozilla also has --build but it does not do what you think it does.
355 + # Set both --target and --host as mozilla uses python to guess values otherwise
356 + mozconfig_annotate '' --target="${CHOST}"
357 + mozconfig_annotate '' --host="${CBUILD:-${CHOST}}"
358 +
359 + mozconfig_use_enable pulseaudio
360 + # force the deprecated alsa sound code if pulseaudio is disabled
361 + if use kernel_linux && ! use pulseaudio ; then
362 + mozconfig_annotate '-pulseaudio' --enable-alsa
363 + fi
364 +
365 + # For testing purpose only
366 + mozconfig_annotate 'Sandbox' --enable-content-sandbox
367 +
368 + mozconfig_use_enable system-sqlite
369 + mozconfig_use_with system-jpeg
370 + mozconfig_use_with system-icu
371 + mozconfig_use_with system-libvpx
372 + mozconfig_use_with system-harfbuzz
373 + mozconfig_use_with system-harfbuzz system-graphite2
374 +
375 + # Modifications to better support ARM, bug 553364
376 + if use neon ; then
377 + mozconfig_annotate '' --with-fpu=neon
378 + mozconfig_annotate '' --with-thumb=yes
379 + mozconfig_annotate '' --with-thumb-interwork=no
380 + fi
381 + if [[ ${CHOST} == armv* ]] ; then
382 + mozconfig_annotate '' --with-float-abi=hard
383 + if ! use system-libvpx ; then
384 + sed -i -e "s|softfp|hard|" \
385 + "${S}"/mozilla/media/libvpx/moz.build \
386 + || die
387 + fi
388 + fi
389 + ##################################
390 + # Former mozconfig_config() end #
391 + ##################################
392 +
393 + # enable JACK, bug 600002
394 + mozconfig_use_enable jack
395 +
396 + # It doesn't compile on alpha without this LDFLAGS
397 + use alpha && append-ldflags "-Wl,--no-relax"
398 +
399 + # Linking fails without this due to memory exhaustion
400 + use x86 && append-ldflags "-Wl,--no-keep-memory"
401 +
402 + if ! use chatzilla ; then
403 + MEXTENSIONS+=",-irc"
404 + fi
405 + if ! use roaming ; then
406 + MEXTENSIONS+=",-sroaming"
407 + fi
408 +
409 + # Setup api key for location services
410 + echo -n "${_google_api_key}" > "${S}"/google-api-key
411 + mozconfig_annotate '' --with-google-location-service-api-keyfile="${S}/google-api-key"
412 + mozconfig_annotate '' --with-google-safebrowsing-api-keyfile="${S}/google-api-key"
413 +
414 + mozconfig_annotate '' --enable-extensions="${MEXTENSIONS}"
415 +
416 + # sm-specific settings
417 + mozconfig_use_enable calendar
418 +
419 + # Use an objdir to keep things organized.
420 + echo "mk_add_options MOZ_OBJDIR=${BUILD_OBJ_DIR}" >> "${S}"/.mozconfig
421 + echo "mk_add_options XARGS=/usr/bin/xargs" >> "${S}"/.mozconfig
422 +
423 + mozlinguas_mozconfig
424 +
425 + # Finalize and report settings
426 + mozconfig_final
427 +
428 + # Required until mozcoreconf-v?.eclass-es are finally fixed...
429 + sed \
430 + -e '/--enable-application/s@comm/suite@suite@' \
431 + -i .mozconfig || die
432 +
433 + # Work around breakage in makeopts with --no-print-directory
434 + MAKEOPTS="${MAKEOPTS/--no-print-directory/}"
435 +
436 + if [[ $(gcc-major-version) -lt 4 ]] ; then
437 + append-cxxflags -fno-stack-protector
438 + elif [[ $(gcc-major-version) -gt 4 || $(gcc-minor-version) -gt 3 ]] ; then
439 + if use amd64 || use x86 ; then
440 + append-flags -mno-avx
441 + fi
442 + fi
443 +
444 + # workaround for funky/broken upstream configure...
445 + SHELL="${SHELL:-${EPREFIX%/}/bin/bash}" \
446 + emake V=1 -f client.mk configure
447 +}
448 +
449 +src_compile() {
450 + MOZ_MAKE_FLAGS="${MAKEOPTS}" SHELL="${SHELL}" \
451 + emake V=1 -f client.mk
452 +
453 + mozlinguas_src_compile
454 +}
455 +
456 +src_install() {
457 + MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
458 + DICTPATH="\"${EPREFIX}/usr/share/myspell\""
459 +
460 + local emid
461 + cd "${BUILD_OBJ_DIR}" || die
462 +
463 + # Pax mark xpcshell for hardened support, only used for startupcache creation.
464 + pax-mark m "${BUILD_OBJ_DIR}/dist/bin/xpcshell"
465 +
466 + # Copy our preference before omnijar is created.
467 + sed "s|SEAMONKEY_PVR|${PVR}|" "${FILESDIR}"/all-gentoo-1.js > \
468 + "${BUILD_OBJ_DIR}/dist/bin/defaults/pref/all-gentoo.js" \
469 + || die
470 +
471 + # Set default path to search for dictionaries.
472 + echo "pref(\"spellchecker.dictionary_path\", ${DICTPATH});" \
473 + >> "${BUILD_OBJ_DIR}/dist/bin/defaults/pref/all-gentoo.js" \
474 + || die
475 +
476 + echo 'pref("extensions.autoDisableScopes", 3);' >> \
477 + "${BUILD_OBJ_DIR}/dist/bin/defaults/pref/all-gentoo.js" \
478 + || die
479 +
480 + local plugin
481 + if ! use gmp-autoupdate ; then
482 + for plugin in "${GMP_PLUGIN_LIST[@]}" ; do
483 + echo "pref(\"media.${plugin}.autoupdate\", false);" >> \
484 + "${S}/${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/all-gentoo.js" \
485 + || dir
486 + done
487 + fi
488 +
489 + MOZ_MAKE_FLAGS="${MAKEOPTS}" SHELL="${SHELL:-${EPREFIX%/}/bin/bash}" \
490 + emake DESTDIR="${D}" install
491 + MOZ_P="${MY_MOZ_P}" mozlinguas_src_install
492 + cp "${FILESDIR}"/${PN}.desktop "${T}" || die
493 +
494 + sed 's|^\(MimeType=.*\)$|\1text/x-vcard;text/directory;application/mbox;message/rfc822;x-scheme-handler/mailto;|' \
495 + -i "${T}"/${PN}.desktop || die
496 + sed 's|^\(Categories=.*\)$|\1Email;|' -i "${T}"/${PN}.desktop \
497 + || die
498 +
499 + # Install icon and .desktop for menu entry
500 + newicon "${S}"/suite/branding/${PN}/default64.png ${PN}.png
501 + domenu "${T}"/${PN}.desktop
502 +
503 + # Required in order to use plugins and even run seamonkey on hardened.
504 + pax-mark m "${ED}"${MOZILLA_FIVE_HOME}/{seamonkey,seamonkey-bin,plugin-container}
505 +
506 + if use minimal ; then
507 + rm -rf "${ED}"/usr/include "${ED}${MOZILLA_FIVE_HOME}"/{idl,include,lib,sdk}
508 + fi
509 +
510 + if use chatzilla ; then
511 + local emid='{59c81df5-4b7a-477b-912d-4e0fdf64e5f2}'
512 +
513 + # remove the en_US-only xpi file so a version with all requested locales can be installed
514 + if [[ -e "${ED}"${MOZILLA_FIVE_HOME}/distribution/extensions/${emid}.xpi ]]; then
515 + rm -f "${ED}"${MOZILLA_FIVE_HOME}/distribution/extensions/${emid}.xpi || die
516 + fi
517 +
518 + # merge the extra locales into the main extension
519 + mozlinguas_xpistage_langpacks "${BUILD_OBJ_DIR}"/dist/xpi-stage/chatzilla
520 +
521 + # install the merged extension
522 + mkdir -p "${T}/${emid}" || die
523 + cp -RLp -t "${T}/${emid}" "${BUILD_OBJ_DIR}"/dist/xpi-stage/chatzilla/* || die
524 + insinto ${MOZILLA_FIVE_HOME}/distribution/extensions
525 + doins -r "${T}/${emid}"
526 + fi
527 +
528 + # Handle plugins dir through nsplugins.eclass
529 + share_plugins_dir
530 +
531 + # revdep-rebuild entry
532 + insinto /etc/revdep-rebuild
533 + echo "SEARCH_DIRS_MASK=${MOZILLA_FIVE_HOME}*" >> ${T}/11${PN}
534 + doins "${T}"/11${PN}
535 +}
536 +
537 +pkg_preinst() {
538 + MOZILLA_FIVE_HOME="${ROOT}/usr/$(get_libdir)/${PN}"
539 +
540 + if [ -d ${MOZILLA_FIVE_HOME}/plugins ] ; then
541 + rm ${MOZILLA_FIVE_HOME}/plugins -rf
542 + fi
543 +}
544 +
545 +pkg_postinst() {
546 + MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
547 +
548 + # Update mimedb for the new .desktop file
549 + xdg_desktop_database_update
550 +
551 + if ! use gmp-autoupdate ; then
552 + elog "USE='-gmp-autoupdate' has disabled the following plugins from updating or"
553 + elog "installing into new profiles:"
554 + local plugin
555 + for plugin in "${GMP_PLUGIN_LIST[@]}"; do elog "\t ${plugin}" ; done
556 + fi
557 +
558 + if use chatzilla ; then
559 + elog "chatzilla is now an extension which can be en-/disabled and configured via"
560 + elog "the Add-on manager."
561 + fi
562 +}