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