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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Mon Sep 20 17:57:26 2010 UTC (4 years, 2 months ago) by polynomial-c
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Switching over to bundled cairo lib as seamonkey-2.0.x has issues with cairo-1.10.0

(Portage version: 2.2_rc85/cvs/Linux x86_64)

1 # Copyright 1999-2010 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.8.ebuild,v 1.1 2010/09/16 05:53:26 polynomial-c 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
9
10 PATCH="${PN}-2.0.7-patches-01"
11 EMVER="1.0.1"
12
13 LANGS="be ca cs de en-GB en-US es-AR es-ES 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 es-ES nb-NO pt-PT sv-SE zh-CN"
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 +cups 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.7
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
76 >=x11-libs/cairo-1.8.8[X]
77 >=x11-libs/pango-1.14.0[X]
78 crypt? ( mailclient? ( >=app-crypt/gnupg-1.4 ) )
79 cups? ( net-print/cups[gnutls] )"
80
81 DEPEND="${RDEPEND}
82 dev-util/pkgconfig
83 java? ( >=virtual/jdk-1.4 )"
84
85 S="${WORKDIR}/comm-1.9.1"
86
87 linguas() {
88 local LANG SLANG
89 for LANG in ${LINGUAS}; do
90 if has ${LANG} en en_US; then
91 has en ${linguas} || linguas="${linguas:+"${linguas} "}en"
92 continue
93 elif has ${LANG} ${LANGS//-/_}; then
94 has ${LANG//_/-} ${linguas} || linguas="${linguas:+"${linguas} "}${LANG//_/-}"
95 continue
96 elif [[ " ${LANGS} " == *" ${LANG}-"* ]]; then
97 for X in ${LANGS}; do
98 if [[ "${X}" == "${LANG}-"* ]] && \
99 [[ " ${NOSHORTLANGS} " != *" ${X} "* ]]; then
100 has ${X} ${linguas} || linguas="${linguas:+"${linguas} "}${X}"
101 continue 2
102 fi
103 done
104 fi
105 ewarn "Sorry, but ${PN} does not support the ${LANG} LINGUA"
106 done
107 }
108
109 src_unpack() {
110 unpack ${A}
111
112 if ${HAS_LANGS} ; then
113 linguas
114 for X in ${linguas}; do
115 # FIXME: Add support for unpacking xpis to portage
116 [[ ${X} != "en" ]] && xpi_unpack "${MY_P}-${X}.xpi"
117 done
118 if [[ ${linguas} != "" && ${linguas} != "en" ]]; then
119 einfo "Selected language packs (first will be default): ${linguas}"
120 fi
121 fi
122 }
123
124 pkg_setup() {
125 if [[ ${PV} == *_pre* ]] ; then
126 ewarn "You're using an unofficial release of ${PN}. Don't file any bug in"
127 ewarn "Gentoo's Bugtracker against this package in case it breaks for you."
128 ewarn "Those belong to upstream: https://bugzilla.mozilla.org"
129 fi
130
131 # Ensure we always build with C locale.
132 export LANG="C"
133 export LC_ALL="C"
134 export LC_MESSAGES="C"
135 export LC_CTYPE="C"
136
137 export BUILD_OFFICIAL=1
138 export MOZILLA_OFFICIAL=1
139
140 java-pkg-opt-2_pkg_setup
141 }
142
143 src_prepare() {
144 java-pkg-opt-2_src_prepare
145
146 # Apply our patches
147 EPATCH_SUFFIX="patch" \
148 EPATCH_FORCE="yes" \
149 epatch "${WORKDIR}/patch"
150
151 if use crypt && use mailclient ; then
152 mv "${WORKDIR}"/enigmail "${S}"/mailnews/extensions/enigmail
153 cd "${S}"/mailnews/extensions/enigmail || die
154 epatch "${FILESDIR}"/enigmail/70_enigmail-fix.patch
155 makemake2
156 cd "${S}"
157 fi
158
159 eautoreconf
160 }
161
162 src_configure() {
163 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
164 MEXTENSIONS=""
165
166 ####################################
167 #
168 # mozconfig, CFLAGS and CXXFLAGS setup
169 #
170 ####################################
171
172 mozconfig_init
173 mozconfig_config
174
175 # It doesn't compile on alpha without this LDFLAGS
176 use alpha && append-ldflags "-Wl,--no-relax"
177
178 if ! use chatzilla ; then
179 MEXTENSIONS="${MEXTENSIONS},-irc"
180 fi
181 if ! use roaming ; then
182 MEXTENSIONS="${MEXTENSIONS},-sroaming"
183 fi
184
185 if ! use gnome ; then
186 MEXTENSIONS="${MEXTENSIONS},-gnomevfs"
187 fi
188
189 if ! use composer ; then
190 if ! use chatzilla && ! use mailclient ; then
191 mozconfig_annotate '-composer' --disable-composer
192 fi
193 fi
194
195 mozconfig_annotate '' --enable-extensions="${MEXTENSIONS}"
196 mozconfig_annotate '' --enable-application=suite
197 mozconfig_annotate 'broken' --disable-mochitest
198 mozconfig_annotate 'broken' --disable-crashreporter
199 mozconfig_annotate '' --enable-system-hunspell
200 mozconfig_annotate '' --enable-jsd
201 mozconfig_annotate '' --enable-image-encoder=all
202 mozconfig_annotate '' --enable-canvas
203 mozconfig_annotate '' --with-system-nspr
204 mozconfig_annotate '' --with-system-nss
205 mozconfig_annotate '' --with-system-bz2
206 mozconfig_annotate '' --enable-oji --enable-mathml
207 mozconfig_annotate 'places' --enable-storage --enable-places --enable-places_bookmarks
208 mozconfig_annotate '' --disable-installer
209 mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME}
210
211 # Enable/Disable based on USE flags
212 mozconfig_use_enable alsa ogg
213 mozconfig_use_enable alsa wave
214 mozconfig_use_enable cups printing
215 mozconfig_use_enable java javaxpcom
216 mozconfig_use_enable ldap
217 mozconfig_use_enable ldap ldap-experimental
218 mozconfig_use_enable mailclient mailnews
219 mozconfig_use_enable system-sqlite
220
221 # Finalize and report settings
222 mozconfig_final
223
224 if [[ $(gcc-major-version) -lt 4 ]]; then
225 append-cxxflags -fno-stack-protector
226 fi
227
228 ####################################
229 #
230 # Configure and build
231 #
232 ####################################
233
234 # Work around breakage in makeopts with --no-print-directory
235 MAKEOPTS="${MAKEOPTS/--no-print-directory/}"
236
237 CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" econf
238 }
239
240 src_compile() {
241 # Should the build use multiprocessing? Not enabled by default, as it tends to break.
242 [ "${WANT_MP}" = "true" ] && jobs=${MAKEOPTS} || jobs="-j1"
243 emake ${jobs} || die
244
245 # Only build enigmail extension if conditions are met.
246 if use crypt && use mailclient ; then
247 emake -C "${S}"/mailnews/extensions/enigmail || die "make enigmail failed"
248 emake -j1 -C "${S}"/mailnews/extensions/enigmail xpi || die "make enigmail xpi failed"
249 fi
250 }
251
252 src_install() {
253 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
254 declare emid
255
256 emake DESTDIR="${D}" install || die "emake install failed"
257
258 if use crypt && use mailclient ; then
259 cd "${T}" || die
260 unzip "${S}"/mozilla/dist/bin/enigmail*.xpi install.rdf || die
261 emid=$(sed -n '/<em:id>/!d; s/.*\({.*}\).*/\1/; p; q' install.rdf)
262
263 dodir ${MOZILLA_FIVE_HOME}/extensions/${emid} || die
264 cd "${D}"${MOZILLA_FIVE_HOME}/extensions/${emid} || die
265 unzip "${S}"/mozilla/dist/bin/enigmail*.xpi || die
266 fi
267
268 if ${HAS_LANGS} ; then
269 linguas
270 for X in ${linguas}; do
271 [[ ${X} != "en" ]] && xpi_install "${WORKDIR}"/"${MY_P}-${X}"
272 done
273 fi
274
275 # Install icon and .desktop for menu entry
276 newicon "${S}"/suite/branding/content/icon64.png seamonkey.png || die
277 domenu "${FILESDIR}"/icon/seamonkey.desktop || die
278
279 # Add StartupNotify=true bug 290401
280 if use startup-notification ; then
281 echo "StartupNotify=true" >> "${D}"/usr/share/applications/seamonkey.desktop
282 fi
283
284 # Add our default prefs
285 sed "s|SEAMONKEY_PVR|${PVR}|" "${FILESDIR}"/all-gentoo.js \
286 > "${D}"${MOZILLA_FIVE_HOME}/defaults/pref/all-gentoo.js
287
288 # Plugins dir
289 rm -rf "${D}"${MOZILLA_FIVE_HOME}/plugins || die "failed to remove existing plugins dir"
290 dosym ../nsbrowser/plugins "${MOZILLA_FIVE_HOME}"/plugins || die
291
292 # shiny new man page
293 doman "${S}"/suite/app/${PN}.1 || die
294 }
295
296 pkg_preinst() {
297 declare MOZILLA_FIVE_HOME="${ROOT}/usr/$(get_libdir)/${PN}"
298
299 if [ -d ${MOZILLA_FIVE_HOME}/plugins ] ; then
300 rm ${MOZILLA_FIVE_HOME}/plugins -rf
301 fi
302 }
303
304 pkg_postinst() {
305 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
306
307 # Update mimedb for the new .desktop file
308 fdo-mime_desktop_database_update
309
310 if use chatzilla ; then
311 elog "chatzilla is now an extension which can be en-/disabled and configured via"
312 elog "the Add-on manager."
313 fi
314 }

  ViewVC Help
Powered by ViewVC 1.1.20