4 # The contents of this file are subject to the terms of the
5 # Common Development and Distribution License (the "License").
6 # You may not use this file except in compliance with the License.
8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 # or http://www.opensolaris.org/os/licensing.
10 # See the License for the specific language governing permissions
11 # and limitations under the License.
13 # When distributing Covered Code, include this CDDL HEADER in each
14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 # If applicable, add the following below this CDDL HEADER, with the
16 # fields enclosed by brackets "[]" replaced with your own identifying
17 # information: Portions Copyright [yyyy] [name of copyright owner]
23 # Copyright 2017 Alexander Pyhalov
24 # Copyright 2018 Michal Nowak
25 # Copyright (c) 2015, 2021, Oracle and/or its affiliates.
26 # Copyright 2021, Carsten Grzemba
27 # Copyright 2023 Niklas Poslovski
30 USE_PARALLEL_BUILD
= yes
31 include ..
/..
/..
/make-rules
/shared-macros.mk
33 # CANDIDATE_BUILD is the build number found in the candidates directory.
34 # Do not define for final release build.
37 COMPONENT_NAME
= thunderbird
38 COMPONENT_VERSION
= 128.2.0
39 COMPONENT_SUMMARY
= Mozilla Thunderbird Email Application
40 COMPONENT_PROJECT_URL
= https
://www.thunderbird.net
/
41 COMPONENT_SRC
= $(COMPONENT_NAME
)-$(COMPONENT_VERSION
)
42 COMPONENT_ARCHIVE
= $(COMPONENT_SRC
)esr.source.
tar.xz
43 COMPONENT_ARCHIVE_HASH
= \
44 sha256
:ca67c2b8648527548788848b94c80227be681f6262ca518114f787fb2180f6e1
45 ifndef CANDIDATE_BUILD
46 MOZILLA_FTP
= https
://ftp.mozilla.org
/pub
/$(COMPONENT_NAME
)/releases
/$(COMPONENT_VERSION
)esr
48 MOZILLA_FTP
= https
://ftp.mozilla.org
/pub
/$(COMPONENT_NAME
)/candidates
/$(COMPONENT_VERSION
)esr-candidates
/build
$(CANDIDATE_BUILD
)
50 COMPONENT_ARCHIVE_URL
= $(MOZILLA_FTP
)/source
/$(COMPONENT_ARCHIVE
)
51 COMPONENT_FMRI
= mail
/thunderbird
52 COMPONENT_CLASSIFICATION
= Applications
/Internet
56 # TODO: use remote hashfile to verify
57 ALLOW_UNVERIFIED_DOWNLOADS
=yes
58 export ALLOW_UNVERIFIED_DOWNLOADS
60 # There are a set of .xpi files (as given in the LANG_LIST definition
61 # below) that we need. We could download and unpack them individually, but
62 # they doesn't contain version in its file name and there is lot of them.
63 # Therefore we will download them and archive them in Userland cache using
64 # one file with version number.
66 LANG_LIST
= af
ar ast be bg br ca cak cs cy \
67 da de dsb el en-CA en-GB en-US es-AR es-ES es-MX et \
68 eu fi fr fy-NL ga-IE gd gl he hr hsb hu \
69 hy-AM id is it ja ka kab kk ko lt lv ms \
70 nb-NO nl nn-NO pa-IN pl pt-BR pt-PT
rm ro ru sk sl \
71 sq sr sv-SE th tr uk uz vi zh-CN zh-TW
74 LANG_FILES_LOCATION
= \
75 https
://ftp.mozilla.org
/pub
/thunderbird
/candidates
/$(COMPONENT_VERSION
)esr-candidates
/build
$(CANDIDATE_BUILD
)/linux-x86_64
/xpi
77 LANG_FILES_LOCATION
= \
78 https
://ftp.mozilla.org
/pub
/$(COMPONENT_NAME
)/releases
/$(COMPONENT_VERSION
)esr
/linux-x86_64
/xpi
81 CLEAN_PATHS
+= $(COMPONENT_DIR
)/xpi
83 CONFIGURE_DEFAULT_DIRS
=no
85 include $(WS_MAKE_RULES
)/common.mk
87 RUSTUP_HOME
= $(BUILD_DIR
)/.rust_up
88 CARGO_HOME
= $(BUILD_DIR
)/.cargo
90 PATH
= $(CARGO_HOME
)/bin
:$(PATH.gnu
)
92 MOZCONFIG
= $(SOURCE_DIR
)/mozconfig
93 GNU_ARCH
= x86_64-unknown-illumos
96 # disable code optimization
100 MOZCONFIG_DEBUG
= $(MOZCONFIG
)
101 MOZCONFIG_NON_DEBUG
= /dev
/null
103 MOZCONFIG_DEBUG
= /dev
/null
104 MOZCONFIG_NON_DEBUG
= $(MOZCONFIG
)
107 THUNDERBIRD_LIBDIR
= /usr
/lib
/$(MACH64
)
109 COMPONENT_PRE_CONFIGURE_ACTION
+= \
110 rm -f
$(MOZCONFIG
); \
111 echo
"ac_add_options MOZILLA_OFFICIAL=1" >> $(MOZCONFIG
) ; \
112 echo
"ac_add_options PKG_CONFIG=/usr/bin/amd64/pkg-config" >> $(MOZCONFIG
) ; \
113 echo
"ac_add_options CC_TYPE=$(CC_TYPE)" >> $(MOZCONFIG
) ; \
114 echo
"ac_add_options CC=$(CC)" >> $(MOZCONFIG
) ; \
115 echo
"ac_add_options CXX=$(CXX)" >> $(MOZCONFIG
) ; \
116 echo
"ac_add_options --prefix=/usr" >> $(MOZCONFIG
) ; \
117 echo
"ac_add_options --libdir=$(THUNDERBIRD_LIBDIR)" >> $(MOZCONFIG
) ; \
118 echo
"ac_add_options --disable-crashreporter" >> $(MOZCONFIG
) ; \
119 echo
"ac_add_options --disable-debug-symbols" >> $(MOZCONFIG_NON_DEBUG
) ; \
120 echo
"ac_add_options --disable-install-strip" >> $(MOZCONFIG_DEBUG
) ; \
121 echo
"ac_add_options --disable-optimize" >> $(MOZCONFIG_DEBUG
) ; \
122 echo
"ac_add_options --disable-tests" >> $(MOZCONFIG
) ; \
123 echo
"ac_add_options --disable-updater" >> $(MOZCONFIG
) ; \
124 echo
"ac_add_options --enable-application=comm/mail" >> $(MOZCONFIG
) ; \
125 echo
"ac_add_options --enable-debug" >> $(MOZCONFIG_DEBUG
) ; \
126 echo
"ac_add_options --enable-jemalloc" >> $(MOZCONFIG
) ; \
127 echo
"ac_add_options --enable-js-shell" >> $(MOZCONFIG
) ; \
128 echo
"ac_add_options --enable-official-branding" >> $(MOZCONFIG
) ; \
129 echo
"ac_add_options --enable-optimize" >> $(MOZCONFIG_NON_DEBUG
) ; \
130 echo
"ac_add_options --enable-pulseaudio" >> $(MOZCONFIG
) ; \
131 echo
"ac_add_options --enable-replace-malloc" >> $(MOZCONFIG
) ; \
132 echo
"ac_add_options --enable-release" >> $(MOZCONFIG
) ; \
133 echo
"ac_add_options --enable-system-pixman" >> $(MOZCONFIG
) ; \
134 echo
"ac_add_options --enable-update-channel=release" >> $(MOZCONFIG
) ; \
135 echo
"ac_add_options --with-intl-api" >> $(MOZCONFIG
) ; \
136 echo
"ac_add_options --with-system-libevent" >> $(MOZCONFIG
) ; \
137 echo
"ac_add_options --with-system-zlib" >> $(MOZCONFIG
) ; \
138 echo
"ac_add_options --host=$(GNU_ARCH)" >> $(MOZCONFIG
) ; \
139 echo
"ac_add_options --target=$(GNU_ARCH)" >> $(MOZCONFIG
) ; \
140 echo
"ac_add_options --without-wasm-sandboxed-libraries" >> $(MOZCONFIG
) ; \
142 # xpcom uses DEF XP_SOLARIS
143 CXXFLAGS
+= -DXP_SOLARIS
-Wno-invalid-offsetof
-fpermissive
146 LD_MAP_NOEXBSS.sparc
=
148 # libmozgtk needs to link to gtk3 and others
151 # missing symbols from gtk3 during Firefox start
154 LANG_FILES
=$(addsuffix .xpi
,$(LANG_LIST
))
156 CLEAN_PATHS
+= $(LANG_FILES
)
159 $(FETCH
) --file
$@
--url
$(LANG_FILES_LOCATION
)/$@
161 download prep
:: $(LANG_FILES
)
163 CONFIGURE_OPTIONS
= CC
=$(CC
) CXX
=$(CXX
)
165 CONFIGURE_ENV
+= RUSTUP_HOME
=$(RUSTUP_HOME
)
166 CONFIGURE_ENV
+= CARGO_HOME
=$(CARGO_HOME
)
167 COMPONENT_BUILD_ENV
+= RUSTUP_HOME
=$(RUSTUP_HOME
)
168 COMPONENT_BUILD_ENV
+= CARGO_HOME
=$(CARGO_HOME
)
170 COMPONENT_BUILD_ARGS
+= $(JOBS
:%=-j
%)
172 # because we touched old-configure.in and js/src/old-configure.in
173 COMPONENT_PRE_CONFIGURE_ACTION
+= ( \
174 export RUSTUP_HOME
=$(RUSTUP_HOME
); \
175 export CARGO_HOME
=$(CARGO_HOME
); \
176 export RUSTUP_INIT_SKIP_PATH_CHECK
=yes
; \
177 curl https
://sh.rustup.rs
-sSf | bash
-s
-- -y
--no-modify-path
; \
178 source
$(CARGO_HOME
)/env
; \
179 rustup
install $(RUST_VERSION
); \
180 rustup default
$(RUST_VERSION
)-x86_64-unknown-illumos
; \
182 PATH
=$(GCC_BINDIR
):$(PATH
) cargo
install --root
=$(CARGO_HOME
) --vers
0.26.0 cbindgen
; \
185 # COMPONENT_POST_BUILD_ACTION = \
186 # (cd $(@D)/mail/installer ; $(ENV) $(COMPONENT_BUILD_ENV) \
187 # $(GMAKE) $(COMPONENT_BUILD_ARGS) $(COMPONENT_BUILD_TARGETS))
189 COMPONENT_POST_INSTALL_ACTION
+= \
190 for file in
`find $(PROTO_DIR)$(THUNDERBIRD_LIBDIR)/thunderbird -name "*.so"`; \
192 /usr
/bin
/elfedit
-e
'dyn:value -s RUNPATH "$(GCC_LIBDIR):$(THUNDERBIRD_LIBDIR)/thunderbird:$$ORIGIN"' $$file ; \
193 /usr
/bin
/elfedit
-e
'dyn:value -s RPATH "$(GCC_LIBDIR):$(THUNDERBIRD_LIBDIR)/thunderbird:$$ORIGIN"' $$file ; \
196 # generate license file for package by using the contents from license.html
197 COMPONENT_POST_INSTALL_ACTION
+= \
198 unzip
-c
$(PROTOUSRLIBDIR64
)/$(COMPONENT_NAME
)/omni.ja chrome
/messenger
/content
/messenger
/license.html \
199 | LC_ALL
=en_US.UTF-8 lynx
--display_charset
=utf-8
-stdin
--dump
-nolist
> $(COMPONENT_NAME
).license
;
202 COMPONENT_POST_INSTALL_ACTION
+= \
203 $(MKDIR
) $(PROTO_DIR
)$(THUNDERBIRD_LIBDIR
)/thunderbird
/distribution
/extensions
/; \
204 list1
='$(LANG_LIST)' ; for f in
$$list1 ; do \
206 $(PROTO_DIR
)$(THUNDERBIRD_LIBDIR
)/thunderbird
/distribution
/extensions
/langpack-
$$f@thunderbird.mozilla.org.xpi
; \
209 COMPONENT_TEST_MASTER
= $(COMPONENT_TEST_RESULTS_DIR
)/results-
$(MACH
).master
211 COMPONENT_TEST_DIR
= $(@D
)/js
/src
212 COMPONENT_TEST_TARGETS
=check-jit-test
213 COMPONENT_TEST_TRANSFORMS
= \
214 '-e "/^PASSED ALL/,/Failed:/p" ' \
215 '-e "/^FAILURES:/,/Failed:/p" ' \
218 # the license file is dynamically build, thus we need to remove it:
220 $(RM
) $(COMPONENT_LICENSE_FILE
)
223 PYTHON_REQUIRED_PACKAGES
+= library
/python
/psutil
224 PYTHON_REQUIRED_PACKAGES
+= runtime
/python
225 REQUIRED_PACKAGES
+= database
/sqlite-3
226 REQUIRED_PACKAGES
+= developer
/build
/autoconf-213
227 REQUIRED_PACKAGES
+= gnome
/config
/gconf
228 REQUIRED_PACKAGES
+= library
/audio
/pulseaudio
229 REQUIRED_PACKAGES
+= library
/http-parser
230 REQUIRED_PACKAGES
+= runtime
/nodejs-22
231 REQUIRED_PACKAGES
+= system
/header
/header-audio
232 REQUIRED_PACKAGES
+= web
/browser
/lynx
234 # Auto-generated dependencies
235 REQUIRED_PACKAGES
+= $(GCC_RUNTIME_PKG
)
236 REQUIRED_PACKAGES
+= $(GXX_RUNTIME_PKG
)
237 REQUIRED_PACKAGES
+= library
/c
++/harfbuzz
238 REQUIRED_PACKAGES
+= library
/desktop
/atk
239 REQUIRED_PACKAGES
+= library
/desktop
/cairo
240 REQUIRED_PACKAGES
+= library
/desktop
/gdk-pixbuf
241 REQUIRED_PACKAGES
+= library
/desktop
/gtk3
242 REQUIRED_PACKAGES
+= library
/desktop
/pango
243 REQUIRED_PACKAGES
+= library
/glib2
244 REQUIRED_PACKAGES
+= library
/graphics
/pixman
245 REQUIRED_PACKAGES
+= library
/libevent2
246 REQUIRED_PACKAGES
+= library
/zlib
247 REQUIRED_PACKAGES
+= system
/library
248 REQUIRED_PACKAGES
+= system
/library
/fontconfig
249 REQUIRED_PACKAGES
+= system
/library
/freetype-2
250 REQUIRED_PACKAGES
+= system
/library
/libdbus
251 REQUIRED_PACKAGES
+= system
/library
/math
252 REQUIRED_PACKAGES
+= x11
/library
/libx11
253 REQUIRED_PACKAGES
+= x11
/library
/libxcb
254 REQUIRED_PACKAGES
+= x11
/library
/libxext
255 REQUIRED_PACKAGES
+= x11
/library
/libxrandr