Contents of /trunk/extras/mozilla-thunderbird/mozilla-thunderbird-2.0.0.23-r1.smage2
Parent Directory | Revision Log
Revision 3786 -
(show annotations)
(download)
Tue Nov 3 22:04:09 2009 UTC (14 years, 6 months ago) by niro
File size: 8106 byte(s)
Tue Nov 3 22:04:09 2009 UTC (14 years, 6 months ago) by niro
File size: 8106 byte(s)
-added build fixes for visbility pragma and --as-needed with nss-3.12
1 | # $Id$ |
2 | |
3 | PNAME="mozilla-thunderbird" |
4 | PVER="2.0.0.23" |
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/libXt-1 |
15 | >= x11-libs/libXmu-1 |
16 | >= sys-libs/zlib-1.2.3 |
17 | >= media-libs/libmng-1.0.10 |
18 | >= media-libs/fontconfig-2.7 |
19 | >= media-libs/libjpeg-7 |
20 | >= media-libs/libpng-1.2.40 |
21 | >= dev-libs/glib2-2.22 |
22 | >= dev-libs/expat-2 |
23 | >= dev-libs/libidl-0.8.13 |
24 | >= app-arch/zip-3 |
25 | >= app-arch/unzip-5.52 |
26 | >= x11-libs/pango-1.26 |
27 | >= x11-libs/gtk2+-2.18 |
28 | >= x11-libs/cairo-1.8 |
29 | >= app-crypt/gnupg-2 |
30 | >= dev-libs/nspr-4.8.2 |
31 | >= dev-libs/nss-3.12.4" |
32 | |
33 | SDEPEND=">= x11-proto/xineramaproto-1 |
34 | >= dev-util/pkgconfig-0.23 |
35 | >= sys-dev/autoconf-5 |
36 | >= sys-dev/automake-4 |
37 | >= sys-apps/sed-4" |
38 | |
39 | SRCFILE="thunderbird-${PVER}-source.tar.bz2" |
40 | SRCDIR="${BUILDDIR}/mozilla" |
41 | |
42 | SRC_ENIGMAIL="enigmail-0.96.0.tar.gz" |
43 | |
44 | sminclude mozilla mtools |
45 | |
46 | SRC_URI=( |
47 | ftp://ftp.mozilla.org/pub/mozilla.org/${PNAME/mozilla-/}/releases/${PVER}/source/${SRCFILE} |
48 | http://www.mozilla-enigmail.org/download/source/${SRC_ENIGMAIL} |
49 | mirror://${PNAME}/${SRCFILE} |
50 | mirror://${PNAME}/${SRC_ENIGMAIL} |
51 | mirror://${PNAME}/menu/thunderbird.png |
52 | mirror://${PNAME}/menu/thunderbird.desktop |
53 | mirror://${PNAME}/mozilla-firefox-1.5.0-embed-typeaheadfind.patch |
54 | mirror://${PNAME}/mozilla-firefox-1.5.0.11-pkgconfig.patch |
55 | mirror://${PNAME}/mozilla-firefox-2.0.0.5-libdeps.patch |
56 | mirror://${PNAME}/mozilla-firefox-2.0.0.5-asneeded.patch |
57 | mirror://${PNAME}/mozilla-firefox-2.0.0.5-respect-host-variable.patch |
58 | mirror://${PNAME}/mozilla-firefox-2.0.0.5-rpath-3.patch |
59 | mirror://${PNAME}/mozilla-firefox-2.0.0.5-pango-cursor.patch |
60 | mirror://${PNAME}/mozilla-thunderbird-2.0.0.6-language.patch |
61 | mirror://${PNAME}/mozilla-thunderbird-2.0.0.23-visibility-pragma.patch |
62 | mirror://${PNAME}/mozilla-thunderbird-2.0.0.23-nss-3.12-asneeded.patch |
63 | ) |
64 | |
65 | UP2DATE="updatecmd ftp://ftp.mozilla.org/pub/mozilla.org/${PNAME/mozilla-/}/releases/latest/source | sed 's:-source::' | lasttarball" |
66 | |
67 | # we are building thunderbird |
68 | export MOZ_CO_PROJECT=mail |
69 | |
70 | # set by configure (plus USE_AUTOCONF=1), but useful for NSPR |
71 | export MOZILLA_CLIENT=1 |
72 | export BUILD_OPT=1 |
73 | export NO_STATIC_LIB=1 |
74 | export USE_PTHREADS=1 |
75 | |
76 | # now strip optimization from CFLAGS so it doesn't end up in the |
77 | # compile string |
78 | export CFLAGS="${CFLAGS/-O*/}" |
79 | export CXXFLAGS="${CFLAGS}" |
80 | |
81 | # needed to build without warnings on gcc-3 |
82 | export CXXFLAGS="${CXXFLAGS} -Wno-deprecated" |
83 | |
84 | src_prepare() |
85 | { |
86 | munpack ${SRCFILE} || die |
87 | |
88 | # enigmail plugin |
89 | munpack ${SRC_ENIGMAIL} ${SRCDIR}/mailnews/extensions ||die |
90 | cd ${SRCDIR} |
91 | |
92 | # patches, patches, patches |
93 | |
94 | # fix linking issues against pango |
95 | # https://bugzilla.mozilla.org/show_bug.cgi?id=344821 |
96 | mpatch mozilla-firefox-2.0.0.5-libdeps.patch || die |
97 | |
98 | # use as-needed with newer binutils |
99 | # https://bugzilla.mozilla.org/show_bug.cgi?id=311236 |
100 | mpatch mozilla-firefox-2.0.0.5-asneeded.patch || die |
101 | |
102 | # fixes typeahead and gtk fixes for embeded firefox browsers |
103 | mpatch mozilla-firefox-1.5.0-embed-typeaheadfind.patch || die |
104 | |
105 | # fix pkgconfig pathes |
106 | mpatch mozilla-firefox-1.5.0.11-pkgconfig.patch || die |
107 | |
108 | # fix some compile issues on multilib systems |
109 | mpatch mozilla-firefox-2.0.0.5-respect-host-variable.patch || die |
110 | mpatch mozilla-firefox-2.0.0.5-rpath-3.patch || die |
111 | |
112 | # fix pango-cursor issues |
113 | mpatch mozilla-firefox-2.0.0.5-pango-cursor.patch || die |
114 | |
115 | # enable variable languages via environment vars |
116 | mpatch mozilla-thunderbird-2.0.0.6-language.patch || die |
117 | |
118 | # fix -fvisibility pragma |
119 | mpatch mozilla-thunderbird-2.0.0.23-visibility-pragma.patch || die |
120 | |
121 | # fix --as-needed with nss-3.12 |
122 | mpatch mozilla-thunderbird-2.0.0.23-nss-3.12-asneeded.patch || die |
123 | |
124 | export WANT_AUTOCONF="2.1" |
125 | autoconf || die |
126 | |
127 | # rebuild makefiles |
128 | cd ${SRCDIR}/mailnews/extensions/enigmail || die |
129 | makemake2 || die |
130 | } |
131 | |
132 | src_compile() |
133 | { |
134 | cd ${SRCDIR} |
135 | |
136 | # setup .mozconfig |
137 | cp mail/config/mozconfig .mozconfig || die |
138 | |
139 | # where shall the files go ? |
140 | mozconf_add --with-default-mozilla-five-home=/usr/$(mlibdir)/mozilla-thunderbird |
141 | |
142 | # set optimization level based on CFLAGS |
143 | if [[ ${ARCH} = x86_64 ]] |
144 | then |
145 | # opts may cause segfaults on 64bit arches |
146 | mozconf_add --enable-optimize=-O1 |
147 | export CFLAGS="${CFLAGS} -fPIC" |
148 | export CXXFLAGS="${CXXFLAGS} -fPIC" |
149 | else |
150 | mozconf_add --enable-optimize=-O2 |
151 | fi |
152 | |
153 | # enable compat mode for plugins build with gcc2 |
154 | mozconf_add --enable-old-abi-compat-wrappers |
155 | |
156 | # we don't need the installer |
157 | mozconf_add --disable-installer |
158 | |
159 | # issue all warnings demanded by strict ANSI C |
160 | mozconf_add --disable-pedantic |
161 | |
162 | # enable crypto support (Personal Security Manager) |
163 | mozconf_add --enable-crypto |
164 | |
165 | # want system jpeg, pngm, zlib, nspr and nss |
166 | mozconf_add --with-system-jpeg |
167 | mozconf_add --with-system-png |
168 | mozconf_add --with-system-zlib |
169 | mozconf_add --with-system-nspr |
170 | mozconf_add --with-system-nss |
171 | |
172 | # enable gtk2 as default |
173 | mozconf_add --enable-default-toolkit=gtk2 |
174 | |
175 | # no ipv6 support |
176 | mozconf_add --enable-ipv6 |
177 | |
178 | # want xinerama |
179 | mozconf_add --enable-xinerama |
180 | |
181 | # no xprint ? |
182 | mozconf_add --disable-xprint |
183 | |
184 | # >= firefox-1.0.7 should use xft + pango, svg with cairo |
185 | mozconf_add --disable-freetype2 |
186 | mozconf_add --enable-xft |
187 | mozconf_add --enable-pango |
188 | mozconf_add --enable-system-cairo |
189 | mozconf_add --enable-svg |
190 | mozconf_add --enable-canvas |
191 | |
192 | # enable all image encoders |
193 | mozconf_add --enable-image-encoder=all |
194 | |
195 | # disable debug build && enable stripping |
196 | mozconf_add --disable-debug |
197 | mozconf_add --disable-tests |
198 | mozconf_add --enable-reorder |
199 | mozconf_add --enable-strip |
200 | mozconf_add --enable-strip-libs |
201 | |
202 | if [[ ${ARCH} = i*86 ]] |
203 | then |
204 | # optimze build for x86 |
205 | mozconf_add --enable-elf-dynstr-gc |
206 | fi |
207 | |
208 | # enable ldap |
209 | mozconf_add --enable-ldap |
210 | mozconf_add --enable-ldap-experimental |
211 | |
212 | # enable default extensions |
213 | mozconf_add --enable-extensions=default |
214 | |
215 | # resolve multiple --enable-extensions down to one |
216 | rebuild_extension_list |
217 | |
218 | # now run configure |
219 | mconfigure || die |
220 | |
221 | # removes extraneous CFLAGS |
222 | # to reduce RAM requirements while compiling |
223 | mozilla_remove_cflags || die |
224 | |
225 | mmake || die |
226 | |
227 | # enigmail doesn't like visibility_hidden, so we remove the macros |
228 | rm config/gcc_hidden.h || die |
229 | touch config/gcc_hidden.h || die |
230 | |
231 | # build enigmail |
232 | mmake -j1 -C mailnews/extensions/enigmail || die |
233 | } |
234 | |
235 | src_install() |
236 | { |
237 | cd ${SRCDIR} |
238 | |
239 | # needed directories |
240 | minstalldir /usr/bin || die |
241 | minstalldir /usr/$(mlibdir)/pkgconfig || die |
242 | minstalldir /usr/$(mlibdir)/mozilla-thunderbird || die |
243 | minstalldir /usr/share/applications || die |
244 | |
245 | # install binaries |
246 | cp -RL --no-preserve=links ${SRCDIR}/dist/bin/* \ |
247 | ${BINDIR}/usr/$(mlibdir)/mozilla-thunderbird || die |
248 | |
249 | # fix permissions |
250 | mchown -R root:root /usr/$(mlibdir)/mozilla-thunderbird || die |
251 | |
252 | # bins |
253 | mlink /usr/$(mlibdir)/mozilla-thunderbird/thunderbird /usr/bin/thunderbird || die |
254 | |
255 | # vendor information |
256 | msetpref general.useragent.vendor Magellan-Linux || die |
257 | |
258 | # disable app.update in default config |
259 | msetpref app.update.auto false || die |
260 | msetpref app.update.enabled false || die |
261 | msetpref app.update.autoInstallEnabled false || die |
262 | |
263 | # 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 |