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

Contents of /mail-client/thunderbird/thunderbird-10.0.6.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.8 - (show annotations) (download)
Fri Feb 22 14:30:06 2013 UTC (17 months, 3 weeks ago) by polynomial-c
Branch: MAIN
CVS Tags: HEAD
Changes since 1.7: +1 -1 lines
FILE REMOVED
Security bump (bug #458390). Removed old

(Portage version: 2.2.0_alpha163/cvs/Linux x86_64, signed Manifest commit with key 0x981CA6FC)

1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/mail-client/thunderbird/thunderbird-10.0.6.ebuild,v 1.7 2013/01/16 19:02:15 mgorny Exp $
4
5 EAPI="3"
6 WANT_AUTOCONF="2.1"
7 MOZ_ESR="1"
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.3.5"
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 check-reqs nsplugins mozlinguas
29
30 DESCRIPTION="Thunderbird Mail Client"
31 HOMEPAGE="http://www.mozilla.com/en-US/thunderbird/"
32
33 KEYWORDS="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 +crypt +ipc +lightning +minimal mozdom +webm selinux"
37
38 PATCH="thunderbird-10.0-patches-0.1"
39 PATCHFF="firefox-10.0-patches-0.9"
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.1
51 >=dev-libs/nspr-4.8.8
52 >=dev-libs/glib-2.26
53 gconf? ( >=gnome-base/gconf-1.2.1:2 )
54 >=media-libs/libpng-1.5.9[apng]
55 >=x11-libs/cairo-1.10
56 >=x11-libs/pango-1.14.0
57 >=x11-libs/gtk+-2.14
58 webm? ( >=media-libs/libvpx-1.0.0
59 media-libs/alsa-lib )
60 virtual/libffi
61 !x11-plugins/enigmail
62 system-sqlite? ( >=dev-db/sqlite-3.7.7.1[fts3,secure-delete,unlock-notify,debug=] )
63 selinux? ( sec-policy/selinux-thunderbird )
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 virtual/pkgconfig
76 webm? ( x86? ( ${ASM_DEPEND} )
77 amd64? ( ${ASM_DEPEND} ) )"
78
79 if [[ ${MOZ_ESR} == 1 ]]; then
80 S="${WORKDIR}/comm-esr${PV%%.*}"
81 else
82 S="${WORKDIR}/comm-release"
83 fi
84
85 pkg_setup() {
86 moz_pkgsetup
87
88 export MOZILLA_DIR="${S}/mozilla"
89
90 if ! use bindist ; then
91 elog "You are enabling official branding. You may not redistribute this build"
92 elog "to any users on your network or the internet. Doing so puts yourself into"
93 elog "a legal problem with Mozilla Foundation"
94 elog "You can disable it by emerging ${PN} _with_ the bindist USE-flag"
95 elog
96 fi
97
98 # Ensure we have enough disk space to compile
99 CHECKREQS_DISK_BUILD="4G"
100 check-reqs_pkg_setup
101 }
102
103 src_unpack() {
104 unpack ${A}
105
106 # Unpack language packs
107 mozlinguas_src_unpack
108 }
109
110 src_prepare() {
111 # Apply our Thunderbird patchset
112 EPATCH_SUFFIX="patch" \
113 EPATCH_FORCE="yes" \
114 epatch "${WORKDIR}/thunderbird"
115
116 # Apply our patchset from firefox to thunderbird as well
117 pushd "${S}"/mozilla &>/dev/null || die
118 EPATCH_EXCLUDE="6012_fix_shlibsign.patch 6013_fix_abort_declaration.patch" \
119 EPATCH_SUFFIX="patch" \
120 EPATCH_FORCE="yes" \
121 epatch "${WORKDIR}/firefox"
122 popd &>/dev/null || die
123
124 if use crypt ; then
125 mv "${WORKDIR}"/enigmail "${S}"/mailnews/extensions/enigmail
126 cd "${S}"
127 fi
128
129 #Fix compilation with curl-7.21.7 bug 376027
130 sed -e '/#include <curl\/types.h>/d' \
131 -i "${S}"/mozilla/toolkit/crashreporter/google-breakpad/src/common/linux/http_upload.cc \
132 -i "${S}"/mozilla/toolkit/crashreporter/google-breakpad/src/common/linux/libcurl_wrapper.cc \
133 -i "${S}"/mozilla/config/system-headers \
134 -i "${S}"/mozilla/js/src/config/system-headers || die "Sed failed"
135
136 # Shell scripts sometimes contain DOS line endings; bug 391889
137 grep -rlZ --include="*.sh" $'\r$' . |
138 while read -r -d $'\0' file ; do
139 einfo edos2unix "${file}"
140 edos2unix "${file}"
141 done
142
143 # Allow user to apply any additional patches without modifing ebuild
144 epatch_user
145
146 eautoreconf
147 cd "${S}"/mozilla
148 eautoconf
149 }
150
151 src_configure() {
152 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
153 MEXTENSIONS="default"
154
155 ####################################
156 #
157 # mozconfig, CFLAGS and CXXFLAGS setup
158 #
159 ####################################
160
161 mozconfig_init
162 mozconfig_config
163
164 # It doesn't compile on alpha without this LDFLAGS
165 use alpha && append-ldflags "-Wl,--no-relax"
166
167 mozconfig_annotate '' --prefix="${EPREFIX}"/usr
168 mozconfig_annotate '' --libdir="${EPREFIX}"/usr/$(get_libdir)
169 mozconfig_annotate '' --enable-extensions="${MEXTENSIONS}"
170 mozconfig_annotate '' --with-default-mozilla-five-home="${EPREFIX}${MOZILLA_FIVE_HOME}"
171 mozconfig_annotate '' --with-user-appdir=.thunderbird
172 mozconfig_annotate '' --with-system-png
173 mozconfig_annotate '' --enable-system-ffi
174 mozconfig_annotate '' --target="${CTARGET:-${CHOST}}"
175 mozconfig_annotate 'regression' --disable-tracejit
176
177 # Use enable features
178 mozconfig_use_enable lightning calendar
179 mozconfig_use_enable gconf
180
181 # Bug #72667
182 if use mozdom; then
183 MEXTENSIONS="${MEXTENSIONS},inspector"
184 fi
185
186 # Use an objdir to keep things organized.
187 echo "mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/tbird" >> "${S}"/.mozconfig
188
189 # Finalize and report settings
190 mozconfig_final
191
192 ####################################
193 #
194 # Configure and build
195 #
196 ####################################
197
198 # Disable no-print-directory
199 MAKEOPTS=${MAKEOPTS/--no-print-directory/}
200
201 if [[ $(gcc-major-version) -lt 4 ]]; then
202 append-cxxflags -fno-stack-protector
203 elif [[ $(gcc-major-version) -gt 4 || $(gcc-minor-version) -gt 3 ]]; then
204 if use amd64 || use x86; then
205 append-flags -mno-avx
206 fi
207 fi
208 }
209
210 src_compile() {
211 CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \
212 MOZ_MAKE_FLAGS="${MAKEOPTS}" \
213 emake -f client.mk || die
214
215 # Only build enigmail extension if crypt enabled.
216 if use crypt ; then
217 cd "${S}"/mailnews/extensions/enigmail || die
218 ./makemake -r 2&> /dev/null
219 cd "${S}"/tbird/mailnews/extensions/enigmail
220 emake || die "make enigmail failed"
221 emake xpi || die "make enigmail xpi failed"
222 fi
223 }
224
225 src_install() {
226 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
227 declare emid
228 local obj_dir="tbird"
229 cd "${S}/${obj_dir}"
230
231 # Copy our preference before omnijar is created.
232 cp "${FILESDIR}"/thunderbird-gentoo-default-prefs-1.js-1 \
233 "${S}/${obj_dir}/mozilla/dist/bin/defaults/pref/all-gentoo.js" || die
234
235 # Pax mark xpcshell for hardened support, only used for startupcache creation.
236 pax-mark m "${S}"/${obj_dir}/mozilla/dist/bin/xpcshell
237
238 emake DESTDIR="${D}" install || die "emake install failed"
239
240 # Install language packs
241 mozlinguas_src_install
242
243 if ! use bindist; then
244 newicon "${S}"/other-licenses/branding/thunderbird/content/icon48.png thunderbird-icon.png
245 domenu "${FILESDIR}"/icon/${PN}.desktop
246 else
247 newicon "${S}"/mail/branding/aurora/content/icon48.png thunderbird-icon-unbranded.png
248 newmenu "${FILESDIR}"/icon/${PN}-unbranded.desktop \
249 ${PN}.desktop
250
251 sed -i -e "s:Mozilla\ Thunderbird:Lanikai:g" \
252 "${ED}"/usr/share/applications/${PN}.desktop
253 fi
254
255 if use crypt ; then
256 cd "${T}" || die
257 unzip "${S}"/${obj_dir}/mozilla/dist/bin/enigmail*.xpi install.rdf || die
258 emid=$(sed -n '/<em:id>/!d; s/.*\({.*}\).*/\1/; p; q' install.rdf)
259
260 dodir ${MOZILLA_FIVE_HOME}/extensions/${emid} || die
261 cd "${D}"${MOZILLA_FIVE_HOME}/extensions/${emid} || die
262 unzip "${S}"/${obj_dir}/mozilla/dist/bin/enigmail*.xpi || die
263 fi
264
265 if use lightning ; then
266 emid="{a62ef8ec-5fdc-40c2-873c-223b8a6925cc}"
267 dodir ${MOZILLA_FIVE_HOME}/extensions/${emid}
268 cd "${ED}"${MOZILLA_FIVE_HOME}/extensions/${emid}
269 unzip "${S}"/${obj_dir}/mozilla/dist/xpi-stage/gdata-provider.xpi
270
271 emid="calendar-timezones@mozilla.org"
272 dodir ${MOZILLA_FIVE_HOME}/extensions/${emid}
273 cd "${ED}"${MOZILLA_FIVE_HOME}/extensions/${emid}
274 unzip "${S}"/${obj_dir}/mozilla/dist/xpi-stage/calendar-timezones.xpi
275
276 emid="{e2fda1a4-762b-4020-b5ad-a41df1933103}"
277 dodir ${MOZILLA_FIVE_HOME}/extensions/${emid}
278 cd "${ED}"${MOZILLA_FIVE_HOME}/extensions/${emid}
279 unzip "${S}"/${obj_dir}/mozilla/dist/xpi-stage/lightning.xpi
280
281 # Fix mimetype so it shows up as a calendar application in GNOME 3
282 # This requires that the .desktop file was already installed earlier
283 sed -e "s:^\(MimeType=\):\1text/calendar;:" \
284 -e "s:^\(Categories=\):\1Calendar;:" \
285 -i "${ED}"/usr/share/applications/${PN}.desktop
286 fi
287
288 pax-mark m "${ED}"/${MOZILLA_FIVE_HOME}/thunderbird-bin
289
290 share_plugins_dir
291
292 if use minimal; then
293 rm -rf "${ED}"/usr/include "${ED}${MOZILLA_FIVE_HOME}"/{idl,include,lib,sdk} || \
294 die "Failed to remove sdk and headers"
295 fi
296 }
297
298 pkg_postinst() {
299 elog
300 elog "If you are experience problems with plugins please issue the"
301 elog "following command : rm \${HOME}/.thunderbird/*/extensions.sqlite ,"
302 elog "then restart thunderbird"
303 }

  ViewVC Help
Powered by ViewVC 1.1.20