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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.8 - (show annotations) (download)
Mon Nov 12 21:23:03 2007 UTC (6 years, 8 months ago) by armin76
Branch: MAIN
CVS Tags: HEAD
Changes since 1.7: +1 -1 lines
FILE REMOVED
old
(Portage version: 2.1.3.19)

1 # Copyright 1999-2007 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.4.ebuild,v 1.7 2007/08/28 18:26:07 jer 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="${PN}-1.1.1-patches-0.2"
10 EMVER="0.95.2"
11
12 DESCRIPTION="Mozilla Application Suite - web browser, email, HTML editor, IRC"
13 HOMEPAGE="http://www.mozilla.org/projects/seamonkey/"
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/downloads/src/enigmail-${EMVER}.tar.gz ) )"
17
18 KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 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? ( >=dev-db/postgresql-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 use moznopango && warn_mozilla_launcher_stub
45 }
46
47 src_unpack() {
48 unpack ${P}.source.tar.bz2 ${PATCH}.tar.bz2
49
50 # Apply our patches
51 cd "${S}" || die "cd failed"
52 EPATCH_SUFFIX="patch" \
53 EPATCH_FORCE="yes" \
54 epatch "${WORKDIR}"/patch
55
56 # Unpack the enigmail plugin
57 if use crypt && ! use moznomail; then
58 cd ${S}/mailnews/extensions || die
59 unpack enigmail-${EMVER}.tar.gz
60 cd ${S}/mailnews/extensions/enigmail || die "cd failed"
61 makemake2
62 fi
63
64 # Fix scripts that call for /usr/local/bin/perl #51916
65 ebegin "Patching smime to call perl from /usr/bin"
66 sed -i -e '1s,usr/local/bin,usr/bin,' ${S}/security/nss/cmd/smimetools/smime
67 eend $? || die "sed failed"
68
69 cd "${S}"
70 eautoreconf
71 }
72
73 src_compile() {
74 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
75
76 ####################################
77 #
78 # mozconfig, CFLAGS and CXXFLAGS setup
79 #
80 ####################################
81 mozconfig_init
82 mozconfig_config
83
84 mozconfig_annotate 'gentoo' --enable-canvas
85 mozconfig_annotate 'gentoo' --with-system-nspr
86 mozconfig_annotate 'gentoo' --with-system-nss
87
88 # Bug 60668: Galeon doesn't build without oji enabled, so enable it
89 # regardless of java setting.
90 mozconfig_annotate 'galeon' --enable-oji --enable-mathml
91
92 # Other moz-specific settings
93 mozconfig_use_enable mozdevelop jsd
94 mozconfig_use_enable mozdevelop xpctools
95 mozconfig_use_extension mozdevelop venkman
96
97 if use moznoirc; then
98 mozconfig_annotate '+moznocompose +moznoirc' --enable-extensions=-irc
99 fi
100
101 if use moznoroaming ; then
102 mozconfig_annotate '+moznoroaming' --enable-extensions=-sroaming
103 fi
104
105 if use postgres ; then
106 mozconfig_annotate '+postgres' --enable-extensions=sql
107 export MOZ_ENABLE_PGSQL=1
108 export MOZ_PGSQL_INCLUDES=/usr/include
109 export MOZ_PGSQL_LIBS=/usr/$(get_libdir)
110 fi
111
112 mozconfig_use_enable ldap
113 mozconfig_use_enable ldap ldap-experimental
114 mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME}
115 mozconfig_annotate '' --with-user-appdir=.mozilla
116
117 if use moznomail; then
118 mozconfig_annotate "+moznomail" --disable-mailnews
119 fi
120
121 if use moznocompose; then
122 if use moznoirc && use moznomail; then
123 mozconfig_annotate "+moznocompose" --disable-composer
124 fi
125 fi
126
127 if use xforms; then
128 mozconfig_annotate "+xforms" --enable-extensions=xforms,schema-validation
129 fi
130
131 # Finalize and report settings
132 mozconfig_final
133
134 # -fstack-protector breaks us
135 if gcc-version ge 4 1; then
136 gcc-specs-ssp && append-flags -fno-stack-protector
137 else
138 gcc-specs-ssp && append-flags -fno-stack-protector-all
139 fi
140 filter-flags -fstack-protector -fstack-protector-all
141
142 ####################################
143 #
144 # Configure and build
145 #
146 ####################################
147
148 CPPFLAGS="${CPPFLAGS} -DARON_WAS_HERE" \
149 CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \
150 econf || die
151
152 # It would be great if we could pass these in via CPPFLAGS or CFLAGS prior
153 # to econf, but the quotes cause configure to fail.
154 sed -i -e \
155 's|-DARON_WAS_HERE|-DGENTOO_NSPLUGINS_DIR=\\\"/usr/'"$(get_libdir)"'/nsplugins\\\" -DGENTOO_NSBROWSER_PLUGINS_DIR=\\\"/usr/'"$(get_libdir)"'/nsbrowser/plugins\\\"|' \
156 ${S}/config/autoconf.mk \
157 ${S}/xpfe/global/buildconfig.html
158
159 # This removes extraneous CFLAGS from the Makefiles to reduce RAM
160 # requirements while compiling
161 edit_makefiles
162
163 emake || die
164
165 ####################################
166 #
167 # Build Enigmail extension
168 #
169 ####################################
170
171 if use crypt && ! use moznomail; then
172 emake -C ${S}/mailnews/extensions/enigmail || die "make enigmail failed"
173 fi
174 }
175
176 src_install() {
177 declare MOZILLA_FIVE_HOME=/usr/$(get_libdir)/${PN}
178
179 # Most of the installation happens here
180 dodir "${MOZILLA_FIVE_HOME}"
181 cp -RL "${S}"/dist/bin/* "${D}"/"${MOZILLA_FIVE_HOME}"/ || die "cp failed"
182
183 # Create directory structure to support portage-installed extensions.
184 # See update_chrome() in mozilla-launcher
185 keepdir ${MOZILLA_FIVE_HOME}/chrome.d
186 keepdir ${MOZILLA_FIVE_HOME}/extensions.d
187 cp ${D}${MOZILLA_FIVE_HOME}/chrome/installed-chrome.txt \
188 ${D}${MOZILLA_FIVE_HOME}/chrome.d/0_base-chrome.txt
189
190 # Create /usr/bin/seamonkey
191 install_mozilla_launcher_stub seamonkey ${MOZILLA_FIVE_HOME}
192
193 # Install icon and .desktop for menu entry
194 doicon ${FILESDIR}/icon/${PN}.png
195 domenu ${FILESDIR}/icon/${PN}.desktop
196
197 # Fix icons to look the same everywhere
198 insinto ${MOZILLA_FIVE_HOME}/icons
199 doins ${S}/widget/src/gtk/mozicon16.xpm
200 doins ${S}/widget/src/gtk/mozicon50.xpm
201
202 ####################################
203 #
204 # Install files necessary for applications to build against seamonkey
205 #
206 ####################################
207
208 elog "Installing includes and idl files..."
209 cp -LfR "${S}"/dist/include "${D}"/"${MOZILLA_FIVE_HOME}" || die "cp failed"
210 cp -LfR "${S}"/dist/idl "${D}"/"${MOZILLA_FIVE_HOME}" || die "cp failed"
211
212 # Fix mozilla-config and install it
213 exeinto ${MOZILLA_FIVE_HOME}
214 doexe ${S}/build/unix/${PN}-config
215
216 # Install pkgconfig files
217 insinto /usr/"$(get_libdir)"/pkgconfig
218 doins "${S}"/build/unix/*.pc
219
220 # Install env.d snippet, which isn't necessary for running mozilla, but
221 # might be necessary for programs linked against firefox
222 doenvd ${FILESDIR}/10${PN}
223 dosed "s|/usr/lib|/usr/$(get_libdir)|" /etc/env.d/10${PN}
224
225 # Install rebuild script since mozilla-bin doesn't support registration yet
226 exeinto ${MOZILLA_FIVE_HOME}
227 doexe ${FILESDIR}/${PN}-rebuild-databases.pl
228 dosed -e 's|/lib/|/'"$(get_libdir)"'/|g' \
229 ${MOZILLA_FIVE_HOME}/${PN}-rebuild-databases.pl
230
231 # Install docs
232 dodoc ${S}/{LEGAL,LICENSE}
233
234 # Update Google search plugin to use UTF8 charset ...
235 insinto ${MOZILLA_FIVE_HOME}/searchplugins
236 doins ${FILESDIR}/google.src
237 }
238
239 pkg_preinst() {
240 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
241
242 # Remove entire installed instance to solve various problems,
243 # for example see bug 27719
244 rm -rf ${ROOT}${MOZILLA_FIVE_HOME}
245 }
246
247 pkg_postinst() {
248 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
249
250 # Update the component registry
251 MOZILLA_LIBDIR=${ROOT}${MOZILLA_FIVE_HOME} MOZILLA_LAUNCHER=${PN} \
252 /usr/libexec/mozilla-launcher -register
253
254 # This should be called in the postinst and postrm of all the
255 # mozilla, mozilla-bin, firefox, firefox-bin, thunderbird and
256 # thunderbird-bin ebuilds.
257 update_mozilla_launcher_symlinks
258 }
259
260 pkg_postrm() {
261 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
262
263 # Update the component registry
264 if [[ -x ${MOZILLA_FIVE_HOME}/${PN}-bin ]]; then
265 MOZILLA_LIBDIR=${ROOT}${MOZILLA_FIVE_HOME} MOZILLA_LAUNCHER=${PN} \
266 /usr/libexec/mozilla-launcher -register
267 fi
268
269 update_mozilla_launcher_symlinks
270 }

  ViewVC Help
Powered by ViewVC 1.1.20