Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: www-client/seamonkey/
Date: Sun, 27 Mar 2022 00:24:25
Message-Id: 1648340651.600d93ba48fad2419b0cc20874b336b31902edb3.sam@gentoo
1 commit: 600d93ba48fad2419b0cc20874b336b31902edb3
2 Author: Myckel Habets <gentoo-bugs <AT> habets-dobben <DOT> nl>
3 AuthorDate: Sat Mar 26 14:22:48 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Sun Mar 27 00:24:11 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=600d93ba
7
8 www-client/seamonkey: bump version to 2.53.11.1
9
10 Additionally:
11
12 * Remove check for big endian and conditional --disable-skia configuration option.
13 * Include an upstream patch that fixes the skia build on big endian systems.
14 Bug: https://bugs.gentoo.org/723372
15
16 * Remove a sed that suppresses format errors on gcc-9.
17
18 Signed-off-by: Myckel Habets <gentoo-bugs <AT> habets-dobben.nl>
19 Closes: https://github.com/gentoo/gentoo/pull/24760
20 Signed-off-by: Sam James <sam <AT> gentoo.org>
21
22 www-client/seamonkey/Manifest | 3 +
23 www-client/seamonkey/seamonkey-2.53.11.1.ebuild | 543 ++++++++++++++++++++++++
24 2 files changed, 546 insertions(+)
25
26 diff --git a/www-client/seamonkey/Manifest b/www-client/seamonkey/Manifest
27 index 1802bd9fe763..fef07ea1e815 100644
28 --- a/www-client/seamonkey/Manifest
29 +++ b/www-client/seamonkey/Manifest
30 @@ -3,6 +3,9 @@ DIST seamonkey-2.53.10.2.source-l10n.tar.xz 13616204 BLAKE2B 75e3efd51fa4628b385
31 DIST seamonkey-2.53.10.2.source.tar.xz 284350364 BLAKE2B 15ff60b5728b84c00831d4dccde7600648889d56ecbe034708390cd83d096f760157d84f5df266ede2d4388302b0df83684397c276e1a0f6d1dfe3e799265ca1 SHA512 59233c2bfc0cf3c9e290e1165fea4cd285cabb339f66dbad7bdbe0b7fd9b2acbc37c385b775d2a3d045d1a6648012488cc018eb3f879139c2a582e7d37e01d7a
32 DIST seamonkey-2.53.11-patches-02.tar.gz 90646 BLAKE2B 047beb0a9c73c9d85d628139d4169ce91451df71e24aa4f920d5d509c53458e19b71b9cb58254707512445639a1aaf606e96b1c0d4e9eda67240217d36501b9e SHA512 5584fd0b565c56bf2223389bdbf11ff9df424e9eeac44105f1d493d958068e0fae2235bf34ea174600f85efecc1dd06b746f7b86f99d56f375b4127a3a933684
33 DIST seamonkey-2.53.11-r1-patches.tar.gz 91301 BLAKE2B 8542270445aabc585ae6a4b61048f267241efbcee1c88c345b04e13c4850efe03d4fccc5a2dff66422630de70d68de88693a2836de27028f20d9eba21c029373 SHA512 3477901be183f9d10ea2b449f2cb3d71f8ee1dd9279a05269eaa2a9387475520e781284295d1987bf6b783d8342c55e40a8387729ee1c291b5be89f7c1e3ee6e
34 +DIST seamonkey-2.53.11.1-patches.tar.gz 92215 BLAKE2B e3fdbb4ab40c2ad37c9197ebe759a3f75cf8f95ca7448cf650262d4f7e9cad5adb1137e8360ddc23b9bc3516f3c26cb1cf5725206bfe5e2c869db7644bdaf779 SHA512 3c46c7c01ed4f7ef43f5628a0260c3bca730ed885cd1a798848ebd7f04cb0f2e576b80e4b4015a5c59140c78babb4d8325379bc67ee8e5a9280473baebe82650
35 +DIST seamonkey-2.53.11.1.source-l10n.tar.xz 13626448 BLAKE2B 4dc2de15273b8b5a5e2572c7275d4172151d551348bb8481006d6917faf2814b582796ec6a74cc147299a9466d5de2c3cf3305ed61c70543e7e20047de0612ed SHA512 a20f692366a000418161521a18d696880b62f2f9a8aab95d470626fcfe52798cf5da41df4ba61d2598fdf6ec0d54218988351b3c778fd189957c791442eb6d44
36 +DIST seamonkey-2.53.11.1.source.tar.xz 287864844 BLAKE2B 9ca1824ea1ee142237d88a94e7c1705cc1e7e043379b961f22ebb491f3cb9a46fed0685e593c2359ced1803604cd7e2adbfe19c9bc2bd8d676c3c9d39f7a4ce0 SHA512 e5450b9ca24693bf3e74e4ca3a8bba45c4a0b2ef0cc7c8d77f1f155dcf571478da1abb22bb572b37be27051a4d592f1f95de5940b6f24fd3b994eb93cb154f2f
37 DIST seamonkey-2.53.11.source-l10n.tar.xz 13626448 BLAKE2B 4dc2de15273b8b5a5e2572c7275d4172151d551348bb8481006d6917faf2814b582796ec6a74cc147299a9466d5de2c3cf3305ed61c70543e7e20047de0612ed SHA512 a20f692366a000418161521a18d696880b62f2f9a8aab95d470626fcfe52798cf5da41df4ba61d2598fdf6ec0d54218988351b3c778fd189957c791442eb6d44
38 DIST seamonkey-2.53.11.source.tar.xz 287567152 BLAKE2B 96f89360948169a6ac650cec331f29026ac5dea40e953422f54ff2410dab0c49f883ca650f12514db2bc458bc2d58e6e3f3b6c9e75717ed2f8818cd35529215e SHA512 5a9b1f0f638dd08654b8e0654f5a87cc269e29cfe1efe7b9707fe306398354c95018317c826f7523e33bec50cf72e1ba33a0a1eb216568f62f02bd95eb1eaf16
39 DIST seamonkey-2.53.3-system_libvpx-1.8.patch.gz 3197 BLAKE2B 7a84d2184f4812eabfe3626eb6b2364f2f8c0ba24d4e53440e9d38658b89a3f1c23bdcbd623fd9aca3bfd04743e582587e9c42ba3d983cc9ec4059ea9503830a SHA512 ffc6f179f07cb9dcce2924c64bfed84a5cc724d857b32e5e349967e72022536c5192c3966e1089bab8efd91671584d6474334730ebefe1c4398f564a5f1753be
40
41 diff --git a/www-client/seamonkey/seamonkey-2.53.11.1.ebuild b/www-client/seamonkey/seamonkey-2.53.11.1.ebuild
42 new file mode 100644
43 index 000000000000..1b63a5976dc5
44 --- /dev/null
45 +++ b/www-client/seamonkey/seamonkey-2.53.11.1.ebuild
46 @@ -0,0 +1,543 @@
47 +# Copyright 1999-2022 Gentoo Authors
48 +# Distributed under the terms of the GNU General Public License v2
49 +
50 +EAPI=8
51 +
52 +WANT_AUTOCONF="2.1"
53 +
54 +PYTHON_COMPAT=( python3_{8..10} )
55 +PYTHON_REQ_USE='ncurses,sqlite,ssl,threads(+)'
56 +
57 +# This list can be updated with scripts/get_langs.sh from the mozilla overlay
58 +# note - could not roll langpacks for: ca fi
59 +#MOZ_LANGS=(ca cs de en-GB es-AR es-ES fi fr gl hu it ja lt nb-NO nl pl pt-PT
60 +# ru sk sv-SE tr uk zh-CN zh-TW)
61 +MOZ_LANGS=(cs de en-GB es-AR es-ES fr hu it ja lt nl pl pt-PT
62 + ru sk sv-SE zh-CN zh-TW)
63 +
64 +MOZ_PV="${PV/_pre*}"
65 +MOZ_PV="${MOZ_PV/_alpha/a}"
66 +MOZ_PV="${MOZ_PV/_beta/b}"
67 +MOZ_PV="${MOZ_PV/_rc/rc}"
68 +MOZ_P="${P}"
69 +MY_MOZ_P="${PN}-${MOZ_PV}"
70 +PATCH="${PN}-${PV}-patches"
71 +
72 +if [[ ${PV} == *_pre* ]] ; then
73 + MOZ_HTTP_URI="https://archive.mozilla.org/pub/${PN}/candidates/${MOZ_PV}-candidates/build${PV##*_pre}"
74 +else
75 + MOZ_HTTP_URI="https://archive.mozilla.org/pub/${PN}/releases/${MOZ_PV}"
76 +fi
77 +
78 +SRC_URI="${MOZ_HTTP_URI}/source/${MY_MOZ_P}.source.tar.xz -> ${P}.source.tar.xz
79 + ${MOZ_HTTP_URI}/source/${MY_MOZ_P}.source-l10n.tar.xz -> ${P}.source-l10n.tar.xz
80 + https://github.com/BioMike/gentoo-${PN}-patches/archive/refs/tags/${PV}.tar.gz -> ${PATCH}.tar.gz"
81 +
82 +S="${WORKDIR}/${MY_MOZ_P}"
83 +
84 +MOZ_GENERATE_LANGPACKS=1
85 +MOZ_L10N_SOURCEDIR="${S}/${P}-l10n"
86 +inherit autotools check-reqs desktop edos2unix flag-o-matic mozcoreconf-v6 mozlinguas-v2 pax-utils toolchain-funcs xdg-utils
87 +
88 +DESCRIPTION="Seamonkey Web Browser"
89 +HOMEPAGE="https://www.seamonkey-project.org/"
90 +
91 +LICENSE="MPL-2.0 GPL-2 LGPL-2.1"
92 +SLOT="0"
93 +SYSTEM_IUSE=( +system-{av1,harfbuzz,icu,jpeg,libevent,libvpx,png,sqlite} )
94 +IUSE="+chatzilla cpu_flags_arm_neon +crypt dbus debug +gmp-autoupdate +ipc jack
95 +lto pulseaudio selinux startup-notification test wifi"
96 +IUSE+=" ${SYSTEM_IUSE[@]}"
97 +KEYWORDS="~amd64 ~ppc64 ~x86"
98 +
99 +RESTRICT="!test? ( test )"
100 +
101 +BDEPEND="
102 + app-arch/unzip
103 + app-arch/zip
104 + >=dev-lang/nasm-2.13
105 + dev-lang/perl
106 + >=sys-devel/binutils-2.16.1
107 + virtual/pkgconfig
108 + >=virtual/rust-1.58.1
109 + amd64? ( >=dev-lang/yasm-1.1 )
110 + lto? ( sys-devel/binutils[gold] )
111 + x86? ( >=dev-lang/yasm-1.1 )
112 +"
113 +COMMON_DEPEND="
114 + app-arch/bzip2
115 + >=app-text/hunspell-1.5.4:=
116 + dev-libs/atk
117 + >=dev-libs/glib-2.26:2
118 + >=dev-libs/libffi-3.0.10:=
119 + >=dev-libs/nspr-4.23
120 + >=dev-libs/nss-3.47.1
121 + media-libs/fontconfig
122 + >=media-libs/freetype-2.4.10
123 + >=media-libs/mesa-10.2:=
124 + >=sys-libs/zlib-1.2.3
125 + >=x11-libs/cairo-1.10[X]
126 + x11-libs/gdk-pixbuf
127 + >=x11-libs/gtk+-3.4.0:3
128 + x11-libs/libX11
129 + x11-libs/libXcomposite
130 + x11-libs/libXdamage
131 + x11-libs/libXext
132 + x11-libs/libXfixes
133 + x11-libs/libXrender
134 + x11-libs/libXt
135 + x11-libs/libxcb:=
136 + >=x11-libs/pango-1.22.0
137 + >=x11-libs/pixman-0.19.2
138 + media-video/ffmpeg
139 + virtual/freedesktop-icon-theme
140 + dbus? (
141 + >=dev-libs/dbus-glib-0.72
142 + >=sys-apps/dbus-0.60
143 + )
144 + jack? ( virtual/jack )
145 + crypt? ( <x11-plugins/enigmail-2.1.0 )
146 + kernel_linux? ( !pulseaudio? ( media-libs/alsa-lib ) )
147 + pulseaudio? ( || (
148 + media-sound/pulseaudio
149 + >=media-sound/apulse-0.1.9
150 + ) )
151 + startup-notification? ( >=x11-libs/startup-notification-0.8 )
152 + system-av1? (
153 + >=media-libs/dav1d-0.3.0:=
154 + >=media-libs/libaom-1.0.0:=
155 + )
156 + system-harfbuzz? (
157 + >=media-gfx/graphite2-1.3.9-r1
158 + >=media-libs/harfbuzz-1.3.3:0=
159 + )
160 + system-icu? ( >=dev-libs/icu-59.1:= )
161 + system-jpeg? ( >=media-libs/libjpeg-turbo-1.2.1 )
162 + system-libevent? ( >=dev-libs/libevent-2.0:0= )
163 + system-libvpx? ( >=media-libs/libvpx-1.8.0:0=[postproc] )
164 + system-png? ( >=media-libs/libpng-1.6.31:0=[apng] )
165 + system-sqlite? ( >=dev-db/sqlite-3.36.0:3[secure-delete,debug=] )
166 + wifi? (
167 + kernel_linux? (
168 + >=dev-libs/dbus-glib-0.72
169 + net-misc/networkmanager
170 + >=sys-apps/dbus-0.60
171 + )
172 + )
173 +"
174 +RDEPEND="${COMMON_DEPEND}
175 + selinux? ( sec-policy/selinux-mozilla )
176 +"
177 +DEPEND="${COMMON_DEPEND}
178 + amd64? ( virtual/opengl )
179 + x86? ( virtual/opengl )
180 +"
181 +
182 +# allow GMP_PLUGIN_LIST to be set in an eclass or
183 +# overridden in the enviromnent (advanced hackers only)
184 +[[ -z ${GMP_PLUGIN_LIST} ]] && GMP_PLUGIN_LIST=( gmp-gmpopenh264 gmp-widevinecdm )
185 +
186 +BUILD_OBJ_DIR="${S}/seamonk"
187 +
188 +pkg_setup() {
189 + if [[ ${PV} == *_beta* ]] || [[ ${PV} == *_pre* ]] ; then
190 + ewarn
191 + ewarn "You're using an unofficial release of ${PN}. Don't file any bug in"
192 + ewarn "Gentoo's Bugtracker against this package in case it breaks for you."
193 + ewarn "Those belong to upstream: https://bugzilla.mozilla.org"
194 + fi
195 +
196 + if use crypt ; then
197 + ewarn
198 + ewarn "Enigmail has dropped support for Seamonkey in early 2019. If you are still"
199 + ewarn "using it, consider yourself lucky, but also consider to start migrating away"
200 + ewarn "from it. The crypt USE flag and its x11-plugins/enigmail dependency will be"
201 + ewarn "removed in the near future."
202 + ewarn
203 + fi
204 +
205 + moz_pkgsetup
206 +}
207 +
208 +pkg_pretend() {
209 + # Ensure we have enough disk space to compile
210 + if use debug || use lto || use test ; then
211 + CHECKREQS_DISK_BUILD="16G"
212 + else
213 + CHECKREQS_DISK_BUILD="12G"
214 + fi
215 + check-reqs_pkg_setup
216 +}
217 +
218 +spkg_setup() {
219 + # Ensure we have enough disk space to compile
220 + if use debug || use lto || use test ; then
221 + CHECKREQS_DISK_BUILD="16G"
222 + else
223 + CHECKREQS_DISK_BUILD="12G"
224 + fi
225 + check-reqs_pkg_setup
226 +}
227 +
228 +src_unpack() {
229 + local l10n_sources="${P}.source-l10n.tar.xz"
230 + unpack ${A/ ${l10n_sources}}
231 +
232 + mkdir "${S}/${P}-l10n" || die
233 + cd "${S}/${P}-l10n" || die
234 + unpack ${l10n_sources}
235 +}
236 +
237 +src_prepare() {
238 + # Apply our patches
239 + eapply "${WORKDIR}"/gentoo-${PN}-patches-${PV}/${PN}
240 +
241 + # Shell scripts sometimes contain DOS line endings; bug 391889
242 + grep -rlZ --include="*.sh" $'\r$' . |
243 + while read -r -d $'\0' file ; do
244 + einfo edos2unix "${file}"
245 + edos2unix "${file}"
246 + done
247 +
248 + use system-libvpx && eapply -p2 "${WORKDIR}"/gentoo-${PN}-patches-${PV}/USE_flag/1009_seamonkey-2.53.3-system_libvpx-1.8.patch
249 +
250 + # Allow user to apply any additional patches without modifing ebuild
251 + eapply_user
252 +
253 + # Enable gnomebreakpad
254 + if use debug ; then
255 + sed -i -e "s:GNOME_DISABLE_CRASH_DIALOG=1:GNOME_DISABLE_CRASH_DIALOG=0:g" \
256 + build/unix/run-mozilla.sh || die
257 + fi
258 +
259 + # Ensure that are plugins dir is enabled as default
260 + sed -i -e "s:/usr/$(get_libdir)/mozilla/plugins:/usr/$(get_libdir)/${PN}/plugins:" \
261 + xpcom/io/nsAppFileLocationProvider.cpp || die
262 +
263 + # Don't exit with error when some libs are missing which we have in
264 + # system.
265 + sed '/^MOZ_PKG_FATAL_WARNINGS/s@= 1@= 0@' \
266 + -i comm/suite/installer/Makefile.in || die
267 + # Don't error out when there's no files to be removed:
268 + sed 's@\(xargs rm\)$@\1 -f@' \
269 + -i toolkit/mozapps/installer/packager.mk || die
270 +
271 + # Don't build libs-% locale files for chatzilla if we are not building chatzilla
272 + # (this is hard-coded in the build system at present rather than being based on configuration)
273 + if ! use chatzilla ; then
274 + sed '/extensions\/irc\/locales libs-/s@^@#@' \
275 + -i comm/suite/locales/Makefile.in || die
276 + fi
277 +
278 + eautoreconf old-configure.in
279 + cd js/src || die
280 + eautoconf old-configure.in
281 +}
282 +
283 +src_configure() {
284 + # Google API keys (see http://www.chromium.org/developers/how-tos/api-keys)
285 + # Note: These are for Gentoo Linux use ONLY. For your own distribution, please
286 + # get your own set of keys.
287 + _google_api_key=AIzaSyDEAOvatFo0eTgsV_ZlEzx0ObmepsMzfAc
288 +
289 + ######################################
290 + #
291 + # mozconfig, CFLAGS and CXXFLAGS setup
292 + #
293 + ######################################
294 +
295 + mozconfig_init
296 +
297 + ##################################
298 + # Former mozconfig_config() part #
299 + ##################################
300 +
301 + # Migrated from mozcoreconf-2
302 + mozconfig_annotate 'system_libs' --with-system-bz2
303 + mozconfig_annotate 'system_libs' --with-system-zlib
304 +
305 + # Disable for testing purposes only
306 + mozconfig_annotate 'Upstream bug 1341234' --disable-stylo
307 +
308 + # Must pass release in order to properly select linker via gold useflag
309 + mozconfig_annotate 'Enable by Gentoo' --enable-release
310 +
311 + # Must pass --enable-gold if using ld.gold
312 + if tc-ld-is-gold ; then
313 + mozconfig_annotate 'tc-ld-is-gold=true' --enable-gold
314 + else
315 + mozconfig_annotate 'tc-ld-is-gold=false' --disable-gold
316 + fi
317 +
318 + # Enable position independent executables
319 + mozconfig_annotate 'enabled by Gentoo' --enable-pie
320 +
321 + mozconfig_use_enable debug
322 + mozconfig_use_enable debug tests
323 + if use debug ; then
324 + mozconfig_annotate 'enabled by Gentoo' --enable-debug-symbols
325 + else
326 + mozconfig_annotate 'disabled by Gentoo' --disable-debug-symbols
327 + fi
328 +
329 + mozconfig_use_enable startup-notification
330 +
331 + # wifi pulls in dbus so manage both here
332 + mozconfig_use_enable wifi necko-wifi
333 + if use kernel_linux && use wifi && ! use dbus ; then
334 + echo "Enabling dbus support due to wifi request"
335 + mozconfig_annotate 'dbus required by necko-wifi on linux' --enable-dbus
336 + else
337 + mozconfig_use_enable dbus
338 + mozconfig_annotate 'disabled' --disable-necko-wifi
339 + fi
340 +
341 + # These are enabled by default in all mozilla applications
342 + mozconfig_annotate '' --with-system-nspr --with-nspr-prefix="${ESYSROOT}"/usr
343 + mozconfig_annotate '' --with-system-nss --with-nss-prefix="${ESYSROOT}"/usr
344 + mozconfig_annotate '' --x-includes="${ESYSROOT}"/usr/include --x-libraries="${ESYSROOT}"/usr/$(get_libdir)
345 + if use system-libevent ; then
346 + mozconfig_annotate '' --with-system-libevent="${ESYSROOT}"/usr
347 + fi
348 + mozconfig_annotate '' --prefix="${EPREFIX}"/usr
349 + mozconfig_annotate '' --libdir="${EPREFIX}"/usr/$(get_libdir)
350 + mozconfig_annotate 'Gentoo default' --enable-system-hunspell
351 + mozconfig_annotate '' --disable-crashreporter
352 + mozconfig_annotate '' --enable-system-ffi
353 + mozconfig_annotate '' --disable-gconf
354 + mozconfig_annotate '' --with-intl-api
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-png
380 + mozconfig_use_with system-harfbuzz
381 + mozconfig_use_with system-harfbuzz system-graphite2
382 + mozconfig_use_with system-av1
383 +
384 + # Modifications to better support ARM, bug 553364
385 + if use cpu_flags_arm_neon ; then
386 + mozconfig_annotate '' --with-fpu=neon
387 + mozconfig_annotate '' --with-thumb=yes
388 + mozconfig_annotate '' --with-thumb-interwork=no
389 + fi
390 + if [[ ${CHOST} == armv* ]] ; then
391 + mozconfig_annotate '' --with-float-abi=hard
392 + if ! use system-libvpx ; then
393 + sed -i -e "s|softfp|hard|" media/libvpx/moz.build || die
394 + fi
395 + fi
396 +
397 + if use lto ; then
398 + # Linking only works when using ld.gold when LTO is enabled
399 + mozconfig_annotate "forcing ld=gold due to USE=lto" --enable-linker=gold
400 + # ThinLTO is currently broken, see bmo#1644409
401 + mozconfig_annotate '+lto' --enable-lto=full
402 + else
403 + if tc-ld-is-gold ; then
404 + mozconfig_annotate "linker is set to gold" --enable-linker=gold
405 + else
406 + mozconfig_annotate "linker is set to bfd" --enable-linker=bfd
407 + fi
408 + fi
409 + # LTO flag was handled via configure
410 + filter-flags '-flto*'
411 +
412 + ##################################
413 + # Former mozconfig_config() end #
414 + ##################################
415 +
416 + # enable JACK, bug 600002
417 + mozconfig_use_enable jack
418 +
419 + # It doesn't compile on alpha without this LDFLAGS
420 + use alpha && append-ldflags "-Wl,--no-relax"
421 +
422 + # Linking fails without this due to memory exhaustion
423 + use x86 && append-ldflags "-Wl,--no-keep-memory"
424 +
425 + # Setup api key for location services
426 + printf '%s' "${_google_api_key}" > "${S}"/google-api-key
427 + mozconfig_annotate '' --with-google-location-service-api-keyfile="${S}/google-api-key"
428 + mozconfig_annotate '' --with-google-safebrowsing-api-keyfile="${S}/google-api-key"
429 +
430 + mozconfig_use_enable chatzilla irc
431 + mozconfig_annotate '' --enable-dominspector
432 +
433 + # use startup-cache for faster startup time
434 + mozconfig_annotate '' --enable-startupcache
435 +
436 + # Broken on some arches
437 + mozconfig_annotate '' --disable-elf-hack
438 +
439 + # Use an objdir to keep things organized.
440 + echo "mk_add_options MOZ_OBJDIR=${BUILD_OBJ_DIR}" >> "${S}"/.mozconfig || die
441 + echo "mk_add_options XARGS=/usr/bin/xargs" >> "${S}"/.mozconfig || die
442 +
443 + mozlinguas_mozconfig
444 +
445 + # Finalize and report settings
446 + mozconfig_final
447 +
448 + # Work around breakage in makeopts with --no-print-directory
449 + MAKEOPTS="${MAKEOPTS/--no-print-directory/}"
450 +
451 + if [[ $(gcc-major-version) -lt 4 ]] ; then
452 + append-cxxflags -fno-stack-protector
453 + elif [[ $(gcc-major-version) -gt 4 || $(gcc-minor-version) -gt 3 ]] ; then
454 + if use amd64 || use x86 ; then
455 + append-flags -mno-avx
456 + fi
457 + fi
458 +
459 + # Pass $MAKEOPTS to build system
460 + export MOZ_MAKE_FLAGS="${MAKEOPTS}"
461 + # Use system's Python environment
462 + export MACH_USE_SYSTEM_PYTHON=1
463 + # Disable notification when build system has finished
464 + export MOZ_NOSPAM=1
465 +
466 + # workaround for funky/broken upstream configure...
467 + export SHELL="${SHELL:-${EPREFIX}/bin/bash}"
468 + #emake V=1 -f client.mk configure
469 + ./mach configure || die
470 +}
471 +
472 +src_compile() {
473 + #MOZ_MAKE_FLAGS="${MAKEOPTS}" SHELL="${SHELL}" \
474 + #emake V=1 -f client.mk
475 + ./mach build --verbose || die
476 +
477 + mozlinguas_src_compile
478 +}
479 +
480 +src_install() {
481 + MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
482 + DICTPATH="\"${EPREFIX}/usr/share/myspell\""
483 +
484 + local emid
485 + pushd "${BUILD_OBJ_DIR}" &>/dev/null || die
486 +
487 + # Pax mark xpcshell for hardened support, only used for startupcache creation.
488 + pax-mark m dist/bin/xpcshell
489 +
490 + # Copy our preference before omnijar is created.
491 + sed "s|SEAMONKEY_PVR|${PVR}|" "${FILESDIR}"/all-gentoo-1.js > \
492 + dist/bin/defaults/pref/all-gentoo.js \
493 + || die
494 +
495 + # Set default path to search for dictionaries.
496 + echo "pref(\"spellchecker.dictionary_path\", ${DICTPATH});" \
497 + >> dist/bin/defaults/pref/all-gentoo.js \
498 + || die
499 +
500 + echo 'pref("extensions.autoDisableScopes", 3);' >> \
501 + dist/bin/defaults/pref/all-gentoo.js \
502 + || die
503 +
504 + local plugin
505 + if ! use gmp-autoupdate ; then
506 + for plugin in "${GMP_PLUGIN_LIST[@]}" ; do
507 + echo "pref(\"media.${plugin}.autoupdate\", false);" >> \
508 + dist/bin/defaults/pref/all-gentoo.js || die
509 + done
510 + fi
511 +
512 + popd &>/dev/null || die
513 +
514 + #MOZ_MAKE_FLAGS="${MAKEOPTS}" SHELL="${SHELL:-${EPREFIX}/bin/bash}" \
515 + #emake DESTDIR="${D}" install
516 + DESTDIR="${D}" ./mach install || die
517 + MOZ_P="${MY_MOZ_P}" mozlinguas_src_install
518 +
519 + cp "${FILESDIR}"/${PN}.desktop "${T}" || die
520 +
521 + sed 's|^\(MimeType=.*\)$|\1text/x-vcard;text/directory;application/mbox;message/rfc822;x-scheme-handler/mailto;|' \
522 + -i "${T}"/${PN}.desktop || die
523 + sed 's|^\(Categories=.*\)$|\1Email;|' -i "${T}"/${PN}.desktop \
524 + || die
525 +
526 + # Install icon and .desktop for menu entry
527 + newicon "${S}"/comm/suite/branding/${PN}/default64.png ${PN}.png
528 + domenu "${T}"/${PN}.desktop
529 +
530 + # Required in order to use plugins and even run seamonkey on hardened.
531 + pax-mark m "${ED}"/${MOZILLA_FIVE_HOME}/{seamonkey,seamonkey-bin,plugin-container}
532 +
533 + if use chatzilla ; then
534 + local emid='{59c81df5-4b7a-477b-912d-4e0fdf64e5f2}'
535 +
536 + # remove the en_US-only xpi file so a version with all requested locales can be installed
537 + if [[ -e "${ED}"/${MOZILLA_FIVE_HOME}/extensions/${emid}.xpi ]] ; then
538 + rm -f "${ED}"/${MOZILLA_FIVE_HOME}/extensions/${emid}.xpi || die
539 + fi
540 +
541 + # merge the extra locales into the main extension
542 + mozlinguas_xpistage_langpacks dist/xpi-stage/chatzilla
543 +
544 + # install the merged extension
545 + mkdir -p "${T}/${emid}" || die
546 + cp -RLp -t "${T}/${emid}" dist/xpi-stage/chatzilla/* || die
547 + insinto ${MOZILLA_FIVE_HOME}/extensions
548 + doins -r "${T}/${emid}"
549 + fi
550 +
551 + # Provide a place for plugins
552 + keepdir "${MOZILLA_FIVE_HOME}/plugins"
553 +
554 + # revdep-rebuild entry
555 + insinto /etc/revdep-rebuild
556 + echo "SEARCH_DIRS_MASK=${MOZILLA_FIVE_HOME}*" >> ${T}/11${PN} || die
557 + doins "${T}"/11${PN}
558 +}
559 +
560 +pkg_preinst() {
561 + SEAMONKEY_PLUGINS_DIR="${EROOT}/usr/$(get_libdir)/${PN}/plugins"
562 +
563 + if [[ -L "${SEAMONKEY_PLUGINS_DIR}" ]] ; then
564 + rm "${SEAMONKEY_PLUGINS_DIR}" || die
565 + fi
566 +}
567 +
568 +pkg_postinst() {
569 + # Update mimedb for the new .desktop file
570 + xdg_desktop_database_update
571 +
572 + if ! use gmp-autoupdate ; then
573 + elog "USE='-gmp-autoupdate' has disabled the following plugins from updating or"
574 + elog "installing into new profiles:"
575 + local plugin
576 + for plugin in "${GMP_PLUGIN_LIST[@]}"; do
577 + elog "\t ${plugin}" ;
578 + 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 +}