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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Wed Feb 28 18:17:31 2007 UTC (7 years, 7 months ago) by armin76
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +1 -1 lines
FILE REMOVED
version bump, security bug 165555
(Portage version: 2.1.2-r12)

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.1.ebuild,v 1.3 2007/01/30 21:42:28 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 mozdevelop moznocompose moznoirc moznomail moznoroaming postgres crypt xforms"
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 ${PATCH}.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 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; then
121 mozconfig_annotate "+moznomail" --disable-mailnews
122 fi
123
124 if use moznocompose; then
125 if use moznoirc && use moznomail; then
126 mozconfig_annotate "+moznocompose" --disable-composer
127 fi
128 fi
129
130 if use xforms; then
131 mozconfig_annotate "+xforms" --enable-extensions=xforms,schema-validation
132 fi
133
134 # Finalize and report settings
135 mozconfig_final
136
137 # hardened GCC uses -fstack-protector-all by default, which breaks us
138 gcc-specs-ssp && append-flags -fno-stack-protector-all
139 replace-flags -fstack-protector-all -fstack-protector
140
141 append-flags -freorder-blocks -fno-reorder-functions
142
143 ####################################
144 #
145 # Configure and build
146 #
147 ####################################
148
149 CPPFLAGS="${CPPFLAGS} -DARON_WAS_HERE" \
150 CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \
151 econf || die
152
153 # It would be great if we could pass these in via CPPFLAGS or CFLAGS prior
154 # to econf, but the quotes cause configure to fail.
155 sed -i -e \
156 's|-DARON_WAS_HERE|-DGENTOO_NSPLUGINS_DIR=\\\"/usr/'"$(get_libdir)"'/nsplugins\\\" -DGENTOO_NSBROWSER_PLUGINS_DIR=\\\"/usr/'"$(get_libdir)"'/nsbrowser/plugins\\\"|' \
157 ${S}/config/autoconf.mk \
158 ${S}/xpfe/global/buildconfig.html
159
160 # This removes extraneous CFLAGS from the Makefiles to reduce RAM
161 # requirements while compiling
162 edit_makefiles
163
164 emake -j1 || die
165
166 ####################################
167 #
168 # Build Enigmail extension
169 #
170 ####################################
171
172 if use crypt && ! use moznomail; then
173 emake -C ${S}/mailnews/extensions/enigmail || die "make enigmail failed"
174 fi
175 }
176
177 src_install() {
178 declare MOZILLA_FIVE_HOME=/usr/$(get_libdir)/${PN}
179
180 # Most of the installation happens here
181 dodir ${MOZILLA_FIVE_HOME}
182 cp -RL ${S}/dist/bin/* ${D}${MOZILLA_FIVE_HOME}
183
184 # Create directory structure to support portage-installed extensions.
185 # See update_chrome() in mozilla-launcher
186 keepdir ${MOZILLA_FIVE_HOME}/chrome.d
187 keepdir ${MOZILLA_FIVE_HOME}/extensions.d
188 cp ${D}${MOZILLA_FIVE_HOME}/chrome/installed-chrome.txt \
189 ${D}${MOZILLA_FIVE_HOME}/chrome.d/0_base-chrome.txt
190
191 # Create /usr/bin/mozilla
192 install_mozilla_launcher_stub seamonkey ${MOZILLA_FIVE_HOME}
193
194 # Install icon and .desktop for menu entry
195 insinto /usr/share/pixmaps
196 doins ${FILESDIR}/icon/${PN}.png
197
198 # Fix bug 54179: Install .desktop file into /usr/share/applications
199 # instead of /usr/share/gnome/apps/Internet (18 Jun 2004 agriffis)
200 insinto /usr/share/applications
201 doins ${FILESDIR}/icon/${PN}.desktop
202
203 # Fix icons to look the same everywhere
204 insinto ${MOZILLA_FIVE_HOME}/icons
205 doins ${S}/widget/src/gtk/mozicon16.xpm
206 doins ${S}/widget/src/gtk/mozicon50.xpm
207
208 ####################################
209 #
210 # Install files necessary for applications to build against mozilla
211 #
212 ####################################
213
214 einfo "Installing includes and idl files..."
215 dodir ${MOZILLA_FIVE_HOME}/{include,idl} /usr/include
216 cd ${S}/dist
217 cp -LfR include/* ${D}${MOZILLA_FIVE_HOME}/include
218 cp -LfR idl/* ${D}${MOZILLA_FIVE_HOME}/idl
219
220 # Fix mozilla-config and install it
221 exeinto ${MOZILLA_FIVE_HOME}
222 doexe ${S}/build/unix/${PN}-config
223
224 # Fix pkgconfig files and install them
225 insinto /usr/$(get_libdir)/pkgconfig
226 for x in ${S}/build/unix/*.pc; do
227 doins ${x}
228 done
229
230 # Install env.d snippet, which isn't necessary for running mozilla, but
231 # might be necessary for programs linked against firefox
232 insinto /etc/env.d
233 doins ${FILESDIR}/10${PN}
234 dosed "s|/usr/lib|/usr/$(get_libdir)|" /etc/env.d/10${PN}
235
236 # Install rebuild script since mozilla-bin doesn't support registration yet
237 exeinto ${MOZILLA_FIVE_HOME}
238 doexe ${FILESDIR}/${PN}-rebuild-databases.pl
239 dosed -e 's|/lib/|/'"$(get_libdir)"'/|g' \
240 ${MOZILLA_FIVE_HOME}/${PN}-rebuild-databases.pl
241
242 # Install docs
243 dodoc ${S}/{LEGAL,LICENSE}
244
245 # Update Google search plugin to use UTF8 charset ...
246 insinto ${MOZILLA_FIVE_HOME}/searchplugins
247 doins ${FILESDIR}/google.src
248 }
249
250 pkg_preinst() {
251 declare MOZILLA_FIVE_HOME=/usr/$(get_libdir)/${PN}
252
253 # Remove entire installed instance to solve various problems,
254 # for example see bug 27719
255 rm -rf ${ROOT}${MOZILLA_FIVE_HOME}
256 }
257
258 pkg_postinst() {
259 declare MOZILLA_FIVE_HOME=/usr/$(get_libdir)/${PN}
260
261 # Update the component registry
262 MOZILLA_LIBDIR=${ROOT}${MOZILLA_FIVE_HOME} MOZILLA_LAUNCHER=${PN} \
263 /usr/libexec/mozilla-launcher -register
264
265 # This should be called in the postinst and postrm of all the
266 # mozilla, mozilla-bin, firefox, firefox-bin, thunderbird and
267 # thunderbird-bin ebuilds.
268 update_mozilla_launcher_symlinks
269 }
270
271 pkg_postrm() {
272 declare MOZILLA_FIVE_HOME=/usr/$(get_libdir)/${PN}
273
274 # Update the component registry
275 if [[ -x ${MOZILLA_FIVE_HOME}/${PN}-bin ]]; then
276 MOZILLA_LIBDIR=${ROOT}${MOZILLA_FIVE_HOME} MOZILLA_LAUNCHER=${PN} \
277 /usr/libexec/mozilla-launcher -register
278 fi
279
280 update_mozilla_launcher_symlinks
281 }

  ViewVC Help
Powered by ViewVC 1.1.20