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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.20