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