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

Contents of /www-client/seamonkey/seamonkey-2.0_rc1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Mon Oct 26 00:35:30 2009 UTC (4 years, 8 months ago) by anarchy
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
fix startup notification, bug #290401 per polynomial-c
(Portage version: 2.1.7.1/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_rc1.ebuild,v 1.1 2009/10/12 03:01:03 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.96.0"
12
13 LANGS="be ca cs de en-US es-AR es-ES fr gl hu lt nb-NO nl pl pt-PT ru sk tr"
14 NOSHORTLANGS="es-AR"
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://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.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 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="default"
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 '' --enable-oji --enable-mathml
189 mozconfig_annotate 'places' --enable-storage --enable-places --enable-places_bookmarks
190 mozconfig_annotate '' --disable-installer
191 mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME}
192
193 # Enable/Disable based on USE flags
194 mozconfig_use_enable alsa ogg
195 mozconfig_use_enable alsa wave
196 mozconfig_use_enable ldap
197 mozconfig_use_enable ldap ldap-experimental
198 mozconfig_use_enable sqlite system-sqlite
199 mozconfig_use_enable java javaxpcom
200
201 # Finalize and report settings
202 mozconfig_final
203
204 if [[ $(gcc-major-version) -lt 4 ]]; then
205 append-cxxflags -fno-stack-protector
206 fi
207
208 ####################################
209 #
210 # Configure and build
211 #
212 ####################################
213
214 # Work around breakage in makeopts with --no-print-directory
215 MAKEOPTS="${MAKEOPTS/--no-print-directory/}"
216
217 CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" econf
218 }
219
220 src_compile() {
221 # Should the build use multiprocessing? Not enabled by default, as it tends to break.
222 [ "${WANT_MP}" = "true" ] && jobs=${MAKEOPTS} || jobs="-j1"
223 emake ${jobs} || die
224
225 # Only build enigmail extension if conditions are met.
226 if use crypt && ! use moznomail; then
227 emake -C "${S}"/mailnews/extensions/enigmail || die "make enigmail failed"
228 fi
229 }
230
231 src_install() {
232 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
233
234 emake DESTDIR="${D}" install || die "emake install failed"
235
236 linguas
237 for X in ${linguas}; do
238 [[ ${X} != "en" ]] && xpi_install "${WORKDIR}"/"${MY_P}-${X}"
239 done
240
241 local LANG=${linguas%% *}
242 if [[ -n ${LANG} && ${LANG} != "en" ]]; then
243 elog "Setting default locale to ${LANG}"
244 dosed -e "s:general.useragent.locale\", \"en-US\":general.useragent.locale\", \"${LANG}\":" \
245 ${MOZILLA_FIVE_HOME}/defaults/pref/suite-l10n.js || \
246 die "sed failed to change locale"
247 fi
248
249 # Install icon and .desktop for menu entry
250 newicon "${S}"/suite/branding/content/icon64.png seamonkey.png
251 domenu "${FILESDIR}"/icon/seamonkey.desktop
252
253 # Add vendor
254 echo "pref(\"general.useragent.vendor\",\"Gentoo\");" \
255 >> "${D}"${MOZILLA_FIVE_HOME}/defaults/pref/vendor.js
256
257 # Plugins dir
258 rm -rf "${D}"${MOZILLA_FIVE_HOME}/plugins || die "failed to remove existing plugins dir"
259 dosym ../nsbrowser/plugins "${MOZILLA_FIVE_HOME}"/plugins
260
261 # shiny new man page
262 doman "${S}"/suite/app/${PN}.1
263 }
264
265 pkg_preinst() {
266 declare MOZILLA_FIVE_HOME="${ROOT}/usr/$(get_libdir)/${PN}"
267
268 if [ -d ${MOZILLA_FIVE_HOME}/plugins ] ; then
269 rm ${MOZILLA_FIVE_HOME}/plugins -rf
270 fi
271 }
272
273 pkg_postinst() {
274 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
275
276 # Update mimedb for the new .desktop file
277 fdo-mime_desktop_database_update
278 }

  ViewVC Help
Powered by ViewVC 1.1.20