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: Wed, 04 Mar 2020 17:27:35
Message-Id: 1583342845.4a363c3e35be0f292629068fc78f3dd817ce66a1.polynomial-c@gentoo
1 commit: 4a363c3e35be0f292629068fc78f3dd817ce66a1
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Wed Mar 4 17:25:20 2020 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Wed Mar 4 17:27:25 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4a363c3e
7
8 www-client/seamonkey: Bump to version 2.53.1
9
10 Package-Manager: Portage-2.3.89, Repoman-2.3.20
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.1.ebuild | 531 +++++++++++++++++++++++++++
15 2 files changed, 534 insertions(+)
16
17 diff --git a/www-client/seamonkey/Manifest b/www-client/seamonkey/Manifest
18 index 73889634bbd..2a8dc1c0c34 100644
19 --- a/www-client/seamonkey/Manifest
20 +++ b/www-client/seamonkey/Manifest
21 @@ -23,4 +23,7 @@ DIST seamonkey-2.49.9.1-sk.xpi 967988 BLAKE2B fd7db86b778be8b1202c031ccb6b18805f
22 DIST seamonkey-2.49.9.1-sv-SE.xpi 940793 BLAKE2B ec901577f833e69f78d0fba13fe1ee1297105332db66fa5e0c841f19aca4e3274822f43f49b925eba7e86bb8682963424369bb4ce8b089df32d8fc7fbd294e2d SHA512 0ac1b0a8e599ef0ffe49d8a7b94dd25818601fb5603273ed995b9a4bb52c5e13a360c76b9278bf8a14b8dce5609f33be319c43fa13ee7b16eda897f6c2d39ddf
23 DIST seamonkey-2.49.9.1-zh-CN.xpi 946349 BLAKE2B ff8d5dfc671cf51e9af849e7781eb3ada2cda97cc542a8a28306a7c060043752be7614574c0c4882c54dec8a82972a46a7c8bc8085d94a9273264cd15dbfbc83 SHA512 5d3a6accc9deb69b6d52bccca0b52e12b8727d0e6a99067dba52921a147c333b7b777d7dc4935510fb981c9cfae2c4cfc30f310fad9b06e5537ef1dbb89b5e28
24 DIST seamonkey-2.49.9.1-zh-TW.xpi 1002365 BLAKE2B e66f68187c0373f96ba8f58f420c8a4c917015e6c38a54a6c80d9cdf4b31620ff3c104ffccc1f4e0f140673b15eefe1742a2b0f3208e00abb4a593322cb1edf9 SHA512 a5797304f4de6edf807238a551676fe9755d9ae0dc0141ea959c6edae8bc742ad11976a2b1cf4f2a324ad6b94c1a97c77e29b8100a679af7002156d1d0150376
25 +DIST seamonkey-2.53.1-patches-01.tar.xz 59412 BLAKE2B 33266a36a7c50bd4fc124b104132268ec9276ad3620724a9adf6dbb54ef078dea945ccdfc5285ad09a56831269fa3bd03a1d5bba03e90152254cf6e8c5c6c5e3 SHA512 7387c6f4416c90db00fbbeec951bf7961e4ca980beb0d3a4cd6385c94524d7da13619d84b5f4f4c83b4e5641a9970493c3bfbdabc86333a2626a848587a2fc76
26 +DIST seamonkey-2.53.1.source-l10n.tar.xz 11423472 BLAKE2B ce577c8fd5ff10fdfe5a9f8725cacf2801ed2d4fc66f9535ec1a57e2a613d87925bbccd1293aef8d86c329a221d6f0a5f694b16c8762e2aceed1b4c60cf5883c SHA512 52bc7d82e935abb67778a6fcdab6a9e6d66a196d0962c59ddddae4ae854e1cd0e923016b13afa55df7a3f3997014fc38e729605d449a170a7ff96b905c7ea084
27 +DIST seamonkey-2.53.1.source.tar.xz 290149116 BLAKE2B 613625df9f364550b1456a8f4afad012469e0740d3e084cf2d4e94b22389d2a8de5fa5012bcb8c6139e092054cfd2214d3d93e562a522f76009b6e5e3b5f406d SHA512 67c8a5343070948a88f1184a4f0c6ec720f9d43910165812b05a2a1bed8b698de2860d75b4bbf831f23c750fb521f50afa44ddc13835047f517a1407892ede3f
28 DIST thunderbird-52.9.1.source.tar.xz 230475264 BLAKE2B ec2763d21bf88779867f4478dfc544b5afbe1062ce51f09c1ecc423c3289f0cd91ae79bc87d726ae77d885290843631f36800fff18d802cd4a998966e7793b74 SHA512 0de80a5036b1e8a5a8549c546b4693cb285ee4d10f546f4b4aceed9e1d6c64b9dbafce7bacaaf057112130036f7b41fb2e0fa3343412140e6ac926dd94c27d23
29
30 diff --git a/www-client/seamonkey/seamonkey-2.53.1.ebuild b/www-client/seamonkey/seamonkey-2.53.1.ebuild
31 new file mode 100644
32 index 00000000000..455aec836d3
33 --- /dev/null
34 +++ b/www-client/seamonkey/seamonkey-2.53.1.ebuild
35 @@ -0,0 +1,531 @@
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-01"
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.13.1
99 + >=dev-libs/nss-3.28.3
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 + virtual/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="8G"
194 + else
195 + CHECKREQS_DISK_BUILD="4G"
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 + if ! use chatzilla ; then
407 + MEXTENSIONS+=",-irc"
408 + fi
409 + if ! use roaming ; then
410 + MEXTENSIONS+=",-sroaming"
411 + fi
412 +
413 + # Setup api key for location services
414 + echo -n "${_google_api_key}" > "${S}"/google-api-key
415 + mozconfig_annotate '' --with-google-location-service-api-keyfile="${S}/google-api-key"
416 + mozconfig_annotate '' --with-google-safebrowsing-api-keyfile="${S}/google-api-key"
417 +
418 + mozconfig_annotate '' --enable-extensions="${MEXTENSIONS}"
419 +
420 + # sm-specific settings
421 + mozconfig_use_enable calendar
422 +
423 + # Use an objdir to keep things organized.
424 + echo "mk_add_options MOZ_OBJDIR=${BUILD_OBJ_DIR}" >> "${S}"/.mozconfig
425 + echo "mk_add_options XARGS=/usr/bin/xargs" >> "${S}"/.mozconfig
426 +
427 + mozlinguas_mozconfig
428 +
429 + # Finalize and report settings
430 + mozconfig_final
431 +
432 + # Required until seamonkey-2.53 is available
433 + sed \
434 + -e '/--enable-application/s@comm/suite@suite@' \
435 + -i .mozconfig || die
436 +
437 + # Work around breakage in makeopts with --no-print-directory
438 + MAKEOPTS="${MAKEOPTS/--no-print-directory/}"
439 +
440 + if [[ $(gcc-major-version) -lt 4 ]] ; then
441 + append-cxxflags -fno-stack-protector
442 + elif [[ $(gcc-major-version) -gt 4 || $(gcc-minor-version) -gt 3 ]] ; then
443 + if use amd64 || use x86 ; then
444 + append-flags -mno-avx
445 + fi
446 + fi
447 +
448 + # workaround for funky/broken upstream configure...
449 + SHELL="${SHELL:-${EPREFIX%/}/bin/bash}" \
450 + emake V=1 -f client.mk configure
451 +}
452 +
453 +src_compile() {
454 + MOZ_MAKE_FLAGS="${MAKEOPTS}" SHELL="${SHELL}" \
455 + emake V=1 -f client.mk
456 +
457 + mozlinguas_src_compile
458 +}
459 +
460 +src_install() {
461 + MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
462 + DICTPATH="\"${EPREFIX}/usr/share/myspell\""
463 +
464 + local emid
465 + cd "${BUILD_OBJ_DIR}" || die
466 +
467 + # Pax mark xpcshell for hardened support, only used for startupcache creation.
468 + pax-mark m "${BUILD_OBJ_DIR}/dist/bin/xpcshell"
469 +
470 + # Copy our preference before omnijar is created.
471 + sed "s|SEAMONKEY_PVR|${PVR}|" "${FILESDIR}"/all-gentoo-1.js > \
472 + "${BUILD_OBJ_DIR}/dist/bin/defaults/pref/all-gentoo.js" \
473 + || die
474 +
475 + # Set default path to search for dictionaries.
476 + echo "pref(\"spellchecker.dictionary_path\", ${DICTPATH});" \
477 + >> "${BUILD_OBJ_DIR}/dist/bin/defaults/pref/all-gentoo.js" \
478 + || die
479 +
480 + echo 'pref("extensions.autoDisableScopes", 3);' >> \
481 + "${BUILD_OBJ_DIR}/dist/bin/defaults/pref/all-gentoo.js" \
482 + || die
483 +
484 + local plugin
485 + if ! use gmp-autoupdate ; then
486 + for plugin in "${GMP_PLUGIN_LIST[@]}" ; do
487 + echo "pref(\"media.${plugin}.autoupdate\", false);" >> \
488 + "${S}/${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/all-gentoo.js" \
489 + || dir
490 + done
491 + fi
492 +
493 + MOZ_MAKE_FLAGS="${MAKEOPTS}" SHELL="${SHELL:-${EPREFIX%/}/bin/bash}" \
494 + emake DESTDIR="${D}" install
495 + MOZ_P="${P/_*}" mozlinguas_src_install
496 + cp "${FILESDIR}"/${PN}.desktop "${T}" || die
497 +
498 + sed 's|^\(MimeType=.*\)$|\1text/x-vcard;text/directory;application/mbox;message/rfc822;x-scheme-handler/mailto;|' \
499 + -i "${T}"/${PN}.desktop || die
500 + sed 's|^\(Categories=.*\)$|\1Email;|' -i "${T}"/${PN}.desktop \
501 + || die
502 +
503 + # Install icon and .desktop for menu entry
504 + newicon "${S}"/suite/branding/${PN}/default64.png ${PN}.png
505 + domenu "${T}"/${PN}.desktop
506 +
507 + # Required in order to use plugins and even run seamonkey on hardened.
508 + pax-mark m "${ED}"${MOZILLA_FIVE_HOME}/{seamonkey,seamonkey-bin,plugin-container}
509 +
510 + if use minimal ; then
511 + rm -rf "${ED}"/usr/include "${ED}${MOZILLA_FIVE_HOME}"/{idl,include,lib,sdk}
512 + fi
513 +
514 + if use chatzilla ; then
515 + local emid='{59c81df5-4b7a-477b-912d-4e0fdf64e5f2}'
516 +
517 + # remove the en_US-only xpi file so a version with all requested locales can be installed
518 + if [[ -e "${ED}"${MOZILLA_FIVE_HOME}/distribution/extensions/${emid}.xpi ]]; then
519 + rm -f "${ED}"${MOZILLA_FIVE_HOME}/distribution/extensions/${emid}.xpi || die
520 + fi
521 +
522 + # merge the extra locales into the main extension
523 + mozlinguas_xpistage_langpacks "${BUILD_OBJ_DIR}"/dist/xpi-stage/chatzilla
524 +
525 + # install the merged extension
526 + mkdir -p "${T}/${emid}" || die
527 + cp -RLp -t "${T}/${emid}" "${BUILD_OBJ_DIR}"/dist/xpi-stage/chatzilla/* || die
528 + insinto ${MOZILLA_FIVE_HOME}/distribution/extensions
529 + doins -r "${T}/${emid}"
530 + fi
531 +
532 + # Handle plugins dir through nsplugins.eclass
533 + share_plugins_dir
534 +
535 + # revdep-rebuild entry
536 + insinto /etc/revdep-rebuild
537 + echo "SEARCH_DIRS_MASK=${MOZILLA_FIVE_HOME}*" >> ${T}/11${PN}
538 + doins "${T}"/11${PN}
539 +}
540 +
541 +pkg_preinst() {
542 + MOZILLA_FIVE_HOME="${ROOT}/usr/$(get_libdir)/${PN}"
543 +
544 + if [ -d ${MOZILLA_FIVE_HOME}/plugins ] ; then
545 + rm ${MOZILLA_FIVE_HOME}/plugins -rf
546 + fi
547 +}
548 +
549 +pkg_postinst() {
550 + MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
551 +
552 + # Update mimedb for the new .desktop file
553 + xdg_desktop_database_update
554 +
555 + if ! use gmp-autoupdate ; then
556 + elog "USE='-gmp-autoupdate' has disabled the following plugins from updating or"
557 + elog "installing into new profiles:"
558 + local plugin
559 + for plugin in "${GMP_PLUGIN_LIST[@]}"; do elog "\t ${plugin}" ; done
560 + fi
561 +
562 + if use chatzilla ; then
563 + elog "chatzilla is now an extension which can be en-/disabled and configured via"
564 + elog "the Add-on manager."
565 + fi
566 +}