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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (show annotations) (download)
Tue Sep 29 22:22:51 2009 UTC (4 years, 11 months ago) by maekke
Branch: MAIN
Changes since 1.6: +2 -2 lines
amd64 stable, bug #286721
(Portage version: 2.2_rc42/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-1.1.18.ebuild,v 1.6 2009/09/29 17:20:18 armin76 Exp $
4
5 WANT_AUTOCONF="2.1"
6
7 inherit flag-o-matic toolchain-funcs eutils mozcoreconf mozconfig-2 mozilla-launcher makeedit multilib autotools
8
9 PATCH="${P}-patches-0.1"
10 EMVER="0.96.0"
11
12 DESCRIPTION="Mozilla Application Suite - web browser, email, HTML editor, IRC"
13 HOMEPAGE="http://www.seamonkey-project.org/"
14 SRC_URI="http://releases.mozilla.org/pub/mozilla.org/${PN}/releases/${PV}/${P}.source.tar.bz2
15 mirror://gentoo/${PATCH}.tar.bz2
16 crypt? ( !moznomail? ( http://www.mozilla-enigmail.org/download/source/enigmail-${EMVER}.tar.gz ) )"
17
18 KEYWORDS="alpha amd64 arm hppa ia64 ~ppc ppc64 sparc x86 ~x86-fbsd"
19 SLOT="0"
20 LICENSE="|| ( MPL-1.1 GPL-2 LGPL-2.1 )"
21 IUSE="java ldap mozdevelop moznocompose moznoirc moznomail moznoroaming postgres crypt xforms"
22
23 RDEPEND="java? ( virtual/jre )
24 >=www-client/mozilla-launcher-1.56
25 >=dev-libs/nss-3.11.5
26 >=dev-libs/nspr-4.6.5-r1
27 crypt? ( !moznomail? ( >=app-crypt/gnupg-1.4 ) )"
28
29 DEPEND="${RDEPEND}
30 java? ( >=dev-java/java-config-0.2.0 )
31 dev-lang/perl
32 postgres? ( >=virtual/postgresql-server-7.2.0 )"
33
34 S="${WORKDIR}/mozilla"
35
36 # Needed by src_compile() and src_install().
37 # Would do in pkg_setup but that loses the export attribute, they
38 # become pure shell variables.
39 export MOZ_CO_PROJECT=suite
40 export BUILD_OFFICIAL=1
41 export MOZILLA_OFFICIAL=1
42
43 pkg_setup() {
44 if ! built_with_use x11-libs/cairo X; then
45 eerror "Cairo is not built with X useflag."
46 eerror "Please add 'X' to your USE flags, and re-emerge cairo."
47 die "Cairo needs X"
48 fi
49
50 if ! built_with_use --missing true x11-libs/pango X; then
51 eerror "Pango is not built with X useflag."
52 eerror "Please add 'X' to your USE flags, and re-emerge pango."
53 die "Pango needs X"
54 fi
55
56 use moznopango && warn_mozilla_launcher_stub
57 }
58
59 src_unpack() {
60 unpack ${P}.source.tar.bz2 ${PATCH}.tar.bz2
61
62 # Apply our patches
63 cd "${S}" || die "cd failed"
64 EPATCH_SUFFIX="patch" \
65 EPATCH_FORCE="yes" \
66 epatch "${WORKDIR}"/patch
67
68 # Fix crash without -fno-strict-aliasing, bug 265642
69 epatch "${FILESDIR}/${PN}-1.1.17-fix-fno-strict-aliasing.patch"
70
71 # Unpack the enigmail plugin
72 if use crypt && ! use moznomail; then
73 cd "${S}"/mailnews/extensions || die
74 unpack enigmail-${EMVER}.tar.gz
75 cd "${S}"/mailnews/extensions/enigmail || die "cd failed"
76 makemake2
77 fi
78
79 # Fix scripts that call for /usr/local/bin/perl #51916
80 ebegin "Patching smime to call perl from /usr/bin"
81 sed -i -e '1s,usr/local/bin,usr/bin,' "${S}"/security/nss/cmd/smimetools/smime
82 eend $? || die "sed failed"
83
84 cd "${S}"
85 eautoreconf
86 }
87
88 src_compile() {
89 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
90
91 ####################################
92 #
93 # mozconfig, CFLAGS and CXXFLAGS setup
94 #
95 ####################################
96 mozconfig_init
97 mozconfig_config
98
99 mozconfig_annotate 'gentoo' --enable-canvas
100 mozconfig_annotate 'gentoo' --with-system-nspr
101 mozconfig_annotate 'gentoo' --with-system-nss
102
103 # Bug 60668: Galeon doesn't build without oji enabled, so enable it
104 # regardless of java setting.
105 mozconfig_annotate 'galeon' --enable-oji --enable-mathml
106
107 # Other moz-specific settings
108 mozconfig_use_enable mozdevelop jsd
109 mozconfig_use_enable mozdevelop xpctools
110 mozconfig_use_extension mozdevelop venkman
111
112 if use moznoirc; then
113 mozconfig_annotate '+moznocompose +moznoirc' --enable-extensions=-irc
114 fi
115
116 if use moznoroaming ; then
117 mozconfig_annotate '+moznoroaming' --enable-extensions=-sroaming
118 fi
119
120 if use postgres ; then
121 mozconfig_annotate '+postgres' --enable-extensions=sql
122 export MOZ_ENABLE_PGSQL=1
123 export MOZ_PGSQL_INCLUDES=/usr/include
124 export MOZ_PGSQL_LIBS=/usr/$(get_libdir)
125 fi
126
127 mozconfig_use_enable ldap
128 mozconfig_use_enable ldap ldap-experimental
129 mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME}
130 mozconfig_annotate '' --with-user-appdir=.mozilla
131
132 if use moznomail; then
133 mozconfig_annotate "+moznomail" --disable-mailnews
134 fi
135
136 if use moznocompose; then
137 if use moznoirc && use moznomail; then
138 mozconfig_annotate "+moznocompose" --disable-composer
139 fi
140 fi
141
142 if use xforms; then
143 mozconfig_annotate "+xforms" --enable-extensions=xforms,schema-validation
144 fi
145
146 # Finalize and report settings
147 mozconfig_final
148
149 if [[ $(gcc-major-version) -lt 4 ]]; then
150 append-cxxflags -fno-stack-protector
151 fi
152
153 ####################################
154 #
155 # Configure and build
156 #
157 ####################################
158
159 CPPFLAGS="${CPPFLAGS} -DARON_WAS_HERE" \
160 CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \
161 econf || die
162
163 # It would be great if we could pass these in via CPPFLAGS or CFLAGS prior
164 # to econf, but the quotes cause configure to fail.
165 sed -i -e \
166 's|-DARON_WAS_HERE|-DGENTOO_NSPLUGINS_DIR=\\\"/usr/'"$(get_libdir)"'/nsplugins\\\" -DGENTOO_NSBROWSER_PLUGINS_DIR=\\\"/usr/'"$(get_libdir)"'/nsbrowser/plugins\\\"|' \
167 "${S}"/config/autoconf.mk \
168 "${S}"/xpfe/global/buildconfig.html
169
170 # This removes extraneous CFLAGS from the Makefiles to reduce RAM
171 # requirements while compiling
172 edit_makefiles
173
174 emake || die
175
176 ####################################
177 #
178 # Build Enigmail extension
179 #
180 ####################################
181
182 if use crypt && ! use moznomail; then
183 emake -C "${S}"/mailnews/extensions/enigmail || die "make enigmail failed"
184 fi
185 }
186
187 src_install() {
188 declare MOZILLA_FIVE_HOME=/usr/$(get_libdir)/${PN}
189
190 # Most of the installation happens here
191 dodir "${MOZILLA_FIVE_HOME}"
192 cp -RL "${S}"/dist/bin/* "${D}"/"${MOZILLA_FIVE_HOME}"/ || die "cp failed"
193
194 # Create directory structure to support portage-installed extensions.
195 # See update_chrome() in mozilla-launcher
196 keepdir ${MOZILLA_FIVE_HOME}/chrome.d
197 keepdir ${MOZILLA_FIVE_HOME}/extensions.d
198 cp "${D}"${MOZILLA_FIVE_HOME}/chrome/installed-chrome.txt \
199 "${D}"${MOZILLA_FIVE_HOME}/chrome.d/0_base-chrome.txt
200
201 # Create /usr/bin/seamonkey
202 install_mozilla_launcher_stub seamonkey ${MOZILLA_FIVE_HOME}
203
204 # Install icon and .desktop for menu entry
205 doicon "${FILESDIR}"/icon/${PN}.png
206 domenu "${FILESDIR}"/icon/${PN}.desktop
207
208 # Fix icons to look the same everywhere
209 insinto ${MOZILLA_FIVE_HOME}/icons
210 doins "${S}"/widget/src/gtk/mozicon16.xpm
211 doins "${S}"/widget/src/gtk/mozicon50.xpm
212
213 ####################################
214 #
215 # Install files necessary for applications to build against seamonkey
216 #
217 ####################################
218
219 einfo "Installing includes and idl files..."
220 cp -LfR "${S}"/dist/include "${D}"/"${MOZILLA_FIVE_HOME}" || die "cp failed"
221 cp -LfR "${S}"/dist/idl "${D}"/"${MOZILLA_FIVE_HOME}" || die "cp failed"
222
223 # Fix mozilla-config and install it
224 exeinto ${MOZILLA_FIVE_HOME}
225 doexe "${S}"/build/unix/${PN}-config
226
227 # Install pkgconfig files
228 insinto /usr/"$(get_libdir)"/pkgconfig
229 doins "${S}"/build/unix/*.pc
230
231 # Install env.d snippet, which isn't necessary for running mozilla, but
232 # might be necessary for programs linked against firefox
233 doenvd "${FILESDIR}"/10${PN}
234 dosed "s|/usr/lib|/usr/$(get_libdir)|" /etc/env.d/10${PN}
235
236 # Install rebuild script since mozilla-bin doesn't support registration yet
237 exeinto ${MOZILLA_FIVE_HOME}
238 doexe "${FILESDIR}"/${PN}-rebuild-databases.pl
239 dosed -e 's|/lib/|/'"$(get_libdir)"'/|g' \
240 ${MOZILLA_FIVE_HOME}/${PN}-rebuild-databases.pl
241
242 # Install docs
243 dodoc "${S}"/{LEGAL,LICENSE}
244
245 # Update Google search plugin to use UTF8 charset ...
246 insinto ${MOZILLA_FIVE_HOME}/searchplugins
247 doins "${FILESDIR}"/google.src
248 }
249
250 pkg_preinst() {
251 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
252
253 # Remove entire installed instance to solve various problems,
254 # for example see bug 27719
255 rm -rf "${ROOT}"${MOZILLA_FIVE_HOME}
256 }
257
258 pkg_postinst() {
259 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
260
261 # Update the component registry
262 MOZILLA_LIBDIR=${ROOT}${MOZILLA_FIVE_HOME} MOZILLA_LAUNCHER=${PN} \
263 /usr/libexec/mozilla-launcher -register
264
265 # This should be called in the postinst and postrm of all the
266 # mozilla, mozilla-bin, firefox, firefox-bin, thunderbird and
267 # thunderbird-bin ebuilds.
268 update_mozilla_launcher_symlinks
269 }
270
271 pkg_postrm() {
272 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
273
274 # Update the component registry
275 if [[ -x ${MOZILLA_FIVE_HOME}/${PN}-bin ]]; then
276 MOZILLA_LIBDIR=${ROOT}${MOZILLA_FIVE_HOME} MOZILLA_LAUNCHER=${PN} \
277 /usr/libexec/mozilla-launcher -register
278 fi
279
280 update_mozilla_launcher_symlinks
281 }

  ViewVC Help
Powered by ViewVC 1.1.20