/[gentoo-x86]/mail-client/thunderbird/thunderbird-11.0-r1.ebuild
Gentoo

Contents of /mail-client/thunderbird/thunderbird-11.0-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Fri Mar 30 00:26:25 2012 UTC (3 years, 4 months ago) by anarchy
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
FILE REMOVED
Fix possible imap issues, fix issue where mail rules might be erronously changed

(Portage version: 2.1.10.52/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/mail-client/thunderbird/thunderbird-11.0-r1.ebuild,v 1.2 2012/03/28 01:01:40 anarchy Exp $
4
5 EAPI="3"
6 WANT_AUTOCONF="2.1"
7 MOZ_ESR=""
8
9 # This list can be updated using scripts/get_langs.sh from the mozilla overlay
10 MOZ_LANGS=(ar ast be bg bn-BD br ca cs da de el en en-GB en-US es-AR es-ES et eu fi
11 fr fy-NL ga-IE gd gl he hu id is it ja ko lt nb-NO nl nn-NO pa-IN pl pt-BR pt-PT
12 rm ro ru si sk sl sq sr sv-SE ta-LK tr uk vi zh-CN zh-TW)
13
14 # Convert the ebuild version to the upstream mozilla version, used by mozlinguas
15 MOZ_PV="${PV/_beta/b}"
16 # ESR releases have slightly version numbers
17 if [[ ${MOZ_ESR} == 1 ]]; then
18 MOZ_PV="${MOZ_PV}esr"
19 fi
20 MOZ_P="${PN}-${MOZ_PV}"
21
22 # Enigmail version
23 EMVER="1.4"
24 # Upstream ftp release URI that's used by mozlinguas.eclass
25 # We don't use the http mirror because it deletes old tarballs.
26 MOZ_FTP_URI="ftp://ftp.mozilla.org/pub/${PN}/releases/"
27
28 inherit flag-o-matic toolchain-funcs mozconfig-3 makeedit multilib autotools pax-utils python check-reqs nsplugins mozlinguas
29
30 DESCRIPTION="Thunderbird Mail Client"
31 HOMEPAGE="http://www.mozilla.com/en-US/thunderbird/"
32
33 KEYWORDS="~alpha ~amd64 ~arm ~ppc ~ppc64 ~x86 ~x86-fbsd ~amd64-linux ~x86-linux"
34 SLOT="0"
35 LICENSE="|| ( MPL-1.1 GPL-2 LGPL-2.1 )"
36 IUSE="bindist gconf +crashreporter +crypt +ipc +lightning +minimal mozdom +webm"
37
38 PATCH="thunderbird-10.0-patches-0.1"
39 PATCHFF="firefox-11.0-patches-0.4"
40
41 SRC_URI="${SRC_URI}
42 ${MOZ_FTP_URI}${MOZ_PV}/source/${MOZ_P}.source.tar.bz2
43 crypt? ( http://www.mozilla-enigmail.org/download/source/enigmail-${EMVER}.tar.gz )
44 http://dev.gentoo.org/~anarchy/mozilla/patchsets/${PATCH}.tar.xz
45 http://dev.gentoo.org/~anarchy/mozilla/patchsets/${PATCHFF}.tar.xz"
46
47 ASM_DEPEND=">=dev-lang/yasm-1.1"
48
49 RDEPEND=">=sys-devel/binutils-2.16.1
50 >=dev-libs/nss-3.13.3
51 >=dev-libs/nspr-4.9
52 >=dev-libs/glib-2.26
53 crashreporter? ( net-misc/curl )
54 gconf? ( >=gnome-base/gconf-1.2.1:2 )
55 media-libs/libpng[apng]
56 >=x11-libs/cairo-1.10
57 >=x11-libs/pango-1.14.0
58 >=x11-libs/gtk+-2.14
59 webm? ( >=media-libs/libvpx-1.0.0
60 media-libs/alsa-lib )
61 virtual/libffi
62 !x11-plugins/enigmail
63 system-sqlite? ( >=dev-db/sqlite-3.7.7.1[fts3,secure-delete,unlock-notify,debug=] )
64 crypt? ( || (
65 ( >=app-crypt/gnupg-2.0
66 || (
67 app-crypt/pinentry[gtk]
68 app-crypt/pinentry[qt4]
69 )
70 )
71 =app-crypt/gnupg-1.4*
72 ) )"
73
74 DEPEND="${RDEPEND}
75 dev-util/pkgconfig
76 webm? ( x86? ( ${ASM_DEPEND} )
77 amd64? ( ${ASM_DEPEND} )
78 virtual/opengl )"
79
80 if [[ ${PV} =~ beta ]]; then
81 S="${WORKDIR}/comm-beta"
82 elif [[ ${MOZ_ESR} == 1 ]]; then
83 S="${WORKDIR}/comm-esr${PV%%.*}"
84 else
85 S="${WORKDIR}/comm-release"
86 fi
87
88 pkg_setup() {
89 moz_pkgsetup
90
91 export MOZILLA_DIR="${S}/mozilla"
92
93 if ! use bindist ; then
94 elog "You are enabling official branding. You may not redistribute this build"
95 elog "to any users on your network or the internet. Doing so puts yourself into"
96 elog "a legal problem with Mozilla Foundation"
97 elog "You can disable it by emerging ${PN} _with_ the bindist USE-flag"
98 elog
99 fi
100
101 # Ensure we have enough disk space to compile
102 CHECKREQS_DISK_BUILD="4G"
103 check-reqs_pkg_setup
104 }
105
106 src_unpack() {
107 unpack ${A}
108
109 # Unpack language packs
110 mozlinguas_src_unpack
111 }
112
113 src_prepare() {
114 # Apply our Thunderbird patchset
115 EPATCH_SUFFIX="patch" \
116 EPATCH_FORCE="yes" \
117 epatch "${WORKDIR}/thunderbird"
118
119 # Apply our patchset from firefox to thunderbird as well
120 pushd "${S}"/mozilla &>/dev/null || die
121 EPATCH_SUFFIX="patch" \
122 EPATCH_FORCE="yes" \
123 epatch "${WORKDIR}/firefox"
124 popd &>/dev/null || die
125
126 if use crypt ; then
127 mv "${WORKDIR}"/enigmail "${S}"/mailnews/extensions/enigmail
128 cd "${S}"
129 fi
130
131 #Fix compilation with curl-7.21.7 bug 376027
132 sed -e '/#include <curl\/types.h>/d' \
133 -i "${S}"/mozilla/toolkit/crashreporter/google-breakpad/src/common/linux/http_upload.cc \
134 -i "${S}"/mozilla/toolkit/crashreporter/google-breakpad/src/common/linux/libcurl_wrapper.cc \
135 -i "${S}"/mozilla/config/system-headers \
136 -i "${S}"/mozilla/js/src/config/system-headers || die "Sed failed"
137
138 # Allow user to apply any additional patches without modifing ebuild
139 epatch_user
140
141 eautoreconf
142 # Ensure we run eautoreconf in mozilla to regenerate configure
143 cd "${S}"/mozilla
144 eautoconf
145 }
146
147 src_configure() {
148 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
149 MEXTENSIONS="default"
150
151 ####################################
152 #
153 # mozconfig, CFLAGS and CXXFLAGS setup
154 #
155 ####################################
156
157 mozconfig_init
158 mozconfig_config
159
160 # It doesn't compile on alpha without this LDFLAGS
161 use alpha && append-ldflags "-Wl,--no-relax"
162
163 mozconfig_annotate '' --prefix="${EPREFIX}"/usr
164 mozconfig_annotate '' --libdir="${EPREFIX}"/usr/$(get_libdir)
165 mozconfig_annotate '' --enable-extensions="${MEXTENSIONS}"
166 mozconfig_annotate '' --with-default-mozilla-five-home="${EPREFIX}${MOZILLA_FIVE_HOME}"
167 mozconfig_annotate '' --with-user-appdir=.thunderbird
168 mozconfig_annotate '' --with-system-png
169 mozconfig_annotate '' --enable-system-ffi
170 mozconfig_annotate '' --target="${CTARGET:-${CHOST}}"
171
172 # Use enable features
173 mozconfig_use_enable lightning calendar
174 mozconfig_use_enable gconf
175
176 # Bug #72667
177 if use mozdom; then
178 MEXTENSIONS="${MEXTENSIONS},inspector"
179 fi
180
181 # Use an objdir to keep things organized.
182 echo "mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/tbird" >> "${S}"/.mozconfig
183
184 # Finalize and report settings
185 mozconfig_final
186
187 ####################################
188 #
189 # Configure and build
190 #
191 ####################################
192
193 # Disable no-print-directory
194 MAKEOPTS=${MAKEOPTS/--no-print-directory/}
195
196 if [[ $(gcc-major-version) -lt 4 ]]; then
197 append-cxxflags -fno-stack-protector
198 elif [[ $(gcc-major-version) -gt 4 || $(gcc-minor-version) -gt 3 ]]; then
199 if use amd64 || use x86; then
200 append-flags -mno-avx
201 fi
202 fi
203 }
204
205 src_compile() {
206 CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \
207 MOZ_MAKE_FLAGS="${MAKEOPTS}" \
208 emake -f client.mk || die
209
210 # Only build enigmail extension if crypt enabled.
211 if use crypt ; then
212 cd "${S}"/mailnews/extensions/enigmail || die
213 ./makemake -r 2&> /dev/null
214 cd "${S}"/tbird/mailnews/extensions/enigmail
215 emake || die "make enigmail failed"
216 emake xpi || die "make enigmail xpi failed"
217 fi
218 }
219
220 src_install() {
221 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
222 declare emid
223 local obj_dir="tbird"
224 cd "${S}/${obj_dir}"
225
226 # Copy our preference before omnijar is created.
227 cp "${FILESDIR}"/thunderbird-gentoo-default-prefs-1.js-1 \
228 "${S}/${obj_dir}/mozilla/dist/bin/defaults/pref/all-gentoo.js" || die
229
230 # Pax mark xpcshell for hardened support, only used for startupcache creation.
231 pax-mark m "${S}"/${obj_dir}/mozilla/dist/bin/xpcshell
232
233 emake DESTDIR="${D}" install || die "emake install failed"
234
235 # Install language packs
236 mozlinguas_src_install
237
238 if ! use bindist; then
239 newicon "${S}"/other-licenses/branding/thunderbird/content/icon48.png thunderbird-icon.png
240 domenu "${FILESDIR}"/icon/${PN}.desktop
241 else
242 newicon "${S}"/mail/branding/aurora/content/icon48.png thunderbird-icon-unbranded.png
243 newmenu "${FILESDIR}"/icon/${PN}-unbranded.desktop \
244 ${PN}.desktop
245
246 sed -i -e "s:Mozilla\ Thunderbird:EarlyBird:g" \
247 "${ED}"/usr/share/applications/${PN}.desktop
248 fi
249
250 if use crypt ; then
251 cd "${T}" || die
252 unzip "${S}"/${obj_dir}/mozilla/dist/bin/enigmail*.xpi install.rdf || die
253 emid=$(sed -n '/<em:id>/!d; s/.*\({.*}\).*/\1/; p; q' install.rdf)
254
255 dodir ${MOZILLA_FIVE_HOME}/extensions/${emid} || die
256 cd "${D}"${MOZILLA_FIVE_HOME}/extensions/${emid} || die
257 unzip "${S}"/${obj_dir}/mozilla/dist/bin/enigmail*.xpi || die
258 fi
259
260 if use lightning ; then
261 emid="{a62ef8ec-5fdc-40c2-873c-223b8a6925cc}"
262 dodir ${MOZILLA_FIVE_HOME}/extensions/${emid}
263 cd "${ED}"${MOZILLA_FIVE_HOME}/extensions/${emid}
264 unzip "${S}"/${obj_dir}/mozilla/dist/xpi-stage/gdata-provider.xpi
265
266 emid="calendar-timezones@mozilla.org"
267 dodir ${MOZILLA_FIVE_HOME}/extensions/${emid}
268 cd "${ED}"${MOZILLA_FIVE_HOME}/extensions/${emid}
269 unzip "${S}"/${obj_dir}/mozilla/dist/xpi-stage/calendar-timezones.xpi
270
271 emid="{e2fda1a4-762b-4020-b5ad-a41df1933103}"
272 dodir ${MOZILLA_FIVE_HOME}/extensions/${emid}
273 cd "${ED}"${MOZILLA_FIVE_HOME}/extensions/${emid}
274 unzip "${S}"/${obj_dir}/mozilla/dist/xpi-stage/lightning.xpi
275
276 # Fix mimetype so it shows up as a calendar application in GNOME 3
277 # This requires that the .desktop file was already installed earlier
278 sed -e "s:^\(MimeType=\):\1text/calendar;:" \
279 -e "s:^\(Categories=\):\1Calendar;:" \
280 -i "${ED}"/usr/share/applications/${PN}.desktop
281 fi
282
283 pax-mark m "${ED}"/${MOZILLA_FIVE_HOME}/thunderbird-bin
284
285 share_plugins_dir
286
287 if use minimal; then
288 rm -rf "${ED}"/usr/include "${ED}${MOZILLA_FIVE_HOME}"/{idl,include,lib,sdk} || \
289 die "Failed to remove sdk and headers"
290 fi
291 }
292
293 pkg_postinst() {
294 elog
295 elog "If you are experience problems with plugins please issue the"
296 elog "following command : rm \${HOME}/.thunderbird/*/extensions.sqlite ,"
297 elog "then restart thunderbird"
298 }

  ViewVC Help
Powered by ViewVC 1.1.20