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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (show annotations) (download)
Wed Feb 6 18:00:57 2013 UTC (17 months, 3 weeks ago) by polynomial-c
Branch: MAIN
CVS Tags: HEAD
Changes since 1.6: +1 -1 lines
FILE REMOVED
Version bump. Removed old

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

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

  ViewVC Help
Powered by ViewVC 1.1.20