Annotation of /trunk/extras/mozilla-thunderbird/mozilla-thunderbird-3.0-r1.smage2
Parent Directory | Revision Log
Revision 4458 -
(hide annotations)
(download)
Tue Dec 22 23:43:55 2009 UTC (14 years, 9 months ago) by niro
File size: 7693 byte(s)
Tue Dec 22 23:43:55 2009 UTC (14 years, 9 months ago) by niro
File size: 7693 byte(s)
-no gcc hidden fix for enigmail atm needed
1 | niro | 4454 | # $Id$ |
2 | |||
3 | PNAME="mozilla-thunderbird" | ||
4 | PVER="3.0" | ||
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.1" | ||
44 | SRCDIR="${BUILDDIR}/comm-${XUL_PVER}" | ||
45 | |||
46 | SRC_ENIGMAIL="enigmail-1.0.0.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.0-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.0-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 | niro | 4455 | # may not exist in >=3.0, so touch it |
117 | touch mail/config/mozconfig || die | ||
118 | |||
119 | niro | 4454 | # setup .mozconfig |
120 | cp mail/config/mozconfig .mozconfig || die | ||
121 | |||
122 | niro | 4456 | # which app we will build |
123 | mozconf_add --enable-application=mail | ||
124 | |||
125 | niro | 4454 | # 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 | # no ipv6 support | ||
163 | mozconf_add --enable-ipv6 | ||
164 | |||
165 | # want xinerama | ||
166 | mozconf_add --enable-xinerama | ||
167 | |||
168 | # no xprint ? | ||
169 | mozconf_add --disable-xprint | ||
170 | |||
171 | # >= firefox-1.0.7 should use xft + pango, svg with cairo | ||
172 | mozconf_add --disable-freetype2 | ||
173 | mozconf_add --enable-xft | ||
174 | mozconf_add --enable-pango | ||
175 | mozconf_add --enable-system-cairo | ||
176 | mozconf_add --enable-svg | ||
177 | mozconf_add --enable-canvas | ||
178 | |||
179 | # enable all image encoders | ||
180 | mozconf_add --enable-image-encoder=all | ||
181 | |||
182 | # disable debug build && enable stripping | ||
183 | mozconf_add --disable-debug | ||
184 | mozconf_add --disable-tests | ||
185 | mozconf_add --enable-reorder | ||
186 | mozconf_add --enable-strip | ||
187 | mozconf_add --enable-strip-libs | ||
188 | |||
189 | if [[ ${ARCH} = i*86 ]] | ||
190 | then | ||
191 | # optimze build for x86 | ||
192 | mozconf_add --enable-elf-dynstr-gc | ||
193 | fi | ||
194 | |||
195 | # enable ldap | ||
196 | mozconf_add --enable-ldap | ||
197 | mozconf_add --enable-ldap-experimental | ||
198 | |||
199 | # enable default extensions | ||
200 | mozconf_add --enable-extensions=default | ||
201 | |||
202 | # gnome support (needs gnome-vfs) | ||
203 | mozconf_add --disable-gnomevfs | ||
204 | mozconf_add --enable-extension=-gnomevfs | ||
205 | |||
206 | niro | 4456 | # broken with thunderbird-3.0 |
207 | mozconf_add --disable-crashreporter | ||
208 | |||
209 | niro | 4454 | # resolve multiple --enable-extensions down to one |
210 | rebuild_extension_list | ||
211 | |||
212 | # now run configure | ||
213 | mconfigure || die | ||
214 | |||
215 | # removes extraneous CFLAGS | ||
216 | # to reduce RAM requirements while compiling | ||
217 | mozilla_remove_cflags || die | ||
218 | |||
219 | mmake || die | ||
220 | |||
221 | niro | 4458 | # # enigmail doesn't like visibility_hidden, so we remove the macros |
222 | # rm config/gcc_hidden.h || die | ||
223 | # touch config/gcc_hidden.h || die | ||
224 | niro | 4454 | |
225 | # build enigmail | ||
226 | mmake -j1 -C mailnews/extensions/enigmail || die | ||
227 | } | ||
228 | |||
229 | src_install() | ||
230 | { | ||
231 | cd ${SRCDIR} | ||
232 | |||
233 | # needed directories | ||
234 | minstalldir /usr/bin || die | ||
235 | minstalldir /usr/$(mlibdir)/pkgconfig || die | ||
236 | minstalldir /usr/$(mlibdir)/mozilla-thunderbird || die | ||
237 | minstalldir /usr/share/applications || die | ||
238 | |||
239 | # install binaries | ||
240 | cp -RL --no-preserve=links ${SRCDIR}/dist/bin/* \ | ||
241 | ${BINDIR}/usr/$(mlibdir)/mozilla-thunderbird || die | ||
242 | |||
243 | # fix permissions | ||
244 | mchown -R root:root /usr/$(mlibdir)/mozilla-thunderbird || die | ||
245 | |||
246 | # bins | ||
247 | mlink /usr/$(mlibdir)/mozilla-thunderbird/thunderbird /usr/bin/thunderbird || die | ||
248 | |||
249 | # vendor information | ||
250 | msetpref general.useragent.vendor Magellan-Linux || die | ||
251 | |||
252 | # disable app.update in default config | ||
253 | msetpref app.update.auto false || die | ||
254 | msetpref app.update.enabled false || die | ||
255 | msetpref app.update.autoInstallEnabled false || die | ||
256 | |||
257 | niro | 4457 | # disable global indexing by default |
258 | msetpref mailnews.database.global.indexer.enabled false || die | ||
259 | |||
260 | # do not switch to smart-folders after upgrade to 3.0b4 | ||
261 | msetpref mail.folder.views.version 1 || die | ||
262 | |||
263 | niro | 4454 | # install pkgconfig files (at last needed by epiphany) |
264 | minstallfile build/unix/thunderbird-\*.pc /usr/$(mlibdir)/pkgconfig || die | ||
265 | |||
266 | # menu entries | ||
267 | minstallpixmap thunderbird.png || die | ||
268 | minstallfile -s thunderbird.desktop /usr/share/applications || die | ||
269 | } | ||
270 | |||
271 | postinstall() | ||
272 | { | ||
273 | # update environment; needed for REGXPCOM | ||
274 | env-rebuild | ||
275 | source ${MROOT}/etc/profile | ||
276 | |||
277 | # thunderbirds mozilla_five_home | ||
278 | export MOZILLA_FIVE_HOME="${MROOT}/usr/$(mlibdir)/mozilla-thunderbird" | ||
279 | |||
280 | # register thunderbird | ||
281 | echo "Registering Components and Chrome..." | ||
282 | |||
283 | HOME=~root LD_LIBRARY_PATH=${MOZILLA_FIVE_HOME} ${MOZILLA_FIVE_HOME}/regxpcom | ||
284 | # HOME=~root LD_LIBRARY_PATH=${MOZILLA_FIVE_HOME} ${MOZILLA_FIVE_HOME}/regchrome | ||
285 | |||
286 | # fix permissions of component registry | ||
287 | chmod 0644 ${MOZILLA_FIVE_HOME}/components/compreg.dat | ||
288 | |||
289 | # fix directory permissions | ||
290 | find ${MOZILLA_FIVE_HOME}/ -type d -perm 0700 -exec chmod 0755 {} \; || : | ||
291 | |||
292 | # fix permissions on chrome files | ||
293 | find ${MOZILLA_FIVE_HOME}/chrome/ -name '*.rdf' -exec chmod 0644 {} \; || : | ||
294 | } |
Properties
Name | Value |
---|---|
svn:keywords | Id |