2 # This file and its contents are supplied under the terms of the
3 # Common Development and Distribution License ("CDDL"), version 1.0.
4 # You may only use this file in accordance with the terms of version
7 # A full copy of the text of the CDDL should have accompanied this
8 # source. A copy of the CDDL is also available via the Internet at
9 # http://www.illumos.org/license/CDDL.
13 # Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
14 # Copyright 2015 OpenSXCE.org Martin Bochnig <opensxce@mail.ru>
15 # Copyright 2013-2017 Alexander Pyhalov
16 # Copyright 2019 Geoffrey Weiss
17 # Copyright 2019 Michal Nowak
18 # Copyright 2021 Carsten Grzemba
19 # Copyright 2023-2024 Niklas Poslovski
22 USE_PARALLEL_BUILD
= yes
23 include ..
/..
/..
/make-rules
/shared-macros.mk
25 COMPONENT_NAME
= librewolf
26 COMPONENT_MAJOR_VERSION
= 132.0.1
27 COMPONENT_MINOR_VERSION
= 1
28 COMPONENT_VERSION
= $(COMPONENT_MAJOR_VERSION
).
$(COMPONENT_MINOR_VERSION
)
29 HUMAN_VERSION
= $(COMPONENT_MAJOR_VERSION
)-$(COMPONENT_MINOR_VERSION
)
30 COMPONENT_SUMMARY
= LibreWolf Web browser
31 COMPONENT_PROJECT_URL
= https
://librewolf.net
32 COMPONENT_SRC_NAME
= $(COMPONENT_NAME
)-$(HUMAN_VERSION
)
33 COMPONENT_SRC
= $(COMPONENT_SRC_NAME
)
34 COMPONENT_ARCHIVE
= $(COMPONENT_SRC_NAME
).source.
tar.gz
35 COMPONENT_ARCHIVE_HASH
= sha256
:f86f40574ad33e2cb1c9f52921481fdcbcce9b0bd581603a295bd97ec47fe1fc
36 COMPONENT_ARCHIVE_URL
= https
://gitlab.com
/api
/v4
/projects
/32320088/packages
/generic
/librewolf-source
/$(HUMAN_VERSION
)/$(COMPONENT_ARCHIVE
)
37 COMPONENT_FMRI
= web
/browser
/librewolf
38 COMPONENT_CLASSIFICATION
= Applications
/Internet
42 CONFIGURE_DEFAULT_DIRS
= no
44 include $(WS_MAKE_RULES
)/common.mk
47 RUSTUP_HOME
= $(BUILD_DIR
)/.rust_up
48 CARGO_HOME
= $(BUILD_DIR
)/.cargo
50 PATH
= $(CARGO_HOME
)/bin
:$(PATH.gnu
)
52 MOZCONFIG
= $(SOURCE_DIR
)/mozconfig
53 GNU_ARCH
= x86_64-unknown-illumos
56 # disable code optimization
60 MOZCONFIG_DEBUG
= $(MOZCONFIG
)
61 MOZCONFIG_NON_DEBUG
= /dev
/null
63 MOZCONFIG_DEBUG
= /dev
/null
64 MOZCONFIG_NON_DEBUG
= $(MOZCONFIG
)
74 COMPILER
= $(COMPILER.
$(CC_TYPE
))
76 CXXFLAGS
+= -Wno-invalid-offsetof
-fpermissive
77 # xpcom uses DEF XP_SOLARIS
78 CXXFLAGS
+= -DXP_SOLARIS
79 # type problem compiling ffvpx with clang
80 CFLAGS
+= -D__int8_t_defined
82 FIREFOX_LIBDIR
= $(CONFIGURE_LIBDIR.
$(BITS
))
84 COMPONENT_PRE_CONFIGURE_ACTION
+= \
85 echo
"ac_add_options PKG_CONFIG=/usr/bin/amd64/pkg-config" >> $(MOZCONFIG
) ; \
86 echo
"ac_add_options CC_TYPE=$(CC_TYPE)" >> $(MOZCONFIG
) ; \
87 echo
"ac_add_options CC=$(CC)" >> $(MOZCONFIG
) ; \
88 echo
"ac_add_options CXX=$(CXX)" >> $(MOZCONFIG
) ; \
89 echo
"ac_add_options --prefix=/usr" >> $(MOZCONFIG
) ; \
90 echo
"ac_add_options --libdir=$(FIREFOX_LIBDIR)" >> $(MOZCONFIG
) ; \
91 echo
"ac_add_options --disable-debug-symbols" >> $(MOZCONFIG_NON_DEBUG
) ; \
92 echo
"ac_add_options --disable-install-strip" >> $(MOZCONFIG_DEBUG
) ; \
93 echo
"ac_add_options --enable-jemalloc" >> $(MOZCONFIG
) ; \
94 echo
"ac_add_options --enable-js-shell" >> $(MOZCONFIG
) ; \
95 echo
"ac_add_options --enable-pulseaudio" >> $(MOZCONFIG
) ; \
96 echo
"ac_add_options --enable-replace-malloc" >> $(MOZCONFIG
) ; \
97 echo
"ac_add_options --enable-system-pixman" >> $(MOZCONFIG
) ; \
98 echo
"ac_add_options --with-distribution-id=org.openindiana" >> $(MOZCONFIG
) ; \
99 echo
"ac_add_options --with-system-zlib" >> $(MOZCONFIG
) ; \
100 echo
"ac_add_options --host=$(GNU_ARCH)" >> $(MOZCONFIG
) ; \
101 echo
"ac_add_options --target=$(GNU_ARCH)" >> $(MOZCONFIG
) ; \
102 echo
"ac_add_options --without-wasm-sandboxed-libraries" >> $(MOZCONFIG
) ; \
103 echo
"ac_add_options --disable-alsa" >> $(MOZCONFIG
) ; \
104 # echo "ac_add_options --enable-bootstrap" >> $(MOZCONFIG) ; \
105 # echo "ac_add_options --with-wasi-sysroot=" >> $(MOZCONFIG) ; \
107 LD_SECEXT_OPTIONS
+= $(SSBD_ENABLE
)
110 LD_MAP_NOEXBSS.sparc
=
112 # libmozgtk needs to link to gtk3 and others
115 # missing symbols from gtk3 during Firefox start
118 # hope to get args data in stacks of core dumps
119 LD_OPTIONS
+= -msave-args
121 # use a local installed rust since the system version may not be compatible
122 COMPONENT_PRE_CONFIGURE_ACTION
+= ( \
123 export RUSTUP_HOME
=$(RUSTUP_HOME
); \
124 export CARGO_HOME
=$(CARGO_HOME
); \
125 export RUSTUP_INIT_SKIP_PATH_CHECK
=yes
; \
126 curl https
://sh.rustup.rs
-sSf | bash
-s
-- -y
--no-modify-path
; \
127 source
$(CARGO_HOME
)/env
; \
128 rustup
install $(RUST_VERSION
); \
129 rustup default
$(RUST_VERSION
)-x86_64-unknown-illumos
; \
131 cargo
install --root
=$(CARGO_HOME
) --vers
0.26.0 cbindgen
; \
134 ENV
+= CFLAGS
="$(CFLAGS)"
135 ENV
+= CXXFLAGS
="$(CXXFLAGS)"
136 ENV
+= PKG_CONFIG
=/usr
/bin
/amd64
/pkg-config
137 ENV
+= RUSTUP_HOME
=$(RUSTUP_HOME
)
138 ENV
+= CARGO_HOME
=$(CARGO_HOME
)
140 COMPONENT_BUILD_ARGS
+= $(JOBS
:%=-j
%)
142 CONFIGURE_ENV
= $(ENV
)
143 COMPONENT_BUILD_ENV
= $(ENV
)
144 COMPONENT_INSTALL_ENV
+= HOME
=/tmp
146 COMPONENT_POST_BUILD_ACTION
= \
147 (cd
$(@D
)/browser
/installer
; $(ENV
) $(COMPONENT_BUILD_ENV
) \
148 $(GMAKE
) $(COMPONENT_BUILD_ARGS
) $(COMPONENT_BUILD_TARGETS
))
150 COMPONENT_POST_INSTALL_ACTION
= \
151 for file in
`find $(PROTO_DIR)$(FIREFOX_LIBDIR)/librewolf/ -name "*.so"`; do \
152 /usr
/bin
/elfedit
-e
'dyn:value -s RUNPATH "$(GCC_LIBDIR):$(FIREFOX_LIBDIR)/librewolf:/usr/lib/mps/amd64"' $$file ; \
153 /usr
/bin
/elfedit
-e
'dyn:value -s RPATH "$(GCC_LIBDIR):$(FIREFOX_LIBDIR)/librewolf:/usr/lib/mps/amd64"' $$file ; \
155 mkdir
$(PROTO_DIR
)$(FIREFOX_LIBDIR
)/librewolf
/distribution
; \
156 $(CP
) $(COMPONENT_DIR
)/files
/distribution.ini
$(PROTO_DIR
)$(FIREFOX_LIBDIR
)/librewolf
/distribution
/distribution.ini
; \
157 unzip
-c
$(PROTOUSRLIBDIR64
)/$(COMPONENT_NAME
)/omni.ja chrome
/toolkit
/content
/global
/license.html \
158 | LC_ALL
=en_US.UTF-8 lynx
--display_charset
=utf-8
-stdin
--dump
-nolist
> $(COMPONENT_NAME
).license
;
160 COMPONENT_TEST_MASTER
= $(COMPONENT_TEST_RESULTS_DIR
)/results-
$(MACH
).master
162 COMPONENT_TEST_DIR
= $(@D
)/js
/src
163 COMPONENT_TEST_TARGETS
=check-jit-test
164 COMPONENT_TEST_TRANSFORMS
= \
165 '-e "/^PASSED ALL/,/Failed:/p" ' \
166 '-e "/^FAILURES:/,/Failed:/p" ' \
169 # the license file is dynamically build, thus we need to remove it:
171 $(RM
) $(COMPONENT_LICENSE_FILE
)
174 PYTHON_REQUIRED_PACKAGES
+= runtime
/python
175 PYTHON_REQUIRED_PACKAGES
+= library
/python
/psutil
176 REQUIRED_PACKAGES
+= developer
/build
/autoconf-213
177 REQUIRED_PACKAGES
+= library
/audio
/pulseaudio
178 REQUIRED_PACKAGES
+= system
/header
/header-audio
179 REQUIRED_PACKAGES
+= developer
/lang
/rustc
180 REQUIRED_PACKAGES
+= gnome
/config
/gconf
181 REQUIRED_PACKAGES
+= database
/sqlite-3
182 REQUIRED_PACKAGES
+= library
/http-parser
183 REQUIRED_PACKAGES
+= web
/browser
/lynx
185 # Auto-generated dependencies
186 REQUIRED_PACKAGES
+= $(GCC_RUNTIME_PKG
)
187 REQUIRED_PACKAGES
+= $(GXX_RUNTIME_PKG
)
188 REQUIRED_PACKAGES
+= gnome
/accessibility
/at-spi2-core
189 REQUIRED_PACKAGES
+= library
/c
++/harfbuzz
190 REQUIRED_PACKAGES
+= library
/desktop
/cairo
191 REQUIRED_PACKAGES
+= library
/desktop
/gdk-pixbuf
192 REQUIRED_PACKAGES
+= library
/desktop
/gtk3
193 REQUIRED_PACKAGES
+= library
/desktop
/pango
194 REQUIRED_PACKAGES
+= library
/glib2
195 REQUIRED_PACKAGES
+= library
/graphics
/pixman
196 REQUIRED_PACKAGES
+= library
/zlib
197 REQUIRED_PACKAGES
+= system
/library
198 REQUIRED_PACKAGES
+= system
/library
/fontconfig
199 REQUIRED_PACKAGES
+= system
/library
/freetype-2
200 REQUIRED_PACKAGES
+= system
/library
/libdbus
201 REQUIRED_PACKAGES
+= system
/library
/math
202 REQUIRED_PACKAGES
+= x11
/library
/libx11
203 REQUIRED_PACKAGES
+= x11
/library
/libxcb
204 REQUIRED_PACKAGES
+= x11
/library
/libxext
205 REQUIRED_PACKAGES
+= x11
/library
/libxrandr