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