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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.8 - (show annotations) (download)
Fri Oct 19 20:03:13 2012 UTC (2 years, 2 months ago) by polynomial-c
Branch: MAIN
CVS Tags: HEAD
Changes since 1.7: +1 -1 lines
FILE REMOVED
Security bump. Removed old

(Portage version: 2.1.11.9/cvs/Linux x86_64)

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

  ViewVC Help
Powered by ViewVC 1.1.20