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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Wed Jun 25 14:08:51 2014 UTC (7 months ago) by axs
Branch: MAIN
Changes since 1.3: +2 -2 lines
version bump, security bug 512896; excluded the libexecinfo dependency on uclibc profiles per blueness' advice

(Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key 2B6559ED)

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

  ViewVC Help
Powered by ViewVC 1.1.20