Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions app-web/zen-browser/autobuild/beyond
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
abinfo "Installing icons ..."
for i in 16 22 24 32 48 64 128 256 512 1024; do
install -Dvm644 "$SRCDIR"/configs/branding/release/logo$i.png \
"$PKGDIR"/usr/share/icons/hicolor/${i}x${i}/apps/zen.png
done

abinfo "Symlinking dictionaries for spellchecking ..."
rm -rfv "$PKGDIR"/usr/lib/zen/{dictionaries,hyphenation}
ln -sv /usr/share/hunspell \
"$PKGDIR"/usr/lib/zen/dictionaries
ln -sv /usr/share/hyphen \
"$PKGDIR"/usr/lib/zen/hyphenation
16 changes: 16 additions & 0 deletions app-web/zen-browser/autobuild/build
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
abinfo "Building language packs ..."
sh "${SRCDIR}/scripts/download-language-packs.sh"

abinfo "Copying language packs ..."
for lang in $(cat "${SRCDIR}/locales/supported-languages"); do
abinfo "Copying language pack for ${lang} ..."
python3 "${SRCDIR}/scripts/copy_language_pack.py" "${lang}"
done

abinfo "Building zen-browser ..."
export SURFER_PLATFORM="linux"
export ZEN_RELEASE=1
npm run build

abinfo "Installing zen-browser ..."
DESTDIR="${PKGDIR}" "${SRCDIR}/engine/mach" install
17 changes: 17 additions & 0 deletions app-web/zen-browser/autobuild/defines
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
PKGNAME=zen-browser
PKGSEC=web
PKGDES="A Firefox-based browser with the aim of improving your productivity"
PKGDEP="gtk-3 startup-notification dbus-glib alsa-lib \
desktop-file-utils hicolor-icon-theme libevent nss hunspell sqlite \
networkmanager mozilla-common ffmpeg icu openh264"
BUILDDEP="autoconf-2.13 rustc unzip llvm mercurial nodejs libnotify \
xorg-server nasm yasm cbindgen llvm-runtime+wasi libvips"

ABTYPE=self
USECLANG=1

# FIXME: STL code can only be used with -fno-exceptions
AB_FLAGS_EXC=0

# Too heavy for your average 512M-RAM 2K0300
FAIL_ARCH="(loongarch64_nosimd)"
1 change: 1 addition & 0 deletions app-web/zen-browser/autobuild/google-api-key
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
AIzaSyBGpe01okUSW2GQDIgLovY23Mj1RKzzOOY
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[Global]
about=Zen Browser for AOSC OS

[Preferences]
app.distributor=aosc
app.distributor.channel=aosc
app.partner.fedora=aosc
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
[Desktop Entry]
Name=Zen Browser
Exec=zen %u
Icon=zen
Type=Application
MimeType=text/html;text/xml;application/xhtml+xml;x-scheme-handler/http;x-scheme-handler/https;application/x-xpinstall;application/pdf;application/json;
StartupWMClass=zen
Categories=Network;WebBrowser;
StartupNotify=true
Terminal=false
X-MultipleArgs=false
Keywords=Internet;WWW;Browser;Web;Explorer;
Actions=new-window;new-private-window;profilemanager;

[Desktop Action new-window]
Name=Open a New Window
Name[zh_CN]=新建窗口
Name[zh_TW]=開新視窗
Exec=zen --new-window %u

[Desktop Action new-private-window]
Name=Open a New Private Window
Name[zh_CN]=新建隐私浏览窗口
Name[zh_TW]=新增隱私視窗
Exec=zen --private-window %u

[Desktop Action profilemanager]
Name=Open the Profile Manager
Name[zh_CN]=打开用户配置管理器
Exec=zen --ProfileManager
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
From dc41dc3ef26b1918981ec60be6bb0a1a88c9dd92 Mon Sep 17 00:00:00 2001
From: Jiangjin Wang <kaymw@aosc.io>
Date: Mon, 2 Feb 2026 22:14:20 -0800
Subject: [PATCH 1/7] AOSCOS: Disable LASX by default for libyuv

