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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (hide annotations) (download)
Fri Jun 15 08:34:18 2012 UTC (6 years, 2 months ago) by polynomial-c
Branch: MAIN
Changes since 1.5: +2 -2 lines
Use latest ff patchset

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

  ViewVC Help
Powered by ViewVC 1.1.20