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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Tue Dec 20 08:22:06 2011 UTC (2 years, 7 months ago) by polynomial-c
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
FILE REMOVED
Version bump. Removed old. Removed some keywords from unsupported seamonkey-2.0.14 ebuild

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

  ViewVC Help
Powered by ViewVC 1.1.20