/[gentoo-x86]/www-client/seamonkey/seamonkey-2.14.ebuild
Gentoo

Contents of /www-client/seamonkey/seamonkey-2.14.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Sun Nov 25 13:06:02 2012 UTC (21 months ago) by polynomial-c
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Fix about:memory use for jemalloc-3

(Portage version: 2.2.0_alpha142/cvs/Linux x86_64, signed Manifest commit with key 0x981CA6FC)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/www-client/seamonkey/seamonkey-2.14.ebuild,v 1.1 2012/11/20 08:57:57 polynomial-c Exp $
4
5 EAPI="3"
6 WANT_AUTOCONF="2.1"
7
8 # This list can be updated with scripts/get_langs.sh from the mozilla overlay
9 MOZ_LANGS=(be ca cs de en en-GB en-US es-AR es-ES fi fr gl hu it ja lt nb-NO nl
10 pl pt-PT ru sk sv-SE tr uk zh-CN zh-TW)
11
12 MOZ_PV="${PV/_pre*}"
13 MOZ_PV="${MOZ_PV/_alpha/a}"
14 MOZ_PV="${MOZ_PV/_beta/b}"
15 MOZ_PV="${MOZ_PV/_rc/rc}"
16 MOZ_P="${PN}-${PV}"
17 MY_MOZ_P="${PN}-${MOZ_PV}"
18
19 if [[ ${PV} == *_pre* ]] ; then
20 MOZ_FTP_URI="ftp://ftp.mozilla.org/pub/${PN}/candidates/${MOZ_PV}-candidates/build${PV##*_pre}"
21 MOZ_LANGPACK_PREFIX="linux-i686/xpi/"
22 # And the langpack stuff stays at eclass defaults
23 else
24 MOZ_FTP_URI="ftp://ftp.mozilla.org/pub/${PN}/releases/${MOZ_PV}"
25 MOZ_LANGPACK_PREFIX="langpack/${MY_MOZ_P}."
26 MOZ_LANGPACK_SUFFIX=".langpack.xpi"
27 fi
28
29 inherit flag-o-matic toolchain-funcs eutils mozconfig-3 multilib pax-utils fdo-mime autotools mozextension python nsplugins mozlinguas
30
31 PATCHFF="firefox-16.0-patches-0.3"
32 PATCH="${PN}-2.14-patches-01"
33 EMVER="1.4.6"
34
35 DESCRIPTION="Seamonkey Web Browser"
36 HOMEPAGE="http://www.seamonkey-project.org"
37
38 if [[ ${PV} == *_pre* ]] ; then
39 # pre-releases. No need for arch teams to change KEYWORDS here.
40
41 KEYWORDS=""
42 else
43 # This is where arch teams should change the KEYWORDS.
44
45 KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86"
46 fi
47
48 SLOT="0"
49 LICENSE="MPL-2.0 GPL-2 LGPL-2.1"
50 IUSE="+alsa +chatzilla +crypt gstreamer +ipc +jit +roaming system-sqlite +webm"
51
52 SRC_URI+="${SRC_URI}
53 ${MOZ_FTP_URI}/source/${MY_MOZ_P}.source.tar.bz2 -> ${P}.source.tar.bz2
54 http://dev.gentoo.org/~anarchy/mozilla/patchsets/${PATCHFF}.tar.xz
55 http://dev.gentoo.org/~polynomial-c/mozilla/patchsets/${PATCH}.tar.xz
56 crypt? ( http://www.mozilla-enigmail.org/download/source/enigmail-${EMVER}.tar.gz )"
57
58 ASM_DEPEND=">=dev-lang/yasm-1.1"
59
60 # Mesa 7.10 needed for WebGL + bugfixes
61 RDEPEND=">=sys-devel/binutils-2.16.1
62 >=dev-libs/nss-3.13.6
63 >=dev-libs/nspr-4.9.2
64 >=dev-libs/glib-2.26
65 >=media-libs/mesa-7.10
66 >=media-libs/libpng-1.5.11[apng]
67 >=x11-libs/cairo-1.10
68 >=x11-libs/pango-1.14.0
69 >=x11-libs/gtk+-2.14
70 virtual/libffi
71 gstreamer? (
72 >=media-libs/gstreamer-0.10.33:0.10
73 >=media-libs/gst-plugins-base-0.10.33:0.10
74 )
75 system-sqlite? ( >=dev-db/sqlite-3.7.13[fts3,secure-delete,threadsafe,unlock-notify,debug=] )
76 crypt? ( >=app-crypt/gnupg-1.4 )
77 webm? (
78 >=media-libs/libvpx-1.0.0
79 kernel_linux? ( media-libs/alsa-lib )
80 )"
81
82 DEPEND="${RDEPEND}
83 dev-python/pysqlite
84 !elibc_glibc? ( dev-libs/libexecinfo )
85 virtual/pkgconfig
86 webm? ( amd64? ( ${ASM_DEPEND} )
87 x86? ( ${ASM_DEPEND} )
88 virtual/opengl )"
89
90 if [[ ${PV} == *beta* ]] ; then
91 S="${WORKDIR}/comm-beta"
92 else
93 S="${WORKDIR}/comm-release"
94 fi
95
96 src_unpack() {
97 unpack ${A}
98
99 # Unpack language packs
100 mozlinguas_src_unpack
101 }
102
103 pkg_setup() {
104 if [[ ${PV} == *_pre* ]] ; then
105 ewarn "You're using an unofficial release of ${PN}. Don't file any bug in"
106 ewarn "Gentoo's Bugtracker against this package in case it breaks for you."
107 ewarn "Those belong to upstream: https://bugzilla.mozilla.org"
108 fi
109
110 moz_pkgsetup
111 }
112
113 src_prepare() {
114 # Apply our patches
115 EPATCH_SUFFIX="patch" \
116 EPATCH_FORCE="yes" \
117 epatch "${WORKDIR}/seamonkey"
118
119 # browser patches go here
120 pushd "${S}"/mozilla &>/dev/null || die
121 EPATCH_EXCLUDE="2000-firefox_gentoo_install_dirs.patch" \
122 EPATCH_SUFFIX="patch" \
123 EPATCH_FORCE="yes" \
124 epatch "${WORKDIR}/firefox"
125 popd &>/dev/null || die
126
127 # Shell scripts sometimes contain DOS line endings; bug 391889
128 grep -rlZ --include="*.sh" $'\r$' . |
129 while read -r -d $'\0' file ; do
130 einfo edos2unix "${file}"
131 edos2unix "${file}" || die
132 done
133
134 # Allow user to apply any additional patches without modifing ebuild
135 epatch_user
136
137 if use crypt ; then
138 mv "${WORKDIR}"/enigmail "${S}"/mailnews/extensions/enigmail
139 #cd "${S}"/mailnews/extensions/enigmail || die
140 #cd "${S}"
141 fi
142
143 local ms="${S}/mozilla"
144
145 # Enable gnomebreakpad
146 if use debug ; then
147 sed -i -e "s:GNOME_DISABLE_CRASH_DIALOG=1:GNOME_DISABLE_CRASH_DIALOG=0:g" \
148 "${ms}"/build/unix/run-mozilla.sh || die "sed failed!"
149 fi
150
151 # Disable gnomevfs extension
152 sed -i -e "s:gnomevfs::" "${S}"/suite/confvars.sh \
153 -e "s:gnomevfs::" "${ms}"/browser/confvars.sh \
154 -e "s:gnomevfs::" "${ms}"/xulrunner/confvars.sh \
155 || die "Failed to remove gnomevfs extension"
156
157 # Ensure that are plugins dir is enabled as default
158 sed -i -e "s:/usr/lib/mozilla/plugins:/usr/$(get_libdir)/nsbrowser/plugins:" \
159 "${ms}"/xpcom/io/nsAppFileLocationProvider.cpp || die "sed failed to replace plugin path!"
160
161 # Don't exit with error when some libs are missing which we have in
162 # system.
163 sed '/^MOZ_PKG_FATAL_WARNINGS/s@= 1@= 0@' \
164 -i "${S}"/suite/installer/Makefile.in || die
165 # Don't error out when there's no files to be removed:
166 sed 's@\(xargs rm\)$@\1 -f@' \
167 -i "${S}"/mozilla/toolkit/mozapps/installer/packager.mk || die
168
169 eautoreconf
170 cd "${S}"/mozilla
171 eautoconf
172 }
173
174 src_configure() {
175 MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
176 MEXTENSIONS="default"
177
178 ####################################
179 #
180 # mozconfig, CFLAGS and CXXFLAGS setup
181 #
182 ####################################
183
184 mozconfig_init
185 mozconfig_config
186
187 # It doesn't compile on alpha without this LDFLAGS
188 use alpha && append-ldflags "-Wl,--no-relax"
189
190 if use chatzilla ; then
191 MEXTENSIONS+=",irc"
192 else
193 MEXTENSIONS+=",-irc"
194 fi
195 if ! use roaming ; then
196 MEXTENSIONS+=",-sroaming"
197 fi
198
199 mozconfig_annotate '' --prefix="${EPREFIX}"/usr
200 mozconfig_annotate '' --libdir="${EPREFIX}"/usr/$(get_libdir)
201 mozconfig_annotate '' --enable-extensions="${MEXTENSIONS}"
202 mozconfig_annotate '' --disable-gconf
203 mozconfig_annotate '' --enable-jsd
204 mozconfig_annotate '' --enable-canvas
205 mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME}
206 mozconfig_annotate '' --enable-system-ffi
207 mozconfig_annotate '' --with-system-png
208 mozconfig_annotate '' --target="${CTARGET:-${CHOST}}"
209 mozconfig_annotate '' --enable-safe-browsing
210
211 mozconfig_use_enable gstreamer
212 mozconfig_use_enable system-sqlite
213 # Both methodjit and tracejit conflict with PaX
214 mozconfig_use_enable jit methodjit
215 mozconfig_use_enable jit tracejit
216
217 # Use an objdir to keep things organized.
218 echo "mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/seamonk" \
219 >> "${S}"/.mozconfig
220
221 # Finalize and report settings
222 mozconfig_final
223
224 # Work around breakage in makeopts with --no-print-directory
225 MAKEOPTS="${MAKEOPTS/--no-print-directory/}"
226
227 if [[ $(gcc-major-version) -lt 4 ]] ; then
228 append-cxxflags -fno-stack-protector
229 elif [[ $(gcc-major-version) -gt 4 || $(gcc-minor-version) -gt 3 ]] ; then
230 if use amd64 || use x86 ; then
231 append-flags -mno-avx
232 fi
233 fi
234 }
235
236 src_compile() {
237 CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \
238 MOZ_MAKE_FLAGS="${MAKEOPTS}" \
239 emake -f client.mk || die
240
241 # Only build enigmail extension if conditions are met.
242 if use crypt ; then
243 cd "${S}"/mailnews/extensions/enigmail || die
244 ./makemake -r 2&> /dev/null
245 cd "${S}"/seamonk/mailnews/extensions/enigmail
246 emake || die "make enigmail failed"
247 emake xpi || die "make enigmail xpi failed"
248 fi
249 }
250
251 src_install() {
252 MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
253 local emid obj_dir="seamonk"
254 cd "${S}/${obj_dir}"
255
256 # Copy our preference before omnijar is created.
257 sed "s|SEAMONKEY_PVR|${PVR}|" "${FILESDIR}"/all-gentoo-1.js > \
258 "${S}/${obj_dir}/mozilla/dist/bin/defaults/pref/all-gentoo.js" \
259 || die
260
261 # Without methodjit and tracejit there's no conflict with PaX
262 if use jit ; then
263 # Pax mark xpcshell for hardened support, only used for startupcache creation.
264 pax-mark m "${S}"/dist/bin/xpcshell
265 fi
266
267 MOZ_MAKE_FLAGS="${MAKEOPTS}" \
268 emake DESTDIR="${D}" install || die "emake install failed"
269 cp -f "${FILESDIR}"/icon/${PN}.desktop "${T}" || die
270
271 if use crypt ; then
272 cd "${T}" || die
273 unzip "${S}"/${obj_dir}/mozilla/dist/bin/enigmail*.xpi install.rdf || die
274 emid=$(sed -n '/<em:id>/!d; s/.*\({.*}\).*/\1/; p; q' install.rdf)
275
276 dodir ${MOZILLA_FIVE_HOME}/extensions/${emid} || die
277 cd "${D}"${MOZILLA_FIVE_HOME}/extensions/${emid} || die
278 unzip "${S}"/${obj_dir}/mozilla/dist/bin/enigmail*.xpi || die
279
280 cd "${S}" || die
281 fi
282
283 sed 's|^\(MimeType=.*\)$|\1text/x-vcard;text/directory;application/mbox;message/rfc822;x-scheme-handler/mailto;|' \
284 -i "${T}"/${PN}.desktop || die
285 sed 's|^\(Categories=.*\)$|\1Email;|' -i "${T}"/${PN}.desktop \
286 || die
287
288 # Install language packs
289 mozlinguas_src_install
290
291 # Add StartupNotify=true bug 290401
292 if use startup-notification ; then
293 echo "StartupNotify=true" >> "${T}"/${PN}.desktop
294 fi
295
296 # Install icon and .desktop for menu entry
297 newicon "${S}"/suite/branding/nightly/content/icon64.png ${PN}.png \
298 || die
299 domenu "${T}"/${PN}.desktop || die
300
301 # Without methodjit and tracejit there's no conflict with PaX
302 if use jit ; then
303 # Required in order to use plugins and even run firefox on hardened.
304 pax-mark m "${ED}"${MOZILLA_FIVE_HOME}/{seamonkey,seamonkey-bin}
305 fi
306
307 # Plugin-container needs to be pax-marked for hardened to ensure plugins such as flash
308 # continue to work as expected.
309 pax-mark m "${ED}"${MOZILLA_FIVE_HOME}/plugin-container
310
311 # Handle plugins dir through nsplugins.eclass
312 share_plugins_dir
313
314 doman "${S}"/${obj_dir}/suite/app/${PN}.1 || die
315 }
316
317 pkg_preinst() {
318 MOZILLA_FIVE_HOME="${ROOT}/usr/$(get_libdir)/${PN}"
319
320 if [ -d ${MOZILLA_FIVE_HOME}/plugins ] ; then
321 rm ${MOZILLA_FIVE_HOME}/plugins -rf
322 fi
323 }
324
325 pkg_postinst() {
326 MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
327
328 # Update mimedb for the new .desktop file
329 fdo-mime_desktop_database_update
330
331 if use chatzilla ; then
332 elog "chatzilla is now an extension which can be en-/disabled and configured via"
333 elog "the Add-on manager."
334 fi
335 }

  ViewVC Help
Powered by ViewVC 1.1.20