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

Contents of /www-client/seamonkey/seamonkey-2.18_beta4.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Thu May 30 09:06:07 2013 UTC (18 months, 4 weeks ago) by polynomial-c
Branch: MAIN
Version bump to latest beta as upstream skipped release of 2.18 version

(Portage version: 2.2.0_alpha177/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.17.1.ebuild,v 1.2 2013/04/16 05:59:17 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="${P}"
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-21.0-patches-0.1"
32 PATCH="${PN}-2.14-patches-01"
33 EMVER="1.5.1"
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 +jit +roaming system-cairo system-jpeg 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.14.3
63 >=dev-libs/nspr-4.9.6
64 >=dev-libs/glib-2.26:2
65 >=media-libs/mesa-7.10
66 >=media-libs/libpng-1.5.13[apng]
67 >=media-libs/libvpx-1.0.0
68 >=x11-libs/pango-1.14.0
69 >=x11-libs/gtk+-2.14:2
70 virtual/libffi
71 gstreamer? (
72 >=media-libs/gstreamer-0.10.33:0.10
73 >=media-libs/gst-plugins-base-0.10.33:0.10
74 )
75 system-cairo? ( >=x11-libs/cairo-1.10 )
76 system-jpeg? ( >=media-libs/libjpeg-turbo-1.2.1 )
77 system-sqlite? ( || (
78 >=dev-db/sqlite-3.7.16:3[secure-delete,debug=]
79 ~dev-db/sqlite-3.7.15.2[fts3,secure-delete,threadsafe,unlock-notify,debug=]
80 ) )
81 crypt? ( >=app-crypt/gnupg-1.4 )
82 kernel_linux? ( media-libs/alsa-lib )
83 selinux? ( sec-policy/selinux-mozilla )"
84
85 DEPEND="${RDEPEND}
86 !elibc_glibc? ( dev-libs/libexecinfo )
87 virtual/pkgconfig
88 amd64? ( ${ASM_DEPEND}
89 virtual/opengl )
90 x86? ( ${ASM_DEPEND}
91 virtual/opengl )"
92
93 if [[ ${PV} == *beta* ]] ; then
94 S="${WORKDIR}/comm-beta"
95 else
96 S="${WORKDIR}/comm-release"
97 fi
98
99 src_unpack() {
100 unpack ${A}
101
102 # Unpack language packs
103 mozlinguas_src_unpack
104 }
105
106 pkg_setup() {
107 if [[ ${PV} == *_pre* ]] ; then
108 ewarn "You're using an unofficial release of ${PN}. Don't file any bug in"
109 ewarn "Gentoo's Bugtracker against this package in case it breaks for you."
110 ewarn "Those belong to upstream: https://bugzilla.mozilla.org"
111 fi
112
113 moz_pkgsetup
114
115 # Ensure we have enough disk space to compile
116 if use debug || use test ; then
117 CHECKREQS_DISK_BUILD="8G"
118 else
119 CHECKREQS_DISK_BUILD="4G"
120 fi
121 check-reqs_pkg_setup
122 }
123
124 src_prepare() {
125 # Apply our patches
126 EPATCH_SUFFIX="patch" \
127 EPATCH_FORCE="yes" \
128 epatch "${WORKDIR}/seamonkey"
129
130 # browser patches go here
131 pushd "${S}"/mozilla &>/dev/null || die
132 EPATCH_EXCLUDE="2000-firefox_gentoo_install_dirs.patch
133 $(use system-cairo || echo "6009_fix_system_cairo_support.patch")" \
134 EPATCH_SUFFIX="patch" \
135 EPATCH_FORCE="yes" \
136 epatch "${WORKDIR}/firefox"
137 popd &>/dev/null || die
138
139 # Shell scripts sometimes contain DOS line endings; bug 391889
140 grep -rlZ --include="*.sh" $'\r$' . |
141 while read -r -d $'\0' file ; do
142 einfo edos2unix "${file}"
143 edos2unix "${file}" || die
144 done
145
146 # Allow user to apply any additional patches without modifing ebuild
147 epatch_user
148
149 if use crypt ; then
150 mv "${WORKDIR}"/enigmail "${S}"/mailnews/extensions/enigmail
151 #cd "${S}"/mailnews/extensions/enigmail || die
152 #cd "${S}"
153 fi
154
155 local ms="${S}/mozilla"
156
157 # Enable gnomebreakpad
158 if use debug ; then
159 sed -i -e "s:GNOME_DISABLE_CRASH_DIALOG=1:GNOME_DISABLE_CRASH_DIALOG=0:g" \
160 "${ms}"/build/unix/run-mozilla.sh || die "sed failed!"
161 fi
162
163 # Disable gnomevfs extension
164 sed -i -e "s:gnomevfs::" "${S}"/suite/confvars.sh \
165 -e "s:gnomevfs::" "${ms}"/browser/confvars.sh \
166 -e "s:gnomevfs::" "${ms}"/xulrunner/confvars.sh \
167 || die "Failed to remove gnomevfs extension"
168
169 # Ensure that are plugins dir is enabled as default
170 sed -i -e "s:/usr/lib/mozilla/plugins:/usr/$(get_libdir)/nsbrowser/plugins:" \
171 "${ms}"/xpcom/io/nsAppFileLocationProvider.cpp || die "sed failed to replace plugin path!"
172
173 # Don't exit with error when some libs are missing which we have in
174 # system.
175 sed '/^MOZ_PKG_FATAL_WARNINGS/s@= 1@= 0@' \
176 -i "${S}"/suite/installer/Makefile.in || die
177 # Don't error out when there's no files to be removed:
178 sed 's@\(xargs rm\)$@\1 -f@' \
179 -i "${ms}"/toolkit/mozapps/installer/packager.mk || die
180
181 eautoreconf
182 cd "${S}"/mozilla
183 eautoconf
184 }
185
186 src_configure() {
187 MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
188 MEXTENSIONS="default"
189
190 ####################################
191 #
192 # mozconfig, CFLAGS and CXXFLAGS setup
193 #
194 ####################################
195
196 mozconfig_init
197 mozconfig_config
198
199 # It doesn't compile on alpha without this LDFLAGS
200 use alpha && append-ldflags "-Wl,--no-relax"
201
202 if use chatzilla ; then
203 MEXTENSIONS+=",irc"
204 else
205 MEXTENSIONS+=",-irc"
206 fi
207 if ! use roaming ; then
208 MEXTENSIONS+=",-sroaming"
209 fi
210
211 # We must force enable jemalloc 3 threw .mozconfig
212 echo "export MOZ_JEMALLOC=1" >> ${S}/.mozconfig
213
214 mozconfig_annotate '' --prefix="${EPREFIX}"/usr
215 mozconfig_annotate '' --libdir="${EPREFIX}"/usr/$(get_libdir)
216 mozconfig_annotate '' --enable-extensions="${MEXTENSIONS}"
217 mozconfig_annotate '' --disable-gconf
218 mozconfig_annotate '' --enable-jsd
219 mozconfig_annotate '' --enable-canvas
220 mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME}
221 mozconfig_annotate '' --enable-system-ffi
222 mozconfig_annotate '' --with-system-png
223 mozconfig_annotate '' --target="${CTARGET:-${CHOST}}"
224 mozconfig_annotate '' --enable-safe-browsing
225 mozconfig_annotate '' --build="${CTARGET:-${CHOST}}"
226 mozconfig_annotate '' --enable-jemalloc
227 mozconfig_annotate '' --enable-replace-malloc
228
229 mozconfig_use_enable gstreamer
230 mozconfig_use_enable system-sqlite
231 mozconfig_use_with system-jpeg
232 # Feature is know to cause problems on hardened
233 mozconfig_use_enable jit methodjit
234 mozconfig_use_enable jit tracejit
235 mozconfig_use_enable jit ion
236 mozconfig_use_enable system-cairo
237
238 # Use an objdir to keep things organized.
239 echo "mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/seamonk" \
240 >> "${S}"/.mozconfig
241
242 # Finalize and report settings
243 mozconfig_final
244
245 # Work around breakage in makeopts with --no-print-directory
246 MAKEOPTS="${MAKEOPTS/--no-print-directory/}"
247
248 if [[ $(gcc-major-version) -lt 4 ]] ; then
249 append-cxxflags -fno-stack-protector
250 elif [[ $(gcc-major-version) -gt 4 || $(gcc-minor-version) -gt 3 ]] ; then
251 if use amd64 || use x86 ; then
252 append-flags -mno-avx
253 fi
254 fi
255 }
256
257 src_compile() {
258 CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \
259 MOZ_MAKE_FLAGS="${MAKEOPTS}" SHELL="${SHELL}" \
260 emake -f client.mk || die
261
262 # Only build enigmail extension if conditions are met.
263 if use crypt ; then
264 cd "${S}"/mailnews/extensions/enigmail || die
265 ./makemake -r 2&> /dev/null
266 cd "${S}"/seamonk/mailnews/extensions/enigmail
267 emake || die "make enigmail failed"
268 emake xpi || die "make enigmail xpi failed"
269 fi
270 }
271
272 src_install() {
273 MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
274 DICTPATH="\"${EPREFIX}/usr/share/myspell\""
275
276 local emid obj_dir="seamonk"
277 cd "${S}/${obj_dir}"
278
279 # Copy our preference before omnijar is created.
280 sed "s|SEAMONKEY_PVR|${PVR}|" "${FILESDIR}"/all-gentoo-1.js > \
281 "${S}/${obj_dir}/mozilla/dist/bin/defaults/pref/all-gentoo.js" \
282 || die
283
284 echo 'pref("extensions.autoDisableScopes", 3);' >> \
285 "${S}/${obj_dir}/mozilla/dist/bin/defaults/pref/all-gentoo.js" \
286 || die
287
288 # Set default path to search for dictionaries.
289 echo "pref(\"spellchecker.dictionary_path\", ${DICTPATH});" \
290 >> "${S}/${obj_dir}/mozilla/dist/bin/defaults/pref/all-gentoo.js" \
291 || die
292
293 # Pax mark xpcshell for hardened support, only used for startupcache creation.
294 pax-mark m "${S}/${obj_dir}/mozilla/dist/bin/xpcshell"
295
296 MOZ_MAKE_FLAGS="${MAKEOPTS}" \
297 emake DESTDIR="${D}" install || die "emake install failed"
298 cp -f "${FILESDIR}"/icon/${PN}.desktop "${T}" || die
299
300 if use crypt ; then
301 cd "${T}" || die
302 unzip "${S}"/${obj_dir}/mozilla/dist/bin/enigmail*.xpi install.rdf || die
303 emid=$(sed -n '/<em:id>/!d; s/.*\({.*}\).*/\1/; p; q' install.rdf)
304
305 dodir ${MOZILLA_FIVE_HOME}/extensions/${emid} || die
306 cd "${D}"${MOZILLA_FIVE_HOME}/extensions/${emid} || die
307 unzip "${S}"/${obj_dir}/mozilla/dist/bin/enigmail*.xpi || die
308
309 cd "${S}" || die
310 fi
311
312 sed 's|^\(MimeType=.*\)$|\1text/x-vcard;text/directory;application/mbox;message/rfc822;x-scheme-handler/mailto;|' \
313 -i "${T}"/${PN}.desktop || die
314 sed 's|^\(Categories=.*\)$|\1Email;|' -i "${T}"/${PN}.desktop \
315 || die
316
317 # Install language packs
318 mozlinguas_src_install
319
320 # Add StartupNotify=true bug 290401
321 if use startup-notification ; then
322 echo "StartupNotify=true" >> "${T}"/${PN}.desktop
323 fi
324
325 # Install icon and .desktop for menu entry
326 newicon "${S}"/suite/branding/nightly/content/icon64.png ${PN}.png \
327 || die
328 domenu "${T}"/${PN}.desktop || die
329
330 # Required in order to use plugins and even run firefox on hardened.
331 pax-mark m "${ED}"${MOZILLA_FIVE_HOME}/{seamonkey,seamonkey-bin,plugin-container}
332
333 # Handle plugins dir through nsplugins.eclass
334 share_plugins_dir
335
336 doman "${S}"/${obj_dir}/suite/app/${PN}.1 || die
337 }
338
339 pkg_preinst() {
340 MOZILLA_FIVE_HOME="${ROOT}/usr/$(get_libdir)/${PN}"
341
342 if [ -d ${MOZILLA_FIVE_HOME}/plugins ] ; then
343 rm ${MOZILLA_FIVE_HOME}/plugins -rf
344 fi
345 }
346
347 pkg_postinst() {
348 MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
349
350 # Update mimedb for the new .desktop file
351 fdo-mime_desktop_database_update
352
353 if use chatzilla ; then
354 elog "chatzilla is now an extension which can be en-/disabled and configured via"
355 elog "the Add-on manager."
356 fi
357 }

  ViewVC Help
Powered by ViewVC 1.1.20