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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.9 - (show annotations) (download)
Sat Jan 20 10:57:39 2007 UTC (7 years, 10 months ago) by armin76
Branch: MAIN
CVS Tags: HEAD
Changes since 1.8: +1 -1 lines
FILE REMOVED
Drop old
(Portage version: 2.1.2-r1)

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

  ViewVC Help
Powered by ViewVC 1.1.20