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 # ESR should be set to esr for esr build, or an empty string for other builds
36 # CANDIDATE_BUILD is the build number found in the candidates directory.
37 # Do not define for final release build.
40 COMPONENT_NAME
= thunderbird
41 COMPONENT_VERSION
= 128.4.3
42 COMPONENT_SUMMARY
= Mozilla Thunderbird Email Application
43 COMPONENT_PROJECT_URL
= https
://www.thunderbird.net
/
44 COMPONENT_SRC
= $(COMPONENT_NAME
)-$(COMPONENT_VERSION
)
45 COMPONENT_ARCHIVE
= $(COMPONENT_SRC
)$(ESR
).source.
tar.xz
46 COMPONENT_ARCHIVE_HASH
= \
47 sha256
:146edcfee47ebaa3fb6cf877a0747140dd011a3f6b674c98cdc61b9e98bbd61c
48 ifndef CANDIDATE_BUILD
49 MOZILLA_FTP
= https
://ftp.mozilla.org
/pub
/$(COMPONENT_NAME
)/releases
/$(COMPONENT_VERSION
)$(ESR
)
51 MOZILLA_FTP
= https
://ftp.mozilla.org
/pub
/$(COMPONENT_NAME
)/candidates
/$(COMPONENT_VERSION
)$(ESR
)-candidates
/build
$(CANDIDATE_BUILD
)
53 COMPONENT_ARCHIVE_URL
= $(MOZILLA_FTP
)/source
/$(COMPONENT_ARCHIVE
)
54 COMPONENT_FMRI
= mail
/thunderbird
55 COMPONENT_CLASSIFICATION
= Applications
/Internet
59 # TODO: use remote hashfile to verify
60 ALLOW_UNVERIFIED_DOWNLOADS
=yes
61 export ALLOW_UNVERIFIED_DOWNLOADS
63 # There are a set of .xpi files (as given in the LANG_LIST definition
64 # below) that we need. We could download and unpack them individually, but
65 # they doesn't contain version in its file name and there is lot of them.
66 # Therefore we will download them and archive them in Userland cache using
67 # one file with version number.
69 LANG_LIST
= af
ar ast be bg br ca cak cs cy \
70 da de dsb el en-CA en-GB en-US es-AR es-ES es-MX et \
71 eu fi fr fy-NL ga-IE gd gl he hr hsb hu \
72 hy-AM id is it ja ka kab kk ko lt lv ms \
73 nb-NO nl nn-NO pa-IN pl pt-BR pt-PT
rm ro ru sk sl \
74 sq sr sv-SE th tr uk uz vi zh-CN zh-TW
77 LANG_FILES_LOCATION
= \
78 https
://ftp.mozilla.org
/pub
/thunderbird
/candidates
/$(COMPONENT_VERSION
)$(ESR
)-candidates
/build
$(CANDIDATE_BUILD
)/linux-x86_64
/xpi
80 LANG_FILES_LOCATION
= \
81 https
://ftp.mozilla.org
/pub
/$(COMPONENT_NAME
)/releases
/$(COMPONENT_VERSION
)$(ESR
)/linux-x86_64
/xpi
84 CLEAN_PATHS
+= $(COMPONENT_DIR
)/xpi
86 CONFIGURE_DEFAULT_DIRS
=no
88 include $(WS_MAKE_RULES
)/common.mk
90 RUSTUP_HOME
= $(BUILD_DIR
)/.rust_up
91 CARGO_HOME
= $(BUILD_DIR
)/.cargo
93 PATH
= $(CARGO_HOME
)/bin
:$(PATH.gnu
)
95 MOZCONFIG
= $(SOURCE_DIR
)/mozconfig
96 GNU_ARCH
= x86_64-unknown-illumos
99 # disable code optimization
103 MOZCONFIG_DEBUG
= $(MOZCONFIG
)
104 MOZCONFIG_NON_DEBUG
= /dev
/null
106 MOZCONFIG_DEBUG
= /dev
/null
107 MOZCONFIG_NON_DEBUG
= $(MOZCONFIG
)
110 THUNDERBIRD_LIBDIR
= /usr
/lib
/$(MACH64
)
112 COMPONENT_PRE_CONFIGURE_ACTION
+= \
113 rm -f
$(MOZCONFIG
); \
114 echo
"ac_add_options MOZILLA_OFFICIAL=1" >> $(MOZCONFIG
) ; \
115 echo
"ac_add_options PKG_CONFIG=/usr/bin/amd64/pkg-config" >> $(MOZCONFIG
) ; \
116 echo
"ac_add_options CC_TYPE=$(CC_TYPE)" >> $(MOZCONFIG
) ; \
117 echo
"ac_add_options CC=$(CC)" >> $(MOZCONFIG
) ; \
118 echo
"ac_add_options CXX=$(CXX)" >> $(MOZCONFIG
) ; \
119 echo
"ac_add_options --prefix=/usr" >> $(MOZCONFIG
) ; \
120 echo
"ac_add_options --libdir=$(THUNDERBIRD_LIBDIR)" >> $(MOZCONFIG
) ; \
121 echo
"ac_add_options --disable-crashreporter" >> $(MOZCONFIG
) ; \
122 echo
"ac_add_options --disable-debug-symbols" >> $(MOZCONFIG_NON_DEBUG
) ; \
123 echo
"ac_add_options --disable-install-strip" >> $(MOZCONFIG_DEBUG
) ; \
124 echo
"ac_add_options --disable-optimize" >> $(MOZCONFIG_DEBUG
) ; \
125 echo
"ac_add_options --disable-tests" >> $(MOZCONFIG
) ; \
126 echo
"ac_add_options --disable-updater" >> $(MOZCONFIG
) ; \
127 echo
"ac_add_options --enable-application=comm/mail" >> $(MOZCONFIG
) ; \
128 echo
"ac_add_options --enable-debug" >> $(MOZCONFIG_DEBUG
) ; \
129 echo
"ac_add_options --enable-jemalloc" >> $(MOZCONFIG
) ; \
130 echo
"ac_add_options --enable-js-shell" >> $(MOZCONFIG
) ; \
131 echo
"ac_add_options --enable-official-branding" >> $(MOZCONFIG
) ; \
132 echo
"ac_add_options --enable-optimize" >> $(MOZCONFIG_NON_DEBUG
) ; \
133 echo
"ac_add_options --enable-pulseaudio" >> $(MOZCONFIG
) ; \
134 echo
"ac_add_options --enable-replace-malloc" >> $(MOZCONFIG
) ; \
135 echo
"ac_add_options --enable-release" >> $(MOZCONFIG
) ; \
136 echo
"ac_add_options --enable-system-pixman" >> $(MOZCONFIG
) ; \
137 echo
"ac_add_options --enable-update-channel=release" >> $(MOZCONFIG
) ; \
138 echo
"ac_add_options --with-distribution-id=org.openindiana" >> $(MOZCONFIG
) ; \
139 echo
"ac_add_options --with-intl-api" >> $(MOZCONFIG
) ; \
140 echo
"ac_add_options --with-system-libevent" >> $(MOZCONFIG
) ; \
141 echo
"ac_add_options --with-system-zlib" >> $(MOZCONFIG
) ; \
142 echo
"ac_add_options --host=$(GNU_ARCH)" >> $(MOZCONFIG
) ; \
143 echo
"ac_add_options --target=$(GNU_ARCH)" >> $(MOZCONFIG
) ; \
144 echo
"ac_add_options --without-wasm-sandboxed-libraries" >> $(MOZCONFIG
) ; \
146 # xpcom uses DEF XP_SOLARIS
147 CXXFLAGS
+= -DXP_SOLARIS
-Wno-invalid-offsetof
-fpermissive
150 LD_MAP_NOEXBSS.sparc
=
152 # libmozgtk needs to link to gtk3 and others
155 # missing symbols from gtk3 during Firefox start
158 LANG_FILES
=$(addsuffix .xpi
,$(LANG_LIST
))
160 CLEAN_PATHS
+= $(LANG_FILES
)
163 $(FETCH
) --file
$@
--url
$(LANG_FILES_LOCATION
)/$@
165 download prep
:: $(LANG_FILES
)
167 CONFIGURE_OPTIONS
= CC
=$(CC
) CXX
=$(CXX
)
169 CONFIGURE_ENV
+= RUSTUP_HOME
=$(RUSTUP_HOME
)
170 CONFIGURE_ENV
+= CARGO_HOME
=$(CARGO_HOME
)
171 COMPONENT_BUILD_ENV
+= RUSTUP_HOME
=$(RUSTUP_HOME
)
172 COMPONENT_BUILD_ENV
+= CARGO_HOME
=$(CARGO_HOME
)
174 COMPONENT_BUILD_ARGS
+= $(JOBS
:%=-j
%)
176 # because we touched old-configure.in and js/src/old-configure.in
177 COMPONENT_PRE_CONFIGURE_ACTION
+= ( \
178 export RUSTUP_HOME
=$(RUSTUP_HOME
); \
179 export CARGO_HOME
=$(CARGO_HOME
); \
180 export RUSTUP_INIT_SKIP_PATH_CHECK
=yes
; \
181 curl https
://sh.rustup.rs
-sSf | bash
-s
-- -y
--no-modify-path
; \
182 source
$(CARGO_HOME
)/env
; \
183 rustup
install $(RUST_VERSION
); \
184 rustup default
$(RUST_VERSION
)-x86_64-unknown-illumos
; \
186 PATH
=$(GCC_BINDIR
):$(PATH
) cargo
install --root
=$(CARGO_HOME
) --vers
0.26.0 cbindgen
; \
189 # COMPONENT_POST_BUILD_ACTION = \
190 # (cd $(@D)/mail/installer ; $(ENV) $(COMPONENT_BUILD_ENV) \
191 # $(GMAKE) $(COMPONENT_BUILD_ARGS) $(COMPONENT_BUILD_TARGETS))
193 COMPONENT_POST_INSTALL_ACTION
+= \
194 for file in
`find $(PROTO_DIR)$(THUNDERBIRD_LIBDIR)/thunderbird -name "*.so"`; \
196 /usr
/bin
/elfedit
-e
'dyn:value -s RUNPATH "$(GCC_LIBDIR):$(THUNDERBIRD_LIBDIR)/thunderbird:$$ORIGIN"' $$file ; \
197 /usr
/bin
/elfedit
-e
'dyn:value -s RPATH "$(GCC_LIBDIR):$(THUNDERBIRD_LIBDIR)/thunderbird:$$ORIGIN"' $$file ; \
200 # generate license file for package by using the contents from license.html
201 COMPONENT_POST_INSTALL_ACTION
+= \
202 unzip
-c
$(PROTOUSRLIBDIR64
)/$(COMPONENT_NAME
)/omni.ja chrome
/messenger
/content
/messenger
/license.html \
203 | LC_ALL
=en_US.UTF-8 lynx
--display_charset
=utf-8
-stdin
--dump
-nolist
> $(COMPONENT_NAME
).license
;
206 COMPONENT_POST_INSTALL_ACTION
+= \
207 $(MKDIR
) $(PROTO_DIR
)$(THUNDERBIRD_LIBDIR
)/thunderbird
/distribution
/extensions
/; \
208 list1
='$(LANG_LIST)' ; for f in
$$list1 ; do \
210 $(PROTO_DIR
)$(THUNDERBIRD_LIBDIR
)/thunderbird
/distribution
/extensions
/langpack-
$$f@thunderbird.mozilla.org.xpi
; \
213 # copy distribution.ini to install staging area
214 COMPONENT_POST_INSTALL_ACTION
+= \
215 mkdir
$(PROTO_DIR
)$(THUNDERBIRD_LIBDIR
)/thunderbird
/distribution
; \
216 $(CP
) $(COMPONENT_DIR
)/files
/distribution.ini
$(PROTO_DIR
)$(THUNDERBIRD_LIBDIR
)/thunderbird
/distribution
/distribution.ini
;
218 COMPONENT_TEST_MASTER
= $(COMPONENT_TEST_RESULTS_DIR
)/results-
$(MACH
).master
220 COMPONENT_TEST_DIR
= $(@D
)/js
/src
221 COMPONENT_TEST_TARGETS
=check-jit-test
222 COMPONENT_TEST_TRANSFORMS
= \
223 '-e "/^PASSED ALL/,/Failed:/p" ' \
224 '-e "/^FAILURES:/,/Failed:/p" ' \
227 # the license file is dynamically build, thus we need to remove it:
229 $(RM
) $(COMPONENT_LICENSE_FILE
)
232 PYTHON_REQUIRED_PACKAGES
+= library
/python
/psutil
233 PYTHON_REQUIRED_PACKAGES
+= runtime
/python
234 REQUIRED_PACKAGES
+= database
/sqlite-3
235 REQUIRED_PACKAGES
+= developer
/build
/autoconf-213
236 REQUIRED_PACKAGES
+= gnome
/config
/gconf
237 REQUIRED_PACKAGES
+= library
/audio
/pulseaudio
238 REQUIRED_PACKAGES
+= library
/http-parser
239 REQUIRED_PACKAGES
+= runtime
/nodejs-22
240 REQUIRED_PACKAGES
+= system
/header
/header-audio
241 REQUIRED_PACKAGES
+= web
/browser
/lynx
243 # Auto-generated dependencies
244 REQUIRED_PACKAGES
+= $(GCC_RUNTIME_PKG
)
245 REQUIRED_PACKAGES
+= $(GXX_RUNTIME_PKG
)
246 REQUIRED_PACKAGES
+= gnome
/accessibility
/at-spi2-core
247 REQUIRED_PACKAGES
+= library
/c
++/harfbuzz
248 REQUIRED_PACKAGES
+= library
/desktop
/cairo
249 REQUIRED_PACKAGES
+= library
/desktop
/gdk-pixbuf
250 REQUIRED_PACKAGES
+= library
/desktop
/gtk3
251 REQUIRED_PACKAGES
+= library
/desktop
/pango
252 REQUIRED_PACKAGES
+= library
/glib2
253 REQUIRED_PACKAGES
+= library
/graphics
/pixman
254 REQUIRED_PACKAGES
+= library
/libevent2
255 REQUIRED_PACKAGES
+= library
/zlib
256 REQUIRED_PACKAGES
+= system
/library
257 REQUIRED_PACKAGES
+= system
/library
/fontconfig
258 REQUIRED_PACKAGES
+= system
/library
/freetype-2
259 REQUIRED_PACKAGES
+= system
/library
/libdbus
260 REQUIRED_PACKAGES
+= system
/library
/math
261 REQUIRED_PACKAGES
+= x11
/library
/libx11
262 REQUIRED_PACKAGES
+= x11
/library
/libxcb
263 REQUIRED_PACKAGES
+= x11
/library
/libxext
264 REQUIRED_PACKAGES
+= x11
/library
/libxrandr