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, 02 Jun 2021 13:06:54
Message-Id: 1622639205.7759f72565083f9272a541522a72b265d3b7e085.polynomial-c@gentoo
1 commit: 7759f72565083f9272a541522a72b265d3b7e085
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jun 2 13:05:53 2021 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Wed Jun 2 13:06:45 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7759f725
7
8 www-client/seamonkey: Bump to version 2.53.8_beta1
9
10 Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
11
12 www-client/seamonkey/Manifest | 3 +
13 www-client/seamonkey/seamonkey-2.53.8_beta1.ebuild | 556 +++++++++++++++++++++
14 2 files changed, 559 insertions(+)
15
16 diff --git a/www-client/seamonkey/Manifest b/www-client/seamonkey/Manifest
17 index 536fb84be54..26805d2af92 100644
18 --- a/www-client/seamonkey/Manifest
19 +++ b/www-client/seamonkey/Manifest
20 @@ -2,3 +2,6 @@ DIST seamonkey-2.53.3-system_libvpx-1.8.patch.xz 3128 BLAKE2B f73802d2715a11964a
21 DIST seamonkey-2.53.6_beta1-patches-01.tar.xz 44160 BLAKE2B f6a959a983e726cd919ab5004b27cd496a78cd58759168d6dd64e155059c7b52f269bc42143ddb69a1e8880c72779257216d942a1abc58800491fde9eaaea061 SHA512 710e668209f76f2ca4112923c61219e435123791dfcfcb202af1f7975436d17f13ab025722e9725f219e9de9d024091514d23c71a851d68f750c11ea8d56c2b9
22 DIST seamonkey-2.53.7.1.source-l10n.tar.xz 13540652 BLAKE2B a42471ee8d2c4c57158291a9770aa6759a620e4b9a38a1bedcf17495332924839d65f1a12dce3c7452137fd6d176c576ec0da639f20be29621b10406c0e9bd4f SHA512 d4bde45e0dfdbd1eb316ef3f3d2e611a1a3314a1144ad7075f96ad35c961bc07fd82bbfd7959aa9bee0034cbf081427670d7da3eb3b3aac85b5db7aab92b32a5
23 DIST seamonkey-2.53.7.1.source.tar.xz 283452108 BLAKE2B 4f0a73c5d57c708e4b5d5af6ddee1c9515b6bf401b0181da17c03cdeee1afb9d120c0157cdf2a07e8fa6495462e8bbb4b85e3e6646dbbead123934c565732926 SHA512 21f52b2668b8cb31670a80f3fbcd04d714527545ddd36fa5782999be398428cfeac989da4e3e7e049202249d43c71228ebc8640dd0b594150c8cff0b587caf7e
24 +DIST seamonkey-2.53.8_beta1-patches-01.tar.xz 43208 BLAKE2B 947b8131810f3f9855e1e8ff45d841e05dde9dc8c1d1204b1a3d55a743c2c7f9b23b251460d6743ca760edc4609eb08c1df3b165acc56af95e5ecb3c871fec3a SHA512 8196be87112926de0becf272bf44c1ce5522579d4b66f93f455cc0e503c4c3bb96fba5ec48a73e0d53ad9683820cb167e677bbf2497fe266e93d154c8d4a7837
25 +DIST seamonkey-2.53.8_beta1.source-l10n.tar.xz 13542744 BLAKE2B f5c7a09606fd51c688507a3eed1d661c63b6e3690c7630953a9e96fd53e147dd9823b39532b96a4b2376742cf0c8ad968a20e9f337e0b55cfeb39f62ac012b22 SHA512 13f17259c4cf0e4759fd6f1a6424804c07af9c9205cba560773737a49cc3257add6f833edf527443673e4ea9552ec6091ec3c50700cdf4bd617f0f28a2be7535
26 +DIST seamonkey-2.53.8_beta1.source.tar.xz 283088336 BLAKE2B aa59357984c5b0f26dfcd1b0e9d4f0e2a607b7212fdd270a72cc512c6a2abc735f14ad3b67639df677c2706492a1b6f6efb8db9eefa3ea08a276446ba022aa20 SHA512 68e160eaebc22b8a9bfddab74d6f59bed4a220105d6362da3636e5619837cd9bc26bab29a20ad6ac2cea73173b8bd241ee54e0476ec8bd9dd4d232aff7ac3bf5
27
28 diff --git a/www-client/seamonkey/seamonkey-2.53.8_beta1.ebuild b/www-client/seamonkey/seamonkey-2.53.8_beta1.ebuild
29 new file mode 100644
30 index 00000000000..db3e9bb9aa2
31 --- /dev/null
32 +++ b/www-client/seamonkey/seamonkey-2.53.8_beta1.ebuild
33 @@ -0,0 +1,556 @@
34 +# Copyright 1999-2021 Gentoo Authors
35 +# Distributed under the terms of the GNU General Public License v2
36 +
37 +EAPI=7
38 +
39 +WANT_AUTOCONF="2.1"
40 +
41 +PYTHON_COMPAT=( python3_{7..9} )
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 +SRC_URI="${MOZ_HTTP_URI}/source/${MY_MOZ_P}.source.tar.xz -> ${P}.source.tar.xz
65 + ${MOZ_HTTP_URI}/source/${MY_MOZ_P}.source-l10n.tar.xz -> ${P}.source-l10n.tar.xz"
66 +S="${WORKDIR}/${MY_MOZ_P}"
67 +
68 +MOZ_GENERATE_LANGPACKS=1
69 +MOZ_L10N_SOURCEDIR="${S}/${P}-l10n"
70 +inherit autotools check-reqs desktop flag-o-matic mozcoreconf-v6 mozextension mozlinguas-v2 pax-utils toolchain-funcs xdg-utils
71 +
72 +DESCRIPTION="Seamonkey Web Browser"
73 +HOMEPAGE="https://www.seamonkey-project.org/"
74 +
75 +PATCH="${PN}-2.53.8_beta1-patches-01"
76 +SRC_URI+="
77 + https://dev.gentoo.org/~polynomial-c/mozilla/patchsets/${PATCH}.tar.xz
78 + system-libvpx? ( https://dev.gentoo.org/~polynomial-c/mozilla/${PN}-2.53.3-system_libvpx-1.8.patch.xz )
79 +"
80 +
81 +LICENSE="MPL-2.0 GPL-2 LGPL-2.1"
82 +SLOT="0"
83 +SYSTEM_IUSE=( +system-{av1,harfbuzz,icu,jpeg,libevent,libvpx,sqlite} )
84 +IUSE="+chatzilla cpu_flags_arm_neon +crypt dbus debug +gmp-autoupdate +ipc jack
85 +lto pulseaudio +roaming selinux startup-notification test wifi"
86 +IUSE+=" ${SYSTEM_IUSE[@]}"
87 +KEYWORDS="~amd64 ~ppc64 ~x86"
88 +
89 +RESTRICT="!test? ( test )"
90 +
91 +ASM_DEPEND=">=dev-lang/yasm-1.1"
92 +
93 +BDEPEND="
94 + app-arch/unzip
95 + app-arch/zip
96 + >=dev-lang/nasm-2.13
97 + dev-lang/perl
98 + sys-apps/findutils
99 + >=sys-devel/binutils-2.16.1
100 + virtual/pkgconfig
101 + >=virtual/rust-1.34.0
102 + amd64? ( ${ASM_DEPEND} )
103 + lto? ( sys-devel/binutils[gold] )
104 + x86? ( ${ASM_DEPEND} )
105 +"
106 +COMMON_DEPEND="
107 + >=app-text/hunspell-1.5.4:=
108 + dev-libs/atk
109 + >=dev-libs/glib-2.26:2
110 + >=dev-libs/libffi-3.0.10:=
111 + >=dev-libs/nspr-4.23
112 + >=dev-libs/nss-3.47.1
113 + media-libs/fontconfig
114 + >=media-libs/freetype-2.4.10
115 + >=media-libs/libpng-1.6.31:0=[apng]
116 + >=media-libs/mesa-10.2:=
117 + >=sys-libs/zlib-1.2.3
118 + >=x11-libs/cairo-1.10[X]
119 + x11-libs/gdk-pixbuf
120 + >=x11-libs/gtk+-2.18:2
121 + >=x11-libs/gtk+-3.4.0:3
122 + x11-libs/libX11
123 + x11-libs/libXcomposite
124 + x11-libs/libXdamage
125 + x11-libs/libXext
126 + x11-libs/libXfixes
127 + x11-libs/libXrender
128 + x11-libs/libXt
129 + >=x11-libs/pango-1.22.0
130 + >=x11-libs/pixman-0.19.2
131 + media-video/ffmpeg
132 + virtual/freedesktop-icon-theme
133 + dbus? (
134 + >=dev-libs/dbus-glib-0.72
135 + >=sys-apps/dbus-0.60
136 + )
137 + jack? ( virtual/jack )
138 + crypt? ( <x11-plugins/enigmail-2.1.0 )
139 + kernel_linux? ( !pulseaudio? ( media-libs/alsa-lib ) )
140 + pulseaudio? ( || (
141 + media-sound/pulseaudio
142 + >=media-sound/apulse-0.1.9
143 + ) )
144 + startup-notification? ( >=x11-libs/startup-notification-0.8 )
145 + system-av1? (
146 + >=media-libs/dav1d-0.3.0:=
147 + >=media-libs/libaom-1.0.0:=
148 + )
149 + system-harfbuzz? (
150 + >=media-gfx/graphite2-1.3.9-r1
151 + >=media-libs/harfbuzz-1.3.3:0=
152 + )
153 + system-icu? ( >=dev-libs/icu-59.1:= )
154 + system-jpeg? ( >=media-libs/libjpeg-turbo-1.2.1 )
155 + system-libevent? ( >=dev-libs/libevent-2.0:0= )
156 + system-libvpx? ( >=media-libs/libvpx-1.8.0:0=[postproc] )
157 + system-sqlite? ( >=dev-db/sqlite-3.19.3:3[secure-delete,debug=] )
158 + wifi? (
159 + kernel_linux? (
160 + >=dev-libs/dbus-glib-0.72
161 + net-misc/networkmanager
162 + >=sys-apps/dbus-0.60
163 + )
164 + )
165 +"
166 +RDEPEND="${COMMON_DEPEND}
167 + selinux? ( sec-policy/selinux-mozilla )
168 +"
169 +DEPEND="${COMMON_DEPEND}
170 + amd64? ( virtual/opengl )
171 + x86? ( virtual/opengl )
172 +"
173 +
174 +# allow GMP_PLUGIN_LIST to be set in an eclass or
175 +# overridden in the enviromnent (advanced hackers only)
176 +[[ -z ${GMP_PLUGIN_LIST} ]] && GMP_PLUGIN_LIST=( gmp-gmpopenh264 gmp-widevinecdm )
177 +
178 +BUILD_OBJ_DIR="${S}/seamonk"
179 +
180 +pkg_setup() {
181 + if [[ ${PV} == *_beta* ]] || [[ ${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 lto || 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 +spkg_setup() {
201 + # Ensure we have enough disk space to compile
202 + if use debug || use lto || use test ; then
203 + CHECKREQS_DISK_BUILD="16G"
204 + else
205 + CHECKREQS_DISK_BUILD="12G"
206 + fi
207 + check-reqs_pkg_setup
208 +}
209 +
210 +src_unpack() {
211 + local l10n_sources="${P}.source-l10n.tar.xz"
212 + unpack ${A/ ${l10n_sources}}
213 +
214 + mkdir "${S}/${P}-l10n" || die
215 + cd "${S}/${P}-l10n" || die
216 + unpack ${l10n_sources}
217 +}
218 +
219 +src_prepare() {
220 + # Apply our patches
221 + eapply "${WORKDIR}"/mozilla
222 +
223 + # https://bugzilla.mozilla.org/show_bug.cgi?id=1623054
224 + eapply "${FILESDIR}/${PN}-2.53.7-ownertab.patch"
225 +
226 + eapply "${FILESDIR}/${PN}-2.53.7.1-CLEANUP-workaround.patch" #790794
227 +
228 + # Shell scripts sometimes contain DOS line endings; bug 391889
229 + grep -rlZ --include="*.sh" $'\r$' . |
230 + while read -r -d $'\0' file ; do
231 + einfo edos2unix "${file}"
232 + edos2unix "${file}"
233 + done
234 +
235 + use system-libvpx \
236 + && eapply -p2 "${WORKDIR}/${PN}-2.53.3-system_libvpx-1.8.patch"
237 +
238 + # Allow user to apply any additional patches without modifing ebuild
239 + eapply_user
240 +
241 + # Don't error for format with gcc-9
242 + grep -rl -- '-Werror=format' | xargs sed -i 's/error=format/no-&/' || die
243 +
244 + # Enable gnomebreakpad
245 + if use debug ; then
246 + sed -i -e "s:GNOME_DISABLE_CRASH_DIALOG=1:GNOME_DISABLE_CRASH_DIALOG=0:g" \
247 + build/unix/run-mozilla.sh || die
248 + fi
249 +
250 + # Ensure that are plugins dir is enabled as default
251 + sed -i -e "s:/usr/$(get_libdir)/mozilla/plugins:/usr/$(get_libdir)/${PN}/plugins:" \
252 + xpcom/io/nsAppFileLocationProvider.cpp || die
253 +
254 + # Don't exit with error when some libs are missing which we have in
255 + # system.
256 + sed '/^MOZ_PKG_FATAL_WARNINGS/s@= 1@= 0@' \
257 + -i comm/suite/installer/Makefile.in || die
258 + # Don't error out when there's no files to be removed:
259 + sed 's@\(xargs rm\)$@\1 -f@' \
260 + -i toolkit/mozapps/installer/packager.mk || die
261 +
262 + # Don't build libs-% locale files for chatzilla if we are not building chatzilla
263 + # (this is hard-coded in the build system at present rather than being based on configuration)
264 + if ! use chatzilla ; then
265 + sed '/extensions\/irc\/locales libs-/s@^@#@' \
266 + -i comm/suite/locales/Makefile.in || die
267 + fi
268 +
269 + eautoreconf old-configure.in
270 + cd 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 + mozconfig_use_with system-av1
382 +
383 + # Modifications to better support ARM, bug 553364
384 + if use cpu_flags_arm_neon ; then
385 + mozconfig_annotate '' --with-fpu=neon
386 + mozconfig_annotate '' --with-thumb=yes
387 + mozconfig_annotate '' --with-thumb-interwork=no
388 + fi
389 + if [[ ${CHOST} == armv* ]] ; then
390 + mozconfig_annotate '' --with-float-abi=hard
391 + if ! use system-libvpx ; then
392 + sed -i -e "s|softfp|hard|" media/libvpx/moz.build || die
393 + fi
394 + fi
395 +
396 + if use lto ; then
397 + # Linking only works when using ld.gold when LTO is enabled
398 + mozconfig_annotate "forcing ld=gold due to USE=lto" --enable-linker=gold
399 + # ThinLTO is currently broken, see bmo#1644409
400 + mozconfig_annotate '+lto' --enable-lto=full
401 + else
402 + if tc-ld-is-gold ; then
403 + mozconfig_annotate "linker is set to gold" --enable-linker=gold
404 + else
405 + mozconfig_annotate "linker is set to bfd" --enable-linker=bfd
406 + fi
407 + fi
408 + # LTO flag was handled via configure
409 + filter-flags '-flto*'
410 +
411 + ##################################
412 + # Former mozconfig_config() end #
413 + ##################################
414 +
415 + # enable JACK, bug 600002
416 + mozconfig_use_enable jack
417 +
418 + # It doesn't compile on alpha without this LDFLAGS
419 + use alpha && append-ldflags "-Wl,--no-relax"
420 +
421 + # Linking fails without this due to memory exhaustion
422 + use x86 && append-ldflags "-Wl,--no-keep-memory"
423 +
424 + if ! use roaming ; then
425 + MEXTENSIONS+=",-sroaming"
426 + fi
427 +
428 + # Setup api key for location services
429 + printf '%s' "${_google_api_key}" > "${S}"/google-api-key
430 + mozconfig_annotate '' --with-google-location-service-api-keyfile="${S}/google-api-key"
431 + mozconfig_annotate '' --with-google-safebrowsing-api-keyfile="${S}/google-api-key"
432 +
433 + mozconfig_annotate '' --enable-extensions="${MEXTENSIONS}"
434 + mozconfig_use_enable chatzilla irc
435 + mozconfig_annotate '' --enable-dominspector
436 +
437 + # use startup-cache for faster startup time
438 + mozconfig_annotate '' --enable-startupcache
439 +
440 + # Use an objdir to keep things organized.
441 + echo "mk_add_options MOZ_OBJDIR=${BUILD_OBJ_DIR}" >> "${S}"/.mozconfig
442 + echo "mk_add_options XARGS=/usr/bin/xargs" >> "${S}"/.mozconfig
443 +
444 + mozlinguas_mozconfig
445 +
446 + # Finalize and report settings
447 + mozconfig_final
448 +
449 + # Work around breakage in makeopts with --no-print-directory
450 + MAKEOPTS="${MAKEOPTS/--no-print-directory/}"
451 +
452 + if [[ $(gcc-major-version) -lt 4 ]] ; then
453 + append-cxxflags -fno-stack-protector
454 + elif [[ $(gcc-major-version) -gt 4 || $(gcc-minor-version) -gt 3 ]] ; then
455 + if use amd64 || use x86 ; then
456 + append-flags -mno-avx
457 + fi
458 + fi
459 +
460 + # Pass $MAKEOPTS to build system
461 + export MOZ_MAKE_FLAGS="${MAKEOPTS}"
462 + # Use system's Python environment
463 + export MACH_USE_SYSTEM_PYTHON=1
464 + # Disable notification when build system has finished
465 + export MOZ_NOSPAM=1
466 +
467 + # workaround for funky/broken upstream configure...
468 + export SHELL="${SHELL:-${EPREFIX}/bin/bash}"
469 + #emake V=1 -f client.mk configure
470 + ./mach configure || die
471 +}
472 +
473 +src_compile() {
474 + #MOZ_MAKE_FLAGS="${MAKEOPTS}" SHELL="${SHELL}" \
475 + #emake V=1 -f client.mk
476 + ./mach build --verbose || die
477 +
478 + mozlinguas_src_compile
479 +}
480 +
481 +src_install() {
482 + MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
483 + DICTPATH="\"${EPREFIX}/usr/share/myspell\""
484 +
485 + local emid
486 + pushd "${BUILD_OBJ_DIR}" &>/dev/null || die
487 +
488 + # Pax mark xpcshell for hardened support, only used for startupcache creation.
489 + pax-mark m dist/bin/xpcshell
490 +
491 + # Copy our preference before omnijar is created.
492 + sed "s|SEAMONKEY_PVR|${PVR}|" "${FILESDIR}"/all-gentoo-1.js > \
493 + dist/bin/defaults/pref/all-gentoo.js \
494 + || die
495 +
496 + # Set default path to search for dictionaries.
497 + echo "pref(\"spellchecker.dictionary_path\", ${DICTPATH});" \
498 + >> dist/bin/defaults/pref/all-gentoo.js \
499 + || die
500 +
501 + echo 'pref("extensions.autoDisableScopes", 3);' >> \
502 + dist/bin/defaults/pref/all-gentoo.js \
503 + || die
504 +
505 + local plugin
506 + if ! use gmp-autoupdate ; then
507 + for plugin in "${GMP_PLUGIN_LIST[@]}" ; do
508 + echo "pref(\"media.${plugin}.autoupdate\", false);" >> \
509 + dist/bin/defaults/pref/all-gentoo.js || die
510 + done
511 + fi
512 +
513 + popd &>/dev/null || die
514 +
515 + #MOZ_MAKE_FLAGS="${MAKEOPTS}" SHELL="${SHELL:-${EPREFIX}/bin/bash}" \
516 + #emake DESTDIR="${D}" install
517 + DESTDIR="${D}" ./mach install || die
518 + MOZ_P="${MY_MOZ_P}" mozlinguas_src_install
519 +
520 + cp "${FILESDIR}"/${PN}.desktop "${T}" || die
521 +
522 + sed 's|^\(MimeType=.*\)$|\1text/x-vcard;text/directory;application/mbox;message/rfc822;x-scheme-handler/mailto;|' \
523 + -i "${T}"/${PN}.desktop || die
524 + sed 's|^\(Categories=.*\)$|\1Email;|' -i "${T}"/${PN}.desktop \
525 + || die
526 +
527 + # Install icon and .desktop for menu entry
528 + newicon "${S}"/comm/suite/branding/${PN}/default64.png ${PN}.png
529 + domenu "${T}"/${PN}.desktop
530 +
531 + # Required in order to use plugins and even run seamonkey on hardened.
532 + pax-mark m "${ED}"/${MOZILLA_FIVE_HOME}/{seamonkey,seamonkey-bin,plugin-container}
533 +
534 + if use chatzilla ; then
535 + emid='{59c81df5-4b7a-477b-912d-4e0fdf64e5f2}'
536 +
537 + # remove the en_US-only xpi file so a version with all requested locales can be installed
538 + if [[ -e "${ED}"/${MOZILLA_FIVE_HOME}/extensions/${emid}.xpi ]] ; then
539 + rm -f "${ED}"/${MOZILLA_FIVE_HOME}/extensions/${emid}.xpi || die
540 + fi
541 +
542 + # merge the extra locales into the main extension
543 + mozlinguas_xpistage_langpacks dist/xpi-stage/chatzilla
544 +
545 + # install the merged extension
546 + mkdir -p "${T}/${emid}" || die
547 + cp -RLp -t "${T}/${emid}" dist/xpi-stage/chatzilla/* || die
548 + insinto ${MOZILLA_FIVE_HOME}/extensions
549 + doins -r "${T}/${emid}"
550 + fi
551 +
552 + # Provide a place for plugins
553 + keepdir "${MOZILLA_FIVE_HOME}/plugins"
554 +
555 + # revdep-rebuild entry
556 + insinto /etc/revdep-rebuild
557 + echo "SEARCH_DIRS_MASK=${MOZILLA_FIVE_HOME}*" >> ${T}/11${PN}
558 + doins "${T}"/11${PN}
559 +
560 +}
561 +
562 +pkg_preinst() {
563 + SEAMONKEY_PLUGINS_DIR="${ROOT}/usr/$(get_libdir)/${PN}/plugins"
564 +
565 + if [[ -L "${SEAMONKEY_PLUGINS_DIR}" ]] ; then
566 + rm "${SEAMONKEY_PLUGINS_DIR}" || die
567 + fi
568 +}
569 +
570 +pkg_postinst() {
571 + # Update mimedb for the new .desktop file
572 + xdg_desktop_database_update
573 +
574 + if ! use gmp-autoupdate ; then
575 + elog "USE='-gmp-autoupdate' has disabled the following plugins from updating or"
576 + elog "installing into new profiles:"
577 + local plugin
578 + for plugin in "${GMP_PLUGIN_LIST[@]}"; do elog "\t ${plugin}" ; done
579 + fi
580 +
581 + if use chatzilla ; then
582 + elog "chatzilla is now an extension which can be en-/disabled and configured via"
583 + elog "the Add-on manager."
584 + fi
585 +}
586 +
587 +pkg_postrm() {
588 + xdg_desktop_database_update
589 +}