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

Contents of /www-client/seamonkey/seamonkey-2.0_rc2-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.20