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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Wed Sep 25 14:15:11 2013 UTC (11 months ago) by polynomial-c
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +1 -1 lines
FILE REMOVED
Removed unused configure options and sed commands. Removed old ebuild

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

1 # Copyright 1999-2013 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.20.ebuild,v 1.3 2013/08/12 22:20:38 ago 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="${P}"
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 check-reqs flag-o-matic toolchain-funcs eutils mozconfig-3 multilib pax-utils fdo-mime autotools mozextension nsplugins mozlinguas
30
31 PATCHFF="firefox-23.0-patches-0.1"
32 PATCH="${PN}-2.14-patches-01"
33 EMVER="1.5.2"
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="+chatzilla +crypt gstreamer +ipc +jit minimal pulseaudio +roaming system-cairo system-jpeg system-sqlite"
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.15
63 >=dev-libs/nspr-4.9.6
64 >=dev-libs/glib-2.26:2
65 >=media-libs/mesa-7.10
66 >=media-libs/libpng-1.5.13[apng]
67 >=x11-libs/pango-1.14.0
68 >=x11-libs/gtk+-2.14:2
69 virtual/libffi
70 gstreamer? ( media-plugins/gst-plugins-meta:0.10[ffmpeg] )
71 system-cairo? ( >=x11-libs/cairo-1.10[X] )
72 system-jpeg? ( >=media-libs/libjpeg-turbo-1.2.1 )
73 system-sqlite? ( >=dev-db/sqlite-3.7.16.1:3[secure-delete,debug=] )
74 >=media-libs/libvpx-1.0.0
75 crypt? ( >=app-crypt/gnupg-1.4 )
76 kernel_linux? ( media-libs/alsa-lib )
77 pulseaudio? ( media-sound/pulseaudio )
78 selinux? ( sec-policy/selinux-mozilla )"
79
80 DEPEND="${RDEPEND}
81 !elibc_glibc? ( dev-libs/libexecinfo )
82 virtual/pkgconfig
83 amd64? ( ${ASM_DEPEND}
84 virtual/opengl )
85 x86? ( ${ASM_DEPEND}
86 virtual/opengl )"
87
88 if [[ ${PV} == *beta* ]] ; then
89 S="${WORKDIR}/comm-beta"
90 else
91 S="${WORKDIR}/comm-release"
92 fi
93
94 pkg_setup() {
95 if [[ ${PV} == *_pre* ]] ; then
96 ewarn "You're using an unofficial release of ${PN}. Don't file any bug in"
97 ewarn "Gentoo's Bugtracker against this package in case it breaks for you."
98 ewarn "Those belong to upstream: https://bugzilla.mozilla.org"
99 fi
100
101 moz_pkgsetup
102
103 # Ensure we have enough disk space to compile
104 if use debug || use test ; then
105 CHECKREQS_DISK_BUILD="8G"
106 else
107 CHECKREQS_DISK_BUILD="4G"
108 fi
109 check-reqs_pkg_setup
110 }
111
112 src_unpack() {
113 unpack ${A}
114
115 # Unpack language packs
116 mozlinguas_src_unpack
117 }
118
119 src_prepare() {
120 # Apply our patches
121 EPATCH_SUFFIX="patch" \
122 EPATCH_FORCE="yes" \
123 epatch "${WORKDIR}/seamonkey"
124
125 # browser patches go here
126 pushd "${S}"/mozilla &>/dev/null || die
127 EPATCH_EXCLUDE="2000-firefox_gentoo_install_dirs.patch
128 $(use system-cairo || echo "6009_fix_system_cairo_support.patch")" \
129 EPATCH_SUFFIX="patch" \
130 EPATCH_FORCE="yes" \
131 epatch "${WORKDIR}/firefox"
132 popd &>/dev/null || die
133
134 # Shell scripts sometimes contain DOS line endings; bug 391889
135 grep -rlZ --include="*.sh" $'\r$' . |
136 while read -r -d $'\0' file ; do
137 einfo edos2unix "${file}"
138 edos2unix "${file}" || die
139 done
140
141 if use crypt ; then
142 mv "${WORKDIR}"/enigmail "${S}"/mailnews/extensions/enigmail
143 pushd "${S}"/mailnews/extensions/enigmail &>/dev/null || die
144 epatch "${FILESDIR}"/enigmail_mailnews_extensions_genxpi.patch
145 popd &>/dev/null || die
146 fi
147
148 # Allow user to apply any additional patches without modifing ebuild
149 epatch_user
150
151 local ms="${S}/mozilla"
152
153 # Enable gnomebreakpad
154 if use debug ; then
155 sed -i -e "s:GNOME_DISABLE_CRASH_DIALOG=1:GNOME_DISABLE_CRASH_DIALOG=0:g" \
156 "${ms}"/build/unix/run-mozilla.sh || die "sed failed!"
157 fi
158
159 # Disable gnomevfs extension
160 sed -i -e "s:gnomevfs::" "${S}"/suite/confvars.sh \
161 -e "s:gnomevfs::" "${ms}"/browser/confvars.sh \
162 -e "s:gnomevfs::" "${ms}"/xulrunner/confvars.sh \
163 || die "Failed to remove gnomevfs extension"
164
165 # Ensure that are plugins dir is enabled as default
166 sed -i -e "s:/usr/lib/mozilla/plugins:/usr/lib/nsbrowser/plugins:" \
167 "${ms}"/xpcom/io/nsAppFileLocationProvider.cpp || die "sed failed to replace plugin path for 32bit!"
168 sed -i -e "s:/usr/lib64/mozilla/plugins:/usr/lib64/nsbrowser/plugins:" \
169 "${ms}"/xpcom/io/nsAppFileLocationProvider.cpp || die "sed failed to replace plugin path for 64bit!"
170
171 # Don't exit with error when some libs are missing which we have in
172 # system.
173 sed '/^MOZ_PKG_FATAL_WARNINGS/s@= 1@= 0@' \
174 -i "${S}"/suite/installer/Makefile.in || die
175 # Don't error out when there's no files to be removed:
176 sed 's@\(xargs rm\)$@\1 -f@' \
177 -i "${ms}"/toolkit/mozapps/installer/packager.mk || die
178
179 eautoreconf
180 cd "${S}"/mozilla
181 eautoconf
182 }
183
184 src_configure() {
185 MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
186 MEXTENSIONS="default"
187
188 ####################################
189 #
190 # mozconfig, CFLAGS and CXXFLAGS setup
191 #
192 ####################################
193
194 mozconfig_init
195 mozconfig_config
196
197 # It doesn't compile on alpha without this LDFLAGS
198 use alpha && append-ldflags "-Wl,--no-relax"
199
200 if use chatzilla ; then
201 MEXTENSIONS+=",irc"
202 else
203 MEXTENSIONS+=",-irc"
204 fi
205 if ! use roaming ; then
206 MEXTENSIONS+=",-sroaming"
207 fi
208
209 # We must force enable jemalloc 3 threw .mozconfig
210 echo "export MOZ_JEMALLOC=1" >> ${S}/.mozconfig
211
212 mozconfig_annotate '' --enable-jemalloc
213 mozconfig_annotate '' --enable-replace-malloc
214 mozconfig_annotate '' --prefix="${EPREFIX}"/usr
215 mozconfig_annotate '' --libdir="${EPREFIX}"/usr/$(get_libdir)
216 mozconfig_annotate '' --enable-extensions="${MEXTENSIONS}"
217 mozconfig_annotate '' --disable-gconf
218 mozconfig_annotate '' --enable-jsd
219 mozconfig_annotate '' --enable-canvas
220 mozconfig_annotate '' --with-system-png
221 mozconfig_annotate '' --enable-system-ffi
222
223 # Other sm-specific settings
224 mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME}
225
226 mozconfig_annotate '' --target="${CTARGET:-${CHOST}}"
227 mozconfig_annotate '' --build="${CTARGET:-${CHOST}}"
228 mozconfig_annotate '' --enable-safe-browsing
229
230 mozconfig_use_enable gstreamer
231 mozconfig_use_enable pulseaudio
232 mozconfig_use_enable system-sqlite
233 mozconfig_use_with system-jpeg
234 # Feature is know to cause problems on hardened
235 mozconfig_use_enable jit methodjit
236 mozconfig_use_enable jit tracejit
237 mozconfig_use_enable jit ion
238 mozconfig_use_enable system-cairo
239
240 # Use an objdir to keep things organized.
241 echo "mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/seamonk" \
242 >> "${S}"/.mozconfig
243
244 # Finalize and report settings
245 mozconfig_final
246
247 # Work around breakage in makeopts with --no-print-directory
248 MAKEOPTS="${MAKEOPTS/--no-print-directory/}"
249
250 if [[ $(gcc-major-version) -lt 4 ]] ; then
251 append-cxxflags -fno-stack-protector
252 elif [[ $(gcc-major-version) -gt 4 || $(gcc-minor-version) -gt 3 ]] ; then
253 if use amd64 || use x86 ; then
254 append-flags -mno-avx
255 fi
256 fi
257 }
258
259 src_compile() {
260 CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \
261 MOZ_MAKE_FLAGS="${MAKEOPTS}" SHELL="${SHELL}" \
262 emake -f client.mk || die
263
264 # Only build enigmail extension if conditions are met.
265 if use crypt ; then
266 cd "${S}"/mailnews/extensions/enigmail || die
267 ./makemake -r 2&> /dev/null
268 cd "${S}"/seamonk/mailnews/extensions/enigmail
269 emake || die "make enigmail failed"
270 emake xpi || die "make enigmail xpi failed"
271 fi
272 }
273
274 src_install() {
275 MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
276 DICTPATH="\"${EPREFIX}/usr/share/myspell\""
277
278 local emid obj_dir="seamonk"
279 cd "${S}/${obj_dir}"
280
281 # Pax mark xpcshell for hardened support, only used for startupcache creation.
282 pax-mark m "${S}/${obj_dir}/mozilla/dist/bin/xpcshell"
283
284 # Copy our preference before omnijar is created.
285 sed "s|SEAMONKEY_PVR|${PVR}|" "${FILESDIR}"/all-gentoo-1.js > \
286 "${S}/${obj_dir}/mozilla/dist/bin/defaults/pref/all-gentoo.js" \
287 || die
288
289 # Set default path to search for dictionaries.
290 echo "pref(\"spellchecker.dictionary_path\", ${DICTPATH});" \
291 >> "${S}/${obj_dir}/mozilla/dist/bin/defaults/pref/all-gentoo.js" \
292 || die
293
294 if ! use libnotify ; then
295 echo 'pref("browser.download.manager.showAlertOnComplete", false);' \
296 >> "${S}/${obj_dir}/mozilla/dist/bin/defaults/pref/all-gentoo.js" \
297 || die
298 fi
299
300 echo 'pref("extensions.autoDisableScopes", 3);' >> \
301 "${S}/${obj_dir}/mozilla/dist/bin/defaults/pref/all-gentoo.js" \
302 || die
303
304 MOZ_MAKE_FLAGS="${MAKEOPTS}" \
305 emake DESTDIR="${D}" install || die "emake install failed"
306 cp -f "${FILESDIR}"/icon/${PN}.desktop "${T}" || die
307
308 if use crypt ; then
309 cd "${T}" || die
310 unzip "${S}"/${obj_dir}/mozilla/dist/bin/enigmail*.xpi install.rdf || die
311 emid=$(sed -n '/<em:id>/!d; s/.*\({.*}\).*/\1/; p; q' install.rdf)
312
313 dodir ${MOZILLA_FIVE_HOME}/extensions/${emid} || die
314 cd "${D}"${MOZILLA_FIVE_HOME}/extensions/${emid} || die
315 unzip "${S}"/${obj_dir}/mozilla/dist/bin/enigmail*.xpi || die
316
317 cd "${S}" || die
318 fi
319
320 sed 's|^\(MimeType=.*\)$|\1text/x-vcard;text/directory;application/mbox;message/rfc822;x-scheme-handler/mailto;|' \
321 -i "${T}"/${PN}.desktop || die
322 sed 's|^\(Categories=.*\)$|\1Email;|' -i "${T}"/${PN}.desktop \
323 || die
324
325 # Install language packs
326 mozlinguas_src_install
327
328 # Add StartupNotify=true bug 290401
329 if use startup-notification ; then
330 echo "StartupNotify=true" >> "${T}"/${PN}.desktop
331 fi
332
333 # Install icon and .desktop for menu entry
334 newicon "${S}"/suite/branding/nightly/content/icon64.png ${PN}.png \
335 || die
336 domenu "${T}"/${PN}.desktop || die
337
338 # Required in order to use plugins and even run seamonkey on hardened.
339 pax-mark m "${ED}"${MOZILLA_FIVE_HOME}/{seamonkey,seamonkey-bin,plugin-container}
340
341 if use minimal ; then
342 rm -rf "${ED}"/usr/include "${ED}${MOZILLA_FIVE_HOME}"/{idl,include,lib,sdk}
343 fi
344
345 # Handle plugins dir through nsplugins.eclass
346 share_plugins_dir
347
348 doman "${S}"/${obj_dir}/suite/app/${PN}.1 || die
349 }
350
351 pkg_preinst() {
352 MOZILLA_FIVE_HOME="${ROOT}/usr/$(get_libdir)/${PN}"
353
354 if [ -d ${MOZILLA_FIVE_HOME}/plugins ] ; then
355 rm ${MOZILLA_FIVE_HOME}/plugins -rf
356 fi
357 }
358
359 pkg_postinst() {
360 MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
361
362 # Update mimedb for the new .desktop file
363 fdo-mime_desktop_database_update
364
365 if use chatzilla ; then
366 elog "chatzilla is now an extension which can be en-/disabled and configured via"
367 elog "the Add-on manager."
368 fi
369 }

  ViewVC Help
Powered by ViewVC 1.1.20