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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (show annotations) (download)
Fri Apr 11 06:44:04 2014 UTC (9 months, 3 weeks ago) by polynomial-c
Branch: MAIN
CVS Tags: HEAD
Changes since 1.5: +1 -1 lines
FILE REMOVED
Use official firefox patchset from Anarchy. Removed old

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

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

  ViewVC Help
Powered by ViewVC 1.1.20