Cross Reference: /solaris-userland/components/desktop/thunderbird/Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
#
# parfait is a bit unhappy (22527218)
export PARFAIT_BUILD=no
BUILD_BITS = 32
COMPILER = gcc
include ../../../make-rules/shared-macros.mk
COMPONENT_NAME= thunderbird
COMPONENT_VERSION= 45.3.0
COMPONENT_PROJECT_URL= http://www.mozilla.com/thunderbird
COMPONENT_ARCHIVE = $(COMPONENT_SRC).source.tar.xz
COMPONENT_ARCHIVE_HASH= \
sha256:231f6a7a073344659e436a2b1ae58004c3a29e74375af2c8d0de13f3bc79fac7
MOZILLA_FTP = http://ftp.mozilla.org/pub/$(COMPONENT_NAME)/releases/$(COMPONENT_VERSION)
COMPONENT_ARCHIVE_URL= $(MOZILLA_FTP)/source/$(COMPONENT_ARCHIVE)
COMPONENT_BUGDB= tbird/mailer
TPNO= 31787
LIGHTNING_VERSION= 4.7.1
# There are a set of .xpi files (as given in the LANG_LIST definition below)
# that we need. These are available under:
# http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/31.6.0/linux-i686/xpi/
# https://ftp.mozilla.org/pub/calendar/lightning/candidates/4.0.5-candidates/build1/linux-i686/
# We could download and unpack them individually, but instead I've created
# a compressed tarball of them, and made them available from the internal
# Userland mirror. So these need to be re-created by hand each time we rev.
# Downloading them individually can be a problem because firefox/thunderbird
# collide due to different files with identical .xpi names.
COMPONENT_ARCHIVE_1 = $(COMPONENT_SRC)-xpi.tar.gz
COMPONENT_ARCHIVE_HASH_1 = \
sha256:6b170356db3c345e4704de93ed41f5d16afac9460345f6675b02193ad41a128f
COMPONENT_ARCHIVE_URL_1 = $(INTERNAL_ARCHIVE_MIRROR)/$(COMPONENT_ARCHIVE_1)
COMPONENT_ARCHIVE_2 = lightning-$(LIGHTNING_VERSION)-xpi.tar.gz
COMPONENT_ARCHIVE_HASH_2 = \
sha256:5bab9f0f879bdae9a312c5612b089c932c0400db89346c9c38b5c41623410e75
COMPONENT_ARCHIVE_URL_2 = $(INTERNAL_ARCHIVE_MIRROR)/$(COMPONENT_ARCHIVE_2)
LANG_LIST = ar bg ca cs da de el es-AR es-ES et eu fi \
fr gl he hu id is it ja ko lt nb-NO nl nn-NO pa-IN pl \
pt-BR pt-PT ro ru sk sl sq sv-SE tr uk zh-CN zh-TW
CLEAN_PATHS += $(COMPONENT_DIR)/xpi
CLEAN_PATHS += $(COMPONENT_DIR)/xpi-lightning
# Firefox and Thunderbird share the same firefox*.patch patches. Copy these
# patches from the Firefox patches directory and the Thunderbird patches to a
# directory of all files (patches-all), except for Firefox patches 42 and 46,
# which don't get applied in Thunderbird. (libxul and dtrace patches)
PATCH_DIR=patches-all
CLEAN_PATHS += $(PATCH_DIR)
COPY_COMMON_FILES_1:= $(shell mkdir -p $(PATCH_DIR))
COPY_COMMON_FILES_2:= \
$(shell /usr/bin/rsync -ac patches/* ../firefox/patches/* $(PATCH_DIR))
COPY_COMMON_FILES_3:= \
$(shell /usr/bin/rm -f $(PATCH_DIR)/firefox*42*.patch $(PATCH_DIR)/firefox*46*.patch)
# Depends on libsmbclient but samba is on the do-not-publish list, so this
# must be too.
ifeq ($(BUILD_TYPE), evaluation)
BUILD_32=
INSTALL_32=
PUBLISH_STAMP=
endif
include $(WS_MAKE_RULES)/common.mk
# /usr/sbin for dtrace, SPRO for python modules, PERL as well.
PATH = $(dirname $(CC)):/usr/gnu/bin:/usr/bin:/usr/sbin:$(dirname $(PERL)):$(SPRO_VROOT)/bin
MOZCONFIG = $(BUILD_DIR_32)/mozconfig
COMPONENT_PRE_CONFIGURE_ACTION += \
echo "mk_add_options BUILD_OFFICIAL=1" > $(MOZCONFIG) ; \
echo "mk_add_options MOZILLA_OFFICIAL=1" >> $(MOZCONFIG) ; \
echo "ac_add_options --enable-application=mail" >> $(MOZCONFIG) ; \
echo "ac_add_options --prefix=/usr" >> $(MOZCONFIG) ; \
echo "ac_add_options --libdir=/usr/lib" >> $(MOZCONFIG) ; \
echo "ac_add_options --mandir=/usr/share/man" >> $(MOZCONFIG) ; \
echo "ac_add_options --disable-debug" >> $(MOZCONFIG) ; \
echo "ac_add_options --enable-optimize" >> $(MOZCONFIG) ; \
echo "ac_add_options --disable-tests" >> $(MOZCONFIG) ; \
echo "ac_add_options --with-system-libevent" >> $(MOZCONFIG) ; \
echo "ac_add_options --with-system-zlib" >> $(MOZCONFIG) ; \
echo "ac_add_options --with-system-bz2" >> $(MOZCONFIG) ; \
echo "ac_add_options --enable-system-ffi" >> $(MOZCONFIG) ; \
echo "ac_add_options --enable-system-sqlite" >> $(MOZCONFIG) ; \
echo "ac_add_options --enable-libxul" >> $(MOZCONFIG) ; \
echo "ac_add_options --enable-jemalloc" >> $(MOZCONFIG) ; \
echo "ac_add_options --enable-official-branding" >> $(MOZCONFIG) ; \
echo "ac_add_options --disable-updater" >> $(MOZCONFIG) ; \
echo "ac_add_options --enable-update-packaging" >> $(MOZCONFIG) ; \
echo "ac_add_options --enable-ipc" >> $(MOZCONFIG) ; \
echo "ac_add_options --enable-gstreamer" >> $(MOZCONFIG) ; \
echo "ac_add_options --enable-system-pixman" >> $(MOZCONFIG) ; \
echo "ac_add_options --without-intl-api" >> $(MOZCONFIG) ; \
echo "ac_add_options --disable-crashreporter" >> $(MOZCONFIG) ; \
echo "ac_add_options --enable-debug-symbols=no" >> $(MOZCONFIG) ; \
echo "ac_add_options --enable-calendar" >> $(MOZCONFIG) ; \
echo 'ac_add_options --with-rpath="\\\\\\$$\\$$ORIGIN"' >> $(MOZCONFIG) ; \
echo "ac_add_options --enable-startup-notification" >> $(MOZCONFIG) ;
CXXFLAGS += -Wno-invalid-offsetof -fpermissive
CC += $(CC_BITS)
CXX += $(CC_BITS)
# jemalloc (from libxul) interposes on malloc in glib causing startup problems,
# so use the big hammer for now, pending the resolution of:
# 24765609 thunderbird build dies with newer GCC
LD_EXEC_OPTIONS += -z now
CONFIGURE_ENV += PKG_CONFIG_PATH=$(CONFIGURE_LIBDIR.$(BITS))/pkgconfig
CONFIGURE_ENV += OS_DEFINES="-D__USE_LEGACY_PROTOTYPES__"
# -L.../dist/bin needs to be set otherwise it will report missing libnss3.so,
# libssl3.so, etc, while linking.
CONFIGURE_ENV += LDFLAGS="$(LD_Z_IGNORE) -z interpose -B nodirect -L$(BUILD_DIR_32)/dist/lib -L$(BUILD_DIR_32)/dist/bin"
CONFIGURE_ENV += MOZCONFIG=$(MOZCONFIG)
CONFIGURE_ENV += "CC=$(CC)"
CONFIGURE_ENV += "CXX=$(CXX)"
CONFIGURE_ENV += "CFLAGS=$(CFLAGS)"
CONFIGURE_ENV += "CXXFLAGS=$(CXXFLAGS)"
# If the configure options are not explicitly set, then configure fails with:
# configure: warning: CC=/usr/gcc/4.8/bin/gcc: invalid host type
# invalid host type
# configure: warning: CXX=/usr/gcc/4.8/bin/gcc: invalid host type
# invalid host type
# configure: error: can only configure for one host and one target at a time
CONFIGURE_OPTIONS = --prefix=$(CONFIGURE_PREFIX)
CONFIGURE_OPTIONS += --mandir=$(CONFIGURE_MANDIR)
COMPONENT_POST_CONFIGURE_ACTION += \
$(CP) $(MOZCONFIG) $(COMPONENT_SRC)/mozconfig
COMPONENT_POST_BUILD_ACTION = \
(cd $(@D)/mail/installer ; $(ENV) $(COMPONENT_BUILD_ENV) \
$(GMAKE) $(COMPONENT_BUILD_ARGS) $(COMPONENT_BUILD_TARGETS))
# Path to lightning extension directory
LIGHTNING_EXT_DIR = \
$(PROTOUSRLIBDIR)/thunderbird-$(COMPONENT_VERSION)/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}
COMPONENT_POST_INSTALL_ACTION += \
$(CP) -r $(BUILD_DIR_32)/dist/bin/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/* \
$(LIGHTNING_EXT_DIR) ;
COMPONENT_POST_INSTALL_ACTION += \
$(RM) -rf xpi ; \
$(TAR) xvf $(COMPONENT_ARCHIVE_1) > /dev/null 2>&1 ; \
$(TAR) xvf $(COMPONENT_ARCHIVE_2) > /dev/null 2>&1 ; \
list1='$(LANG_LIST)' ; for f in $$list1 ; do \
$(CP) xpi/$$f.xpi \
$(PROTOUSRLIBDIR)/thunderbird-$(COMPONENT_VERSION)/distribution/extensions/langpack-$$f@thunderbird.mozilla.org.xpi ; \
unzip xpi-lightning/lightning-$(LIGHTNING_VERSION).$$f.linux-i686.xpi \
chrome/calendar-$$f/\* chrome/lightning-$$f/\* -d \
$(LIGHTNING_EXT_DIR)/ ; \
echo 'locale calendar '$$f' chrome/calendar-'$$f'/locale/'$$f'/calendar/' >> $(LIGHTNING_EXT_DIR)/chrome.manifest ; \
echo 'locale lightning '$$f' chrome/lightning-'$$f'/locale/'$$f'/lightning/' >> $(LIGHTNING_EXT_DIR)/chrome.manifest ; \
done ;
download-xpis:
@echo "download-xpis"
$(RM) -r $(COMPONENT_DIR)/xpi $(COMPONENT_DIR)/$(COMPONENT_ARCHIVE_1)
$(MKDIR) $(COMPONENT_DIR)/xpi
@echo "downloading thunderbird xpis"
list1='$(LANG_LIST)' ; for f in $$list1 ; do \
echo $$f; \
/usr/bin/curl -s -o $(COMPONENT_DIR)/xpi/$$f.xpi \
$(TB_XPI)/$$f.xpi ;\
done
(cd $(COMPONENT_DIR); \
$(TAR) czvf $(COMPONENT_DIR)/$(COMPONENT_ARCHIVE_1) xpi )
/usr/bin/sha256sum $(COMPONENT_ARCHIVE_1)
download-lightning-xpis:
@echo "download-lightning-xpis"
$(RM) $(COMPONENT_DIR)/xpi-lightning $(COMPONENT_DIR)/$(COMPONENT_ARCHIVE_2)
$(MKDIR) $(COMPONENT_DIR)/xpi-lightning
@echo "downloading lightning xpis"
list1='$(LANG_LIST)' ; for f in $$list1 ; do \
echo $$f; \
/usr/bin/curl -s -o $(COMPONENT_DIR)/xpi-lightning/lightning-$(LIGHTNING_VERSION).$$f.linux-i686.xpi \
$(LN_XPI)/lightning-$(LIGHTNING_VERSION).$$f.linux-i686.xpi ;\
done
(cd $(COMPONENT_DIR); \
$(TAR) czvf $(COMPONENT_DIR)/$(COMPONENT_ARCHIVE_2) xpi-lightning )
/usr/bin/sha256sum $(COMPONENT_ARCHIVE_2)
LIB_LIST.i386 =
LIB_LIST.sparc = $(PROTOUSRLIBDIR)/thunderbird-devel-$(COMPONENT_VERSION)/sdk/lib/cpu/sparcv8plus/libnspr_flt4.so
LIB_LIST = $(LIB_LIST.$(MACH))
COMPONENT_POST_INSTALL_ACTION += \
slist='$(LIB_LIST)' ; for f in $$slist ; do \
$(MKDIR) $(PROTOUSRLIBDIR)/thunderbird-$(COMPONENT_VERSION)/cpu/sparcv8plus ; \
$(CP) $$f $(PROTOUSRLIBDIR)/thunderbird-$(COMPONENT_VERSION)/cpu/sparcv8plus/libnspr_flt4.so ; \
done ;
COMPONENT_TEST_DIR = $(@D)/js/src
COMPONENT_TEST_TARGETS=check-jit-test
COMPONENT_TEST_TRANSFORMS = \
'-e "/^PASSED ALL/,/Failed:/p" ' \
'-e "/.*/d" '
$(SOURCE_DIR)/.patched-firefox-%: GPATCH_FLAGS += -d $(@D)/mozilla
REQUIRED_PACKAGES += compress/bzip2
REQUIRED_PACKAGES += database/sqlite-3
REQUIRED_PACKAGES += library/desktop/atk
REQUIRED_PACKAGES += library/desktop/cairo
REQUIRED_PACKAGES += library/desktop/gdk-pixbuf
REQUIRED_PACKAGES += library/desktop/gtk2
REQUIRED_PACKAGES += library/desktop/pango
REQUIRED_PACKAGES += library/desktop/startup-notification
REQUIRED_PACKAGES += library/glib2
# Remove once all build machines have library/desktop/startup-notification:
REQUIRED_PACKAGES += library/gnome/gnome-libs
REQUIRED_PACKAGES += library/graphics/pixman
REQUIRED_PACKAGES += library/libevent
REQUIRED_PACKAGES += library/libffi
REQUIRED_PACKAGES += library/samba/libsmbclient
REQUIRED_PACKAGES += library/zlib
REQUIRED_PACKAGES += system/library
REQUIRED_PACKAGES += system/library/gcc/gcc-c-runtime
REQUIRED_PACKAGES += system/library/gcc/gcc-c++-runtime
REQUIRED_PACKAGES += system/library/fontconfig
REQUIRED_PACKAGES += system/library/freetype-2
REQUIRED_PACKAGES += system/library/libdbus
REQUIRED_PACKAGES += system/library/libdbus-glib
REQUIRED_PACKAGES += system/library/math
REQUIRED_PACKAGES += x11/library/libx11
REQUIRED_PACKAGES += x11/library/libxext
REQUIRED_PACKAGES += x11/library/libxrender
REQUIRED_PACKAGES += x11/library/toolkit/libxt