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