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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.11 - (hide annotations) (download)
Mon Feb 18 16:06:02 2013 UTC (5 years, 5 months ago) by polynomial-c
Branch: MAIN
Changes since 1.10: +2 -2 lines
Pin x11-libs/gtk+ to slot 2 versions

(Portage version: 2.2.0_alpha163/cvs/Linux x86_64, signed Manifest commit with key 0x981CA6FC)

1 mgorny 1.10 # Copyright 1999-2013 Gentoo Foundation
2 polynomial-c 1.1 # Distributed under the terms of the GNU General Public License v2
3 polynomial-c 1.11 # $Header: /var/cvsroot/gentoo-x86/www-client/seamonkey/seamonkey-2.4.1-r1.ebuild,v 1.10 2013/01/16 19:02:13 mgorny Exp $
4 polynomial-c 1.1
5     EAPI="3"
6     WANT_AUTOCONF="2.1"
7    
8 mgorny 1.10 inherit flag-o-matic toolchain-funcs eutils mozconfig-3 makeedit multilib fdo-mime autotools mozextension
9 polynomial-c 1.1
10     PATCH="${PN}-2.4.1-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 polynomial-c 1.7 KEYWORDS=""
35 polynomial-c 1.1 #HAS_LANGS="false"
36     else
37     # This is where arch teams should change the KEYWORDS.
38    
39     #REL_URI="http://releases.mozilla.org/pub/mozilla.org/${PN}/releases/${MY_PV}"
40     REL_URI="ftp://ftp.mozilla.org/pub/${PN}/releases/${MY_PV}"
41     LANG_URI="${REL_URI}/langpack"
42 polynomial-c 1.7 KEYWORDS="ppc"
43 polynomial-c 1.1 [[ ${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 anarchy 1.9 LICENSE="MPL-1.1 GPL-2 LGPL-2.1"
51 polynomial-c 1.1 IUSE="+alsa +chatzilla +crypt +ipc +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.10
80     >=dev-libs/nspr-4.8.8
81     >=dev-libs/glib-2.26
82     >=media-libs/mesa-7.10
83     >=media-libs/libpng-1.4.1[apng]
84     >=x11-libs/cairo-1.10
85     >=x11-libs/pango-1.14.0
86 polynomial-c 1.11 >=x11-libs/gtk+-2.14:2
87 polynomial-c 1.1 virtual/libffi
88     system-sqlite? ( >=dev-db/sqlite-3.7.5[fts3,secure-delete,unlock-notify,debug=] )
89     crypt? ( >=app-crypt/gnupg-1.4 )
90     webm? ( media-libs/libvpx
91     media-libs/alsa-lib )"
92    
93     DEPEND="${RDEPEND}
94 jdhore 1.8 virtual/pkgconfig
95 polynomial-c 1.1 webm? ( amd64? ( ${ASM_DEPEND} )
96     x86? ( ${ASM_DEPEND} ) )"
97    
98     if [[ ${PV} == *beta* ]] ; then
99     S="${WORKDIR}/comm-beta"
100     else
101     S="${WORKDIR}/comm-release"
102     fi
103    
104     linguas() {
105     local LANG SLANG
106     for LANG in ${LINGUAS}; do
107     if has ${LANG} en en_US; then
108     has en ${linguas} || linguas="${linguas:+"${linguas} "}en"
109     continue
110     elif has ${LANG} ${LANGS//-/_}; then
111     has ${LANG//_/-} ${linguas} || linguas="${linguas:+"${linguas} "}${LANG//_/-}"
112     continue
113     elif [[ " ${LANGS} " == *" ${LANG}-"* ]]; then
114     for X in ${LANGS}; do
115     if [[ "${X}" == "${LANG}-"* ]] && \
116     [[ " ${NOSHORTLANGS} " != *" ${X} "* ]]; then
117     has ${X} ${linguas} || linguas="${linguas:+"${linguas} "}${X}"
118     continue 2
119     fi
120     done
121     fi
122     ewarn "Sorry, but ${PN} does not support the ${LANG} LINGUA"
123     done
124     }
125    
126     src_unpack() {
127     unpack ${A}
128    
129     if ${HAS_LANGS} ; then
130     linguas
131     for X in ${linguas}; do
132     # FIXME: Add support for unpacking xpis to portage
133     [[ ${X} != "en" ]] && xpi_unpack "${P}-${X}.xpi"
134     done
135     if [[ ${linguas} != "" && ${linguas} != "en" ]]; then
136     einfo "Selected language packs (first will be default): ${linguas}"
137     fi
138     fi
139     }
140    
141     pkg_setup() {
142     if [[ ${PV} == *_pre* ]] ; then
143     ewarn "You're using an unofficial release of ${PN}. Don't file any bug in"
144     ewarn "Gentoo's Bugtracker against this package in case it breaks for you."
145     ewarn "Those belong to upstream: https://bugzilla.mozilla.org"
146     fi
147    
148     moz_pkgsetup
149    
150     if ! use methodjit ; then
151     einfo
152     ewarn "You are disabling the method-based JIT in J├ĄgerMonkey."
153     ewarn "This will greatly slowdown JavaScript in ${PN}!"
154     fi
155     }
156    
157     src_prepare() {
158     # Apply our patches
159     EPATCH_SUFFIX="patch" \
160     EPATCH_FORCE="yes" \
161     epatch "${WORKDIR}/_seamonkey"
162    
163     # browser patches go here
164     pushd "${S}"/mozilla &>/dev/null || die
165     EPATCH_SUFFIX="patch" \
166     EPATCH_FORCE="yes" \
167     epatch "${WORKDIR}/_mozilla"
168     popd &>/dev/null || die
169    
170     # mailnews patches go here
171     pushd "${S}"/mailnews &>/dev/null || die
172     EPATCH_SUFFIX="patch" \
173     EPATCH_FORCE="yes" \
174     epatch "${WORKDIR}/_mailnews"
175     popd &>/dev/null || die
176    
177     epatch "${FILESDIR}"/${PN}-2.2-curl7217-includes-fix.patch \
178     "${FILESDIR}"/${PN}-2.3.1-scrollbar-mouse-interaction-improvement.patch \
179     "${FILESDIR}"/Copy_xpcshell_only_if_tests_are_enabled.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+=",-irc"
226     fi
227     if ! use roaming ; then
228     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     mozconfig_annotate '' --enable-system-ffi
237    
238 polynomial-c 1.2 mozconfig_annotate '' --target="${CTARGET:-${CHOST}}"
239    
240 polynomial-c 1.1 mozconfig_use_enable system-sqlite
241     mozconfig_use_enable methodjit
242    
243     if use crypt ; then
244     mozconfig_annotate "mail crypt" --enable-chrome-format=jar
245     fi
246    
247     mozconfig_annotate '' --with-system-png
248    
249     # Finalize and report settings
250     mozconfig_final
251    
252     if [[ $(gcc-major-version) -lt 4 ]]; then
253     append-cxxflags -fno-stack-protector
254     elif [[ $(gcc-major-version) -gt 4 || $(gcc-minor-version) -gt 3 ]]; then
255     if use amd64 || use x86; then
256     append-flags -mno-avx
257     fi
258     fi
259    
260     ####################################
261     #
262     # Configure and build
263     #
264     ####################################
265    
266     # Work around breakage in makeopts with --no-print-directory
267     MAKEOPTS="${MAKEOPTS/--no-print-directory/}"
268    
269     CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" PYTHON="$(PYTHON)" econf
270     }
271    
272     src_compile() {
273     emake || die
274    
275     # Only build enigmail extension if conditions are met.
276     if use crypt ; then
277     emake -C "${S}"/mailnews/extensions/enigmail || die "make enigmail failed"
278     emake -j1 -C "${S}"/mailnews/extensions/enigmail xpi || die "make enigmail xpi failed"
279     fi
280     }
281    
282     src_install() {
283     declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
284     declare emid
285    
286     emake DESTDIR="${D}" install || die "emake install failed"
287     cp -f "${FILESDIR}"/icon/${PN}.desktop "${T}" || die
288    
289     if use crypt ; then
290     cd "${T}" || die
291     unzip "${S}"/mozilla/dist/bin/enigmail*.xpi install.rdf || die
292     emid=$(sed -n '/<em:id>/!d; s/.*\({.*}\).*/\1/; p; q' install.rdf)
293    
294     dodir ${MOZILLA_FIVE_HOME}/extensions/${emid} || die
295     cd "${D}"${MOZILLA_FIVE_HOME}/extensions/${emid} || die
296     unzip "${S}"/mozilla/dist/bin/enigmail*.xpi || die
297     fi
298    
299     sed 's|^\(MimeType=.*\)$|\1text/x-vcard;text/directory;application/mbox;message/rfc822;x-scheme-handler/mailto;|' \
300     -i "${T}"/${PN}.desktop || die
301     sed 's|^\(Categories=.*\)$|\1Email;|' -i "${T}"/${PN}.desktop \
302     || die
303    
304     if ${HAS_LANGS} ; then
305     linguas
306     for X in ${linguas}; do
307     [[ ${X} != "en" ]] && xpi_install "${WORKDIR}"/"${P}-${X}"
308     done
309     fi
310    
311     # Add StartupNotify=true bug 290401
312     if use startup-notification ; then
313     echo "StartupNotify=true" >> "${T}"/${PN}.desktop
314     fi
315    
316     # Install icon and .desktop for menu entry
317     newicon "${S}"/suite/branding/nightly/content/icon64.png ${PN}.png \
318     || die
319     domenu "${T}"/${PN}.desktop || die
320    
321     # Add our default prefs
322     sed "s|SEAMONKEY_PVR|${PVR}|" "${FILESDIR}"/all-gentoo.js \
323     > "${D}"${MOZILLA_FIVE_HOME}/defaults/pref/all-gentoo.js \
324     || die
325    
326     # Plugins dir
327     rm -rf "${D}"${MOZILLA_FIVE_HOME}/plugins || die "failed to remove existing plugins dir"
328     dosym ../nsbrowser/plugins "${MOZILLA_FIVE_HOME}"/plugins || die
329    
330     doman "${S}"/suite/app/${PN}.1 || die
331     }
332    
333     pkg_preinst() {
334     declare MOZILLA_FIVE_HOME="${ROOT}/usr/$(get_libdir)/${PN}"
335    
336     if [ -d ${MOZILLA_FIVE_HOME}/plugins ] ; then
337     rm ${MOZILLA_FIVE_HOME}/plugins -rf
338     fi
339     }
340    
341     pkg_postinst() {
342     declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
343    
344     # Update mimedb for the new .desktop file
345     fdo-mime_desktop_database_update
346    
347     if use chatzilla ; then
348     elog "chatzilla is now an extension which can be en-/disabled and configured via"
349     elog "the Add-on manager."
350     fi
351     }

  ViewVC Help
Powered by ViewVC 1.1.20