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

Contents of /www-client/seamonkey/seamonkey-2.9.1-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Tue May 29 08:16:03 2012 UTC (2 years, 7 months ago) by polynomial-c
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +1 -1 lines
FILE REMOVED
Incorporate gcc-4.7 fixes and a better patch for system-cairo support

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

  ViewVC Help
Powered by ViewVC 1.1.20