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

Contents of /www-client/seamonkey/seamonkey-2.3.3-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Mon Nov 7 22:03:54 2011 UTC (3 years, 1 month ago) by polynomial-c
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +1 -1 lines
FILE REMOVED
Revbump for inclusion of enigmail-1.3.3. Removed old versions

(Portage version: 2.2.0_alpha72/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.3.3-r1.ebuild,v 1.3 2011/10/31 12:28:31 jer Exp $
4
5 EAPI="3"
6 WANT_AUTOCONF="2.1"
7
8 inherit flag-o-matic toolchain-funcs eutils mozconfig-3 makeedit multilib fdo-mime autotools mozextension python
9
10 PATCH="${PN}-2.3.3-patches-02"
11 EMVER="1.3.2"
12
13 LANGS="be ca cs de en en-GB en-US es-AR es-ES fi fr gl hu it ja lt nb-NO nl pl pt-PT ru sk sv-SE tr zh-CN"
14 NOSHORTLANGS="en-GB en-US 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 LANGPACK_PREFIX="${MY_P}."
25 LANGPACK_SUFFIX=".langpack"
26 if [[ ${PV} == *_pre* ]] ; then
27 # pre-releases. No need for arch teams to change KEYWORDS here.
28
29 REL_URI="ftp://ftp.mozilla.org/pub/mozilla.org/${PN}/nightly/${MY_PV}-candidates/build${PV##*_pre}"
30 #LANG_URI="${REL_URI}/langpack"
31 LANG_URI="${REL_URI}/linux-i686/xpi"
32 LANGPACK_PREFIX=""
33 LANGPACK_SUFFIX=""
34 #KEYWORDS=""
35 KEYWORDS="~alpha ~amd64 ~arm ~ppc ~ppc64 ~x86"
36 #HAS_LANGS="false"
37 else
38 # This is where arch teams should change the KEYWORDS.
39
40 #REL_URI="http://releases.mozilla.org/pub/mozilla.org/${PN}/releases/${MY_PV}"
41 REL_URI="ftp://ftp.mozilla.org/pub/${PN}/releases/${MY_PV}"
42 LANG_URI="${REL_URI}/langpack"
43 KEYWORDS="~alpha ~amd64 ~arm ~ppc ~ppc64 ~x86"
44 [[ ${PV} == *alpha* ]] && HAS_LANGS="false"
45 fi
46
47 DESCRIPTION="Seamonkey Web Browser"
48 HOMEPAGE="http://www.seamonkey-project.org"
49
50 SLOT="0"
51 LICENSE="|| ( MPL-1.1 GPL-2 LGPL-2.1 )"
52 IUSE="+alsa +chatzilla +crypt +ipc +methodjit +roaming system-sqlite +webm"
53
54 SRC_URI="${REL_URI}/source/${MY_P}.source.tar.bz2 -> ${P}.source.tar.bz2
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 if ${HAS_LANGS} ; then
59 for X in ${LANGS} ; do
60 if [ "${X}" != "en" ] ; then
61 SRC_URI="${SRC_URI}
62 linguas_${X/-/_}? ( ${LANG_URI}/${LANGPACK_PREFIX}${X}${LANGPACK_SUFFIX}.xpi -> ${P}-${X}.xpi )"
63 fi
64 IUSE="${IUSE} linguas_${X/-/_}"
65 # english is handled internally
66 if [ "${#X}" == 5 ] && ! has ${X} ${NOSHORTLANGS}; then
67 #if [ "${X}" != "en-US" ]; then
68 SRC_URI="${SRC_URI}
69 linguas_${X%%-*}? ( ${LANG_URI}/${LANGPACK_PREFIX}${X}${LANGPACK_SUFFIX}.xpi -> ${P}-${X}.xpi )"
70 #fi
71 IUSE="${IUSE} linguas_${X%%-*}"
72 fi
73 done
74 fi
75
76 ASM_DEPEND=">=dev-lang/yasm-1.1"
77
78 # Mesa 7.10 needed for WebGL + bugfixes
79 RDEPEND=">=sys-devel/binutils-2.16.1
80 >=dev-libs/nss-3.12.10
81 >=dev-libs/nspr-4.8.8
82 >=dev-libs/glib-2.26
83 >=media-libs/mesa-7.10
84 >=media-libs/libpng-1.4.1[apng]
85 >=x11-libs/cairo-1.10
86 virtual/libffi
87 system-sqlite? ( >=dev-db/sqlite-3.7.4[fts3,secure-delete,unlock-notify,debug=] )
88 crypt? ( >=app-crypt/gnupg-1.4 )
89 webm? ( media-libs/libvpx
90 media-libs/alsa-lib )"
91
92 DEPEND="${RDEPEND}
93 dev-util/pkgconfig
94 webm? ( amd64? ( ${ASM_DEPEND} )
95 x86? ( ${ASM_DEPEND} ) )"
96
97 if [[ ${PV} == *beta* ]] ; then
98 S="${WORKDIR}/comm-beta"
99 else
100 S="${WORKDIR}/comm-release"
101 fi
102
103 linguas() {
104 local LANG SLANG
105 for LANG in ${LINGUAS}; do
106 if has ${LANG} en en_US; then
107 has en ${linguas} || linguas="${linguas:+"${linguas} "}en"
108 continue
109 elif has ${LANG} ${LANGS//-/_}; then
110 has ${LANG//_/-} ${linguas} || linguas="${linguas:+"${linguas} "}${LANG//_/-}"
111 continue
112 elif [[ " ${LANGS} " == *" ${LANG}-"* ]]; then
113 for X in ${LANGS}; do
114 if [[ "${X}" == "${LANG}-"* ]] && \
115 [[ " ${NOSHORTLANGS} " != *" ${X} "* ]]; then
116 has ${X} ${linguas} || linguas="${linguas:+"${linguas} "}${X}"
117 continue 2
118 fi
119 done
120 fi
121 ewarn "Sorry, but ${PN} does not support the ${LANG} LINGUA"
122 done
123 }
124
125 src_unpack() {
126 unpack ${A}
127
128 if ${HAS_LANGS} ; then
129 linguas
130 for X in ${linguas}; do
131 # FIXME: Add support for unpacking xpis to portage
132 [[ ${X} != "en" ]] && xpi_unpack "${P}-${X}.xpi"
133 done
134 if [[ ${linguas} != "" && ${linguas} != "en" ]]; then
135 einfo "Selected language packs (first will be default): ${linguas}"
136 fi
137 fi
138 }
139
140 pkg_setup() {
141 if [[ ${PV} == *_pre* ]] ; then
142 ewarn "You're using an unofficial release of ${PN}. Don't file any bug in"
143 ewarn "Gentoo's Bugtracker against this package in case it breaks for you."
144 ewarn "Those belong to upstream: https://bugzilla.mozilla.org"
145 fi
146
147 moz_pkgsetup
148
149 if ! use methodjit ; then
150 einfo
151 ewarn "You are disabling the method-based JIT in J├ĄgerMonkey."
152 ewarn "This will greatly slowdown JavaScript in ${PN}!"
153 fi
154 }
155
156 src_prepare() {
157 # Apply our patches
158 EPATCH_SUFFIX="patch" \
159 EPATCH_FORCE="yes" \
160 epatch "${WORKDIR}/_seamonkey"
161
162 # browser patches go here
163 pushd "${S}"/mozilla &>/dev/null || die
164 EPATCH_SUFFIX="patch" \
165 EPATCH_FORCE="yes" \
166 epatch "${WORKDIR}/_mozilla"
167 popd &>/dev/null || die
168
169 # mailnews patches go here
170 #pushd "${S}"/mailnews &>/dev/null || die
171 #EPATCH_SUFFIX="patch" \
172 #EPATCH_FORCE="yes" \
173 #epatch "${WORKDIR}/_mailnews"
174 #popd &>/dev/null || die
175
176 epatch "${FILESDIR}"/${PN}-2.2-curl7217-includes-fix.patch \
177 "${FILESDIR}"/${PN}-2.3.1-scrollbar-mouse-interaction-improvement.patch
178
179 # Allow user to apply any additional patches without modifing ebuild
180 epatch_user
181
182 if use crypt ; then
183 mv "${WORKDIR}"/enigmail "${S}"/mailnews/extensions/enigmail
184 cd "${S}"/mailnews/extensions/enigmail || die
185 ./makemake -r 2&>/dev/null
186 sed -e 's:@srcdir@:${S}/mailnews/extensions/enigmail:' \
187 -i Makefile.in || die
188 cd "${S}"
189 fi
190
191 #Ensure we disable javaxpcom by default to prevent configure breakage
192 sed -i -e s:MOZ_JAVAXPCOM\=1::g "${S}"/mozilla/xulrunner/confvars.sh \
193 || die "sed javaxpcom"
194
195 # Disable gnomevfs extension
196 sed -i -e "s:gnomevfs::" "${S}/"suite/confvars.sh \
197 || die "Failed to remove gnomevfs extension"
198
199 eautoreconf
200 cd "${S}"/mozilla || die
201 eautoreconf
202 cd "${S}"/mozilla/js/src || die
203 eautoreconf
204 }
205
206 src_configure() {
207 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
208 MEXTENSIONS=""
209
210 ####################################
211 #
212 # mozconfig, CFLAGS and CXXFLAGS setup
213 #
214 ####################################
215
216 mozconfig_init
217 mozconfig_config
218
219 # It doesn't compile on alpha without this LDFLAGS
220 use alpha && append-ldflags "-Wl,--no-relax"
221
222 if ! use chatzilla ; then
223 MEXTENSIONS="${MEXTENSIONS},-irc"
224 fi
225 if ! use roaming ; then
226 MEXTENSIONS="${MEXTENSIONS},-sroaming"
227 fi
228
229 mozconfig_annotate '' --enable-extensions="${MEXTENSIONS}"
230 mozconfig_annotate '' --disable-gconf
231 mozconfig_annotate '' --enable-jsd
232 mozconfig_annotate '' --enable-canvas
233 mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME}
234
235 mozconfig_use_enable system-sqlite
236 mozconfig_use_enable methodjit
237
238 if use crypt ; then
239 mozconfig_annotate "mail crypt" --enable-chrome-format=jar
240 fi
241
242 mozconfig_annotate '' --with-system-png
243
244 # Finalize and report settings
245 mozconfig_final
246
247 if [[ $(gcc-major-version) -lt 4 ]]; then
248 append-cxxflags -fno-stack-protector
249 elif [[ $(gcc-major-version) -gt 4 || $(gcc-minor-version) -gt 3 ]]; then
250 if use amd64 || use x86; then
251 append-flags -mno-avx
252 fi
253 fi
254
255 ####################################
256 #
257 # Configure and build
258 #
259 ####################################
260
261 # Work around breakage in makeopts with --no-print-directory
262 MAKEOPTS="${MAKEOPTS/--no-print-directory/}"
263
264 CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" PYTHON="$(PYTHON)" econf
265 }
266
267 src_compile() {
268 emake || die
269
270 # Only build enigmail extension if conditions are met.
271 if use crypt ; then
272 emake -C "${S}"/mailnews/extensions/enigmail || die "make enigmail failed"
273 emake -j1 -C "${S}"/mailnews/extensions/enigmail xpi || die "make enigmail xpi failed"
274 fi
275 }
276
277 src_install() {
278 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
279 declare emid
280
281 emake DESTDIR="${D}" install || die "emake install failed"
282 cp -f "${FILESDIR}"/icon/${PN}.desktop "${T}" || die
283
284 if use crypt ; then
285 cd "${T}" || die
286 unzip "${S}"/mozilla/dist/bin/enigmail*.xpi install.rdf || die
287 emid=$(sed -n '/<em:id>/!d; s/.*\({.*}\).*/\1/; p; q' install.rdf)
288
289 dodir ${MOZILLA_FIVE_HOME}/extensions/${emid} || die
290 cd "${D}"${MOZILLA_FIVE_HOME}/extensions/${emid} || die
291 unzip "${S}"/mozilla/dist/bin/enigmail*.xpi || die
292 fi
293
294 sed 's|^\(MimeType=.*\)$|\1text/x-vcard;text/directory;application/mbox;message/rfc822;x-scheme-handler/mailto;|' \
295 -i "${T}"/${PN}.desktop || die
296 sed 's|^\(Categories=.*\)$|\1Email;|' -i "${T}"/${PN}.desktop \
297 || die
298
299 if ${HAS_LANGS} ; then
300 linguas
301 for X in ${linguas}; do
302 [[ ${X} != "en" ]] && xpi_install "${WORKDIR}"/"${P}-${X}"
303 done
304 fi
305
306 # Add StartupNotify=true bug 290401
307 if use startup-notification ; then
308 echo "StartupNotify=true" >> "${T}"/${PN}.desktop
309 fi
310
311 # Install icon and .desktop for menu entry
312 newicon "${S}"/suite/branding/nightly/content/icon64.png ${PN}.png \
313 || die
314 domenu "${T}"/${PN}.desktop || die
315
316 # Add our default prefs
317 sed "s|SEAMONKEY_PVR|${PVR}|" "${FILESDIR}"/all-gentoo.js \
318 > "${D}"${MOZILLA_FIVE_HOME}/defaults/pref/all-gentoo.js \
319 || die
320
321 # Plugins dir
322 rm -rf "${D}"${MOZILLA_FIVE_HOME}/plugins || die "failed to remove existing plugins dir"
323 dosym ../nsbrowser/plugins "${MOZILLA_FIVE_HOME}"/plugins || die
324
325 doman "${S}"/suite/app/${PN}.1 || die
326 }
327
328 pkg_preinst() {
329 declare MOZILLA_FIVE_HOME="${ROOT}/usr/$(get_libdir)/${PN}"
330
331 if [ -d ${MOZILLA_FIVE_HOME}/plugins ] ; then
332 rm ${MOZILLA_FIVE_HOME}/plugins -rf
333 fi
334 }
335
336 pkg_postinst() {
337 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
338
339 # Update mimedb for the new .desktop file
340 fdo-mime_desktop_database_update
341
342 if use chatzilla ; then
343 elog "chatzilla is now an extension which can be en-/disabled and configured via"
344 elog "the Add-on manager."
345 fi
346 }

  ViewVC Help
Powered by ViewVC 1.1.20