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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Sun Jun 18 19:17:38 2006 UTC (8 years, 5 months ago) by anarchy
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
removed 1.0.1 which has security issues
(Portage version: 2.1.1_pre1)

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

  ViewVC Help
Powered by ViewVC 1.1.20