Magellan Linux

Contents of /trunk/extras/mozilla-thunderbird/mozilla-thunderbird-3.1.2-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 5786 - (show annotations) (download)
Sat Aug 14 12:39:39 2010 UTC (13 years, 9 months ago) by niro
File size: 7847 byte(s)
auto added: ver bump to 3.1.2-r1
1 # $Id: mozilla-thunderbird-3.1.1-r1.smage2 5627 2010-07-21 12:44:25Z niro $
2
3 PNAME="mozilla-thunderbird"
4 PVER="3.1.2"
5 PBUILD="r1"
6
7 PCATEGORIE="net-mail"
8 STATE="unstable"
9
10 DESCRIPTION="Thunderbird is Mozilla's next generation e-mail client."
11 HOMEPAGE="http://www.mozilla.org/products/thunderbird/"
12
13 DEPEND=">= x11-libs/libXrender-0.9
14 >= x11-libs/libXcomposite-0.4
15 >= x11-libs/libXt-1
16 >= x11-libs/libXmu-1
17 >= dev-libs/expat-2
18 >= sys-libs/zlib-1.2.3
19 >= media-libs/libmng-1.0.10
20 >= media-libs/fontconfig-2.7
21 >= media-libs/libjpeg-7
22 >= media-libs/libpng-1.2.40
23 >= dev-libs/glib2-2.22
24 >= dev-libs/libidl-0.8.13
25 >= app-arch/zip-3
26 >= app-arch/unzip-5.52
27 >= x11-libs/pango-1.26
28 >= x11-libs/cairo-1.8.8
29 >= x11-libs/gtk2+-2.18
30 >= app-crypt/gnupg-2
31 >= dev-libs/nspr-4.8.2
32 >= dev-libs/nss-3.12.4
33 >= dev-db/sqlite-3.6"
34
35 SDEPEND=">= x11-proto/xineramaproto-1
36 >= x11-proto/compositeproto-0.4
37 >= dev-util/pkgconfig-0.23
38 >= sys-dev/autoconf-5
39 >= sys-dev/automake-4
40 >= sys-apps/sed-4"
41
42 SRCFILE="thunderbird-${PVER}.source.tar.bz2"
43 XUL_PVER="1.9.2"
44 SRCDIR="${BUILDDIR}/comm-${XUL_PVER}"
45
46 SRC_ENIGMAIL="enigmail-1.1.2.tar.gz"
47
48 sminclude mozilla mtools
49
50 SRC_URI=(
51 ftp://ftp.mozilla.org/pub/mozilla.org/${PNAME/mozilla-/}/releases/${PVER}/source/${SRCFILE}
52 http://www.mozilla-enigmail.org/download/source/${SRC_ENIGMAIL}
53 mirror://${PNAME}/${SRCFILE}
54 mirror://${PNAME}/${SRC_ENIGMAIL}
55 mirror://${PNAME}/menu/thunderbird.png
56 mirror://${PNAME}/menu/thunderbird.desktop
57 mirror://${PNAME}/mozilla-firefox-3.0.6-pkgconfig.patch
58 mirror://${PNAME}/mozilla-firefox-2.0.0.5-rpath-3.patch
59 mirror://${PNAME}/mozilla-thunderbird-3.0-language.patch
60 mirror://${PNAME}/mozilla-thunderbird-3.1.1-no-app-updates.patch
61 )
62
63 UP2DATE="updatecmd ftp://ftp.mozilla.org/pub/mozilla.org/${PNAME/mozilla-/}/releases/latest/source | sed 's:[-|.]source::' | lasttarball"
64
65 # we are building thunderbird
66 export MOZ_CO_PROJECT=mail
67
68 # set by configure (plus USE_AUTOCONF=1), but useful for NSPR
69 export MOZILLA_CLIENT=1
70 export BUILD_OPT=1
71 export NO_STATIC_LIB=1
72 export USE_PTHREADS=1
73
74 # now strip optimization from CFLAGS so it doesn't end up in the
75 # compile string
76 export CFLAGS="${CFLAGS/-O*/}"
77 export CXXFLAGS="${CFLAGS}"
78
79 # needed to build without warnings on gcc-3
80 export CXXFLAGS="${CXXFLAGS} -Wno-deprecated"
81
82 src_prepare()
83 {
84 munpack ${SRCFILE} || die
85
86 # enigmail plugin
87 munpack ${SRC_ENIGMAIL} ${SRCDIR}/mailnews/extensions ||die
88 cd ${SRCDIR}
89
90 # patches, patches, patches
91
92 # fix pkgconfig pathes
93 mpatch mozilla-firefox-3.0.6-pkgconfig.patch || die
94
95 # fix some compile issues on multilib systems
96 mpatch mozilla-firefox-2.0.0.5-rpath-3.patch || die
97
98 # enable variable languages via environment vars
99 mpatch mozilla-thunderbird-3.0-language.patch || die
100
101 # disable auto app updates
102 mpatch mozilla-thunderbird-3.1.1-no-app-updates.patch || die
103
104 export WANT_AUTOCONF="2.1"
105 autoconf || die
106
107 # rebuild makefiles
108 cd ${SRCDIR}/mailnews/extensions/enigmail || die
109 makemake2 || die
110 }
111
112 src_compile()
113 {
114 cd ${SRCDIR}
115
116 # may not exist in >=3.0, so touch it
117 touch mail/config/mozconfig || die
118
119 # setup .mozconfig
120 cp mail/config/mozconfig .mozconfig || die
121
122 # which app we will build
123 mozconf_add --enable-application=mail
124
125 # where shall the files go ?
126 mozconf_add --with-default-mozilla-five-home=/usr/$(mlibdir)/mozilla-thunderbird
127
128 # set optimization level based on CFLAGS
129 if [[ ${ARCH} = x86_64 ]]
130 then
131 # opts may cause segfaults on 64bit arches
132 mozconf_add --enable-optimize=-O1
133 export CFLAGS="${CFLAGS} -fPIC"
134 export CXXFLAGS="${CXXFLAGS} -fPIC"
135 else
136 mozconf_add --enable-optimize=-O2
137 fi
138
139 # enable compat mode for plugins build with gcc2
140 mozconf_add --enable-old-abi-compat-wrappers
141
142 # we don't need the installer
143 mozconf_add --disable-installer
144
145 # issue all warnings demanded by strict ANSI C
146 mozconf_add --disable-pedantic
147
148 # enable crypto support (Personal Security Manager)
149 mozconf_add --enable-crypto
150
151 # want system jpeg, pngm, zlib, nspr and nss
152 mozconf_add --with-system-jpeg
153 # doesn't work atm
154 #mozconf_add --with-system-png
155 mozconf_add --with-system-zlib
156 mozconf_add --with-system-nspr
157 mozconf_add --with-system-nss
158
159 # enable cairo-gtk2 as default
160 mozconf_add --enable-default-toolkit=cairo-gtk2
161
162 # libnotify support (disabled atm)
163 mozconf_add --disable-libnotify
164
165 # no ipv6 support
166 mozconf_add --enable-ipv6
167
168 # want xinerama
169 mozconf_add --enable-xinerama
170
171 # no xprint ?
172 mozconf_add --disable-xprint
173
174 # >= firefox-1.0.7 should use xft + pango, svg with cairo
175 mozconf_add --disable-freetype2
176 mozconf_add --enable-xft
177 mozconf_add --enable-pango
178 mozconf_add --enable-system-cairo
179 mozconf_add --enable-svg
180 mozconf_add --enable-canvas
181
182 # enable all image encoders
183 mozconf_add --enable-image-encoder=all
184
185 # disable debug build && enable stripping
186 mozconf_add --disable-debug
187 mozconf_add --disable-tests
188 mozconf_add --enable-reorder
189 mozconf_add --enable-strip
190 mozconf_add --enable-strip-libs
191
192 if [[ ${ARCH} = i*86 ]]
193 then
194 # optimze build for x86
195 mozconf_add --enable-elf-dynstr-gc
196 fi
197
198 # enable ldap
199 mozconf_add --enable-ldap
200 mozconf_add --enable-ldap-experimental
201
202 # enable default extensions
203 mozconf_add --enable-extensions=default
204
205 # gnome support (needs gnome-vfs)
206 mozconf_add --disable-gnomevfs
207 mozconf_add --enable-extension=-gnomevfs
208
209 # broken with thunderbird-3.0
210 mozconf_add --disable-crashreporter
211
212 # resolve multiple --enable-extensions down to one
213 rebuild_extension_list
214
215 # now run configure
216 mconfigure || die
217
218 # removes extraneous CFLAGS
219 # to reduce RAM requirements while compiling
220 mozilla_remove_cflags || die
221
222 mmake || die
223
224 # # enigmail doesn't like visibility_hidden, so we remove the macros
225 # rm config/gcc_hidden.h || die
226 # touch config/gcc_hidden.h || die
227
228 # build enigmail
229 mmake -j1 -C mailnews/extensions/enigmail || die
230 }
231
232 src_install()
233 {
234 cd ${SRCDIR}
235
236 # needed directories
237 minstalldir /usr/bin || die
238 minstalldir /usr/$(mlibdir)/pkgconfig || die
239 minstalldir /usr/$(mlibdir)/mozilla-thunderbird || die
240 minstalldir /usr/share/applications || die
241
242 # install binaries
243 cp -RL --no-preserve=links ${SRCDIR}/mozilla/dist/bin/* \
244 ${BINDIR}/usr/$(mlibdir)/mozilla-thunderbird || die
245
246 # fix permissions
247 mchown -R root:root /usr/$(mlibdir)/mozilla-thunderbird || die
248
249 # bins
250 mlink /usr/$(mlibdir)/mozilla-thunderbird/thunderbird /usr/bin/thunderbird || die
251
252 # vendor information
253 msetpref general.useragent.vendor Magellan-Linux || die
254
255 # disable app.update in default config
256 msetpref app.update.auto false || die
257 msetpref app.update.enabled false || die
258 msetpref app.update.autoInstallEnabled false || die
259
260 # disable global indexing by default
261 msetpref mailnews.database.global.indexer.enabled false || die
262
263 # do not switch to smart-folders after upgrade to 3.0b4
264 msetpref mail.folder.views.version 1 || die
265
266 # install pkgconfig files (at last needed by epiphany)
267 #minstallfile build/unix/thunderbird-\*.pc /usr/$(mlibdir)/pkgconfig || die
268
269 # menu entries
270 minstallpixmap thunderbird.png || die
271 minstallfile -s thunderbird.desktop /usr/share/applications || die
272 }
273
274 postinstall()
275 {
276 # update environment; needed for REGXPCOM
277 env-rebuild
278 source ${MROOT}/etc/profile
279
280 # thunderbirds mozilla_five_home
281 export MOZILLA_FIVE_HOME="${MROOT}/usr/$(mlibdir)/mozilla-thunderbird"
282
283 # register thunderbird
284 echo "Registering Components and Chrome..."
285
286 HOME=~root LD_LIBRARY_PATH=${MOZILLA_FIVE_HOME} ${MOZILLA_FIVE_HOME}/regxpcom
287 # HOME=~root LD_LIBRARY_PATH=${MOZILLA_FIVE_HOME} ${MOZILLA_FIVE_HOME}/regchrome
288
289 # fix permissions of component registry
290 chmod 0644 ${MOZILLA_FIVE_HOME}/components/compreg.dat
291
292 # fix directory permissions
293 find ${MOZILLA_FIVE_HOME}/ -type d -perm 0700 -exec chmod 0755 {} \; || :
294
295 # fix permissions on chrome files
296 find ${MOZILLA_FIVE_HOME}/chrome/ -name '*.rdf' -exec chmod 0644 {} \; || :
297 }