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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Wed Jun 16 18:00:43 2010 UTC (4 years, 2 months ago) by polynomial-c
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Added fix against crash with x11-libs/cairo-1.8.10
(Portage version: 2.2_rc67/cvs/Linux x86_64)

1 # Copyright 1999-2010 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.0.4.ebuild,v 1.1 2010/04/02 20:06:09 polynomial-c Exp $
4
5 EAPI="2"
6 WANT_AUTOCONF="2.1"
7
8 inherit flag-o-matic toolchain-funcs eutils mozconfig-3 makeedit multilib fdo-mime autotools mozextension java-pkg-opt-2
9
10 PATCH="${PN}-2.0.3-patches-0.1"
11 EMVER="1.0.1"
12
13 LANGS="be ca cs de en-US es-AR es-ES fr gl hu it ja ka lt nb-NO nl pl pt-PT ru sk sv-SE tr"
14 NOSHORTLANGS="es-AR es-ES nb-NO pt-PT sv-SE"
15
16 MY_PV="${PV/_rc/rc}"
17 MY_P="${PN}-${MY_PV}"
18
19 DESCRIPTION="Seamonkey Web Browser"
20 HOMEPAGE="http://www.seamonkey-project.org"
21
22 KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
23 SLOT="0"
24 LICENSE="|| ( MPL-1.1 GPL-2 LGPL-2.1 )"
25 IUSE="+alsa +chatzilla +composer +crypt java ldap +mailclient +roaming system-sqlite"
26
27 REL_URI="http://releases.mozilla.org/pub/mozilla.org/${PN}/releases"
28 SRC_URI="${REL_URI}/${MY_PV}/source/${MY_P}.source.tar.bz2
29 http://dev.gentoo.org/~polynomial-c/${PATCH}.tar.bz2
30 crypt? ( mailclient? ( http://www.mozilla-enigmail.org/download/source/enigmail-${EMVER}.tar.gz ) )"
31
32 for X in ${LANGS} ; do
33 if [ "${X}" != "en" ] && [ "${X}" != "en-US" ]; then
34 SRC_URI="${SRC_URI}
35 linguas_${X/-/_}? ( ${REL_URI}/${MY_PV}/langpack/${MY_P}.${X}.langpack.xpi -> ${MY_P}-${X}.xpi )"
36 fi
37 IUSE="${IUSE} linguas_${X/-/_}"
38 # english is handled internally
39 if [ "${#X}" == 5 ] && ! has ${X} ${NOSHORTLANGS}; then
40 if [ "${X}" != "en-US" ]; then
41 SRC_URI="${SRC_URI}
42 linguas_${X%%-*}? ( ${REL_URI}/${MY_PV}/langpack/${MY_P}.${X}.langpack.xpi -> ${MY_P}-${X}.xpi )"
43 fi
44 IUSE="${IUSE} linguas_${X%%-*}"
45 fi
46 done
47
48 RDEPEND="java? ( virtual/jre )
49 >=sys-devel/binutils-2.16.1
50 >=dev-libs/nss-3.12.2
51 >=dev-libs/nspr-4.8
52 alsa? ( media-libs/alsa-lib )
53 system-sqlite? ( >=dev-db/sqlite-3.6.22-r2[fts3,secure-delete] )
54 >=app-text/hunspell-1.2
55 >=x11-libs/gtk+-2.10.0
56 >=x11-libs/cairo-1.8.8[X]
57 >=x11-libs/pango-1.14.0[X]
58 crypt? ( mailclient? ( >=app-crypt/gnupg-1.4 ) )"
59
60 DEPEND="${RDEPEND}
61 dev-util/pkgconfig
62 java? ( >=virtual/jdk-1.4 )"
63
64 S="${WORKDIR}/comm-1.9.1"
65
66 linguas() {
67 local LANG SLANG
68 for LANG in ${LINGUAS}; do
69 if has ${LANG} en en_US; then
70 has en ${linguas} || linguas="${linguas:+"${linguas} "}en"
71 continue
72 elif has ${LANG} ${LANGS//-/_}; then
73 has ${LANG//_/-} ${linguas} || linguas="${linguas:+"${linguas} "}${LANG//_/-}"
74 continue
75 elif [[ " ${LANGS} " == *" ${LANG}-"* ]]; then
76 for X in ${LANGS}; do
77 if [[ "${X}" == "${LANG}-"* ]] && \
78 [[ " ${NOSHORTLANGS} " != *" ${X} "* ]]; then
79 has ${X} ${linguas} || linguas="${linguas:+"${linguas} "}${X}"
80 continue 2
81 fi
82 done
83 fi
84 ewarn "Sorry, but ${PN} does not support the ${LANG} LINGUA"
85 done
86 }
87
88 src_unpack() {
89 unpack ${A}
90
91 linguas
92 for X in ${linguas}; do
93 # FIXME: Add support for unpacking xpis to portage
94 [[ ${X} != "en" ]] && xpi_unpack "${MY_P}-${X}.xpi"
95 done
96 if [[ ${linguas} != "" && ${linguas} != "en" ]]; then
97 einfo "Selected language packs (first will be default): ${linguas}"
98 fi
99 }
100
101 pkg_setup() {
102 export BUILD_OFFICIAL=1
103 export MOZILLA_OFFICIAL=1
104
105 java-pkg-opt-2_pkg_setup
106 }
107
108 src_prepare() {
109 java-pkg-opt-2_src_prepare
110
111 # Apply our patches
112 EPATCH_SUFFIX="patch" \
113 EPATCH_FORCE="yes" \
114 epatch "${WORKDIR}"
115
116 if use crypt && use mailclient ; then
117 mv "${WORKDIR}"/enigmail "${S}"/mailnews/extensions/enigmail
118 cd "${S}"/mailnews/extensions/enigmail || die
119 epatch "${FILESDIR}"/enigmail/70_enigmail-fix.patch
120 makemake2
121 cd "${S}"
122 fi
123
124 eautoreconf
125 }
126
127 src_configure() {
128 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
129 MEXTENSIONS=""
130
131 ####################################
132 #
133 # mozconfig, CFLAGS and CXXFLAGS setup
134 #
135 ####################################
136
137 mozconfig_init
138 mozconfig_config
139
140 # It doesn't compile on alpha without this LDFLAGS
141 use alpha && append-ldflags "-Wl,--no-relax"
142
143 if ! use chatzilla ; then
144 MEXTENSIONS="${MEXTENSIONS},-irc"
145 fi
146 if ! use roaming ; then
147 MEXTENSIONS="${MEXTENSIONS},-sroaming"
148 fi
149
150 if ! use gnome ; then
151 MEXTENSIONS="${MEXTENSIONS},-gnomevfs"
152 fi
153
154 if ! use composer ; then
155 if ! use chatzilla && ! use mailclient ; then
156 mozconfig_annotate '-composer' --disable-composer
157 fi
158 fi
159
160 mozconfig_annotate '' --enable-extensions="${MEXTENSIONS}"
161 mozconfig_annotate '' --enable-application=suite
162 mozconfig_annotate 'broken' --disable-mochitest
163 mozconfig_annotate 'broken' --disable-crashreporter
164 mozconfig_annotate '' --enable-system-hunspell
165 mozconfig_annotate '' --enable-jsd
166 mozconfig_annotate '' --enable-image-encoder=all
167 mozconfig_annotate '' --enable-canvas
168 mozconfig_annotate '' --with-system-nspr
169 mozconfig_annotate '' --with-system-nss
170 mozconfig_annotate '' --enable-system-lcms
171 mozconfig_annotate '' --with-system-bz2
172 mozconfig_annotate '' --enable-oji --enable-mathml
173 mozconfig_annotate 'places' --enable-storage --enable-places --enable-places_bookmarks
174 mozconfig_annotate '' --disable-installer
175 mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME}
176
177 # Enable/Disable based on USE flags
178 mozconfig_use_enable alsa ogg
179 mozconfig_use_enable alsa wave
180 mozconfig_use_enable java javaxpcom
181 mozconfig_use_enable ldap
182 mozconfig_use_enable ldap ldap-experimental
183 mozconfig_use_enable mailclient mailnews
184 mozconfig_use_enable system-sqlite
185
186 # Finalize and report settings
187 mozconfig_final
188
189 if [[ $(gcc-major-version) -lt 4 ]]; then
190 append-cxxflags -fno-stack-protector
191 fi
192
193 ####################################
194 #
195 # Configure and build
196 #
197 ####################################
198
199 # Work around breakage in makeopts with --no-print-directory
200 MAKEOPTS="${MAKEOPTS/--no-print-directory/}"
201
202 CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" econf
203 }
204
205 src_compile() {
206 # Should the build use multiprocessing? Not enabled by default, as it tends to break.
207 [ "${WANT_MP}" = "true" ] && jobs=${MAKEOPTS} || jobs="-j1"
208 emake ${jobs} || die
209
210 # Only build enigmail extension if conditions are met.
211 if use crypt && use mailclient ; then
212 emake -C "${S}"/mailnews/extensions/enigmail || die "make enigmail failed"
213 emake -j1 -C "${S}"/mailnews/extensions/enigmail xpi || die "make enigmail xpi failed"
214 fi
215 }
216
217 src_install() {
218 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
219 declare emid
220
221 emake DESTDIR="${D}" install || die "emake install failed"
222
223 if use crypt && use mailclient ; then
224 cd "${T}"
225 unzip "${S}"/mozilla/dist/bin/enigmail*.xpi install.rdf
226 emid=$(sed -n '/<em:id>/!d; s/.*\({.*}\).*/\1/; p; q' install.rdf)
227
228 dodir ${MOZILLA_FIVE_HOME}/extensions/${emid}
229 cd "${D}"${MOZILLA_FIVE_HOME}/extensions/${emid}
230 unzip "${S}"/mozilla/dist/bin/enigmail*.xpi
231 fi
232
233 linguas
234 for X in ${linguas}; do
235 [[ ${X} != "en" ]] && xpi_install "${WORKDIR}"/"${MY_P}-${X}"
236 done
237
238 # Install icon and .desktop for menu entry
239 newicon "${S}"/suite/branding/content/icon64.png seamonkey.png
240 domenu "${FILESDIR}"/icon/seamonkey.desktop
241
242 # Add StartupNotify=true bug 290401
243 if use startup-notification ; then
244 echo "StartupNotify=true" >> "${D}"/usr/share/applications/seamonkey.desktop
245 fi
246
247 # Add our default prefs
248 sed "s|SEAMONKEY_PVR|${PVR}|" "${FILESDIR}"/all-gentoo.js \
249 > "${D}"${MOZILLA_FIVE_HOME}/defaults/pref/all-gentoo.js
250
251 # Plugins dir
252 rm -rf "${D}"${MOZILLA_FIVE_HOME}/plugins || die "failed to remove existing plugins dir"
253 dosym ../nsbrowser/plugins "${MOZILLA_FIVE_HOME}"/plugins
254
255 # shiny new man page
256 doman "${S}"/suite/app/${PN}.1
257 }
258
259 pkg_preinst() {
260 declare MOZILLA_FIVE_HOME="${ROOT}/usr/$(get_libdir)/${PN}"
261
262 if [ -d ${MOZILLA_FIVE_HOME}/plugins ] ; then
263 rm ${MOZILLA_FIVE_HOME}/plugins -rf
264 fi
265 }
266
267 pkg_postinst() {
268 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
269
270 # Update mimedb for the new .desktop file
271 fdo-mime_desktop_database_update
272
273 if use chatzilla ; then
274 elog "chatzilla is now an extension which can be en-/disabled and configured via"
275 elog "the Add-on manager."
276 fi
277 }

  ViewVC Help
Powered by ViewVC 1.1.20