1 |
commit: 47b1fad081748e311e10ec3cf7bdd797dfe7fc6d |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Jul 24 13:46:14 2017 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jul 24 13:46:31 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=47b1fad0 |
7 |
|
8 |
www-client/seamonkey: Fixed -fPIC issue (bug #625992) |
9 |
|
10 |
also use enigmail package rather than bundle it in the ebuild. |
11 |
|
12 |
Package-Manager: Portage-2.3.6, Repoman-2.3.3 |
13 |
|
14 |
...ust-contain-fPIC-when-checking-the-linker.patch | 35 ++ |
15 |
www-client/seamonkey/seamonkey-2.48-r1.ebuild | 406 +++++++++++++++++++++ |
16 |
2 files changed, 441 insertions(+) |
17 |
|
18 |
diff --git a/www-client/seamonkey/files/0001-CFLAGS-must-contain-fPIC-when-checking-the-linker.patch b/www-client/seamonkey/files/0001-CFLAGS-must-contain-fPIC-when-checking-the-linker.patch |
19 |
new file mode 100644 |
20 |
index 00000000000..fe3130e3369 |
21 |
--- /dev/null |
22 |
+++ b/www-client/seamonkey/files/0001-CFLAGS-must-contain-fPIC-when-checking-the-linker.patch |
23 |
@@ -0,0 +1,35 @@ |
24 |
+From 4604a80b052456f20187d89e5c3e115ef0bb7251 Mon Sep 17 00:00:00 2001 |
25 |
+From: "Jory A. Pratt" <anarchy@g.o> |
26 |
+Date: Mon, 24 Jul 2017 06:10:11 -0500 |
27 |
+Subject: [PATCH] CFLAGS must contain -fPIC when checking the linker |
28 |
+ https://bugs.gentoo.org/show_bug.cgi?id=607350 |
29 |
+ |
30 |
+Signed-off-by: Jory A. Pratt <anarchy@g.o> |
31 |
+--- |
32 |
+ mozilla/build/autoconf/compiler-opts.m4 | 4 ++++ |
33 |
+ 1 file changed, 4 insertions(+) |
34 |
+ |
35 |
+diff --git a/mozilla/build/autoconf/compiler-opts.m4 b/mozilla/build/autoconf/compiler-opts.m4 |
36 |
+index c12d400..639e99e 100644 |
37 |
+--- a/mozilla/build/autoconf/compiler-opts.m4 |
38 |
++++ b/mozilla/build/autoconf/compiler-opts.m4 |
39 |
+@@ -268,6 +268,8 @@ MOZ_ARG_ENABLE_BOOL(pie, |
40 |
+ |
41 |
+ if test "$GNU_CC" -a -n "$MOZ_PIE"; then |
42 |
+ AC_MSG_CHECKING([for PIE support]) |
43 |
++ _SAVE_CFLAGS=$CFLAGS |
44 |
++ CFLAGS="$CFLAGS -fPIC" |
45 |
+ _SAVE_LDFLAGS=$LDFLAGS |
46 |
+ LDFLAGS="$LDFLAGS -pie" |
47 |
+ AC_TRY_LINK(,,AC_MSG_RESULT([yes]) |
48 |
+@@ -275,6 +277,8 @@ if test "$GNU_CC" -a -n "$MOZ_PIE"; then |
49 |
+ AC_MSG_RESULT([no]) |
50 |
+ AC_MSG_ERROR([--enable-pie requires PIE support from the linker.])) |
51 |
+ LDFLAGS=$_SAVE_LDFLAGS |
52 |
++ CFLAGS=$_SAVE_CFLAGS |
53 |
++ |
54 |
+ fi |
55 |
+ |
56 |
+ AC_SUBST(MOZ_PROGRAM_LDFLAGS) |
57 |
+-- |
58 |
+2.13.3 |
59 |
|
60 |
diff --git a/www-client/seamonkey/seamonkey-2.48-r1.ebuild b/www-client/seamonkey/seamonkey-2.48-r1.ebuild |
61 |
new file mode 100644 |
62 |
index 00000000000..ba09e5498e9 |
63 |
--- /dev/null |
64 |
+++ b/www-client/seamonkey/seamonkey-2.48-r1.ebuild |
65 |
@@ -0,0 +1,406 @@ |
66 |
+# Copyright 1999-2017 Gentoo Foundation |
67 |
+# Distributed under the terms of the GNU General Public License v2 |
68 |
+ |
69 |
+EAPI=6 |
70 |
+WANT_AUTOCONF="2.1" |
71 |
+ |
72 |
+# This list can be updated with scripts/get_langs.sh from the mozilla overlay |
73 |
+# note - could not roll langpacks for: ca fi |
74 |
+#MOZ_LANGS=(ca cs de en-GB es-AR es-ES fi fr gl hu it ja lt nb-NO nl pl pt-PT |
75 |
+# ru sk sv-SE tr uk zh-CN zh-TW) |
76 |
+MOZ_LANGS=(cs de en-GB es-AR es-ES fr hu it ja lt nl pl pt-PT |
77 |
+ ru sk sv-SE zh-CN zh-TW) |
78 |
+ |
79 |
+MOZ_PV="${PV/_pre*}" |
80 |
+MOZ_PV="${MOZ_PV/_alpha/a}" |
81 |
+MOZ_PV="${MOZ_PV/_beta/b}" |
82 |
+MOZ_PV="${MOZ_PV/_rc/rc}" |
83 |
+MOZ_PV="${MOZ_PV/_p[0-9]}" |
84 |
+MOZ_P="${P}" |
85 |
+MY_MOZ_P="${PN}-${MOZ_PV}" |
86 |
+ |
87 |
+if [[ ${PV} == *_pre* ]] ; then |
88 |
+# the following are for upstream build candidates |
89 |
+ MOZ_HTTP_URI="https://archive.mozilla.org/pub/${PN}/candidates/${MOZ_PV}-candidates/build${PV##*_pre}" |
90 |
+ MOZ_LANGPACK_PREFIX="linux-i686/xpi/" |
91 |
+ SRC_URI+=" ${MOZ_HTTP_URI}/source/${MY_MOZ_P}.source.tar.xz -> ${P}.source.tar.xz" |
92 |
+ S="${WORKDIR}/${MY_MOZ_P}" |
93 |
+ # And the langpack stuff stays at eclass defaults |
94 |
+# the following is for self-rolled releases |
95 |
+ #MOZ_HTTP_URI="https://dev.gentoo.org/~axs/distfiles" |
96 |
+ #MOZ_LANGPACK_PREFIX="${MY_MOZ_P}." |
97 |
+ #MOZ_LANGPACK_SUFFIX=".langpack.xpi" |
98 |
+ #SRC_URI="${SRC_URI} |
99 |
+ #${MOZ_HTTP_URI}/${P}.source.tar.xz |
100 |
+ #" |
101 |
+elif [[ ${PV} == *_p[0-9] ]]; then |
102 |
+ # gentoo-unofficial release using thunderbird distfiles to build seamonkey instead |
103 |
+ TB_MAJOR=45 |
104 |
+ SMPV="${PV%.[0-9].*}" |
105 |
+ MOZ_P="${PN}-${SMPV}" |
106 |
+ MOZ_HTTP_URI="https://archive.mozilla.org/pub/thunderbird/releases/${MOZ_PV/${SMPV}/${TB_MAJOR}}" |
107 |
+ MOZ_GENERATE_LANGPACKS=1 |
108 |
+ S="${WORKDIR}/thunderbird-${MOZ_PV/${SMPV}/${TB_MAJOR}}" |
109 |
+ SRC_URI="${SRC_URI} |
110 |
+ ${MOZ_HTTP_URI}/source/${MY_MOZ_P/${MOZ_P}/thunderbird-${TB_MAJOR}}.source.tar.xz |
111 |
+ https://dev.gentoo.org/~axs/distfiles/${PN}-2.42.3.0-l10n-sources.tar.xz |
112 |
+ https://dev.gentoo.org/~axs/distfiles/chatzilla-2.42.tar.xz |
113 |
+ https://dev.gentoo.org/~axs/distfiles/dom-inspector-2.0.16.tar.xz |
114 |
+ " |
115 |
+else |
116 |
+ MOZ_HTTP_URI="https://archive.mozilla.org/pub/${PN}/releases/${MOZ_PV}" |
117 |
+ MOZ_LANGPACK_PREFIX="langpack/${MY_MOZ_P}." |
118 |
+ MOZ_LANGPACK_SUFFIX=".langpack.xpi" |
119 |
+ S="${WORKDIR}/${PN}-${MOZ_PV}" |
120 |
+ SRC_URI="${SRC_URI} |
121 |
+ ${MOZ_HTTP_URI}/source/${MY_MOZ_P}.source.tar.xz -> ${P}.source.tar.xz |
122 |
+ " |
123 |
+fi |
124 |
+ |
125 |
+MOZCONFIG_OPTIONAL_GTK3=1 |
126 |
+MOZCONFIG_OPTIONAL_WIFI=1 |
127 |
+inherit check-reqs flag-o-matic toolchain-funcs eutils mozconfig-v6.51 multilib pax-utils xdg-utils autotools mozextension nsplugins mozlinguas-v2 |
128 |
+ |
129 |
+PATCHFF="firefox-51.0-patches-06" |
130 |
+PATCH="${PN}-2.46-patches-01" |
131 |
+ |
132 |
+DESCRIPTION="Seamonkey Web Browser" |
133 |
+HOMEPAGE="http://www.seamonkey-project.org" |
134 |
+KEYWORDS="~alpha ~amd64 ~arm ~ppc ~ppc64 ~x86" |
135 |
+ |
136 |
+SLOT="0" |
137 |
+LICENSE="MPL-2.0 GPL-2 LGPL-2.1" |
138 |
+IUSE="+calendar +chatzilla +crypt +gmp-autoupdate +ipc jack minimal pulseaudio +roaming selinux test" |
139 |
+ |
140 |
+SRC_URI+=" |
141 |
+ https://dev.gentoo.org/~anarchy/mozilla/patchsets/${PATCHFF}.tar.xz |
142 |
+ https://dev.gentoo.org/~axs/mozilla/patchsets/${PATCHFF}.tar.xz |
143 |
+ https://dev.gentoo.org/~polynomial-c/mozilla/patchsets/${PATCHFF}.tar.xz |
144 |
+ https://dev.gentoo.org/~axs/mozilla/patchsets/${PATCH}.tar.xz |
145 |
+ https://dev.gentoo.org/~polynomial-c/mozilla/patchsets/${PATCH}.tar.xz |
146 |
+" |
147 |
+ |
148 |
+ASM_DEPEND=">=dev-lang/yasm-1.1" |
149 |
+ |
150 |
+RDEPEND=" |
151 |
+ >=dev-libs/nss-3.28.1 |
152 |
+ >=dev-libs/nspr-4.13 |
153 |
+ crypt? ( || ( |
154 |
+ ( >=app-crypt/gnupg-2.0 |
155 |
+ || ( |
156 |
+ app-crypt/pinentry[gtk] |
157 |
+ app-crypt/pinentry[qt5] |
158 |
+ app-crypt/pinentry[qt4] |
159 |
+ ) |
160 |
+ ) |
161 |
+ =app-crypt/gnupg-1.4* ) |
162 |
+ ) |
163 |
+ jack? ( virtual/jack ) |
164 |
+" |
165 |
+ |
166 |
+DEPEND=" |
167 |
+ ${RDEPEND} |
168 |
+ !elibc_glibc? ( !elibc_uclibc? ( !elibc_musl? ( dev-libs/libexecinfo ) ) ) |
169 |
+ crypt? ( dev-lang/perl ) |
170 |
+ amd64? ( ${ASM_DEPEND} |
171 |
+ virtual/opengl ) |
172 |
+ x86? ( ${ASM_DEPEND} |
173 |
+ virtual/opengl ) |
174 |
+" |
175 |
+ |
176 |
+PDEPEND=" |
177 |
+ crypt? ( x11-plugins/enigmail ) |
178 |
+" |
179 |
+ |
180 |
+BUILD_OBJ_DIR="${S}/seamonk" |
181 |
+ |
182 |
+# allow GMP_PLUGIN_LIST to be set in an eclass or |
183 |
+# overridden in the enviromnent (advanced hackers only) |
184 |
+if [[ -z $GMP_PLUGIN_LIST ]] ; then |
185 |
+ GMP_PLUGIN_LIST=( gmp-gmpopenh264 gmp-widevinecdm ) |
186 |
+fi |
187 |
+ |
188 |
+pkg_setup() { |
189 |
+ if [[ ${PV} == *_pre* ]] ; then |
190 |
+ ewarn "You're using an unofficial release of ${PN}. Don't file any bug in" |
191 |
+ ewarn "Gentoo's Bugtracker against this package in case it breaks for you." |
192 |
+ ewarn "Those belong to upstream: https://bugzilla.mozilla.org" |
193 |
+ fi |
194 |
+ |
195 |
+ moz_pkgsetup |
196 |
+} |
197 |
+ |
198 |
+pkg_pretend() { |
199 |
+ # Ensure we have enough disk space to compile |
200 |
+ if use debug || use test ; then |
201 |
+ CHECKREQS_DISK_BUILD="8G" |
202 |
+ else |
203 |
+ CHECKREQS_DISK_BUILD="4G" |
204 |
+ fi |
205 |
+ check-reqs_pkg_setup |
206 |
+} |
207 |
+ |
208 |
+src_unpack() { |
209 |
+ unpack ${A} |
210 |
+ |
211 |
+ # Unpack language packs |
212 |
+ mozlinguas_src_unpack |
213 |
+} |
214 |
+ |
215 |
+src_prepare() { |
216 |
+ # Apply our patches |
217 |
+ eapply "${WORKDIR}"/seamonkey |
218 |
+ eapply "${FILESDIR}/0001-CFLAGS-must-contain-fPIC-when-checking-the-linker.patch" #625992 |
219 |
+ |
220 |
+ # browser patches go here |
221 |
+ pushd "${S}"/mozilla &>/dev/null || die |
222 |
+ rm -f "${WORKDIR}"/firefox/1000_gentoo_install_dir.patch |
223 |
+ rm -f "${WORKDIR}"/firefox/2000-firefox_gentoo_install_dirs.patch |
224 |
+ eapply "${WORKDIR}"/firefox |
225 |
+ eapply "${FILESDIR}/firefox-Include-sys-sysmacros.h-for-major-minor-when-availab.patch" |
226 |
+ popd &>/dev/null || die |
227 |
+ |
228 |
+ # ugly hackaround for system-harfbuzz |
229 |
+ if ! grep -Fq "harfbuzz/hb-glib.h" mozilla/config/system-headers ; then |
230 |
+ sed '/MOZ_SYSTEM_HARFBUZZ/aharfbuzz/hb-glib.h' \ |
231 |
+ -i mozilla/config/system-headers || die |
232 |
+ else |
233 |
+ einfo "harfbuzz hackery no longer needed." |
234 |
+ fi |
235 |
+ |
236 |
+ if grep -q '^sdkdir.*$(MOZ_APP_NAME)-devel' mozilla/config/baseconfig.mk ; then |
237 |
+ sed '/^sdkdir/s@-devel@@' \ |
238 |
+ -i mozilla/config/baseconfig.mk || die |
239 |
+ else |
240 |
+ einfo "baseconfig.mk hackery no longer needed." |
241 |
+ fi |
242 |
+ |
243 |
+ # Shell scripts sometimes contain DOS line endings; bug 391889 |
244 |
+ grep -rlZ --include="*.sh" $'\r$' . | |
245 |
+ while read -r -d $'\0' file ; do |
246 |
+ einfo edos2unix "${file}" |
247 |
+ edos2unix "${file}" |
248 |
+ done |
249 |
+ |
250 |
+ # Allow user to apply any additional patches without modifing ebuild |
251 |
+ eapply_user |
252 |
+ |
253 |
+ local ms="${S}/mozilla" |
254 |
+ |
255 |
+ # Enable gnomebreakpad |
256 |
+ if use debug ; then |
257 |
+ sed -i -e "s:GNOME_DISABLE_CRASH_DIALOG=1:GNOME_DISABLE_CRASH_DIALOG=0:g" \ |
258 |
+ "${ms}"/build/unix/run-mozilla.sh || die "sed failed!" |
259 |
+ fi |
260 |
+ |
261 |
+ # Ensure that are plugins dir is enabled as default |
262 |
+ sed -i -e "s:/usr/lib/mozilla/plugins:/usr/lib/nsbrowser/plugins:" \ |
263 |
+ "${ms}"/xpcom/io/nsAppFileLocationProvider.cpp || die "sed failed to replace plugin path for 32bit!" |
264 |
+ sed -i -e "s:/usr/lib64/mozilla/plugins:/usr/lib64/nsbrowser/plugins:" \ |
265 |
+ "${ms}"/xpcom/io/nsAppFileLocationProvider.cpp || die "sed failed to replace plugin path for 64bit!" |
266 |
+ |
267 |
+ # Don't exit with error when some libs are missing which we have in |
268 |
+ # system. |
269 |
+ sed '/^MOZ_PKG_FATAL_WARNINGS/s@= 1@= 0@' \ |
270 |
+ -i "${S}"/suite/installer/Makefile.in || die |
271 |
+ # Don't error out when there's no files to be removed: |
272 |
+ sed 's@\(xargs rm\)$@\1 -f@' \ |
273 |
+ -i "${ms}"/toolkit/mozapps/installer/packager.mk || die |
274 |
+ |
275 |
+ eautoreconf old-configure.in |
276 |
+ cd "${S}"/mozilla || die |
277 |
+ eautoconf old-configure.in |
278 |
+ cd "${S}"/mozilla/js/src || die |
279 |
+ eautoconf old-configure.in |
280 |
+ cd "${S}"/mozilla/memory/jemalloc/src || die |
281 |
+ WANT_AUTOCONF= eautoconf |
282 |
+} |
283 |
+ |
284 |
+src_configure() { |
285 |
+ MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}" |
286 |
+ MEXTENSIONS="default" |
287 |
+ # Google API keys (see http://www.chromium.org/developers/how-tos/api-keys) |
288 |
+ # Note: These are for Gentoo Linux use ONLY. For your own distribution, please |
289 |
+ # get your own set of keys. |
290 |
+ _google_api_key=AIzaSyDEAOvatFo0eTgsV_ZlEzx0ObmepsMzfAc |
291 |
+ |
292 |
+ #################################### |
293 |
+ # |
294 |
+ # mozconfig, CFLAGS and CXXFLAGS setup |
295 |
+ # |
296 |
+ #################################### |
297 |
+ |
298 |
+ mozconfig_init |
299 |
+ mozconfig_config |
300 |
+ |
301 |
+ # enable JACK, bug 600002 |
302 |
+ mozconfig_use_enable jack |
303 |
+ |
304 |
+ # It doesn't compile on alpha without this LDFLAGS |
305 |
+ use alpha && append-ldflags "-Wl,--no-relax" |
306 |
+ |
307 |
+ if ! use chatzilla ; then |
308 |
+ MEXTENSIONS+=",-irc" |
309 |
+ fi |
310 |
+ if ! use roaming ; then |
311 |
+ MEXTENSIONS+=",-sroaming" |
312 |
+ fi |
313 |
+ |
314 |
+ # Setup api key for location services |
315 |
+ echo -n "${_google_api_key}" > "${S}"/google-api-key |
316 |
+ mozconfig_annotate '' --with-google-api-keyfile="${S}/google-api-key" |
317 |
+ |
318 |
+ mozconfig_annotate '' --enable-extensions="${MEXTENSIONS}" |
319 |
+ |
320 |
+ # Other sm-specific settings |
321 |
+ mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME} |
322 |
+ mozconfig_annotate '' --enable-safe-browsing |
323 |
+ mozconfig_use_enable calendar |
324 |
+ |
325 |
+ mozlinguas_mozconfig |
326 |
+ |
327 |
+ # Use an objdir to keep things organized. |
328 |
+ echo "mk_add_options MOZ_OBJDIR=${BUILD_OBJ_DIR}" >> "${S}"/.mozconfig |
329 |
+ echo "mk_add_options XARGS=/usr/bin/xargs" >> "${S}"/.mozconfig |
330 |
+ |
331 |
+ # Finalize and report settings |
332 |
+ mozconfig_final |
333 |
+ |
334 |
+ # Work around breakage in makeopts with --no-print-directory |
335 |
+ MAKEOPTS="${MAKEOPTS/--no-print-directory/}" |
336 |
+ |
337 |
+ if [[ $(gcc-major-version) -lt 4 ]] ; then |
338 |
+ append-cxxflags -fno-stack-protector |
339 |
+ elif [[ $(gcc-major-version) -gt 4 || $(gcc-minor-version) -gt 3 ]] ; then |
340 |
+ if use amd64 || use x86 ; then |
341 |
+ append-flags -mno-avx |
342 |
+ fi |
343 |
+ fi |
344 |
+ |
345 |
+ # workaround for funky/broken upstream configure... |
346 |
+ SHELL="${SHELL:-${EPREFIX%/}/bin/bash}" \ |
347 |
+ emake V=1 -f client.mk configure |
348 |
+} |
349 |
+ |
350 |
+src_compile() { |
351 |
+ MOZ_MAKE_FLAGS="${MAKEOPTS}" SHELL="${SHELL}" \ |
352 |
+ emake V=1 -f client.mk |
353 |
+ |
354 |
+ mozlinguas_src_compile |
355 |
+} |
356 |
+ |
357 |
+src_install() { |
358 |
+ MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}" |
359 |
+ DICTPATH="\"${EPREFIX}/usr/share/myspell\"" |
360 |
+ |
361 |
+ local emid |
362 |
+ cd "${BUILD_OBJ_DIR}" || die |
363 |
+ |
364 |
+ # Pax mark xpcshell for hardened support, only used for startupcache creation. |
365 |
+ pax-mark m "${BUILD_OBJ_DIR}/dist/bin/xpcshell" |
366 |
+ |
367 |
+ # Copy our preference before omnijar is created. |
368 |
+ sed "s|SEAMONKEY_PVR|${PVR}|" "${FILESDIR}"/all-gentoo-1.js > \ |
369 |
+ "${BUILD_OBJ_DIR}/dist/bin/defaults/pref/all-gentoo.js" \ |
370 |
+ || die |
371 |
+ |
372 |
+ # Set default path to search for dictionaries. |
373 |
+ echo "pref(\"spellchecker.dictionary_path\", ${DICTPATH});" \ |
374 |
+ >> "${BUILD_OBJ_DIR}/dist/bin/defaults/pref/all-gentoo.js" \ |
375 |
+ || die |
376 |
+ |
377 |
+ echo 'pref("extensions.autoDisableScopes", 3);' >> \ |
378 |
+ "${BUILD_OBJ_DIR}/dist/bin/defaults/pref/all-gentoo.js" \ |
379 |
+ || die |
380 |
+ |
381 |
+ local plugin |
382 |
+ if ! use gmp-autoupdate ; then |
383 |
+ for plugin in "${GMP_PLUGIN_LIST[@]}" ; do |
384 |
+ echo "pref(\"media.${plugin}.autoupdate\", false);" >> \ |
385 |
+ "${S}/${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/all-gentoo.js" \ |
386 |
+ || dir |
387 |
+ done |
388 |
+ fi |
389 |
+ |
390 |
+ MOZ_MAKE_FLAGS="${MAKEOPTS}" SHELL="${SHELL:-${EPREFIX%/}/bin/bash}" \ |
391 |
+ emake DESTDIR="${D}" install |
392 |
+ cp "${FILESDIR}"/${PN}.desktop "${T}" || die |
393 |
+ |
394 |
+ sed 's|^\(MimeType=.*\)$|\1text/x-vcard;text/directory;application/mbox;message/rfc822;x-scheme-handler/mailto;|' \ |
395 |
+ -i "${T}"/${PN}.desktop || die |
396 |
+ sed 's|^\(Categories=.*\)$|\1Email;|' -i "${T}"/${PN}.desktop \ |
397 |
+ || die |
398 |
+ |
399 |
+ # Install language packs |
400 |
+ mozlinguas_src_install |
401 |
+ |
402 |
+ # Add StartupNotify=true bug 290401 |
403 |
+ if use startup-notification ; then |
404 |
+ echo "StartupNotify=true" >> "${T}"/${PN}.desktop || die |
405 |
+ fi |
406 |
+ |
407 |
+ # Install icon and .desktop for menu entry |
408 |
+ newicon "${S}"/suite/branding/nightly/content/icon64.png ${PN}.png |
409 |
+ domenu "${T}"/${PN}.desktop |
410 |
+ |
411 |
+ # Required in order to use plugins and even run seamonkey on hardened. |
412 |
+ pax-mark m "${ED}"${MOZILLA_FIVE_HOME}/{seamonkey,seamonkey-bin,plugin-container} |
413 |
+ |
414 |
+ if use minimal ; then |
415 |
+ rm -rf "${ED}"/usr/include "${ED}${MOZILLA_FIVE_HOME}"/{idl,include,lib,sdk} |
416 |
+ fi |
417 |
+ |
418 |
+ if use chatzilla ; then |
419 |
+ local emid='{59c81df5-4b7a-477b-912d-4e0fdf64e5f2}' |
420 |
+ |
421 |
+ # remove the en_US-only xpi file so a version with all requested locales can be installed |
422 |
+ if [[ -e "${ED}"${MOZILLA_FIVE_HOME}/distribution/extensions/${emid}.xpi ]]; then |
423 |
+ rm -f "${ED}"${MOZILLA_FIVE_HOME}/distribution/extensions/${emid}.xpi || die |
424 |
+ fi |
425 |
+ |
426 |
+ # merge the extra locales into the main extension |
427 |
+ mozlinguas_xpistage_langpacks "${BUILD_OBJ_DIR}"/dist/xpi-stage/chatzilla |
428 |
+ |
429 |
+ # install the merged extension |
430 |
+ mkdir -p "${T}/${emid}" || die |
431 |
+ cp -RLp -t "${T}/${emid}" "${BUILD_OBJ_DIR}"/dist/xpi-stage/chatzilla/* || die |
432 |
+ insinto ${MOZILLA_FIVE_HOME}/distribution/extensions |
433 |
+ doins -r "${T}/${emid}" |
434 |
+ fi |
435 |
+ |
436 |
+ # Handle plugins dir through nsplugins.eclass |
437 |
+ share_plugins_dir |
438 |
+ |
439 |
+ # revdep-rebuild entry |
440 |
+ insinto /etc/revdep-rebuild |
441 |
+ echo "SEARCH_DIRS_MASK=${MOZILLA_FIVE_HOME}*" >> ${T}/11${PN} |
442 |
+ doins "${T}"/11${PN} |
443 |
+} |
444 |
+ |
445 |
+pkg_preinst() { |
446 |
+ MOZILLA_FIVE_HOME="${ROOT}/usr/$(get_libdir)/${PN}" |
447 |
+ |
448 |
+ if [ -d ${MOZILLA_FIVE_HOME}/plugins ] ; then |
449 |
+ rm ${MOZILLA_FIVE_HOME}/plugins -rf |
450 |
+ fi |
451 |
+} |
452 |
+ |
453 |
+pkg_postinst() { |
454 |
+ MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}" |
455 |
+ |
456 |
+ # Update mimedb for the new .desktop file |
457 |
+ xdg_desktop_database_update |
458 |
+ #gnome2_icon_cache_update |
459 |
+ |
460 |
+ if ! use gmp-autoupdate ; then |
461 |
+ elog "USE='-gmp-autoupdate' has disabled the following plugins from updating or" |
462 |
+ elog "installing into new profiles:" |
463 |
+ local plugin |
464 |
+ for plugin in "${GMP_PLUGIN_LIST[@]}"; do elog "\t ${plugin}" ; done |
465 |
+ fi |
466 |
+ |
467 |
+ if use chatzilla ; then |
468 |
+ elog "chatzilla is now an extension which can be en-/disabled and configured via" |
469 |
+ elog "the Add-on manager." |
470 |
+ fi |
471 |
+} |