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

Contents of /www-client/seamonkey/seamonkey-1.0-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Sun May 21 18:03:56 2006 UTC (8 years, 3 months ago) by anarchy
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
reision bump, including security fixes. pkg_setup removed, to be redone at a later time.
(Portage version: 2.1_rc1-r3)
 (Unsigned Manifest commit)

1 # Copyright 1999-2006 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.0-r1.ebuild,v 1.1 2006/03/26 01:03:10 anarchy Exp $
4
5 unset ALLOWED_FLAGS # Stupid extra-functions.sh ... bug 49179
6 inherit flag-o-matic toolchain-funcs eutils mozcoreconf mozconfig-2 mozilla-launcher makeedit multilib autotools
7
8 PVER="0.4"
9 EMVER="0.94.0"
10
11 DESCRIPTION="Mozilla Application Suite - web browser, email, HTML editor, IRC"
12 HOMEPAGE="http://www.mozilla.org"
13 SRC_URI="http://ftp.mozilla.org/pub/mozilla.org/${PN}/releases/${PV}/${P}.source.tar.bz2
14 mirror://gentoo/${P}-patches-${PVER}.tar.bz2
15 http://dev.gentoo.org/~anarchy/dist/${P}-patches-${PVER}.tar.bz2
16 crypt? ( !moznomail? ( http://www.mozilla-enigmail.org/downloads/src/enigmail-${EMVER}.tar.gz ) )"
17
18 KEYWORDS="~amd64 ~ppc ~x86"
19 SLOT="0"
20 LICENSE="MPL-1.1 NPL-1.1"
21 IUSE="java ldap mozcalendar mozdevelop moznocompose moznoirc moznomail moznoroaming postgres crypt"
22
23 RDEPEND="java? ( virtual/jre )
24 >=www-client/mozilla-launcher-1.47
25 >=dev-libs/nss-3.10
26 >=dev-libs/nspr-4.6.1
27 crypt? ( !moznomail? ( >=app-crypt/gnupg-1.4 ) )"
28
29 DEPEND="${RDEPEND}
30 ~sys-devel/autoconf-2.13
31 java? ( >=dev-java/java-config-0.2.0 )
32 dev-lang/perl
33 postgres? ( >=dev-db/postgresql-7.2.0 )
34 !www-client/mozilla"
35
36 S=${WORKDIR}/mozilla
37
38 pkg_setup() {
39 if ! use moznoirc && use moznocompose; then
40 ewarn ""
41 ewarn "It looks like you want to have Chatzilla but don't want to have"
42 ewarn "Composer. This cannot be done, because Chatzilla does not work"
43 ewarn "without Composer. Composer will be build."
44 ewarn ""
45 ewarn "Continuing in 10 seconds.."
46 ewarn ""
47 epause 10
48 fi
49 if use mozcalendar && use moznomail; then
50 ewarn ""
51 ewarn "It looks like you want to have Calendar but don't want to have"
52 ewarn "Mail. This cannot be done, because Calendar does not work"
53 ewarn "without Mail. Mail will be build."
54 ewarn ""
55 ewarn "Continuing in 10 seconds.."
56 ewarn ""
57 epause 10
58 fi
59 if ! use moznomail && use moznocompose; then
60 ewarn ""
61 ewarn "It looks like you want to have Mail but don't want to have"
62 ewarn "Composer. This cannot be done, because Mail does not work"
63 ewarn "without Composer. Composer will be build."
64 ewarn ""
65 ewarn "Continuing in 10 seconds.."
66 ewarn ""
67 epause 10
68 fi
69 }
70
71 src_unpack() {
72 unpack ${P}.source.tar.bz2 ${P}-patches-${PVER}.tar.bz2
73
74 cd ${S} || die "cd failed"
75 EPATCH_FORCE="yes" epatch ${WORKDIR}/patch
76
77 # Unpack the enigmail plugin
78 if use crypt && ! use moznomail; then
79 cd ${S}/mailnews/extensions || die
80 unpack enigmail-${EMVER}.tar.gz
81 cd ${S}/mailnews/extensions/enigmail || die "cd failed"
82 makemake2
83 fi
84
85 # Fix scripts that call for /usr/local/bin/perl #51916
86 ebegin "Patching smime to call perl from /usr/bin"
87 sed -i -e '1s,usr/local/bin,usr/bin,' ${S}/security/nss/cmd/smimetools/smime
88 eend $? || die "sed failed"
89
90 # Fix a compilation issue using the 32-bit userland with 64-bit kernel on
91 # PowerPC, because with that configuration, mozilla detects a ppc64 system.
92 # -- hansmi, 2005-10-02
93 if use ppc && [[ "${PROFILE_ARCH}" == ppc64 ]]; then
94 sed -i -e "s#OS_TEST=\`uname -m\`\$#OS_TEST=${ARCH}#" \
95 ${S}/configure.in
96 sed -i -e "s#OS_TEST :=.*uname -m.*\$#OS_TEST:=${ARCH}#" \
97 ${S}/security/coreconf/arch.mk
98 fi
99
100 cd ${S}
101 # Needed by some of the patches
102 WANT_AUTOCONF=2.1 autoconf || die "WANT_AUTOCONF failed"
103 }
104
105 src_compile() {
106 declare MOZILLA_FIVE_HOME=/usr/$(get_libdir)/${PN}
107
108 ####################################
109 #
110 # mozconfig, CFLAGS and CXXFLAGS setup
111 #
112 ####################################
113 mozconfig_init
114 mozconfig_config
115
116 mozconfig_annotate 'gentoo' --enable-canvas
117 mozconfig_annotate 'gentoo' --with-system-nspr
118 mozconfig_annotate 'gentoo' --with-system-nss
119
120 # Bug 60668: Galeon doesn't build without oji enabled, so enable it
121 # regardless of java setting.
122 mozconfig_annotate 'galeon' --enable-oji --enable-mathml
123
124 # Other moz-specific settings
125 mozconfig_use_enable mozdevelop jsd
126 mozconfig_use_enable mozdevelop xpctools
127 mozconfig_use_extension mozdevelop venkman
128
129 if use moznoirc; then
130 mozconfig_annotate '+moznocompose +moznoirc' --enable-extensions=-irc
131 fi
132
133 if use moznoroaming ; then
134 mozconfig_annotate '+moznoroaming' --enable-extensions=-sroaming
135 fi
136
137 if use postgres ; then
138 mozconfig_annotate '+postgres' --enable-extensions=sql
139 export MOZ_ENABLE_PGSQL=1
140 export MOZ_PGSQL_INCLUDES=/usr/include
141 export MOZ_PGSQL_LIBS=/usr/$(get_libdir)
142 fi
143
144 mozconfig_use_enable mozcalendar calendar
145 mozconfig_use_enable ldap
146 mozconfig_use_enable ldap ldap-experimental
147 mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME}
148 mozconfig_annotate '' --with-user-appdir=.mozilla
149
150 if use moznomail && ! use mozcalendar; then
151 mozconfig_annotate "+moznomail -mozcalendar" --disable-mailnews
152 fi
153
154 if use moznocompose && ! use mozcalendar; then
155 if use moznoirc && use moznomail; then
156 mozconfig_annotate "+moznocompose" --disable-composer
157 fi
158 fi
159
160 # Finalize and report settings
161 mozconfig_final
162
163 # hardened GCC uses -fstack-protector-all by default, which breaks us
164 has_hardened && append-flags -fno-stack-protector-all
165 replace-flags -fstack-protector-all -fstack-protector
166
167 append-flags -freorder-blocks -fno-reorder-functions
168
169 ####################################
170 #
171 # Configure and build
172 #
173 ####################################
174
175 CPPFLAGS="${CPPFLAGS} -DARON_WAS_HERE" \
176 CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \
177 econf || die
178
179 # It would be great if we could pass these in via CPPFLAGS or CFLAGS prior
180 # to econf, but the quotes cause configure to fail.
181 sed -i -e \
182 's|-DARON_WAS_HERE|-DGENTOO_NSPLUGINS_DIR=\\\"/usr/'"$(get_libdir)"'/nsplugins\\\" -DGENTOO_NSBROWSER_PLUGINS_DIR=\\\"/usr/'"$(get_libdir)"'/nsbrowser/plugins\\\"|' \
183 ${S}/config/autoconf.mk \
184 ${S}/nsprpub/config/autoconf.mk \
185 ${S}/xpfe/global/buildconfig.html
186
187 # This removes extraneous CFLAGS from the Makefiles to reduce RAM
188 # requirements while compiling
189 edit_makefiles
190
191 emake || die
192
193 ####################################
194 #
195 # Build Enigmail extension
196 #
197 ####################################
198
199 if use crypt && ! use moznomail; then
200 emake -C ${S}/mailnews/extensions/enigmail || die "make enigmail failed"
201 fi
202 }
203
204 src_install() {
205 declare MOZILLA_FIVE_HOME=/usr/$(get_libdir)/${PN}
206
207 # Most of the installation happens here
208 dodir ${MOZILLA_FIVE_HOME}
209 cp -RL ${S}/dist/bin/* ${D}${MOZILLA_FIVE_HOME}
210
211 # Create directory structure to support portage-installed extensions.
212 # See update_chrome() in mozilla-launcher
213 keepdir ${MOZILLA_FIVE_HOME}/chrome.d
214 keepdir ${MOZILLA_FIVE_HOME}/extensions.d
215 cp ${D}${MOZILLA_FIVE_HOME}/chrome/installed-chrome.txt \
216 ${D}${MOZILLA_FIVE_HOME}/chrome.d/0_base-chrome.txt
217
218 # Create /usr/bin/mozilla
219 install_mozilla_launcher_stub seamonkey ${MOZILLA_FIVE_HOME}
220
221 # Install icon and .desktop for menu entry
222 insinto /usr/share/pixmaps
223 doins ${FILESDIR}/icon/${PN}.png
224
225 # Fix bug 54179: Install .desktop file into /usr/share/applications
226 # instead of /usr/share/gnome/apps/Internet (18 Jun 2004 agriffis)
227 insinto /usr/share/applications
228 doins ${FILESDIR}/icon/${PN}.desktop
229
230 # Fix icons to look the same everywhere
231 insinto ${MOZILLA_FIVE_HOME}/icons
232 doins ${S}/widget/src/gtk/mozicon16.xpm
233 doins ${S}/widget/src/gtk/mozicon50.xpm
234
235 ####################################
236 #
237 # Install files necessary for applications to build against mozilla
238 #
239 ####################################
240
241 einfo "Installing includes and idl files..."
242 dodir ${MOZILLA_FIVE_HOME}/{include,idl} /usr/include
243 cd ${S}/dist
244 cp -LfR include/* ${D}${MOZILLA_FIVE_HOME}/include
245 cp -LfR idl/* ${D}${MOZILLA_FIVE_HOME}/idl
246
247 # Fix mozilla-config and install it
248 exeinto ${MOZILLA_FIVE_HOME}
249 doexe ${S}/build/unix/${PN}-config
250
251 # Fix pkgconfig files and install them
252 insinto /usr/$(get_libdir)/pkgconfig
253 for x in ${S}/build/unix/*.pc; do
254 doins ${x}
255 done
256
257 # Install env.d snippet, which isn't necessary for running mozilla, but
258 # might be necessary for programs linked against firefox
259 insinto /etc/env.d
260 doins ${FILESDIR}/10${PN}
261 dosed "s|/usr/lib|/usr/$(get_libdir)|" /etc/env.d/10${PN}
262
263 # Install rebuild script since mozilla-bin doesn't support registration yet
264 exeinto ${MOZILLA_FIVE_HOME}
265 doexe ${FILESDIR}/${PN}-rebuild-databases.pl
266 dosed -e 's|/lib/|/'"$(get_libdir)"'/|g' \
267 ${MOZILLA_FIVE_HOME}/${PN}-rebuild-databases.pl
268
269 # Install docs
270 dodoc ${S}/{LEGAL,LICENSE}
271
272 # Update Google search plugin to use UTF8 charset ...
273 insinto ${MOZILLA_FIVE_HOME}/searchplugins
274 doins ${FILESDIR}/google.src
275 }
276
277 pkg_preinst() {
278 declare MOZILLA_FIVE_HOME=/usr/$(get_libdir)/${PN}
279
280 # Remove entire installed instance to solve various problems,
281 # for example see bug 27719
282 rm -rf ${ROOT}${MOZILLA_FIVE_HOME}
283 }
284
285 pkg_postinst() {
286 declare MOZILLA_FIVE_HOME=/usr/$(get_libdir)/${PN}
287
288 # Update the component registry
289 MOZILLA_LIBDIR=${ROOT}${MOZILLA_FIVE_HOME} MOZILLA_LAUNCHER=${PN} \
290 /usr/libexec/mozilla-launcher -register
291
292 # This should be called in the postinst and postrm of all the
293 # mozilla, mozilla-bin, firefox, firefox-bin, thunderbird and
294 # thunderbird-bin ebuilds.
295 update_mozilla_launcher_symlinks
296 }
297
298 pkg_postrm() {
299 declare MOZILLA_FIVE_HOME=/usr/$(get_libdir)/${PN}
300
301 # Update the component registry
302 if [[ -x ${MOZILLA_FIVE_HOME}/${PN}-bin ]]; then
303 MOZILLA_LIBDIR=${ROOT}${MOZILLA_FIVE_HOME} MOZILLA_LAUNCHER=${PN} \
304 /usr/libexec/mozilla-launcher -register
305 fi
306
307 update_mozilla_launcher_symlinks
308 }

  ViewVC Help
Powered by ViewVC 1.1.20