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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download)
Thu Aug 30 13:33:34 2012 UTC (5 years, 1 month ago) by polynomial-c
Branch: MAIN
Version bump. Removed old

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

1 polynomial-c 1.1 # Copyright 1999-2012 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.11.ebuild,v 1.4 2012/07/18 13:32:41 polynomial-c Exp $
4    
5     EAPI="3"
6     WANT_AUTOCONF="2.1"
7    
8     # This list can be updated with scripts/get_langs.sh from the mozilla overlay
9     MOZ_LANGS=(be ca cs de en en-GB en-US es-AR es-ES fi fr gl hu it ja lt nb-NO nl
10     pl pt-PT ru sk sv-SE tr uk zh-CN zh-TW)
11    
12     MOZ_PV="${PV/_pre*}"
13     MOZ_PV="${MOZ_PV/_alpha/a}"
14     MOZ_PV="${MOZ_PV/_beta/b}"
15     MOZ_PV="${MOZ_PV/_rc/rc}"
16     MOZ_P="${PN}-${MOZ_PV}"
17    
18     if [[ ${PV} == *_pre* ]] ; then
19     MOZ_FTP_URI="ftp://ftp.mozilla.org/pub/${PN}/candidates/${MOZ_PV}-candidates/build${PV##*_pre}"
20     MOZ_LANGPACK_PREFIX="linux-i686/xpi/"
21     # And the langpack stuff stays at eclass defaults
22     else
23     MOZ_FTP_URI="ftp://ftp.mozilla.org/pub/${PN}/releases/${MOZ_PV}"
24     MOZ_LANGPACK_PREFIX="langpack/${MOZ_P}."
25     MOZ_LANGPACK_SUFFIX=".langpack.xpi"
26     fi
27    
28     inherit flag-o-matic toolchain-funcs eutils mozconfig-3 multilib pax-utils fdo-mime autotools mozextension python nsplugins mozlinguas
29    
30     PATCHFF="firefox-15.0-patches-0.2"
31     PATCH="${PN}-2.7-patches-03"
32     EMVER="1.4.4"
33    
34     DESCRIPTION="Seamonkey Web Browser"
35     HOMEPAGE="http://www.seamonkey-project.org"
36    
37     if [[ ${PV} == *_pre* ]] ; then
38     # pre-releases. No need for arch teams to change KEYWORDS here.
39    
40     KEYWORDS=""
41     else
42     # This is where arch teams should change the KEYWORDS.
43    
44     KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86"
45     fi
46    
47     SLOT="0"
48     LICENSE="MPL-2.0 GPL-2 LGPL-2.1"
49     IUSE="+alsa +chatzilla +crypt gstreamer +ipc +jit +roaming system-sqlite +webm"
50    
51     SRC_URI+="${SRC_URI}
52     ${MOZ_FTP_URI}/source/${MOZ_P}.source.tar.bz2 -> ${P}.source.tar.bz2
53     http://dev.gentoo.org/~nirbheek/mozilla/patchsets/${PATCHFF}.tar.xz
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     ASM_DEPEND=">=dev-lang/yasm-1.1"
58    
59     # Mesa 7.10 needed for WebGL + bugfixes
60     RDEPEND=">=sys-devel/binutils-2.16.1
61     >=dev-libs/nss-3.13.5
62     >=dev-libs/nspr-4.9.1
63     >=dev-libs/glib-2.26
64     >=media-libs/mesa-7.10
65     >=media-libs/libpng-1.5.9[apng]
66     >=x11-libs/cairo-1.10
67     >=x11-libs/pango-1.14.0
68     >=x11-libs/gtk+-2.14
69     virtual/libffi
70     gstreamer? (
71     >=media-libs/gstreamer-0.10.33:0.10
72     >=media-libs/gst-plugins-base-0.10.33:0.10
73     )
74     system-sqlite? ( >=dev-db/sqlite-3.7.10[fts3,secure-delete,threadsafe,unlock-notify,debug=] )
75     crypt? ( >=app-crypt/gnupg-1.4 )
76     webm? (
77     >=media-libs/libvpx-1.0.0
78     kernel_linux? ( media-libs/alsa-lib )
79     )"
80    
81     DEPEND="${RDEPEND}
82     !elibc_glibc? ( dev-libs/libexecinfo )
83     virtual/pkgconfig
84     webm? ( amd64? ( ${ASM_DEPEND} )
85     x86? ( ${ASM_DEPEND} )
86     virtual/opengl )"
87    
88     if [[ ${PV} == *beta* ]] ; then
89     S="${WORKDIR}/comm-beta"
90     else
91     S="${WORKDIR}/comm-release"
92     fi
93    
94     src_unpack() {
95     unpack ${A}
96    
97     # Unpack language packs
98     mozlinguas_src_unpack
99     }
100    
101     pkg_setup() {
102     if [[ ${PV} == *_pre* ]] ; then
103     ewarn "You're using an unofficial release of ${PN}. Don't file any bug in"
104     ewarn "Gentoo's Bugtracker against this package in case it breaks for you."
105     ewarn "Those belong to upstream: https://bugzilla.mozilla.org"
106     fi
107    
108     moz_pkgsetup
109     }
110    
111     src_prepare() {
112     # Apply our patches
113     EPATCH_SUFFIX="patch" \
114     EPATCH_FORCE="yes" \
115     epatch "${WORKDIR}/seamonkey"
116    
117     # browser patches go here
118     pushd "${S}"/mozilla &>/dev/null || die
119     EPATCH_EXCLUDE="2000-firefox_gentoo_install_dirs.patch" \
120     EPATCH_SUFFIX="patch" \
121     EPATCH_FORCE="yes" \
122     epatch "${WORKDIR}/firefox"
123     epatch "${FILESDIR}"/firefox-15.0-fix-gstreamer-html5-crash.patch
124     popd &>/dev/null || die
125    
126     # Shell scripts sometimes contain DOS line endings; bug 391889
127     grep -rlZ --include="*.sh" $'\r$' . |
128     while read -r -d $'\0' file ; do
129     einfo edos2unix "${file}"
130     edos2unix "${file}" || die
131     done
132    
133     # Allow user to apply any additional patches without modifing ebuild
134     epatch_user
135    
136     if use crypt ; then
137     mv "${WORKDIR}"/enigmail "${S}"/mailnews/extensions/enigmail
138     #cd "${S}"/mailnews/extensions/enigmail || die
139     #cd "${S}"
140     fi
141    
142     local ms="${S}/mozilla"
143    
144     # Enable gnomebreakpad
145     if use debug ; then
146     sed -i -e "s:GNOME_DISABLE_CRASH_DIALOG=1:GNOME_DISABLE_CRASH_DIALOG=0:g" \
147     "${ms}"/build/unix/run-mozilla.sh || die "sed failed!"
148     fi
149    
150     # Disable gnomevfs extension
151     sed -i -e "s:gnomevfs::" "${S}"/suite/confvars.sh \
152     -e "s:gnomevfs::" "${ms}"/browser/confvars.sh \
153     -e "s:gnomevfs::" "${ms}"/xulrunner/confvars.sh \
154     || die "Failed to remove gnomevfs extension"
155    
156     # Ensure that are plugins dir is enabled as default
157     sed -i -e "s:/usr/lib/mozilla/plugins:/usr/$(get_libdir)/nsbrowser/plugins:" \
158     "${ms}"/xpcom/io/nsAppFileLocationProvider.cpp || die "sed failed to replace plugin path!"
159    
160     # Don't exit with error when some libs are missing which we have in
161     # system.
162     sed '/^MOZ_PKG_FATAL_WARNINGS/s@= 1@= 0@' \
163     -i "${S}"/suite/installer/Makefile.in || die
164     # Don't error out when there's no files to be removed:
165     sed 's@\(xargs rm\)$@\1 -f@' \
166     -i "${S}"/mozilla/toolkit/mozapps/installer/packager.mk || die
167    
168     eautoreconf
169     cd "${S}"/mozilla
170     eautoconf
171     }
172    
173     src_configure() {
174     MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
175     MEXTENSIONS="default"
176    
177     ####################################
178     #
179     # mozconfig, CFLAGS and CXXFLAGS setup
180     #
181     ####################################
182    
183     mozconfig_init
184     mozconfig_config
185    
186     # It doesn't compile on alpha without this LDFLAGS
187     use alpha && append-ldflags "-Wl,--no-relax"
188    
189     if use chatzilla ; then
190     MEXTENSIONS+=",irc"
191     else
192     MEXTENSIONS+=",-irc"
193     fi
194     if ! use roaming ; then
195     MEXTENSIONS+=",-sroaming"
196     fi
197    
198     mozconfig_annotate '' --prefix="${EPREFIX}"/usr
199     mozconfig_annotate '' --libdir="${EPREFIX}"/usr/$(get_libdir)
200     mozconfig_annotate '' --enable-extensions="${MEXTENSIONS}"
201     mozconfig_annotate '' --disable-gconf
202     mozconfig_annotate '' --enable-jsd
203     mozconfig_annotate '' --enable-canvas
204     mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME}
205     mozconfig_annotate '' --enable-system-ffi
206     mozconfig_annotate '' --with-system-png
207     mozconfig_annotate '' --target="${CTARGET:-${CHOST}}"
208     mozconfig_annotate '' --enable-safe-browsing
209    
210     mozconfig_use_enable gstreamer
211     mozconfig_use_enable system-sqlite
212     # Both methodjit and tracejit conflict with PaX
213     mozconfig_use_enable jit methodjit
214     mozconfig_use_enable jit tracejit
215    
216     # Use an objdir to keep things organized.
217     echo "mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/seamonk" \
218     >> "${S}"/.mozconfig
219    
220     # Finalize and report settings
221     mozconfig_final
222    
223     # Work around breakage in makeopts with --no-print-directory
224     MAKEOPTS="${MAKEOPTS/--no-print-directory/}"
225    
226     if [[ $(gcc-major-version) -lt 4 ]] ; then
227     append-cxxflags -fno-stack-protector
228     elif [[ $(gcc-major-version) -gt 4 || $(gcc-minor-version) -gt 3 ]] ; then
229     if use amd64 || use x86 ; then
230     append-flags -mno-avx
231     fi
232     fi
233     }
234    
235     src_compile() {
236     CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \
237     MOZ_MAKE_FLAGS="${MAKEOPTS}" \
238     emake -f client.mk || die
239    
240     # Only build enigmail extension if conditions are met.
241     if use crypt ; then
242     cd "${S}"/mailnews/extensions/enigmail || die
243     ./makemake -r 2&> /dev/null
244     cd "${S}"/seamonk/mailnews/extensions/enigmail
245     emake || die "make enigmail failed"
246     emake xpi || die "make enigmail xpi failed"
247     fi
248     }
249    
250     src_install() {
251     MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
252     local emid obj_dir="seamonk"
253     cd "${S}/${obj_dir}"
254    
255     # Copy our preference before omnijar is created.
256     sed "s|SEAMONKEY_PVR|${PVR}|" "${FILESDIR}"/all-gentoo-1.js > \
257     "${S}/${obj_dir}/mozilla/dist/bin/defaults/pref/all-gentoo.js" \
258     || die
259    
260     # Without methodjit and tracejit there's no conflict with PaX
261     if use jit ; then
262     # Pax mark xpcshell for hardened support, only used for startupcache creation.
263     pax-mark m "${S}"/dist/bin/xpcshell
264     fi
265    
266     MOZ_MAKE_FLAGS="${MAKEOPTS}" \
267     emake DESTDIR="${D}" install || die "emake install failed"
268     cp -f "${FILESDIR}"/icon/${PN}.desktop "${T}" || die
269    
270     if use crypt ; then
271     cd "${T}" || die
272     unzip "${S}"/${obj_dir}/mozilla/dist/bin/enigmail*.xpi install.rdf || die
273     emid=$(sed -n '/<em:id>/!d; s/.*\({.*}\).*/\1/; p; q' install.rdf)
274    
275     dodir ${MOZILLA_FIVE_HOME}/extensions/${emid} || die
276     cd "${D}"${MOZILLA_FIVE_HOME}/extensions/${emid} || die
277     unzip "${S}"/${obj_dir}/mozilla/dist/bin/enigmail*.xpi || die
278    
279     cd "${S}" || die
280     fi
281    
282     sed 's|^\(MimeType=.*\)$|\1text/x-vcard;text/directory;application/mbox;message/rfc822;x-scheme-handler/mailto;|' \
283     -i "${T}"/${PN}.desktop || die
284     sed 's|^\(Categories=.*\)$|\1Email;|' -i "${T}"/${PN}.desktop \
285     || die
286    
287     # Install language packs
288     mozlinguas_src_install
289    
290     # Add StartupNotify=true bug 290401
291     if use startup-notification ; then
292     echo "StartupNotify=true" >> "${T}"/${PN}.desktop
293     fi
294    
295     # Install icon and .desktop for menu entry
296     newicon "${S}"/suite/branding/nightly/content/icon64.png ${PN}.png \
297     || die
298     domenu "${T}"/${PN}.desktop || die
299    
300     # Without methodjit and tracejit there's no conflict with PaX
301     if use jit ; then
302     # Required in order to use plugins and even run firefox on hardened.
303     pax-mark m "${ED}"${MOZILLA_FIVE_HOME}/{seamonkey,seamonkey-bin}
304     fi
305    
306     # Plugin-container needs to be pax-marked for hardened to ensure plugins such as flash
307     # continue to work as expected.
308     pax-mark m "${ED}"${MOZILLA_FIVE_HOME}/plugin-container
309    
310     # Handle plugins dir through nsplugins.eclass
311     share_plugins_dir
312    
313     doman "${S}"/${obj_dir}/suite/app/${PN}.1 || die
314     }
315    
316     pkg_preinst() {
317     MOZILLA_FIVE_HOME="${ROOT}/usr/$(get_libdir)/${PN}"
318    
319     if [ -d ${MOZILLA_FIVE_HOME}/plugins ] ; then
320     rm ${MOZILLA_FIVE_HOME}/plugins -rf
321     fi
322     }
323    
324     pkg_postinst() {
325     MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
326    
327     # Update mimedb for the new .desktop file
328     fdo-mime_desktop_database_update
329    
330     if use chatzilla ; then
331     elog "chatzilla is now an extension which can be en-/disabled and configured via"
332     elog "the Add-on manager."
333     fi
334     }

  ViewVC Help
Powered by ViewVC 1.1.20