We are starting to have powerful mobile and embedded chips that
lack LASX capabilities, namely 3B6000M and 2K3000.

Co-Authored-By: Xuan Chen <henry.chen@oss.cipunited.com>
---
src/media/libyuv/libyuv/libyuv-gyp.patch | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
create mode 100644 src/media/libyuv/libyuv/libyuv-gyp.patch

diff --git a/src/media/libyuv/libyuv/libyuv-gyp.patch b/src/media/libyuv/libyuv/libyuv-gyp.patch
new file mode 100644
index 00000000..83d8e768
--- /dev/null
+++ b/src/media/libyuv/libyuv/libyuv-gyp.patch
@@ -0,0 +1,16 @@
+diff --git a/media/libyuv/libyuv/libyuv.gyp b/media/libyuv/libyuv/libyuv.gyp
+index 57c9880f9b89c686b45f5f54ac2342926b9e18c1..09a5978c1b365e776840ccc2bb435b169101bb22 100644
+--- a/media/libyuv/libyuv/libyuv.gyp
++++ b/media/libyuv/libyuv/libyuv.gyp
+@@ -26,6 +26,11 @@
+ 'clang%': 0,
+ # Link-Time Optimizations.
+ 'use_lto%': 0,
++ # Disable LASX on LoongArch by default (for 2K3000/3B6000M).
++ "loong_lasx%": 0,
++ # Enable LSX on LoongArch by default. Has no effect if loong_lasx is
++ # enabled because LASX implies LSX according to the architecture specs.
++ "loong_lsx%": 1,
+ 'mips_msa%': 0, # Default to msa off.
+ 'build_neon': 0,
+ 'build_msa': 0,
--
2.52.0

Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
From 222892f3c9e5b07602436bf73442ff7b8516a78c Mon Sep 17 00:00:00 2001
From: Jiangjin Wang <kaymw@aosc.io>
Date: Mon, 2 Feb 2026 22:17:48 -0800
Subject: [PATCH 2/7] Enable GLES on riscv64

Co-Authored-By: Han Gao <rabenda.cn@gmail.com>
---
src/toolkit/xre/glxtest/glxtest-cpp.patch | 13 +++++++++++++
1 file changed, 13 insertions(+)
create mode 100644 src/toolkit/xre/glxtest/glxtest-cpp.patch

