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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.14 - (show annotations) (download)
Thu Aug 12 07:18:33 2010 UTC (3 years, 11 months ago) by polynomial-c
Branch: MAIN
CVS Tags: HEAD
Changes since 1.13: +1 -1 lines
FILE REMOVED
Removed old
(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.5.ebuild,v 1.13 2010/08/07 04:14:29 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.5-patches-03"
11 EMVER="1.0.1"
12
13 LANGS="be ca cs de en-GB en-US es-AR es-ES fr gl hu it ja ka lt nb-NO nl pl pt-PT ru sk sv-SE tr zh-CN"
14 NOSHORTLANGS="en-GB es-AR es-ES nb-NO pt-PT sv-SE zh-CN"
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 arm 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 +cups 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/mozilla/patchsets/${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 cups? ( net-print/cups[gnutls] )"
60
61 DEPEND="${RDEPEND}
62 dev-util/pkgconfig
63 java? ( >=virtual/jdk-1.4 )"
64
65 S="${WORKDIR}/comm-1.9.1"
66
67 linguas() {
68 local LANG SLANG
69 for LANG in ${LINGUAS}; do
70 if has ${LANG} en en_US; then
71 has en ${linguas} || linguas="${linguas:+"${linguas} "}en"
72 continue
73 elif has ${LANG} ${LANGS//-/_}; then
74 has ${LANG//_/-} ${linguas} || linguas="${linguas:+"${linguas} "}${LANG//_/-}"
75 continue
76 elif [[ " ${LANGS} " == *" ${LANG}-"* ]]; then
77 for X in ${LANGS}; do
78 if [[ "${X}" == "${LANG}-"* ]] && \
79 [[ " ${NOSHORTLANGS} " != *" ${X} "* ]]; then
80 has ${X} ${linguas} || linguas="${linguas:+"${linguas} "}${X}"
81 continue 2
82 fi
83 done
84 fi
85 ewarn "Sorry, but ${PN} does not support the ${LANG} LINGUA"
86 done
87 }
88
89 src_unpack() {
90 unpack ${A}
91
92 linguas
93 for X in ${linguas}; do
94 # FIXME: Add support for unpacking xpis to portage
95 [[ ${X} != "en" ]] && xpi_unpack "${MY_P}-${X}.xpi"
96 done
97 if [[ ${linguas} != "" && ${linguas} != "en" ]]; then
98 einfo "Selected language packs (first will be default): ${linguas}"
99 fi
100 }
101
102 pkg_setup() {
103 # Ensure we always build with C locale.
104 export LANG="C"
105 export LC_ALL="C"
106 export LC_MESSAGES="C"
107 export LC_CTYPE="C"
108
109 export BUILD_OFFICIAL=1
110 export MOZILLA_OFFICIAL=1
111
112 java-pkg-opt-2_pkg_setup
113 }
114
115 src_prepare() {
116 java-pkg-opt-2_src_prepare
117
118 # Apply our patches
119 EPATCH_SUFFIX="patch" \
120 EPATCH_FORCE="yes" \
121 epatch "${WORKDIR}/patch"
122
123 if use crypt && use mailclient ; then
124 mv "${WORKDIR}"/enigmail "${S}"/mailnews/extensions/enigmail
125 cd "${S}"/mailnews/extensions/enigmail || die
126 epatch "${FILESDIR}"/enigmail/70_enigmail-fix.patch
127 makemake2
128 cd "${S}"
129 fi
130
131 eautoreconf
132 }
133
134 src_configure() {
135 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
136 MEXTENSIONS=""
137
138 ####################################
139 #
140 # mozconfig, CFLAGS and CXXFLAGS setup
141 #
142 ####################################
143
144 mozconfig_init
145 mozconfig_config
146
147 # It doesn't compile on alpha without this LDFLAGS
148 use alpha && append-ldflags "-Wl,--no-relax"
149
150 if ! use chatzilla ; then
151 MEXTENSIONS="${MEXTENSIONS},-irc"
152 fi
153 if ! use roaming ; then
154 MEXTENSIONS="${MEXTENSIONS},-sroaming"
155 fi
156
157 if ! use gnome ; then
158 MEXTENSIONS="${MEXTENSIONS},-gnomevfs"
159 fi
160
161 if ! use composer ; then
162 if ! use chatzilla && ! use mailclient ; then
163 mozconfig_annotate '-composer' --disable-composer
164 fi
165 fi
166
167 mozconfig_annotate '' --enable-extensions="${MEXTENSIONS}"
168 mozconfig_annotate '' --enable-application=suite
169 mozconfig_annotate 'broken' --disable-mochitest
170 mozconfig_annotate 'broken' --disable-crashreporter
171 mozconfig_annotate '' --enable-system-hunspell
172 mozconfig_annotate '' --enable-jsd
173 mozconfig_annotate '' --enable-image-encoder=all
174 mozconfig_annotate '' --enable-canvas
175 mozconfig_annotate '' --with-system-nspr
176 mozconfig_annotate '' --with-system-nss
177 mozconfig_annotate '' --with-system-bz2
178 mozconfig_annotate '' --enable-oji --enable-mathml
179 mozconfig_annotate 'places' --enable-storage --enable-places --enable-places_bookmarks
180 mozconfig_annotate '' --disable-installer
181 mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME}
182
183 # Enable/Disable based on USE flags
184 mozconfig_use_enable alsa ogg
185 mozconfig_use_enable alsa wave
186 mozconfig_use_enable cups printing
187 mozconfig_use_enable java javaxpcom
188 mozconfig_use_enable ldap
189 mozconfig_use_enable ldap ldap-experimental
190 mozconfig_use_enable mailclient mailnews
191 mozconfig_use_enable system-sqlite
192
193 # Finalize and report settings
194 mozconfig_final
195
196 if [[ $(gcc-major-version) -lt 4 ]]; then
197 append-cxxflags -fno-stack-protector
198 fi
199
200 ####################################
201 #
202 # Configure and build
203 #
204 ####################################
205
206 # Work around breakage in makeopts with --no-print-directory
207 MAKEOPTS="${MAKEOPTS/--no-print-directory/}"
208
209 CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" econf
210 }
211
212 src_compile() {
213 # Should the build use multiprocessing? Not enabled by default, as it tends to break.
214 [ "${WANT_MP}" = "true" ] && jobs=${MAKEOPTS} || jobs="-j1"
215 emake ${jobs} || die
216
217 # Only build enigmail extension if conditions are met.
218 if use crypt && use mailclient ; then
219 emake -C "${S}"/mailnews/extensions/enigmail || die "make enigmail failed"
220 emake -j1 -C "${S}"/mailnews/extensions/enigmail 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
228 emake DESTDIR="${D}" install || die "emake install failed"
229
230 if use crypt && use mailclient ; then
231 cd "${T}"
232 unzip "${S}"/mozilla/dist/bin/enigmail*.xpi install.rdf
233 emid=$(sed -n '/<em:id>/!d; s/.*\({.*}\).*/\1/; p; q' install.rdf)
234
235 dodir ${MOZILLA_FIVE_HOME}/extensions/${emid}
236 cd "${D}"${MOZILLA_FIVE_HOME}/extensions/${emid}
237 unzip "${S}"/mozilla/dist/bin/enigmail*.xpi
238 fi
239
240 linguas
241 for X in ${linguas}; do
242 [[ ${X} != "en" ]] && xpi_install "${WORKDIR}"/"${MY_P}-${X}"
243 done
244
245 # Install icon and .desktop for menu entry
246 newicon "${S}"/suite/branding/content/icon64.png seamonkey.png
247 domenu "${FILESDIR}"/icon/seamonkey.desktop
248
249 # Add StartupNotify=true bug 290401
250 if use startup-notification ; then
251 echo "StartupNotify=true" >> "${D}"/usr/share/applications/seamonkey.desktop
252 fi
253
254 # Add our default prefs
255 sed "s|SEAMONKEY_PVR|${PVR}|" "${FILESDIR}"/all-gentoo.js \
256 > "${D}"${MOZILLA_FIVE_HOME}/defaults/pref/all-gentoo.js
257
258 # Plugins dir
259 rm -rf "${D}"${MOZILLA_FIVE_HOME}/plugins || die "failed to remove existing plugins dir"
260 dosym ../nsbrowser/plugins "${MOZILLA_FIVE_HOME}"/plugins
261
262 # shiny new man page
263 doman "${S}"/suite/app/${PN}.1
264 }
265
266 pkg_preinst() {
267 declare MOZILLA_FIVE_HOME="${ROOT}/usr/$(get_libdir)/${PN}"
268
269 if [ -d ${MOZILLA_FIVE_HOME}/plugins ] ; then
270 rm ${MOZILLA_FIVE_HOME}/plugins -rf
271 fi
272 }
273
274 pkg_postinst() {
275 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
276
277 # Update mimedb for the new .desktop file
278 fdo-mime_desktop_database_update
279
280 if use chatzilla ; then
281 elog "chatzilla is now an extension which can be en-/disabled and configured via"
282 elog "the Add-on manager."
283 fi
284 }

  ViewVC Help
Powered by ViewVC 1.1.20