Annotation of /trunk/extras/mozilla-thunderbird/mozilla-thunderbird-3.0-r1.smage2
Parent Directory | Revision Log
Revision 4455 -
(hide annotations)
(download)
Tue Dec 22 23:02:12 2009 UTC (14 years, 6 months ago) by niro
File size: 7348 byte(s)
Tue Dec 22 23:02:12 2009 UTC (14 years, 6 months ago) by niro
File size: 7348 byte(s)
-touching
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 | # where shall the files go ? | ||
123 | mozconf_add --with-default-mozilla-five-home=/usr/$(mlibdir)/mozilla-thunderbird | ||
124 | |||
125 | # set optimization level based on CFLAGS | ||
126 | if [[ ${ARCH} = x86_64 ]] | ||
127 | then | ||
128 | # opts may cause segfaults on 64bit arches | ||
129 | mozconf_add --enable-optimize=-O1 | ||
130 | export CFLAGS="${CFLAGS} -fPIC" | ||
131 | export CXXFLAGS="${CXXFLAGS} -fPIC" | ||
132 | else | ||
133 | mozconf_add --enable-optimize=-O2 | ||
134 | fi | ||
135 | |||
136 | # enable compat mode for plugins build with gcc2 | ||
137 | mozconf_add --enable-old-abi-compat-wrappers | ||
138 | |||
139 | # we don't need the installer | ||
140 | mozconf_add --disable-installer | ||
141 | |||
142 | # issue all warnings demanded by strict ANSI C | ||
143 | mozconf_add --disable-pedantic | ||
144 | |||
145 | # enable crypto support (Personal Security Manager) | ||
146 | mozconf_add --enable-crypto | ||
147 | |||
148 | # want system jpeg, pngm, zlib, nspr and nss | ||
149 | mozconf_add --with-system-jpeg | ||
150 | # doesn't work atm | ||
151 | #mozconf_add --with-system-png | ||
152 | mozconf_add --with-system-zlib | ||
153 | mozconf_add --with-system-nspr | ||
154 | mozconf_add --with-system-nss | ||
155 | |||
156 | # enable cairo-gtk2 as default | ||
157 | mozconf_add --enable-default-toolkit=cairo-gtk2 | ||
158 | |||
159 | # no ipv6 support | ||
160 | mozconf_add --enable-ipv6 | ||
161 | |||
162 | # want xinerama | ||
163 | mozconf_add --enable-xinerama | ||
164 | |||
165 | # no xprint ? | ||
166 | mozconf_add --disable-xprint | ||
167 | |||
168 | # >= firefox-1.0.7 should use xft + pango, svg with cairo | ||
169 | mozconf_add --disable-freetype2 | ||
170 | mozconf_add --enable-xft | ||
171 | mozconf_add --enable-pango | ||
172 | mozconf_add --enable-system-cairo | ||
173 | mozconf_add --enable-svg | ||
174 | mozconf_add --enable-canvas | ||
175 | |||
176 | # enable all image encoders | ||
177 | mozconf_add --enable-image-encoder=all | ||
178 | |||
179 | # disable debug build && enable stripping | ||
180 | mozconf_add --disable-debug | ||
181 | mozconf_add --disable-tests | ||
182 | mozconf_add --enable-reorder | ||
183 | mozconf_add --enable-strip | ||
184 | mozconf_add --enable-strip-libs | ||
185 | |||
186 | if [[ ${ARCH} = i*86 ]] | ||
187 | then | ||
188 | # optimze build for x86 | ||
189 | mozconf_add --enable-elf-dynstr-gc | ||
190 | fi | ||
191 | |||
192 | # enable ldap | ||
193 | mozconf_add --enable-ldap | ||
194 | mozconf_add --enable-ldap-experimental | ||
195 | |||
196 | # enable default extensions | ||
197 | mozconf_add --enable-extensions=default | ||
198 | |||
199 | # gnome support (needs gnome-vfs) | ||
200 | mozconf_add --disable-gnomevfs | ||
201 | mozconf_add --enable-extension=-gnomevfs | ||
202 | |||
203 | # resolve multiple --enable-extensions down to one | ||
204 | rebuild_extension_list | ||
205 | |||
206 | # now run configure | ||
207 | mconfigure || die | ||
208 | |||
209 | # removes extraneous CFLAGS | ||
210 | # to reduce RAM requirements while compiling | ||
211 | mozilla_remove_cflags || die | ||
212 | |||
213 | mmake || die | ||
214 | |||
215 | # enigmail doesn't like visibility_hidden, so we remove the macros | ||
216 | rm config/gcc_hidden.h || die | ||
217 | touch config/gcc_hidden.h || die | ||
218 | |||
219 | # build enigmail | ||
220 | mmake -j1 -C mailnews/extensions/enigmail || die | ||
221 | } | ||
222 | |||
223 | src_install() | ||
224 | { | ||
225 | cd ${SRCDIR} | ||
226 | |||
227 | # needed directories | ||
228 | minstalldir /usr/bin || die | ||
229 | minstalldir /usr/$(mlibdir)/pkgconfig || die | ||
230 | minstalldir /usr/$(mlibdir)/mozilla-thunderbird || die | ||
231 | minstalldir /usr/share/applications || die | ||
232 | |||
233 | # install binaries | ||
234 | cp -RL --no-preserve=links ${SRCDIR}/dist/bin/* \ | ||
235 | ${BINDIR}/usr/$(mlibdir)/mozilla-thunderbird || die | ||
236 | |||
237 | # fix permissions | ||
238 | mchown -R root:root /usr/$(mlibdir)/mozilla-thunderbird || die | ||
239 | |||
240 | # bins | ||
241 | mlink /usr/$(mlibdir)/mozilla-thunderbird/thunderbird /usr/bin/thunderbird || die | ||
242 | |||
243 | # vendor information | ||
244 | msetpref general.useragent.vendor Magellan-Linux || die | ||
245 | |||
246 | # disable app.update in default config | ||
247 | msetpref app.update.auto false || die | ||
248 | msetpref app.update.enabled false || die | ||
249 | msetpref app.update.autoInstallEnabled false || die | ||
250 | |||
251 | # install pkgconfig files (at last needed by epiphany) | ||
252 | minstallfile build/unix/thunderbird-\*.pc /usr/$(mlibdir)/pkgconfig || die | ||
253 | |||
254 | # menu entries | ||
255 | minstallpixmap thunderbird.png || die | ||
256 | minstallfile -s thunderbird.desktop /usr/share/applications || die | ||
257 | } | ||
258 | |||
259 | postinstall() | ||
260 | { | ||
261 | # update environment; needed for REGXPCOM | ||
262 | env-rebuild | ||
263 | source ${MROOT}/etc/profile | ||
264 | |||
265 | # thunderbirds mozilla_five_home | ||
266 | export MOZILLA_FIVE_HOME="${MROOT}/usr/$(mlibdir)/mozilla-thunderbird" | ||
267 | |||
268 | # register thunderbird | ||
269 | echo "Registering Components and Chrome..." | ||
270 | |||
271 | HOME=~root LD_LIBRARY_PATH=${MOZILLA_FIVE_HOME} ${MOZILLA_FIVE_HOME}/regxpcom | ||
272 | # HOME=~root LD_LIBRARY_PATH=${MOZILLA_FIVE_HOME} ${MOZILLA_FIVE_HOME}/regchrome | ||
273 | |||
274 | # fix permissions of component registry | ||
275 | chmod 0644 ${MOZILLA_FIVE_HOME}/components/compreg.dat | ||
276 | |||
277 | # fix directory permissions | ||
278 | find ${MOZILLA_FIVE_HOME}/ -type d -perm 0700 -exec chmod 0755 {} \; || : | ||
279 | |||
280 | # fix permissions on chrome files | ||
281 | find ${MOZILLA_FIVE_HOME}/chrome/ -name '*.rdf' -exec chmod 0644 {} \; || : | ||
282 | } |
Properties
Name | Value |
---|---|
svn:keywords | Id |