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
= 130.0
27 COMPONENT_MINOR_VERSION
= 2
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
:2e16b68abeee2df03035d5805b5efe2b3cbf31bd0f11854aecb6d9d82341ff13
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-system-zlib" >> $(MOZCONFIG
) ; \
99 echo
"ac_add_options --host=$(GNU_ARCH)" >> $(MOZCONFIG
) ; \
100 echo
"ac_add_options --target=$(GNU_ARCH)" >> $(MOZCONFIG
) ; \
101 echo
"ac_add_options --without-wasm-sandboxed-libraries" >> $(MOZCONFIG
) ; \
102 echo
"ac_add_options --disable-alsa" >> $(MOZCONFIG
) ; \
103 # echo "ac_add_options --enable-bootstrap" >> $(MOZCONFIG) ; \
104 # echo "ac_add_options --with-wasi-sysroot=" >> $(MOZCONFIG) ; \
106 LD_SECEXT_OPTIONS
+= $(SSBD_ENABLE
)
109 LD_MAP_NOEXBSS.sparc
=
111 # libmozgtk needs to link to gtk3 and others
114 # missing symbols from gtk3 during Firefox start
117 # hope to get args data in stacks of core dumps
118 LD_OPTIONS
+= -msave-args
120 # use a local installed rust since the system version may not be compatible
121 COMPONENT_PRE_CONFIGURE_ACTION
+= ( \
122 export RUSTUP_HOME
=$(RUSTUP_HOME
); \
123 export CARGO_HOME
=$(CARGO_HOME
); \
124 export RUSTUP_INIT_SKIP_PATH_CHECK
=yes
; \
125 curl https
://sh.rustup.rs
-sSf | bash
-s
-- -y
--no-modify-path
; \
126 source
$(CARGO_HOME
)/env
; \
127 rustup
install $(RUST_VERSION
); \
128 rustup default
$(RUST_VERSION
)-x86_64-unknown-illumos
; \
130 cargo
install --root
=$(CARGO_HOME
) --vers
0.26.0 cbindgen
; \
133 ENV
+= CFLAGS
="$(CFLAGS)"
134 ENV
+= CXXFLAGS
="$(CXXFLAGS)"
135 ENV
+= PKG_CONFIG
=/usr
/bin
/amd64
/pkg-config
136 ENV
+= RUSTUP_HOME
=$(RUSTUP_HOME
)
137 ENV
+= CARGO_HOME
=$(CARGO_HOME
)
139 COMPONENT_BUILD_ARGS
+= $(JOBS
:%=-j
%)
141 CONFIGURE_ENV
= $(ENV
)
142 COMPONENT_BUILD_ENV
= $(ENV
)
143 COMPONENT_INSTALL_ENV
+= HOME
=/tmp
145 COMPONENT_POST_BUILD_ACTION
= \
146 (cd
$(@D
)/browser
/installer
; $(ENV
) $(COMPONENT_BUILD_ENV
) \
147 $(GMAKE
) $(COMPONENT_BUILD_ARGS
) $(COMPONENT_BUILD_TARGETS
))
149 COMPONENT_POST_INSTALL_ACTION
= \
150 for file in
`find $(PROTO_DIR)$(FIREFOX_LIBDIR)/firefox/ -name "*.so"`; do \
151 /usr
/bin
/elfedit
-e
'dyn:value -s RUNPATH "$(GCC_LIBDIR):$(FIREFOX_LIBDIR)/firefox:/usr/lib/mps/amd64"' $$file ; \
152 /usr
/bin
/elfedit
-e
'dyn:value -s RPATH "$(GCC_LIBDIR):$(FIREFOX_LIBDIR)/firefox:/usr/lib/mps/amd64"' $$file ; \
154 unzip
-c
$(PROTOUSRLIBDIR64
)/$(COMPONENT_NAME
)/omni.ja chrome
/toolkit
/content
/global
/license.html \
155 | LC_ALL
=en_US.UTF-8 lynx
--display_charset
=utf-8
-stdin
--dump
-nolist
> $(COMPONENT_NAME
).license
;
157 COMPONENT_TEST_MASTER
= $(COMPONENT_TEST_RESULTS_DIR
)/results-
$(MACH
).master
159 COMPONENT_TEST_DIR
= $(@D
)/js
/src
160 COMPONENT_TEST_TARGETS
=check-jit-test
161 COMPONENT_TEST_TRANSFORMS
= \
162 '-e "/^PASSED ALL/,/Failed:/p" ' \
163 '-e "/^FAILURES:/,/Failed:/p" ' \
166 # the license file is dynamically build, thus we need to remove it:
168 $(RM
) $(COMPONENT_LICENSE_FILE
)
171 PYTHON_REQUIRED_PACKAGES
+= runtime
/python
172 PYTHON_REQUIRED_PACKAGES
+= library
/python
/psutil
173 REQUIRED_PACKAGES
+= developer
/build
/autoconf-213
174 REQUIRED_PACKAGES
+= library
/audio
/pulseaudio
175 REQUIRED_PACKAGES
+= system
/header
/header-audio
176 REQUIRED_PACKAGES
+= developer
/lang
/rustc
177 REQUIRED_PACKAGES
+= gnome
/config
/gconf
178 REQUIRED_PACKAGES
+= database
/sqlite-3
179 REQUIRED_PACKAGES
+= library
/http-parser
180 REQUIRED_PACKAGES
+= web
/browser
/lynx
182 # Auto-generated dependencies
183 REQUIRED_PACKAGES
+= $(GCC_RUNTIME_PKG
)
184 REQUIRED_PACKAGES
+= $(GXX_RUNTIME_PKG
)
185 REQUIRED_PACKAGES
+= library
/c
++/harfbuzz
186 REQUIRED_PACKAGES
+= library
/desktop
/atk
187 REQUIRED_PACKAGES
+= library
/desktop
/cairo
188 REQUIRED_PACKAGES
+= library
/desktop
/gdk-pixbuf
189 REQUIRED_PACKAGES
+= library
/desktop
/gtk3
190 REQUIRED_PACKAGES
+= library
/desktop
/pango
191 REQUIRED_PACKAGES
+= library
/glib2
192 REQUIRED_PACKAGES
+= library
/graphics
/pixman
193 REQUIRED_PACKAGES
+= library
/zlib
194 REQUIRED_PACKAGES
+= system
/library
195 REQUIRED_PACKAGES
+= system
/library
/fontconfig
196 REQUIRED_PACKAGES
+= system
/library
/freetype-2
197 REQUIRED_PACKAGES
+= system
/library
/libdbus
198 REQUIRED_PACKAGES
+= system
/library
/math
199 REQUIRED_PACKAGES
+= x11
/library
/libx11
200 REQUIRED_PACKAGES
+= x11
/library
/libxcb
201 REQUIRED_PACKAGES
+= x11
/library
/libxext
202 REQUIRED_PACKAGES
+= x11
/library
/libxrandr