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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Wed Mar 14 09:17:45 2012 UTC (2 years, 6 months ago) by polynomial-c
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +1 -1 lines
FILE REMOVED
Version bump. Removed old. Dropped keywords from vulnerable versions where possible

(Portage version: 2.2.0_alpha90/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.6.1.ebuild,v 1.4 2012/01/12 15:30:12 phajdan.jr Exp $
4
5 EAPI="3"
6 WANT_AUTOCONF="2.1"
7
8 inherit flag-o-matic toolchain-funcs eutils mozconfig-3 multilib pax-utils fdo-mime autotools mozextension versionator python nsplugins
9
10 PATCH="${PN}-2.6.1-patches-01"
11 EMVER="1.3.4"
12
13 MY_PV="${PV/_pre*}"
14 MY_PV="${MY_PV/_alpha/a}"
15 MY_PV="${MY_PV/_beta/b}"
16 MY_PV="${MY_PV/_rc/rc}"
17 MY_P="${PN}-${MY_PV}"
18
19 LANGPACK_PREFIX="${MY_P}."
20 LANGPACK_SUFFIX=".langpack"
21 if [[ ${PV} == *_pre* ]] ; then
22 # pre-releases. No need for arch teams to change KEYWORDS here.
23
24 REL_URI="ftp://ftp.mozilla.org/pub/mozilla.org/${PN}/nightly/${MY_PV}-candidates/build${PV##*_pre}"
25 LANG_URI="${REL_URI}/linux-i686/xpi"
26 LANGPACK_PREFIX=""
27 LANGPACK_SUFFIX=""
28 KEYWORDS=""
29 else
30 # This is where arch teams should change the KEYWORDS.
31
32 #REL_URI="http://releases.mozilla.org/pub/mozilla.org/${PN}/releases/${MY_PV}"
33 REL_URI="ftp://ftp.mozilla.org/pub/${PN}/releases/${MY_PV}"
34 LANG_URI="${REL_URI}/langpack"
35 KEYWORDS="~alpha amd64 ~arm ~ppc x86"
36 fi
37
38 DESCRIPTION="Seamonkey Web Browser"
39 HOMEPAGE="http://www.seamonkey-project.org"
40
41 SLOT="0"
42 LICENSE="|| ( MPL-1.1 GPL-2 LGPL-2.1 )"
43 IUSE="+alsa +chatzilla +crypt +ipc +methodjit +roaming system-sqlite +webm"
44
45 SRC_URI="${REL_URI}/source/${MY_P}.source.tar.bz2 -> ${P}.source.tar.bz2
46 http://dev.gentoo.org/~polynomial-c/mozilla/patchsets/${PATCH}.tar.xz
47 crypt? ( http://www.mozilla-enigmail.org/download/source/enigmail-${EMVER}.tar.gz )"
48
49 LANGS=(be ca cs de en en-GB en-US es-AR es-ES fi fr gl hu it ja lt
50 nb-NO nl pl pt-PT ru sk sv-SE tr zh-CN)
51
52 for X in "${LANGS[@]}" ; do
53 # en is handled internally
54 if [[ ${X} != en ]] ; then
55 SRC_URI+="
56 linguas_${X/-/_}? ( ${LANG_URI}/${LANGPACK_PREFIX}${X}${LANGPACK_SUFFIX}.xpi -> ${P}-${X}.xpi )"
57 fi
58 IUSE+=" linguas_${X/-/_}"
59 # Install all the specific locale xpis if there's no generic locale xpi
60 # Example: there's no pt.xpi, so install all pt-*.xpi
61 if ! has ${X%%-*} "${LANGS[@]}"; then
62 SRC_URI+="
63 linguas_${X%%-*}? ( ${LANG_URI}/${LANGPACK_PREFIX}${X}${LANGPACK_SUFFIX}.xpi -> ${P}-${X}.xpi )"
64 IUSE+=" linguas_${X%%-*}"
65 fi
66 done
67
68 ASM_DEPEND=">=dev-lang/yasm-1.1"
69
70 # Mesa 7.10 needed for WebGL + bugfixes
71 RDEPEND=">=sys-devel/binutils-2.16.1
72 >=dev-libs/nss-3.13.1
73 >=dev-libs/nspr-4.8.8
74 >=dev-libs/glib-2.26
75 >=media-libs/mesa-7.10
76 >=media-libs/libpng-1.4.1[apng]
77 >=x11-libs/cairo-1.10
78 >=x11-libs/pango-1.14.0
79 >=x11-libs/gtk+-2.14
80 virtual/libffi
81 system-sqlite? ( >=dev-db/sqlite-3.7.7.1[fts3,secure-delete,unlock-notify,debug=] )
82 crypt? ( >=app-crypt/gnupg-1.4 )
83 webm? ( media-libs/libvpx
84 media-libs/alsa-lib )"
85
86 DEPEND="${RDEPEND}
87 dev-util/pkgconfig
88 webm? ( amd64? ( ${ASM_DEPEND} )
89 x86? ( ${ASM_DEPEND} ) )"
90
91 if [[ ${PV} == *beta* ]] ; then
92 S="${WORKDIR}/comm-beta"
93 else
94 S="${WORKDIR}/comm-release"
95 fi
96
97 # TODO: Move all the linguas crap to an eclass
98 linguas() {
99 # Generate the list of language packs called "linguas"
100 # This list is used to install the xpi language packs
101 local LINGUA
102 for LINGUA in ${LINGUAS}; do
103 if has ${LINGUA} en ; then
104 # For mozilla products, en and en_US are handled internally
105 continue
106 # If this language is supported by ${P},
107 elif has ${LINGUA} "${LANGS[@]//-/_}"; then
108 # Add the language to linguas, if it isn't already there
109 has ${LINGUA//_/-} "${linguas[@]}" || linguas+=(${LINGUA//_/-})
110 continue
111 # For each short LINGUA that isn't in LANGS,
112 # add *all* long LANGS to the linguas list
113 elif ! has ${LINGUA%%-*} "${LANGS[@]}"; then
114 for LANG in "${LANGS[@]}"; do
115 if [[ ${LANG} == ${LINGUA}-* ]]; then
116 has ${LANG} "${linguas[@]}" || linguas+=(${LANG})
117 continue 2
118 fi
119 done
120 fi
121 ewarn "Sorry, but ${P} does not support the ${LINGUA} locale"
122 done
123 }
124
125 src_unpack() {
126 unpack ${A}
127
128 linguas
129 for X in "${linguas[@]}"; do
130 # FIXME: Add support for unpacking xpis to portage
131 xpi_unpack "${P}-${X}.xpi"
132 done
133 }
134
135 pkg_setup() {
136 if [[ ${PV} == *_pre* ]] ; then
137 ewarn "You're using an unofficial release of ${PN}. Don't file any bug in"
138 ewarn "Gentoo's Bugtracker against this package in case it breaks for you."
139 ewarn "Those belong to upstream: https://bugzilla.mozilla.org"
140 fi
141
142 moz_pkgsetup
143
144 if ! use methodjit ; then
145 einfo
146 ewarn "You are disabling the method-based JIT in J├ĄgerMonkey."
147 ewarn "This will greatly slowdown JavaScript in ${PN}!"
148 fi
149 }
150
151 src_prepare() {
152 # Apply our patches
153 EPATCH_SUFFIX="patch" \
154 EPATCH_FORCE="yes" \
155 epatch "${WORKDIR}/_seamonkey"
156
157 # browser patches go here
158 pushd "${S}"/mozilla &>/dev/null || die
159 EPATCH_SUFFIX="patch" \
160 EPATCH_FORCE="yes" \
161 epatch "${WORKDIR}/_mozilla"
162 popd &>/dev/null || die
163
164 # mailnews patches go here
165 pushd "${S}"/mailnews &>/dev/null || die
166 EPATCH_SUFFIX="patch" \
167 EPATCH_FORCE="yes" \
168 epatch "${WORKDIR}/_mailnews"
169 popd &>/dev/null || die
170
171 # Allow user to apply any additional patches without modifing ebuild
172 epatch_user
173
174 if use crypt ; then
175 mv "${WORKDIR}"/enigmail "${S}"/mailnews/extensions/enigmail
176 epatch "${FILESDIR}"/enigmail/enigmail-1.3.3-bug373733.patch
177 cd "${S}"/mailnews/extensions/enigmail || die
178 ./makemake -r 2&>/dev/null
179 sed -e 's:@srcdir@:${S}/mailnews/extensions/enigmail:' \
180 -i Makefile.in || die
181 cd "${S}"
182 fi
183
184 #Ensure we disable javaxpcom by default to prevent configure breakage
185 sed -i -e s:MOZ_JAVAXPCOM\=1::g "${S}"/mozilla/xulrunner/confvars.sh \
186 || die "sed javaxpcom"
187
188 # Disable gnomevfs extension
189 sed -i -e "s:gnomevfs::" "${S}/"suite/confvars.sh \
190 || die "Failed to remove gnomevfs extension"
191
192 eautoreconf
193 }
194
195 src_configure() {
196 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
197 MEXTENSIONS=""
198
199 ####################################
200 #
201 # mozconfig, CFLAGS and CXXFLAGS setup
202 #
203 ####################################
204
205 mozconfig_init
206 mozconfig_config
207
208 # It doesn't compile on alpha without this LDFLAGS
209 use alpha && append-ldflags "-Wl,--no-relax"
210
211 if ! use chatzilla ; then
212 MEXTENSIONS+=",-irc"
213 fi
214 if ! use roaming ; then
215 MEXTENSIONS+=",-sroaming"
216 fi
217
218 mozconfig_annotate '' --enable-extensions="${MEXTENSIONS}"
219 mozconfig_annotate '' --disable-gconf
220 mozconfig_annotate '' --enable-jsd
221 mozconfig_annotate '' --enable-canvas
222 mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME}
223 mozconfig_annotate '' --enable-system-ffi
224
225 mozconfig_annotate '' --target="${CTARGET:-${CHOST}}"
226
227 mozconfig_use_enable system-sqlite
228 mozconfig_use_enable methodjit
229
230 if use crypt ; then
231 mozconfig_annotate "mail crypt" --enable-chrome-format=jar
232 fi
233
234 mozconfig_annotate '' --with-system-png
235
236 # Finalize and report settings
237 mozconfig_final
238
239 if [[ $(gcc-major-version) -lt 4 ]]; then
240 append-cxxflags -fno-stack-protector
241 elif [[ $(gcc-major-version) -gt 4 || $(gcc-minor-version) -gt 3 ]]; then
242 if use amd64 || use x86; then
243 append-flags -mno-avx
244 fi
245 fi
246
247 ####################################
248 #
249 # Configure and build
250 #
251 ####################################
252
253 # Work around breakage in makeopts with --no-print-directory
254 MAKEOPTS="${MAKEOPTS/--no-print-directory/}"
255
256 CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" PYTHON="$(PYTHON)" econf
257 }
258
259 src_compile() {
260 emake || die
261
262 # Only build enigmail extension if conditions are met.
263 if use crypt ; then
264 emake -C "${S}"/mailnews/extensions/enigmail || die "make enigmail failed"
265 emake -j1 -C "${S}"/mailnews/extensions/enigmail xpi || die "make enigmail xpi failed"
266 fi
267 }
268
269 src_install() {
270 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
271 declare emid
272
273 emake DESTDIR="${D}" install || die "emake install failed"
274 cp -f "${FILESDIR}"/icon/${PN}.desktop "${T}" || die
275
276 if use crypt ; then
277 cd "${T}" || die
278 unzip "${S}"/mozilla/dist/bin/enigmail*.xpi install.rdf || die
279 emid=$(sed -n '/<em:id>/!d; s/.*\({.*}\).*/\1/; p; q' install.rdf)
280
281 dodir ${MOZILLA_FIVE_HOME}/extensions/${emid} || die
282 cd "${D}"${MOZILLA_FIVE_HOME}/extensions/${emid} || die
283 unzip "${S}"/mozilla/dist/bin/enigmail*.xpi || die
284 fi
285
286 sed 's|^\(MimeType=.*\)$|\1text/x-vcard;text/directory;application/mbox;message/rfc822;x-scheme-handler/mailto;|' \
287 -i "${T}"/${PN}.desktop || die
288 sed 's|^\(Categories=.*\)$|\1Email;|' -i "${T}"/${PN}.desktop \
289 || die
290
291 linguas
292 for X in ${linguas}; do
293 [[ ${X} != "en" ]] && xpi_install "${WORKDIR}"/"${P}-${X}"
294 done
295
296 # Add StartupNotify=true bug 290401
297 if use startup-notification ; then
298 echo "StartupNotify=true" >> "${T}"/${PN}.desktop
299 fi
300
301 # Install icon and .desktop for menu entry
302 newicon "${S}"/suite/branding/nightly/content/icon64.png ${PN}.png \
303 || die
304 domenu "${T}"/${PN}.desktop || die
305
306 # Add our default prefs
307 sed "s|SEAMONKEY_PVR|${PVR}|" "${FILESDIR}"/all-gentoo.js \
308 > "${D}"${MOZILLA_FIVE_HOME}/defaults/pref/all-gentoo.js \
309 || die
310
311 # Handle plugins dir through nsplugins.eclass
312 share_plugins_dir
313
314 doman "${S}"/suite/app/${PN}.1 || die
315 }
316
317 pkg_preinst() {
318 declare MOZILLA_FIVE_HOME="${ROOT}/usr/$(get_libdir)/${PN}"
319
320 if [ -d ${MOZILLA_FIVE_HOME}/plugins ] ; then
321 rm ${MOZILLA_FIVE_HOME}/plugins -rf
322 fi
323 }
324
325 pkg_postinst() {
326 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
327
328 # Update mimedb for the new .desktop file
329 fdo-mime_desktop_database_update
330
331 if use chatzilla ; then
332 elog "chatzilla is now an extension which can be en-/disabled and configured via"
333 elog "the Add-on manager."
334 fi
335 }

  ViewVC Help
Powered by ViewVC 1.1.20