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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Wed Jun 13 13:54:33 2007 UTC (7 years, 4 months ago) by armin76
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +1 -1 lines
FILE REMOVED
Remove forced MAKEOPTS, bug 181722, remove old
(Portage version: 2.1.2.9)

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

  ViewVC Help
Powered by ViewVC 1.1.20