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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (show annotations) (download)
Sun Dec 20 17:40:13 2009 UTC (4 years, 9 months ago) by anarchy
Branch: MAIN
CVS Tags: HEAD
Changes since 1.6: +1 -1 lines
FILE REMOVED
cleanup dated/security builds
(Portage version: 2.1.7.15/cvs/Linux x86_64)

1 # Copyright 1999-2009 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.17.ebuild,v 1.6 2009/06/29 18:41:31 armin76 Exp $
4
5 WANT_AUTOCONF="2.1"
6
7 inherit flag-o-matic toolchain-funcs eutils mozcoreconf mozconfig-2 mozilla-launcher makeedit multilib autotools
8
9 PATCH="${PN}-1.1.15-patches-0.1"
10 EMVER="0.95.7"
11
12 DESCRIPTION="Mozilla Application Suite - web browser, email, HTML editor, IRC"
13 HOMEPAGE="http://www.seamonkey-project.org/"
14 SRC_URI="http://releases.mozilla.org/pub/mozilla.org/${PN}/releases/${PV}/${P}.source.tar.bz2
15 mirror://gentoo/${PATCH}.tar.bz2
16 crypt? ( !moznomail? ( http://www.mozilla-enigmail.org/download/source/enigmail-${EMVER}.tar.gz ) )"
17
18 KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc 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.56
25 >=dev-libs/nss-3.11.5
26 >=dev-libs/nspr-4.6.5-r1
27 crypt? ( !moznomail? ( >=app-crypt/gnupg-1.4 ) )"
28
29 DEPEND="${RDEPEND}
30 java? ( >=dev-java/java-config-0.2.0 )
31 dev-lang/perl
32 postgres? ( >=virtual/postgresql-server-7.2.0 )"
33
34 S="${WORKDIR}/mozilla"
35
36 # Needed by src_compile() and src_install().
37 # Would do in pkg_setup but that loses the export attribute, they
38 # become pure shell variables.
39 export MOZ_CO_PROJECT=suite
40 export BUILD_OFFICIAL=1
41 export MOZILLA_OFFICIAL=1
42
43 pkg_setup() {
44 if ! built_with_use x11-libs/cairo X; then
45 eerror "Cairo is not built with X useflag."
46 eerror "Please add 'X' to your USE flags, and re-emerge cairo."
47 die "Cairo needs X"
48 fi
49
50 if ! built_with_use --missing true x11-libs/pango X; then
51 eerror "Pango is not built with X useflag."
52 eerror "Please add 'X' to your USE flags, and re-emerge pango."
53 die "Pango needs X"
54 fi
55
56 use moznopango && warn_mozilla_launcher_stub
57 }
58
59 src_unpack() {
60 unpack ${P}.source.tar.bz2 ${PATCH}.tar.bz2
61
62 # Apply our patches
63 cd "${S}" || die "cd failed"
64 EPATCH_SUFFIX="patch" \
65 EPATCH_FORCE="yes" \
66 epatch "${WORKDIR}"/patch
67
68 # Unpack the enigmail plugin
69 if use crypt && ! use moznomail; then
70 cd "${S}"/mailnews/extensions || die
71 unpack enigmail-${EMVER}.tar.gz
72 cd "${S}"/mailnews/extensions/enigmail || die "cd failed"
73 makemake2
74 fi
75
76 # Fix scripts that call for /usr/local/bin/perl #51916
77 ebegin "Patching smime to call perl from /usr/bin"
78 sed -i -e '1s,usr/local/bin,usr/bin,' "${S}"/security/nss/cmd/smimetools/smime
79 eend $? || die "sed failed"
80
81 cd "${S}"
82 eautoreconf
83 }
84
85 src_compile() {
86 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
87
88 ####################################
89 #
90 # mozconfig, CFLAGS and CXXFLAGS setup
91 #
92 ####################################
93 mozconfig_init
94 mozconfig_config
95
96 mozconfig_annotate 'gentoo' --enable-canvas
97 mozconfig_annotate 'gentoo' --with-system-nspr
98 mozconfig_annotate 'gentoo' --with-system-nss
99
100 # Bug 60668: Galeon doesn't build without oji enabled, so enable it
101 # regardless of java setting.
102 mozconfig_annotate 'galeon' --enable-oji --enable-mathml
103
104 # Other moz-specific settings
105 mozconfig_use_enable mozdevelop jsd
106 mozconfig_use_enable mozdevelop xpctools
107 mozconfig_use_extension mozdevelop venkman
108
109 if use moznoirc; then
110 mozconfig_annotate '+moznocompose +moznoirc' --enable-extensions=-irc
111 fi
112
113 if use moznoroaming ; then
114 mozconfig_annotate '+moznoroaming' --enable-extensions=-sroaming
115 fi
116
117 if use postgres ; then
118 mozconfig_annotate '+postgres' --enable-extensions=sql
119 export MOZ_ENABLE_PGSQL=1
120 export MOZ_PGSQL_INCLUDES=/usr/include
121 export MOZ_PGSQL_LIBS=/usr/$(get_libdir)
122 fi
123
124 mozconfig_use_enable ldap
125 mozconfig_use_enable ldap ldap-experimental
126 mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME}
127 mozconfig_annotate '' --with-user-appdir=.mozilla
128
129 if use moznomail; then
130 mozconfig_annotate "+moznomail" --disable-mailnews
131 fi
132
133 if use moznocompose; then
134 if use moznoirc && use moznomail; then
135 mozconfig_annotate "+moznocompose" --disable-composer
136 fi
137 fi
138
139 if use xforms; then
140 mozconfig_annotate "+xforms" --enable-extensions=xforms,schema-validation
141 fi
142
143 # Finalize and report settings
144 mozconfig_final
145
146 if [[ $(gcc-major-version) -lt 4 ]]; then
147 append-cxxflags -fno-stack-protector
148 fi
149
150 ####################################
151 #
152 # Configure and build
153 #
154 ####################################
155
156 CPPFLAGS="${CPPFLAGS} -DARON_WAS_HERE" \
157 CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \
158 econf || die
159
160 # It would be great if we could pass these in via CPPFLAGS or CFLAGS prior
161 # to econf, but the quotes cause configure to fail.
162 sed -i -e \
163 's|-DARON_WAS_HERE|-DGENTOO_NSPLUGINS_DIR=\\\"/usr/'"$(get_libdir)"'/nsplugins\\\" -DGENTOO_NSBROWSER_PLUGINS_DIR=\\\"/usr/'"$(get_libdir)"'/nsbrowser/plugins\\\"|' \
164 "${S}"/config/autoconf.mk \
165 "${S}"/xpfe/global/buildconfig.html
166
167 # This removes extraneous CFLAGS from the Makefiles to reduce RAM
168 # requirements while compiling
169 edit_makefiles
170
171 emake || die
172
173 ####################################
174 #
175 # Build Enigmail extension
176 #
177 ####################################
178
179 if use crypt && ! use moznomail; then
180 emake -C "${S}"/mailnews/extensions/enigmail || die "make enigmail failed"
181 fi
182 }
183
184 src_install() {
185 declare MOZILLA_FIVE_HOME=/usr/$(get_libdir)/${PN}
186
187 # Most of the installation happens here
188 dodir "${MOZILLA_FIVE_HOME}"
189 cp -RL "${S}"/dist/bin/* "${D}"/"${MOZILLA_FIVE_HOME}"/ || die "cp failed"
190
191 # Create directory structure to support portage-installed extensions.
192 # See update_chrome() in mozilla-launcher
193 keepdir ${MOZILLA_FIVE_HOME}/chrome.d
194 keepdir ${MOZILLA_FIVE_HOME}/extensions.d
195 cp "${D}"${MOZILLA_FIVE_HOME}/chrome/installed-chrome.txt \
196 "${D}"${MOZILLA_FIVE_HOME}/chrome.d/0_base-chrome.txt
197
198 # Create /usr/bin/seamonkey
199 install_mozilla_launcher_stub seamonkey ${MOZILLA_FIVE_HOME}
200
201 # Install icon and .desktop for menu entry
202 doicon "${FILESDIR}"/icon/${PN}.png
203 domenu "${FILESDIR}"/icon/${PN}.desktop
204
205 # Fix icons to look the same everywhere
206 insinto ${MOZILLA_FIVE_HOME}/icons
207 doins "${S}"/widget/src/gtk/mozicon16.xpm
208 doins "${S}"/widget/src/gtk/mozicon50.xpm
209
210 ####################################
211 #
212 # Install files necessary for applications to build against seamonkey
213 #
214 ####################################
215
216 einfo "Installing includes and idl files..."
217 cp -LfR "${S}"/dist/include "${D}"/"${MOZILLA_FIVE_HOME}" || die "cp failed"
218 cp -LfR "${S}"/dist/idl "${D}"/"${MOZILLA_FIVE_HOME}" || die "cp failed"
219
220 # Fix mozilla-config and install it
221 exeinto ${MOZILLA_FIVE_HOME}
222 doexe "${S}"/build/unix/${PN}-config
223
224 # Install pkgconfig files
225 insinto /usr/"$(get_libdir)"/pkgconfig
226 doins "${S}"/build/unix/*.pc
227
228 # Install env.d snippet, which isn't necessary for running mozilla, but
229 # might be necessary for programs linked against firefox
230 doenvd "${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