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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.20