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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (show annotations) (download)
Wed Aug 17 16:51:46 2011 UTC (2 years, 10 months ago) by polynomial-c
Branch: MAIN
CVS Tags: HEAD
Changes since 1.5: +1 -1 lines
FILE REMOVED
Revbumped to enigmail-1.3. Removed old

(Portage version: 2.2.0_alpha51/cvs/Linux x86_64)

1 # Copyright 1999-2011 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.1.ebuild,v 1.5 2011/07/26 12:27:51 polynomial-c Exp $
4
5 EAPI="3"
6 WANT_AUTOCONF="2.1"
7
8 inherit flag-o-matic toolchain-funcs eutils mozconfig-3 makeedit multilib fdo-mime autotools mozextension python
9
10 PATCH="${PN}-2.1-patches-01"
11 EMVER="1.2"
12
13 LANGS="be ca cs de en en-GB en-US es-AR es-ES fi fr it ja lt nb-NO nl pl pt-PT ru sk sv-SE tr"
14 NOSHORTLANGS="en-GB en-US es-AR"
15
16 MY_PV="${PV/_pre*}"
17 MY_PV="${MY_PV/_alpha/a}"
18 MY_PV="${MY_PV/_beta/b}"
19 MY_PV="${MY_PV/_rc/rc}"
20 MY_P="${PN}-${MY_PV}"
21
22 # release versions usually have language packs. So be careful with changing this.
23 HAS_LANGS="true"
24 if [[ ${PV} == *_pre* ]] ; then
25 # pre-releases. No need for arch teams to change KEYWORDS here.
26
27 REL_URI="ftp://ftp.mozilla.org/pub/mozilla.org/${PN}/nightly/${MY_PV}-candidates/build${PV##*_pre}"
28 #KEYWORDS=""
29 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~ppc64 ~x86"
30 #HAS_LANGS="false"
31 else
32 # This is where arch teams should change the KEYWORDS.
33
34 REL_URI="http://releases.mozilla.org/pub/mozilla.org/${PN}/releases/${MY_PV}"
35 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~ppc64 ~x86"
36 [[ ${PV} == *alpha* ]] && HAS_LANGS="false"
37 fi
38
39 DESCRIPTION="Seamonkey Web Browser"
40 HOMEPAGE="http://www.seamonkey-project.org"
41
42 SLOT="0"
43 LICENSE="|| ( MPL-1.1 GPL-2 LGPL-2.1 )"
44 IUSE="+alsa +chatzilla +crypt gconf +roaming +webm"
45
46 SRC_URI="${REL_URI}/source/${MY_P}.source.tar.bz2
47 http://dev.gentoo.org/~polynomial-c/mozilla/patchsets/${PATCH}.tar.xz
48 crypt? ( http://www.mozilla-enigmail.org/download/source/enigmail-${EMVER}.tar.gz )"
49
50 if ${HAS_LANGS} ; then
51 for X in ${LANGS} ; do
52 if [ "${X}" != "en" ] ; then
53 SRC_URI="${SRC_URI}
54 linguas_${X/-/_}? ( ${REL_URI/build?/build1}/langpack/${MY_P}.${X}.langpack.xpi -> ${MY_P}-${X}.xpi )"
55 fi
56 IUSE="${IUSE} linguas_${X/-/_}"
57 # english is handled internally
58 if [ "${#X}" == 5 ] && ! has ${X} ${NOSHORTLANGS}; then
59 #if [ "${X}" != "en-US" ]; then
60 SRC_URI="${SRC_URI}
61 linguas_${X%%-*}? ( ${REL_URI/build?/build1}/langpack/${MY_P}.${X}.langpack.xpi -> ${MY_P}-${X}.xpi )"
62 #fi
63 IUSE="${IUSE} linguas_${X%%-*}"
64 fi
65 done
66 fi
67
68 ASM_DEPEND=">=dev-lang/yasm-1.1"
69
70 RDEPEND=">=sys-devel/binutils-2.16.1
71 >=dev-libs/nss-3.12.9
72 >=dev-libs/nspr-4.8.7
73 >=media-libs/libpng-1.4.1[apng]
74 dev-libs/libffi
75 system-sqlite? ( >=dev-db/sqlite-3.7.4[fts3,secure-delete,unlock-notify,debug=] )
76 gconf? ( >=gnome-base/gconf-1.2.1:2 )
77 crypt? ( >=app-crypt/gnupg-1.4 )
78 webm? ( media-libs/libvpx
79 media-libs/alsa-lib )"
80
81 DEPEND="${RDEPEND}
82 dev-util/pkgconfig
83 webm? ( amd64? ( ${ASM_DEPEND} )
84 x86? ( ${ASM_DEPEND} ) )"
85
86 S="${WORKDIR}/comm-2.0"
87
88 linguas() {
89 local LANG SLANG
90 for LANG in ${LINGUAS}; do
91 if has ${LANG} en en_US; then
92 has en ${linguas} || linguas="${linguas:+"${linguas} "}en"
93 continue
94 elif has ${LANG} ${LANGS//-/_}; then
95 has ${LANG//_/-} ${linguas} || linguas="${linguas:+"${linguas} "}${LANG//_/-}"
96 continue
97 elif [[ " ${LANGS} " == *" ${LANG}-"* ]]; then
98 for X in ${LANGS}; do
99 if [[ "${X}" == "${LANG}-"* ]] && \
100 [[ " ${NOSHORTLANGS} " != *" ${X} "* ]]; then
101 has ${X} ${linguas} || linguas="${linguas:+"${linguas} "}${X}"
102 continue 2
103 fi
104 done
105 fi
106 ewarn "Sorry, but ${PN} does not support the ${LANG} LINGUA"
107 done
108 }
109
110 src_unpack() {
111 unpack ${A}
112
113 if ${HAS_LANGS} ; then
114 linguas
115 for X in ${linguas}; do
116 # FIXME: Add support for unpacking xpis to portage
117 [[ ${X} != "en" ]] && xpi_unpack "${MY_P}-${X}.xpi"
118 done
119 if [[ ${linguas} != "" && ${linguas} != "en" ]]; then
120 einfo "Selected language packs (first will be default): ${linguas}"
121 fi
122 fi
123 }
124
125 pkg_setup() {
126 if [[ ${PV} == *_pre* ]] ; then
127 ewarn "You're using an unofficial release of ${PN}. Don't file any bug in"
128 ewarn "Gentoo's Bugtracker against this package in case it breaks for you."
129 ewarn "Those belong to upstream: https://bugzilla.mozilla.org"
130 fi
131
132 moz_pkgsetup
133 }
134
135 src_prepare() {
136 # Apply our patches
137 EPATCH_SUFFIX="patch" \
138 EPATCH_FORCE="yes" \
139 epatch "${WORKDIR}/patch"
140
141 epatch "${FILESDIR}"/${PN}-2.1b3-restore-tabbar-scrolling-from-2.1b2.diff \
142 "${FILESDIR}"/${PN}-2.2-curl7217-includes-fix.patch
143
144 # Allow user to apply any additional patches without modifing ebuild
145 epatch_user
146
147 if use crypt ; then
148 mv "${WORKDIR}"/enigmail "${S}"/mailnews/extensions/enigmail
149 cd "${S}"/mailnews/extensions/enigmail || die
150 epatch "${FILESDIR}"/enigmail/enigmail-1.2-seamonkey-2.1-lowercaseequalsliteralfix.patch
151 ./makemake -r 2&>/dev/null
152 sed -e 's:@srcdir@:${S}/mailnews/extensions/enigmail:' \
153 -i Makefile.in || die
154 cd "${S}"
155 fi
156
157 #Ensure we disable javaxpcom by default to prevent configure breakage
158 sed -i -e s:MOZ_JAVAXPCOM\=1::g "${S}"/mozilla/xulrunner/confvars.sh \
159 || die "sed javaxpcom"
160
161 # Disable gnomevfs extension
162 sed -i -e "s:gnomevfs::" "${S}/"suite/confvars.sh \
163 || die "Failed to remove gnomevfs extension"
164
165 eautoreconf
166 cd "${S}"/mozilla || die
167 eautoreconf
168 cd "${S}"/mozilla/js/src || die
169 eautoreconf
170 }
171
172 src_configure() {
173 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
174 MEXTENSIONS=""
175
176 ####################################
177 #
178 # mozconfig, CFLAGS and CXXFLAGS setup
179 #
180 ####################################
181
182 mozconfig_init
183 mozconfig_config
184
185 # It doesn't compile on alpha without this LDFLAGS
186 use alpha && append-ldflags "-Wl,--no-relax"
187
188 if ! use chatzilla ; then
189 MEXTENSIONS="${MEXTENSIONS},-irc"
190 fi
191 if ! use roaming ; then
192 MEXTENSIONS="${MEXTENSIONS},-sroaming"
193 fi
194
195 mozconfig_annotate '' --enable-extensions="${MEXTENSIONS}"
196 mozconfig_annotate '' --enable-jsd
197 mozconfig_annotate '' --enable-canvas
198 mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME}
199
200 mozconfig_use_enable gconf
201
202 if use crypt ; then
203 mozconfig_annotate "mail crypt" --enable-chrome-format=jar
204 fi
205
206 mozconfig_annotate '' --with-system-png
207
208 # Finalize and report settings
209 mozconfig_final
210
211 if [[ $(gcc-major-version) -lt 4 ]]; then
212 append-cxxflags -fno-stack-protector
213 fi
214
215 ####################################
216 #
217 # Configure and build
218 #
219 ####################################
220
221 # Work around breakage in makeopts with --no-print-directory
222 MAKEOPTS="${MAKEOPTS/--no-print-directory/}"
223
224 CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" PYTHON="$(PYTHON)" econf
225 }
226
227 src_compile() {
228 emake || die
229
230 # Only build enigmail extension if conditions are met.
231 if use crypt ; then
232 emake -C "${S}"/mailnews/extensions/enigmail || die "make enigmail failed"
233 emake -j1 -C "${S}"/mailnews/extensions/enigmail xpi || die "make enigmail xpi failed"
234 fi
235 }
236
237 src_install() {
238 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
239 declare emid
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}"/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}"/mozilla/dist/bin/enigmail*.xpi || die
252 fi
253
254 sed 's|^\(MimeType=.*\)$|\1text/x-vcard;text/directory;application/mbox;message/rfc822;x-scheme-handler/mailto;|' \
255 -i "${T}"/${PN}.desktop || die
256 sed 's|^\(Categories=.*\)$|\1Email;|' -i "${T}"/${PN}.desktop \
257 || die
258
259 if ${HAS_LANGS} ; then
260 linguas
261 for X in ${linguas}; do
262 [[ ${X} != "en" ]] && xpi_install "${WORKDIR}"/"${MY_P}-${X}"
263 done
264 fi
265
266 # Add StartupNotify=true bug 290401
267 if use startup-notification ; then
268 echo "StartupNotify=true" >> "${T}"/${PN}.desktop
269 fi
270
271 # Install icon and .desktop for menu entry
272 newicon "${S}"/suite/branding/nightly/content/icon64.png ${PN}.png \
273 || die
274 domenu "${T}"/${PN}.desktop || die
275
276 # Add our default prefs
277 sed "s|SEAMONKEY_PVR|${PVR}|" "${FILESDIR}"/all-gentoo.js \
278 > "${D}"${MOZILLA_FIVE_HOME}/defaults/pref/all-gentoo.js \
279 || die
280
281 # Plugins dir
282 rm -rf "${D}"${MOZILLA_FIVE_HOME}/plugins || die "failed to remove existing plugins dir"
283 dosym ../nsbrowser/plugins "${MOZILLA_FIVE_HOME}"/plugins || die
284
285 doman "${S}"/suite/app/${PN}.1 || die
286 }
287
288 pkg_preinst() {
289 declare MOZILLA_FIVE_HOME="${ROOT}/usr/$(get_libdir)/${PN}"
290
291 if [ -d ${MOZILLA_FIVE_HOME}/plugins ] ; then
292 rm ${MOZILLA_FIVE_HOME}/plugins -rf
293 fi
294 }
295
296 pkg_postinst() {
297 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
298
299 # Update mimedb for the new .desktop file
300 fdo-mime_desktop_database_update
301
302 if use chatzilla ; then
303 elog "chatzilla is now an extension which can be en-/disabled and configured via"
304 elog "the Add-on manager."
305 fi
306 }

  ViewVC Help
Powered by ViewVC 1.1.20