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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Thu Jul 8 07:30:06 2010 UTC (4 years ago) by polynomial-c
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +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.4-r1.ebuild,v 1.2 2010/06/21 20:12:38 fauli 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 epatch "${FILESDIR}"/1002_fix-system-hunspell-dict-detections.patch
117
118 if use crypt && use mailclient ; then
119 mv "${WORKDIR}"/enigmail "${S}"/mailnews/extensions/enigmail
120 cd "${S}"/mailnews/extensions/enigmail || die
121 epatch "${FILESDIR}"/enigmail/70_enigmail-fix.patch
122 makemake2
123 cd "${S}"
124 fi
125
126 eautoreconf
127 }
128
129 src_configure() {
130 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
131 MEXTENSIONS=""
132
133 ####################################
134 #
135 # mozconfig, CFLAGS and CXXFLAGS setup
136 #
137 ####################################
138
139 mozconfig_init
140 mozconfig_config
141
142 # It doesn't compile on alpha without this LDFLAGS
143 use alpha && append-ldflags "-Wl,--no-relax"
144
145 if ! use chatzilla ; then
146 MEXTENSIONS="${MEXTENSIONS},-irc"
147 fi
148 if ! use roaming ; then
149 MEXTENSIONS="${MEXTENSIONS},-sroaming"
150 fi
151
152 if ! use gnome ; then
153 MEXTENSIONS="${MEXTENSIONS},-gnomevfs"
154 fi
155
156 if ! use composer ; then
157 if ! use chatzilla && ! use mailclient ; then
158 mozconfig_annotate '-composer' --disable-composer
159 fi
160 fi
161
162 mozconfig_annotate '' --enable-extensions="${MEXTENSIONS}"
163 mozconfig_annotate '' --enable-application=suite
164 mozconfig_annotate 'broken' --disable-mochitest
165 mozconfig_annotate 'broken' --disable-crashreporter
166 mozconfig_annotate '' --enable-system-hunspell
167 mozconfig_annotate '' --enable-jsd
168 mozconfig_annotate '' --enable-image-encoder=all
169 mozconfig_annotate '' --enable-canvas
170 mozconfig_annotate '' --with-system-nspr
171 mozconfig_annotate '' --with-system-nss
172 mozconfig_annotate '' --enable-system-lcms
173 mozconfig_annotate '' --with-system-bz2
174 mozconfig_annotate '' --enable-oji --enable-mathml
175 mozconfig_annotate 'places' --enable-storage --enable-places --enable-places_bookmarks
176 mozconfig_annotate '' --disable-installer
177 mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME}
178
179 # Enable/Disable based on USE flags
180 mozconfig_use_enable alsa ogg
181 mozconfig_use_enable alsa wave
182 mozconfig_use_enable java javaxpcom
183 mozconfig_use_enable ldap
184 mozconfig_use_enable ldap ldap-experimental
185 mozconfig_use_enable mailclient mailnews
186 mozconfig_use_enable system-sqlite
187
188 # Finalize and report settings
189 mozconfig_final
190
191 if [[ $(gcc-major-version) -lt 4 ]]; then
192 append-cxxflags -fno-stack-protector
193 fi
194
195 ####################################
196 #
197 # Configure and build
198 #
199 ####################################
200
201 # Work around breakage in makeopts with --no-print-directory
202 MAKEOPTS="${MAKEOPTS/--no-print-directory/}"
203
204 CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" econf
205 }
206
207 src_compile() {
208 # Should the build use multiprocessing? Not enabled by default, as it tends to break.
209 [ "${WANT_MP}" = "true" ] && jobs=${MAKEOPTS} || jobs="-j1"
210 emake ${jobs} || die
211
212 # Only build enigmail extension if conditions are met.
213 if use crypt && use mailclient ; then
214 emake -C "${S}"/mailnews/extensions/enigmail || die "make enigmail failed"
215 emake -j1 -C "${S}"/mailnews/extensions/enigmail xpi || die "make enigmail xpi failed"
216 fi
217 }
218
219 src_install() {
220 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
221 declare emid
222
223 emake DESTDIR="${D}" install || die "emake install failed"
224
225 if use crypt && use mailclient ; then
226 cd "${T}"
227 unzip "${S}"/mozilla/dist/bin/enigmail*.xpi install.rdf
228 emid=$(sed -n '/<em:id>/!d; s/.*\({.*}\).*/\1/; p; q' install.rdf)
229
230 dodir ${MOZILLA_FIVE_HOME}/extensions/${emid}
231 cd "${D}"${MOZILLA_FIVE_HOME}/extensions/${emid}
232 unzip "${S}"/mozilla/dist/bin/enigmail*.xpi
233 fi
234
235 linguas
236 for X in ${linguas}; do
237 [[ ${X} != "en" ]] && xpi_install "${WORKDIR}"/"${MY_P}-${X}"
238 done
239
240 # Install icon and .desktop for menu entry
241 newicon "${S}"/suite/branding/content/icon64.png seamonkey.png
242 domenu "${FILESDIR}"/icon/seamonkey.desktop
243
244 # Add StartupNotify=true bug 290401
245 if use startup-notification ; then
246 echo "StartupNotify=true" >> "${D}"/usr/share/applications/seamonkey.desktop
247 fi
248
249 # Add our default prefs
250 sed "s|SEAMONKEY_PVR|${PVR}|" "${FILESDIR}"/all-gentoo.js \
251 > "${D}"${MOZILLA_FIVE_HOME}/defaults/pref/all-gentoo.js
252
253 # Plugins dir
254 rm -rf "${D}"${MOZILLA_FIVE_HOME}/plugins || die "failed to remove existing plugins dir"
255 dosym ../nsbrowser/plugins "${MOZILLA_FIVE_HOME}"/plugins
256
257 # shiny new man page
258 doman "${S}"/suite/app/${PN}.1
259 }
260
261 pkg_preinst() {
262 declare MOZILLA_FIVE_HOME="${ROOT}/usr/$(get_libdir)/${PN}"
263
264 if [ -d ${MOZILLA_FIVE_HOME}/plugins ] ; then
265 rm ${MOZILLA_FIVE_HOME}/plugins -rf
266 fi
267 }
268
269 pkg_postinst() {
270 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
271
272 # Update mimedb for the new .desktop file
273 fdo-mime_desktop_database_update
274
275 if use chatzilla ; then
276 elog "chatzilla is now an extension which can be en-/disabled and configured via"
277 elog "the Add-on manager."
278 fi
279 }

  ViewVC Help
Powered by ViewVC 1.1.20