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

Contents of /www-client/seamonkey/seamonkey-2.8-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Tue May 8 09:31:49 2012 UTC (2 years, 2 months ago) by polynomial-c
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +1 -1 lines
FILE REMOVED
Added threadsafe USE flag to sqlite dependency (bug #415095)

(Portage version: 2.2.0_alpha101/cvs/Linux x86_64)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/www-client/seamonkey/seamonkey-2.8-r1.ebuild,v 1.3 2012/05/03 06:01:03 jdhore Exp $
4
5 EAPI="3"
6 WANT_AUTOCONF="2.1"
7
8 # This list can be updated with scripts/get_langs.sh from the mozilla overlay
9 MOZ_LANGS=(be ca cs de en-GB en-US es-AR es-ES fi fr gl hu it ja lt nb-NO nl pl
10 pt-PT ru sk sv-SE tr zh-CN)
11
12 MOZ_PV="${PV/_pre*}"
13 MOZ_PV="${MOZ_PV/_alpha/a}"
14 MOZ_PV="${MOZ_PV/_beta/b}"
15 MOZ_PV="${MOZ_PV/_rc/rc}"
16 MOZ_P="${PN}-${MOZ_PV}"
17
18 if [[ ${PV} == *_pre* ]] ; then
19 MOZ_FTP_URI="ftp://ftp.mozilla.org/pub/${PN}/nightly/${MOZ_PV}-candidates/build${PV##*_pre}"
20 MOZ_LANGPACK_PREFIX="linux-i686/xpi/"
21 # And the langpack stuff stays at eclass defaults
22 else
23 MOZ_FTP_URI="ftp://ftp.mozilla.org/pub/${PN}/releases/${MOZ_PV}"
24 MOZ_LANGPACK_PREFIX="langpack/${MOZ_P}."
25 MOZ_LANGPACK_SUFFIX=".langpack.xpi"
26 fi
27
28 inherit flag-o-matic toolchain-funcs eutils mozconfig-3 multilib pax-utils fdo-mime autotools mozextension python nsplugins mozlinguas
29
30 PATCHFF="firefox-11.0-patches-0.4"
31 PATCH="${PN}-2.7-patches-03"
32 EMVER="1.4"
33
34 DESCRIPTION="Seamonkey Web Browser"
35 HOMEPAGE="http://www.seamonkey-project.org"
36
37 if [[ ${PV} == *_pre* ]] ; then
38 # pre-releases. No need for arch teams to change KEYWORDS here.
39
40 KEYWORDS=""
41 else
42 # This is where arch teams should change the KEYWORDS.
43
44 KEYWORDS="~alpha ~amd64 ~arm ~ppc ~ppc64 ~x86"
45 fi
46
47 SLOT="0"
48 LICENSE="|| ( MPL-1.1 GPL-2 LGPL-2.1 )"
49 IUSE="+alsa +chatzilla +crypt +ipc +roaming system-sqlite +webm"
50
51 SRC_URI+="${SRC_URI}
52 ${MOZ_FTP_URI}/source/${MOZ_P}.source.tar.bz2 -> ${P}.source.tar.bz2
53 http://dev.gentoo.org/~anarchy/mozilla/patchsets/${PATCHFF}.tar.xz
54 http://dev.gentoo.org/~polynomial-c/mozilla/patchsets/${PATCH}.tar.xz
55 crypt? ( http://www.mozilla-enigmail.org/download/source/enigmail-${EMVER}.tar.gz )"
56
57 ASM_DEPEND=">=dev-lang/yasm-1.1"
58
59 # Mesa 7.10 needed for WebGL + bugfixes
60 RDEPEND=">=sys-devel/binutils-2.16.1
61 >=dev-libs/nss-3.13.2
62 >=dev-libs/nspr-4.9
63 >=dev-libs/glib-2.26
64 >=media-libs/mesa-7.10
65 >=media-libs/libpng-1.4.1[apng]
66 >=x11-libs/cairo-1.10
67 >=x11-libs/pango-1.14.0
68 >=x11-libs/gtk+-2.14
69 virtual/libffi
70 system-sqlite? ( >=dev-db/sqlite-3.7.7.1[fts3,secure-delete,unlock-notify,debug=] )
71 crypt? ( >=app-crypt/gnupg-1.4 )
72 webm? ( >=media-libs/libvpx-1.0.0
73 media-libs/alsa-lib )"
74
75 DEPEND="${RDEPEND}
76 virtual/pkgconfig
77 webm? ( amd64? ( ${ASM_DEPEND} )
78 x86? ( ${ASM_DEPEND} ) )"
79
80 if [[ ${PV} == *beta* ]] ; then
81 S="${WORKDIR}/comm-beta"
82 else
83 S="${WORKDIR}/comm-release"
84 fi
85
86 src_unpack() {
87 unpack ${A}
88
89 # Unpack language packs
90 mozlinguas_src_unpack
91 }
92
93 pkg_setup() {
94 if [[ ${PV} == *_pre* ]] ; then
95 ewarn "You're using an unofficial release of ${PN}. Don't file any bug in"
96 ewarn "Gentoo's Bugtracker against this package in case it breaks for you."
97 ewarn "Those belong to upstream: https://bugzilla.mozilla.org"
98 fi
99
100 moz_pkgsetup
101 }
102
103 src_prepare() {
104 # Apply our patches
105 EPATCH_SUFFIX="patch" \
106 EPATCH_FORCE="yes" \
107 epatch "${WORKDIR}/seamonkey"
108
109 # browser patches go here
110 pushd "${S}"/mozilla &>/dev/null || die
111 EPATCH_EXCLUDE="2000-firefox_gentoo_install_dirs.patch" \
112 EPATCH_SUFFIX="patch" \
113 EPATCH_FORCE="yes" \
114 epatch "${WORKDIR}/firefox"
115 popd &>/dev/null || die
116
117 # Allow user to apply any additional patches without modifing ebuild
118 epatch_user
119
120 if use crypt ; then
121 mv "${WORKDIR}"/enigmail "${S}"/mailnews/extensions/enigmail
122 #cd "${S}"/mailnews/extensions/enigmail || die
123 #cd "${S}"
124 fi
125
126 #Ensure we disable javaxpcom by default to prevent configure breakage
127 sed -i -e s:MOZ_JAVAXPCOM\=1::g "${S}"/mozilla/xulrunner/confvars.sh \
128 || die "sed javaxpcom"
129
130 # Disable gnomevfs extension
131 sed -i -e "s:gnomevfs::" "${S}/"suite/confvars.sh \
132 || die "Failed to remove gnomevfs extension"
133
134 eautoreconf
135 cd "${S}"/mozilla
136 eautoconf
137 }
138
139 src_configure() {
140 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
141 MEXTENSIONS=""
142
143 ####################################
144 #
145 # mozconfig, CFLAGS and CXXFLAGS setup
146 #
147 ####################################
148
149 mozconfig_init
150 mozconfig_config
151
152 # It doesn't compile on alpha without this LDFLAGS
153 use alpha && append-ldflags "-Wl,--no-relax"
154
155 if use chatzilla ; then
156 MEXTENSIONS+=",irc"
157 else
158 MEXTENSIONS+=",-irc"
159 fi
160 if ! use roaming ; then
161 MEXTENSIONS+=",-sroaming"
162 fi
163
164 mozconfig_annotate '' --prefix="${EPREFIX}"/usr
165 mozconfig_annotate '' --libdir="${EPREFIX}"/usr/$(get_libdir)
166 mozconfig_annotate '' --enable-extensions="${MEXTENSIONS}"
167 mozconfig_annotate '' --disable-gconf
168 mozconfig_annotate '' --enable-jsd
169 mozconfig_annotate '' --enable-canvas
170 mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME}
171 mozconfig_annotate '' --enable-system-ffi
172 mozconfig_annotate '' --with-system-png
173 mozconfig_annotate '' --target="${CTARGET:-${CHOST}}"
174
175 mozconfig_use_enable system-sqlite
176 mozconfig_use_enable methodjit
177
178 # Use an objdir to keep things organized.
179 echo "mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/seamonk" \
180 >> "${S}"/.mozconfig
181
182 # Finalize and report settings
183 mozconfig_final
184
185 # Work around breakage in makeopts with --no-print-directory
186 MAKEOPTS="${MAKEOPTS/--no-print-directory/}"
187
188 if [[ $(gcc-major-version) -lt 4 ]] ; then
189 append-cxxflags -fno-stack-protector
190 elif [[ $(gcc-major-version) -gt 4 || $(gcc-minor-version) -gt 3 ]] ; then
191 if use amd64 || use x86 ; then
192 append-flags -mno-avx
193 fi
194 fi
195 }
196
197 src_compile() {
198 CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \
199 MOZ_MAKE_FLAGS="${MAKEOPTS}" \
200 emake -f client.mk || die
201
202 # Only build enigmail extension if conditions are met.
203 if use crypt ; then
204 cd "${S}"/mailnews/extensions/enigmail || die
205 ./makemake -r 2&> /dev/null
206 cd "${S}"/seamonk/mailnews/extensions/enigmail
207 emake || die "make enigmail failed"
208 emake xpi || die "make enigmail xpi failed"
209 fi
210 }
211
212 src_install() {
213 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
214 declare emid
215 local obj_dir="seamonk"
216 cd "${S}/${obj_dir}"
217
218 # Copy our preference before omnijar is created.
219 sed "s|SEAMONKEY_PVR|${PVR}|" "${FILESDIR}"/all-gentoo-1.js > \
220 "${S}/${obj_dir}/mozilla/dist/bin/defaults/pref/all-gentoo.js" \
221 || die
222
223 pax-mark m "${S}"/dist/bin/xpcshell
224
225 emake DESTDIR="${D}" install || die "emake install failed"
226 cp -f "${FILESDIR}"/icon/${PN}.desktop "${T}" || die
227
228 if use crypt ; then
229 cd "${T}" || die
230 unzip "${S}"/${obj_dir}/mozilla/dist/bin/enigmail*.xpi install.rdf || die
231 emid=$(sed -n '/<em:id>/!d; s/.*\({.*}\).*/\1/; p; q' install.rdf)
232
233 dodir ${MOZILLA_FIVE_HOME}/extensions/${emid} || die
234 cd "${D}"${MOZILLA_FIVE_HOME}/extensions/${emid} || die
235 unzip "${S}"/${obj_dir}/mozilla/dist/bin/enigmail*.xpi || die
236
237 cd "${S}" || die
238 fi
239
240 sed 's|^\(MimeType=.*\)$|\1text/x-vcard;text/directory;application/mbox;message/rfc822;x-scheme-handler/mailto;|' \
241 -i "${T}"/${PN}.desktop || die
242 sed 's|^\(Categories=.*\)$|\1Email;|' -i "${T}"/${PN}.desktop \
243 || die
244
245 # Install language packs
246 mozlinguas_src_install
247
248 # Add StartupNotify=true bug 290401
249 if use startup-notification ; then
250 echo "StartupNotify=true" >> "${T}"/${PN}.desktop
251 fi
252
253 # Install icon and .desktop for menu entry
254 newicon "${S}"/suite/branding/nightly/content/icon64.png ${PN}.png \
255 || die
256 domenu "${T}"/${PN}.desktop || die
257
258 # Required in order to use plugins and even run seamonkey on hardened.
259 pax-mark m "${ED}"${MOZILLA_FIVE_HOME}/{seamonkey,seamonkey-bin,plugin-container}
260
261 # Handle plugins dir through nsplugins.eclass
262 share_plugins_dir
263
264 doman "${S}"/${obj_dir}/suite/app/${PN}.1 || die
265 }
266
267 pkg_preinst() {
268 declare MOZILLA_FIVE_HOME="${ROOT}/usr/$(get_libdir)/${PN}"
269
270 if [ -d ${MOZILLA_FIVE_HOME}/plugins ] ; then
271 rm ${MOZILLA_FIVE_HOME}/plugins -rf
272 fi
273 }
274
275 pkg_postinst() {
276 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
277
278 # Update mimedb for the new .desktop file
279 fdo-mime_desktop_database_update
280
281 if use chatzilla ; then
282 elog "chatzilla is now an extension which can be en-/disabled and configured via"
283 elog "the Add-on manager."
284 fi
285 }

  ViewVC Help
Powered by ViewVC 1.1.20