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