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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.10 - (show annotations) (download)
Sun Jul 3 18:25:32 2011 UTC (3 years, 2 months ago) by polynomial-c
Branch: MAIN
CVS Tags: HEAD
Changes since 1.9: +1 -1 lines
FILE REMOVED
New major version

(Portage version: 2.2.0_alpha43/cvs/Linux x86_64)

1 # Copyright 1999-2011 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.0.14.ebuild,v 1.9 2011/05/07 18:25:47 armin76 Exp $
4
5 EAPI="2"
6 WANT_AUTOCONF="2.1"
7
8 inherit flag-o-matic toolchain-funcs eutils mozconfig-3 makeedit multilib fdo-mime autotools mozextension java-pkg-opt-2 python
9
10 PATCH="${PN}-2.0.11-patches-01"
11 EMVER="1.0.1"
12
13 LANGS="be ca cs de en-GB en-US es-AR es-ES fi fr gl hu it ja ka lt nb-NO nl pl pt-PT ru sk sv-SE tr zh-CN"
14 NOSHORTLANGS="en-GB es-AR"
15
16 MY_PV="${PV/_pre*}"
17 MY_PV="${MY_PV/_alpha/a}"
18 MY_PV="${MY_PV/_beta/b}"
19 MY_PV="${MY_PV/_rc/rc}"
20 MY_P="${PN}-${MY_PV}"
21
22 # release versions usually have language packs. So be careful with changing this.
23 HAS_LANGS="true"
24 if [[ ${PV} == *_pre* ]] ; then
25 # pre-releases. No need for arch teams to change KEYWORDS here.
26
27 REL_URI="ftp://ftp.mozilla.org/pub/mozilla.org/${PN}/nightly/${MY_PV}-candidates/build${PV##*_pre}"
28 #KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
29 KEYWORDS=""
30 #HAS_LANGS="false"
31 else
32 # This is where arch teams should change the KEYWORDS.
33
34 REL_URI="http://releases.mozilla.org/pub/mozilla.org/${PN}/releases/${MY_PV}"
35 KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86"
36 [[ ${PV} == *alpha* ]] && HAS_LANGS="false"
37 fi
38
39 DESCRIPTION="Seamonkey Web Browser"
40 HOMEPAGE="http://www.seamonkey-project.org"
41
42 SLOT="0"
43 LICENSE="|| ( MPL-1.1 GPL-2 LGPL-2.1 )"
44 IUSE="+alsa +chatzilla +composer +crypt gnome java ldap +mailclient +roaming system-sqlite"
45
46 SRC_URI="${REL_URI}/source/${MY_P}.source.tar.bz2
47 http://dev.gentoo.org/~polynomial-c/mozilla/patchsets/${PATCH}.tar.bz2
48 crypt? ( mailclient? ( http://www.mozilla-enigmail.org/download/source/enigmail-${EMVER}.tar.gz ) )"
49
50 if ${HAS_LANGS} ; then
51 for X in ${LANGS} ; do
52 if [ "${X}" != "en" ] && [ "${X}" != "en-US" ]; then
53 SRC_URI="${SRC_URI}
54 linguas_${X/-/_}? ( ${REL_URI}/langpack/${MY_P}.${X}.langpack.xpi -> ${MY_P}-${X}.xpi )"
55 fi
56 IUSE="${IUSE} linguas_${X/-/_}"
57 # english is handled internally
58 if [ "${#X}" == 5 ] && ! has ${X} ${NOSHORTLANGS}; then
59 if [ "${X}" != "en-US" ]; then
60 SRC_URI="${SRC_URI}
61 linguas_${X%%-*}? ( ${REL_URI}/langpack/${MY_P}.${X}.langpack.xpi -> ${MY_P}-${X}.xpi )"
62 fi
63 IUSE="${IUSE} linguas_${X%%-*}"
64 fi
65 done
66 fi
67
68 RDEPEND="java? ( virtual/jre )
69 >=sys-devel/binutils-2.16.1
70 >=dev-libs/nss-3.12.8
71 >=dev-libs/nspr-4.8.6
72 alsa? ( media-libs/alsa-lib )
73 system-sqlite? ( >=dev-db/sqlite-3.6.22-r2[fts3,secure-delete] )
74 >=app-text/hunspell-1.2
75 >=x11-libs/gtk+-2.10.0:2
76 >=x11-libs/pango-1.14.0[X]
77 crypt? ( mailclient? ( >=app-crypt/gnupg-1.4 ) )
78 gnome? ( >=gnome-base/gnome-vfs-2.16.3
79 >=gnome-base/libgnomeui-2.16.1
80 >=gnome-base/gconf-2.16.0
81 >=gnome-base/libgnome-2.16.0 )"
82
83 DEPEND="${RDEPEND}
84 =dev-lang/python-2*[threads]
85 dev-util/pkgconfig
86 java? ( >=virtual/jdk-1.4 )"
87
88 S="${WORKDIR}/comm-1.9.1"
89
90 linguas() {
91 local LANG SLANG
92 for LANG in ${LINGUAS}; do
93 if has ${LANG} en en_US; then
94 has en ${linguas} || linguas="${linguas:+"${linguas} "}en"
95 continue
96 elif has ${LANG} ${LANGS//-/_}; then
97 has ${LANG//_/-} ${linguas} || linguas="${linguas:+"${linguas} "}${LANG//_/-}"
98 continue
99 elif [[ " ${LANGS} " == *" ${LANG}-"* ]]; then
100 for X in ${LANGS}; do
101 if [[ "${X}" == "${LANG}-"* ]] && \
102 [[ " ${NOSHORTLANGS} " != *" ${X} "* ]]; then
103 has ${X} ${linguas} || linguas="${linguas:+"${linguas} "}${X}"
104 continue 2
105 fi
106 done
107 fi
108 ewarn "Sorry, but ${PN} does not support the ${LANG} LINGUA"
109 done
110 }
111
112 src_unpack() {
113 unpack ${A}
114
115 if ${HAS_LANGS} ; then
116 linguas
117 for X in ${linguas}; do
118 # FIXME: Add support for unpacking xpis to portage
119 [[ ${X} != "en" ]] && xpi_unpack "${MY_P}-${X}.xpi"
120 done
121 if [[ ${linguas} != "" && ${linguas} != "en" ]]; then
122 einfo "Selected language packs (first will be default): ${linguas}"
123 fi
124 fi
125 }
126
127 pkg_setup() {
128 if [[ ${PV} == *_pre* ]] ; then
129 ewarn "You're using an unofficial release of ${PN}. Don't file any bug in"
130 ewarn "Gentoo's Bugtracker against this package in case it breaks for you."
131 ewarn "Those belong to upstream: https://bugzilla.mozilla.org"
132 fi
133
134 # Ensure we always build with C locale.
135 export LANG="C"
136 export LC_ALL="C"
137 export LC_MESSAGES="C"
138 export LC_CTYPE="C"
139
140 export BUILD_OFFICIAL=1
141 export MOZILLA_OFFICIAL=1
142
143 java-pkg-opt-2_pkg_setup
144
145 python_set_active_version 2
146 }
147
148 src_prepare() {
149 java-pkg-opt-2_src_prepare
150
151 # Apply our patches
152 EPATCH_EXCLUDE="1008-seamonkey-cups-1.4.4-fixup.patch" \
153 EPATCH_SUFFIX="patch" \
154 EPATCH_FORCE="yes" \
155 epatch "${WORKDIR}/patch"
156
157 if use crypt && use mailclient ; then
158 mv "${WORKDIR}"/enigmail "${S}"/mailnews/extensions/enigmail
159 cd "${S}"/mailnews/extensions/enigmail || die
160 epatch "${FILESDIR}"/enigmail/70_enigmail-fix.patch
161 makemake2
162 cd "${S}"
163 fi
164
165 eautoreconf
166 }
167
168 src_configure() {
169 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
170 MEXTENSIONS=""
171
172 ####################################
173 #
174 # mozconfig, CFLAGS and CXXFLAGS setup
175 #
176 ####################################
177
178 mozconfig_init
179 mozconfig_config
180
181 # seamonkey has issues with >=x11-libs/cairo-1.10.0 (bug #337813).
182 # If you don't like this blame upstream as they don't care about
183 # anything than their damned bundled shit!!!
184 sed '/--enable-system-cairo/s:enable:disable:' -i "${S}"/.mozconfig \
185 || die
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="${MEXTENSIONS},-irc"
192 fi
193 if ! use roaming ; then
194 MEXTENSIONS="${MEXTENSIONS},-sroaming"
195 fi
196
197 if ! use gnome ; then
198 MEXTENSIONS="${MEXTENSIONS},-gnomevfs"
199 fi
200
201 if ! use composer ; then
202 if ! use chatzilla && ! use mailclient ; then
203 mozconfig_annotate '-composer' --disable-composer
204 fi
205 fi
206
207 mozconfig_annotate '' --enable-crypto
208 mozconfig_annotate '' --enable-extensions="${MEXTENSIONS}"
209 mozconfig_annotate '' --enable-application=suite
210 mozconfig_annotate 'broken' --disable-mochitest
211 mozconfig_annotate 'broken' --disable-crashreporter
212 mozconfig_annotate '' --enable-system-hunspell
213 mozconfig_annotate '' --enable-jsd
214 mozconfig_annotate '' --enable-image-encoder=all
215 mozconfig_annotate '' --enable-canvas
216 mozconfig_annotate '' --with-system-nspr
217 mozconfig_annotate '' --with-system-nss
218 mozconfig_annotate '' --with-system-bz2
219 mozconfig_annotate '' --enable-oji --enable-mathml
220 mozconfig_annotate 'places' --enable-storage --enable-places --enable-places_bookmarks
221 mozconfig_annotate '' --disable-installer
222 mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME}
223 mozconfig_annotate '' --enable-printing
224
225 # Enable/Disable based on USE flags
226 mozconfig_use_enable alsa ogg
227 mozconfig_use_enable alsa wave
228 mozconfig_use_enable gnome gnomevfs
229 mozconfig_use_enable gnome gnomeui
230 mozconfig_use_enable java javaxpcom
231 mozconfig_use_enable ldap
232 mozconfig_use_enable ldap ldap-experimental
233 mozconfig_use_enable mailclient mailnews
234 mozconfig_use_enable system-sqlite
235
236 # Finalize and report settings
237 mozconfig_final
238
239 if [[ $(gcc-major-version) -lt 4 ]]; then
240 append-cxxflags -fno-stack-protector
241 fi
242
243 ####################################
244 #
245 # Configure and build
246 #
247 ####################################
248
249 # Work around breakage in makeopts with --no-print-directory
250 MAKEOPTS="${MAKEOPTS/--no-print-directory/}"
251
252 CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" econf
253 }
254
255 src_compile() {
256 # Should the build use multiprocessing? Not enabled by default, as it tends to break.
257 [ "${WANT_MP}" = "true" ] && jobs=${MAKEOPTS} || jobs="-j1"
258 emake ${jobs} || die
259
260 # Only build enigmail extension if conditions are met.
261 if use crypt && use mailclient ; then
262 emake -C "${S}"/mailnews/extensions/enigmail || die "make enigmail failed"
263 emake -j1 -C "${S}"/mailnews/extensions/enigmail xpi || die "make enigmail xpi failed"
264 fi
265 }
266
267 src_install() {
268 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
269 declare emid
270
271 emake DESTDIR="${D}" install || die "emake install failed"
272 cp -f "${FILESDIR}"/icon/seamonkey.desktop "${T}" || die
273
274 if use crypt && use mailclient ; then
275 cd "${T}" || die
276 unzip "${S}"/mozilla/dist/bin/enigmail*.xpi install.rdf || die
277 emid=$(sed -n '/<em:id>/!d; s/.*\({.*}\).*/\1/; p; q' install.rdf)
278
279 dodir ${MOZILLA_FIVE_HOME}/extensions/${emid} || die
280 cd "${D}"${MOZILLA_FIVE_HOME}/extensions/${emid} || die
281 unzip "${S}"/mozilla/dist/bin/enigmail*.xpi || die
282 fi
283
284 if use mailclient ; then
285 sed 's|^\(MimeType=.*\)$|\1text/x-vcard;text/directory;application/mbox;message/rfc822;x-scheme-handler/mailto;|' \
286 -i "${T}"/${PN}.desktop || die
287 sed 's|^\(Categories=.*\)$|\1Email;|' -i "${T}"/${PN}.desktop \
288 || die
289 fi
290
291 if ${HAS_LANGS} ; then
292 linguas
293 for X in ${linguas}; do
294 [[ ${X} != "en" ]] && xpi_install "${WORKDIR}"/"${MY_P}-${X}"
295 done
296 fi
297
298 # Add StartupNotify=true bug 290401
299 if use startup-notification ; then
300 echo "StartupNotify=true" >> "${T}"/${PN}.desktop
301 fi
302
303 # Install icon and .desktop for menu entry
304 newicon "${S}"/suite/branding/content/icon64.png seamonkey.png || die
305 domenu "${T}"/${PN}.desktop || die
306
307 # Add our default prefs
308 sed "s|SEAMONKEY_PVR|${PVR}|" "${FILESDIR}"/all-gentoo.js \
309 > "${D}"${MOZILLA_FIVE_HOME}/defaults/pref/all-gentoo.js
310
311 # Plugins dir
312 rm -rf "${D}"${MOZILLA_FIVE_HOME}/plugins || die "failed to remove existing plugins dir"
313 dosym ../nsbrowser/plugins "${MOZILLA_FIVE_HOME}"/plugins || die
314
315 # shiny new man page
316 doman "${S}"/suite/app/${PN}.1 || die
317 }
318
319 pkg_preinst() {
320 declare MOZILLA_FIVE_HOME="${ROOT}/usr/$(get_libdir)/${PN}"
321
322 if [ -d ${MOZILLA_FIVE_HOME}/plugins ] ; then
323 rm ${MOZILLA_FIVE_HOME}/plugins -rf
324 fi
325 }
326
327 pkg_postinst() {
328 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
329
330 # Update mimedb for the new .desktop file
331 fdo-mime_desktop_database_update
332
333 if use chatzilla ; then
334 elog "chatzilla is now an extension which can be en-/disabled and configured via"
335 elog "the Add-on manager."
336 fi
337 }

  ViewVC Help
Powered by ViewVC 1.1.20