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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download)
Fri Sep 30 21:33:19 2011 UTC (6 years, 8 months ago) by polynomial-c
Branch: MAIN
Version bump

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

1 polynomial-c 1.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.4.ebuild,v 1.2 2011/09/28 11:14:09 ssuominen 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.4-patches-01"
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 ~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     REL_URI="ftp://ftp.mozilla.org/pub/${PN}/releases/${MY_PV}"
42     LANG_URI="${REL_URI}/langpack"
43     KEYWORDS="~alpha ~amd64 ~arm ~hppa ~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     >=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     linguas() {
106     local LANG SLANG
107     for LANG in ${LINGUAS}; do
108     if has ${LANG} en en_US; then
109     has en ${linguas} || linguas="${linguas:+"${linguas} "}en"
110     continue
111     elif has ${LANG} ${LANGS//-/_}; then
112     has ${LANG//_/-} ${linguas} || linguas="${linguas:+"${linguas} "}${LANG//_/-}"
113     continue
114     elif [[ " ${LANGS} " == *" ${LANG}-"* ]]; then
115     for X in ${LANGS}; do
116     if [[ "${X}" == "${LANG}-"* ]] && \
117     [[ " ${NOSHORTLANGS} " != *" ${X} "* ]]; then
118     has ${X} ${linguas} || linguas="${linguas:+"${linguas} "}${X}"
119     continue 2
120     fi
121     done
122     fi
123     ewarn "Sorry, but ${PN} does not support the ${LANG} LINGUA"
124     done
125     }
126    
127     src_unpack() {
128     unpack ${A}
129    
130     if ${HAS_LANGS} ; then
131     linguas
132     for X in ${linguas}; do
133     # FIXME: Add support for unpacking xpis to portage
134     [[ ${X} != "en" ]] && xpi_unpack "${P}-${X}.xpi"
135     done
136     if [[ ${linguas} != "" && ${linguas} != "en" ]]; then
137     einfo "Selected language packs (first will be default): ${linguas}"
138     fi
139     fi
140     }
141    
142     pkg_setup() {
143     if [[ ${PV} == *_pre* ]] ; then
144     ewarn "You're using an unofficial release of ${PN}. Don't file any bug in"
145     ewarn "Gentoo's Bugtracker against this package in case it breaks for you."
146     ewarn "Those belong to upstream: https://bugzilla.mozilla.org"
147     fi
148    
149     moz_pkgsetup
150    
151     if ! use methodjit ; then
152     einfo
153     ewarn "You are disabling the method-based JIT in J├ĄgerMonkey."
154     ewarn "This will greatly slowdown JavaScript in ${PN}!"
155     fi
156     }
157    
158     src_prepare() {
159     # Apply our patches
160     EPATCH_SUFFIX="patch" \
161     EPATCH_FORCE="yes" \
162     epatch "${WORKDIR}/_seamonkey"
163    
164     # browser patches go here
165     pushd "${S}"/mozilla &>/dev/null || die
166     EPATCH_SUFFIX="patch" \
167     EPATCH_FORCE="yes" \
168     epatch "${WORKDIR}/_mozilla"
169     popd &>/dev/null || die
170    
171     # mailnews patches go here
172     #pushd "${S}"/mailnews &>/dev/null || die
173     #EPATCH_SUFFIX="patch" \
174     #EPATCH_FORCE="yes" \
175     #epatch "${WORKDIR}/_mailnews"
176     #popd &>/dev/null || die
177    
178     epatch "${FILESDIR}"/${PN}-2.2-curl7217-includes-fix.patch \
179     "${FILESDIR}"/${PN}-2.3.1-scrollbar-mouse-interaction-improvement.patch
180    
181     # Allow user to apply any additional patches without modifing ebuild
182     epatch_user
183    
184     if use crypt ; then
185     mv "${WORKDIR}"/enigmail "${S}"/mailnews/extensions/enigmail
186     cd "${S}"/mailnews/extensions/enigmail || die
187     ./makemake -r 2&>/dev/null
188     sed -e 's:@srcdir@:${S}/mailnews/extensions/enigmail:' \
189     -i Makefile.in || die
190     cd "${S}"
191     fi
192    
193     #Ensure we disable javaxpcom by default to prevent configure breakage
194     sed -i -e s:MOZ_JAVAXPCOM\=1::g "${S}"/mozilla/xulrunner/confvars.sh \
195     || die "sed javaxpcom"
196    
197     # Disable gnomevfs extension
198     sed -i -e "s:gnomevfs::" "${S}/"suite/confvars.sh \
199     || die "Failed to remove gnomevfs extension"
200    
201     eautoreconf
202     cd "${S}"/mozilla || die
203     eautoreconf
204     cd "${S}"/mozilla/js/src || die
205     eautoreconf
206     }
207    
208     src_configure() {
209     declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
210     MEXTENSIONS=""
211    
212     ####################################
213     #
214     # mozconfig, CFLAGS and CXXFLAGS setup
215     #
216     ####################################
217    
218     mozconfig_init
219     mozconfig_config
220    
221     # It doesn't compile on alpha without this LDFLAGS
222     use alpha && append-ldflags "-Wl,--no-relax"
223    
224     if ! use chatzilla ; then
225     MEXTENSIONS="${MEXTENSIONS},-irc"
226     fi
227     if ! use roaming ; then
228     MEXTENSIONS="${MEXTENSIONS},-sroaming"
229     fi
230    
231     mozconfig_annotate '' --enable-extensions="${MEXTENSIONS}"
232     mozconfig_annotate '' --disable-gconf
233     mozconfig_annotate '' --enable-jsd
234     mozconfig_annotate '' --enable-canvas
235     mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME}
236    
237     mozconfig_use_enable system-sqlite
238     mozconfig_use_enable methodjit
239    
240     if use crypt ; then
241     mozconfig_annotate "mail crypt" --enable-chrome-format=jar
242     fi
243    
244     mozconfig_annotate '' --with-system-png
245    
246     # Finalize and report settings
247     mozconfig_final
248    
249     if [[ $(gcc-major-version) -lt 4 ]]; then
250     append-cxxflags -fno-stack-protector
251     elif [[ $(gcc-major-version) -gt 4 || $(gcc-minor-version) -gt 3 ]]; then
252     if use amd64 || use x86; then
253     append-flags -mno-avx
254     fi
255     fi
256    
257     ####################################
258     #
259     # Configure and build
260     #
261     ####################################
262    
263     # Work around breakage in makeopts with --no-print-directory
264     MAKEOPTS="${MAKEOPTS/--no-print-directory/}"
265    
266     CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" PYTHON="$(PYTHON)" econf
267     }
268    
269     src_compile() {
270     emake || die
271    
272     # Only build enigmail extension if conditions are met.
273     if use crypt ; then
274     emake -C "${S}"/mailnews/extensions/enigmail || die "make enigmail failed"
275     emake -j1 -C "${S}"/mailnews/extensions/enigmail xpi || die "make enigmail xpi failed"
276     fi
277     }
278    
279     src_install() {
280     declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
281     declare emid
282    
283     emake DESTDIR="${D}" install || die "emake install failed"
284     cp -f "${FILESDIR}"/icon/${PN}.desktop "${T}" || die
285    
286     if use crypt ; then
287     cd "${T}" || die
288     unzip "${S}"/mozilla/dist/bin/enigmail*.xpi install.rdf || die
289     emid=$(sed -n '/<em:id>/!d; s/.*\({.*}\).*/\1/; p; q' install.rdf)
290    
291     dodir ${MOZILLA_FIVE_HOME}/extensions/${emid} || die
292     cd "${D}"${MOZILLA_FIVE_HOME}/extensions/${emid} || die
293     unzip "${S}"/mozilla/dist/bin/enigmail*.xpi || die
294     fi
295    
296     sed 's|^\(MimeType=.*\)$|\1text/x-vcard;text/directory;application/mbox;message/rfc822;x-scheme-handler/mailto;|' \
297     -i "${T}"/${PN}.desktop || die
298     sed 's|^\(Categories=.*\)$|\1Email;|' -i "${T}"/${PN}.desktop \
299     || die
300    
301     if ${HAS_LANGS} ; then
302     linguas
303     for X in ${linguas}; do
304     [[ ${X} != "en" ]] && xpi_install "${WORKDIR}"/"${P}-${X}"
305     done
306     fi
307    
308     # Add StartupNotify=true bug 290401
309     if use startup-notification ; then
310     echo "StartupNotify=true" >> "${T}"/${PN}.desktop
311     fi
312    
313     # Install icon and .desktop for menu entry
314     newicon "${S}"/suite/branding/nightly/content/icon64.png ${PN}.png \
315     || die
316     domenu "${T}"/${PN}.desktop || die
317    
318     # Add our default prefs
319     sed "s|SEAMONKEY_PVR|${PVR}|" "${FILESDIR}"/all-gentoo.js \
320     > "${D}"${MOZILLA_FIVE_HOME}/defaults/pref/all-gentoo.js \
321     || die
322    
323     # Plugins dir
324     rm -rf "${D}"${MOZILLA_FIVE_HOME}/plugins || die "failed to remove existing plugins dir"
325     dosym ../nsbrowser/plugins "${MOZILLA_FIVE_HOME}"/plugins || die
326    
327     doman "${S}"/suite/app/${PN}.1 || die
328     }
329    
330     pkg_preinst() {
331     declare MOZILLA_FIVE_HOME="${ROOT}/usr/$(get_libdir)/${PN}"
332    
333     if [ -d ${MOZILLA_FIVE_HOME}/plugins ] ; then
334     rm ${MOZILLA_FIVE_HOME}/plugins -rf
335     fi
336     }
337    
338     pkg_postinst() {
339     declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
340    
341     # Update mimedb for the new .desktop file
342     fdo-mime_desktop_database_update
343    
344     if use chatzilla ; then
345     elog "chatzilla is now an extension which can be en-/disabled and configured via"
346     elog "the Add-on manager."
347     fi
348     }

  ViewVC Help
Powered by ViewVC 1.1.20