diff --git a/src/toolkit/xre/glxtest/glxtest-cpp.patch b/src/toolkit/xre/glxtest/glxtest-cpp.patch
new file mode 100644
index 00000000..8c807d7c
--- /dev/null
+++ b/src/toolkit/xre/glxtest/glxtest-cpp.patch
@@ -0,0 +1,13 @@
+diff --git a/toolkit/xre/glxtest/glxtest.cpp b/toolkit/xre/glxtest/glxtest.cpp
+index 58f5c7e4726ddfecc3036990178e897bd627b215..4bb3c777a76d857a6b73baf93ce0f5ce05b8340a 100644
+--- a/toolkit/xre/glxtest/glxtest.cpp
++++ b/toolkit/xre/glxtest/glxtest.cpp
+@@ -437,7 +437,7 @@ static bool get_egl_gl_status(EGLDisplay dpy,
+ PFNGLGETSTRING glGetString =
+ cast<PFNGLGETSTRING>(eglGetProcAddress("glGetString"));
+
+-#if defined(__arm__) || defined(__aarch64__)
++#if defined(__arm__) || defined(__aarch64__) || (defined(__riscv) && __riscv_xlen == 64)
+ bool useGles = true;
+ #else
+ bool useGles = false;
--
2.52.0

Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
From d2169a84085c23bae1b55f571f4f4bca6853f028 Mon Sep 17 00:00:00 2001
From: Jiangjin Wang <kaymw@aosc.io>
Date: Mon, 2 Feb 2026 22:20:35 -0800
Subject: [PATCH 3/7] Disable BROTLI_MODEL macro for some targets

PiperOrigin-RevId: 827486322
Link: https://github.com/google/brotli/commit/e230f474b87134e8c6c85b630084c612057f253e
Co-Authored-By: Evgenii Kliuchnikov <eustas@google.com>
Signed-off-by: Rong "Mantle" Bao <webmaster@csmantle.top>
---
src/modules/brotli/common/platform-h.patch | 32 ++++++++++++++++++++++
1 file changed, 32 insertions(+)
create mode 100644 src/modules/brotli/common/platform-h.patch

diff --git a/src/modules/brotli/common/platform-h.patch b/src/modules/brotli/common/platform-h.patch
new file mode 100644
index 00000000..c4b09205
--- /dev/null
+++ b/src/modules/brotli/common/platform-h.patch
@@ -0,0 +1,32 @@
+diff --git a/modules/brotli/common/platform.h b/modules/brotli/common/platform.h
+index b59f9b8091c29138def44fc455c5561ed84cecd6..e1254d5ca2d5a343bc4f0b8cdd2bb3337467da1f 100644
+--- a/modules/brotli/common/platform.h
++++ b/modules/brotli/common/platform.h
+@@ -213,6 +213,10 @@ OR:
+ #define BROTLI_TARGET_MIPS64
+ #endif
+
++#if defined(__ia64__) || defined(_M_IA64)
++#define BROTLI_TARGET_IA64
++#endif
++
+ #if defined(BROTLI_TARGET_X64) || defined(BROTLI_TARGET_ARMV8_64) || \
+ defined(BROTLI_TARGET_POWERPC64) || defined(BROTLI_TARGET_RISCV64) || \
+ defined(BROTLI_TARGET_LOONGARCH64) || defined(BROTLI_TARGET_MIPS64)
+@@ -665,13 +669,14 @@ BROTLI_UNUSED_FUNCTION void BrotliSuppressUnusedFunctions(void) {
+ #undef BROTLI_TEST
+ #endif
+
+-#if BROTLI_GNUC_HAS_ATTRIBUTE(model, 3, 0, 3)
++#if !defined(BROTLI_MODEL) && BROTLI_GNUC_HAS_ATTRIBUTE(model, 3, 0, 3) && \
++ !defined(BROTLI_TARGET_IA64) && !defined(BROTLI_TARGET_LOONGARCH64)
+ #define BROTLI_MODEL(M) __attribute__((model(M)))
+ #else
+ #define BROTLI_MODEL(M) /* M */
+ #endif
+
+-#if BROTLI_GNUC_HAS_ATTRIBUTE(cold, 4, 3, 0)
++#if !defined(BROTLI_COLD) && BROTLI_GNUC_HAS_ATTRIBUTE(cold, 4, 3, 0)
+ #define BROTLI_COLD __attribute__((cold))
+ #else
+ #define BROTLI_COLD /* cold */
--
2.52.0

Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
From a06294572e046097701c5425e4eb912a565ed656 Mon Sep 17 00:00:00 2001
From: Jiangjin Wang <kaymw@aosc.io>
Date: Mon, 2 Feb 2026 22:23:13 -0800
Subject: [PATCH 4/7] AOSCOS: Fix unistd.h header inclusion in libwebrtc

The correct header name should be automatically-selected by asm/unistd.h
instead of hard-coded.

Co-Authored-By: Henry Chen <chenx97@aosc.io>
Co-Authored-By: Rong "Mantle" Bao <webmaster@csmantle.top>
---
.../rtc_base/platform_thread_types-cc.patch | 13 +++++++++++++
1 file changed, 13 insertions(+)
create mode 100644 src/third_party/libwebrtc/rtc_base/platform_thread_types-cc.patch

diff --git a/src/third_party/libwebrtc/rtc_base/platform_thread_types-cc.patch b/src/third_party/libwebrtc/rtc_base/platform_thread_types-cc.patch
new file mode 100644
index 00000000..a0385692
--- /dev/null
+++ b/src/third_party/libwebrtc/rtc_base/platform_thread_types-cc.patch
@@ -0,0 +1,13 @@
+diff --git a/third_party/libwebrtc/rtc_base/platform_thread_types.cc b/third_party/libwebrtc/rtc_base/platform_thread_types.cc
+index 697bedadb944fda76c5cc3b666e2b6a5516b706e..2bd53cbb23405cd2ac92d0ab1fba458ba69df889 100644
+--- a/third_party/libwebrtc/rtc_base/platform_thread_types.cc
++++ b/third_party/libwebrtc/rtc_base/platform_thread_types.cc
+@@ -17,7 +17,7 @@
+ #include <sys/syscall.h>
+
+ #if !defined(WEBRTC_ARCH_ARM) && !defined(WEBRTC_ARCH_ARM64)
+-#include <asm/unistd_64.h>
++#include <asm/unistd.h>
+ #endif
+ #endif
+
--
2.52.0

Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
From 4d23f68a5b5cb71f92f2bcd52f4cb8e280ff3755 Mon Sep 17 00:00:00 2001
From: Jiangjin Wang <kaymw@aosc.io>
Date: Mon, 2 Feb 2026 22:35:17 -0800
Subject: [PATCH 5/7] AOSCOS: Disable JSPI on MIPS64 to work around Bug 2010439

This bug is fixed in >= 148.0, so this patch is expected to be dropped
in the next major release.

Link: https://bugzilla.mozilla.org/show_bug.cgi?id=2010439

Co-Authored-By: Rong "Mantle" Bao <webmaster@csmantle.top>
---
src/js/moz-configure.patch | 14 ++++++++++++++
1 file changed, 14 insertions(+)
create mode 100644 src/js/moz-configure.patch

diff --git a/src/js/moz-configure.patch b/src/js/moz-configure.patch
new file mode 100644
index 00000000..69dcf287
--- /dev/null
+++ b/src/js/moz-configure.patch
@@ -0,0 +1,14 @@
+diff --git a/js/moz.configure b/js/moz.configure
+index 765c1de95f38295b4079a3f8b9f85564b16d07e7..d318bd439e2d12daefb62c7f0e452fb14f9a4cc2 100644
+--- a/js/moz.configure
++++ b/js/moz.configure
+@@ -718,7 +718,8 @@ def default_wasm_jspi(
+ "aarch64",
+ "arm",
+ "loongarch64",
+- "mips64",
++# AOSCOS: Disable JSPI for Fx147 to work around Bug 2010439.
++# "mips64",
+ "riscv64",
+ ):
+ return True
--
2.52.0

Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
From 1d6cd367c076debf6254f7d02b2d36f1b9fbd201 Mon Sep 17 00:00:00 2001
From: Jiangjin Wang <kaymw@aosc.io>
Date: Mon, 2 Feb 2026 23:32:26 -0800
Subject: [PATCH 6/7] AOSCOS: Update Google API keyfile path

---
configs/common/mozconfig | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/configs/common/mozconfig b/configs/common/mozconfig
index 3a4f2f60..4ddc1f28 100644
--- a/configs/common/mozconfig
+++ b/configs/common/mozconfig
@@ -39,8 +39,9 @@ if ! test "$SCCACHE_GHA_ENABLED" = "false"; then
fi

# add safe browsing key if it exists on a file
-if test -f "$HOME/.zen-keys/safebrowsing.dat"; then
- ac_add_options --with-google-safebrowsing-api-keyfile="$HOME/.zen-keys/safebrowsing.dat"
+if test -f "$SRCDIR/autobuild/google-api-key"; then
+ ac_add_options --with-google-location-service-api-keyfile="$SRCDIR/autobuild/google-api-key"
+ ac_add_options --with-google-safebrowsing-api-keyfile="$SRCDIR/autobuild/google-api-key"
fi

if test "$ZEN_RELEASE"; then
--
2.52.0

Loading