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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Fri Apr 2 20:06:09 2010 UTC (4 years, 3 months ago) by polynomial-c
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
seamonkey-2.0.4 version bump. Removed old 2.0.x versions.
(Portage version: 2.2_rc67/cvs/Linux x86_64)

1 # Copyright 1999-2009 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.1.ebuild,v 1.1 2009/12/20 17:31:29 anarchy 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-patches-0.1"
11 EMVER="1.0.0"
12
13 LANGS="be ca cs de en-US es-AR es-ES fr gl hu it 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 +crypt java ldap mozdevelop moznocompose moznoirc moznomail moznoroaming 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/~anarchy/dist/${PATCH}.tar.bz2
30 crypt? ( !moznomail? ( 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 sqlite? ( >=dev-db/sqlite-3.6.20-r1[fts3] )
54 >=app-text/hunspell-1.2
55 x11-libs/cairo[X]
56 x11-libs/pango[X]
57 crypt? ( !moznomail? ( >=app-crypt/gnupg-1.4 ) )"
58
59 DEPEND="${RDEPEND}
60 dev-util/pkgconfig
61 java? ( >=virtual/jdk-1.4 )"
62
63 S="${WORKDIR}/comm-1.9.1"
64
65 # Needed by src_compile() and src_install().
66 # Would do in pkg_setup but that loses the export attribute,
67 # they become pure shell variables.
68 export BUILD_OFFICIAL=1
69 export MOZILLA_OFFICIAL=1
70
71 linguas() {
72 local LANG SLANG
73 for LANG in ${LINGUAS}; do
74 if has ${LANG} en en_US; then
75 has en ${linguas} || linguas="${linguas:+"${linguas} "}en"
76 continue
77 elif has ${LANG} ${LANGS//-/_}; then
78 has ${LANG//_/-} ${linguas} || linguas="${linguas:+"${linguas} "}${LANG//_/-}"
79 continue
80 elif [[ " ${LANGS} " == *" ${LANG}-"* ]]; then
81 for X in ${LANGS}; do
82 if [[ "${X}" == "${LANG}-"* ]] && \
83 [[ " ${NOSHORTLANGS} " != *" ${X} "* ]]; then
84 has ${X} ${linguas} || linguas="${linguas:+"${linguas} "}${X}"
85 continue 2
86 fi
87 done
88 fi
89 ewarn "Sorry, but ${PN} does not support the ${LANG} LINGUA"
90 done
91 }
92
93 src_unpack() {
94 unpack ${A}
95
96 linguas
97 for X in ${linguas}; do
98 # FIXME: Add support for unpacking xpis to portage
99 [[ ${X} != "en" ]] && xpi_unpack "${MY_P}-${X}.xpi"
100 done
101 if [[ ${linguas} != "" && ${linguas} != "en" ]]; then
102 einfo "Selected language packs (first will be default): ${linguas}"
103 fi
104 }
105
106 pkg_setup() {
107 java-pkg-opt-2_pkg_setup
108
109 if use sqlite ; then
110 einfo
111 elog "You are enabling system sqlite. Do not file a bug with gentoo if you have"
112 elog "issues that arise from enabling system sqlite. All bugs will be concidered"
113 elog "invalid. All patches are welcomed to fix any issues that might be found with"
114 elog "system sqlite. If you are starting with a fresh profile you can enable sqlite"
115 elog "without any major issues."
116 epause 10
117 fi
118 }
119
120 src_prepare() {
121 java-pkg-opt-2_src_prepare
122
123 # Apply our patches
124 EPATCH_EXCLUDE="108-fix_ftbfs_with_cairo_fb.patch" \
125 EPATCH_SUFFIX="patch" \
126 EPATCH_FORCE="yes" \
127 epatch "${WORKDIR}"
128
129 if use crypt && ! use moznomail; then
130 mv "${WORKDIR}"/enigmail "${S}"/mailnews/extensions/enigmail
131 cd "${S}"/mailnews/extensions/enigmail || die
132 epatch "${FILESDIR}"/enigmail/70_enigmail-fix.patch
133 makemake2
134 cd "${S}"
135 fi
136
137 eautoreconf
138 }
139
140 src_configure() {
141 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
142 MEXTENSIONS=""
143
144 ####################################
145 #
146 # mozconfig, CFLAGS and CXXFLAGS setup
147 #
148 ####################################
149
150 mozconfig_init
151 mozconfig_config
152
153 # It doesn't compile on alpha without this LDFLAGS
154 use alpha && append-ldflags "-Wl,--no-relax"
155
156 if use moznoirc ; then
157 MEXTENSIONS="${MEXTENSIONS},-irc"
158 fi
159 if use moznoroaming ; then
160 MEXTENSIONS="${MEXTENSIONS},-sroaming"
161 fi
162
163 if ! use gnome ; then
164 MEXTENSIONS="${MEXTENSIONS},-gnomevfs"
165 fi
166
167 if use moznomail ; then
168 mozconfig_annotate '+moznomail' --disable-mailnews
169 fi
170
171 if use moznocompose ; then
172 if use moznoirc && use moznomail ; then
173 mozconfig_annotate '+moznocompose' --disable-composer
174 fi
175 fi
176
177 mozconfig_annotate '' --enable-extensions="${MEXTENSIONS}"
178 mozconfig_annotate '' --enable-application=suite
179 mozconfig_annotate 'broken' --disable-mochitest
180 mozconfig_annotate 'broken' --disable-crashreporter
181 mozconfig_annotate '' --enable-system-hunspell
182 mozconfig_annotate '' --enable-system-sqlite
183 mozconfig_annotate '' --enable-image-encoder=all
184 mozconfig_annotate '' --enable-canvas
185 mozconfig_annotate '' --with-system-nspr
186 mozconfig_annotate '' --with-system-nss
187 mozconfig_annotate '' --enable-system-lcms
188 mozconfig_annotate '' --with-system-bz2
189 mozconfig_annotate '' --enable-oji --enable-mathml
190 mozconfig_annotate 'places' --enable-storage --enable-places --enable-places_bookmarks
191 mozconfig_annotate '' --disable-installer
192 mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME}
193
194 # Enable/Disable based on USE flags
195 mozconfig_use_enable alsa ogg
196 mozconfig_use_enable alsa wave
197 mozconfig_use_enable ldap
198 mozconfig_use_enable ldap ldap-experimental
199 mozconfig_use_enable sqlite system-sqlite
200 mozconfig_use_enable java javaxpcom
201
202 # Finalize and report settings
203 mozconfig_final
204
205 if [[ $(gcc-major-version) -lt 4 ]]; then
206 append-cxxflags -fno-stack-protector
207 fi
208
209 ####################################
210 #
211 # Configure and build
212 #
213 ####################################
214
215 # Work around breakage in makeopts with --no-print-directory
216 MAKEOPTS="${MAKEOPTS/--no-print-directory/}"
217
218 CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" econf
219 }
220
221 src_compile() {
222 # Should the build use multiprocessing? Not enabled by default, as it tends to break.
223 [ "${WANT_MP}" = "true" ] && jobs=${MAKEOPTS} || jobs="-j1"
224 emake ${jobs} || die
225
226 # Only build enigmail extension if conditions are met.
227 if use crypt && ! use moznomail; then
228 emake -C "${S}"/mailnews/extensions/enigmail || die "make enigmail failed"
229 emake -j1 -C "${S}"/mailnews/extensions/enigmail xpi || die "make enigmail xpi failed"
230 fi
231 }
232
233 src_install() {
234 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
235 declare emid
236
237 emake DESTDIR="${D}" install || die "emake install failed"
238
239 if use crypt && ! use moznomail; then
240 cd "${T}"
241 unzip "${S}"/mozilla/dist/bin/enigmail*.xpi install.rdf
242 emid=$(sed -n '/<em:id>/!d; s/.*\({.*}\).*/\1/; p; q' install.rdf)
243
244 dodir ${MOZILLA_FIVE_HOME}/extensions/${emid}
245 cd "${D}"${MOZILLA_FIVE_HOME}/extensions/${emid}
246 unzip "${S}"/mozilla/dist/bin/enigmail*.xpi
247 fi
248
249 linguas
250 for X in ${linguas}; do
251 [[ ${X} != "en" ]] && xpi_install "${WORKDIR}"/"${MY_P}-${X}"
252 done
253
254 echo 'pref("intl.locale.matchOS", true);' >> \
255 "${D}/usr/$(get_libdir)/${PN}/defaults/pref/browser-prefs.js" \
256 || die "setting usage of default OS locale"
257
258 # Install icon and .desktop for menu entry
259 newicon "${S}"/suite/branding/content/icon64.png seamonkey.png
260 domenu "${FILESDIR}"/icon/seamonkey.desktop
261
262 # Add StartupNotify=true bug 290401
263 if use startup-notification ; then
264 echo "StartupNotify=true" >> "${D}"/usr/share/applications/seamonkey.desktop
265 fi
266
267 # Add vendor
268 echo "pref(\"general.useragent.vendor\",\"Gentoo\");" \
269 >> "${D}"${MOZILLA_FIVE_HOME}/defaults/pref/vendor.js
270
271 # Plugins dir
272 rm -rf "${D}"${MOZILLA_FIVE_HOME}/plugins || die "failed to remove existing plugins dir"
273 dosym ../nsbrowser/plugins "${MOZILLA_FIVE_HOME}"/plugins
274
275 # shiny new man page
276 doman "${S}"/suite/app/${PN}.1
277 }
278
279 pkg_preinst() {
280 declare MOZILLA_FIVE_HOME="${ROOT}/usr/$(get_libdir)/${PN}"
281
282 if [ -d ${MOZILLA_FIVE_HOME}/plugins ] ; then
283 rm ${MOZILLA_FIVE_HOME}/plugins -rf
284 fi
285 }
286
287 pkg_postinst() {
288 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
289
290 # Update mimedb for the new .desktop file
291 fdo-mime_desktop_database_update
292
293 if ! use moznoirc ; then
294 elog "chatzilla is now an extension which can be en-/disabled and configured via"
295 elog "the Add-on manager."
296 fi
297 }

  ViewVC Help
Powered by ViewVC 1.1.20