# --- T2-COPYRIGHT-NOTE-BEGIN --- # T2 SDE: package/*/firefox/firefox.conf # Copyright (C) 2004 - 2023 The T2 SDE Project # Copyright (C) 1998 - 2004 ROCK Linux Project # # This Copyright note is generated by scripts/Create-CopyPatch, # more information can be found in the files COPYING and README. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2. # --- T2-COPYRIGHT-NOTE-END --- export MACH_USE_SYSTEM_PYTHON=1 export HOME=$sysroot/root if [ $prefix_auto = 1 ]; then prefix=$mozilla_prefix set_confopt fi runconf=0 autogen=0 runpipinstall=0 makeopt= makeinstopt= hook_add inmake 5 "./mach build" hook_add postmake 5 "./mach install" firefox_config() { cat <<-EOT >> .mozconfig . \$topsrcdir/browser/config/mozconfig export MOZ_PHOENIX=1 mk_add_options MOZ_PHOENIX=1 mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/objdir #ac_add_options --enable-mathml #ac_add_options --enable-crypto #ac_add_options --enable-module=psm ac_add_options --enable-default-toolkit=cairo-gtk3 ac_add_options --without-system-png #ac_add_options --disable-profilesharing ac_add_options --enable-official-branding ac_add_options --with-system-zlib #ac_add_options --with-system-bz2 #ac_add_options --enable-system-sqlite ac_add_options --enable-system-ffi ac_add_options --enable-system-pixman #ac_add_options --with-pthreads #ac_add_options --enable-gio #ac_add_options --disable-gnomevfs ac_add_options --disable-crashreporter ac_add_options --disable-updater ac_add_options --disable-tests #ac_add_options --disable-installer #ac_add_options --disable-cargo-incremental ac_add_options --disable-jemalloc EOT [ "$SDECFG_DEBUG" != 1 ] && echo "ac_add_options --enable-strip" >> .mozconfig pkginstalled libjpeg-turbo && echo "ac_add_options --with-system-jpeg" >> .mozconfig pkginstalled icu4c && echo "ac_add_options --with-system-icu" >> .mozconfig pkginstalled pulseaudio || echo "ac_add_options --disable-pulseaudio" >> .mozconfig pkginstalled alsa-lib && echo "ac_add_options --enable-alsa" >> .mozconfig pkginstalled libevent && echo "ac_add_options --with-system-libevent" >> .mozconfig pkginstalled wasi-libc && echo "ac_add_options --with-wasi-sysroot=$root/$(pkgprefix wasi-libc)" >> .mozconfig || echo "ac_add_options --without-wasm-sandboxed-libraries" >> .mozconfig var_append GCC_WRAPPER_APPEND " " "`pkg-config glib-2.0 --cflags`" # FF 84.0, TODO: remove again! var_append GCC_WRAPPER_APPEND ' ' "`pkg-config x11 --cflags --libs-only-L`" [ "$SDECFG_LTO" = 1 ] && case "$arch" in arm64|x86-64) echo "ac_add_options --enable-lto" >> .mozconfig ;; esac [ "$SDECFG_DEFAULT_CC" = clang ] && var_append GCC_WRAPPER_APPEND " " "-c?:-fuse-ld=lld" && echo "ac_add_options --disable-elf-hack" >> .mozconfig #echo "ac_add_options --disable-sandbox" >> .mozconfig # jit and sandbox? case "$arch" in x86) # FF needs sse for jit on x86 if ! $CC -E -dM -x c /dev/null | grep -iq _sse; then var_append patchfiles ' ' "$confdir/no-jit.diff" echo "ac_add_options --disable-jit" >> .mozconfig fi ;; arm) [[ $arch_machine = armv[678]* ]] || echo "ac_add_options --disable-jit" >> .mozconfig ;; arm64|riscv64|x86-64) : ;; *) echo "ac_add_options --disable-jit --disable-webrtc" >> .mozconfig ;; esac } # compiler quirks case $arch in x86) # atomics crash on i486 GCC_WRAPPER_INSERT="${GCC_WRAPPER_INSERT/i486/i586}" # float_t should be 32-bit, ..!? :-/ var_append GCC_WRAPPER_INSERT ' ' '-D__FLT_EVAL_METHOD__=0' ;; arm) var_append GCC_WRAPPER_APPEND ' ' '-DLIBYUV_DISABLE_NEON=1' ;; arm64) var_remove GCC_WRAPPER_REMOVE " " "-march*" ;; esac # don't pass CPU optimizations to clang w/ wasi GCC_WRAPPER_INSERT="${GCC_WRAPPER_INSERT/-march=/--target=wasm32-wasi?:-march=}" GCC_WRAPPER_INSERT="${GCC_WRAPPER_INSERT/-mcpu=/--target=wasm32-wasi?:-mcpu=}" GCC_WRAPPER_INSERT="${GCC_WRAPPER_INSERT/-mtune=/--target=wasm32-wasi?:-mtune=}" hook_add prepatch 5 "cargo_clear_cksum third_party/rust/*/.cargo-checksum.json" hook_add postpatch 5 "rust_update_arch_target third_party/rust/*/no_atomic*.rs" hook_add prepatch 4 "firefox_config" hook_add preconf 2 "mozilla_branding" # disable legacy component registration mozilla_register() { : }