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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Wed Aug 3 06:55:39 2011 UTC (3 years, 2 months ago) by polynomial-c
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +1 -1 lines
FILE REMOVED
Updated enigmail version to 1.2.1

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

  ViewVC Help
Powered by ViewVC 1.1.20