summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroot <root@alpha.trunkmasters.com>2026-09-18 15:41:29 -0500
committerroot <root@alpha.trunkmasters.com>2026-09-18 15:41:29 -0500
commit201b1a5f202628742bb2b602acc1147303f503ab (patch)
tree48d6c9d5754ae1d1a7078e37bc40e108cecf4fbf
parent4f24a5a81ceb5b88ec46c27b34f371d5a8e30152 (diff)
downloadsrcux-201b1a5f202628742bb2b602acc1147303f503ab.tar.gz
srcux-201b1a5f202628742bb2b602acc1147303f503ab.tar.xz
srcux-201b1a5f202628742bb2b602acc1147303f503ab.zip
Adding metadata
-rw-r--r--app-editors/emacs/emacs-27.2-r25.ebuild2
-rw-r--r--app-editors/emacs/emacs-28.2-r23.ebuild2
-rw-r--r--app-editors/emacs/emacs-29.4-r11.ebuild2
-rw-r--r--app-editors/emacs/emacs-30.2-r7.ebuild2
-rw-r--r--app-i18n/man-pages-l10n/man-pages-l10n-4.31.0.ebuild2
-rw-r--r--app-office/lyx/Manifest8
-rw-r--r--app-office/lyx/lyx-2.4.4.ebuild188
-rw-r--r--app-office/lyx/lyx-2.5.0.ebuild186
-rw-r--r--app-office/lyx/lyx-2.5.3.ebuild (renamed from app-office/lyx/lyx-2.5.1.ebuild)2
-rw-r--r--dev-db/barman/Manifest1
-rw-r--r--dev-db/barman/barman-3.20.0.ebuild48
-rw-r--r--dev-embedded/fwup/fwup-1.17.1.ebuild18
-rw-r--r--dev-lang/elixir/elixir-1.16.3-r2.ebuild2
-rw-r--r--dev-lang/elixir/elixir-1.17.3-r2.ebuild2
-rw-r--r--dev-lang/elixir/elixir-1.18.5.ebuild2
-rw-r--r--dev-lang/elixir/elixir-1.19.6.ebuild2
-rw-r--r--dev-lang/go/go-1.25.13.ebuild2
-rw-r--r--dev-lang/ispc/Manifest1
-rw-r--r--dev-lang/ispc/ispc-1.30.0.ebuild97
-rw-r--r--dev-lang/ispc/ispc-1.31.0.ebuild2
-rw-r--r--dev-lang/moarvm/Manifest1
-rw-r--r--dev-lang/moarvm/moarvm-2026.08.ebuild60
-rw-r--r--dev-lang/nqp/Manifest1
-rw-r--r--dev-lang/nqp/nqp-2026.08.ebuild147
-rw-r--r--dev-lang/rakudo/Manifest1
-rw-r--r--dev-lang/rakudo/rakudo-2026.08.ebuild72
-rw-r--r--dev-libs/elfutils/elfutils-0.196.ebuild2
-rw-r--r--dev-libs/elfutils/elfutils-9999.ebuild2
-rw-r--r--dev-libs/expat/Manifest1
-rw-r--r--dev-libs/expat/expat-2.8.3.ebuild101
-rw-r--r--dev-libs/s2n-tls/s2n-tls-1.7.10.ebuild2
-rw-r--r--dev-libs/tree-sitter-cmake/tree-sitter-cmake-0.7.4.ebuild2
-rw-r--r--dev-libs/tree-sitter-markdown-inline/tree-sitter-markdown-inline-0.5.3.ebuild2
-rw-r--r--dev-libs/tree-sitter-ocaml/tree-sitter-ocaml-0.25.0.ebuild2
-rw-r--r--dev-libs/tree-sitter-scala/tree-sitter-scala-0.26.2.ebuild2
-rw-r--r--dev-libs/tree-sitter/Manifest8
-rw-r--r--dev-libs/tree-sitter/tree-sitter-0.25.6.ebuild50
-rw-r--r--dev-libs/tree-sitter/tree-sitter-0.25.8.ebuild50
-rw-r--r--dev-libs/tree-sitter/tree-sitter-0.26.11.ebuild28
-rw-r--r--dev-libs/tree-sitter/tree-sitter-0.26.3.ebuild50
-rw-r--r--dev-libs/tree-sitter/tree-sitter-0.26.5.ebuild50
-rw-r--r--dev-libs/tree-sitter/tree-sitter-0.26.6.ebuild28
-rw-r--r--dev-libs/tree-sitter/tree-sitter-0.26.7.ebuild28
-rw-r--r--dev-libs/tree-sitter/tree-sitter-0.26.8.ebuild28
-rw-r--r--dev-lisp/sbcl/sbcl-2.6.7.ebuild2
-rw-r--r--dev-python/blockbuster/Manifest1
-rw-r--r--dev-python/blockbuster/blockbuster-1.5.28.ebuild40
-rw-r--r--dev-python/forbiddenfruit/forbiddenfruit-0.1.4.ebuild52
-rw-r--r--dev-python/hatch-jupyter-builder/Manifest1
-rw-r--r--dev-python/hatch-jupyter-builder/hatch-jupyter-builder-0.10.0.ebuild37
-rw-r--r--dev-python/imapclient/Manifest1
-rw-r--r--dev-python/imapclient/imapclient-4.1.0.ebuild32
-rw-r--r--dev-python/multidict/Manifest1
-rw-r--r--dev-python/multidict/multidict-6.9.0.ebuild67
-rw-r--r--dev-python/pandas/Manifest2
-rw-r--r--dev-python/pandas/pandas-3.0.6.ebuild191
-rw-r--r--dev-python/parse/Manifest2
-rw-r--r--dev-python/parse/parse-1.22.2.ebuild (renamed from dev-python/parse/parse-1.22.0.ebuild)4
-rw-r--r--dev-python/platformdirs/Manifest2
-rw-r--r--dev-python/platformdirs/platformdirs-4.11.10.ebuild50
-rw-r--r--dev-python/python-discovery/Manifest2
-rw-r--r--dev-python/python-discovery/python-discovery-1.6.1.ebuild55
-rw-r--r--dev-python/sphinx-autodoc-typehints/Manifest2
-rw-r--r--dev-python/sphinx-autodoc-typehints/sphinx-autodoc-typehints-3.13.7.ebuild44
-rw-r--r--dev-python/tree-sitter/tree-sitter-0.26.0_p20260816-r1.ebuild (renamed from dev-python/tree-sitter/tree-sitter-0.26.0_p20260816.ebuild)10
-rw-r--r--dev-python/urwid/Manifest2
-rw-r--r--dev-python/urwid/urwid-4.1.5.ebuild49
-rw-r--r--dev-python/virtualenv/Manifest2
-rw-r--r--dev-python/virtualenv/virtualenv-21.7.14.ebuild117
-rw-r--r--dev-scheme/guile/guile-3.0.11-r1.ebuild2
-rw-r--r--dev-util/codex/codex-0.153.4-r1.ebuild164
-rw-r--r--dev-util/codex/codex-0.153.4.ebuild162
-rw-r--r--dev-util/gemini-cli/Manifest2
-rw-r--r--dev-util/gemini-cli/gemini-cli-0.60.0.ebuild (renamed from dev-util/gemini-cli/gemini-cli-0.58.0.ebuild)0
-rw-r--r--dev-util/google-antigravity-cli/Manifest4
-rw-r--r--dev-util/google-antigravity-cli/google-antigravity-cli-1.2.6.ebuild (renamed from dev-util/google-antigravity-cli/google-antigravity-cli-1.2.4.ebuild)2
-rw-r--r--dev-util/kimi-code-bin/Manifest4
-rw-r--r--dev-util/kimi-code-bin/kimi-code-bin-2.0.0.ebuild (renamed from dev-util/kimi-code-bin/kimi-code-bin-0.41.0.ebuild)0
-rw-r--r--dev-util/payload-dumper-go/Manifest2
-rw-r--r--dev-util/payload-dumper-go/files/gozstd-cgo-flags.patch16
-rw-r--r--dev-util/payload-dumper-go/payload-dumper-go-2.0.1.ebuild32
-rw-r--r--dev-util/payload-dumper-go/payload-dumper-go-2.0.2.ebuild8
-rw-r--r--dev-util/tree-sitter-cli/Manifest10
-rw-r--r--dev-util/tree-sitter-cli/metadata.xml4
-rw-r--r--dev-util/tree-sitter-cli/tree-sitter-cli-0.25.6.ebuild34
-rw-r--r--dev-util/tree-sitter-cli/tree-sitter-cli-0.25.8.ebuild36
-rw-r--r--dev-util/tree-sitter-cli/tree-sitter-cli-0.26.11.ebuild38
-rw-r--r--dev-util/tree-sitter-cli/tree-sitter-cli-0.26.6.ebuild43
-rw-r--r--dev-util/tree-sitter-cli/tree-sitter-cli-0.26.8.ebuild38
-rw-r--r--dev-vcs/gitcomet/Manifest32
-rw-r--r--dev-vcs/gitcomet/gitcomet-0.2.5.ebuild957
-rw-r--r--gnome-extra/resources/resources-51.0-r1.ebuild (renamed from gnome-extra/resources/resources-51.0.ebuild)4
-rw-r--r--gui-wm/mangowm/Manifest3
-rw-r--r--gui-wm/mangowm/mangowm-0.16.2.ebuild78
-rw-r--r--gui-wm/mangowm/mangowm-0.17.2.ebuild (renamed from gui-wm/mangowm/mangowm-0.15.6.ebuild)8
-rw-r--r--llvm-runtimes/clang-runtime/clang-runtime-19.1.7-r2.ebuild (renamed from llvm-runtimes/clang-runtime/clang-runtime-19.1.7-r1.ebuild)11
-rw-r--r--llvm-runtimes/clang-runtime/clang-runtime-20.1.8-r2.ebuild (renamed from llvm-runtimes/clang-runtime/clang-runtime-20.1.8-r1.ebuild)11
-rw-r--r--llvm-runtimes/clang-runtime/clang-runtime-21.1.8-r1.ebuild (renamed from llvm-runtimes/clang-runtime/clang-runtime-21.1.8.ebuild)16
-rw-r--r--llvm-runtimes/clang-runtime/clang-runtime-22-r1.ebuild (renamed from llvm-runtimes/clang-runtime/clang-runtime-22.ebuild)16
-rw-r--r--llvm-runtimes/clang-runtime/clang-runtime-23-r2.ebuild (renamed from llvm-runtimes/clang-runtime/clang-runtime-23-r1.ebuild)18
-rw-r--r--llvm-runtimes/clang-runtime/clang-runtime-24.ebuild18
-rw-r--r--llvm-runtimes/clang-runtime/metadata.xml1
-rw-r--r--mail-client/thunderbird/thunderbird-140.16.0.ebuild2
-rw-r--r--media-libs/libde265/Manifest2
-rw-r--r--media-libs/libde265/libde265-1.0.15.ebuild95
-rw-r--r--media-libs/libde265/libde265-1.1.3.ebuild57
-rw-r--r--media-libs/libde265/libde265-9999.ebuild92
-rw-r--r--media-libs/libde265/metadata.xml4
-rw-r--r--media-sound/Tauon/Tauon-12.0.0-r1.ebuild121
-rw-r--r--mpv-plugin/mpv-mpris/Manifest2
-rw-r--r--mpv-plugin/mpv-mpris/mpv-mpris-1.3.ebuild (renamed from mpv-plugin/mpv-mpris/mpv-mpris-1.1.ebuild)0
-rw-r--r--net-dns/unbound/unbound-1.26.1.ebuild2
-rw-r--r--net-proxy/MTProxy/MTProxy-3.0.4-r1.ebuild28
-rw-r--r--net-proxy/MTProxy/Manifest1
-rw-r--r--net-proxy/MTProxy/files/MTProxy-3.0.4-adjust_flags.patch158
-rw-r--r--net-proxy/MTProxy/files/MTProxy-3.0.4-no_implicit_func.patch13
-rw-r--r--net-proxy/MTProxy/metadata.xml9
-rw-r--r--sci-ml/pytorch/files/pytorch-2.14.0-cpp-httplib.patch21
-rw-r--r--sci-ml/pytorch/pytorch-2.14.0-r3.ebuild1
-rw-r--r--sci-visualization/gnuplot/gnuplot-6.0.5.ebuild2
-rw-r--r--sys-kernel/gentoo-sources/Manifest34
-rw-r--r--sys-kernel/gentoo-sources/gentoo-sources-6.1.186.ebuild27
-rw-r--r--sys-kernel/gentoo-sources/gentoo-sources-6.1.187.ebuild27
-rw-r--r--sys-kernel/gentoo-sources/gentoo-sources-6.1.188.ebuild2
-rw-r--r--sys-kernel/gentoo-sources/gentoo-sources-6.12.107.ebuild37
-rw-r--r--sys-kernel/gentoo-sources/gentoo-sources-6.12.108.ebuild37
-rw-r--r--sys-kernel/gentoo-sources/gentoo-sources-6.12.110.ebuild2
-rw-r--r--sys-kernel/gentoo-sources/gentoo-sources-6.18.48.ebuild27
-rw-r--r--sys-kernel/gentoo-sources/gentoo-sources-6.18.49.ebuild27
-rw-r--r--sys-kernel/gentoo-sources/gentoo-sources-6.18.52.ebuild2
-rw-r--r--sys-kernel/gentoo-sources/gentoo-sources-6.6.155.ebuild27
-rw-r--r--sys-kernel/gentoo-sources/gentoo-sources-6.6.156.ebuild27
-rw-r--r--sys-kernel/gentoo-sources/gentoo-sources-6.6.157.ebuild2
-rw-r--r--sys-kernel/gentoo-sources/gentoo-sources-7.1.12.ebuild27
-rw-r--r--sys-kernel/gentoo-sources/gentoo-sources-7.1.13.ebuild27
-rw-r--r--sys-kernel/gentoo-sources/gentoo-sources-7.2.2.ebuild28
-rw-r--r--sys-kernel/gentoo-sources/gentoo-sources-7.2.3.ebuild28
-rw-r--r--virtual/secret-service/secret-service-0-r2.ebuild (renamed from virtual/secret-service/secret-service-0-r1.ebuild)15
-rw-r--r--virtual/secret-service/secret-service-0.ebuild15
-rw-r--r--www-apps/wordpress/Manifest2
-rw-r--r--www-apps/wordpress/wordpress-7.1.1.ebuild (renamed from www-apps/wordpress/wordpress-7.1.ebuild)0
-rw-r--r--www-client/firefox/firefox-140.16.0.ebuild2
-rw-r--r--www-client/ungoogled-chromium-bin/Manifest1
-rw-r--r--www-client/ungoogled-chromium-bin/ungoogled-chromium-bin-153.0.8010.36.ebuild218
-rw-r--r--www-client/ungoogled-chromium/Manifest68
-rw-r--r--www-client/ungoogled-chromium/files/chromium-142-work-with-old-fontconfig.patch57
-rw-r--r--www-client/ungoogled-chromium/files/chromium-151-cbor-fix.patch29
-rw-r--r--www-client/ungoogled-chromium/files/restore-x86-r3.patch20
-rw-r--r--www-client/ungoogled-chromium/metadata.xml1
-rw-r--r--www-client/ungoogled-chromium/ungoogled-chromium-148.0.7778.178_p1.ebuild2512
-rw-r--r--www-client/ungoogled-chromium/ungoogled-chromium-148.0.7778.215_p1.ebuild2512
-rw-r--r--www-client/ungoogled-chromium/ungoogled-chromium-149.0.7827.102_p1.ebuild2512
-rw-r--r--www-client/ungoogled-chromium/ungoogled-chromium-149.0.7827.114_p1.ebuild2512
-rw-r--r--www-client/ungoogled-chromium/ungoogled-chromium-149.0.7827.155_p1.ebuild2512
-rw-r--r--www-client/ungoogled-chromium/ungoogled-chromium-149.0.7827.196_p1.ebuild2512
-rw-r--r--www-client/ungoogled-chromium/ungoogled-chromium-149.0.7827.200_p1.ebuild2512
-rw-r--r--www-client/ungoogled-chromium/ungoogled-chromium-149.0.7827.53_p1.ebuild2512
-rw-r--r--www-client/ungoogled-chromium/ungoogled-chromium-150.0.7871.114_p1.ebuild2528
-rw-r--r--www-client/ungoogled-chromium/ungoogled-chromium-150.0.7871.124_p1.ebuild2528
-rw-r--r--www-client/ungoogled-chromium/ungoogled-chromium-150.0.7871.128_p1.ebuild2528
-rw-r--r--www-client/ungoogled-chromium/ungoogled-chromium-150.0.7871.181_p1.ebuild2528
-rw-r--r--www-client/ungoogled-chromium/ungoogled-chromium-150.0.7871.186_p1.ebuild2528
-rw-r--r--www-client/ungoogled-chromium/ungoogled-chromium-151.0.7922.108_p1.ebuild2564
-rw-r--r--www-client/ungoogled-chromium/ungoogled-chromium-151.0.7922.137_p1.ebuild2564
-rw-r--r--www-client/ungoogled-chromium/ungoogled-chromium-151.0.7922.169_p1.ebuild2564
-rw-r--r--www-client/ungoogled-chromium/ungoogled-chromium-151.0.7922.173_p1.ebuild2564
-rw-r--r--www-client/ungoogled-chromium/ungoogled-chromium-151.0.7922.47_p1.ebuild2528
-rw-r--r--www-client/ungoogled-chromium/ungoogled-chromium-151.0.7922.71_p1.ebuild2536
-rw-r--r--www-client/ungoogled-chromium/ungoogled-chromium-151.0.7922.75_p1.ebuild2536
-rw-r--r--www-client/ungoogled-chromium/ungoogled-chromium-152.0.7977.64_p1.ebuild2622
-rw-r--r--www-client/ungoogled-chromium/ungoogled-chromium-152.0.7977.82_p1.ebuild2622
-rw-r--r--www-client/ungoogled-chromium/ungoogled-chromium-153.0.8010.36_p1.ebuild4
-rw-r--r--www-client/ungoogled-chromium/ungoogled-chromium-153.0.8010.52_p1.ebuild (renamed from www-client/ungoogled-chromium/ungoogled-chromium-152.0.7977.75_p1.ebuild)85
-rw-r--r--x11-wm/leftwm/Manifest218
-rw-r--r--x11-wm/leftwm/leftwm-0.5.1.ebuild228
-rw-r--r--x11-wm/leftwm/leftwm-0.5.5.ebuild171
176 files changed, 2935 insertions, 58864 deletions
diff --git a/app-editors/emacs/emacs-27.2-r25.ebuild b/app-editors/emacs/emacs-27.2-r25.ebuild
index 85a9db59d233..3deff35532ff 100644
--- a/app-editors/emacs/emacs-27.2-r25.ebuild
+++ b/app-editors/emacs/emacs-27.2-r25.ebuild
@@ -36,7 +36,7 @@ else
PATCHES=("${WORKDIR}/patch")
SLOT="${PV%%.*}"
[[ ${PV} == *.*.* ]] && SLOT+="-vcs"
- KEYWORDS="~alpha amd64 arm arm64 ~hppa ~m68k ~mips ~ppc ~ppc64 ~riscv ~sparc x86 ~x64-macos"
+ KEYWORDS="~alpha amd64 arm arm64 ~hppa ~m68k ~mips ppc ~ppc64 ~riscv ~sparc x86 ~x64-macos"
fi
DESCRIPTION="The advanced, extensible, customizable, self-documenting editor"
diff --git a/app-editors/emacs/emacs-28.2-r23.ebuild b/app-editors/emacs/emacs-28.2-r23.ebuild
index 870db259570d..2b0add778793 100644
--- a/app-editors/emacs/emacs-28.2-r23.ebuild
+++ b/app-editors/emacs/emacs-28.2-r23.ebuild
@@ -36,7 +36,7 @@ else
PATCHES=("${WORKDIR}/patch")
SLOT="${PV%%.*}"
[[ ${PV} == *.*.* ]] && SLOT+="-vcs"
- KEYWORDS="~alpha amd64 arm arm64 ~hppa ~m68k ~mips ~ppc ~ppc64 ~riscv ~sparc x86 ~x64-macos"
+ KEYWORDS="~alpha amd64 arm arm64 ~hppa ~m68k ~mips ppc ~ppc64 ~riscv ~sparc x86 ~x64-macos"
fi
DESCRIPTION="The advanced, extensible, customizable, self-documenting editor"
diff --git a/app-editors/emacs/emacs-29.4-r11.ebuild b/app-editors/emacs/emacs-29.4-r11.ebuild
index 1e010ef664be..06f7ba0ae625 100644
--- a/app-editors/emacs/emacs-29.4-r11.ebuild
+++ b/app-editors/emacs/emacs-29.4-r11.ebuild
@@ -36,7 +36,7 @@ else
PATCHES=("${WORKDIR}/patch")
SLOT="${PV%%.*}"
[[ ${PV} == *.*.* ]] && SLOT+="-vcs"
- KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~sparc x86 ~x64-macos"
+ KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ~ppc64 ~riscv ~sparc x86 ~x64-macos"
fi
DESCRIPTION="The advanced, extensible, customizable, self-documenting editor"
diff --git a/app-editors/emacs/emacs-30.2-r7.ebuild b/app-editors/emacs/emacs-30.2-r7.ebuild
index 9d80bb9769f6..559c3351a452 100644
--- a/app-editors/emacs/emacs-30.2-r7.ebuild
+++ b/app-editors/emacs/emacs-30.2-r7.ebuild
@@ -36,7 +36,7 @@ else
PATCHES=("${WORKDIR}/patch")
SLOT="${PV%%.*}"
[[ ${PV} == *.*.* ]] && SLOT+="-vcs"
- KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~sparc x86 ~x64-macos"
+ KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ~ppc64 ~riscv ~sparc x86 ~x64-macos"
fi
DESCRIPTION="The advanced, extensible, customizable, self-documenting editor"
diff --git a/app-i18n/man-pages-l10n/man-pages-l10n-4.31.0.ebuild b/app-i18n/man-pages-l10n/man-pages-l10n-4.31.0.ebuild
index a6a51929fa79..19f56c12377f 100644
--- a/app-i18n/man-pages-l10n/man-pages-l10n-4.31.0.ebuild
+++ b/app-i18n/man-pages-l10n/man-pages-l10n-4.31.0.ebuild
@@ -10,7 +10,7 @@ S="${WORKDIR}/${P/-}"
LICENSE="GPL-3+"
SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"
# fa omitted because of missing rtl support in *roff
MY_L10N=(cs da de el es fi fr hu id it ko mk nb nl pl pt-BR ro ru sr sv uk vi)
IUSE="${MY_L10N[@]/#/l10n_}"
diff --git a/app-office/lyx/Manifest b/app-office/lyx/Manifest
index e2fc6b1a0ce3..c9390dae5207 100644
--- a/app-office/lyx/Manifest
+++ b/app-office/lyx/Manifest
@@ -1,8 +1,4 @@
-DIST lyx-2.4.4.tar.xz 18360996 BLAKE2B fb7bd1188061b1910eba00a2869321a7175ba8955e6c7dcdf5e5f00519fa594231aff49d8cfc5c800431bdbb312b6d0555ea5759ea4f80612393d2d45167a55d SHA512 93c674aa71f017b62a5352468362fb0d48da0264a5308bb0228c4f8bf07a443004379a08ffe9fa1cc0393accc8fb9f95ae7a2b314c9c5b7b6023dba711688216
-DIST lyx-2.4.4.tar.xz.sig 310 BLAKE2B e06143dad791bf8b2bee7b10e11e2ef08634bc06efd23891e779d7e1129c07334171836ce42b9fddba23a658d31f81fd8edab3b93e2c08391a35bf28d4680b5f SHA512 1e81a83e2c5f1c3a446fef3afeaf6c169b50f0c747926b8d02cff1fcf25e5ae88a0494f9be399e389eebea51f5a09e2658cb31d5085d8e01358bfeda6a3bfb36
-DIST lyx-2.5.0.tar.xz 18650808 BLAKE2B 70a46dba51245449ae5e59992b6964e5de88053ee15a3340ce2a14740b2f8f5f8f424e50a5724a12b8c00bd6476409bbfc4c24848ef37c7ab84a6decd9d5f6dc SHA512 9e08529ef66fc908227e2504a33392baa2688c619d49666ac1c9cffedd7438496eee9cab8ad07abfb8891a11743f6b33193f90313198eb4d4a015c093a69b8a8
-DIST lyx-2.5.0.tar.xz.sig 310 BLAKE2B 8bd2f171af79f6112d132e2b0fa2942c995ed3e77f04acbcce09348b7511fae753ce38a54a53b0ba8f399b3dc82155822628b06a9fa045f20d15e88c90754264 SHA512 f55954042e37473275e070f3391097ef27fdd256d4820b4d1c49537116c4f9ecb1d6a962075d24872d0ea5403769938df0c5410a411943f11dea041c26c53ed4
-DIST lyx-2.5.1.tar.xz 18673876 BLAKE2B 698f3f708395c022ff99ec29d7b6a8f05c0defaef958542a579a8e7619a7c58ebc4ac63f5b520690ef83b276a443d039c9ae1586eef39986e4568382ae43e35c SHA512 77c3bd1deeb2c6d174d21ee9620654ac82d0695fbeba22b653819129d2d27f2a999e28cdff444c1e9fd64a0a7fae5ce0effa69818bce2aea1b708f7a27858e54
-DIST lyx-2.5.1.tar.xz.sig 310 BLAKE2B 27ccf3fea705655c16512ae50770e2423f53da101417ba56501d15fde52ddc540151b78d0f7aac73a1f57e044b724d6c040ff154abcb81400884cbccad984cea SHA512 c8832da923011049d525ec272a52fa8d07c303a8c8af860baa9c0267e8d53b95ebf271faf36334485e473e806d876696f5427a4b579c686b16c72cc7a64adac2
DIST lyx-2.5.2.tar.xz 18798464 BLAKE2B 66d92276122d73fd80b0cf8498b3021849acab976667e3eead8c2d3fe4438597d8f4ade1f889310d5fc18e967bd02868d3d67278e74d1160446e2c39287a5cf9 SHA512 301d8e4aa63bcf2cdaadee2a5dbbe2b5bf33d9ea6dd767db2e59c07fde83f1191d747d883adaf22690ccc0aed03e438ea2dbff19a45dcdadf5fab0d1b4f5fb28
DIST lyx-2.5.2.tar.xz.sig 310 BLAKE2B 8d2581208af7ccca4ad1c3b539557121406d0bdf9562acd8c1c0b7f61b3b2b751373bd8929206d0d89bcfc42210866a8ecbc9c4e5ae8d491d0a3249d2d2fe561 SHA512 2c799cb8dc1c5dc127519786eb98ae055bbcec5ad6637fcba055903aa67b751e7dd3a186d8607f9e9ed81a68bdca2c8d5d807e79056a3b025519b6b00c6e107f
+DIST lyx-2.5.3.tar.xz 18676604 BLAKE2B fa667eb3f4ba97746697f3fa408fcca29e2ca20b360b399743c146315f887501aa8d6cf9f41320a71df39f6f290f79603aded7b242491d08ac5c9a4400a93a37 SHA512 133aa46e43849997d2ffc90ae8a443b9ee50f6cb09e24fb6c4e6abe5ae5b6378c83d9c7c7e3fdce8a7785b2aa5d6cb77202106aa6f2d88c72972bb7e6b060f77
+DIST lyx-2.5.3.tar.xz.sig 310 BLAKE2B 18050a7e797911b57b5551605f438122f131ff64f6bd5db99782e0c2c209bdfd0bf89c06bea8d401669571b6dc021e6b705d30fb3a3989859460ef81c402e19b SHA512 05241ec1aa78840d0a6a96b8fdb4a9ac81b84a1e9932f9cf820d36f53d9f9055e39da23f961cc41e827bd87cc448065f9b70dceb5848104fdda8859f0f8d0c12
diff --git a/app-office/lyx/lyx-2.4.4.ebuild b/app-office/lyx/lyx-2.4.4.ebuild
deleted file mode 100644
index 592f0e64f7a1..000000000000
--- a/app-office/lyx/lyx-2.4.4.ebuild
+++ /dev/null
@@ -1,188 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{13..14} )
-
-inherit desktop font optfeature python-single-r1 cmake verify-sig xdg
-
-DESCRIPTION="WYSIWYM (What You See Is What You Mean) document processor based on LaTeX"
-HOMEPAGE="https://www.lyx.org/"
-SRC_URI="
- http://ftp.lyx.org/pub/lyx/stable/$(ver_cut 1-2).x/${P}.tar.xz
- http://ftp.lyx.org/pub/lyx/devel/lyx-$(ver_cut 1-2)/${P}.tar.xz
- http://ftp.lyx.org/pub/lyx/stable/$(ver_cut 1-2).x/${P}.tar.xz.sig
- http://ftp.lyx.org/pub/lyx/devel/lyx-$(ver_cut 1-2)/${P}.tar.xz.sig
-"
-
-LICENSE="GPL-2+"
-SLOT="0"
-KEYWORDS="amd64 ~arm64"
-IUSE="aspell cups dia dot enchant gnumeric html +hunspell +latex monolithic-build nls rcs rtf svg l10n_he"
-REQUIRED_USE="${PYTHON_REQUIRED_USE}"
-RESTRICT="test"
-
-RDEPEND="${PYTHON_DEPS}
- app-text/mythes
- dev-libs/boost:=
- dev-qt/qt5compat:6
- dev-qt/qtbase:6[concurrent,dbus,gui,widgets]
- dev-qt/qtsvg:6
- sys-apps/file
- virtual/zlib:=
- virtual/imagemagick-tools[png,svg?]
- x11-libs/libxcb
- x11-misc/xdg-utils
- aspell? ( app-text/aspell )
- cups? ( net-print/cups )
- dia? ( app-office/dia )
- dot? ( media-gfx/graphviz )
- enchant? ( app-text/enchant:2 )
- gnumeric? ( app-office/gnumeric )
- html? ( dev-tex/html2latex )
- hunspell? ( app-text/hunspell:= )
- l10n_he? (
- dev-tex/culmus-latex
- dev-texlive/texlive-langarabic
- )
- latex? (
- app-text/dvipng
- app-text/ghostscript-gpl
- app-text/ps2eps
- app-text/texlive
- dev-texlive/texlive-fontsrecommended
- dev-texlive/texlive-latexextra
- dev-texlive/texlive-mathscience
- dev-texlive/texlive-pictures
- dev-texlive/texlive-plaingeneric
- || (
- dev-tex/latex2html
- dev-tex/hevea
- dev-tex/tex4ht[java]
- dev-tex/tth
- )
- )
- rcs? ( dev-vcs/rcs )
- rtf? (
- app-text/unrtf
- dev-tex/html2latex
- dev-tex/latex2rtf
- )
- svg? ( || (
- gnome-base/librsvg
- media-gfx/inkscape
- ) )
-"
-DEPEND="${RDEPEND}"
-# bc needed http://comments.gmane.org/gmane.editors.lyx.devel/137498 and bug #787839
-BDEPEND="
- app-alternatives/bc
- virtual/pkgconfig
- dev-qt/qttools:6[linguist]
- nls? ( sys-devel/gettext )
- verify-sig? ( sec-keys/openpgp-keys-lyx )
-"
-
-VERIFY_SIG_OPENPGP_KEY_PATH="/usr/share/openpgp-keys/lyx.asc"
-
-DOCS=( ANNOUNCE NEWS README RELEASE-NOTES UPGRADING )
-
-FONT_S="${S}/lib/fonts"
-FONT_SUFFIX="ttf"
-
-PATCHES=(
- "${FILESDIR}"/lyx-2.4.0-fix-hunspell.patch
- # Try first with xdg-open before hardcoded commands
- # Patch from Debian using a similar approach to Fedora
- "${FILESDIR}"/lyx-2.4.4-prefer-xdg-open.patch
- "${FILESDIR}"/${P}-qt-6.10.patch # bug #967230
-)
-
-pkg_setup() {
- python-single-r1_pkg_setup
- font_pkg_setup
-}
-
-src_prepare() {
- sed "s:python -tt:${EPYTHON} -tt:g" -i lib/configure.py || die
- cmake_src_prepare
-}
-
-src_configure() {
- #bug 221921
- export VARTEXFONTS="${T}"/fonts
-
- local mycmakeargs=(
- -DLYX_INSTALL=ON
- -DLYX_USE_QT=QT6
- -DLYX_INSTALL_PREFIX="${EPREFIX}/usr"
- -DLYX_CXX_FLAGS_EXTRA="${CXXFLAGS}"
-
- -DLYX_NLS=$(usex nls)
- -DLYX_ASPELL=$(usex aspell)
- -DLYX_ENCHANT=$(usex enchant)
- -DLYX_HUNSPELL=$(usex hunspell)
-
- # external dependencies
- -DLYX_EXTERNAL_Z=ON
- -DLYX_EXTERNAL_ICONV=ON
- -DLYX_EXTERNAL_HUNSPELL=ON
- -DLYX_EXTERNAL_MYTHES=ON
- -DLYX_EXTERNAL_BOOST=ON
- -DLYX_PROGRAM_SUFFIX=OFF
-
- # debug control
- -DLYX_NO_OPTIMIZE=OFF
- -DLYX_RELEASE=ON
- -DLYX_DEBUG=OFF
- -DLYX_DEBUG_GLIBC=OFF
- -DLYX_STDLIB_DEBUG=OFF
- )
-
- cmake_src_configure
-}
-
-src_install() {
- cmake_src_install
-
- newicon -s 32 "development/Win32/packaging/icons/lyx_32x32.png" ${PN}.png
- doicon -s 48 "lib/images/lyx.png"
- doicon -s scalable "lib/images/lyx.svg"
-
- # fix for bug 91108
- if use latex; then
- dosym -r /usr/share/lyx/tex /usr/share/texmf-site/tex/latex/lyx
- fi
-
- # fonts needed for proper math display, see also bug #15629
- font_src_install
-
- python_fix_shebang "${ED}"/usr/share/${PN}
-
- if use hunspell; then
- dosym ../myspell /usr/share/lyx/dicts
- dosym ../myspell /usr/share/lyx/thes
- fi
-}
-
-pkg_postinst() {
- font_pkg_postinst
- xdg_pkg_postinst
-
- # fix for bug 91108
- if use latex ; then
- texhash || die
- fi
-
- optfeature "handling more fonts" dev-texlive/texlive-fontsextra
-}
-
-pkg_postrm() {
- font_pkg_postrm
- xdg_pkg_postrm
-
- if use latex ; then
- texhash || die
- fi
-}
diff --git a/app-office/lyx/lyx-2.5.0.ebuild b/app-office/lyx/lyx-2.5.0.ebuild
deleted file mode 100644
index 5eb8b714273c..000000000000
--- a/app-office/lyx/lyx-2.5.0.ebuild
+++ /dev/null
@@ -1,186 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{13..14} )
-
-inherit desktop font optfeature python-single-r1 cmake verify-sig xdg
-
-DESCRIPTION="WYSIWYM (What You See Is What You Mean) document processor based on LaTeX"
-HOMEPAGE="https://www.lyx.org/"
-SRC_URI="
- http://ftp.lyx.org/pub/lyx/stable/$(ver_cut 1-2).x/${P/_rc/\~RC}.tar.xz
- http://ftp.lyx.org/pub/lyx/devel/lyx-$(ver_cut 1-2)/${P/_rc/\~RC}.tar.xz
- http://ftp.lyx.org/pub/lyx/stable/$(ver_cut 1-2).x/${P/_rc/\~RC}.tar.xz.sig
- http://ftp.lyx.org/pub/lyx/devel/lyx-$(ver_cut 1-2)/${P/_rc/\~RC}.tar.xz.sig
-"
-S=${WORKDIR}/${P/_rc/\~RC}
-
-LICENSE="GPL-2+"
-SLOT="0"
-KEYWORDS="amd64 ~arm64"
-IUSE="aspell cups dia dot enchant gnumeric html +hunspell +latex monolithic-build nls rcs rtf svg l10n_he"
-REQUIRED_USE="${PYTHON_REQUIRED_USE}"
-RESTRICT="test"
-
-RDEPEND="${PYTHON_DEPS}
- app-text/mythes
- dev-qt/qt5compat:6
- dev-qt/qtbase:6[concurrent,dbus,gui,widgets]
- dev-qt/qtsvg:6
- sys-apps/file
- virtual/zlib:=
- virtual/imagemagick-tools[png,svg?]
- x11-libs/libxcb
- x11-misc/xdg-utils
- aspell? ( app-text/aspell )
- cups? ( net-print/cups )
- dia? ( app-office/dia )
- dot? ( media-gfx/graphviz )
- enchant? ( app-text/enchant:2 )
- gnumeric? ( app-office/gnumeric )
- html? ( dev-tex/html2latex )
- hunspell? ( app-text/hunspell:= )
- l10n_he? (
- dev-tex/culmus-latex
- dev-texlive/texlive-langarabic
- )
- latex? (
- app-text/dvipng
- app-text/ghostscript-gpl
- app-text/ps2eps
- app-text/texlive
- dev-texlive/texlive-fontsrecommended
- dev-texlive/texlive-latexextra
- dev-texlive/texlive-mathscience
- dev-texlive/texlive-pictures
- dev-texlive/texlive-plaingeneric
- || (
- dev-tex/latex2html
- dev-tex/hevea
- dev-tex/tex4ht[java]
- dev-tex/tth
- )
- )
- rcs? ( dev-vcs/rcs )
- rtf? (
- app-text/unrtf
- dev-tex/html2latex
- dev-tex/latex2rtf
- )
- svg? ( || (
- gnome-base/librsvg
- media-gfx/inkscape
- ) )
-"
-DEPEND="${RDEPEND}"
-# bc needed http://comments.gmane.org/gmane.editors.lyx.devel/137498 and bug #787839
-BDEPEND="
- app-alternatives/bc
- virtual/pkgconfig
- dev-qt/qttools:6[linguist]
- nls? ( sys-devel/gettext )
- verify-sig? ( sec-keys/openpgp-keys-lyx )
-"
-
-VERIFY_SIG_OPENPGP_KEY_PATH="/usr/share/openpgp-keys/lyx.asc"
-
-DOCS=( ANNOUNCE NEWS README RELEASE-NOTES UPGRADING )
-
-FONT_S="${S}/lib/fonts"
-FONT_SUFFIX="ttf"
-
-PATCHES=(
- "${FILESDIR}"/lyx-2.4.0-fix-hunspell.patch
- # Try first with xdg-open before hardcoded commands
- # Patch from Debian using a similar approach to Fedora
- "${FILESDIR}"/lyx-2.4.4-prefer-xdg-open.patch
-)
-
-pkg_setup() {
- python-single-r1_pkg_setup
- font_pkg_setup
-}
-
-src_prepare() {
- sed "s:python -tt:${EPYTHON} -tt:g" -i lib/configure.py || die
- cmake_src_prepare
-}
-
-src_configure() {
- #bug 221921
- export VARTEXFONTS="${T}"/fonts
-
- local mycmakeargs=(
- -DLYX_INSTALL=ON
- -DLYX_USE_QT=QT6
- -DLYX_INSTALL_PREFIX="${EPREFIX}/usr"
- -DLYX_CXX_FLAGS_EXTRA="${CXXFLAGS}"
-
- -DLYX_NLS=$(usex nls)
- -DLYX_ASPELL=$(usex aspell)
- -DLYX_ENCHANT=$(usex enchant)
- -DLYX_HUNSPELL=$(usex hunspell)
-
- # external dependencies
- -DLYX_EXTERNAL_Z=ON
- -DLYX_EXTERNAL_ICONV=ON
- -DLYX_EXTERNAL_HUNSPELL=ON
- -DLYX_EXTERNAL_MYTHES=ON
- -DLYX_PROGRAM_SUFFIX=OFF
-
- # debug control
- -DLYX_NO_OPTIMIZE=OFF
- -DLYX_RELEASE=ON
- -DLYX_DEBUG=OFF
- -DLYX_DEBUG_GLIBC=OFF
- -DLYX_STDLIB_DEBUG=OFF
- )
-
- cmake_src_configure
-}
-
-src_install() {
- cmake_src_install
-
- newicon -s 32 "development/Win32/packaging/icons/lyx_32x32.png" ${PN}.png
- doicon -s 48 "lib/images/lyx.png"
- doicon -s scalable "lib/images/lyx.svg"
-
- # fix for bug 91108
- if use latex; then
- dosym -r /usr/share/lyx/tex /usr/share/texmf-site/tex/latex/lyx
- fi
-
- # fonts needed for proper math display, see also bug #15629
- font_src_install
-
- python_fix_shebang "${ED}"/usr/share/${PN}
-
- if use hunspell; then
- dosym ../myspell /usr/share/lyx/dicts
- dosym ../myspell /usr/share/lyx/thes
- fi
-}
-
-pkg_postinst() {
- font_pkg_postinst
- xdg_pkg_postinst
-
- # fix for bug 91108
- if use latex ; then
- texhash || die
- fi
-
- optfeature "handling more fonts" dev-texlive/texlive-fontsextra
-}
-
-pkg_postrm() {
- font_pkg_postrm
- xdg_pkg_postrm
-
- if use latex ; then
- texhash || die
- fi
-}
diff --git a/app-office/lyx/lyx-2.5.1.ebuild b/app-office/lyx/lyx-2.5.3.ebuild
index 00b4156e0176..d5972d421e03 100644
--- a/app-office/lyx/lyx-2.5.1.ebuild
+++ b/app-office/lyx/lyx-2.5.3.ebuild
@@ -21,7 +21,7 @@ S=${WORKDIR}/${P/_rc/\~RC}
LICENSE="GPL-2+"
SLOT="0"
-KEYWORDS="amd64 ~arm64"
+KEYWORDS="~amd64 ~arm64"
IUSE="aspell cups dia dot enchant gnumeric html +hunspell +latex monolithic-build nls rcs rtf svg l10n_he"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
RESTRICT="test"
diff --git a/dev-db/barman/Manifest b/dev-db/barman/Manifest
index 62a8e6049c59..732bbb23dea2 100644
--- a/dev-db/barman/Manifest
+++ b/dev-db/barman/Manifest
@@ -1,3 +1,4 @@
DIST barman-3.15.0.tar.gz 1942470 BLAKE2B 23dd66dd1912524a30aff881609f61a5b17d43b4c5941404e9d47e6d4475640066309067cf97fbb73dd9a90b3fd3664dd120d88432ba2c2749e32a0d7d3acfa3 SHA512 86e840ded02509017c1339f552eec210b380996988cfb6588ce9c543c1bae04d67d29e483653c98ec50cb483259c5c6e8caae1eea2c4c3ba119ea548f6606c82
DIST barman-3.16.1.tar.gz 1959902 BLAKE2B b6376d1acf1e82916085b273ce65673f577f2ccbffc100f47fb6245d19cd3d94b4847f97790611ab9072609d91d5284f035e9c70637454c2bbac7e90964d0bb2 SHA512 bbd6e888dd19bc348885d1f3280d6567950a44ec6e62c9a2de33850c141370ecc6ab3d0095a58ea0c4626b77d4ceba0b7cc491057b9cc34250732399b42c2493
DIST barman-3.17.0.tar.gz 1975909 BLAKE2B 0023d703ef87e4b26a174425d3abdc4124171f1cc5aa897b47101d2ccf1b878a69126f5f71ba8e59368fc70c336fada675c88fe01c727a6636e2e46b9f0c20c2 SHA512 cc714bde10cd4eb303ddbb99eb302a3cfaf7b27d303c49f652094da0832b4efd1c50006d76735f2d54895b529afc41925882660d2d3b88f880e417793c58eb99
+DIST barman-3.20.0.tar.gz 2256031 BLAKE2B 30089da30e37d05995dcb44b32154c1b998e80947367d05b05cff102677786565793f6e5c1088515cc5de9e0a66d506f19b58e82f2b9c768d940d8b004479b8e SHA512 f9d32c9a90fbf53415f837d095adfbce9205cca0ef545c485bece9eabce76ec9c243dff0032363f96fcc2969083ed19773b33ccdee8ec4190012746f6c4a50a2
diff --git a/dev-db/barman/barman-3.20.0.ebuild b/dev-db/barman/barman-3.20.0.ebuild
new file mode 100644
index 000000000000..5defea7d5c9d
--- /dev/null
+++ b/dev-db/barman/barman-3.20.0.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517="uv-build"
+PYTHON_COMPAT=( python3_{13..14} )
+
+RESTRICT="test" # missing azure sdk
+
+inherit distutils-r1
+
+DESCRIPTION="Administration tool for disaster recovery of PostgreSQL servers"
+HOMEPAGE="https://www.pgbarman.org https://sourceforge.net/projects/pgbarman/"
+SRC_URI="https://github.com/2ndquadrant-it/barman/archive/release/${PV}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/${PN}-release-${PV}"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64"
+
+RDEPEND="
+ dev-python/boto3[${PYTHON_USEDEP}]
+ dev-python/argh[${PYTHON_USEDEP}]
+ dev-python/psycopg:2[${PYTHON_USEDEP}]
+ dev-python/python-dateutil[${PYTHON_USEDEP}]
+ dev-python/argcomplete[${PYTHON_USEDEP}]
+ net-misc/rsync
+ dev-db/postgresql[server]
+"
+
+BDEPEND="
+ test? (
+ dev-python/mock[${PYTHON_USEDEP}]
+ dev-python/pytest-timeout[${PYTHON_USEDEP}]
+ dev-python/python-snappy[${PYTHON_USEDEP}]
+ )
+"
+
+distutils_enable_tests pytest
+
+src_prepare() {
+ default
+
+ sed -i -e \
+ "s/^ def test_xlog_segment_mask(.*:/ @pytest.mark.xfail(reason='Test fails on Gentoo')\n\0/" \
+ tests/test_xlog.py || die
+}
diff --git a/dev-embedded/fwup/fwup-1.17.1.ebuild b/dev-embedded/fwup/fwup-1.17.1.ebuild
index bc26eb63d000..abd547647df8 100644
--- a/dev-embedded/fwup/fwup-1.17.1.ebuild
+++ b/dev-embedded/fwup/fwup-1.17.1.ebuild
@@ -3,6 +3,8 @@
EAPI=8
+inherit autotools
+
DESCRIPTION="Configurable embedded Linux firmware update creator and runner"
HOMEPAGE="https://github.com/fwup-home/fwup"
SRC_URI="https://github.com/fwup-home/fwup/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
@@ -15,12 +17,20 @@ IUSE="test"
# Running tests requires dev-util/xdelta to be compiled with lzma support.
# Only run tests when the appropriate USE flag has been set.
RESTRICT="!test? ( test )"
-BDPEND="test? ( dev-util/xdelta:3[lzma] )"
+
+BDEPEND="
+ virtual/pkgconfig
+ test? ( dev-util/xdelta:3[lzma] )
+"
+
+DEPEND="
+ >=app-arch/libarchive-3.7.9:=[lzma]
+ >=dev-libs/confuse-2.8:=
+"
RDEPEND="
- >=app-arch/libarchive-3.7.9
+ ${DEPEND}
app-arch/zip
- >=dev-libs/confuse-2.8
dev-util/xdelta:3
sys-fs/dosfstools
sys-fs/mtools
@@ -29,7 +39,7 @@ RDEPEND="
src_prepare() {
default
- ./autogen.sh
+ eautoreconf
}
src_test() {
diff --git a/dev-lang/elixir/elixir-1.16.3-r2.ebuild b/dev-lang/elixir/elixir-1.16.3-r2.ebuild
index 483424ad896a..61ee248a65cd 100644
--- a/dev-lang/elixir/elixir-1.16.3-r2.ebuild
+++ b/dev-lang/elixir/elixir-1.16.3-r2.ebuild
@@ -9,7 +9,7 @@ SRC_URI="https://github.com/elixir-lang/elixir/archive/v${PV}.tar.gz -> ${P}.tar
LICENSE="Apache-2.0 ErlPL-1.1"
SLOT="0"
-KEYWORDS="amd64 ~arm ~arm64 ~ppc ~riscv ~sparc x86"
+KEYWORDS="amd64 ~arm ~arm64 ppc ~riscv ~sparc x86"
IUSE="test"
RESTRICT="!test? ( test )"
diff --git a/dev-lang/elixir/elixir-1.17.3-r2.ebuild b/dev-lang/elixir/elixir-1.17.3-r2.ebuild
index 37d180ab61d1..4dcf5fb79440 100644
--- a/dev-lang/elixir/elixir-1.17.3-r2.ebuild
+++ b/dev-lang/elixir/elixir-1.17.3-r2.ebuild
@@ -9,7 +9,7 @@ SRC_URI="https://github.com/elixir-lang/elixir/archive/v${PV}.tar.gz -> ${P}.tar
LICENSE="Apache-2.0 ErlPL-1.1"
SLOT="0"
-KEYWORDS="amd64 ~arm ~arm64 ~ppc ~riscv ~sparc x86"
+KEYWORDS="amd64 ~arm ~arm64 ppc ~riscv ~sparc x86"
IUSE="test"
RESTRICT="!test? ( test )"
diff --git a/dev-lang/elixir/elixir-1.18.5.ebuild b/dev-lang/elixir/elixir-1.18.5.ebuild
index 5dbb69f25d50..547df2728a3e 100644
--- a/dev-lang/elixir/elixir-1.18.5.ebuild
+++ b/dev-lang/elixir/elixir-1.18.5.ebuild
@@ -9,7 +9,7 @@ SRC_URI="https://github.com/elixir-lang/elixir/archive/v${PV}.tar.gz -> ${P}.tar
LICENSE="Apache-2.0 ErlPL-1.1"
SLOT="0"
-KEYWORDS="amd64 ~arm ~arm64 ~ppc ~riscv ~sparc x86"
+KEYWORDS="amd64 ~arm ~arm64 ppc ~riscv ~sparc x86"
IUSE="test"
RESTRICT="!test? ( test )"
diff --git a/dev-lang/elixir/elixir-1.19.6.ebuild b/dev-lang/elixir/elixir-1.19.6.ebuild
index 0874b6be7876..1e4c9efecec6 100644
--- a/dev-lang/elixir/elixir-1.19.6.ebuild
+++ b/dev-lang/elixir/elixir-1.19.6.ebuild
@@ -9,7 +9,7 @@ SRC_URI="https://github.com/elixir-lang/elixir/archive/v${PV}.tar.gz -> ${P}.tar
LICENSE="Apache-2.0 ErlPL-1.1"
SLOT="0"
-KEYWORDS="amd64 ~arm ~arm64 ~ppc ~riscv ~sparc x86"
+KEYWORDS="amd64 ~arm ~arm64 ppc ~riscv ~sparc x86"
IUSE="test"
RESTRICT="!test? ( test )"
diff --git a/dev-lang/go/go-1.25.13.ebuild b/dev-lang/go/go-1.25.13.ebuild
index e2709fdfac4a..a4da32d3784e 100644
--- a/dev-lang/go/go-1.25.13.ebuild
+++ b/dev-lang/go/go-1.25.13.ebuild
@@ -20,7 +20,7 @@ case ${PV} in
*)
SRC_URI="https://go.dev/dl/go${MY_PV}.src.tar.gz "
S="${WORKDIR}"/go
- KEYWORDS="-* amd64 arm arm64 ~loong ~mips ~ppc64 ~riscv ~s390 x86 ~x64-macos ~x64-solaris"
+ KEYWORDS="-* amd64 arm arm64 ~loong ~mips ppc64 ~riscv ~s390 x86 ~x64-macos ~x64-solaris"
;;
esac
diff --git a/dev-lang/ispc/Manifest b/dev-lang/ispc/Manifest
index 6090279ceaec..100e6e718143 100644
--- a/dev-lang/ispc/Manifest
+++ b/dev-lang/ispc/Manifest
@@ -1,2 +1 @@
-DIST ispc-1.30.0.gh.tar.gz 20116734 BLAKE2B 1bf584d580e0b9f75bfbdf0f8a762625dcd0b645495996685c0af4d040c40c5f239a4f5d8d8a5c7c693ffafd4c8194d3a6a802ad7fc23df713eec56ecd12766e SHA512 984c9880eed8b1fdbc5c9a86146aa1655d630532915aef286409b9b4e43727d7ae43d7e9f9b6786efec34f98f91730c8df283ef71cb1e8f99a74600935c86401
DIST ispc-1.31.0.gh.tar.gz 20164383 BLAKE2B 2b2f0c988299282a0b969b6e712c46c66e8d361c7c23d67adfa876b66fe0c9a13346189a8bf71a991dc5574c566a48f364f055ee1f9bb7ebb3118b360bed33d7 SHA512 eff612d2671a6e8c033ec6b7247c49c74704a64e56535117c815a8db9cbfa73051fb2ee4326ed15c8fbe983beeec87c1a46d6041dc56672df37f9ac756bf5b5e
diff --git a/dev-lang/ispc/ispc-1.30.0.ebuild b/dev-lang/ispc/ispc-1.30.0.ebuild
deleted file mode 100644
index 5cbe59827190..000000000000
--- a/dev-lang/ispc/ispc-1.30.0.ebuild
+++ /dev/null
@@ -1,97 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-LLVM_COMPAT=( {18..21} )
-PYTHON_COMPAT=( python3_{13..14} )
-
-inherit cmake dot-a llvm-r1 multiprocessing python-any-r1 toolchain-funcs
-
-DESCRIPTION="Intel SPMD Program Compiler"
-HOMEPAGE="
- https://ispc.github.io/
- https://github.com/ispc/ispc/
-"
-SRC_URI="
- https://github.com/ispc/ispc/archive/v${PV}.tar.gz
- -> ${P}.gh.tar.gz
-"
-
-LICENSE="BSD BSD-2 UoI-NCSA"
-SLOT="0"
-KEYWORDS="amd64 ~arm ~arm64 ~ppc64 ~x86"
-IUSE="examples gpu openmp test"
-RESTRICT="!test? ( test )"
-
-DEPEND="
- $(llvm_gen_dep '
- llvm-core/clang:${LLVM_SLOT}
- ')
- sys-libs/ncurses:=
- gpu? ( dev-libs/level-zero:= )
- !openmp? ( dev-cpp/tbb:= )
-"
-RDEPEND="
- ${DEPEND}
-"
-BDEPEND="
- app-alternatives/yacc
- app-alternatives/lex
- ${PYTHON_DEPS}
-"
-
-pkg_pretend() {
- [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
-}
-
-pkg_setup() {
- [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
- llvm-r1_pkg_setup
- python-any-r1_pkg_setup
-}
-
-src_prepare() {
- # do not require bundled gtest
- mkdir -p ispcrt/tests/vendor/google/googletest || die
- cat > ispcrt/tests/vendor/google/googletest/CMakeLists.txt <<-EOF || die
- find_package(GTest)
- EOF
- # remove hacks that break unbundling
- sed -i -e '/gmock/d' -e '/install/,$d' ispcrt/tests/CMakeLists.txt || die
-
- cmake_src_prepare
-}
-
-src_configure() {
- lto-guarantee-fat
- local mycmakeargs=(
- -DARM_ENABLED=$(usex arm)
- -DCMAKE_SKIP_RPATH=ON
- -DISPC_INCLUDE_EXAMPLES=OFF
- -DISPC_INCLUDE_TESTS=$(usex test)
- -DISPC_INCLUDE_UTILS=OFF
- -DISPCRT_BUILD_GPU=$(usex gpu)
- -DISPCRT_BUILD_TASK_MODEL=$(usex openmp OpenMP TBB)
- # prevent it from trying to find the git repo
- -DGIT_BINARY=GIT_BINARY-NOTFOUND
- )
- cmake_src_configure
-}
-
-src_test() {
- # Inject path to prevent using system ispc
- local -x PATH="${BUILD_DIR}/bin:${PATH}"
- "${EPYTHON}" ./scripts/run_tests.py "-j$(makeopts_jobs)" -v ||
- die "Testing failed under ${EPYTHON}"
-}
-
-src_install() {
- cmake_src_install
- strip-lto-bytecode
-
- if use examples; then
- docompress -x /usr/share/doc/${PF}/examples
- dodoc -r examples
- fi
-}
diff --git a/dev-lang/ispc/ispc-1.31.0.ebuild b/dev-lang/ispc/ispc-1.31.0.ebuild
index e28d7cb41e90..e1d94f191beb 100644
--- a/dev-lang/ispc/ispc-1.31.0.ebuild
+++ b/dev-lang/ispc/ispc-1.31.0.ebuild
@@ -3,7 +3,7 @@
EAPI=8
-LLVM_COMPAT=( {18..21} )
+LLVM_COMPAT=( {20..21} )
PYTHON_COMPAT=( python3_{13..14} )
inherit cmake dot-a llvm-r1 multiprocessing python-any-r1 toolchain-funcs
diff --git a/dev-lang/moarvm/Manifest b/dev-lang/moarvm/Manifest
index 50f1b09ca350..b788ccecadf9 100644
--- a/dev-lang/moarvm/Manifest
+++ b/dev-lang/moarvm/Manifest
@@ -1 +1,2 @@
DIST MoarVM-2026.02.tar.gz 15405708 BLAKE2B 9a465c92dadc3fb82e6c758e66b5ca2b58ab4f5e3ad2e3973ba87d512530aedd7abac30b0be9569033a5f75c79dd2e36782bc9be70ab8fd3d39a84d2046a4982 SHA512 d41720fe1c86a09902af3d0259f976a43f1bde6173be84631e891d500299b54b3a6da106ebd0af8d7a2dab5dcf996e15d484d5bc22decf91d98ee84b8c1e98dd
+DIST MoarVM-2026.08.tar.gz 8651008 BLAKE2B 705df547d7207799d28e797f0581545b8696135aac0b50dce4af1010672fffc7b736a27c54cb6fd776db6163d9440bac7f0a93086db31414b6840f32d2bb2591 SHA512 b7f07291949e42441565878df18ae0f4a500b80b89be1ed9677c5df8ee31ae687e6327f0a89aa0de1b80acbe70af95f7257edef614884a77bef922ef66a89371
diff --git a/dev-lang/moarvm/moarvm-2026.08.ebuild b/dev-lang/moarvm/moarvm-2026.08.ebuild
new file mode 100644
index 000000000000..542be0151e32
--- /dev/null
+++ b/dev-lang/moarvm/moarvm-2026.08.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+MY_PN="MoarVM"
+if [[ ${PV} == "9999" ]]; then
+ EGIT_REPO_URI="https://github.com/${MY_PN}/${MY_PN}.git"
+ inherit git-r3
+ S="${WORKDIR}/${P}"
+else
+ SRC_URI="http://moarvm.org/releases/${MY_PN}-${PV}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+ S="${WORKDIR}/${MY_PN}-${PV}"
+fi
+
+DESCRIPTION="A 6model-based VM for NQP and Raku"
+HOMEPAGE="http://moarvm.org"
+LICENSE="Artistic-2"
+SLOT="0"
+
+IUSE="asan clang debug doc +jit optimize static-libs ubsan"
+
+RDEPEND="dev-libs/libatomic_ops
+ >=dev-libs/libuv-1.26:=
+ dev-libs/libffi:=
+ dev-libs/mimalloc"
+DEPEND="${RDEPEND}
+ clang? ( llvm-core/clang )
+ dev-lang/perl"
+
+DOCS=( CREDITS README.md )
+
+# Tests are conducted via nqp
+RESTRICT=test
+
+src_configure() {
+ MAKEOPTS+=" NOISY=1"
+ use doc && DOCS+=( docs/* )
+ local prefix="${EPREFIX}/usr"
+ local libdir="${EPREFIX}/usr/$(get_libdir)"
+ einfo "--prefix '${prefix}'"
+ einfo "--libdir '${libdir}'"
+ local myconfigargs=(
+ "--prefix" "${prefix}"
+ "--has-libuv"
+ "--has-libatomic_ops"
+ "--has-libffi"
+ "--has-mimalloc"
+ "--libdir" "${libdir}"
+ "--compiler" "$(usex clang clang gcc)"
+ "$(usex asan --asan)"
+ "$(usex debug --debug --no-debug)"
+ "$(usex optimize --optimize= --no-optimize)"
+ "$(usex static-libs --static)"
+ "$(usex ubsan --ubsan)"
+ )
+
+ perl Configure.pl "${myconfigargs[@]}" moarshared || die
+}
diff --git a/dev-lang/nqp/Manifest b/dev-lang/nqp/Manifest
index 96aae35cb8f6..012baaf9b55a 100644
--- a/dev-lang/nqp/Manifest
+++ b/dev-lang/nqp/Manifest
@@ -1 +1,2 @@
DIST nqp-2026.02.tar.gz 9727779 BLAKE2B 2f37b258ba75e3cce446417c2409e8bc13d556c6e45233bd17cb8a57294c3d84d452be377a83d3b0ef71c65c653188dd4fb32130eab2ce0c6aa77d0ec91a81cc SHA512 4cc299bfbb2e9e834986e6868481cfd017329431ae1de6b091b31b0914774c3611cb49946fcdcaa2b95197883c3b8fdc63040d99c23fb028eacf061fa3c847c6
+DIST nqp-2026.08.tar.gz 9728340 BLAKE2B 8422a4950373f2594246c877bd952c6a35e450110af7942a052f1d96953adfc226e199bf05a3521608699297fe05e694c986b650744bf8543ca2b81990d1c2ed SHA512 247c7e722420ed0ce69a30464678fc91853083b1f091f8f995299bef5cae776e48b56eaa3f223d36748cae7d281847b80d06ba29ce9787568e9bc1627bbeb111
diff --git a/dev-lang/nqp/nqp-2026.08.ebuild b/dev-lang/nqp/nqp-2026.08.ebuild
new file mode 100644
index 000000000000..316f045a99e8
--- /dev/null
+++ b/dev-lang/nqp/nqp-2026.08.ebuild
@@ -0,0 +1,147 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit java-pkg-opt-2 multibuild
+
+if [[ ${PV} == "9999" ]]; then
+ EGIT_REPO_URI="https://github.com/Raku/${PN}.git"
+ inherit git-r3
+else
+ SRC_URI="https://github.com/Raku/${PN}/releases/download/${PV}/${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+DESCRIPTION="Not Quite Perl, a Raku bootstrapping compiler"
+HOMEPAGE="https://rakudo.org"
+
+LICENSE="Artistic-2"
+SLOT="0"
+IUSE="doc clang java +moar test"
+RESTRICT="!test? ( test )"
+REQUIRED_USE="|| ( java moar )"
+
+CDEPEND="java? (
+ >=dev-java/asm-9.8:0
+ >=dev-java/jna-5.17.0:0
+ )
+ moar? ( ~dev-lang/moarvm-${PV}[clang=] )"
+RDEPEND="${CDEPEND}
+ java? ( >=virtual/jre-11 )"
+DEPEND="${CDEPEND}"
+BDEPEND="${CDEPEND}
+ clang? ( llvm-core/clang )
+ java? ( >=virtual/jdk-11 )
+ dev-lang/perl"
+
+pkg_pretend() {
+ if has_version dev-lang/rakudo || has_version dev-lang/nqp; then
+ ewarn "NQP is known to fail compilation/installation with Rakudo and/or NQP"
+ ewarn "already being installed. So if it fails, try uninstalling both"
+ ewarn "dev-lang/nqp and dev-lang/rakudo, then do a new installation."
+ ewarn "(see Bug #584394)"
+ fi
+}
+
+src_prepare() {
+ MULTIBUILD_VARIANTS=()
+ use moar && MULTIBUILD_VARIANTS+=( moar )
+ use java && MULTIBUILD_VARIANTS+=( jvm )
+
+ multibuild_copy_sources
+
+ # This will pull in conditional java_prepare
+ default
+}
+
+nqp_configure() {
+ pushd "${BUILD_DIR}" > /dev/null || die
+ local myconfargs=(
+ "--backend=${MULTIBUILD_VARIANT}"
+ "--prefix=${EPREFIX}/usr" )
+
+ perl Configure.pl "${myconfargs[@]}" || die
+ popd || die
+}
+
+nqp_compile() {
+ if [[ "${MULTIBUILD_VARIANT}" = jvm ]]; then
+ emake -j1 \
+ -C "${BUILD_DIR}" \
+ JAVAC="$(java-pkg_get-javac)"
+ elif [[ "${MULTIBUILD_VARIANT}" = moar ]]; then
+ emake -j1 \
+ -C "${BUILD_DIR}"
+ fi
+}
+
+nqp_test() {
+ emake -j1 \
+ -C "${BUILD_DIR}" \
+ test
+}
+
+nqp_install() {
+ # This is the actual reason we need multibuild.eclass.
+ # We need to distinguish the install procedure for MoarVM and JVM backends.
+ case "${MULTIBUILD_VARIANT}" in
+ moar)
+ emake \
+ DESTDIR="${ED}" \
+ -C "${BUILD_DIR}" \
+ install
+ ;;
+ jvm)
+ pushd "${BUILD_DIR}" > /dev/null || die
+ # Set JAVA_PKG_JARDEST early.
+ java-pkg_init_paths_
+
+ # Upstream sets the classpath to this location. Perhaps it's
+ # used to locate the additional libraries?
+ java-pkg_addcp "${JAVA_PKG_JARDEST}"
+
+ insinto "${JAVA_PKG_JARDEST}"
+ local jar
+
+ for jar in *.jar; do
+ if has ${jar} ${PN}.jar ${PN}-runtime.jar; then
+ # jars for NQP itself.
+ java-pkg_dojar ${jar}
+ else
+ # jars used by NQP.
+ doins ${jar}
+ fi
+ done
+
+ # Upstream uses -Xbootclasspath/a, which is faster due to lack
+ # of verification, but gjl isn't flexible enough yet. :(
+ java-pkg_dolauncher ${PN}-j --main ${PN}
+ dosym ${PN}-j /usr/bin/${PN}
+ dobin tools/jvm/eval-client.pl
+ popd > /dev/null || die
+ ;;
+ *)
+ die "Unknown MULTIBUILD_VARIANT ${MULTIBUILD_VARIANT}."
+ ;;
+ esac
+}
+
+src_configure() {
+ multibuild_foreach_variant nqp_configure
+}
+
+src_compile() {
+ multibuild_foreach_variant nqp_compile
+}
+
+src_test() {
+ multibuild_foreach_variant nqp_test
+}
+
+src_install() {
+ multibuild_foreach_variant nqp_install
+
+ dodoc CREDITS README.pod
+ use doc && dodoc -r docs/*
+}
diff --git a/dev-lang/rakudo/Manifest b/dev-lang/rakudo/Manifest
index e0f74b9b1b92..8e1b7dcf2d65 100644
--- a/dev-lang/rakudo/Manifest
+++ b/dev-lang/rakudo/Manifest
@@ -1 +1,2 @@
DIST rakudo-2026.02.tar.gz 8252410 BLAKE2B bec3773bba3b8787bbd12b7278b7e834a7f3294027c6de6a58f946a0cd6db1949894b4b6922679863b1fac0494cf6b2075f8c400c6cae30a48893ad65e30e14b SHA512 da172c95cc5dfd3e993146a9bc9c8328965ef8d40a9e22ac34598090f899574d75d6cd7f11255cce5ba762f4148f2e2ce32bec39e410ac1e81a9e3cef5c2ed2f
+DIST rakudo-2026.08.tar.gz 8642637 BLAKE2B 3965827af8df08e7b47ff81bb7c53b239b9190ad7e0caa1b646b84be616401fe533f07d5ed5a5364a638a79e9fa3bfe9f3e5cbc9f1332ecd0e3776ecc4ac8b07 SHA512 ceb50dd049bba93bfb68408fecd2f78af688c187e62599ccab7f5f82ed5a6244f46c2c7f996840ae67cfbe2de6efcc7d06b5aff140d8333f782a5831a1d57caa
diff --git a/dev-lang/rakudo/rakudo-2026.08.ebuild b/dev-lang/rakudo/rakudo-2026.08.ebuild
new file mode 100644
index 000000000000..5e7a60802819
--- /dev/null
+++ b/dev-lang/rakudo/rakudo-2026.08.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit java-pkg-opt-2
+
+DESCRIPTION="A compiler for the Raku programming language"
+HOMEPAGE="https://rakudo.org"
+
+if [[ ${PV} == "9999" ]]; then
+ EGIT_REPO_URI="https://github.com/rakudo/${PN}.git"
+ inherit git-r3
+else
+ SRC_URI="https://rakudo.org/dl/${PN}/${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+LICENSE="Artistic-2"
+SLOT="0"
+# TODO: add USE="javascript" once that's usable in nqp
+IUSE="clang java +moar test"
+RESTRICT="!test? ( test )"
+REQUIRED_USE="|| ( java moar )"
+
+CDEPEND="~dev-lang/nqp-${PV}:${SLOT}=[java?,moar?,clang=]"
+RDEPEND="${CDEPEND}
+ java? ( >=virtual/jre-1.9 )"
+DEPEND="${CDEPEND}
+ clang? ( llvm-core/clang )
+ java? ( >=virtual/jdk-1.9 )
+ >=dev-lang/perl-5.10"
+
+pkg_pretend() {
+ if has_version dev-lang/rakudo; then
+ ewarn "Rakudo is known to fail compilation/installation with Rakudo"
+ ewarn "already being installed. So if it fails, try unmerging dev-lang/rakudo,"
+ ewarn "then do a new installation."
+ ewarn "(see Bug #584394)"
+ fi
+}
+
+src_configure() {
+ local backends
+ use moar && backends+="moar,"
+ use java && backends+="jvm"
+
+ local myargs=(
+ "--prefix=/usr"
+ "--sysroot=/"
+ "--sdkroot=/"
+ "--backends=${backends}"
+ )
+
+ perl Configure.pl "${myargs[@]}" || die
+
+ if use java; then
+ NQP=$(java-pkg_getjars --with-dependencies nqp)
+ fi
+}
+
+src_compile() {
+ emake NQP_JARS="${NQP}" BLD_NQP_JARS="${NQP}"
+}
+
+src_install() {
+ emake DESTDIR="${D}" NQP_JARS="${NQP}" BLD_NQP_JARS="${NQP}" install
+}
+
+src_test() {
+ RAKUDO_PRECOMP_PREFIX=$(mktemp -d) default
+}
diff --git a/dev-libs/elfutils/elfutils-0.196.ebuild b/dev-libs/elfutils/elfutils-0.196.ebuild
index f690f5b79066..6f43af1f01f9 100644
--- a/dev-libs/elfutils/elfutils-0.196.ebuild
+++ b/dev-libs/elfutils/elfutils-0.196.ebuild
@@ -120,7 +120,7 @@ multilib_src_configure() {
unset LEX YACC
export ac_cv_header_perfmon_pfmlib_perf_event_h=$(multilib_native_usex libpfm)
- export ac_cv_lib_pfm_pfm_get_os_event_encoding=yes=$(multilib_native_usex libpfm)
+ export ac_cv_lib_pfm_pfm_get_os_event_encoding=$(multilib_native_usex libpfm)
# Only for IMA verification of RPMs
export ac_cv_lib_rpm_headerGet=no
diff --git a/dev-libs/elfutils/elfutils-9999.ebuild b/dev-libs/elfutils/elfutils-9999.ebuild
index f690f5b79066..6f43af1f01f9 100644
--- a/dev-libs/elfutils/elfutils-9999.ebuild
+++ b/dev-libs/elfutils/elfutils-9999.ebuild
@@ -120,7 +120,7 @@ multilib_src_configure() {
unset LEX YACC
export ac_cv_header_perfmon_pfmlib_perf_event_h=$(multilib_native_usex libpfm)
- export ac_cv_lib_pfm_pfm_get_os_event_encoding=yes=$(multilib_native_usex libpfm)
+ export ac_cv_lib_pfm_pfm_get_os_event_encoding=$(multilib_native_usex libpfm)
# Only for IMA verification of RPMs
export ac_cv_lib_rpm_headerGet=no
diff --git a/dev-libs/expat/Manifest b/dev-libs/expat/Manifest
index 247bd962e78e..fda67c20b274 100644
--- a/dev-libs/expat/Manifest
+++ b/dev-libs/expat/Manifest
@@ -1,2 +1 @@
-DIST expat-2.8.3.tar.xz 517264 BLAKE2B 4dc1173f3458320278b6776aa9342aec4eec3e2e5d8806e52dec59b9a40d5fdad5b8930708bace06a5c9a33fd7451df67c5c822954fa3d7f763babab62989390 SHA512 f6f08f9e4591077c9ed625ea6108d58f2541c3a35bc55e09a8654868c407b82ffaed65e1a437b08ea34783f72f6e453d53647f5b89c8ac59a0bf14902335dad1
DIST expat-2.8.4.tar.xz 519688 BLAKE2B bec06d3c3179115692edb5e9366412361abae5355b131a005ef91aaa041bf4ebf74a86cc2fac29c44730a07cba6fbda988a6bfdafafc9eeba25a00fb98e43d24 SHA512 00a34340b4fdc3baee6dbd83df3e41710ebffb38dc23664406be187a73f1e948451568fea07b6f33532b6b6244650808ce157255bcf6216d98267535cc97f3cd
diff --git a/dev-libs/expat/expat-2.8.3.ebuild b/dev-libs/expat/expat-2.8.3.ebuild
deleted file mode 100644
index 3526fc8e1260..000000000000
--- a/dev-libs/expat/expat-2.8.3.ebuild
+++ /dev/null
@@ -1,101 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-AUTOTOOLS_AUTO_DEPEND=no
-inherit autotools multilib-minimal
-
-DESCRIPTION="Stream-oriented XML parser library"
-HOMEPAGE="https://libexpat.github.io/"
-SRC_URI="https://github.com/libexpat/libexpat/releases/download/R_${PV//\./_}/expat-${PV}.tar.xz"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~arm64-macos ~x64-macos ~x64-solaris"
-IUSE="examples static-libs test unicode"
-RESTRICT="!test? ( test )"
-BDEPEND="unicode? ( ${AUTOTOOLS_DEPEND} )"
-
-DOCS=( README.md )
-
-QA_CONFIG_IMPL_DECL_SKIP=(
- # https://bugs.gentoo.org/906384
- arc4random
- arc4random_buf
-)
-
-src_prepare() {
- default
-
- # fix interpreter to be a recent/good shell
- sed -i -e "1s:/bin/sh:${BASH}:" conftools/get-version.sh || die
- if use unicode; then
- cp -R "${S}" "${S}"w || die
- pushd "${S}"w >/dev/null
- find -name Makefile.am \
- -exec sed \
- -e 's,libexpat\.la,libexpatw.la,' \
- -e 's,libexpat_la,libexpatw_la,' \
- -i {} + || die
- eautoreconf
- popd >/dev/null
- fi
-}
-
-multilib_src_configure() {
- local myconf="$(use_with test tests) $(use_enable static-libs static) --without-docbook"
-
- mkdir -p "${BUILD_DIR}"w || die
-
- if use unicode; then
- pushd "${BUILD_DIR}"w >/dev/null
- CPPFLAGS="${CPPFLAGS} -DXML_UNICODE" ECONF_SOURCE="${S}"w econf ${myconf}
- popd >/dev/null
- fi
-
- ECONF_SOURCE="${S}" econf ${myconf}
-}
-
-multilib_src_compile() {
- emake
-
- if use unicode; then
- pushd "${BUILD_DIR}"w >/dev/null
- emake -C lib
- popd >/dev/null
- fi
-}
-
-multilib_src_install() {
- emake install DESTDIR="${D}"
-
- if use unicode; then
- pushd "${BUILD_DIR}"w >/dev/null
- emake -C lib install DESTDIR="${D}"
- popd >/dev/null
-
- pushd "${ED}"/usr/$(get_libdir)/pkgconfig >/dev/null
- cp expat.pc expatw.pc
- sed -i -e '/^Libs/s:-lexpat:&w:' expatw.pc || die
- popd >/dev/null
- fi
-}
-
-multilib_src_install_all() {
- einstalldocs
-
- doman doc/xmlwf.1
-
- # Note: Use of HTML_DOCS would add unwanted "doc" subfolder
- docinto html
- dodoc doc/*.{css,html}
-
- if use examples; then
- docinto examples
- dodoc examples/*.c
- docompress -x usr/share/doc/${PF}/examples
- fi
-
- find "${D}" -name '*.la' -type f -delete || die
-}
diff --git a/dev-libs/s2n-tls/s2n-tls-1.7.10.ebuild b/dev-libs/s2n-tls/s2n-tls-1.7.10.ebuild
index 458ef1a11418..ac95b104eb4f 100644
--- a/dev-libs/s2n-tls/s2n-tls-1.7.10.ebuild
+++ b/dev-libs/s2n-tls/s2n-tls-1.7.10.ebuild
@@ -11,7 +11,7 @@ SRC_URI="https://github.com/aws/s2n-tls/archive/refs/tags/v${PV}.tar.gz -> ${P}.
LICENSE="Apache-2.0"
SLOT="$(ver_cut 1)"
-KEYWORDS="~amd64 ~arm64 ~ppc ~ppc64 ~riscv ~x86"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86"
IUSE="test"
RESTRICT="!test? ( test )"
diff --git a/dev-libs/tree-sitter-cmake/tree-sitter-cmake-0.7.4.ebuild b/dev-libs/tree-sitter-cmake/tree-sitter-cmake-0.7.4.ebuild
index 4ce97da91cd0..a22c15b481f5 100644
--- a/dev-libs/tree-sitter-cmake/tree-sitter-cmake-0.7.4.ebuild
+++ b/dev-libs/tree-sitter-cmake/tree-sitter-cmake-0.7.4.ebuild
@@ -13,4 +13,4 @@ SRC_URI="https://github.com/uyha/tree-sitter-cmake/archive/v${PV}.tar.gz -> ${P}
LICENSE="MIT"
SLOT="0"
-KEYWORDS="~amd64 ~riscv"
+KEYWORDS="amd64 ~riscv"
diff --git a/dev-libs/tree-sitter-markdown-inline/tree-sitter-markdown-inline-0.5.3.ebuild b/dev-libs/tree-sitter-markdown-inline/tree-sitter-markdown-inline-0.5.3.ebuild
index 91918453c132..c7e52a7c60e8 100644
--- a/dev-libs/tree-sitter-markdown-inline/tree-sitter-markdown-inline-0.5.3.ebuild
+++ b/dev-libs/tree-sitter-markdown-inline/tree-sitter-markdown-inline-0.5.3.ebuild
@@ -17,7 +17,7 @@ S="${WORKDIR}"/${MY_P}/${MY_PN}-inline
LICENSE="MIT"
SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86"
+KEYWORDS="amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86"
# Running the tests requires extensions to be enabled, but the parser
# generated by upstream does not include the extensions.
diff --git a/dev-libs/tree-sitter-ocaml/tree-sitter-ocaml-0.25.0.ebuild b/dev-libs/tree-sitter-ocaml/tree-sitter-ocaml-0.25.0.ebuild
index 600b698e666c..ea03c9e35a4f 100644
--- a/dev-libs/tree-sitter-ocaml/tree-sitter-ocaml-0.25.0.ebuild
+++ b/dev-libs/tree-sitter-ocaml/tree-sitter-ocaml-0.25.0.ebuild
@@ -11,4 +11,4 @@ S=${WORKDIR}/${P}/grammars/ocaml
LICENSE="MIT"
SLOT="0"
-KEYWORDS="~amd64"
+KEYWORDS="amd64"
diff --git a/dev-libs/tree-sitter-scala/tree-sitter-scala-0.26.2.ebuild b/dev-libs/tree-sitter-scala/tree-sitter-scala-0.26.2.ebuild
index ff2f630c3d35..ac9385591b1e 100644
--- a/dev-libs/tree-sitter-scala/tree-sitter-scala-0.26.2.ebuild
+++ b/dev-libs/tree-sitter-scala/tree-sitter-scala-0.26.2.ebuild
@@ -10,4 +10,4 @@ HOMEPAGE="https://github.com/tree-sitter/tree-sitter-scala"
LICENSE="MIT"
SLOT="0"
-KEYWORDS="~amd64"
+KEYWORDS="amd64"
diff --git a/dev-libs/tree-sitter/Manifest b/dev-libs/tree-sitter/Manifest
index 6902dbc7f84d..2f74bc797aef 100644
--- a/dev-libs/tree-sitter/Manifest
+++ b/dev-libs/tree-sitter/Manifest
@@ -1,13 +1,5 @@
DIST tree-sitter-0.24.3.tar.gz 3018668 BLAKE2B fa703b6250e11274d0c5ebccb741cc41f521cc5e882383d8f891369540ce6b3b4b048eddb4d0c88186e57516e2d01977e76b42352f26759b3f6093a339cc6a11 SHA512 2d934c03b0ee71419654d03bf6e4ca759b4ef3217b8837fcaef64ee5b4bc8ea8298ff685ae4aaa477b615d11d538ff960b92529b11f13e936b85bad52e369cd3
DIST tree-sitter-0.25.10.tar.gz 864648 BLAKE2B ae80d0e995cc5e3b40198caa3a7845f209f7df87948020d6b0a6669899bbeb113d852e2197cdaf1fe54944cdc8362cb73487af33960969fac087f45d33025c48 SHA512 f0465a2fabe303c1b62f1f55ed08aa57372ac11370d229adcccd99b5e8067be53e92da281cdfbcd034e2ecefb33ac90a119eeac9035670ac8fbaa4242cb87a11
-DIST tree-sitter-0.25.6.tar.gz 857070 BLAKE2B 3bb6b6130e1a96c96b5af4608bf60f8bbd00cbf1fdc9905b7a6169db52351c2ae3a907eca444363ab2b3185a54d0080aa487cbe252e6e015c1cd7a735e420679 SHA512 47213b68233d376e145e3f42b4674d64e7ff27436f4a028e751d9ad8494469ff67b002ce184346d3f6848df2c91386c28127827c43a8bea34da5e84f2530f02f
-DIST tree-sitter-0.25.8.tar.gz 857462 BLAKE2B aa3f0d9056544bb6ef1127723563449c7672e06b5289e1596f2c1b5826905c578830c7e6c3bc58a91e388d647a5a5629e71f5f0af2a431e73c3be4f93ce5b6f4 SHA512 0d26d0699f61fa27b5adbc298ff53f8e0f5b9f2f1b216744200f6f50cff777c9c5a5a5b92304a4d1889fccd9d8a6dd6b7d4947bac907a91850322281f754ea53
-DIST tree-sitter-0.26.11.tar.gz 920828 BLAKE2B 6406aa003bbd4cdff00a16a20dffe24f8a3081fd0a190216b6ad5aad0393449814c7b2830017ad265ddc67ab57f4494a4fe2409f72a4cf786ce4c291795a9cd0 SHA512 2175f7d1f913fffaba7395baa7b0a3228172bdc25169d22cf3e39fa3841df1a9902031e248e417328f8ea3e48e7042d34bf85a36c8545a79ca5f7321c6b9d848
DIST tree-sitter-0.26.12.tar.gz 923279 BLAKE2B 18cfd313f07272e4d7254da3ba61b9cc9e590ffa182e5d4a26ba858b3f8b286615d311ad00a9bf75ec4fea6abeefacb07539c2e4acb8cfaddbb49ae4276c523a SHA512 d0e5596b9445bf94177927f5ca6053f473bced8eee9d27f878677c37ad4e1f13d8898220c7156743b57f6c9591840c9c1accb9e1f6f54a6ac302a6875c48466b
DIST tree-sitter-0.26.13.tar.gz 929207 BLAKE2B 3f2350daf8c9378990c9bad6a65beb53665357e3183c059cf7424a4b00d3c70a7e587c1eb29f70902eeaf03b4943e1dbfd20217e0487f49e6294a55d30f456a5 SHA512 3278ae1f65bc2cf4861f9fec1082089c155a59cc6fb96940cc56630518338327f9069ca144157e4e4d810fd437c45d46db8ce4974c66ffc63672b105b1e6aa72
-DIST tree-sitter-0.26.3.tar.gz 900789 BLAKE2B 8532bd460f3fd4e1cec9daecc45fcc85638e5ebde474fc32ccbb9ba77611cf8aff41653295b9b1c267aac62f8e2cf23345193271cc64c975895dd04a3d988c11 SHA512 ae2b59938ce41f6936d98e454adfc05a3890b2b3d24485b0d992e6f1d2dd1e8d9124e6a3eddc3d594f0cdb831362ff2c9b44b72364b22d3526150d23a9d15781
-DIST tree-sitter-0.26.5.tar.gz 905701 BLAKE2B 3771c0b31704f6182ae10c2629566984883a9bfcfc914e40a3d30889eb3ef30f19213a45e9732b067042893dd89e27b51b8f5fa50f2d7d8cec81aeb8666ebece SHA512 c8ffa86caf5841208dd2c987c6437111c7514635ebc76e910deb38ba64252caa99ae8453f1acd8af8e167cc2c7fe7194d481cd53533802601b331c60d20f2a49
-DIST tree-sitter-0.26.6.tar.gz 906770 BLAKE2B c6fcbc901f86795d6e5de5e22d4b7f34425f1f25ff9134de27baa0a68d917c376accd4a7a9d33faaee4e82e4dd7440085a06b55d5f57e5fe9756c195147867d5 SHA512 33ce5617ac53e276cccc8fa34e3a6b3e29a5bd572b381da4a7d6d78cbb7485d85120be8c0e25e02d3fbae4c36793b02bcfd788a2cdfe73f026742b184e16d572
-DIST tree-sitter-0.26.7.tar.gz 907267 BLAKE2B 7e734913ab81e700192c8d829b136300d5507da2f0cd1e3b059df81202fcd8da76884e605bda48a13d4f4317f335d1cb2cdb1aa60fbcfcce021280106512e3ff SHA512 0060809339744be4b3b24bae8115d2793dc113618ab1a79c347456f5b8341b15d2026e7b62d2e4e3c5226c8bf85a089221133457a80bfdd0413cd82bf7c4a172
-DIST tree-sitter-0.26.8.tar.gz 908286 BLAKE2B 92da23e47a25b618cf1645204455377f0cc16f5070f59356b53b088e41a0e7175f79ba3ee582388c462a188d2084b47ab21f40b0ae8ec4872c4098a2c8b4f6f3 SHA512 a5786e8235bceec2b4e8ed5ba035f143a3eabb587d33fa5d97c5e9e7a16c52b57dda72201b56c737ce3819b2d7cf53bef8852944d7a6a6ff85ea24a84fcb0042
DIST tree-sitter-0.27.0.tar.gz 1020259 BLAKE2B 854ce5ad52d4de0d0b48187ade680f7e599bc9612e31058820fa2b79c6cd1d93e149bd2cfbef81809fa119c7e158715f707ebd1aaddc305ea4ed8bed35a4ee98 SHA512 80b29a718fa58909c57537e2ecf8e4df52384bf86ef60c15671f87d10292dfb4a2115243a505e809f02d6370f4ba0e74da0993bbc201d58593abf4819d1373ce
diff --git a/dev-libs/tree-sitter/tree-sitter-0.25.6.ebuild b/dev-libs/tree-sitter/tree-sitter-0.25.6.ebuild
deleted file mode 100644
index 20863acffab5..000000000000
--- a/dev-libs/tree-sitter/tree-sitter-0.25.6.ebuild
+++ /dev/null
@@ -1,50 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-inherit optfeature toolchain-funcs
-
-DESCRIPTION="Tree-sitter is a parser generator tool and an incremental parsing library"
-HOMEPAGE="https://github.com/tree-sitter/tree-sitter"
-
-if [[ ${PV} == *9999* ]]; then
- inherit git-r3
- EGIT_REPO_URI="https://github.com/${PN}/${PN}"
-else
- SRC_URI="https://github.com/${PN}/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
- KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~x64-macos"
-fi
-
-LICENSE="MIT"
-# ABI is not stable. Revisit after tree-sitter-1.0.
-# https://bugs.gentoo.org/930039
-# https://github.com/tree-sitter/tree-sitter/pull/3302
-SLOT="0/${PV}"
-RESTRICT="test" # tests are for CLI and not the lib
-
-PATCHES=(
- "${FILESDIR}/${PN}-0.22.2-no-static.patch"
-)
-
-src_prepare() {
- default
- tc-export CC
-}
-
-src_compile() {
- emake \
- PREFIX="${EPREFIX}/usr" \
- LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
- STRIP="" # bug 930020
-}
-
-src_install() {
- emake DESTDIR="${D}" \
- PREFIX="${EPREFIX}/usr" \
- LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
- install
-}
-
-pkg_postinst() {
- optfeature "building and testing grammars" dev-util/tree-sitter-cli
-}
diff --git a/dev-libs/tree-sitter/tree-sitter-0.25.8.ebuild b/dev-libs/tree-sitter/tree-sitter-0.25.8.ebuild
deleted file mode 100644
index 20863acffab5..000000000000
--- a/dev-libs/tree-sitter/tree-sitter-0.25.8.ebuild
+++ /dev/null
@@ -1,50 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-inherit optfeature toolchain-funcs
-
-DESCRIPTION="Tree-sitter is a parser generator tool and an incremental parsing library"
-HOMEPAGE="https://github.com/tree-sitter/tree-sitter"
-
-if [[ ${PV} == *9999* ]]; then
- inherit git-r3
- EGIT_REPO_URI="https://github.com/${PN}/${PN}"
-else
- SRC_URI="https://github.com/${PN}/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
- KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~x64-macos"
-fi
-
-LICENSE="MIT"
-# ABI is not stable. Revisit after tree-sitter-1.0.
-# https://bugs.gentoo.org/930039
-# https://github.com/tree-sitter/tree-sitter/pull/3302
-SLOT="0/${PV}"
-RESTRICT="test" # tests are for CLI and not the lib
-
-PATCHES=(
- "${FILESDIR}/${PN}-0.22.2-no-static.patch"
-)
-
-src_prepare() {
- default
- tc-export CC
-}
-
-src_compile() {
- emake \
- PREFIX="${EPREFIX}/usr" \
- LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
- STRIP="" # bug 930020
-}
-
-src_install() {
- emake DESTDIR="${D}" \
- PREFIX="${EPREFIX}/usr" \
- LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
- install
-}
-
-pkg_postinst() {
- optfeature "building and testing grammars" dev-util/tree-sitter-cli
-}
diff --git a/dev-libs/tree-sitter/tree-sitter-0.26.11.ebuild b/dev-libs/tree-sitter/tree-sitter-0.26.11.ebuild
deleted file mode 100644
index dd1667f5a0d1..000000000000
--- a/dev-libs/tree-sitter/tree-sitter-0.26.11.ebuild
+++ /dev/null
@@ -1,28 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit cmake optfeature
-
-DESCRIPTION="Tree-sitter is a parser generator tool and an incremental parsing library"
-HOMEPAGE="https://tree-sitter.github.io/"
-
-if [[ ${PV} == *9999* ]]; then
- inherit git-r3
- EGIT_REPO_URI="https://github.com/${PN}/${PN}"
-else
- SRC_URI="https://github.com/${PN}/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
- KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~x64-macos"
-fi
-
-LICENSE="MIT"
-# ABI is not stable. Revisit after tree-sitter-1.0.
-# https://bugs.gentoo.org/930039
-# https://github.com/tree-sitter/tree-sitter/pull/3302
-SLOT="0/${PV}"
-RESTRICT="test" # tests are for CLI and not the lib
-
-pkg_postinst() {
- optfeature "building and testing grammars" dev-util/tree-sitter-cli
-}
diff --git a/dev-libs/tree-sitter/tree-sitter-0.26.3.ebuild b/dev-libs/tree-sitter/tree-sitter-0.26.3.ebuild
deleted file mode 100644
index 9c308e761694..000000000000
--- a/dev-libs/tree-sitter/tree-sitter-0.26.3.ebuild
+++ /dev/null
@@ -1,50 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-inherit optfeature toolchain-funcs
-
-DESCRIPTION="Tree-sitter is a parser generator tool and an incremental parsing library"
-HOMEPAGE="https://github.com/tree-sitter/tree-sitter"
-
-if [[ ${PV} == *9999* ]]; then
- inherit git-r3
- EGIT_REPO_URI="https://github.com/${PN}/${PN}"
-else
- SRC_URI="https://github.com/${PN}/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-macos"
-fi
-
-LICENSE="MIT"
-# ABI is not stable. Revisit after tree-sitter-1.0.
-# https://bugs.gentoo.org/930039
-# https://github.com/tree-sitter/tree-sitter/pull/3302
-SLOT="0/${PV}"
-RESTRICT="test" # tests are for CLI and not the lib
-
-PATCHES=(
- "${FILESDIR}/${PN}-0.26.3-no-static.patch"
-)
-
-src_prepare() {
- default
- tc-export CC
-}
-
-src_compile() {
- emake \
- PREFIX="${EPREFIX}/usr" \
- LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
- STRIP="" # bug 930020
-}
-
-src_install() {
- emake DESTDIR="${D}" \
- PREFIX="${EPREFIX}/usr" \
- LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
- install
-}
-
-pkg_postinst() {
- optfeature "building and testing grammars" dev-util/tree-sitter-cli
-}
diff --git a/dev-libs/tree-sitter/tree-sitter-0.26.5.ebuild b/dev-libs/tree-sitter/tree-sitter-0.26.5.ebuild
deleted file mode 100644
index 9c308e761694..000000000000
--- a/dev-libs/tree-sitter/tree-sitter-0.26.5.ebuild
+++ /dev/null
@@ -1,50 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-inherit optfeature toolchain-funcs
-
-DESCRIPTION="Tree-sitter is a parser generator tool and an incremental parsing library"
-HOMEPAGE="https://github.com/tree-sitter/tree-sitter"
-
-if [[ ${PV} == *9999* ]]; then
- inherit git-r3
- EGIT_REPO_URI="https://github.com/${PN}/${PN}"
-else
- SRC_URI="https://github.com/${PN}/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-macos"
-fi
-
-LICENSE="MIT"
-# ABI is not stable. Revisit after tree-sitter-1.0.
-# https://bugs.gentoo.org/930039
-# https://github.com/tree-sitter/tree-sitter/pull/3302
-SLOT="0/${PV}"
-RESTRICT="test" # tests are for CLI and not the lib
-
-PATCHES=(
- "${FILESDIR}/${PN}-0.26.3-no-static.patch"
-)
-
-src_prepare() {
- default
- tc-export CC
-}
-
-src_compile() {
- emake \
- PREFIX="${EPREFIX}/usr" \
- LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
- STRIP="" # bug 930020
-}
-
-src_install() {
- emake DESTDIR="${D}" \
- PREFIX="${EPREFIX}/usr" \
- LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
- install
-}
-
-pkg_postinst() {
- optfeature "building and testing grammars" dev-util/tree-sitter-cli
-}
diff --git a/dev-libs/tree-sitter/tree-sitter-0.26.6.ebuild b/dev-libs/tree-sitter/tree-sitter-0.26.6.ebuild
deleted file mode 100644
index 693cc691286d..000000000000
--- a/dev-libs/tree-sitter/tree-sitter-0.26.6.ebuild
+++ /dev/null
@@ -1,28 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit cmake optfeature
-
-DESCRIPTION="Tree-sitter is a parser generator tool and an incremental parsing library"
-HOMEPAGE="https://github.com/tree-sitter/tree-sitter"
-
-if [[ ${PV} == *9999* ]]; then
- inherit git-r3
- EGIT_REPO_URI="https://github.com/${PN}/${PN}"
-else
- SRC_URI="https://github.com/${PN}/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-macos"
-fi
-
-LICENSE="MIT"
-# ABI is not stable. Revisit after tree-sitter-1.0.
-# https://bugs.gentoo.org/930039
-# https://github.com/tree-sitter/tree-sitter/pull/3302
-SLOT="0/${PV}"
-RESTRICT="test" # tests are for CLI and not the lib
-
-pkg_postinst() {
- optfeature "building and testing grammars" dev-util/tree-sitter-cli
-}
diff --git a/dev-libs/tree-sitter/tree-sitter-0.26.7.ebuild b/dev-libs/tree-sitter/tree-sitter-0.26.7.ebuild
deleted file mode 100644
index 693cc691286d..000000000000
--- a/dev-libs/tree-sitter/tree-sitter-0.26.7.ebuild
+++ /dev/null
@@ -1,28 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit cmake optfeature
-
-DESCRIPTION="Tree-sitter is a parser generator tool and an incremental parsing library"
-HOMEPAGE="https://github.com/tree-sitter/tree-sitter"
-
-if [[ ${PV} == *9999* ]]; then
- inherit git-r3
- EGIT_REPO_URI="https://github.com/${PN}/${PN}"
-else
- SRC_URI="https://github.com/${PN}/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-macos"
-fi
-
-LICENSE="MIT"
-# ABI is not stable. Revisit after tree-sitter-1.0.
-# https://bugs.gentoo.org/930039
-# https://github.com/tree-sitter/tree-sitter/pull/3302
-SLOT="0/${PV}"
-RESTRICT="test" # tests are for CLI and not the lib
-
-pkg_postinst() {
- optfeature "building and testing grammars" dev-util/tree-sitter-cli
-}
diff --git a/dev-libs/tree-sitter/tree-sitter-0.26.8.ebuild b/dev-libs/tree-sitter/tree-sitter-0.26.8.ebuild
deleted file mode 100644
index dd1667f5a0d1..000000000000
--- a/dev-libs/tree-sitter/tree-sitter-0.26.8.ebuild
+++ /dev/null
@@ -1,28 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit cmake optfeature
-
-DESCRIPTION="Tree-sitter is a parser generator tool and an incremental parsing library"
-HOMEPAGE="https://tree-sitter.github.io/"
-
-if [[ ${PV} == *9999* ]]; then
- inherit git-r3
- EGIT_REPO_URI="https://github.com/${PN}/${PN}"
-else
- SRC_URI="https://github.com/${PN}/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
- KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~x64-macos"
-fi
-
-LICENSE="MIT"
-# ABI is not stable. Revisit after tree-sitter-1.0.
-# https://bugs.gentoo.org/930039
-# https://github.com/tree-sitter/tree-sitter/pull/3302
-SLOT="0/${PV}"
-RESTRICT="test" # tests are for CLI and not the lib
-
-pkg_postinst() {
- optfeature "building and testing grammars" dev-util/tree-sitter-cli
-}
diff --git a/dev-lisp/sbcl/sbcl-2.6.7.ebuild b/dev-lisp/sbcl/sbcl-2.6.7.ebuild
index be6463640d27..4582564b5acc 100644
--- a/dev-lisp/sbcl/sbcl-2.6.7.ebuild
+++ b/dev-lisp/sbcl/sbcl-2.6.7.ebuild
@@ -37,7 +37,7 @@ SRC_URI="https://downloads.sourceforge.net/sbcl/${P}-source.tar.bz2
LICENSE="MIT"
SLOT="0/${PV}"
-KEYWORDS="-* amd64 ~ppc ppc64 ~riscv ~sparc ~x86 ~x64-macos"
+KEYWORDS="-* amd64 ppc ppc64 ~riscv ~sparc ~x86 ~x64-macos"
IUSE="system-bootstrap debug doc source +threads +unicode +zstd"
CDEPEND=">=dev-lisp/asdf-3.3:= \
diff --git a/dev-python/blockbuster/Manifest b/dev-python/blockbuster/Manifest
index 18d9e5c5a8ba..e79c59205bb0 100644
--- a/dev-python/blockbuster/Manifest
+++ b/dev-python/blockbuster/Manifest
@@ -1,2 +1,3 @@
DIST blockbuster-1.5.26.tar.gz 36085 BLAKE2B 856a57dae55251771cd3340b1b6cad84fa168d7ca63630401fbbd8acf27b99d77759e3161b77f94abf7085035ef9303bf7b693561fad4cf8796009a2297bee5d SHA512 d12263e81c2acc97a537b3067632a6fc41af214125bd4c4c16f12079531fe4d6addc48091942fa5311dec6024113492ee585a185127c0cf69abfde4e3c1a8ce0
DIST blockbuster-1.5.27.tar.gz 96732 BLAKE2B 70aa3b65a1ca31fd0acecd9d2973b07af968ca5dee27deaf6d6c975790d11f0b0f15ed5c83a3afb3d706703de082222619fef86f9e56af78b94cf985e8623c8a SHA512 6344bbca0c9a926fa7e5b80d0a48689144a71dce6dfb0f8c5f4b263431abab10e01705cc93bfc93d6e3f55e37203e50019b50a1088e5b5b774729a640e23e53f
+DIST blockbuster-1.5.28.tar.gz 98235 BLAKE2B f7307610dc2991a5d276070c26a2be03e06b6bb2ac717623a2131f187f10d6fbdf934d8cc115f8077a8d5e1b34e93236598929219f2786694c77562176ec8665 SHA512 f21b9e9f939acff62cadc859ad2ba9c854c23df7f4da72fdf6a17e0a929796a94431437eb00a688091367b85edbd70c3360a57629db42c209cf616e1406638e7
diff --git a/dev-python/blockbuster/blockbuster-1.5.28.ebuild b/dev-python/blockbuster/blockbuster-1.5.28.ebuild
new file mode 100644
index 000000000000..b20940e8ee85
--- /dev/null
+++ b/dev-python/blockbuster/blockbuster-1.5.28.ebuild
@@ -0,0 +1,40 @@
+# Copyright 2025-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=hatchling
+PYTHON_COMPAT=( python3_{13..14} )
+
+inherit distutils-r1 pypi
+
+DESCRIPTION="Utility to detect blocking calls in the async event loop"
+HOMEPAGE="
+ https://github.com/cbornet/blockbuster/
+ https://pypi.org/project/blockbuster/
+"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+
+RDEPEND="
+ >=dev-python/forbiddenfruit-0.1.4[${PYTHON_USEDEP}]
+"
+BDEPEND="
+ test? (
+ dev-python/aiofiles[${PYTHON_USEDEP}]
+ dev-python/requests[${PYTHON_USEDEP}]
+ )
+"
+
+EPYTEST_PLUGINS=( pytest-asyncio )
+distutils_enable_tests pytest
+
+EPYTEST_IGNORE=(
+ benchmarks/
+)
+EPYTEST_DESELECT=(
+ # Internet
+ tests/test_blockbuster.py::test_ssl_socket
+)
diff --git a/dev-python/forbiddenfruit/forbiddenfruit-0.1.4.ebuild b/dev-python/forbiddenfruit/forbiddenfruit-0.1.4.ebuild
deleted file mode 100644
index 3cefd61682c4..000000000000
--- a/dev-python/forbiddenfruit/forbiddenfruit-0.1.4.ebuild
+++ /dev/null
@@ -1,52 +0,0 @@
-# Copyright 2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-DISTUTILS_USE_PEP517=setuptools
-PYTHON_TESTED=( python3_{13..14} )
-# tests crash on 3.13+
-# https://github.com/clarete/forbiddenfruit/issues/78
-PYTHON_COMPAT=( python3_{13..14} )
-
-inherit distutils-r1 pypi
-
-DESCRIPTION="Patch built-in Python objects"
-HOMEPAGE="
- https://github.com/clarete/forbiddenfruit/
- https://pypi.org/project/forbiddenfruit/
-"
-
-LICENSE="|| ( GPL-3 MIT )"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"
-IUSE="test"
-RESTRICT="!test? ( test )"
-
-BDEPEND="
- test? (
- $(python_gen_cond_dep '
- dev-python/pytest[${PYTHON_USEDEP}]
- ' "${PYTHON_TESTED[@]}")
- )
-"
-
-PATCHES=(
- # https://github.com/clarete/forbiddenfruit/pull/79
- # + test case fix from
- # https://github.com/clarete/forbiddenfruit/commit/6eb07cb77bcd3d54c7f09f23f176706d7dfccdef
- "${FILESDIR}/${P}-pytest.patch"
-)
-
-python_test() {
- if ! has "${EPYTHON/./_}" "${PYTHON_TESTED[@]}"; then
- einfo "Skipping tests on ${EPYTHON}, as they are broken"
- return
- fi
-
- local -x FFRUIT_EXTENSION=true
- esetup.py build_ext -b tests/unit
-
- local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
- epytest
-}
diff --git a/dev-python/hatch-jupyter-builder/Manifest b/dev-python/hatch-jupyter-builder/Manifest
index 2f96d02f6119..7cc5b4d411c4 100644
--- a/dev-python/hatch-jupyter-builder/Manifest
+++ b/dev-python/hatch-jupyter-builder/Manifest
@@ -1 +1,2 @@
+DIST hatch_jupyter_builder-0.10.0.tar.gz 56316 BLAKE2B e6e884236fbcbd448c610dc2f67b3c6911044fba4b86ac88bf331b607671f07b8b962bea97b46340d531a879502dba7723ea4f4d749809ada60a41068396ee1a SHA512 9f5021cc788603cca23b615159f6ec819f59694659d17a416689a10534e66cd9804f02cf310adc03a277fa4a8a3d1c8d43119b2c7b2fd41224b94ebe949cb121
DIST hatch_jupyter_builder-0.9.1.tar.gz 55953 BLAKE2B 3239511a86465cb7a199b4e3cd3fa85d9d5501f564f666f296b6358eb766af13635abb47a2354e31788e6c78c5a74174f9844432264da1a9c2f544ac2d7a9ff0 SHA512 705b4e9c1d73f81f7a6962070d9893c32ce61ee49d658ac053f508125b21e425a21732cd9ea8d1e9e1f8c62c2a14c0e7507418c8f2a4f77a5951ee03bbed171d
diff --git a/dev-python/hatch-jupyter-builder/hatch-jupyter-builder-0.10.0.ebuild b/dev-python/hatch-jupyter-builder/hatch-jupyter-builder-0.10.0.ebuild
new file mode 100644
index 000000000000..524722cd68b8
--- /dev/null
+++ b/dev-python/hatch-jupyter-builder/hatch-jupyter-builder-0.10.0.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=hatchling
+PYTHON_COMPAT=( python3_{13..14} )
+
+inherit distutils-r1 pypi
+
+DESCRIPTION="A hatch plugin to help build Jupyter packages"
+HOMEPAGE="
+ https://pypi.org/project/hatch-jupyter-builder/
+ https://github.com/jupyterlab/hatch-jupyter-builder
+"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+
+RDEPEND="
+ >=dev-python/hatchling-1.17[${PYTHON_USEDEP}]
+"
+
+BDEPEND="
+ test? (
+ dev-python/twine[${PYTHON_USEDEP}]
+ )
+"
+
+EPYTEST_DESELECT=(
+ # Calls pip, requires internet
+ tests/test_plugin.py::test_hatch_build
+)
+
+EPYTEST_PLUGINS=( pytest-mock )
+distutils_enable_tests pytest
diff --git a/dev-python/imapclient/Manifest b/dev-python/imapclient/Manifest
index 701389703906..7d5d8ed3c44d 100644
--- a/dev-python/imapclient/Manifest
+++ b/dev-python/imapclient/Manifest
@@ -1,2 +1,3 @@
DIST imapclient-3.1.0.gh.tar.gz 93612 BLAKE2B a8c929affe8572f65bb6dafefc48ba064f1bb12230da7ada9d7af338ecc3834a6216509c59aeccad7faf47dd167dfc0b383b81988091b6578580a2fa8e3d5b15 SHA512 39e065a1a7df22ce80dfed47ab41e9702d3da4976f23f630e4c7b084c33b0007a24f9120b217478e6cebaa7f482921f2d1284bf3740597efe6db97b709ee6dd8
DIST imapclient-4.0.1.gh.tar.gz 161264 BLAKE2B f177a0b59fcd5eb3f133d4c80dffbd1fed1c0a01973ca3a435c4b5484e7d5f8d00c2def3d2684cc6621b3512d31d481a221e6d8ae723363b37cc82e034f07710 SHA512 8fa536bd7ccb9bd0ea06694bad5ac01fdd27a6c01f0848b004e3cca8f8f94a0ff017f1ddd163dcc8a3e23ce509f96a01b3cf24a3cf9950b70b5f66876b122e2c
+DIST imapclient-4.1.0.gh.tar.gz 166198 BLAKE2B f3497880c3b814aea88c1d16fc72e08aa6aad486ba95038c17112da5936205fa6d23da794865212ca88d8d02f6ff54710b38c37f7228173ee2fb7dc90044d894 SHA512 fd71811b1ec6fb30c9aacc29e0896c47dbffa359d78cbef9810800109ccfa612364dc4186b74a7b97925544fee31b4ecddaf8f27fbd0a8cb15c32b501710900c
diff --git a/dev-python/imapclient/imapclient-4.1.0.ebuild b/dev-python/imapclient/imapclient-4.1.0.ebuild
new file mode 100644
index 000000000000..81769ed2c35e
--- /dev/null
+++ b/dev-python/imapclient/imapclient-4.1.0.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{13..14} )
+
+inherit distutils-r1
+
+DESCRIPTION="easy-to-use, pythonic, and complete IMAP client library"
+HOMEPAGE="
+ https://github.com/mjs/imapclient/
+ https://pypi.org/project/IMAPClient/
+"
+SRC_URI="
+ https://github.com/mjs/imapclient/archive/${PV}.tar.gz
+ -> ${P}.gh.tar.gz
+"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~x86"
+IUSE="doc examples"
+
+distutils_enable_sphinx doc/src
+distutils_enable_tests unittest
+
+python_install_all() {
+ distutils-r1_python_install_all
+ use examples && dodoc -r examples
+}
diff --git a/dev-python/multidict/Manifest b/dev-python/multidict/Manifest
index d2677fbb79e0..aadecdbcf49a 100644
--- a/dev-python/multidict/Manifest
+++ b/dev-python/multidict/Manifest
@@ -1,2 +1,3 @@
DIST multidict-6.7.1.gh.tar.gz 120010 BLAKE2B db03d9be850b3d2b042ecaa5484fd692fdb47a626862b57e2b218beeba90ae7b12a5e204bd3fdf20a4a125abf1dffb88c52cfc449c0daa31cfed585a74782a3f SHA512 4009a310dac4732c48cc9654fbd55468dda5a6d18a05ef013ff90b030d3124459620d6d6ae4f85e88ef6cefa0b9bccea1b745f3acbfa0b351eb2c92cc8812b89
DIST multidict-6.8.0.gh.tar.gz 149210 BLAKE2B b8ef7da3fb565110418796c01258a71ba1ae2d8309868193ae6d73cf2c768f759578583c2d4436ca2127618e6a0f45815be259720f5a9f5d732c1968aff3df0b SHA512 1a978331fd0d7deabae84db7710258f5d7956197a2f1b97933fba523631077d732ab42f65e4f43477cc07e60ddd180807b73326ad660e2ba6fd8e9ba5b7f196b
+DIST multidict-6.9.0.gh.tar.gz 204284 BLAKE2B 797706fffd07a9486d354bf5c51e5e62df511517cf8b979148af2f3f55fc5fc400f800013f0c77a5ea1fc35ce6b24c69b95531d2ffecadecbe3376311a90e81f SHA512 b6d4a7ba2308c1726cde04213fdbd4b7528de2dcbcffe377660a72bed409d6c9321db99983f8ad717eeaa4ba2b1fcd16f5b0bbe038ed8e6b28c42fb971c2a7ff
diff --git a/dev-python/multidict/multidict-6.9.0.ebuild b/dev-python/multidict/multidict-6.9.0.ebuild
new file mode 100644
index 000000000000..de57559badd8
--- /dev/null
+++ b/dev-python/multidict/multidict-6.9.0.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_EXT=1
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{13..14} )
+
+inherit distutils-r1
+
+DESCRIPTION="multidict implementation"
+HOMEPAGE="
+ https://github.com/aio-libs/multidict/
+ https://pypi.org/project/multidict/
+"
+SRC_URI="
+ https://github.com/aio-libs/${PN}/archive/v${PV}.tar.gz
+ -> ${P}.gh.tar.gz
+"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-macos"
+IUSE="+native-extensions"
+
+BDEPEND="
+ test? (
+ dev-python/objgraph[${PYTHON_USEDEP}]
+ dev-python/psutil[${PYTHON_USEDEP}]
+ )
+"
+
+EPYTEST_PLUGINS=( hypothesis )
+distutils_enable_tests pytest
+
+python_prepare_all() {
+ # don't enable coverage or other pytest settings
+ sed -i -e '/cov/d' pytest.ini || die
+ # don't mangle CFLAGS
+ sed -i -e 's/^CFLAGS = .*/CFLAGS = []/' setup.py || die
+ distutils-r1_python_prepare_all
+}
+
+python_compile() {
+ if ! use native-extensions || [[ ${EPYTHON} == pypy3* ]]; then
+ local -x MULTIDICT_NO_EXTENSIONS=1
+ fi
+
+ distutils-r1_python_compile
+}
+
+python_test() {
+ local EPYTEST_IGNORE=(
+ tests/isolated
+ tests/test_multidict_benchmarks.py
+ tests/test_views_benchmarks.py
+ )
+
+ rm -rf multidict || die
+
+ local cext=--c-extensions
+ if ! use native-extensions || [[ ${EPYTHON} == pypy3* ]]; then
+ cext=--no-c-extensions
+ fi
+ epytest "${cext}"
+}
diff --git a/dev-python/pandas/Manifest b/dev-python/pandas/Manifest
index 343979fcee66..a06af96ba267 100644
--- a/dev-python/pandas/Manifest
+++ b/dev-python/pandas/Manifest
@@ -1,3 +1,5 @@
DIST pandas-2.3.3.tar.gz 4495223 BLAKE2B c31604617900d439020dcdd66fcbca1cf3b720b6f4dd8ea51891946ad04774754cf7636a2ffb9fe746d15911a88153d36d4033b6a0207e9c7a1653a0f677570d SHA512 4179acb9fd9d1c5d543bb19b22483b4c2b17a36d5b10270a02ff4d8370b43c16a93673bf5509a5b1d1c960c0fde9238bbbf5b309c6745d2abf3d934535f3fd85
DIST pandas-3.0.5.tar.gz 4658219 BLAKE2B caf76801d7cac5441f7170140ccca57e3bfb808a2c361673e50c36afaf4bf4fbce1269417d80942ae1c04f3dce5b53d66d8655362ab48f10ba52b7058365bdf4 SHA512 d082483edff92dbe61143681d270cc2ae7031ed59f8851e90e69a0139f988d57dfe0ae5b32ca829cb5912fd202db7c8a3dfe59b986068a983779184b454bc5ce
DIST pandas-3.0.5.tar.gz.provenance 9718 BLAKE2B bf91942df1291d46668b5a816fadd82ac32cc6c3e2158234cea1b694c569c3d873514c77c4e43fd06ff22e2c2a60c77f6e38ab327ee798899dfa45807ebc6836 SHA512 ef940be2eba603efa97f90aefa32056a7b17fe5b572a7bccb42e553a0233afcb4b171772844ae5cef6cb5fcab28847dbf1a8360b2df8555866b7b384f9e27289
+DIST pandas-3.0.6.tar.gz 4667686 BLAKE2B fa795b568ffbbe9658d5cec86a486e305b55f441acb1f4072a30a8a3f7d89f70911446a464b843311a363528893d0ef47c33045a1ce08e76cdcf3c298d32bbe8 SHA512 c32db3156140e18fdb341a8e52acca4582e00affc9bfe0adce8804327b32b7107be0ad1905d4cf4184b02fec9eae5f6fee4d2082e0b032e42686b4bae388823a
+DIST pandas-3.0.6.tar.gz.provenance 9861 BLAKE2B 70208ea798012370a177fd9372a9ebc67ecaa54548c588a46233f75d11ee3644bf41990277af8c450a3dadf13ed3ea2c3720fa1959cbc8639d1b9ab47737f9aa SHA512 7bb9e31bbb603029677c354d1b5b241cc5510539485aef733f8564f87c4ec6f5ea844dde2a00a85ed43e852518fb486094f353190d06a82ce5b50a6d0f6b0642
diff --git a/dev-python/pandas/pandas-3.0.6.ebuild b/dev-python/pandas/pandas-3.0.6.ebuild
new file mode 100644
index 000000000000..328b2ad1be21
--- /dev/null
+++ b/dev-python/pandas/pandas-3.0.6.ebuild
@@ -0,0 +1,191 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_EXT=1
+DISTUTILS_USE_PEP517=meson-python
+PYPI_VERIFY_REPO=https://github.com/pandas-dev/pandas
+PYTHON_COMPAT=( python3_{13..14} )
+PYTHON_REQ_USE="threads(+)"
+
+VIRTUALX_REQUIRED="manual"
+
+inherit distutils-r1 optfeature pypi toolchain-funcs virtualx
+
+DESCRIPTION="Powerful data structures for data analysis and statistics"
+HOMEPAGE="
+ https://pandas.pydata.org/
+ https://github.com/pandas-dev/pandas/
+ https://pypi.org/project/pandas/
+"
+
+LICENSE="BSD"
+SLOT="0"
+if [[ ${PV} != *_rc* ]]; then
+ KEYWORDS="~amd64 ~arm64 ~riscv ~x86"
+fi
+IUSE="big-endian full-support minimal test X"
+RESTRICT="!test? ( test )"
+
+RECOMMENDED_DEPEND="
+ >=dev-python/bottleneck-1.3.4[${PYTHON_USEDEP}]
+ >=dev-python/numexpr-2.8.0[${PYTHON_USEDEP}]
+"
+
+# TODO: add pandas-gbq to the tree
+# TODO: Re-add dev-python/statsmodel[python3_11] dep once it supports python3_11
+# https://github.com/statsmodels/statsmodels/issues/8287
+OPTIONAL_DEPEND="
+ >=dev-python/beautifulsoup4-4.14.2[${PYTHON_USEDEP}]
+ dev-python/blosc[${PYTHON_USEDEP}]
+ >=dev-python/html5lib-1.1[${PYTHON_USEDEP}]
+ >=dev-python/jinja2-3.1.2[${PYTHON_USEDEP}]
+ >=dev-python/lxml-4.8.0[${PYTHON_USEDEP}]
+ >=dev-python/matplotlib-3.6.1[${PYTHON_USEDEP}]
+ >=dev-python/openpyxl-3.0.7[${PYTHON_USEDEP}]
+ >=dev-python/sqlalchemy-1.4.36[${PYTHON_USEDEP}]
+ >=dev-python/tabulate-0.8.10[${PYTHON_USEDEP}]
+ >=dev-python/xarray-2022.3.0[${PYTHON_USEDEP}]
+ >=dev-python/xlrd-2.0.1[${PYTHON_USEDEP}]
+ >=dev-python/xlsxwriter-3.0.3[${PYTHON_USEDEP}]
+ >=dev-python/xlwt-1.3.0[${PYTHON_USEDEP}]
+ !arm? ( !hppa? ( !ppc? ( !x86? (
+ >=dev-python/scipy-1.8.1[${PYTHON_USEDEP}]
+ dev-python/statsmodels[${PYTHON_USEDEP}]
+ ) ) ) )
+ !big-endian? (
+ >=dev-python/tables-3.7.0[${PYTHON_USEDEP}]
+ )
+ X? (
+ || (
+ >=dev-python/qtpy-2.2.0[${PYTHON_USEDEP}]
+ x11-misc/xclip
+ x11-misc/xsel
+ )
+ )
+"
+DEPEND="
+ >=dev-python/numpy-2.3.3:=[${PYTHON_USEDEP}]
+"
+COMMON_DEPEND="
+ ${DEPEND}
+ >=dev-python/python-dateutil-2.8.2[${PYTHON_USEDEP}]
+"
+BDEPEND="
+ ${COMMON_DEPEND}
+ >=dev-build/meson-1.2.1
+ >=dev-python/cython-3.1.0[${PYTHON_USEDEP}]
+ >=dev-python/versioneer-0.28[${PYTHON_USEDEP}]
+ test? (
+ ${VIRTUALX_DEPEND}
+ ${RECOMMENDED_DEPEND}
+ ${OPTIONAL_DEPEND}
+ dev-libs/apache-arrow[brotli,parquet,snappy]
+ >=dev-python/beautifulsoup4-4.14.2[${PYTHON_USEDEP}]
+ >=dev-python/hypothesis-6.46.1[${PYTHON_USEDEP}]
+ >=dev-python/openpyxl-3.0.10[${PYTHON_USEDEP}]
+ >=dev-python/pyarrow-10.0.1[parquet,${PYTHON_USEDEP}]
+ >=dev-python/pymysql-1.0.2[${PYTHON_USEDEP}]
+ >=dev-python/xlsxwriter-3.0.3[${PYTHON_USEDEP}]
+ x11-misc/xclip
+ x11-misc/xsel
+ )
+"
+RDEPEND="
+ ${COMMON_DEPEND}
+ !minimal? ( ${RECOMMENDED_DEPEND} )
+ full-support? ( ${OPTIONAL_DEPEND} )
+"
+
+EPYTEST_PLUGINS=()
+EPYTEST_XDIST=1
+distutils_enable_tests pytest
+
+src_test() {
+ virtx distutils-r1_src_test
+}
+
+python_test() {
+ local EPYTEST_IGNORE=(
+ # missing test data
+ pandas/tests/io/pytables/test_compat.py
+ )
+ # Note; deselects relative to pandas/
+ local EPYTEST_DESELECT=(
+ # require -Werror
+ # https://github.com/pandas-dev/pandas/pull/63436
+ tests/config/test_config.py::TestConfig::test_case_insensitive
+
+ # deprecation warning
+ 'tests/computation/test_eval.py::TestEval::test_scalar_unary[numexpr-pandas]'
+ )
+
+ if ! tc-has-64bit-time_t; then
+ EPYTEST_DESELECT+=(
+ # Needs 64-bit time_t (TODO: split into 32-bit arch only section)
+ tests/tseries/offsets/test_year.py::test_add_out_of_pydatetime_range
+ 'tests/tseries/offsets/test_common.py::test_apply_out_of_range[tzlocal()-BusinessDay]'
+ 'tests/tseries/offsets/test_common.py::test_apply_out_of_range[tzlocal()-BusinessHour]'
+ 'tests/tseries/offsets/test_common.py::test_apply_out_of_range[tzlocal()-BusinessMonthEnd]'
+ 'tests/tseries/offsets/test_common.py::test_apply_out_of_range[tzlocal()-BusinessMonthBegin]'
+ 'tests/tseries/offsets/test_common.py::test_apply_out_of_range[tzlocal()-BQuarterEnd]'
+ 'tests/tseries/offsets/test_common.py::test_apply_out_of_range[tzlocal()-BQuarterBegin]'
+ 'tests/tseries/offsets/test_common.py::test_apply_out_of_range[tzlocal()-CustomBusinessDay]'
+ 'tests/tseries/offsets/test_common.py::test_apply_out_of_range[tzlocal()-CustomBusinessHour]'
+ 'tests/tseries/offsets/test_common.py::test_apply_out_of_range[tzlocal()-CustomBusinessMonthEnd]'
+ 'tests/tseries/offsets/test_common.py::test_apply_out_of_range[tzlocal()-CustomBusinessMonthBegin]'
+ 'tests/tseries/offsets/test_common.py::test_apply_out_of_range[tzlocal()-MonthEnd]'
+ 'tests/tseries/offsets/test_common.py::test_apply_out_of_range[tzlocal()-MonthBegin]'
+ 'tests/tseries/offsets/test_common.py::test_apply_out_of_range[tzlocal()-SemiMonthBegin]'
+ 'tests/tseries/offsets/test_common.py::test_apply_out_of_range[tzlocal()-SemiMonthEnd]'
+ 'tests/tseries/offsets/test_common.py::test_apply_out_of_range[tzlocal()-QuarterEnd]'
+ 'tests/tseries/offsets/test_common.py::test_apply_out_of_range[tzlocal()-LastWeekOfMonth]'
+ 'tests/tseries/offsets/test_common.py::test_apply_out_of_range[tzlocal()-WeekOfMonth]'
+ 'tests/tseries/offsets/test_common.py::test_apply_out_of_range[tzlocal()-Week]'
+ )
+ fi
+
+ if ! has_version "dev-python/scipy[${PYTHON_USEDEP}]"; then
+ EPYTEST_DESELECT+=(
+ tests/plotting/test_misc.py::test_savefig
+ )
+ fi
+
+ case ${EPYTHON} in
+ python3.14)
+ EPYTEST_DESELECT+=(
+ # crashing
+ tests/resample/test_resampler_grouper.py::test_tab_complete_ipython6_warning
+ )
+ ;;
+ esac
+
+ local -x LC_ALL=C.UTF-8
+ cd "${BUILD_DIR}/install$(python_get_sitedir)" || die
+ "${EPYTHON}" -c "import pandas; pandas.show_versions()" || die
+ # nonfatal from virtx
+ # --no-strict-data-files is necessary since upstream prevents data
+ # files from even being included in GitHub archives, sigh
+ # https://github.com/pandas-dev/pandas/issues/54907
+ nonfatal epytest pandas/tests \
+ --no-strict-data-files -o xfail_strict=false \
+ -m "not single_cpu and not slow and not network and not db" ||
+ die "Tests failed with ${EPYTHON}"
+}
+
+pkg_postinst() {
+ optfeature "accelerating certain types of NaN evaluations, using specialized cython routines to achieve large speedups." dev-python/bottleneck
+ optfeature "accelerating certain numerical operations, using multiple cores as well as smart chunking and caching to achieve large speedups" ">=dev-python/numexpr-2.1"
+ optfeature "needed for pandas.io.html.read_html" dev-python/beautifulsoup4 dev-python/html5lib dev-python/lxml
+ optfeature "for msgpack compression using blosc" dev-python/blosc
+ optfeature "Template engine for conditional HTML formatting" dev-python/jinja2
+ optfeature "Plotting support" dev-python/matplotlib
+ optfeature "Needed for Excel I/O" ">=dev-python/openpyxl-3.0.10" dev-python/xlsxwriter dev-python/xlrd dev-python/xlwt
+ optfeature "necessary for HDF5-based storage" ">=dev-python/tables-3.7.0"
+ optfeature "R I/O support" dev-python/rpy2
+ optfeature "Needed for parts of pandas.stats" dev-python/statsmodels
+ optfeature "SQL database support" ">=dev-python/sqlalchemy-1.4.36"
+ optfeature "miscellaneous statistical functions" dev-python/scipy
+ optfeature "necessary to use pandas.io.clipboard.read_clipboard support" dev-python/qtpy x11-misc/xclip x11-misc/xsel
+}
diff --git a/dev-python/parse/Manifest b/dev-python/parse/Manifest
index f041eee3f613..770812f25990 100644
--- a/dev-python/parse/Manifest
+++ b/dev-python/parse/Manifest
@@ -1,2 +1,2 @@
-DIST parse-1.22.0.tar.gz 36767 BLAKE2B 794637c9a4cc4db921389bd039cf5635589ea96c7ccc2e5466de768a5fe6b7f98f3acc0111d546f86d5683993dd615a9e2efa275084498330d4fde2b38e1a92d SHA512 3be4c327e7f5fa0964de1ef457a614a39a57e65d934cf8fb3cb08814c8840cd52cd3186b68b6989744f3558726a78a39b0d22d228e0194317aca67bbea1d4a6e
DIST parse-1.22.1.tar.gz 36970 BLAKE2B 8d8b47d00f944bd3dd4957b9d4b3de376d35b51dc331105a81841260a74107b0958d31b8793e692e52ce4c2465c434cff47486fe00d143b39ff92d3bc05df899 SHA512 42aac258a9de08fc91816a97af04c378e3e1f9bcee554fb421185e799e2c4b1e2cd0cad5602ffb3043bb347851f0b2c1571a11c4a9cd82d3d0011d12cbbc0496
+DIST parse-1.22.2.tar.gz 37675 BLAKE2B 5db3a9da69016fe6db06473c2301b690f7520babe22baedfe7957cb881e155cdf22321143dcb3742852afaac57556e6202a75d81d2d76e974632455162a3830f SHA512 6370c28c90cd452d094be43f5e745c474d700f069bcf631d4dcc77d9861633e6916e9699bfb00988a15221388c7a21a9c967f47de964567c8f7c09edd5958dc3
diff --git a/dev-python/parse/parse-1.22.0.ebuild b/dev-python/parse/parse-1.22.2.ebuild
index 588f129b67be..f71c3f8e2a4b 100644
--- a/dev-python/parse/parse-1.22.0.ebuild
+++ b/dev-python/parse/parse-1.22.2.ebuild
@@ -12,7 +12,7 @@ HOMEPAGE="https://github.com/r1chardj0n3s/parse/"
LICENSE="MIT"
SLOT="0"
-KEYWORDS="amd64 arm arm64 ~loong ppc64 ~riscv x86"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86"
EPYTEST_PLUGINS=()
distutils_enable_tests pytest
@@ -20,6 +20,6 @@ distutils_enable_tests pytest
src_prepare() {
distutils-r1_src_prepare
- # drop unnecssary pytest extra requirements
+ # drop unnecssary extra pytest requirements
sed -i '/tool.pytest.ini_options/,/^$/d' pyproject.toml || die
}
diff --git a/dev-python/platformdirs/Manifest b/dev-python/platformdirs/Manifest
index f4d8cd846a3c..1e3213877501 100644
--- a/dev-python/platformdirs/Manifest
+++ b/dev-python/platformdirs/Manifest
@@ -1,3 +1,5 @@
+DIST platformdirs-4.11.10.tar.gz 39389 BLAKE2B a9c3e5329d40d215d12c6895c5384ba0194ca5a870afa964ca659b00a71b8f12a8bff5aceddedd5c31cffbd0825da4ac8b3d0ed96ad4abb549ebe593e3137427 SHA512 189bda44a41e0f727dabce31b94eaa3a6ac1db214784d33ec133810e2e38b347f39efd849c8a0112c1b101d52e06c37e63912577ed3bb13aa07d5e8c939c1522
+DIST platformdirs-4.11.10.tar.gz.provenance 9727 BLAKE2B 68b894e86840f698e0b4fcc0c8738dc49419d4a7412841f56f2f6170071287b8e89add4e7c8e45d4d2a92d4695f07f0bbf7be8f398c7e0abe2322ab3a4d13ee6 SHA512 b807a7850cf218f5fd159f50811b54f745d5739cf2ffe5d9073853023c9a0b1eb8db902e943b68b623538a8debdad2739d5be55ce68d4ee9804275b77f5ad336
DIST platformdirs-4.11.3.tar.gz 33050 BLAKE2B c838822e0d5a9391d13fbf240c3006ade7094c2a2ad7c5b9904fce23c48ea9db6e851d04c887a80f37fee3bd0612e010ae58516751c050fb881c8ec6da1ab22e SHA512 0d90ccbb4f75bc2c0eda42223d475c688c59214fd696ff4690abd022322d9883816bc7c33765da8c9a792afc04ab21faa08c69dcbe027f7cbdcb4087e5baa2a1
DIST platformdirs-4.11.3.tar.gz.provenance 9777 BLAKE2B 9b4f683aaab5b99f085f560e4ff21e3a9533b892e974e8e39aef047ee2021ff416ff88af6db98c6fd284ef592a926b425c8b7c05f5cb0f4b8d5c23bb59ac8229 SHA512 97833d43052e8b2c303f204f8291cfb39bc1b399c2ecfbeabe18b54e5d20bb8920c802013fc43060c9e4f2ed7f359c5a5c763dc8cb14e9ba8bc52f328a64fa34
DIST platformdirs-4.11.4.tar.gz 34079 BLAKE2B daf5b088aa61382c1cbcbda0eebb23b9b4e7071472589ee1cc61c04f5386952d1be1b3090198104c4749c09c0fe5fcf8677ddfd31c1f8efe34219ef1a9708b3d SHA512 557782bd9f2af016372e9406a05a55194259303ae63ee90f684595f9a5dfbe0cc8ba11252135ebf31cb5a93bef740487581b4ca852f467ef781287cda15e4a0c
diff --git a/dev-python/platformdirs/platformdirs-4.11.10.ebuild b/dev-python/platformdirs/platformdirs-4.11.10.ebuild
new file mode 100644
index 000000000000..97987e113428
--- /dev/null
+++ b/dev-python/platformdirs/platformdirs-4.11.10.ebuild
@@ -0,0 +1,50 @@
+# Copyright 2021-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=flit-core
+PYPI_VERIFY_REPO=https://github.com/tox-dev/platformdirs
+PYTHON_COMPAT=( python3_{13..14} )
+
+inherit distutils-r1 pypi
+
+DESCRIPTION="A small Python module for determining appropriate platform-specific dirs"
+HOMEPAGE="
+ https://pypi.org/project/platformdirs/
+ https://github.com/tox-dev/platformdirs/
+"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~arm64-macos ~x64-macos ~x64-solaris"
+
+BDEPEND="
+ test? (
+ dev-python/appdirs[${PYTHON_USEDEP}]
+ )
+"
+
+EPYTEST_PLUGINS=( pytest-mock )
+distutils_enable_tests pytest
+
+src_configure() {
+ grep -q 'build-backend = "hatchling' pyproject.toml ||
+ die "Upstream changed build-backend, recheck"
+ # write a custom pyproject.toml to ease setuptools bootstrap
+ cat > pyproject.toml <<-EOF || die
+ [build-system]
+ requires = ["flit_core >=3.2,<4"]
+ build-backend = "flit_core.buildapi"
+
+ [project]
+ name = "${PN}"
+ version = "${PV}"
+ description = 'A small Python package for determining appropriate platform-specific dirs, e.g. a "user data dir".'
+ EOF
+ # sigh
+ cat > src/platformdirs/version.py <<-EOF || die
+ __version__ = version = '${PV}'
+ __version_tuple__ = version_tuple = (${PV//./, })
+ EOF
+}
diff --git a/dev-python/python-discovery/Manifest b/dev-python/python-discovery/Manifest
index 44ae84a77af6..4d9e561d66e8 100644
--- a/dev-python/python-discovery/Manifest
+++ b/dev-python/python-discovery/Manifest
@@ -4,3 +4,5 @@ DIST python_discovery-1.5.3.tar.gz 82477 BLAKE2B 9c4fb00eaed1f285fbc11f17329b2b1
DIST python_discovery-1.5.3.tar.gz.provenance 9705 BLAKE2B 3b868680b81b7b357f6b1a746c1c3f9dd3647d661357aecf2d56b29c020775878ab1e99702ca1cdb543329eec78b2f178d063d3aeb69aa114336f74b0e1c2809 SHA512 6d4308a4cd90f1eb880f9a787bb43e1f96c169304009efd7fff673df6816e02adbe6124d8c52eff2be5a03e2a1892f3ffdef35ddf3cd788c5c78eaf04ea11de0
DIST python_discovery-1.6.0.tar.gz 82849 BLAKE2B f4eb680ebac443ef96d3b02c38c084077daa63125c78f1528414e316ccaafa15e33fec2e247c62faed19be9884ebb1f5b91f3ee24b343b8a6531f39f68ee4056 SHA512 dbf16e32b74aa5d02c07219688d1bddab550321cd1bd6e2d424cdf4970c2a80973d0f1b3348a41974fa86dd3d283641f19fe6b8434aee1b35c2ce70102f7562d
DIST python_discovery-1.6.0.tar.gz.provenance 9936 BLAKE2B 293c80437cec2b33211ef2b28d4021f01cfbed0f769adcef52f090f40300fabb437cb544516c4ad2aa5d4e4646b4384877a56dd12f369a5085c82a7b06962e7b SHA512 f2e2911814b42b44fb5616450e6264787f2bfae71385f7258ab29428ee3fe3b07e6952f4c0c2fda50796b3be531e04429cfca6433d9ba7091801a8f50279609a
+DIST python_discovery-1.6.1.tar.gz 84338 BLAKE2B 817e18c8706a1d582c928b65b7252c04f8b312b4a301ffe1cbdfb20328edc2705c49d1a8a705736150113d4f08c3bf4f70cc9b89b32fd732ab0b93f74aee83cb SHA512 c65201e066c2debf3e8457befab259fa807621cd2dbc46fad5188234a16ea32207c868aad66d913f8dd6e58dc084054ac18ada4ea7e3820a8fe10fab5f1b9dda
+DIST python_discovery-1.6.1.tar.gz.provenance 9713 BLAKE2B 07cd6ce6319c44ed3f41fb53a481bb142a6c6c3c095d0254eb3933227e2ecb1baad428c1b6d011c0581fa4ab97d1465219044741002dfc2a25ff24363381f9e4 SHA512 6b177195e35a8bfb438c98f3f048f5d0179003b247033dc099ae2673c68d32f30e16d2eb3e5a3252c199c5365e015e906e73b242f49c1eaf9b67abb44a12ef69
diff --git a/dev-python/python-discovery/python-discovery-1.6.1.ebuild b/dev-python/python-discovery/python-discovery-1.6.1.ebuild
new file mode 100644
index 000000000000..f3847b5c8f20
--- /dev/null
+++ b/dev-python/python-discovery/python-discovery-1.6.1.ebuild
@@ -0,0 +1,55 @@
+# Copyright 2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=hatchling
+PYPI_VERIFY_REPO=https://github.com/tox-dev/python-discovery
+PYTHON_COMPAT=( python3_{13..14} )
+
+inherit distutils-r1 pypi
+
+DESCRIPTION="Python interpreter discovery"
+HOMEPAGE="
+ https://github.com/tox-dev/python-discovery/
+ https://pypi.org/project/python-discovery/
+"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+
+RDEPEND="
+ >=dev-python/filelock-3.15.4[${PYTHON_USEDEP}]
+"
+BDEPEND="
+ dev-python/hatch-vcs[${PYTHON_USEDEP}]
+ test? (
+ >=dev-python/setuptools-75.1[${PYTHON_USEDEP}]
+ )
+"
+
+EPYTEST_PLUGINS=( pytest-mock )
+EPYTEST_XDIST=1
+distutils_enable_tests pytest
+
+python_test() {
+ local EPYTEST_IGNORE=(
+ # TODO: package vermin?
+ tests/test_py_info_collect.py
+ )
+ local EPYTEST_DESELECT=()
+
+ case ${EPYTHON} in
+ python3.*t)
+ EPYTEST_DESELECT+=(
+ # TODO
+ tests/test_py_info_extra.py::test_satisfies_path_not_abs_basename_match
+ tests/test_iter_interpreters.py::test_iter_interpreters_dedups_symlinks
+ tests/test_iter_interpreters.py::test_iter_interpreters_no_key_includes_running_interpreter
+ )
+ ;;
+ esac
+
+ epytest
+}
diff --git a/dev-python/sphinx-autodoc-typehints/Manifest b/dev-python/sphinx-autodoc-typehints/Manifest
index 78bcaee49a74..3ad59bcc8b23 100644
--- a/dev-python/sphinx-autodoc-typehints/Manifest
+++ b/dev-python/sphinx-autodoc-typehints/Manifest
@@ -6,3 +6,5 @@ DIST sphinx_autodoc_typehints-3.13.5.tar.gz 92932 BLAKE2B 20c8d262aa0458f2e15331
DIST sphinx_autodoc_typehints-3.13.5.tar.gz.provenance 10227 BLAKE2B 8bc6b35c9f3ff8c4e5087b346524371aa8a6511da7d3ad776f5fb89f1c529695beea84d845ed246816a871b6f48c46d7423f7330b62c93de88f0cdc9b51fd1d2 SHA512 05b8a43e687bdd9fb6011bd556744bf2c69719c00ca3453882108c298637a0a4b7b4390217fdbb62fe13ee1cf60b862018e311d09bedc51a92c3e9f7e4ff3c5e
DIST sphinx_autodoc_typehints-3.13.6.tar.gz 95235 BLAKE2B e9574881509897dd4822ac70612ef46fb6203812bf1508c0a3939874ecab4e538b5960b58ecc4922f8d23bf4a409453acf826f15cf63de8f048d06afdf6004d2 SHA512 2f3d314a6bb69271468b45ce4e12aef4f888c37d416dfa09e2539d73d016766a7af128f40cb1a747c41085fbd9f8d40e6775bd7f011084b5c66f7b86742681e9
DIST sphinx_autodoc_typehints-3.13.6.tar.gz.provenance 10227 BLAKE2B c5e584dfa6b6dc7045aa791af8dcc0340713e818bf519f897db85cb46910c580d69415a869f3d32762809fb92ee51303dfc3e87e72c6d071d7bbb62b196e3145 SHA512 235d2185f022e080d47e938fefd8f4f962c48fa6e5582219ca65f43a0a30e757b5b4b1d661f0a1a2867519ec0b9bf0984b4a0eb1d861333728b0ccfcdd502c52
+DIST sphinx_autodoc_typehints-3.13.7.tar.gz 96990 BLAKE2B 3f81fd81ce6e041e68d0e8bc9a7d65eaba70aa63b84513033845a3453345a1d495207663639e591c543ad9b343c9105c153c2b864e7d1a3fdca3025da6ac1360 SHA512 01f069cb1a005037621299983d1c4b2cff62cec5d7e7726e50713797535dc4dd1d64cde8ff40acae312a458a61bf4f7793a771a8102f7ca79e40f82a617380a9
+DIST sphinx_autodoc_typehints-3.13.7.tar.gz.provenance 9945 BLAKE2B e3d9e37540f0f57e0c99b5e9ec8c7753eaf9025e4c40f7e14d32c7653c2ea90fb334ef64fe0d47e5696cdc16a8d7f90908403bfd972c28da1656e6d9fd1cdd14 SHA512 fbc546cd985536f36f911d24ccc2cad6ab953080d6f1ce470c6587fb5a7c9c692c7fc793cf49f1bdddb0348b7465c855794ff697b96be16baa6e5569b6711ce3
diff --git a/dev-python/sphinx-autodoc-typehints/sphinx-autodoc-typehints-3.13.7.ebuild b/dev-python/sphinx-autodoc-typehints/sphinx-autodoc-typehints-3.13.7.ebuild
new file mode 100644
index 000000000000..238733c448a1
--- /dev/null
+++ b/dev-python/sphinx-autodoc-typehints/sphinx-autodoc-typehints-3.13.7.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=hatchling
+PYPI_VERIFY_REPO=https://github.com/tox-dev/sphinx-autodoc-typehints
+PYTHON_COMPAT=( python3_{13..14} )
+
+inherit distutils-r1 pypi
+
+DESCRIPTION="Type hints support for the Sphinx autodoc extension"
+HOMEPAGE="
+ https://github.com/tox-dev/sphinx-autodoc-typehints/
+ https://pypi.org/project/sphinx-autodoc-typehints/
+"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+
+RDEPEND="
+ >=dev-python/sphinx-9.0.4[${PYTHON_USEDEP}]
+"
+# skipping optional test dep on dev-python/nptyping as that package
+# is horribly broken and on its way out
+BDEPEND="
+ dev-python/hatch-vcs[${PYTHON_USEDEP}]
+ test? (
+ >=dev-python/attrs-25.4[${PYTHON_USEDEP}]
+ >=dev-python/numpydoc-1.10[${PYTHON_USEDEP}]
+ >=dev-python/sphobjinv-2.3.1[${PYTHON_USEDEP}]
+ >=dev-python/typing-extensions-4.5[${PYTHON_USEDEP}]
+ )
+"
+
+EPYTEST_PLUGINS=()
+distutils_enable_tests pytest
+
+EPYTEST_DESELECT=(
+ # Internet
+ tests/test_annotations.py::test_format_annotation
+ tests/test_resolver/test_stubs.py::test_sphinx_build_stub_types_produce_crossrefs
+)
diff --git a/dev-python/tree-sitter/tree-sitter-0.26.0_p20260816.ebuild b/dev-python/tree-sitter/tree-sitter-0.26.0_p20260816-r1.ebuild
index 272df44146e2..ef32f428f500 100644
--- a/dev-python/tree-sitter/tree-sitter-0.26.0_p20260816.ebuild
+++ b/dev-python/tree-sitter/tree-sitter-0.26.0_p20260816-r1.ebuild
@@ -24,14 +24,14 @@ S=${WORKDIR}/py-${PN}-${COMMIT}
LICENSE="MIT"
SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"
# setuptools is needed for distutils import
-DEPEND="=dev-libs/tree-sitter-0.26*:="
-RDEPEND="
- ${DEPEND}
- dev-python/setuptools[${PYTHON_USEDEP}]
+DEPEND="
+ >=dev-libs/tree-sitter-0.26:=
+ <dev-libs/tree-sitter-0.28
"
+RDEPEND="${DEPEND}"
BDEPEND="
test? (
>=dev-libs/tree-sitter-html-0.23.2[python,${PYTHON_USEDEP}]
diff --git a/dev-python/urwid/Manifest b/dev-python/urwid/Manifest
index e77c9e98f41b..2a16dbbcf679 100644
--- a/dev-python/urwid/Manifest
+++ b/dev-python/urwid/Manifest
@@ -14,3 +14,5 @@ DIST urwid-4.1.3.tar.gz 944854 BLAKE2B c683dcec93c42e838665f98d7cfe5190b700b1a1a
DIST urwid-4.1.3.tar.gz.provenance 9538 BLAKE2B b2c79aee2754a26f15bd49d773a2ad8ff58949a236a5179a405b7dfd388b69807298993d63987b015483a062cf6023d2b9a703993f0949409743096f99017906 SHA512 a2ade6d50b29215aefd54300131adf9fafd88c26425ef08579715720ae0154c9a1f0c5f18ba7f3b931a4a4692c5f82a0b3dcdf422fbe0cbc0c8b05981fae1580
DIST urwid-4.1.4.tar.gz 976991 BLAKE2B a563b91ae1dfbce32a9c4aaf0d9daa1ec2985bfb1b15fec496cfa959232355eda6b9ecd908ad437b6cce355d6b3b8044046a39c9a2317a4f6272202f21a2f61b SHA512 996bf1a6f7aec55442af55c36df14d52bb5e76efe4259cb372fdcc1bce00547838248b8f15266b2ff026490840f9dcb550733f70a716f9b644d5bbc0643190b5
DIST urwid-4.1.4.tar.gz.provenance 9479 BLAKE2B fe15009278cd363fac26714e8ce4e46beb04107bafb1c629633047f4011a6231cb4eb5d18615072c80b90ad234191b700d3243b1fa765772de54458e3dae9df9 SHA512 f1e7b557470adb3b08b5730e9afa3b0edf71a548df33514c1cecb86915144980259de1632f6ef7ee83b9c2f7e9d880c13f517a7ec2ef11ddc943c3ff8502ab2e
+DIST urwid-4.1.5.tar.gz 1007991 BLAKE2B 73f54b540249360f2a565061e055c04097a433efa91ee5a45166854c2979ec6106473d81ce9dabffb66c8cf77dd6316dedd8ff9cbd1586e172776ad87c4c5758 SHA512 4a2e5c43ccdb172103a943225c5f48773538d3cddc9ecf60e2e30cfacd531577304971255951024f2a4a9ebd5502d3fca9406badfc788ab52c3d0552f68b1169
+DIST urwid-4.1.5.tar.gz.provenance 9542 BLAKE2B 3f2607295bc7c2507667e5092237163c423530c93a49e23db66de51f28c5d7a9ea7eba17f35c1981f551b3b9577745d9efcd7e1373a52fef940a1b84858b97ef SHA512 0f0dff16d8919c868edd7c50e78b61a9d23b0271ae31b4092785da10702da292e7830b0331a882a568b20fda5df076dd67abff51b536441e3141a158ef9356d1
diff --git a/dev-python/urwid/urwid-4.1.5.ebuild b/dev-python/urwid/urwid-4.1.5.ebuild
new file mode 100644
index 000000000000..aba0d14bbb3d
--- /dev/null
+++ b/dev-python/urwid/urwid-4.1.5.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYPI_VERIFY_REPO=https://github.com/urwid/urwid
+PYTHON_COMPAT=( python3_{13..14} )
+PYTHON_REQ_USE="ncurses"
+
+inherit distutils-r1 optfeature pypi
+
+DESCRIPTION="Curses-based user interface library for Python"
+HOMEPAGE="
+ https://urwid.org/
+ https://pypi.org/project/urwid/
+ https://github.com/urwid/urwid/
+"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
+IUSE="examples"
+
+RDEPEND="
+ dev-python/typing-extensions[${PYTHON_USEDEP}]
+ >=dev-python/wcwidth-0.4[${PYTHON_USEDEP}]
+"
+BDEPEND="
+ dev-python/setuptools-scm[${PYTHON_USEDEP}]
+"
+
+EPYTEST_PLUGINS=()
+distutils_enable_tests pytest
+
+src_prepare() {
+ distutils-r1_src_prepare
+
+ sed -i -e 's:--cov --cov-report=term::' pyproject.toml || die
+}
+
+python_install_all() {
+ use examples && dodoc -r examples
+ distutils-r1_python_install_all
+}
+
+pkg_postinst() {
+ optfeature "Trio event loop" "dev-python/trio"
+}
diff --git a/dev-python/virtualenv/Manifest b/dev-python/virtualenv/Manifest
index a69430242733..6e0f2cb9e52a 100644
--- a/dev-python/virtualenv/Manifest
+++ b/dev-python/virtualenv/Manifest
@@ -2,6 +2,8 @@ DIST virtualenv-21.7.10.tar.gz 5350247 BLAKE2B 9d9b5f419c4ac1225ed4435a9f5a2e337
DIST virtualenv-21.7.10.tar.gz.provenance 9440 BLAKE2B 6f75442780a0ce863a63316b4c43c92c5464ca27065f1d31e410a8cdadbf716fd3b8c07dcb22e2c855b2a745d9dcdcab1249ee20457e413b25b611a08f86e18a SHA512 f4386b408b460bbd0921d48e1f0751dc93b253dd4f3a1adfbb565263fd63488f6fd64d68ef52b0a60651a256c7714a687fe5cb6c23126446a6def5578f2dc5ed
DIST virtualenv-21.7.11.tar.gz 5354008 BLAKE2B 166651d9ced8ac3b6bffb0330e23e140fe0a8861487ab50f2c6ebaded9b98c57103eb8a3d3f2526300f3bc1037fbea4178debc1486312daf4a90c60a7abff950 SHA512 f7befbd3c9c3b7347ca4e1ce9319854f9ad4c84b3d670415594a0c16f2c29210913751ae4e86e50c25cbc369020b1a14ac947b0595b752890a505e14024b4274
DIST virtualenv-21.7.11.tar.gz.provenance 9765 BLAKE2B 37f1def545140512831ccddb7bd20499c4d58c5776ecc9490e898f45f5b0c44955a1c604e7be85abdb41a91955c93226bf9a8c812503906de8f03715b9fa07e9 SHA512 8b809ef182e3fd27cfeddef6e0634c15f348f034fd1693dd4660ee91af1243088f4113fe2bfe2e13194f5a5e87974ac88e74206976f05038fa98d97494e7f12b
+DIST virtualenv-21.7.14.tar.gz 5360773 BLAKE2B 84b540a539d21e95f3e736735827c9b8c3680ef715ca2c2508724cbc57caf8b42c18944c771f4d5a7e027f1081b541e703daf73e2ca3a8dc5f968277ba4f2bb8 SHA512 2b6de45165c3fef5e9db1b9805eaefed378b2809f4ec5246e576f0ff5f9fbd8763835a9555b9a8c5f3154e83df02ebacc874dde2cb42808e3d7d8c9ef09f9e32
+DIST virtualenv-21.7.14.tar.gz.provenance 9773 BLAKE2B b3c84aa1cec8ff729b369feb648fe998b3340bed9de1a5df03e8fe0378925a21504b696dbfdcecd04d7b359564bfe951a94abd27351cb27c98aff1bd4501d6f0 SHA512 fae4af40567ba76b6ceeb0fba0499e8ce27c90c426fd110316198b75fbaecff380a9fda4bee9b088a6c70a446bf546b8973cf422aea34c8371fb3a7d7fbf85fa
DIST virtualenv-21.7.4.tar.gz 5345511 BLAKE2B 30c7b5e782e4867e5d2a1726ab564af6d106280a909666a4dbee0a42d0cf9bde932681eb442cecb186d3a04bea329ebce458e45ecc5b745bfcc8a8fcc1e85997 SHA512 52db3945bf8c3c8f87db9b2e9df3ff22ab45b4ce3f0ffdbb9a7b3678df4cde0b0980dd9040adf478a6909d0650ff6f873a2db2d022e402e8d46edc8b67cf5c97
DIST virtualenv-21.7.4.tar.gz.provenance 9618 BLAKE2B 5cf72407fb515710895b6534a32c0b7b96329c3c8387aae5a1552e7d43a5447bb2d10c2198b61bd0150cf3cf719d54d5e3329a5a7230abb470e3805f87031a6b SHA512 a7280f39dfeb05379b7c9ba5dd3b9fdb8e7fda8a9496805795f53407fc175b308309640e77dfadec21806e2fb07c545ccb95c7e7b87fee68fa63fdf1fb30f58e
DIST virtualenv-21.7.5.tar.gz 5346743 BLAKE2B 52c54885686970e47eb44c6271515164929382f7ab8f514c1cd4861fb9145354d4b299e1d2d5eb658504713545dc9d481db8dec8541235983f9f68d795b68d52 SHA512 708068427c768f6469ffc49afa9738ef7d7b1f3edd1809ed2e8267878eae7f5729ad0992fc9acefbda6059c4c42a78a6cba31af0c6dbf4de7414b6c12da924de
diff --git a/dev-python/virtualenv/virtualenv-21.7.14.ebuild b/dev-python/virtualenv/virtualenv-21.7.14.ebuild
new file mode 100644
index 000000000000..b2791558c0f7
--- /dev/null
+++ b/dev-python/virtualenv/virtualenv-21.7.14.ebuild
@@ -0,0 +1,117 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=hatchling
+PYPI_VERIFY_REPO=https://github.com/pypa/virtualenv
+PYTHON_TESTED=( python3_{13..14} )
+PYTHON_COMPAT=( python3_{13..14} )
+
+inherit distutils-r1 pypi
+
+DESCRIPTION="Virtual Python Environment builder"
+HOMEPAGE="
+ https://virtualenv.pypa.io/en/stable/
+ https://pypi.org/project/virtualenv/
+ https://github.com/pypa/virtualenv/
+"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ >=dev-python/distlib-0.3.7[${PYTHON_USEDEP}]
+ >=dev-python/filelock-3.24.2[${PYTHON_USEDEP}]
+ >=dev-python/platformdirs-3.9.1[${PYTHON_USEDEP}]
+ >=dev-python/python-discovery-1.6[${PYTHON_USEDEP}]
+
+ dev-python/ensurepip-pip
+ >=dev-python/ensurepip-setuptools-70.1
+ dev-python/ensurepip-wheel
+"
+# coverage is used somehow magically in virtualenv, maybe it actually
+# tests something useful
+BDEPEND="
+ dev-python/hatch-vcs[${PYTHON_USEDEP}]
+ test? (
+ ${RDEPEND}
+ $(python_gen_cond_dep '
+ dev-python/coverage[${PYTHON_USEDEP}]
+ >=dev-python/pip-22.2.1[${PYTHON_USEDEP}]
+ >=dev-python/pytest-mock-3.6.1[${PYTHON_USEDEP}]
+ dev-python/pytest-rerunfailures[${PYTHON_USEDEP}]
+ dev-python/pytest-timeout[${PYTHON_USEDEP}]
+ dev-python/pytest-xdist[${PYTHON_USEDEP}]
+ >=dev-python/setuptools-67.8[${PYTHON_USEDEP}]
+ dev-python/time-machine[${PYTHON_USEDEP}]
+ dev-python/wheel[${PYTHON_USEDEP}]
+ >=dev-python/packaging-20.0[${PYTHON_USEDEP}]
+ ' "${PYTHON_TESTED[@]}")
+ )
+"
+
+src_prepare() {
+ local PATCHES=(
+ # use wheels from ensurepip bundle
+ "${FILESDIR}/${PN}-21.5.1-ensurepip.patch"
+ )
+
+ distutils-r1_src_prepare
+
+ # workaround test failures due to warnings from setuptools-scm, sigh
+ echo '[tool.setuptools_scm]' >> pyproject.toml || die
+
+ # remove useless pins
+ sed -i -e 's:,<[=0-9.]*::' pyproject.toml || die
+
+ # remove bundled wheels
+ rm src/virtualenv/seed/wheels/embed/*.whl || die
+}
+
+python_test() {
+ if ! has "${EPYTHON}" "${PYTHON_TESTED[@]/_/.}"; then
+ einfo "Skipping testing on ${EPYTHON}"
+ return
+ fi
+
+ local EPYTEST_DESELECT=(
+ tests/unit/seed/embed/test_bootstrap_link_via_app_data.py::test_seed_link_via_app_data
+ # tests for old wheels with py3.7 support
+ tests/unit/seed/embed/test_pip_invoke.py::test_base_bootstrap_via_pip_invoke
+ tests/unit/seed/wheels/test_wheels_util.py::test_wheel_not_support
+ # broken by different wheel versions in ensurepip
+ tests/unit/seed/wheels/test_acquire_find_wheel.py::test_find_latest_string
+ tests/unit/seed/wheels/test_acquire_find_wheel.py::test_find_exact
+ tests/unit/seed/wheels/test_acquire_find_wheel.py::test_find_latest_none
+ tests/unit/seed/wheels/test_acquire.py::test_download_wheel_bad_output
+ tests/unit/seed/wheels/test_wheels_util.py::test_embed_wheel_below_oldest_supported_is_missing
+ # hangs on a busy system, sigh
+ tests/unit/test_util.py::test_reentrant_file_lock_is_thread_safe
+ # TODO
+ tests/unit/create/via_global_ref/test_build_c_ext.py::test_can_build_c_extensions
+ # random resource leaks or xdist
+ tests/unit/test_file_limit.py::test_too_many_open_files
+ # Internet
+ tests/unit/create/test_creator.py::test_create_distutils_cfg
+ # we do not use bundled wheels
+ tests/unit/seed/wheels/test_bundle.py::test_every_wheel_on_disk_has_sha256
+ )
+
+ local -x TZ=UTC
+ local EPYTEST_PLUGINS=( pytest-{mock,rerunfailures} time-machine )
+ local EPYTEST_RERUNS=5
+ local EPYTEST_TIMEOUT=180
+ local EPYTEST_XDIST=1
+ epytest -o addopts=
+}
+
+src_install() {
+ distutils-r1_src_install
+
+ # remove bundled wheels, we're using ensurepip bundle instead
+ find "${ED}" -name '*.whl' -delete || die
+}
diff --git a/dev-scheme/guile/guile-3.0.11-r1.ebuild b/dev-scheme/guile/guile-3.0.11-r1.ebuild
index b494d9b1db54..fc0c8a020525 100644
--- a/dev-scheme/guile/guile-3.0.11-r1.ebuild
+++ b/dev-scheme/guile/guile-3.0.11-r1.ebuild
@@ -11,7 +11,7 @@ SRC_URI="mirror://gnu/guile/${P}.tar.xz"
LICENSE="LGPL-3+"
SLOT="$(ver_cut 1-2)" # See (guile)Parallel Installations.
-KEYWORDS="~alpha ~amd64 arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ppc64 ~riscv ~s390 ~sparc x86 ~arm64-macos ~x64-macos"
+KEYWORDS="~alpha ~amd64 arm ~arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~arm64-macos ~x64-macos"
IUSE="debug debug-malloc +deprecated +jit +networking +nls +regex +threads" # upstream recommended +networking +nls
REQUIRED_USE="regex" # workaround for bug #596322
diff --git a/dev-util/codex/codex-0.153.4-r1.ebuild b/dev-util/codex/codex-0.153.4-r1.ebuild
deleted file mode 100644
index ed997086a050..000000000000
--- a/dev-util/codex/codex-0.153.4-r1.ebuild
+++ /dev/null
@@ -1,164 +0,0 @@
-# Copyright 2025-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-# NOTE: This package uses a pre-built crate tarball instead of listing individual
-# crates in CRATES="". This approach is required because:
-# 1. Codex has 800+ crate dependencies, which triggers Portage QA warnings:
-# "QA Notice: This package uses a very large number of CRATES. Please provide
-# a crate tarball instead and fetch it via SRC_URI."
-# 2. Stricter ebuild QA checks (e.g., in CI pipelines) fail with too many crates.
-#
-# The crate tarball is auto-generated by GitHub Actions at:
-# https://github.com/gentoo-zh-drafts/codex/
-# Workflow source code for auditing:
-# https://github.com/gentoo-zh-drafts/codex/blob/crate-dist/.github/workflows/crates.yml
-# This allows anyone to review and verify the crate packaging process.
-
-CRATES="
- cloudflare-zlib-sys@0.3.6
- libz-ng-sys@1.1.16
- libz-sys@1.1.20
-"
-
-declare -A GIT_CRATES=(
- [crossterm]='https://github.com/openai-oss-forks/crossterm;45fecb9508105988f42fe6ff0441783ed3717f92;crossterm-%commit%'
- [libwebrtc]='https://github.com/juberti-oai/rust-sdks;e2d1d1d230c6fc9df171ccb181423f957bb3c1f0;rust-sdks-%commit%/libwebrtc'
- [livekit-protocol]='https://github.com/juberti-oai/rust-sdks;e2d1d1d230c6fc9df171ccb181423f957bb3c1f0;rust-sdks-%commit%/livekit-protocol'
- [livekit-runtime]='https://github.com/juberti-oai/rust-sdks;e2d1d1d230c6fc9df171ccb181423f957bb3c1f0;rust-sdks-%commit%/livekit-runtime'
- [nucleo-matcher]='https://github.com/helix-editor/nucleo;4253de9faabb4e5c6d81d946a5e35a90f87347ee;nucleo-%commit%/matcher'
- [nucleo]='https://github.com/helix-editor/nucleo;4253de9faabb4e5c6d81d946a5e35a90f87347ee;nucleo-%commit%'
- [ratatui]='https://github.com/nornagon/ratatui;9b2ad1298408c45918ee9f8241a6f95498cdbed2;ratatui-%commit%'
- [runfiles]='https://github.com/dzbarsky/rules_rust;b56cbaa8465e74127f1ea216f813cd377295ad81;rules_rust-%commit%/rust/runfiles'
- [tokio-tungstenite]='https://github.com/openai-oss-forks/tokio-tungstenite;132f5b39c862e3a970f731d709608b3e6276d5f6;tokio-tungstenite-%commit%'
- [tungstenite]='https://github.com/openai-oss-forks/tungstenite-rs;9200079d3b54a1ff51072e24d81fd354f085156f;tungstenite-rs-%commit%'
- [webrtc-sys-build]='https://github.com/juberti-oai/rust-sdks;e2d1d1d230c6fc9df171ccb181423f957bb3c1f0;rust-sdks-%commit%/webrtc-sys/build'
- [webrtc-sys]='https://github.com/juberti-oai/rust-sdks;e2d1d1d230c6fc9df171ccb181423f957bb3c1f0;rust-sdks-%commit%/webrtc-sys'
-)
-
-RUST_MIN_VER="1.95.0"
-
-# python3 .github/scripts/rusty_v8_bazel.py resolved-v8-crate-version
-RUSTY_V8_TAG="147.4.0"
-
-inherit cargo check-reqs toolchain-funcs
-
-CHECKREQS_MEMORY="15G"
-CHECKREQS_DISK_BUILD="20G"
-
-DESCRIPTION="Codex CLI - OpenAI's AI-powered coding agent"
-HOMEPAGE="https://github.com/openai/codex"
-
-# The crate tarball URL uses ${PV} so it auto-updates when bumping versions.
-# This tarball is generated by: https://github.com/gentoo-zh-drafts/codex/
-# See .github/workflows/crates.yml for the generation process.
-SRC_URI="
- https://github.com/openai/${PN}/archive/rust-v${PV}.tar.gz -> ${P}.tar.gz
- https://github.com/gentoo-zh-drafts/codex/releases/download/rust-v${PV}/codex-rust-v${PV}-crates.tar.xz
- amd64? (
- https://github.com/openai/codex/releases/download/rusty-v8-v${RUSTY_V8_TAG}/librusty_v8_release_x86_64-unknown-linux-musl.a.gz
- -> rusty_v8_${RUSTY_V8_TAG}_librusty_v8_release_x86_64-unknown-linux-musl.a.gz
- https://github.com/openai/codex/releases/download/rusty-v8-v${RUSTY_V8_TAG}/src_binding_release_x86_64-unknown-linux-musl.rs
- -> rusty_v8_${RUSTY_V8_TAG}_src_binding_release_x86_64-unknown-linux-musl.rs
- )
- arm64? (
- https://github.com/openai/codex/releases/download/rusty-v8-v${RUSTY_V8_TAG}/librusty_v8_release_aarch64-unknown-linux-musl.a.gz
- -> rusty_v8_${RUSTY_V8_TAG}_librusty_v8_release_aarch64-unknown-linux-musl.a.gz
- https://github.com/openai/codex/releases/download/rusty-v8-v${RUSTY_V8_TAG}/src_binding_release_aarch64-unknown-linux-musl.rs
- -> rusty_v8_${RUSTY_V8_TAG}_src_binding_release_aarch64-unknown-linux-musl.rs
- )
- ${CARGO_CRATE_URIS}
-"
-
-S="${WORKDIR}/${PN}-rust-v${PV}/codex-rs"
-
-LICENSE="Apache-2.0"
-# Dependent crate licenses
-LICENSE+="
- Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD-2 BSD Boost-1.0
- CC0-1.0 CDLA-Permissive-2.0 ISC MIT MPL-2.0 Unicode-3.0 ZLIB
-"
-SLOT="0"
-KEYWORDS="-* ~amd64 ~arm64"
-# Tests fail due to ring crate conflicts with system OpenSSL
-RESTRICT="test"
-
-DEPEND="
- dev-libs/openssl:=
- sys-apps/dbus
-"
-RDEPEND="${DEPEND}"
-BDEPEND="virtual/pkgconfig"
-
-# rust does not use *FLAGS from make.conf, silence portage warning
-QA_FLAGS_IGNORED="usr/bin/${PN} usr/bin/codex-code-mode-host"
-
-pkg_pretend() {
- check-reqs_pkg_pretend
-}
-
-pkg_setup() {
- check-reqs_pkg_setup
- rust_pkg_setup
- if tc-is-lto; then
- export CARGO_PROFILE_RELEASE_LTO=thin
- else
- export CARGO_PROFILE_RELEASE_LTO=false
- fi
-}
-
-gen_git_crate_dir() {
- # https://github.com/gentoo/gentoo/blob/b09dd88412fe2d5eee5a8891e08bfa2d67848da3/eclass/cargo.eclass#L442
- IFS=';' read -r crate_uri commit crate_dir <<<"${GIT_CRATES[$1]}"
- echo "${WORKDIR}/${crate_dir//%commit%/${commit}}"
-}
-
-src_prepare() {
- default
-
- # Cargo resolves target-specific dependencies while building the package
- # graph, so drop this unvendored Windows-only git dependency on Linux.
- sed -i '/^appcontainer_common = { workspace = true }$/d' \
- "${S}/sandboxing/Cargo.toml" || die
-
- # Fix tokio-tungstenite's git dependency on tungstenite
- sed -i '/^\[dependencies\.tungstenite\]/,/^$/{
- s|git = "https://github.com/openai-oss-forks/tungstenite-rs"|path = "'"$(gen_git_crate_dir tungstenite)"'"|
- /^rev = /d
- }' "$(gen_git_crate_dir tokio-tungstenite)/Cargo.toml" || die
-
- # Remove the [patch.crates-io] section and add path-based patches
- sed -i '/^\[patch\.crates-io\]/,/^$/d' "${S}/Cargo.toml" || die
- sed -i '/^\[patch\."ssh:\/\/git@github\.com/,/^$/d' "${S}/Cargo.toml" || die
-
- # Add new patch section with local paths
- cat >> "${S}/Cargo.toml" <<-EOF || die
-
- [patch.crates-io]
- crossterm = { path = "$(gen_git_crate_dir crossterm)" }
- ratatui = { path = "$(gen_git_crate_dir ratatui)" }
- tokio-tungstenite = { path = "$(gen_git_crate_dir tokio-tungstenite)" }
- tungstenite = { path = "$(gen_git_crate_dir tungstenite)" }
- EOF
-}
-
-src_compile() {
- local rusty_v8_triple
- use amd64 && rusty_v8_triple=x86_64-unknown-linux-musl
- use arm64 && rusty_v8_triple=aarch64-unknown-linux-musl
-
- # codex-core trait resolution overflows rustc's default 8MiB stack
- export RUST_MIN_STACK=16777216
-
- RUSTY_V8_ARCHIVE="${DISTDIR}/rusty_v8_${RUSTY_V8_TAG}_librusty_v8_release_${rusty_v8_triple}.a.gz" \
- RUSTY_V8_SRC_BINDING_PATH="${DISTDIR}/rusty_v8_${RUSTY_V8_TAG}_src_binding_release_${rusty_v8_triple}.rs" \
- cargo_src_compile --package codex-cli --package codex-code-mode-host
-}
-
-src_install() {
- # The CLI starts Code Mode through a sibling executable.
- dobin "$(cargo_target_dir)/codex" \
- "$(cargo_target_dir)/codex-code-mode-host"
- einstalldocs
-}
diff --git a/dev-util/codex/codex-0.153.4.ebuild b/dev-util/codex/codex-0.153.4.ebuild
deleted file mode 100644
index b24f964ce2fc..000000000000
--- a/dev-util/codex/codex-0.153.4.ebuild
+++ /dev/null
@@ -1,162 +0,0 @@
-# Copyright 2025-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-# NOTE: This package uses a pre-built crate tarball instead of listing individual
-# crates in CRATES="". This approach is required because:
-# 1. Codex has 800+ crate dependencies, which triggers Portage QA warnings:
-# "QA Notice: This package uses a very large number of CRATES. Please provide
-# a crate tarball instead and fetch it via SRC_URI."
-# 2. Stricter ebuild QA checks (e.g., in CI pipelines) fail with too many crates.
-#
-# The crate tarball is auto-generated by GitHub Actions at:
-# https://github.com/gentoo-zh-drafts/codex/
-# Workflow source code for auditing:
-# https://github.com/gentoo-zh-drafts/codex/blob/crate-dist/.github/workflows/crates.yml
-# This allows anyone to review and verify the crate packaging process.
-
-CRATES="
- cloudflare-zlib-sys@0.3.6
- libz-ng-sys@1.1.16
- libz-sys@1.1.20
-"
-
-declare -A GIT_CRATES=(
- [crossterm]='https://github.com/openai-oss-forks/crossterm;45fecb9508105988f42fe6ff0441783ed3717f92;crossterm-%commit%'
- [libwebrtc]='https://github.com/juberti-oai/rust-sdks;e2d1d1d230c6fc9df171ccb181423f957bb3c1f0;rust-sdks-%commit%/libwebrtc'
- [livekit-protocol]='https://github.com/juberti-oai/rust-sdks;e2d1d1d230c6fc9df171ccb181423f957bb3c1f0;rust-sdks-%commit%/livekit-protocol'
- [livekit-runtime]='https://github.com/juberti-oai/rust-sdks;e2d1d1d230c6fc9df171ccb181423f957bb3c1f0;rust-sdks-%commit%/livekit-runtime'
- [nucleo-matcher]='https://github.com/helix-editor/nucleo;4253de9faabb4e5c6d81d946a5e35a90f87347ee;nucleo-%commit%/matcher'
- [nucleo]='https://github.com/helix-editor/nucleo;4253de9faabb4e5c6d81d946a5e35a90f87347ee;nucleo-%commit%'
- [ratatui]='https://github.com/nornagon/ratatui;9b2ad1298408c45918ee9f8241a6f95498cdbed2;ratatui-%commit%'
- [runfiles]='https://github.com/dzbarsky/rules_rust;b56cbaa8465e74127f1ea216f813cd377295ad81;rules_rust-%commit%/rust/runfiles'
- [tokio-tungstenite]='https://github.com/openai-oss-forks/tokio-tungstenite;132f5b39c862e3a970f731d709608b3e6276d5f6;tokio-tungstenite-%commit%'
- [tungstenite]='https://github.com/openai-oss-forks/tungstenite-rs;9200079d3b54a1ff51072e24d81fd354f085156f;tungstenite-rs-%commit%'
- [webrtc-sys-build]='https://github.com/juberti-oai/rust-sdks;e2d1d1d230c6fc9df171ccb181423f957bb3c1f0;rust-sdks-%commit%/webrtc-sys/build'
- [webrtc-sys]='https://github.com/juberti-oai/rust-sdks;e2d1d1d230c6fc9df171ccb181423f957bb3c1f0;rust-sdks-%commit%/webrtc-sys'
-)
-
-RUST_MIN_VER="1.95.0"
-
-# python3 .github/scripts/rusty_v8_bazel.py resolved-v8-crate-version
-RUSTY_V8_TAG="147.4.0"
-
-inherit cargo check-reqs toolchain-funcs
-
-CHECKREQS_MEMORY="15G"
-CHECKREQS_DISK_BUILD="20G"
-
-DESCRIPTION="Codex CLI - OpenAI's AI-powered coding agent"
-HOMEPAGE="https://github.com/openai/codex"
-
-# The crate tarball URL uses ${PV} so it auto-updates when bumping versions.
-# This tarball is generated by: https://github.com/gentoo-zh-drafts/codex/
-# See .github/workflows/crates.yml for the generation process.
-SRC_URI="
- https://github.com/openai/${PN}/archive/rust-v${PV}.tar.gz -> ${P}.tar.gz
- https://github.com/gentoo-zh-drafts/codex/releases/download/rust-v${PV}/codex-rust-v${PV}-crates.tar.xz
- amd64? (
- https://github.com/openai/codex/releases/download/rusty-v8-v${RUSTY_V8_TAG}/librusty_v8_release_x86_64-unknown-linux-musl.a.gz
- -> rusty_v8_${RUSTY_V8_TAG}_librusty_v8_release_x86_64-unknown-linux-musl.a.gz
- https://github.com/openai/codex/releases/download/rusty-v8-v${RUSTY_V8_TAG}/src_binding_release_x86_64-unknown-linux-musl.rs
- -> rusty_v8_${RUSTY_V8_TAG}_src_binding_release_x86_64-unknown-linux-musl.rs
- )
- arm64? (
- https://github.com/openai/codex/releases/download/rusty-v8-v${RUSTY_V8_TAG}/librusty_v8_release_aarch64-unknown-linux-musl.a.gz
- -> rusty_v8_${RUSTY_V8_TAG}_librusty_v8_release_aarch64-unknown-linux-musl.a.gz
- https://github.com/openai/codex/releases/download/rusty-v8-v${RUSTY_V8_TAG}/src_binding_release_aarch64-unknown-linux-musl.rs
- -> rusty_v8_${RUSTY_V8_TAG}_src_binding_release_aarch64-unknown-linux-musl.rs
- )
- ${CARGO_CRATE_URIS}
-"
-
-S="${WORKDIR}/${PN}-rust-v${PV}/codex-rs"
-
-LICENSE="Apache-2.0"
-# Dependent crate licenses
-LICENSE+="
- Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD-2 BSD Boost-1.0
- CC0-1.0 CDLA-Permissive-2.0 ISC MIT MPL-2.0 Unicode-3.0 ZLIB
-"
-SLOT="0"
-KEYWORDS="-* ~amd64 ~arm64"
-# Tests fail due to ring crate conflicts with system OpenSSL
-RESTRICT="test"
-
-DEPEND="
- dev-libs/openssl:=
- sys-apps/dbus
-"
-RDEPEND="${DEPEND}"
-BDEPEND="virtual/pkgconfig"
-
-# rust does not use *FLAGS from make.conf, silence portage warning
-QA_FLAGS_IGNORED="usr/bin/${PN}"
-
-pkg_pretend() {
- check-reqs_pkg_pretend
-}
-
-pkg_setup() {
- check-reqs_pkg_setup
- rust_pkg_setup
- if tc-is-lto; then
- export CARGO_PROFILE_RELEASE_LTO=thin
- else
- export CARGO_PROFILE_RELEASE_LTO=false
- fi
-}
-
-gen_git_crate_dir() {
- # https://github.com/gentoo/gentoo/blob/b09dd88412fe2d5eee5a8891e08bfa2d67848da3/eclass/cargo.eclass#L442
- IFS=';' read -r crate_uri commit crate_dir <<<"${GIT_CRATES[$1]}"
- echo "${WORKDIR}/${crate_dir//%commit%/${commit}}"
-}
-
-src_prepare() {
- default
-
- # Cargo resolves target-specific dependencies while building the package
- # graph, so drop this unvendored Windows-only git dependency on Linux.
- sed -i '/^appcontainer_common = { workspace = true }$/d' \
- "${S}/sandboxing/Cargo.toml" || die
-
- # Fix tokio-tungstenite's git dependency on tungstenite
- sed -i '/^\[dependencies\.tungstenite\]/,/^$/{
- s|git = "https://github.com/openai-oss-forks/tungstenite-rs"|path = "'"$(gen_git_crate_dir tungstenite)"'"|
- /^rev = /d
- }' "$(gen_git_crate_dir tokio-tungstenite)/Cargo.toml" || die
-
- # Remove the [patch.crates-io] section and add path-based patches
- sed -i '/^\[patch\.crates-io\]/,/^$/d' "${S}/Cargo.toml" || die
- sed -i '/^\[patch\."ssh:\/\/git@github\.com/,/^$/d' "${S}/Cargo.toml" || die
-
- # Add new patch section with local paths
- cat >> "${S}/Cargo.toml" <<-EOF || die
-
- [patch.crates-io]
- crossterm = { path = "$(gen_git_crate_dir crossterm)" }
- ratatui = { path = "$(gen_git_crate_dir ratatui)" }
- tokio-tungstenite = { path = "$(gen_git_crate_dir tokio-tungstenite)" }
- tungstenite = { path = "$(gen_git_crate_dir tungstenite)" }
- EOF
-}
-
-src_compile() {
- local rusty_v8_triple
- use amd64 && rusty_v8_triple=x86_64-unknown-linux-musl
- use arm64 && rusty_v8_triple=aarch64-unknown-linux-musl
-
- # codex-core trait resolution overflows rustc's default 8MiB stack
- export RUST_MIN_STACK=16777216
-
- RUSTY_V8_ARCHIVE="${DISTDIR}/rusty_v8_${RUSTY_V8_TAG}_librusty_v8_release_${rusty_v8_triple}.a.gz" \
- RUSTY_V8_SRC_BINDING_PATH="${DISTDIR}/rusty_v8_${RUSTY_V8_TAG}_src_binding_release_${rusty_v8_triple}.rs" \
- cargo_src_compile --package codex-cli
-}
-
-src_install() {
- dobin "$(cargo_target_dir)/codex"
- einstalldocs
-}
diff --git a/dev-util/gemini-cli/Manifest b/dev-util/gemini-cli/Manifest
index e410429eba93..0a8d3faf0e67 100644
--- a/dev-util/gemini-cli/Manifest
+++ b/dev-util/gemini-cli/Manifest
@@ -1,2 +1,2 @@
-DIST gemini-cli-0.58.0.zip 21066478 BLAKE2B f3a9faad6232d32179c844c47a517fece74bf68eb69ab5516fc72bc359742680ea123e7673fad9cc03ce25d0a2e4da04e650a6245aea169a4aa7e524c1baad30 SHA512 f70a3eb8547a601c6c0b5959490bf28d796ac2cb3574cc612d721e28cfebd38f9716383376c6bb9add25f5d5f04c908319894679e03e218b408e03d71e383487
DIST gemini-cli-0.59.0.zip 21069929 BLAKE2B d43f6aaa7a9431fe00688635e6cfd674fa2065d8451e791b118b2072e9177cbf1931d89357eb7ab9bfb7b53ff4af4c6492dd198d5f6de182ffd16cdebf281f67 SHA512 cac0a93040cf05dacd406f51c0ac3824df0e5c2a49f647afe305cfc9adfb00fc57f9294a168e1367b80479794742ee92db134a75c7530ecb0540f722f3ee0c51
+DIST gemini-cli-0.60.0.zip 21097612 BLAKE2B c09e62107452fb6e73ac9f4cc58f5e63552824e233f4f38955387ef6a4036715db02a2edb060e6a5c0c66a0427d7854e11328cb60ae5326161dcfda75c26ca93 SHA512 6254c42d3e8949501256c4cc9911b25c8e0760da21c0b219e9462f3d33ee822d000199c4e1620d1d79319daf37878b1e762f95aef7673eabf19cc0c92bbb5949
diff --git a/dev-util/gemini-cli/gemini-cli-0.58.0.ebuild b/dev-util/gemini-cli/gemini-cli-0.60.0.ebuild
index ffdf827492f3..ffdf827492f3 100644
--- a/dev-util/gemini-cli/gemini-cli-0.58.0.ebuild
+++ b/dev-util/gemini-cli/gemini-cli-0.60.0.ebuild
diff --git a/dev-util/google-antigravity-cli/Manifest b/dev-util/google-antigravity-cli/Manifest
index af6174e83cbb..c631796c58e9 100644
--- a/dev-util/google-antigravity-cli/Manifest
+++ b/dev-util/google-antigravity-cli/Manifest
@@ -1,6 +1,6 @@
DIST google-antigravity-cli-1.1.28_amd64.tar.gz 56914961 BLAKE2B ca86372335da5571ecc5f36569359bef127c6838e96528d128bb9849608c22ae56ae1d17585f4451024525d5777c4d7cdd76c0370fd95b7e27a3c06f15c982b9 SHA512 a855c623426fe901088bfe2b4d559b01f5b479a7c5ec0e41acfe129d4fe7deee9fbd9057072cc8e8c19ed65474cafa4f1d10fcdc14fbb85f82f20c3ec94295d4
DIST google-antigravity-cli-1.1.28_arm64.tar.gz 53365668 BLAKE2B 835278a90473bac5af32ea2a87309579c158fceb4aa19f68a4e9dd7a5c158d924200b89aa4b46d0a30ac47df4363357532fad0adfda18899f813131032260fed SHA512 2cc17c2a2dfe5c7d2f8088ac16ccfef270933c7844c3c717b3e4f4f94873f865ebddc5943508cbe54b4976c0f9dc478ca71b8c26b8c08d6758d9508788235530
-DIST google-antigravity-cli-1.2.4_amd64.tar.gz 58151273 BLAKE2B 6a2fbf4d6a379c05463e492c8cb44e6666725ba1ea69114b08b0dbd0cd4392e6fe0ba00b14eb37177fe104665208f3a4f61f1d21be20147af9515138ee4c9c20 SHA512 5811d39ec1bf96a82ed06de6b8ee2bb7f5be8d74423b8c52b6b975e8f0e2c84c6cc2fa0baf902aad942c7566509c3ba6ddb5ef076260c6a635c4616e6ae17897
-DIST google-antigravity-cli-1.2.4_arm64.tar.gz 54547529 BLAKE2B 45840f8e8498592b69a72c0afdcae6c97d4eb3bad0d4c7e755bbf1bc0b454ddc208c034181424d685399efea57866346554910b79773679acf2a04eeb530dc3e SHA512 75f9c48ca778328642f20e80bc4d4a95646ea42ce13bd31bf0c8a5d050174bd2ec4dd6cd99a4b63930586efdb38b0de87f9f562ec300d52987679b8e27aa24be
DIST google-antigravity-cli-1.2.5_amd64.tar.gz 58151164 BLAKE2B 55640838b46dedde7fb057a140bc529d162f7709074a9d9c6f4f4c7740de388e07415cd322e804035caa2e1be60afe5a744f8a908c717e565062161a5a30c615 SHA512 1f89973759ec9608983708be985d715af1669f50a43ef721a7389b9a8de78141333e18bedfef7d15d0073cbe4d6b8984c86b23d8d073cc28dd29290a781f4b65
DIST google-antigravity-cli-1.2.5_arm64.tar.gz 54531323 BLAKE2B 307d4cd7e222010760a1d29f8bbc15436312b4d870fe7725849728a8f632d1a483d667a2aef554f1e30796e6b237dcf6d293fe729d3bb36eeaeafc6dbd282493 SHA512 e11c990024b3f253fdd6ffd552e117478cb320bbf5bf2ff67a218fada718c8eeebad7cd916b691e39a3b206a09bc754d177319b002c1aaa546ab4e5ee4633bf0
+DIST google-antigravity-cli-1.2.6_amd64.tar.gz 58626363 BLAKE2B d7ab6cd61a4b2ab483f6bdb7480d9328221c15c685a6629c3e8d7974914365e001b08e0b2e822f0ed1c4f5252088da7118a036c66c34e4116ca94227d36088b4 SHA512 5e2738b6d88b106c295d8e3daa96a386e545665ec58faed94d597d2a0bc27e169cf1f913af81482dac5e091d6e3139fcb3c32c60798b5fbab7513d8232dcf787
+DIST google-antigravity-cli-1.2.6_arm64.tar.gz 55007580 BLAKE2B d253996731e096f66ec7f96bee5bb1a9837c99d2c89c92f0dd3e12d51f5b59afe4b5a4a60451ff0d2079f414cfad8141b0baeeb3de43ebf2832a36fe2c74058c SHA512 685b2c25f036a7af53b3ccca2ac6a8d1200b070bc57a2e05fa4574276c538ecff19f763ca97c232d62fc2422fe98d8760c503fc31bd49a9d7a2ed3ec11bba902
diff --git a/dev-util/google-antigravity-cli/google-antigravity-cli-1.2.4.ebuild b/dev-util/google-antigravity-cli/google-antigravity-cli-1.2.6.ebuild
index 8e036a983ed6..24bd2f674ef1 100644
--- a/dev-util/google-antigravity-cli/google-antigravity-cli-1.2.4.ebuild
+++ b/dev-util/google-antigravity-cli/google-antigravity-cli-1.2.6.ebuild
@@ -3,7 +3,7 @@
EAPI=8
-EXECUTION_ID="6085322963025920"
+EXECUTION_ID="5912685477494784"
MY_PN="${PN#google-}"
DESCRIPTION="Command-line interface for Google's Antigravity agentic development platform"
diff --git a/dev-util/kimi-code-bin/Manifest b/dev-util/kimi-code-bin/Manifest
index 7ace1d04310a..cc9e9b4431a6 100644
--- a/dev-util/kimi-code-bin/Manifest
+++ b/dev-util/kimi-code-bin/Manifest
@@ -1,4 +1,4 @@
-DIST kimi-code-bin-0.41.0-amd64.zip 64987543 BLAKE2B 8a2069bd96467d4775a3652db066c99402888998f023130aa8ef230c50d3da4a2b735945f2a83e17dc15c53a89a4bc291e9feb3922d1e0517eb77ba9f5cc4295 SHA512 0c491a54cb60fa34f59a81b13bd48294fda7c378ffcbb33bcbdd10ae0e838055c3c801b8f2a910722814e2d5db9e26d3f8487bb6ba9b7088e4a9beb1074dd77c
-DIST kimi-code-bin-0.41.0-arm64.zip 64936408 BLAKE2B 86e164c104b3171578f67017158b42f40118a143ecd9a47254e2aa94e3137b994bc2ea6b12ce5e8e3a3d1b381f413910eea33211e65a20837eadf8579ad60de1 SHA512 7c1d076ff45a7800a645ee175830f915b47811eccac87e7cbf987e255f7438f290dbcc1becaf14a833c3455ef9095df88c25f73af2e420e66e6c206d8c5b5950
DIST kimi-code-bin-0.42.0-amd64.zip 64427643 BLAKE2B 22c1ee54fd3636c1f38e55ecd88363fb41b667383be577a0477c9d9eb59cb2bfef598a503e066224c1d820f398bc4bc50aa0804dbbfb28b89ebe58ecae12c4c4 SHA512 351a0941a51ecb7a43cc48bbfe786add3c399b6d6d10564a11099506b922dbd5927429c243e48d89e3ef4ede153ea802393d079aa898742b0359e9c9cca50cd7
DIST kimi-code-bin-0.42.0-arm64.zip 64360635 BLAKE2B 42d834dbbfd4e79327a8af21f1aba64915e96d5f2793bb233661647075cb4e561b2e7010d404f2039527deed8b04782d19b41f3e4a6749feafd9390e718a9b45 SHA512 255aa63464c8e0907d06ce3b37bb523f3380ac6a407af7ea1241bfc494aeed0b20ee258fe2d8ab5fb26f256c480617459e4024f1e856f1940a2851cf16140da0
+DIST kimi-code-bin-2.0.0-amd64.zip 63171002 BLAKE2B b8268cc2d824cc28b20f857547fa998043f267780ae643820b7d0f94fb6067f88bbdc4cf3f9b4fb68429e20df27d038fd97fe64011514ee176c3154198fa3f3b SHA512 b8b4fb5dffd66a04c10af72a5d31f855dfe7e722c6e4af689f1bc7116ff3488c3f6f7b24e3289263077322f34396f2c190fb7d71a85830cf7740d6ebe1d486a5
+DIST kimi-code-bin-2.0.0-arm64.zip 63105836 BLAKE2B 48365c0ec39bd634fd0c89ade1bd3f6b43550e3fcc92e11db4b44febf605a66b7b46833397567397db8aee0bdf7cd5b7a26cffb712abb39d4142e2e1c17d6995 SHA512 20a5efacbb34321e1977c17e055dce415e4e15ba52a1956b48f2e54eeea75f8ba50a4eb212e4f11c8759281472b307e6a601edd438ea126b9d816e77cd8a7a3d
diff --git a/dev-util/kimi-code-bin/kimi-code-bin-0.41.0.ebuild b/dev-util/kimi-code-bin/kimi-code-bin-2.0.0.ebuild
index 5f1a05412c4b..5f1a05412c4b 100644
--- a/dev-util/kimi-code-bin/kimi-code-bin-0.41.0.ebuild
+++ b/dev-util/kimi-code-bin/kimi-code-bin-2.0.0.ebuild
diff --git a/dev-util/payload-dumper-go/Manifest b/dev-util/payload-dumper-go/Manifest
index 7295be3ef16b..1b481f57a68e 100644
--- a/dev-util/payload-dumper-go/Manifest
+++ b/dev-util/payload-dumper-go/Manifest
@@ -1,4 +1,2 @@
-DIST payload-dumper-go-2.0.1-deps.tar.xz 44775276 BLAKE2B a61166068b63d58a25df6ccdf79cff1771fa6be57e64ae2ddbde60600ec4b46693e97acb7377b36aa430ed8745891e4749872a07455c2d301ee9fdb14a37ed0d SHA512 c592dda7d673b564d36ee8a3d390b2fd55a30a18592193ac35b38f74655d393a893be9a3f59cc97bb3bfc3f13f55a16e47f348e0af4d6699b06f9224e7794354
-DIST payload-dumper-go-2.0.1.tar.gz 55303 BLAKE2B 9d3c4d0bf83eba9b59c94399131f552b8255831879aefc482b565ed70eb889cafe459591fa8daffb4f148541def7e334f0c2557c7fe6909db75311849208ba90 SHA512 bbd874cccf8f6a95554bd1f30f57d27ca50dc582da1bd389b221d181e31eff1730d369fba83f16e2beb63c60dd091974e3335c98e77fb11db82434dab58ea5fe
DIST payload-dumper-go-2.0.2-deps.tar.xz 44775276 BLAKE2B a61166068b63d58a25df6ccdf79cff1771fa6be57e64ae2ddbde60600ec4b46693e97acb7377b36aa430ed8745891e4749872a07455c2d301ee9fdb14a37ed0d SHA512 c592dda7d673b564d36ee8a3d390b2fd55a30a18592193ac35b38f74655d393a893be9a3f59cc97bb3bfc3f13f55a16e47f348e0af4d6699b06f9224e7794354
DIST payload-dumper-go-2.0.2.tar.gz 55489 BLAKE2B 81c3dc1d953314901cdf938444d79818816dce94b518ed20bfe15c9101b6f9a4b31d8c400c5e958fe2820daf6079f7c7f75c28e61c6d18e13936f6a5d905c0e8 SHA512 ba97fea633ceff7c1224ecbab54fe0e5b40c143fd51b29b5a4e75af7e9ad358904332a0b7f189285a7b087c4d04dd475b9e22887b82f883b03b7b60eccf73f42
diff --git a/dev-util/payload-dumper-go/files/gozstd-cgo-flags.patch b/dev-util/payload-dumper-go/files/gozstd-cgo-flags.patch
new file mode 100644
index 000000000000..db53efacd1bc
--- /dev/null
+++ b/dev-util/payload-dumper-go/files/gozstd-cgo-flags.patch
@@ -0,0 +1,16 @@
+--- a/dict.go
++++ b/dict.go
+@@ -4 +3,0 @@
+-#cgo CFLAGS: -O3
+--- a/gozstd.go
++++ b/gozstd.go
+@@ -4 +3,0 @@
+-#cgo CFLAGS: -O3
+--- a/reader.go
++++ b/reader.go
+@@ -4 +3,0 @@
+-#cgo CFLAGS: -O3
+--- a/writer.go
++++ b/writer.go
+@@ -4 +3,0 @@
+-#cgo CFLAGS: -O3
diff --git a/dev-util/payload-dumper-go/payload-dumper-go-2.0.1.ebuild b/dev-util/payload-dumper-go/payload-dumper-go-2.0.1.ebuild
deleted file mode 100644
index f50439e21fce..000000000000
--- a/dev-util/payload-dumper-go/payload-dumper-go-2.0.1.ebuild
+++ /dev/null
@@ -1,32 +0,0 @@
-# Copyright 2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit go-module
-
-DESCRIPTION="an android OTA payload dumper written in Go"
-HOMEPAGE="https://github.com/ssut/payload-dumper-go"
-SRC_URI="
- https://github.com/ssut/payload-dumper-go/archive/${PV}.tar.gz -> ${P}.tar.gz
- https://github.com/yamader/gentoo-deps/releases/download/${P}/${P}-deps.tar.xz
-"
-
-LICENSE="Apache-2.0 BSD MIT Unlicense"
-SLOT="0"
-KEYWORDS="~amd64"
-
-DEPEND="app-arch/xz-utils"
-RDEPEND="${DEPEND}"
-BDEPEND=">=dev-lang/go-1.25.0"
-
-DOCS=( CHANGELOG.md README.md )
-
-src_compile() {
- ego build
-}
-
-src_install() {
- dobin payload-dumper-go
- einstalldocs
-}
diff --git a/dev-util/payload-dumper-go/payload-dumper-go-2.0.2.ebuild b/dev-util/payload-dumper-go/payload-dumper-go-2.0.2.ebuild
index 7745514a82ff..aa428ee41915 100644
--- a/dev-util/payload-dumper-go/payload-dumper-go-2.0.2.ebuild
+++ b/dev-util/payload-dumper-go/payload-dumper-go-2.0.2.ebuild
@@ -14,7 +14,7 @@ SRC_URI="
LICENSE="Apache-2.0 BSD MIT Unlicense"
SLOT="0"
-KEYWORDS=""
+KEYWORDS="~amd64"
DEPEND="app-arch/xz-utils"
RDEPEND="${DEPEND}"
@@ -22,6 +22,12 @@ BDEPEND=">=dev-lang/go-1.27.0"
DOCS=( CHANGELOG.md README.md )
+src_prepare() {
+ # https://bugs.gentoo.org/982180
+ cd "${WORKDIR}"/go-mod/github.com/valyala/gozstd@v1.26.0 && eapply "${FILESDIR}"/gozstd-cgo-flags.patch
+ eapply_user
+}
+
src_compile() {
ego build
}
diff --git a/dev-util/tree-sitter-cli/Manifest b/dev-util/tree-sitter-cli/Manifest
index c9ac8a672421..3cad2a2bb3e8 100644
--- a/dev-util/tree-sitter-cli/Manifest
+++ b/dev-util/tree-sitter-cli/Manifest
@@ -1,18 +1,8 @@
DIST tree-sitter-0.24.3.tar.gz 3018668 BLAKE2B fa703b6250e11274d0c5ebccb741cc41f521cc5e882383d8f891369540ce6b3b4b048eddb4d0c88186e57516e2d01977e76b42352f26759b3f6093a339cc6a11 SHA512 2d934c03b0ee71419654d03bf6e4ca759b4ef3217b8837fcaef64ee5b4bc8ea8298ff685ae4aaa477b615d11d538ff960b92529b11f13e936b85bad52e369cd3
DIST tree-sitter-0.25.10-crates.tar.xz 22588224 BLAKE2B d0de9e439d7773f775d7cdc36b76a1c006d8080b238b0e9242429724d9b775d6b982f6cccce7466e0688326db4534da0ec4203c41be18d069509405825604bd4 SHA512 df228a3b5e6127105cec35e27b93bbd361b4678cf078cedbd2bfe7b5fd17233ed0d737da84b653c00dd4c9183edc6bcb4912f3721a9416d1a78733950b6fea6e
DIST tree-sitter-0.25.10.tar.gz 864648 BLAKE2B ae80d0e995cc5e3b40198caa3a7845f209f7df87948020d6b0a6669899bbeb113d852e2197cdaf1fe54944cdc8362cb73487af33960969fac087f45d33025c48 SHA512 f0465a2fabe303c1b62f1f55ed08aa57372ac11370d229adcccd99b5e8067be53e92da281cdfbcd034e2ecefb33ac90a119eeac9035670ac8fbaa4242cb87a11
-DIST tree-sitter-0.25.6-crates.tar.xz 22436600 BLAKE2B fc5a49fef2ec99e26bb2c40d5b6dee3a435e4745128a8d770bf5d536c587f9a443fca2c8e00f6a588af48e8515962482122ec3ce4f820be99292312d6e492c71 SHA512 bf08da00f7b2d599c4e03952a6b85cd587cf367623522b4defe357bf12780933b8ba5fcee6c78407c36d255ae87d2b59a9581f273d05133fcfa1397d9e70d2b1
-DIST tree-sitter-0.25.6.tar.gz 857070 BLAKE2B 3bb6b6130e1a96c96b5af4608bf60f8bbd00cbf1fdc9905b7a6169db52351c2ae3a907eca444363ab2b3185a54d0080aa487cbe252e6e015c1cd7a735e420679 SHA512 47213b68233d376e145e3f42b4674d64e7ff27436f4a028e751d9ad8494469ff67b002ce184346d3f6848df2c91386c28127827c43a8bea34da5e84f2530f02f
-DIST tree-sitter-0.25.8-crates.tar.xz 22421992 BLAKE2B 3e3d262a6b4244615a0b6f9c058ded4ba9cb0e9bd279c1da7719d3eed531e3e048e66622c7acf3417549a762558dc88115b1827ee1f990893130907b1fc881d6 SHA512 0460c6653cc6e1f0853f71d1ceba5c61c764343f30e4578587daf8c8a960ee3e19c8f21c97583b41b777c4b2e05b3d63af26969b5be9d1c07c45068b46fa72a4
-DIST tree-sitter-0.25.8.tar.gz 857462 BLAKE2B aa3f0d9056544bb6ef1127723563449c7672e06b5289e1596f2c1b5826905c578830c7e6c3bc58a91e388d647a5a5629e71f5f0af2a431e73c3be4f93ce5b6f4 SHA512 0d26d0699f61fa27b5adbc298ff53f8e0f5b9f2f1b216744200f6f50cff777c9c5a5a5b92304a4d1889fccd9d8a6dd6b7d4947bac907a91850322281f754ea53
-DIST tree-sitter-0.26.11-crates.tar.xz 19556700 BLAKE2B c8f9496a5624934a51b573d459cbac7131c9142a8790e6e4e358d6b92ff51d159c89046822406874cc4db7c14c53ecd26c296f11e1e23e17db8736f986499f9c SHA512 b5734deeb21891731eba4b527ed103ad338d6bbaf9b77748b6bd28b56a8a4bac3572e4ca446bca3504e73f8a5fb19c900cb28215636cba1aa66efc76ddfe76e2
-DIST tree-sitter-0.26.11.tar.gz 920828 BLAKE2B 6406aa003bbd4cdff00a16a20dffe24f8a3081fd0a190216b6ad5aad0393449814c7b2830017ad265ddc67ab57f4494a4fe2409f72a4cf786ce4c291795a9cd0 SHA512 2175f7d1f913fffaba7395baa7b0a3228172bdc25169d22cf3e39fa3841df1a9902031e248e417328f8ea3e48e7042d34bf85a36c8545a79ca5f7321c6b9d848
DIST tree-sitter-0.26.12-crates.tar.xz 19556700 BLAKE2B c8f9496a5624934a51b573d459cbac7131c9142a8790e6e4e358d6b92ff51d159c89046822406874cc4db7c14c53ecd26c296f11e1e23e17db8736f986499f9c SHA512 b5734deeb21891731eba4b527ed103ad338d6bbaf9b77748b6bd28b56a8a4bac3572e4ca446bca3504e73f8a5fb19c900cb28215636cba1aa66efc76ddfe76e2
DIST tree-sitter-0.26.12.tar.gz 923279 BLAKE2B 18cfd313f07272e4d7254da3ba61b9cc9e590ffa182e5d4a26ba858b3f8b286615d311ad00a9bf75ec4fea6abeefacb07539c2e4acb8cfaddbb49ae4276c523a SHA512 d0e5596b9445bf94177927f5ca6053f473bced8eee9d27f878677c37ad4e1f13d8898220c7156743b57f6c9591840c9c1accb9e1f6f54a6ac302a6875c48466b
-DIST tree-sitter-0.26.6-crates.tar.xz 21055636 BLAKE2B 08086f1456718f0a1b722b1c3878cfc7f267be536f94a474b10e02178f315ec9d93d6755c002fa8df0f0bf0eb5a6149be53f207575937f54e59669efda5bed31 SHA512 14ecb7f0e7494c38ab166209df4ad4e61f3e614232db0098fa742dc66e9a47951118a64eb8712581a3528f6ac9b681f9058a4723712ce635b6eea96fc06b1c47
-DIST tree-sitter-0.26.6.tar.gz 906770 BLAKE2B c6fcbc901f86795d6e5de5e22d4b7f34425f1f25ff9134de27baa0a68d917c376accd4a7a9d33faaee4e82e4dd7440085a06b55d5f57e5fe9756c195147867d5 SHA512 33ce5617ac53e276cccc8fa34e3a6b3e29a5bd572b381da4a7d6d78cbb7485d85120be8c0e25e02d3fbae4c36793b02bcfd788a2cdfe73f026742b184e16d572
-DIST tree-sitter-0.26.8-crates.tar.xz 21055636 BLAKE2B 08086f1456718f0a1b722b1c3878cfc7f267be536f94a474b10e02178f315ec9d93d6755c002fa8df0f0bf0eb5a6149be53f207575937f54e59669efda5bed31 SHA512 14ecb7f0e7494c38ab166209df4ad4e61f3e614232db0098fa742dc66e9a47951118a64eb8712581a3528f6ac9b681f9058a4723712ce635b6eea96fc06b1c47
-DIST tree-sitter-0.26.8.tar.gz 908286 BLAKE2B 92da23e47a25b618cf1645204455377f0cc16f5070f59356b53b088e41a0e7175f79ba3ee582388c462a188d2084b47ab21f40b0ae8ec4872c4098a2c8b4f6f3 SHA512 a5786e8235bceec2b4e8ed5ba035f143a3eabb587d33fa5d97c5e9e7a16c52b57dda72201b56c737ce3819b2d7cf53bef8852944d7a6a6ff85ea24a84fcb0042
DIST tree-sitter-0.27.0-crates.tar.xz 18616212 BLAKE2B 70e9415c2da5632d06a69be952d87c1014949b708347fb935344788bb5ddf4f1946585050c58f27ca7740db7a786d750dc8cce7bd18ce5889199580f85e51a4c SHA512 636818622923ceb8535b11ab9805af8217be9662b44cf33a3d04df08f3816954d15286c959c310c4700321264c125c56852e50b83b4e4dbe00048622f9d6491f
DIST tree-sitter-0.27.0.tar.gz 1020259 BLAKE2B 854ce5ad52d4de0d0b48187ade680f7e599bc9612e31058820fa2b79c6cd1d93e149bd2cfbef81809fa119c7e158715f707ebd1aaddc305ea4ed8bed35a4ee98 SHA512 80b29a718fa58909c57537e2ecf8e4df52384bf86ef60c15671f87d10292dfb4a2115243a505e809f02d6370f4ba0e74da0993bbc201d58593abf4819d1373ce
DIST tree-sitter-cli-0.24.3-crates.tar.xz 18883756 BLAKE2B 5a35f3c32ff53b123f2d6fceeddc93bc621ac024d26b26292a7bca7370c8a6f26292c318bebf6716924ac90123d3809c4e66afb7bcb53b531fb641cb6a686bbc SHA512 5f0670cf5c102ac4982c1c6e5a77aea39fc02a3db24eb8151d335bcac0c51cac7193fd882f17f7740465830dfe708cc88cb4a7a58047a49df15e26b2fa96b2f6
diff --git a/dev-util/tree-sitter-cli/metadata.xml b/dev-util/tree-sitter-cli/metadata.xml
index 5f33304011d5..b82a9d768074 100644
--- a/dev-util/tree-sitter-cli/metadata.xml
+++ b/dev-util/tree-sitter-cli/metadata.xml
@@ -1,5 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://docs.baldeagleos.com/dtd/metadata.dtd">
<pkgmetadata>
+ <maintainer type="person">
+ <email>arthurzam@gentoo.org</email>
+ <name>Arthur Zamarin</name>
+ </maintainer>
<origin>baldeagleos-repo</origin>
</pkgmetadata>
diff --git a/dev-util/tree-sitter-cli/tree-sitter-cli-0.25.6.ebuild b/dev-util/tree-sitter-cli/tree-sitter-cli-0.25.6.ebuild
deleted file mode 100644
index baaf2f6cd48d..000000000000
--- a/dev-util/tree-sitter-cli/tree-sitter-cli-0.25.6.ebuild
+++ /dev/null
@@ -1,34 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-CRATES=""
-RUST_MIN_VER="1.82"
-inherit cargo
-
-MY_PN=tree-sitter
-MY_P=${MY_PN}-${PV}
-
-DESCRIPTION="Command-line tool for creating and testing tree-sitter grammars"
-HOMEPAGE="https://github.com/tree-sitter/tree-sitter"
-SRC_URI="https://github.com/${MY_PN}/${MY_PN}/archive/refs/tags/v${PV}.tar.gz -> ${MY_P}.tar.gz"
-SRC_URI+=" https://github.com/gentoo-crate-dist/${MY_PN}/releases/download/v${PV}/${MY_P}-crates.tar.xz"
-S="${WORKDIR}"/${MY_P}/cli
-
-LICENSE="MIT"
-# Dependent crate licenses
-LICENSE+="
- Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD CC0-1.0 ISC LGPL-3+
- MIT MPL-2.0 Unicode-3.0 ZLIB
-"
-SLOT="0"
-KEYWORDS="amd64 arm arm64 ~loong ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"
-
-# Test seems to require files (grammar definitions) that we don't have.
-RESTRICT="test"
-
-BDEPEND="~dev-libs/tree-sitter-${PV}:="
-RDEPEND="${BDEPEND}"
-
-QA_FLAGS_IGNORED="usr/bin/${MY_PN}"
diff --git a/dev-util/tree-sitter-cli/tree-sitter-cli-0.25.8.ebuild b/dev-util/tree-sitter-cli/tree-sitter-cli-0.25.8.ebuild
deleted file mode 100644
index bf45b846f02e..000000000000
--- a/dev-util/tree-sitter-cli/tree-sitter-cli-0.25.8.ebuild
+++ /dev/null
@@ -1,36 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-CRATES="
-"
-
-RUST_MIN_VER="1.82"
-inherit cargo
-
-MY_PN=tree-sitter
-MY_P=${MY_PN}-${PV}
-
-DESCRIPTION="Command-line tool for creating and testing tree-sitter grammars"
-HOMEPAGE="https://github.com/tree-sitter/tree-sitter"
-SRC_URI="https://github.com/${MY_PN}/${MY_PN}/archive/refs/tags/v${PV}.tar.gz -> ${MY_P}.tar.gz"
-SRC_URI+=" https://github.com/gentoo-crate-dist/${MY_PN}/releases/download/v${PV}/${MY_P}-crates.tar.xz"
-S="${WORKDIR}"/${MY_P}/cli
-
-LICENSE="MIT"
-# Dependent crate licenses
-LICENSE+="
- Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD CC0-1.0 ISC LGPL-3+
- MIT MPL-2.0 Unicode-3.0 ZLIB
-"
-SLOT="0"
-KEYWORDS="amd64 arm arm64 ~loong ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"
-
-# Test seems to require files (grammar definitions) that we don't have.
-RESTRICT="test"
-
-BDEPEND="~dev-libs/tree-sitter-${PV}:="
-RDEPEND="${BDEPEND}"
-
-QA_FLAGS_IGNORED="usr/bin/${MY_PN}"
diff --git a/dev-util/tree-sitter-cli/tree-sitter-cli-0.26.11.ebuild b/dev-util/tree-sitter-cli/tree-sitter-cli-0.26.11.ebuild
deleted file mode 100644
index 5225b12874b9..000000000000
--- a/dev-util/tree-sitter-cli/tree-sitter-cli-0.26.11.ebuild
+++ /dev/null
@@ -1,38 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-CRATES=""
-RUST_MIN_VER="1.88.0"
-
-inherit cargo
-
-MY_PN="${PN/-cli}"
-MY_P=${MY_PN}-${PV}
-
-DESCRIPTION="Command-line tool for creating and testing tree-sitter grammars"
-HOMEPAGE="https://tree-sitter.github.io/"
-SRC_URI="
- https://github.com/${MY_PN}/${MY_PN}/archive/refs/tags/v${PV}.tar.gz -> ${MY_P}.tar.gz
- https://github.com/gentoo-crate-dist/${MY_PN}/releases/download/v${PV}/${MY_P}-crates.tar.xz
-"
-S="${WORKDIR}/${MY_P}/crates/cli"
-
-LICENSE="MIT"
-# Dependent crate licenses
-LICENSE+="
- Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD CC0-1.0 ISC LGPL-3+
- MIT Unicode-3.0 ZLIB
-"
-SLOT="0"
-KEYWORDS="amd64 arm arm64 ~loong ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"
-
-# Test seems to require files (grammar definitions) that we don't have.
-RESTRICT="test"
-
-QA_FLAGS_IGNORED="usr/bin/${MY_PN}"
-
-src_configure() {
- cargo_src_configure --no-default-features
-}
diff --git a/dev-util/tree-sitter-cli/tree-sitter-cli-0.26.6.ebuild b/dev-util/tree-sitter-cli/tree-sitter-cli-0.26.6.ebuild
deleted file mode 100644
index fdd27fe5aacb..000000000000
--- a/dev-util/tree-sitter-cli/tree-sitter-cli-0.26.6.ebuild
+++ /dev/null
@@ -1,43 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-CRATES=""
-RUST_MIN_VER="1.88.0"
-
-LLVM_COMPAT=( {19..22} )
-
-inherit cargo llvm-r2
-
-MY_PN="${PN/-cli}"
-MY_P=${MY_PN}-${PV}
-
-DESCRIPTION="Command-line tool for creating and testing tree-sitter grammars"
-HOMEPAGE="https://github.com/tree-sitter/tree-sitter"
-SRC_URI="
- https://github.com/${MY_PN}/${MY_PN}/archive/refs/tags/v${PV}.tar.gz -> ${MY_P}.tar.gz
- https://github.com/gentoo-crate-dist/${MY_PN}/releases/download/v${PV}/${MY_P}-crates.tar.xz
-"
-S="${WORKDIR}/${MY_P}/crates/cli"
-
-LICENSE="MIT"
-# Dependent crate licenses
-LICENSE+="
- Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD CC0-1.0 ISC LGPL-3+
- MIT Unicode-3.0 ZLIB
-"
-SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
-
-# Test seems to require files (grammar definitions) that we don't have.
-RESTRICT="test"
-
-BDEPEND="$(llvm_gen_dep 'llvm-core/clang:${LLVM_SLOT}')"
-
-QA_FLAGS_IGNORED="usr/bin/${MY_PN}"
-
-pkg_setup() {
- llvm-r2_pkg_setup
- rust_pkg_setup
-}
diff --git a/dev-util/tree-sitter-cli/tree-sitter-cli-0.26.8.ebuild b/dev-util/tree-sitter-cli/tree-sitter-cli-0.26.8.ebuild
deleted file mode 100644
index 5225b12874b9..000000000000
--- a/dev-util/tree-sitter-cli/tree-sitter-cli-0.26.8.ebuild
+++ /dev/null
@@ -1,38 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-CRATES=""
-RUST_MIN_VER="1.88.0"
-
-inherit cargo
-
-MY_PN="${PN/-cli}"
-MY_P=${MY_PN}-${PV}
-
-DESCRIPTION="Command-line tool for creating and testing tree-sitter grammars"
-HOMEPAGE="https://tree-sitter.github.io/"
-SRC_URI="
- https://github.com/${MY_PN}/${MY_PN}/archive/refs/tags/v${PV}.tar.gz -> ${MY_P}.tar.gz
- https://github.com/gentoo-crate-dist/${MY_PN}/releases/download/v${PV}/${MY_P}-crates.tar.xz
-"
-S="${WORKDIR}/${MY_P}/crates/cli"
-
-LICENSE="MIT"
-# Dependent crate licenses
-LICENSE+="
- Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD CC0-1.0 ISC LGPL-3+
- MIT Unicode-3.0 ZLIB
-"
-SLOT="0"
-KEYWORDS="amd64 arm arm64 ~loong ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"
-
-# Test seems to require files (grammar definitions) that we don't have.
-RESTRICT="test"
-
-QA_FLAGS_IGNORED="usr/bin/${MY_PN}"
-
-src_configure() {
- cargo_src_configure --no-default-features
-}
diff --git a/dev-vcs/gitcomet/Manifest b/dev-vcs/gitcomet/Manifest
index 4866decfc6f4..f4f2590ac36c 100644
--- a/dev-vcs/gitcomet/Manifest
+++ b/dev-vcs/gitcomet/Manifest
@@ -102,6 +102,7 @@ DIST cc-1.4.5.crate 101464 BLAKE2B 9a27c7e9816893d541b0ca028a458d79e084118226c4d
DIST cc-1.4.6.crate 101852 BLAKE2B bc393c814a553b6a97bf2f03668d6fe7c7652dfbeb4f118d326d1fd2d7d139df1efa82e3bc609c0d0c66f6985bc6f9640ef2f791bbfbba722f5fa9cec79edcf9 SHA512 8b4c44148f9479cb639c8d707a109feb9431fdd493eed3746fea113be61eb4389f85aefa08df71105e967f9889570d0d4a98779b6d93de406ce0dc0f651751f7
DIST cexpr-0.6.0.crate 17966 BLAKE2B cb46f066eb1f4dbac00ec86dc3e562db7ee8ea5ff17d16a60004fa020405e455b8aeb3d001f669cb33d1b62525bfd04ec657ffca4ed44a83af4a5e75b2c820e3 SHA512 766bff7ca7f9bf0885aee6f014bcfc084e7fdfcd567a49443d5340acfe8f257db109de17b24588504fc35c53f2d4303e2d22da21f73669125cfca984950cf886
DIST cfg-if-1.0.4.crate 9360 BLAKE2B beadbfb273ee97cbb6e3740891fbace57511399ad203459b66b397587d794677a9515cde4e9ec4320c3795518bf1551d72b9a889f8ac4b225168f493288b7c19 SHA512 176e04df7ba783b7143bb84397b777f5c5a1305c08a5c3a218d4a66830620be89ed68992ba27686165bcd3fb2f34b2daf80b2a1d4b481ecc267c988e84d28e9d
+DIST cfg-if-1.0.5.crate 9578 BLAKE2B 34d99ee8193178424c3fe35b33990a621d88a5ce94e9166357a3a8b49fc73ad489f56dc52af5a21aa85a416b575db4e93819f3057e44022fcd6bc4fdedc2a8df SHA512 5f93906e4703366f5b064f44c5d834cd402240a7b48cd8f72a40bf198430501f5939507c8ec5235affbdb5004ab6fd13a5680f7716544c6ecc6ae9c19512d75d
DIST cfg_aliases-0.2.2.crate 6527 BLAKE2B 4e0899cfdd5a733df2b66ae16b9f4b427ca106cf68c566e46939b7207dbde153967f0fca7b2277b6ee1d0802deb1703022d946be80d32c9eb0286222bab3237a SHA512 20d2f19d63f5ffd82e289ca4832310ca86d1bba9d626e82f8c29c80dde566f2d895c9d1c08524c954575529556d1d6f466217da69d726c55f779e097216632d1
DIST chacha20-0.10.2.crate 38197 BLAKE2B 48166059447b20d1a08b13ba02f245d2824075322183ad72147b6844afe1743ea383d778f5279ab899e8af9133e8f36975f15d83e574b2bebb337248869f32fc SHA512 520fdd68425ad8dcc11e385ac4f5343294f9d78b962aa5d4f6cd34e40bd6258631d25fe0f03218a3913bf6cde1ba83d7db16359f1c5b9d0d299cc9b088157002
DIST chrono-0.4.45.crate 240866 BLAKE2B cd8c8fb6c5ce1b89ba75e18010f0043af52e7086b444f88e00cb3d8f85cd7be219c28ebbdaea964556f805a6085d5dc5f114a9a2d428214b83e94281d0ac07af SHA512 f275b373f0f085453bd168b822a28ce6db3470cbe42f4c8b216b4320f2b460dbd2781e272eff8977b6d17ae596cb3efd3381a1cffb5e6513e6e7979681894546
@@ -111,12 +112,17 @@ DIST ciborium-ll-0.2.2.crate 14695 BLAKE2B 3c9ab0b338070359f9565706a504e4f6c6556
DIST cipher-0.4.4.crate 19073 BLAKE2B 144c45c1bdc5f7aef7f4fc63b6dd85955c453537567d1f1074e436e50d0d61f8413973cf3da207a48f1560ea92f2280fc5880569c78a1dd66bf97fd1d88ccde7 SHA512 1856d8b08bc3dbd2fa5c8b97e9eae43323c7aa19203ef3e80bb49cf15b5ddc832acb7b97121a52032656353e764f1f722200b638f7c28975fec1b5c9dc908846
DIST clang-sys-1.9.1.crate 47227 BLAKE2B da37fafd97a090355a9af85d1a52c9fcb80a80c47cb76da42298079a55a32fc3a87fe20b753453591719b54c07828d88a350049fe186226c578b6cb5ae48c415 SHA512 e9b39da85c6fb6387ccbe3c2e17971f2bbfc8cbcad271f67df0f47801d4c6777051f656f60759e6f0aa75edc8a2d3ee0ce85466864f00910435bcfbfea44b388
DIST clap-4.6.6.crate 64815 BLAKE2B 56f723802c0f95dc4c91edff9fd0435b655b85e9ad47deca2d68379fb8d5ad81ae807b670cbcfcd5348a5a2db13fe24dac05cb5761c5156d9d3bf2df29a03e11 SHA512 a594c03dcf0fad6786e86f89f9f7cd17d60c8ffe849730cb3cae4301a7ab0a7867772887b0be3cca4284cedc501bff8666bcdc1a67e58c0e723feea200f0b04a
+DIST clap-4.6.7.crate 65831 BLAKE2B e4ae6a0985c452c2840711eff47611724485533f9ebe687b25f571d23a492d05f41adf520a75e5a2c364a18e3e1a8d3d90dba19409a197842d249a8ba78f17f0 SHA512 461ba233b8d6fcbba51b74a3954bd0c83cf4a29809f8cf73a56927a04b63e973506d42eab19db83ac2ecc4a381c265569665a7d8b81dd6753ecaa544095e6f2f
DIST clap_builder-4.6.6.crate 171756 BLAKE2B ab83419f3d035461d38e4f595ee9e3322ed4b7c755a8ad74e5bc7ae4ef9a30232b659037c8830c449d1b66abf09a1f6b9f612765ccdf0b13840fc5519854e7ff SHA512 e99cc20a95c7e27caee8732c3fc8add06325749feb1c122eacfd3e75bb1a6890d50287b2de15d9ffd5580c94695bb6b4dd3105b7d13e36cbacfa699a8d2f5b33
+DIST clap_builder-4.6.7.crate 171709 BLAKE2B e0d4735f1b0d70a3f83af1555e06023a165e6dd0995e72f70d5df8a5bc2fcc2b1b4515c3257c319d983479b44925d3a3fb8253b6d928bf66e7bef99315d6b505 SHA512 b86750b56cae3f23fbece3b56a18b9c17f49b4564ffc0e3cc0d7f0af921a335f5c96f2ccb602032ca692d896d76ed2a47d72a0f10325861e69335ba8cf43eeaa
DIST clap_derive-4.6.4.crate 33533 BLAKE2B 200f69cd10fe5aa52c33b9097849f7e8776bb42e52cfe0ee9b5f42d403c12a3420a304b83e3e027fd6ecf9be38f5345f1205c051219d2c16933e02d93d5ae883 SHA512 4f7cb0f22bc6549cfd3e8111aa90a840ccc0c847d82d48d66220c8b9a507246d83e229df8c59b78549dcb83517607c58c2faa911ba8be3b736865806d8af6a07
+DIST clap_derive-4.6.7.crate 33942 BLAKE2B 0d6130cc5b7ca72e18e4451d284c7e77f6379f96b78dee1606438471e398e7995fc0b6ca94e9594a9c879430f968b3138c9a4c0b20095c153564e02f19caba45 SHA512 630d7d45654df92930db9e5bd39535f314ee4581e9a1dd7e2a067a6193828d00e7e286a14b269557d67afc9ed8f50361de8a0129673e2c478cfae66a992d9c04
DIST clap_lex-1.1.0.crate 13470 BLAKE2B 3e4895620e2922bd95ab6e3aee296457adbe70c2b3b2fca24c48e5bb700ed622401c68f494a266b91f1b82a7ee109ca90d4eee7ab6eff35e28b5fe8038398e5a SHA512 d85237e0558ebc745b08a150ba8115133b1ac1ebfbf6b2abf632863761fb70cb329639bb1c30625b9e786bb27b19438af11c123c508fb39e682f13e294ea6d9a
+DIST clap_lex-1.1.1.crate 13572 BLAKE2B 9903f72059f27fc7cfa9cba6165a78f2efcfd413bae1c582364b85aa6f850d94c91bc1c5e200e4e4dd82a6aa1731c8cfb68c0385e95533cc077c0b63486996e5 SHA512 416d1f428e8fd275b6da84c77350b405c584883a96bde775a489782dfa3df2968a9988d528dbf05fa8acbe4cbda929f5a268e48e7c26b5563c63decc83fb114f
DIST clru-0.6.3.crate 19012 BLAKE2B 1b720a67ee335e26463e528e2d4b5e1e98d08b87d6e1291a2aab8917a0f53fb45918ad5c1ae5f4d1e040c3553433229b631d6f67eeec0d952e0466846c20d21a SHA512 2b1495af78e789def0d22837c22ae60efb60d19640d6820970a7ebf8f67e967de50d7df9ead6ce44674e0a7c58debfe48cf2213bab4c773d03121fdb4fc0b46d
DIST cocoa-0.26.1.crate 43006 BLAKE2B 25628539197ebf4e243620a8200b65ad39ebe9569d83fc811357f1c6144d98969d01e32982848268b28eed57230e91934036da2df3a7234f4c5e3e0ded737a9b SHA512 2a0cf51a9344bb3533f7d0035c3512ea0b49c73dd318ff321d71af1dd671ab4a3331a57ca5b049151702b6f167d5126fbad07c05490bc4ab7ec65586294ab161
DIST cocoa-foundation-0.2.1.crate 15562 BLAKE2B 51161c7ebfa8e56ad610308efcd841a4a99bfc228a8d553b4c2be519c2ca1206d3e52891c558f2c4506224c166017772e961b5ce44eab9e6d77be3968940a201 SHA512 45b3f6535e3d5f20a5d3e56dbf9bf8aa5cdb90826bd0db824fa7d0f594ae6f54e1d291d5ab0d68b6bc9bc4a11f1689e60a6d7322db00e50f999633b132017fa2
+DIST codespan-reporting-0.11.1.crate 48963 BLAKE2B 39deb717a853ffbe3585e20a67fd7a75b62e2d796a66b5004876501fd7476acde9f126804f2ef6220ebab66821a3ccf058d544d689a2705eae44285f34b510cb SHA512 0869789f5c50d3523d3ee16a8fe64756498a13704efbe82bb0845eaa87c7b6b1d075b3b6b80567cd9fce6cb09c5179e9c07e485fd17ce56c8139ade0f8bc6844
DIST codespan-reporting-0.13.1.crate 57424 BLAKE2B c1406558bea10a66cf979d5469002520210316971d86e75379f57bf954b228dab4a93176cae1ba55e7b880021539d87c35b20488373b94fc44ebceb86e34795e SHA512 876f4ba5dc3d7d0b201f6ea25effb787e01ebffb74bad88810aae8e293c3ac264c8c58bc81a20b29150040ecb755920695457ce8c0bb4a5b382552b5b44e6497
DIST color_quant-1.1.0.crate 6649 BLAKE2B 9a2488dd00b7a33e15e05531ea49ef1961131f0be0922ba41e2d74d2b1a047daed483ac3a9dd87c847a81cce70a347395c557cad8228ab9a8dc5be7cc0f1bcaa SHA512 690c928bda4b7b57425f38ea68ac89cde2473b7a91b7e62c04a8f2c5a0fa3505e26b065d48b7ad0a8bb491f92f600f896fefdad3ce0e86e43cbf4f9a89e94201
DIST colorchoice-1.0.5.crate 8187 BLAKE2B d6415c5b337e2f4f5176003082e6e8c52f55a45ff959376e7a3f30e5aab1ecd3f84f9cc5e7a8a720398c1b58f99a07cf042695adb0b35178931178cc8d77d2e8 SHA512 af3a5e7e837b280cd8f0578d2ba2a04443d4c5a445577f444af9edeef6cdb47de134f77b07ceda76ea6b2c73b9c10e1d7e3e1beabfd22b85869585c35db88bd5
@@ -247,6 +253,7 @@ DIST gimli-0.32.3.crate 289789 BLAKE2B d2794b527c4e0fc8ba10d12711deba8606bbbbe36
DIST gitcomet-0.2.2.tar.gz 35046186 BLAKE2B 8f41ab868aa174b21700c7cfe0919b90181c7a7376198ca193b43b64080cfe08d8c308cfe2d29f6d7e7d2eb253d9f39c11e5e5baca56ac67611036546877eb2d SHA512 a5bc78616e7fe8c932aa87dc323d7628d19ffbd6940dd8ebae337b4818586a0f0c64b66d2f9b2ad7f264dbba34d7cdf9cf66102116e7cc7cf1ec17fafdaf294b
DIST gitcomet-0.2.3.tar.gz 35247747 BLAKE2B d10c9619b001b04484f77de76c80c64573c9d61e8a1f632d2c639b73277c4ca888c0b883a74b026214ed223ee9590e536e92950c110e577db13d524c4276fe42 SHA512 650b4e42df6ad3fc999b97cd0b1e963550eae1a566c51b8354717080e04899011cd5253bf99a6bfe6064f80a22e6c19d17280b7d0e31590ce6430c4b97494eb0
DIST gitcomet-0.2.4.tar.gz 34928358 BLAKE2B aa1d7e8f7f01604b29c555823aad3639f64162c9f7369abd67f9ed5254e9662619b0e3e23f0a8e75955e1d02c27efd225c3788c004a27d26914e71dbe18103dd SHA512 f17946e95aa4c4e5acac8478d30db9c987924c2d575b8539f596071190495ac8525eb7835f65dd94438ced512c42a993602f94c5868ae1708f89a91b04f47a0c
+DIST gitcomet-0.2.5.tar.gz 35034280 BLAKE2B b93af6cd7d50fe3ecf9d71bded950ae77fb425e0d6827629c2508a0d6c7ae2130dd505816b2864c55bc12fdd96f1b3097ffc261c56c650e0c28af346bed10d1f SHA512 e1ceea2c388126ef16c39bea3f5b7f05caa7aa31df6963c6c616dbc956d4a70de96eff918858108455f6b23818dc30059cbd413db7597d612825e7c7264a32d1
DIST gix-0.87.1.crate 337698 BLAKE2B 00dbbd63af415c0dc60d2aaf52c0b56de13ffd3dc411163245d8c5283e9de7aee440ea847e16afdc8547b9f16bcb384f448a311a3199229d2611957622f44187 SHA512 8d95b7ed455e920cfcd39bd56feb8f8813294dba3f965082a45257409c17b469a86dae71c71f6dd9755dfd0cba055797575191812703fb606c367cee6cd47f4e
DIST gix-actor-0.42.0.crate 12766 BLAKE2B 8fd3e6acaf31dfdee66e4de4bd2af514c3959ab9e987dd6ca007ac4c1e30ff54da3b58333af3fc80b7e1a8e0b661f93edc4e7c7bdc6cce8bea5359a6d769f3d2 SHA512 7dfb360efdee223e1f485558e4576a0cde49edd0ad36dfad79da3ba5543e4bde628c3e26f889b76fe1a64eb671a5188d299f8db59cfafcc1957646392ccac4ab
DIST gix-attributes-0.35.0.crate 27281 BLAKE2B 1c4702d756123564106d788f03a2fd1bba69178ed8dec5fc3b560afe5666631bd38293272b7c10093265b42e435c5749bd315a814b0a41179500a411d1b9546c SHA512 7643294f1752baa8d531bd720c69bdc9dc6e87a613719d316f9235c7c37561245dde2e73fb08cfa7dfbdd54f78aa38870acb801279d388ceeb1bfe7c6fc6d263
@@ -305,6 +312,7 @@ DIST gix-worktree-0.56.0.crate 25451 BLAKE2B ce57fdfe61dd5a4d229ac422e51a5b5770d
DIST gix-worktree-stream-0.36.1.crate 20796 BLAKE2B 5658f8977dd17e5cbc2bc68b47a58b2ecebf85109088e2197e0a37d4f49b672eea79a83ccb82325ecbc6dd703c0cc440e787d99c82052940a8dfc66d68b5d56d SHA512 b78c7afc4e318fab8807fad6f9be0522b854a7e0ee8e8c84b418ac0b2b390bf499217bc6bd67304377bdef6d603187b7312f9cd210d680550f2c573978bb7b50
DIST gix-zlib-0.1.0.crate 11833 BLAKE2B 3b78cb0742f22159096f04231126037926c50b081b6e9a9de0ef099fd861a2eda4058e08b08e95bae09f75ad8cd57db107b8a27da441307449a38ca92c2577f7 SHA512 b83d09ba614d926411315506ec0e8b320604104a98a50f51460d326ba67ae035376a6d0785d202f3c5adc57b6972074e569b43e6141a9a4d8f4d6c51975d51fd
DIST gl_generator-0.14.0.crate 22330 BLAKE2B d2e84bf81e7c4e2869c3e23872bd86466ede80d6fdbdadaddafb1ae9ab45672613cfda319b15720c35fc26ab103ba106a997ea6f5d4654bc9db19fb86f20d765 SHA512 98779d525a042b47ac373340c6fd2e019a670a5bce643128ae2cde2021c0bc8b2253064819c2b0ff444e62bfb3679dc70f11f268c660050cc891063ed6b45fd0
+DIST glam-0.30.10.crate 773605 BLAKE2B 0c39cb0ac58b4edc38ca520d596a49b87adb1de2eb79df8c90580b68501fc41edfbf28eca7b94b6442d0756c80516fb85ac6427cddba58ef893f4c3f2c69d657 SHA512 a2d5bca8663fcce8e4d7b10949000c2c78e5242d0f77de5945816c9097fe9446ee7e9c930681779bb91f91bbc5232efc70e81f8e3442e3f3e1c9de55f87e4140
DIST glob-0.3.4.crate 23511 BLAKE2B fd5c4200c0c9c3bd388bc65b6146ab09a181b94ea3248f188f932760e75cc8406d3ceed07fd7ee20d72e98050405a396a58dc068887cae3203848ed51875783d SHA512 aa836d52b772c6bbd2c2749995720aa50b3e8360d9c89c7f5ca29dafb21543647a4b21dec4d05a26611255073bd7fd560549a9b42f55e6b8cf562049254d2184
DIST glow-0.17.0.crate 165357 BLAKE2B fa84796cd0b0cadf12f574fb503c9711cab7d3292bf442a0d4e8098a5916371e90055e202a9ae2a5f86ddf4bac3efd329d1dbaa46ed28df6686d36c5594a6e32 SHA512 23754db2d002885ea0e724d9aa7cb9b60f8a06f3ab96d4a5ff68b4228e427931a54596177b977cd2e571e264d53db70f63fbebf7e4470d35ba125f25e433097e
DIST glutin_wgl_sys-0.6.1.crate 5567 BLAKE2B adad4f95ec313401d8b704c75cf8e72ceedf602326bbf5f58ee2f4c34e10f38c2c087fb466ca67a3573acd6b13817e1e3309e20932e7e2ad5cf71a4759ca9790 SHA512 7c2ba7aed3e583fbf130034c51d17415f1e76f591a24be6894dc7f0e6aff1e657b751e51423974d7613aa34ee76b6a7c7bfc0ba05db4b5d04e2dee4805402df0
@@ -312,6 +320,7 @@ DIST gpu-allocator-0.28.0.crate 54791 BLAKE2B 4f73fcf396648ffd96571c7f2fd7895a61
DIST gpu-descriptor-0.3.2.crate 7943 BLAKE2B 1748c343f15cf2679c3d63d417c7798ab3a57b62e36ea68225212f7d5108c56e0af062a3a6590d9f73c3f314d292ef56fd160496fc24d7325cd73ab6cd824ece SHA512 f4f6bb53c50605085f294208692eb4bf0f3f63eba00207c89e1a378ce04aa8198b3750adea6f974b9c3552d12246516bd0a054397e4c5d2c7eeef561424fdee3
DIST gpu-descriptor-types-0.2.0.crate 2169 BLAKE2B 4180fff08f52ced71b85926d9806a28eb71c25d6d16a1649ec2e02c1f87e8bb36a2a0d664d7c46e2b57b1934fc3b319e74109f87f5c7d22184646d7e137ee75a SHA512 10161c1495a6ae0c0942a3a28120b7d0e572e0226b639f473816d642139a72141851bfded267298f6bfde99391ee355066bb3af7dd5b013428c7b5376ce19b11
DIST gpui-ce-28faf28fbb1478a4cb030c6938c2cd553378e02e.gh.tar.gz 7084173 BLAKE2B 21af789e18603b187768be796597fabef6e495c72bae5022565e307801719c8fb2abedf906c531c6f39ce89f2f967c27cf0df4aaa9a8e7c2f7de6ab99b75d17d SHA512 9618214fd931bf0a91e1e05d4a3fb71c989b7b2f747f47ba386bb589aaeb825c48f0ed7e120d28db3620749392cfebcfa45cde2c4f3cbdbd4499b2d86ec27de3
+DIST gpui-ce-711bd061b2074cde09fde053f7254546bbb9e73d.gh.tar.gz 7166349 BLAKE2B 2697df7a63a5b6e2a327d60c49c0b65b0152dd36124474570dc7e1183ba649c864db677d20ed60d82fbfb3c3f9bd9354d1608de367b55f738c142b50f151e0f5 SHA512 c79871cb53a8352f61f425823d6e28004ec98e476e18855fc2c0661bf5e38d31454cca8bcc23da1a44cb9cf2302b5811e52dbb87ca7bb16be83e5cf2b11b26c4
DIST gpui-ce-bd33290a612c700e008753ff9ae28f735c9cfa40.gh.tar.gz 6915160 BLAKE2B ec26c9c210f5379fc9b0f3de4e51aa45b3ff55ada3715811731fa1b4150255859fe4f59406992f3ac5ca63a9a4d6b07f8e4cf11996f869b885023237c65ecd84 SHA512 3172cb6c9f223837e0248a0afff143c03eacf32842c6296c42cd1e7efd36912fd91cfbe1008e47adcecf4264186ca45ef697f53c211d31de668042f3cbd42f57
DIST gpui-ce-e1ed786d11dec168479330bc3a7a15b5cbb22bac.gh.tar.gz 7082928 BLAKE2B dd49f2f3e5d62314dc5d160e94441062745b3334a7e15d3229a5517dfead316b06195f3ac7b093d6e04fc4d59ba3fb12a4d29a9496c82217b35e7cd328bdb025 SHA512 582ab8bed6bf6eed33cb3bb2e516fc9994551bf9fcce465c6567d958a2e054a3a6f2816538180fa18f88b35ffb4621314346b97b97d2b21edea8f12051b2ceb8
DIST grid-1.0.1.crate 28149 BLAKE2B bfbf1e335d4b360bdcdb810e0d507d2403f755fcc9473d919d2204f3b79576d4b1dda3655964fadbeedc18bc923c34a96e6e9792d0a787bbfe23ea47610ac458 SHA512 52c7193b3da5f0ab761766b02a5c1a7920afe5cfcdee9e3b06891bd2f27cfbe0162deee0dd2c1f5c4067460ddf8513213d1c7213eaecbe0efbe3db867936aced
@@ -437,9 +446,11 @@ DIST moxcms-0.8.1.crate 188252 BLAKE2B d0aa0040b51eafd0946844e097b6caa4d48e6f466
DIST multiversion-0.9.0.crate 18538 BLAKE2B bdc85da16d38ba791e4c7b458226b363918ba2632f1dcdb171b1f6f37e1f3954f0b2e2a3b637740607f2e14e84ad066061596f8cda4baf900669d84c5d590970 SHA512 30907b7164fc006cd8de386a67d86bc26bb1d17dcea47fb19e6b968b24add27243d9ef477c1048047a3538431ef17fe2ac5d7e05a1a942f35aab76cc935cb942
DIST multiversion-macros-0.9.0.crate 15865 BLAKE2B 3b28db0537cdeb6e8ba7d7e84b741c2a760b5c9b66afba12338013f9e62ce981dc1575ffb08f2528cf5dfbc1f0431a3a6d92f0e948978ccf0c148bf6e1c6c370 SHA512 f0b9a5801d7f9d77a0a4cf9ba5082538700536b98342f2f1db8df6d31d9b86eb6e04d103a676ed2f59f1937027a2f2899ca6db4942c7f8060e18eac7a507c318
DIST multiversion_no_op-1.0.0.crate 6077 BLAKE2B 97462536572d0ae664d0ccab1372b1f18e8779ccc1c99325fb2d2f597d1fba8968da1f4998d9918c635f30ad5328ea925ddd0d335d4ec11963c178bc2af71f01 SHA512 2ce44982fd1814b895c5dfa450739f60c58647633ce6a630a267e2fc327136e0ac23a0a0064ef80361f8d65f57fbbbf0b3dd2bdf78289f457ec26f5b303b3eea
+DIST naga-24.0.0.crate 644372 BLAKE2B 45a9dec91170bda575866f299c4770087ff79d82b6a27af01ba1c0b588dc9bd406c1548abe561b47bd16ac4aa25ce084e3fe5af9b836297e34984fba60371e90 SHA512 0b95a2202b245a86c519e777f3623bb396e0f9663298bb9898d79a791393eab4ee4bfc72ec4d29a2086c9bb6415334d5c28c9e4e27a88eb56a19c7d7a35d79bc
DIST naga-29.0.4.crate 842943 BLAKE2B aca7408fc81236d84111518b7c16c4024e29b612ee52598d8ea08c805ef139d07194f55eb8aa5ab59b505fee63b817356304498b1a4b8eade93949d97a2f3957 SHA512 a8d676d3d11aae40809d916b6e9ecaac4578b40438cb311dff9775791cbfdd6fdcdf894692e883d01fd53e286b533afa06a4b4fbe335b2b7940098f22fc54489
DIST ndk-sys-0.6.0+11769913.crate 329984 BLAKE2B a837bb5fc74dfe13f20f1923f1882257dd23b2d9eb57bf516696c391f48a2ad3a72be8062f7b957e2b25f00f729dc9f5da2b2c0942c43e7f2f3e844100281f11 SHA512 3f7a26aef2e220a5a98fa94e9770c0d865653b5c23331b8a6652819176be5d319d589050d4fb68a12ab3a4a87650aa5f30c7f50582fd097a411ab763f3359112
DIST new_debug_unreachable-1.0.6.crate 2582 BLAKE2B 2ac3dd86f1a532832a40ccfda95654e43709a62faebb8182c87309827afdd23e6d3f250f2345f044cb789015c30b7907be63253b487d368e68c4fdbc7de20492 SHA512 73a61acbc9b20b3595925360827ba8798f3338471b291fa37c72a1c9505b3ec9f688808fcaac9a2eb494e5f3ea5331d30545d5f21f89559111bec6126ac90b48
+DIST nix-0.31.3.crate 347476 BLAKE2B 36668bf2510dec6047003f9aadad9144b95718685865fb5a0907d75fbea3b4fda69879352e8c371f4ba9887266f2790a51fde504f018001de7050cee19004e39 SHA512 199e8f56355ab115c86a3e166c9cf53b4656a39b4643de69b34658ea74a6d91a94c08bd4d8a06a0e4dceb4cd014ea8df326c12d20b9bdae06030910cdd583643
DIST no_std_io2-0.9.4.crate 37503 BLAKE2B 0c475985a48576f8afc5a04709e20460b0eea7aa91bf4a8a00e31635f58b3637c902bcb98b072d74fada4961cdfa00957eb10117eac7d24451a28308160fc7dc SHA512 61ca87494508342be3b0447dfc8b0e11a1eb3aa9ed48b8c951a3ddc50781a1395afdf34acc26eb1e63f1d891a40efd7abb2eac71f48e5b0d0e3fd708e82e31e2
DIST nom-7.1.3.crate 117570 BLAKE2B 5643b67990b7305e101b16b8cd27c447e162a7adc6d0dfac00920b0cb50fea98c9d4edca63c34f6845cba05f8d0acb407cf3045cf64a4cb28e53c8b6bc9090cf SHA512 1ffce08dde299bc0e0367ad59c7b6a83e23decfa11115ee076ab91ec53cdd9ef37e4c2103c96eff23a7b6b8b5c3f67c83ce1917928c7d4c6462083bdfa0c9cad
DIST nom-8.0.0.crate 135590 BLAKE2B c97f47d8c59f6607517278afeca45949a1ed61c1c178c2cb4a990a3439a532e544e5d3d4732e9abb87d93731b65379ab13e44297cd2573e543bf85958d7034d7 SHA512 7634276cf799b0260e4f82818e297001101c84961b498552ee19d2b2bd7b7be3621ce7fbfa9d85c4531c650448b2d32326ecef28f8282b016f5a504e69783cb6
@@ -468,6 +479,7 @@ DIST objc2-app-kit-0.2.2.crate 337435 BLAKE2B 470a0f4e1766e24db45ffe8fd1366cdcc1
DIST objc2-app-kit-0.3.2.crate 531744 BLAKE2B 15cf7bde5ba233bd813f83f6cbcea9c08f4231ffc7aca0b0c4460a3e72bcd9695b624126319b44996f1812c1fc19b05a8f841ae05ed073f107008b1ed021200a SHA512 44174170875c27ff82f097d5b50cbc9629583ff5817f9d721e40f9d38462494461aebcf3fd0376b90cad887b1c1369f3c1c4a7e34d73d32ac90e94d44d6378dd
DIST objc2-core-data-0.2.2.crate 30575 BLAKE2B ad42cc40d212a97372833e3c9d4b3d79972dfec4f527b1cff2752cc77ca845b558ca02cb550bc51f498b276e99efc7408a038028bcf20d1244f73f9dbe599764 SHA512 f63a8098d8a29752433611acce935f34bd58dbe559002ef49397a08794998e6817229aca0a230d00f08c23c86424f1cfd1eef3a8cb01d3c3cecbaacbc8fbe6e9
DIST objc2-core-foundation-0.3.2.crate 180804 BLAKE2B aa6fc89d58cc9d465e2f439406a5f7c1e76996672306dd70a4c5faf535c75938bd4d1da96b5c99f2d99550687524824b60076130dd4d9dec974ba77980a374d1 SHA512 b1a5f5201bf0b3f6e93bbb0b71d285d6c162e644b748504f58bc05c92299848bcc785c1159072959129bb575978e4091cb937203e8e90a4ebe1519b7b8b6e402
+DIST objc2-core-graphics-0.3.2.crate 84981 BLAKE2B 9dc923f8c3733c56c51750d5a6a9c34245f145a30351689126405825baa3163928b1f07bb1e35c539b3e944991139fe28874c644db37f5dbb171f8a1709dfc33 SHA512 1f61d4bd79f8b19d8cfeba6f7bef1ca40615684075461c080b45487362ba685dc5b3aa1edf98db9e0c19325550feac5627b152161a47d9985f3dd596421e7d58
DIST objc2-core-image-0.2.2.crate 20050 BLAKE2B e1cdacdc0c90bd277b281085fc5c3baa61b64da921a82157b38e2cd258cd8c8aae04d649c4a99dc8174ac9d27cb3534beb824a03c20a137b46de00146eb770e7 SHA512 65f61850be62ae0d8d01ff5ba1b948ca95672367ba32dcea4fa59288fbde38fdbd9bd49dd8bcb4aa58cfb37856c2eb16355aa4626a9fd1278177cc6a73c94fe8
DIST objc2-core-location-0.3.2.crate 17032 BLAKE2B 50e4fabad217bff3943d404b2f4cf5874d3066c381b4ca5835ed8ec5ad2a83d68963fcc4d20b1860d21370073d2cdcd781a77d8aebc93ce3835a1d4961f3725a SHA512 98726ac52401ea567ed9f05fb9b461012945e4886ccd2161d8d04bd2b950db13d622c8da6073c0f617824c17b4a0b3cf905badb86da653b47f2ecb315fd2502f
DIST objc2-core-services-0.3.2.crate 122193 BLAKE2B 21eb26253cf9b1c822f3b11bf92cf4cd9519c4a877bd3004ca82fff7e35e15c0afb7e689f65e9785a5d3f0fc03b460ec7229a3215c6808df3dc325874c192325 SHA512 e9d19869e7a5c9e10c9802d7d12d318cf98951ab1e901507b750763efe5eb914a09bb36cdece3a56ebc9240f83d7e910f41a9995181eabd4dae3a1a8588b6e35
@@ -540,6 +552,7 @@ DIST prettyplease-0.2.37.crate 72033 BLAKE2B 997c8d855023ba6dcc7aa3a8f1c0ac6f6ca
DIST prettyplease-0.3.0.crate 72002 BLAKE2B a888b6832e037eff2d92ab79aadc08993a9866ba688f27cc8a688a8081a6595767fe587a7f2a6dad0b6c1e275cf8bdf0042172e82d4766820160e9f87f516a86 SHA512 3ed3dcc1aa543e0b5c888956cea6304add395494684c1844bb469e3c02b29863da6a42ccedcaf851eb19a27b426634c2b8c5571ed805d8d272f9829d8c481b80
DIST proc-macro-crate-3.5.0.crate 12709 BLAKE2B 693372efbded5ff45bfc4bd2dfe4bbc28ef939485e88b57076d92c99fce2824dca88373b1ce9e6517e313f2402885cf470028cf7e619eaa291519b8eacf697d5 SHA512 8848a2234e503414f9e5e90e7ae6e8141b743205c1bdf31cc5211781414c8619b617bf78b61d880178fa1d7e0d1cb172ac03695d9f8c611619e953a1fbd0353f
DIST proc-macro2-1.0.107.crate 59588 BLAKE2B 91df0c573e3e1f09c1aeedcad0381cf18186d72c3d50b077b1d232fbb67d1c87ed09f3c6dc515140041c2dab5ce7706042c8235b93099df7d1c962d4a3a99160 SHA512 c109d5509624a57156e0eae22a3aec89a1a163623e8b4e376a13d872a46e4bf6855ee3cd4428c07cdf5c22f2284b6ce755f9cc7e075480e4587ce4f2d40fa903
+DIST process-wrap-10.0.0.crate 201085 BLAKE2B c3b3d435cd69b0c6cb2503f8f00dad31582eb7fed0d86700a9af254850fc4580f803860126d421d90d13b1d54b9adfda06aa1947e9d5cc1a1c44a2898fe81618 SHA512 b148dfbae8d1344edb3e52dbfc05027c7582577783aa72f362abef9b372093c4e280760d8019f1a2e893a4c4a4f8d6b5413c3af007a8c0893d4a2e4eb33edae5
DIST prodash-31.0.0.crate 95697 BLAKE2B 5d1510a56960114692224242fe99c358f252de66f7ce0c5e732b47e4e8e910fad9c286dc16bfed4dd9932b6654627e59aeae57c687c8ef52ba14ca7d420b607f SHA512 d0cc1d00fdbac3c5aebb6ea153c62b5e0a42a4d8fe751156bdbf429d218f4461f0521f8d0902050d90e13fd647c3b95c8cc2518d8abbc2e5c9f85bc851c49a5d
DIST profiling-1.0.18.crate 11931 BLAKE2B 658fb4b5b013f74fcfcc2a6f70fbf8d26258966110d0738ca156e9fb30a69ead7774354df5a76f7e46bd9807bca7ddaf4e55a306c4c5674bfebaf7d221696e65 SHA512 2775a751e4ce838da6958f2ec8c4ff15756b38e5ac6d4d0463eeeb85bcbb840bcb1bc70f5be05128f3e9f7e664405ba0d375b1703c66a270b261513b3550c1a8
DIST profiling-procmacros-1.0.18.crate 6333 BLAKE2B 6a646dc880c304019d53d214e0d5dba7dfba158f23380ad1a8a626191f7754a935b4db2cf4dbc33b95957f124dd17f3eff71f9ecb8896808eb381e0d3a55d92a SHA512 edaebc3cb8cce300368379d27d7342dc8d269fb90517a75c89eb27aeb8be53ae1007b79c981bcfb2c07a509df27a6f1ea7ce7f1eedd769c858bdbb8939b93565
@@ -580,6 +593,7 @@ DIST read-fonts-0.44.0.crate 585175 BLAKE2B 6c7c577daf2eb308590a4dd1f406dd822480
DIST reborrow-0.5.5.crate 3789 BLAKE2B fe9dc9308f9ba42779d46a4e329068f75ca401ad17ff497f0f04710eed3392a11c316e76223b6e0b6f3d5ddee5e2382acc8307de930f17ecff36e47570b3a58c SHA512 86323b500ecbe862634f5a85d494bfb8b67398a3d704882e29826c47ec03d496f3bc4d8b35d55b530f6034a750c716e2628283bb68fa4ea612bda5f963f5c9f3
DIST redox_syscall-0.5.18.crate 30747 BLAKE2B b9507a055aa34178982f0b5861602d2e11e13c2604f905c9b747c39aa6c45f06e60cf5c9d17d914712a815fc5e9ad75bf648c300e7265fd4afbac0b0c207afa6 SHA512 69f1cfb215666f1243616366711dbd8cadd6bb411121f48f6e4ffd7b25479efa6f900dd072d7cc6e6fb8130d95cdb42f4c0cb4ba9e05b09b1fa676ca32932101
DIST redox_users-0.5.2.crate 17280 BLAKE2B 7dcb0b6727d4d4a9b2e3b9a2410a53eaa1b0cca807010446f36a658f062f0f33b07475e61f549922a7c5ef4e7ee3693fc154ba33bf7aec710c8053d03ae284ed SHA512 0468d42c9a5aa9b8811d00b4126115bd7e92f96af4ee136cf5387939474e351fa2c01251473691aeb34f5e4c8e8804938adf1bc83b5edffb6d06869b4b816b7b
+DIST redox_users-0.5.3.crate 17311 BLAKE2B 93f1f116a2edebf743a57b652c7dfdd30404b4cb55d41cd56b62a959c0372c122aae011f692fbe7ff0dff649e557752577e36299616c6a642d1423186c621112 SHA512 85bb7fa22e402252b3e2fbcab9ed3c12a00cd92bc3c0c0868bcd9cd8c4e32e462c10f7aebcfd9f366b9d92c97a2f033929346199990caebf2dd47f4f4f4a3549
DIST ref-cast-1.0.27.crate 15335 BLAKE2B dfb8ee43a77e14e0f7536347fd89a8626191c15ecc37d4a416fbf48abd53bd375f8c35c4dcd16dda4153ebe432d6e3dc9794e17f80a6a58fb034922c5a20dea9 SHA512 63e91b7eccfc9a57e7fea571c8ba1ffc5f3f937e4238ac1d3753173cfc4c5493b0901ae38a39f90dcaaccf9b8311ba077a508602aaa182b5ccb1bbe48af15e58
DIST ref-cast-impl-1.0.27.crate 10194 BLAKE2B 613d0ba2da8110ca6f5f04c33bbd7dba3919f7089795581644fcc70c8bc859c43e81af026ee57f3bd104240473313ba9b1419386fe6c8a580dc3ccf9286b2f85 SHA512 2d01ff2de4b61ddb4d779e0a078442c1651ab4d424a6a6162dcb8c2f9e3e31fd8aa0c5de364e3e8fa0701a2a41f3671fb3117bf249089918ba5209ad97936c0b
DIST regex-1.13.1.crate 157118 BLAKE2B 8dc2137c2c7305a8696d6925a462c0ed7d1068cebbfe5cb3d738e2f7ecd0b3de5e535545510811af65abb381190b9dc58786f0d3645da7cd7e529e4fabb3d65a SHA512 90739303281da8a468255dde08988ccd99b21ee19df5cd3a6e802c2213d9f06b9d5001a045a76230a313aa7c62909d2cc38940512ccf5d8a4193781f05bd73fd
@@ -595,10 +609,14 @@ DIST rustc-demangle-0.1.28.crate 30857 BLAKE2B 31b6d585541db03aca743eca652bdc082
DIST rustc-hash-1.1.0.crate 9331 BLAKE2B 16ac56622897f47a06b661fb59a196b08d48e782ab87549c8bd5c6fe92f374c9bfd44dcb36588512bd9b6125c2fd79a12d648aaa308fd9694bcca3a7c1b49ac9 SHA512 84e673ea9b046f7b989d47f2c4505557fbd5de991e6fc9f56a03605d40e0b4ba5427cd566954890153cc033ccbec6c984306634571935bfe0d4cdfbe56f39544
DIST rustc-hash-2.1.3.crate 14811 BLAKE2B 97f5d4a011d8488d382d34f53a387969e815d278e798cc04daec21a2b7d074bcbf7ad939b55214d6bcdf1fe97a92f8dc88f5059b37660af8cebbf8bf243796bc SHA512 d44c38f6775b77b5841a644c53a68c09a2f98541aafd809d385b854f385bbba86399aa4fc76bb3dfadd2cba64ec688db22bd353e1ae4de81e0f6e9d36f0cf629
DIST rustc_version-0.4.1.crate 12245 BLAKE2B 0ed627c560d88e5ade830cc5f72c62f6ba88be3e30d0f8db34761fcd0b284e5b2fc063c240149aabdfb12c8410ecdbe50cb10a3544500b5a020f95a31cd6709c SHA512 7aa8a487ca7411b6d23cae62f7568fa3474a7b1fd1589621071be3428a550ed3b7c4ad68277a8f86849e5900397d7d0e9d678f5d423742a045dc7c660fa6c598
+DIST rustfs-mimalloc-0.5.4.crate 13441 BLAKE2B 0f23ceaaf2265abf12827d8272da9e97b90ac93cb63d1e36194989101fa6f2c8d910e40850f0352f207b317de32866008aea7dbccf9af804b6ee11398ac57bf4 SHA512 ad7cd152be276e15ea8b5fdcf43de3b676a21cf6631cae3d083b2ab39b793cb9f2586fc74e33aa6f9802ca85d3c7872d1440e962f17eb0fa46ffacde4d440cf3
+DIST rustfs-mimalloc-sys-0.5.4.crate 252195 BLAKE2B 82613041b178942ead3dc74ee9548ff9c9437e481a9ac694aada46c36130fcd39a373495377cb4f1cbcf157044f309ae28d3096ad0a364623e5bf0401d4a6e96 SHA512 cfdb542570705f2a7848516aefe6c4743b2b253a11bd806678ad64c29347629c33e23d3f1fa842d59d78b353e19068359fc4d6e5d3504737c70dca8044838f27
DIST rustix-1.1.4.crate 425241 BLAKE2B d0d710cecb9b20fa755e61a27d23b946a5b860211a9e63f34cfde2012bca2b9cc6952b546444a8a06a97ab8bb5817f87fd7fcdc7e3075640fbdb86f189f7f443 SHA512 33619ed2434963a98b0846414656bcc4945ca0e9b883821869fe0cc86db4a74c6961ce1375963ae49c6b5044ad0536eda807dac1320209739c9d669bd80fd75c
+DIST rustix-1.1.5.crate 425681 BLAKE2B 89bb51007ef46a0f9f10af95fb2486b810bb238ca7f876047dea4c43b444785ae5a32b1447212f18f207b53c7b8a61cd213b338342300b8399b300af65ea295a SHA512 ec72cb0c867b7d184c06e45def67b1e333a5d4b6ae3b3cbce620afd844f3765460832ce907786359b75279b8ea6cfbdae350a8dd197d58eaffff71a3b2e2e08d
DIST rustix-openpty-0.2.0.crate 12888 BLAKE2B 81e349f880e029afbd25133d93e202fae0a0d7c210bd4e88f00280c3225682598307a15b783b797c4e6820fff0c0fef3342c359de1536e8e70ddcd5c6e254420 SHA512 a47720a711c03e90fabc331b63215a0314a099865f5862a1be7a9d89ce5f90a1492b55532917d2c29eeabf5a68560af546a3e9b20214c964b2c6be1c49c2e64d
DIST rustls-0.23.43.crate 375868 BLAKE2B f0107d4bb6e57d34c417ca484997d2ad023ee2a8b14709fcb5d12d07f09e7afe24cc981b078958d103d5aecaf715a00419e311b893831ea7d74f3059139a3e4b SHA512 7d39bb7415cc97071795dc5b8ab1216a8fc3283de9af0afe457d7ed078b0a82eff47a740fd79a88ea90bbeca7d43f797f70678df894400ed25e1418d5be278a2
DIST rustls-0.23.44.crate 377662 BLAKE2B 0bfe4d9a979563a43a4ed24c830ff4830553fd8a644c77cad332fc1a2ed3591388b4cd52dfff4a11ccf2a85a98fa955b4a2e50c5055cf3998f4a2e8913192131 SHA512 620633d82a16969aeef7d30829cf715759fffb421bfad70e0154a9ceae0f538e8ff21dd58774a762ea8b822fac87638e7772fee8ff5128b73cbedb376371f875
+DIST rustls-0.23.45.crate 378933 BLAKE2B 1d1847efcd11e56eadf5cace78f09bc5504f823a5e5e7092dfbb6cfb83922e6784971646f069dc3e9f5ec29a0a2d4d463112ebecf5a51304c649ea08d571f14c SHA512 d129106d690b620090c58c34ab9216e4ad697e5343865886411731e77a746eafb524770072653f16b4489f66696d366fc7b84cbdb5b65951c5f4f14832449389
DIST rustls-pki-types-1.15.1.crate 39322 BLAKE2B 4783e31b560ca780d7c6c205387b2d8178d6865d3aa3e4988ab91b236c13f3cab94cf8df09e21afc65889b843047c528f437093683fcf30502b3f0b23b9c059f SHA512 48553a2962d98f80bb65faf4e2f5d7016587c22e4a8847fc67ba8f92355645fdf4b3e764330fe87ac7e460d0c491970cb74aabbea14e24f9d51da560ea3c8940
DIST rustls-webpki-0.103.15.crate 87465 BLAKE2B 4d2349654fdf88019eb6f5048eb17589ecb7cd364936805b2d349d52403bacc5bff1519f3cb69332a927435d9d694a37ac5a50969943d9c17586d3ac3432045f SHA512 adeb7c379e9b691e044d497768959bab9c8f291c21f93e9f5373ab0639e9070258945e2bd0be4e8eb8fca98c3824e942033d6430d15134f8fe8ff3a1c4d98382
DIST rustversion-1.0.23.crate 21013 BLAKE2B 80c4938e8663b095668809e4c81f4621582c4951b8b42eecbecedf5577e7555bf80944b6753101f5f87bba6f9856781e402ffd952600820b1c5830a181066798 SHA512 95baec2c1d8475661677ea35a724c392ed10b1151a1f4522b44133c6d691824bf4a42327ebc9d631a1f64f944dc721843e0aa0e19354fc4fab89aa048f1c68f5
@@ -646,6 +664,8 @@ DIST smallvec-1.16.0.crate 32647 BLAKE2B 6900b277f34cd8faab7125b463fd0fd111ba403
DIST smallvec-1.16.1.crate 32694 BLAKE2B 98b4081897a11c1650df52432d876dc73a5844399e3b86deeed6f3228b6fc0fa5e1f71174867df3a88e89a1e002d9a8b23ac048861791aebc42d62f5a28fc6d6 SHA512 0132d4937de57af8d09582909e3e4ee4f246c895c952a7b5f80bcb797438df49b01cb37c26264fbd1f875fc237d4db8338300334062cc0aeadcd169984e7241e
DIST smol-2.0.2.crate 275552 BLAKE2B 531ca449641c705875a5d977db808d0285d11dcbb744decf0734c4bc64eceb984dd05b4af36d7620901885a8b5f051706b9611c95da836fdda878d195cb0595c SHA512 094bc7e58323cf740a6989c642b81dd3d539a9bc20e5ce9bc7434878abd3adc52505d5ef666177bdd995fbdfcf29f0d4a650fef77b57e0328dfa9cb658b51a12
DIST smol_str-0.3.6.crate 26335 BLAKE2B ba92b9082b3b68d01e4b70710d91a0924cd85d1cdc5d5ac410f090377bd9d8a7b1efe0ef4134c5e6d0a70d2377fa451c1933acf5be25663bd4b71fa20803cf12 SHA512 d6e12584863803ece3b9bc26305572a8a3bac5fa334cbfd4bd598f5a203a0611399332d5bcdf102b470e11992c7a80f4b955684fb267c75b7aebc3e32542150c
+DIST snafu-0.8.9.crate 74002 BLAKE2B 7c02086f97a8fc9c2569ee473bc0762e22b740439d95952dbefbfda437fdc7a27389ea8f737a78e3710bfba955c98ff4ded0363f9a251b7ac78b37cd03669928 SHA512 a594f74e2ecffc2ab153a8f885a543b1c16390915b249b85c9ffd487df57ee4fd1d2eb4622f24d0d8d8f98062b81161f376e5108e7bad7aa7e244de295b32d17
+DIST snafu-derive-0.8.9.crate 29478 BLAKE2B 2c6d57bf7e725ad4f5632d291be32e44ff7c2a419da4d8075099af63d318326e22d4744be07d3bd090d8bd1ee54ee3010781863dfd53fda2790c60002b45744a SHA512 1a3d2422ed3df1fdc82c63a3b38b6aee5cc1bc2d930434d5df1075887604241c93ec3bd6e9480a725a25ae7a38cd84b6d675582a01946512a191eb61089aa302
DIST spin-0.12.3.crate 42918 BLAKE2B 81be6da265379ce294e0f5957bf3ee3de0c5d413be8508a307bc473fedbfdeeeb76014f775c9b8f56f0e39d9ae1b107e78c733742b0dd9fb4bff70b74c671099 SHA512 01651572f2eaf730ff34778021d00e95e216a2e21d1d5db1eaf893fe89f856df231b9914bdc9f037c4cc13fa61da44b4a083dec9349584ea0aace6a5926079e0
DIST spin-0.9.9.crate 39817 BLAKE2B 90c2191e17d02160fdf1612064cfe160c0f7f71579a1c7dd0190792a53776ce2bda8b04d67fae2e00c5b9d30389c6ba900b11d2f2f98cfeba21d479037e99724 SHA512 69de7672978c83e19a7f65d8b52a0796352e7787f95aee6bfd3fe8c4991ea934d12dd25382478e17a997b90d528ad750d2abf2a3529c5ee0ef9b4fbcf8c8ef73
DIST spirv-0.4.0+sdk-1.4.341.0.crate 41285 BLAKE2B e54962c6f8ff00e9ce50ac78f75ad21c686c9957c741f9aa9d81ca7a96214804c92a15c083c610a539b46bad69b8af96828bd9cfde7deeec462b94ddc871e529 SHA512 1c75c5d84729eadd30f449ecc6a5297b1b964e22a3dfe13b9a9787ae47d011e19e3a7c1a65ae5a83e0c02286d11236bcc3cf2d8a3df3e3b23e58f783b718b8e8
@@ -658,7 +678,9 @@ DIST stats_alloc-0.1.10.crate 4476 BLAKE2B ea7652425dddc404d430175bc8720f56ba9e4
DIST streaming-iterator-0.1.9.crate 18482 BLAKE2B 017631b8186dc934fdc2e1979d3baf670bec6af4478bd44fa4a334d489c75495b0fc5fd46ba0363d547727526f1d7cfb8a02d152aafd8ab749ecae696534dd6f SHA512 312855b37fcaf766fc6627b3ff2c07f8a021c494476e4d64bae878670f1811231638f10dd390e2ea49aa166b7561b0fc0a463c87c36393a6f657c5970f7887f3
DIST strict-num-0.1.1.crate 5104 BLAKE2B ca255ac7afce45b8e2dec87cbe080730959315f753c69bacf1c941617d5c3513e57532494409bec29acc73928291baf98413cff6d0686ced10804ada2a26d361 SHA512 27ced0b3110094b3d8a22b60c67980b7416debe5a22b0416a025dcfc8264fbc1ada1ff73362383ec605c36d682245b2dface093cb6152852f4d4b28705f8a197
DIST strsim-0.11.1.crate 14266 BLAKE2B 252a9ede4241b165525486aa8855dece37af77f5b28e0e1858c4a5d2047db9fa958328db10989234aad69463ab51b2303785ec056c63ea8c95bf95e111ddabf2 SHA512 0cebe0155a92640e56db9a599ae62078cbb32e1d2da8bfa67ed0e8f410a7558dfcf7b3c2720ff5913282e291ecf076aed9fe9bf84c8d44e814a642b1bed3335c
+DIST strum-0.26.3.crate 7237 BLAKE2B bdc348c718c39609c00b9fa7d47b7090b1467022b7a8a28cc7c8a72a0aef20569c6ab22a8a8d26c2d9272f18d000e4ce94858a6647194f0a7b86d812d52b05a9 SHA512 62f116d5bbc6167a6ac68b049f8045bc660901f1ce1252f8bdcd91cb28bef821aad8098905369db6c2fe74c134a5d549e55ddd28e383d7d78f7175258924b268
DIST strum-0.28.0.crate 8550 BLAKE2B a43ac86204ffe8889e5ec8009bc742c9d13bb04001b92cf7e79faf84bbc4bfec2df3b0170faeede1de11f2c7826d8739fea29460a2c6918ed972ca747b4bffd5 SHA512 673d6aec90d89b1a31ec114723009748b2469c9c07b5e17e86fcd1655e745dfcda4dce7bc4423679903a4650a6693284454aba634cffdaa4735c63b0a475185a
+DIST strum_macros-0.26.4.crate 27531 BLAKE2B 7f7d57c957a1591054288fcae6590a5e669fba1b47d8f1a52371ce60fd84f91fdb430e48cc7edbb5fc72914be5ce12af29758b653680da3f4177339b31206750 SHA512 77a17ce47d5e8fe8a89cb6aa6c3ca5d5c2625aea0f93456f05a9994238cd3b08b3f7c6a45e9b3db21bca8fb5759f505f15cc111ac84acbbb34d59cdae8307b0b
DIST strum_macros-0.28.0.crate 30964 BLAKE2B b79612a6632a2f1b828a70e5c759e0fcc5996312e5d15adf43295bc04f570f09b91307e0e17941a1528d6eeb2fd640786c40fc4471616f622c310b9cd9890184 SHA512 a50f96bc94c2bfad8d9fd499a4f3f3f3c2cad07c92800867307c808efaf8ba192ee177e4bf7e67f19a717c89439df7773c1749047a9e0c3b0d5bf1d54a040d40
DIST subtle-2.6.1.crate 14562 BLAKE2B 3cf4940b7a01f04715da1057f6a92b1043a6b86ab2ee7f9fee0337b680ff781201d330409460f6f90b3f81bb5fd4b563e17c762c6e824ba3b0af99e4ae7d66bd SHA512 f5946ebd9bcb8776ee3446abcbf4afb3cca5d8bd847cadda87e864333ac7ded537a3efa773e9648adf20ce4add2c1da85172cff88c1e1a3a6cb051401b00c6bd
DIST sval-2.21.1.crate 84070 BLAKE2B d2ad129b3612954b449ebb976db97d2c02f664016d0c0a27513685d2082916f2c1bf2724cbba3deef93aa4f88701f7be7ac5d05cd1aaacf52633fe10b2fcfd81 SHA512 fa1cfee0b1afc448aad1bc22b922dd3b7e6687e33fc2de55df1c75617477cdbe8f778309fbcbd47a0a765aba3dfcece69793bc4422fc090b00693a3950e51215
@@ -682,7 +704,9 @@ DIST swash-0.2.10.crate 238263 BLAKE2B 4cd0d49b00178b225efb049ec2d4952956b188990
DIST syn-2.0.119.crate 307407 BLAKE2B 0be3bce1250db4818af7246a03352ab50faeca02b81126fd623bd473d7223693f43914e88e07baa0d7fa5473192e390406165f83e00dbff048c1ea373085eced SHA512 4f2493e334b71c2b0c467e19915d385942c10dc4c0142dd989dcfab9809dea552c45ac3da0b0039956a961f7aca2973c0845c6978e9dfe25c03fdc52dfb1dec0
DIST syn-3.0.4.crate 313047 BLAKE2B a554c5b719898e317ebd45c7bd6d2432d971e0135671a9fba986d00b1c12416eeea229007729976a50e4c4943aae6c8f700a599ec7b007f91e2fbe0641e6f71e SHA512 e4eeee793c52da85c9a60b7c16da34971f67980d58e20968a918b59dd373d56aa6d1c996e78adf9ccda2bf6d3679ff1b58727886dd23aa19763a64360d9eb9fa
DIST syn-3.0.5.crate 313222 BLAKE2B a9e801ef23018a02207032990e5bd409081dffa3defe1d33bd8e3c3867fb070f22b9e4f869c80c83dd0aa6c8133efec8fbab06feacb3be4eb02786f79f037cc8 SHA512 66361e0536144010e7ee9ed0b71e11bc12e78220a850529ff6909b0796196c0d2c9797b36865f595fd1af9fb5e4ad18d4641145cf062a393cf869c7f79ed6cb8
+DIST syn-3.0.6.crate 313821 BLAKE2B 5c33c101bd1ccd35c0f906b924f5ab6400fc173335da7f83299d0a4fb551c4e29f2a3f11def321db1647d46754fe8afe05faf8d4a544ccba3cf8a009d9e8f5ed SHA512 9c0c411c7300471ce6f34f57c482020d2d93f2a191ded0533b4ec28f7b74510488006535f620434375bc9fe151b1589c8c72654a4ffd759ab9d9f0a52faabb7a
DIST synstructure-0.13.2.crate 18950 BLAKE2B c475f370d901a371262f466dd98e3914dd6f36aa473a33362866c0f781d27b1813233f96b02208f3463a825e8012cab0f8872eed848d9aa0eac88b581a0d261e SHA512 2698f4e80b93f7cf1d8ae97c4c42a7f61e7b7081f7f1bbb94d7f48ab7ae813a666d73c49ba3812cda9155e0138b55cc246fb96e5858e411a8d32bafb3e2b2afb
+DIST synstructure-0.14.0.crate 19010 BLAKE2B f433b737e7e78a7886aa53a3be158cd0d2ee61f06f2534d373173305bfaa2c2e4f5a2bbfd3208eca0d3611e3c589dc921ab2ba211e9f20724f002893a884b903 SHA512 3f7ba6010075ddddd968e177dd1be51566abd7e8e23f1a8f206eee0fb23ee3a8ccc5ad8869fa6c637b93d58fc02daea584cf2b238faeb7c160c2aaae2139ded7
DIST sys-locale-0.3.2.crate 15072 BLAKE2B d79acea3a652a46e04836735b1719a717fc904665f5c3fab0f71d53b09a0edaba6be2229c8439ec2e8f06c8fdc3de35f404c57e5467d02346b6dfc84ef495379 SHA512 9f05bf61cea92dde582f05f483fdcb9930612548c1bb790328dbbd38ffe798a89300ade79e56f7454c655b64e027fe08452c1e1c2831cd8e065e3662e8d253f5
DIST sysinfo-0.39.6.crate 241117 BLAKE2B cf6bc81142addf672f7effee9ed9080ed15dad17b6b1b7cf4a90dff32767f2761984ea0b38769e0cf17d9b0b781d4b45b162313d323438a784477a4545365028 SHA512 3817d4503aa0caa33842a8b56210d5abf94c0071589d2e876875300f4302e0d266eee7324dc58ef534bff88f634e3cd520416ea191ea3e1bab8368b88e3e5c7f
DIST taffy-0.12.2.crate 186310 BLAKE2B d0bb1a816f387953a6d46c1545ec8ccbd75af575f86a7e58dffd04ca039077cf8aa7bcaf1fe5098849c9532f9de5b85d320d9573fefc1e217bc4315083c9e0b0 SHA512 9f36601448ca5b43fd5fb4aa6dbf0bc1bad083052d1af3fb93e3bbded8b918ac4bd5b0ddf9fc44634d6fafc6f62450532e146fde32a70dfc2f638d75c9eafeff
@@ -704,6 +728,7 @@ DIST tinystr-0.8.4.crate 25003 BLAKE2B 0cbb568f51dfa4f4fe7c00f8f6f851a7eb9dd8322
DIST tinytemplate-1.2.1.crate 26490 BLAKE2B af39d96f33f63238e455a4e38fde1d1730fd9661ae68be7b05df6ef9d2ab1a04db1332cc4ec9deb6da3a8e22b124df81b0fa8916d8491b808742bb733c8e48be SHA512 0cc080057e096f0796e72004343e1a8332c2e8a12e43f6ade150ebf632e9c29c7ad04de0b940cd57df81efdc4d07a6607da9b86a30d8383e39ac3d7be185edb9
DIST tinyvec-1.12.0.crate 56568 BLAKE2B 477146d38f7f2b396f54814cf87ecfede1d2cf51c9680bbbfb24ded2bac4a7e4469ce42ee46ccf4dda5d467278d7a8e0e6d1bfa67c22dd22dfd3a7cbb79671c2 SHA512 80f60f28fd4629b3321d3b9b5d251307639339b0ff2f5169da498de8181871500169c38a49cdf57cc92d37e0a75870ae6ba35adedfe9ac841c654886977a6ba9
DIST tinyvec-1.13.2.crate 60587 BLAKE2B 2970e10fb53e3d31b163d798727ae5282cdfdaf67ce425854f77dccc9204471be5bffef140181b17e6d9828f286b815447383105449d50380c42330d6b4ee760 SHA512 fd009538127286ac3887a82c519af5681435d4b939772607a0196797f84cd07fc668ba06c646570d85254bc835837562164ec3c05a8115f049283feaea8f3545
+DIST tinyvec-1.13.3.crate 60306 BLAKE2B ccc96cb828c288fb3ea4047be535eae80c5473c903c877a53dd44d6c10b8176d002ac8cb0be22d37dba3e4348ff30afaef55506c83477afa9286e84bfe148f69 SHA512 30b44dd28fceccdd7bda24967f1774f53a92913f5e6f341ba73190a1f3623d713e1e9d57c590d7766532d74b0358dbd1c91d1b3f46ca9cf2796d17389a03ed71
DIST tinyvec_macros-0.1.1.crate 5865 BLAKE2B 2bf4f68ca11dc19c72232951605a4c809b34ff38ee365ee4f592a3c41360e23c9330cfba961e2692a0ad568fef4aaaac51c40808d491178cf7a0c4b5a1c5d484 SHA512 10008c7b3a3d50c94b9c370015b76ee082f5dfb6dcacf014dc2f2dbe92f903618d10d0202b21f48fcf98a94ae76fb712db55a5e8ad353645d378cf0e6ec74f7e
DIST toml-0.9.12+spec-1.1.0.crate 56485 BLAKE2B 1552fd92ece75ebf9e8e4914bd60e981333d6f22f5b09baa489bb206369a654c4246d3f8832d7a8e03d2e4abe85cb6871b9ac9289af278b767e200807a4400ed SHA512 214cef1049e5f569ae448041bd0b6989626ab685c580fb77dbb47a4a8a16d879801f88ef5d298b711a82018788a4099a0a008de7d025c362c9fd989098be9b89
DIST toml-1.1.4+spec-1.1.0.crate 56447 BLAKE2B f1c10760fee15163e7d1c2793a5a7ecfd06c48207f0934a43a330649f2603191bb278b8cbfc1a1ef8c529cb1e4d33bb83a7fdaa5f597da6e21960b57a09f087b SHA512 6f389ff3868896b709fc2e7219252b8feb90735bf82088ffd5365e13b6232777c5e79fd059bc001b9c4a2b877feab99e84762f283a1d94cce39a6782dc2149a2
@@ -776,11 +801,13 @@ DIST unicase-2.9.0.crate 24368 BLAKE2B 6564ceec45d9bbac876cc12015e46f4efb415fdda
DIST unicode-bidi-0.3.18.crate 58300 BLAKE2B 388af09d26248f2059d251f9c2b7d949112a430b16ad5868874d436346e2e753875ae382257cf5bb1d41d6ce9f2d7a34d37d2a2e88f9cc051b85a53c3baf5ee0 SHA512 69b5f220cfe8b7b36471fb0adc7d7852a8c40c497b8a81eacd1293b72c46e09c39c2e0a7218b58f0cb62c5ced397a8eda2c5f358eacdfe5d18aba2bc14afe2bd
DIST unicode-bom-2.0.3.crate 10773 BLAKE2B 0c47796f83faa4eb5c4405fa385c245fe7b8b6d9eb6ce422738f7aa1788604ed3df22810afc6ce6da78c1592f7f68b41311914ff04d5e49ba4f719310ffa9afd SHA512 3a756761198be468776511ff7b899ee7adf214a678b13b31f42ef3cb3e0320894d8ff0df23bfa02a057727d83082f16b465ff25efa8dbef362977bf308bccffd
DIST unicode-ident-1.0.24.crate 49298 BLAKE2B 34ba2906a3ebc06f52a4ba77dff96a8f3fb977718d260886fa9e051c5830765641b65a63977110f3a79f31fa177b385f81b01d56c80f6a0324d36eae72e2ebf0 SHA512 7be712d8d0075ac9341790180e312f66264d3e0255c91b38df0951baa5e446dec24551bb2125a66a1cb9b6ca2f1ea37c0cc15fa3dd74f398ecf4d5302c7dc259
+DIST unicode-ident-1.0.26.crate 48425 BLAKE2B d615360eb4874b898657770cd8adcb39350e51dbc76a3109f5e0589a8017b89e19b13a49c0170643cd4988296482bdc293f22437d44f06a1e0af9b76b3a0fa1c SHA512 216d13c655e47dddf888fac997a6345bb7c6d1f0ab6b67ed06bfd9013a891fda8e9e8d71b763639957c15b951145ffd77243ee2056a20ed809d2cae48502c472
DIST unicode-linebreak-0.1.5.crate 15324 BLAKE2B dc560d5b36ed01357c22750feb7f09fd0f57fb0ea543180f6e31c0b71b51df4faaa70ac8482f9cd60e5d1faa5bfd4bebfbfd628dd5913c2c4a858ec04beeca3f SHA512 f37be2f7b04b886e95bb7d0f33bd392b78bb940ef9a01cec487062cf31ec0367306650fad7004df556887a324c714eeb28f697044aad9a429ce07b7b7344af60
DIST unicode-normalization-0.1.25.crate 128462 BLAKE2B 20f8733bdf09bfb5b039f0be20eeb4af657b3cfae520660a107d7310aa58389757cdebcf0e88c6c0036d4ba090b9a97138254695dd8e679dc902c7a9cfda6223 SHA512 265f8088e46d445174cdddba0203457acb329c4ab20b039caccd8739968b50a76f253e2a82ebe3873237fbda1f6228e127f147f546af0512471a368ab0973727
DIST unicode-script-0.5.8.crate 48253 BLAKE2B b40b6ce91176135cbe9d90c8d6fd6bfd11727e4e1607360916ef6c202f79f2424f784ee594effb66ddd4f9be7dd78c916a0af6f5072625058046db0ca9ad2007 SHA512 1c7591e24dbedd922bb330d20ecdbf315c1ac06b4043d63911d187a0a74b19530ad0efc9c863bdd4049590ba6265a730599cae36148560469f53a43d263c5fb9
DIST unicode-segmentation-1.13.3.crate 112325 BLAKE2B 4767480bbb171eb9f9cb026c4101c7db58f37ef3d0ba12233c612392b48e1c63efa61e66c321a4bf772dca214794906cfc82bafb87e59a755bb164b0b2304c45 SHA512 927f3d2662c40213c6d824c410e3559f180fba5736abdea566ad9f3ed357c5a82f84f63e7fb89c6b18dfba2903d2dc43663b79d0b9f7672a42926e0ba49c85d1
DIST unicode-vo-0.1.0.crate 8084 BLAKE2B 492548fcd13dc6831114a0b4df5d2179dfb4aade7c5ccb4d0491fcbdd245b20f5784165dc2098d537249a80cef51aa76274d0968644d201ef124ea4988faa8d6 SHA512 71c89d0db109d627890304f6b4490e7ae008fae79be7d25df7d4f5685b0ee08e8efc55c1b961ad0e40a4c6ec57fe1bb5f674d0f31cfe11c244d3e3fbef4bb575
+DIST unicode-width-0.1.14.crate 271615 BLAKE2B dd2e1504caedecb5d37c397ba05446d3d762b8b6833a8032ebbc213e324d53d89db5e96ed2f7223096e5754d800b39a54105906effc88d9437d7acb9e7beb81e SHA512 3c58a18776aa82cc13c761789a47901616cd98a30356f93d7eb05ae457314209d0a66213e2bbfa5eb8b59be6beacf62438234ce8daafa31b128dbf7d5d6fcadb
DIST unicode-width-0.2.2.crate 282768 BLAKE2B c03a04bb159969f32447c7823f50b2686c515dff4f7778d2cac07a87cb9488d44844b0bb0b51c6996d8fa1fcb65cf4e6a8a9e697d95c1be8373535bc8d7c4215 SHA512 a0ff6ccc1d154e5a100808d3109fe30afa048c3ff402f0a0de34dbff2d58a7403903002185b33bee7b04dcb578c9dea66225a8697f3cd997205680ae3abce965
DIST unicode-xid-0.2.6.crate 15744 BLAKE2B b1bad25897717f6346f988d5a7c90c51fb842da113f19aa434a64add8f2e637258d9fab0f7b871fd2aac02e83c68359fc679b326232793cbc804523e2bff5056 SHA512 f68e78484479a5341b14d7e3391e691265851fa00feeca53af745479af6aa9b4ce3570456df785c8362043db9b04e2e57f9bad05d8305946f16af405bc611764
DIST untrusted-0.9.0.crate 14447 BLAKE2B 8e9c3ae09435af0885bc4a6e3c8943805b48cfc00bdae228c7c43093254e1be15d7005d1026561ff369ec37865d8458203f421a9c89ae3db077f655449621aed SHA512 5929e4079c1c2ff933ae8d8f59a2ecc7a424e71a20d1b8821f75925af68bdf82604b024c008e5464b02e25ff093e561a352b685e755b3d0b27e4c30254689416
@@ -790,6 +817,7 @@ DIST ureq-3.4.2.crate 158495 BLAKE2B 8d7cad4bd196e05bb2e3fec925367b4de421026f4e2
DIST ureq-proto-0.6.1.crate 64926 BLAKE2B e457d5202e5040d39c136182cf862395e9b677e37e11aaa3ca93e145401b515d98e48481d0c84e8ff2fce0316d83cb4e99adc0820b2cf4e7402983d29ad961f7 SHA512 d2ae8cc905cc711983cdd58ba1f8657ccd5cd8241a2b2109f6afb70ff4b03aaeacf80853f71477970b5c859fc5460fa8f051267b82370824f93eaa970f290d68
DIST ureq-proto-0.6.2.crate 68960 BLAKE2B 461fe123a759982017d70266e664916f85a655cc7c77df2682926965d4607c3c641900690c7e005c3fefda80d2ae7e73434608427cec21d0f92a0f8a7f505a72 SHA512 7fe00986375d893b20756fb59227474079b7b84536fee889f7eba89d8d780ecd11c280788096699a39df491c9b3d0090ef31fe104955612e0f959a0f518099d5
DIST ureq-proto-0.6.3.crate 69796 BLAKE2B e4c8feab7c339cf8ba99cb958b9e856d76e8355ca0c948f98fef5de4caa4110f7d3b774d59013978d9003b97069b141e27551bd3dbee5e87e11c3a733010d964 SHA512 4d4995a761015ea66470b6a0e0fb4f0d9349d6a5d8184a829f8c807f27615b7ce7b10fe45c6aa6860230e7708aad7e339d18232a6f97d47c4b8c8fbc4f86ab02
+DIST ureq-proto-0.6.4.crate 70119 BLAKE2B c1dce37d39a4a6d8ca2f1c41b11ae3996c1058aaf21c05f8423249122e95a33165f47999523ea13974f2e15410df89f92d2541b2a33f1c4680e594042ae02e3f SHA512 efdfb59976a8555890b78024ff3bc8c74546de60da2678a61b206bf2ef797f5f98440896b8d840d7fe43ab278ba828440f8d8c116ffaf4af978765c74ff5c561
DIST url-2.5.8.crate 86512 BLAKE2B f289265720ff9243a27c371a938abd00e2c458a440e6ffc30cb0fb0ea4aae4a6b82eace80c3655a9dbfdf2c9428a10844cb3fe6299cd8820e86a13e5cb078d8a SHA512 5848b47d63ae9c195fd5f82bd8333c53cb399f383240e84a606c486d3dbb37db4e268b01a147deb8cdf5bc534a4ebc7b11391e73f81dc3ea3ad7254507ac0c6c
DIST usvg-0.48.1.crate 146652 BLAKE2B b2a6740f21aa182834fdc0e493f0327a0927481562769f10b2e0ae7cfdd89e549471053291658d5d34228ebe687b33436eb8c46d572bf09102b408efd61df2d6 SHA512 7ae76fa430137b1a6c1752cb77d65eb6d05e8404944c8627b40c7f2c54ff39e1b02c6a02c137a6b354b149fe9aa2365d67a9b377e76823fdafb33d9bf13b3f15
DIST utf8-zero-0.8.1.crate 13984 BLAKE2B edf9ee3bcf9d7742f8bf5234ad483c3cf8f67c2027f2a1e8027a8ac74e55351a3fbe65ff74b1915bcbb227540eccc4575422c236d3b76b1d1e0927fc1e5564db SHA512 2e6659989fb694f2724aa2931d43635938b5d83c1f58ae98181b8e46c14e0319a4d58087e1196afcd22247bb7faeee23e83bc8d9b928e8917930ac101437b386
@@ -847,6 +875,7 @@ DIST wgpu-core-deps-windows-linux-android-29.0.4.crate 12049 BLAKE2B 031427e0cae
DIST wgpu-hal-29.0.4.crate 427805 BLAKE2B ce5d076d3bae31194941e3f32905e02722410f927f66e15dc7f6c82f80e10de8a2ffd617b5b6d594f1fbc67e6a74b4fd49fb55f51c8b526195c19f7c3b25d19e SHA512 6862e9e2b5d6cd389073a068b44fb5dac9272b0d1b0664c18554bd55c6f5b71dd76653a1fa848790521f4543bc0a69c5e92a7a419936d9a1728fa18c67c62474
DIST wgpu-naga-bridge-29.0.4.crate 9417 BLAKE2B f8e2e9155aa0aed2498ad5ae5d3c6af4b2afcca0eef2dfc735903ed339017052ac3fd149c0924f2163538fa6dc8f90a81a80bc29855b7f6eb9a32d6c0448a0c4 SHA512 36115aaddb3b92ba8437ad0f768da512f150b76afe486fa0ed683cfd8a8606c59f073bb3bae84ce92f4f60f02f6c0f43dee8a2a8d3f4369ec1e3230b198dad0e
DIST wgpu-types-29.0.4.crate 127824 BLAKE2B 26ceb17cf893f9fd5c37d3638ae66371289c5947001d8a05331b31a501b9ea34cbead7182297f6a49c0bd88bae0246a5cd68c7b3284496f0939c5edab0478612 SHA512 4c45c5b05b13dd03a6a64f5969339456533d48478b87fc3988db78cfb6c7597d35eccbb6e31afdcd433b09a034197a0686a03e835fb63df44ce456a80c49f80e
+DIST wgsl-rs-b2de16a1b81e67d76bc265c296184f882864badb.gh.tar.gz 460488 BLAKE2B 6693605efe622e8908b87ac91d96e065c0e7d06b878072b65b4fb84eb651d22f2a2b67d34d0e9c60452e7392a3bb6a61497e0cfee2bcfc6962849ac9823701fd SHA512 44e1fcbfed4d2d1a960b0974cc774dd0f8437097d204a6aad4a1a9dd48b009f392c1c785e161ca0adcc39f6e734dbe5f34241222ab73548c3008fba7dc2ee611
DIST which-8.0.6.crate 29053 BLAKE2B a93dcf5caec76b2a8475b28d6b2a4c089fd2f540f6e3523fd9c79e0935c50e802015185b99e5e7e400728caca441541652e4dec1d2151512b1c0d7ff798d62b1 SHA512 833250fb19be43dd9c2825145dd1690c4de18bf77fc8866a55d10f8b4c4c9dfbba9fc925eed16225823a67a5db4e1f7c47ba978de3313ba867de113f67a578a1
DIST winapi-0.3.9.crate 1200382 BLAKE2B cb5799749ccd935ea2d7068d953cecf19f543d9db7dc16ad4584bb7005373ada34937a3ced7225544d8bc765da599911c7a3190efefb3a25b7c1bb7123b4f673 SHA512 ff8b7b78065f3d8999ec03c725a0460ebc059771bf071c7a3df3f0ecd733edf3b0a2450024d4e24e1aedddaecd9038ce1376c0d8bbf45132068cf45cf4a53a97
DIST winapi-i686-pc-windows-gnu-0.4.0.crate 2918815 BLAKE2B 4d357e4d30f9552972170d65b9a5358b69c46a3e772fe05efc22f3d4ffc1caeeaad7aacdc7abd503a7ad0545f8bd7d22bf351dcb6df76f812fa4d45c34d65df0 SHA512 a672ccefd0730a8166fef1d4e39f9034d9ae426a3f5e28d1f4169fa5c5790767693f281d890e7804773b34acdb0ae1febac33cde8c50c0044a5a6152c7209ec2
@@ -908,6 +937,7 @@ DIST yazi-0.2.1.crate 30267 BLAKE2B c86af1911a97ac04c58ce1f696ee43b2d0b74e2285da
DIST yeslogic-fontconfig-sys-6.0.1.crate 7821 BLAKE2B 6233f14ea2369a93f0095b04c532f6503611d68aadbe779e4232c4638592e2396d4a1a95eb9f097c80f8ae58529654384250b286181415320cc80115e8866f22 SHA512 f4abacd3bf504dc7834674dad9727ac7a34f97d1fca05e867ff81d88b062146cb5d6af9952acbf5d4521e3c960942f7fa0bc542c9570ce98d3fe90d01faa878c
DIST yoke-0.8.3.crate 33132 BLAKE2B 79d0d7d7fa38704d072a5f2543da8ef6baa3e9776857ef8518eca09a0849c80fe889ef6385611d8845ed28cceae39e7a635b66eb18e07b4ccdc07a47089a4bee SHA512 1ce402bb9f3384d29227a2a2fb70c9917ad90b30952db7d0c5f089f8901fc737236760c53f48e5b97550cde95e727d72f416a9483afc591cc5c67f043dd977ca
DIST yoke-derive-0.8.2.crate 15077 BLAKE2B d067fa9c5a9d1978c0a86fa58034b4aaec8815c106aabc4f91d9d1e5c297a03ed287daa35374a2a2c3946e73abb05e159c118014cdb01b9c939f7eae5416bea8 SHA512 ed37289fe2dfcafda13be24b3e4aae1fbbdd6f52c42a1f2d770771f458af0d17b4cbe487941381b4bd692388e9818b45c686bdcd6229918e0f5b6fced1068ca3
+DIST yoke-derive-0.8.3.crate 15106 BLAKE2B 650e523b95746d2453d2d204271939ab051939677b9bf44c114ddb30a02ade65be286530b6a7480b4855dbbfa3c38c396ad6b4a420daaefa76bd7db908730fc4 SHA512 8630bb7e3416e0cc5f970ead5aea51e507a284d5dc5946f8e1715514d646c85d373bb4f8ee97c9e96301af39d7bf7e3d1798a1e96e42bed1a32bd9dd385229fd
DIST zbus-5.19.0.crate 187145 BLAKE2B 66663a206a93ed5d232ed5adb08b8cb6f356bb84706c508471917377bd57b7f476812682de5a9515c4033706b4814350a129e08722ce57d5f5c3aed5891bd13c SHA512 a043ed90be97288fe17630dd44a7a4a2ced8c8433f97e702e1dd48c4ebeba500be90120a04b731b8397649a0692c9dca91ede32bf78dc7d31640dcefd5d1b358
DIST zbus-lockstep-0.5.2.crate 15733 BLAKE2B da2b2192b7edd40f0c6a7ff5e41f13184a14e474abb3455261a4cd065582b636a90449bcfc26714cd4a1d462b40b6a9d91255868fa099f450296bf9a8f97fbd2 SHA512 8e3a0b9f6c877a5b3c5b686f2cc761c0e0cbcb6839ea48aa81c5b98b3e35503d3eef82cc9ac629b0de8f8701004587bac5ffe70fb65e394a164cf2392be91537
DIST zbus-lockstep-macros-0.5.2.crate 10131 BLAKE2B 6fe271b3a2399852b056f49cd179d44249b4cf5acf7f3d8426c868cc186f3bde4e8b3eca35b193e70c97f103e98878407f83671e99e76a369047f86b30efd0bc SHA512 4b9996cc99cc0fa0b75f0a28221b289662c86adc307683d2e9fdf27bd4545ca565a99a1f74e9ca4a0d5c1bcd4a02227b6f4966441a212c0ac082d7817902d803
@@ -922,12 +952,14 @@ DIST zerocopy-derive-0.8.56.crate 105007 BLAKE2B 4c3fa9f369a0aa63fb660473dbdd064
DIST zerocopy-derive-0.8.57.crate 106175 BLAKE2B ab1f5ce97371b155bfe6ba09ac31cf76675b35f4f3d4d8a195e94b8419158911a7ca0e76c9d7d802ad653c8c3a5f9fdf1c00017f4a3d4b56266299a670b1dea7 SHA512 f18fa504ec31325fb2dafabacd9e45c37a31f64dc46f24c6883897195a23a06926706868c19c4d04dd3210af30a57f240f551b3b6232be409f0380fa5bab3461
DIST zerofrom-0.1.8.crate 6156 BLAKE2B edc4be24f6a3312d2940266493889e24b45ff68b139802f057bc204d21a7dd1cf8c8fc681c4d64ccb3595d37245cf3676f5f80e642574e4abc3b7f2aa3802cea SHA512 a58d39960368594c7f1fb8aac29e8032c079439d1302a40a4b5a2f8d33b8de934f745a77fffa856c371118701c27e3841615dd68b27a838dbf8d6aa7a7744e51
DIST zerofrom-derive-0.1.7.crate 8853 BLAKE2B 26b8932561c7705850ef88f1816141fadfa2077742cf5bb2eb66042cb657f2b3b76a2855cf49c1bb5a934f4147a29a73144fdcbc435c6ca4ff1a562ef103557d SHA512 22de0ee75a7463e6b263f17d91291d2e2800ae0b5066304b24459b58de8e528e36de77dda149d74abdecd26cab58f0ed34aa603b3361f00976929efdb3371da6
+DIST zerofrom-derive-0.1.8.crate 8834 BLAKE2B d5bb129d8a462e7c068d24b3f7cd9e5f91d8d104c0d1a460acba83af9fe838c61835551a7accb05f1962b148633b43c6846b819d44a5bb20379484d3c49d2e82 SHA512 638c34421ddea958f95a0afa4666be7523aa26fcc0e8c91cc2dabdba9f5dd68e3664d62cd6286817394775ab6439c6aaf761787e073f20c7b5ba5f6891cc722e
DIST zeroize-1.9.0.crate 24480 BLAKE2B c0ae9e37027e7ae40bfd5e3a81bc9ee348c222f05b3f34c1e0044b2806577aca50aa5d43893e0da51ba9c3e0d8171a122876f91689012e193c056eb981f05ca9 SHA512 89850700ae24f6f98e8a888699c3eb4f49ed8cba0ad3de79c45438c9b5836242649f6143d9a02a1dbbfe081add8c20c4c88ca4b2b773ab8c47a28cf450355706
DIST zeroize_derive-1.5.0.crate 12034 BLAKE2B c0880e6bf4380a28964d561c04482d7a8d7c1d4b923918f4ada7e876f330fde88de674ac6e70a5997283d3fff53e0a3f3870d3f17d0b36382fde69c39694bcc0 SHA512 f8a68d785a53e36ac2b17305818ed0f50157321a09fad41549b089ba89743f0623c70cbcec71a1891fbb5476e3772b960d67528c485b8562152d4ece6a777b82
DIST zerotrie-0.2.5.crate 84204 BLAKE2B 74ba85c251755d29032887bce52a596a3e9f0960b1299e17630ad00c90440c6506cb16018a25e2dd5d18901611ec31ab10528b7bb0b7505fd0b3324747feb1be SHA512 8f8d89b62b6b8f58a17e10750511e116a2312c9dbde4d98b27a824119ed2d66a6d2100f4d97a46d0ea61cfe6c097a59670739cf0aaf9ddfa4ea50829a9aad615
DIST zerovec-0.11.8.crate 130820 BLAKE2B 4022c968fb9676ed10b2108b156326cdb17853443b8e0a6ba64399eda922eb2f5285fbb0e6d285ec7ca18f2d637e0d3f5c1c2c293a436f703e37443781e38ebb SHA512 dc59d370c2b627907f04227511a642466216e6229b8834b518f132a533d7010a16650e32a84d6b335287a43d8998c8b3f7aad685543b88b57c5310e9753aa8ca
DIST zerovec-derive-0.11.6.crate 23102 BLAKE2B 879195255bc944ccfb1a711d5f3056ef2161cc3a65b815b95eb58c5d83db624cc0d8187f9eaa558f76827bbf2286ba084207bb8155dda33872b2b13d303d3588 SHA512 3044c2bcbdb07df5a6e2b5ce3eb45defb21307ee1acb14d720cd4f0d343c384f70aeda22541f72c247fa1ec9ebacfa1c0f05e4c05f87ef166f97c23ac621859e
DIST zlib-rs-0.6.7.crate 215740 BLAKE2B fcd25c7ab9b2b3b19db673178be517c51e6e700053944d9bec05b4f13b407b395cd7ac6c4a439083807fc155bf920ea4bc6995a5ab8dc348ce427c40993b6ad1 SHA512 888011fc16d3dcf245b4d05ef841ca7cf06b69cc58d2cc2f6c17f668ffcd7424dccdbe1912697ba67602ffa5434d2d08deee0d624123461956e20020c703546d
+DIST zlib-rs-0.6.8.crate 215857 BLAKE2B 523927230b72c0aa1e468e8fece64246f73202e02fdf273d24d9b56f7f42e701809e2dd835c13fec021e01951ff26f7c1c5d9a7832cea4b464808a71d9c2b78d SHA512 614c0d570637d64977cdd8b9ff405772e06476c4c3e19b9b1e3eb0bb3893fb2281ef5ed8751cbbfc5bf7f0cface32bd04bc9e9191df4fa30d443d650a3fc6bbd
DIST zmij-1.0.23.crate 28612 BLAKE2B 5b1fda50a365ae6bba79ed8444f15dd184d0ba0d7b993c8f119355029b5d7cf6a4fe5d9f36eec722221725ed747cad5108eb707ef14920670ffa45843edcbfec SHA512 12f8d9726b232b6be68cefbe294505debb7a98715c11b95d89682a596fe1a02d9d7b2a6cdba97f2e8d47fa947ffbce9506a18568f2cab749ca3d03121e5fb66d
DIST zune-core-0.5.3.crate 30419 BLAKE2B 583101b7c24a99da08dd89af00f4884c987e0ea0331911f1dadc46bad5cc57a77741f875feb5c0303efaf110fd52a066845e624ac514897c0b388ab9f17c4aea SHA512 65b10df9966e1f5418a966337a1f58ebfa9b0bd633035fddee1ea140b097c340469afb35766d5eca42c181b814ba4ff48d71123d4624afef75a70d2d6559b4c3
DIST zune-inflate-0.2.54.crate 37973 BLAKE2B 8bdb532fae0da1d61fc9fc72ea72a9339116e1952e76ba7376f0ba0ea65101b88cd1e4766f516f21028a5ea3459e5590e7a54175a47f136cc572ed9abec2da2f SHA512 0de30f310121c1fed42612b7bcb50631d699195a77c7ce4094729f502e63d1ae38034d6054d95b6825e7e9a2afb7bb614ff123e12736163fee04a46ef1dc56bd
diff --git a/dev-vcs/gitcomet/gitcomet-0.2.5.ebuild b/dev-vcs/gitcomet/gitcomet-0.2.5.ebuild
new file mode 100644
index 000000000000..29df01d7625f
--- /dev/null
+++ b/dev-vcs/gitcomet/gitcomet-0.2.5.ebuild
@@ -0,0 +1,957 @@
+# Copyright 2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# Autogenerated by pycargoebuild 0.15.1
+
+EAPI=8
+
+CRATES="
+ accesskit@0.25.0
+ accesskit_atspi_common@0.20.0
+ accesskit_consumer@0.39.0
+ accesskit_macos@0.27.0
+ accesskit_unix@0.23.0
+ accesskit_windows@0.35.0
+ addr2line@0.25.1
+ adler2@2.0.1
+ aes@0.8.4
+ ahash@0.8.12
+ aho-corasick@1.1.5
+ alacritty_terminal@0.26.0
+ aligned-vec@0.6.4
+ aligned@0.4.3
+ alloca@0.4.0
+ allocator-api2@0.2.21
+ android_system_properties@0.1.6
+ anes@0.1.6
+ anstream@1.0.0
+ anstyle-parse@1.0.0
+ anstyle-query@1.1.5
+ anstyle-wincon@3.0.11
+ anstyle@1.0.14
+ anyhow@1.0.104
+ approx@0.5.1
+ arbitrary@1.4.2
+ arc-swap@1.9.2
+ arg_enum_proc_macro@0.3.4
+ arrayref@0.3.9
+ arrayvec@0.7.8
+ as-raw-xcb-connection@1.0.1
+ as-slice@0.2.1
+ ash@0.38.0+1.3.281
+ ashpd@0.13.13
+ async-broadcast@0.7.2
+ async-channel@2.5.0
+ async-executor@1.14.0
+ async-fs@2.2.0
+ async-io@2.6.0
+ async-lock@3.4.2
+ async-net@2.0.0
+ async-process@2.5.0
+ async-recursion@1.1.1
+ async-signal@0.2.14
+ async-task@4.7.1
+ async-trait@0.1.92
+ atomic-waker@1.1.2
+ atomic@0.5.3
+ atspi-common@0.13.0
+ atspi-proxies@0.13.0
+ atspi@0.29.0
+ autocfg@1.5.1
+ av-scenechange@0.14.1
+ av1-grain@0.2.5
+ avif-serialize@0.8.9
+ backtrace@0.3.76
+ base64@0.22.1
+ base64@0.23.1
+ bindgen@0.73.2
+ bit-set@0.8.0
+ bit-set@0.9.1
+ bit-vec@0.8.0
+ bit-vec@0.9.1
+ bit_field@0.10.3
+ bitflags@1.3.2
+ bitflags@2.13.2
+ bitstream-io@4.10.0
+ block-buffer@0.10.4
+ block-padding@0.3.3
+ block2@0.5.1
+ block2@0.6.2
+ block@0.1.6
+ blocking@1.7.0
+ borsh@1.8.1
+ bstr@1.13.1
+ built@0.8.1
+ bumpalo@3.20.3
+ by_address@1.2.1
+ bytemuck@1.25.2
+ bytemuck_derive@1.12.1
+ byteorder-lite@0.1.0
+ byteorder@1.5.0
+ bytes@1.12.1
+ bytesize@2.7.0
+ calloop-wayland-source@0.4.1
+ calloop@0.14.4
+ cast@0.3.0
+ cbc@0.1.2
+ cc@1.4.6
+ cexpr@0.6.0
+ cfg-if@1.0.5
+ cfg_aliases@0.2.2
+ chacha20@0.10.2
+ chrono@0.4.45
+ ciborium-io@0.2.2
+ ciborium-ll@0.2.2
+ ciborium@0.2.2
+ cipher@0.4.4
+ clang-sys@1.9.1
+ clap@4.6.7
+ clap_builder@4.6.7
+ clap_derive@4.6.7
+ clap_lex@1.1.1
+ clru@0.6.3
+ codespan-reporting@0.11.1
+ codespan-reporting@0.13.1
+ color_quant@1.1.0
+ colorchoice@1.0.5
+ concurrent-queue@2.5.0
+ console_error_panic_hook@0.1.7
+ const-random-macro@0.1.16
+ const-random@0.1.18
+ convert_case@0.10.0
+ convert_case@0.11.0
+ core-foundation-sys@0.8.7
+ core-foundation@0.10.1
+ core-graphics-types@0.2.0
+ core-graphics2@0.6.1
+ core-graphics@0.25.0
+ core-text@22.0.0
+ core-video@0.6.1
+ core_detect@1.0.0
+ core_maths@0.1.1
+ cosmic-text@0.19.0
+ cpufeatures@0.2.17
+ cpufeatures@0.3.1
+ crc32fast@1.5.2
+ criterion-plot@0.8.2
+ criterion@0.8.2
+ crossbeam-channel@0.5.17
+ crossbeam-deque@0.8.8
+ crossbeam-epoch@0.9.21
+ crossbeam-queue@0.3.14
+ crossbeam-utils@0.8.23
+ crunchy@0.2.4
+ crypto-common@0.1.7
+ ctor@1.0.13
+ cursor-icon@1.2.0
+ dashmap@6.2.1
+ data-url@0.3.2
+ defmt-macros@1.1.1
+ defmt-parser@1.0.0
+ defmt@1.1.1
+ dekobon-tree-sitter-groovy@0.3.0
+ deranged@0.5.8
+ derive_more-impl@2.1.1
+ derive_more@2.1.1
+ digest@0.10.7
+ dirs-sys@0.5.0
+ dirs@6.0.0
+ dispatch2@0.3.1
+ displaydoc@0.2.7
+ dlib@0.5.3
+ document-features@0.2.12
+ downcast-rs@1.2.1
+ dunce@1.0.5
+ dwrote@0.11.5
+ dyn-clone@1.0.20
+ either@1.18.0
+ embed-resource@3.0.11
+ encoding_rs@0.8.41
+ endi@1.1.1
+ enumflags2@0.7.12
+ enumflags2_derive@0.7.12
+ enumn@0.1.14
+ equator-macro@0.4.2
+ equator@0.4.2
+ equivalent@1.0.2
+ erased-serde@0.4.10
+ errno@0.3.14
+ etagere@0.3.0
+ euclid@0.22.14
+ event-listener-strategy@0.5.4
+ event-listener@5.4.2
+ exr@1.74.2
+ faster-hex@0.10.0
+ fastrand@2.5.0
+ fax@0.2.7
+ fdeflate@0.3.7
+ filedescriptor@0.8.3
+ filetime@0.2.29
+ find-msvc-tools@0.1.12
+ fixedbitset@0.5.7
+ flate2@1.1.10
+ float-cmp@0.9.0
+ float-ord@0.3.2
+ float_next_after@1.0.0
+ flume@0.12.0
+ fnv@1.0.7
+ foldhash@0.1.5
+ foldhash@0.2.0
+ font-types@0.11.3
+ font-types@0.12.5
+ fontconfig-parser@0.5.8
+ fontdb@0.23.0
+ fontdb@0.24.0
+ foreign-types-macros@0.2.4
+ foreign-types-shared@0.3.1
+ foreign-types@0.5.0
+ form_urlencoded@1.2.2
+ freetype-sys@0.23.0
+ futures-channel@0.3.34
+ futures-concurrency@7.7.1
+ futures-core@0.3.34
+ futures-executor@0.3.34
+ futures-io@0.3.34
+ futures-lite@2.6.1
+ futures-macro@0.3.34
+ futures-sink@0.3.34
+ futures-task@0.3.34
+ futures-util@0.3.34
+ futures@0.3.34
+ generic-array@0.14.7
+ gethostname@1.1.0
+ getrandom@0.2.17
+ getrandom@0.3.4
+ getrandom@0.4.3
+ gif@0.14.2
+ gimli@0.32.3
+ gix-actor@0.42.0
+ gix-attributes@0.35.0
+ gix-bitmap@0.4.0
+ gix-blame@0.17.1
+ gix-chunk@0.8.0
+ gix-command@0.10.1
+ gix-commitgraph@0.39.0
+ gix-config-value@0.19.1
+ gix-config@0.60.0
+ gix-date@0.16.0
+ gix-diff@0.67.1
+ gix-dir@0.29.1
+ gix-discover@0.55.0
+ gix-error@0.3.2
+ gix-features@0.49.1
+ gix-filter@0.34.0
+ gix-fs@0.22.1
+ gix-glob@0.27.1
+ gix-hash@0.26.2
+ gix-hashtable@0.16.0
+ gix-ignore@0.22.1
+ gix-imara-diff@0.2.5
+ gix-index@0.55.0
+ gix-lock@24.0.0
+ gix-macros@0.1.6
+ gix-note@0.1.1
+ gix-object@0.64.1
+ gix-odb@0.84.0
+ gix-pack@0.74.2
+ gix-packetline@0.22.2
+ gix-path@0.12.6
+ gix-pathspec@0.20.0
+ gix-protocol@0.65.1
+ gix-quote@0.8.0
+ gix-ref@0.67.1
+ gix-refspec@0.45.1
+ gix-revision@0.49.1
+ gix-revwalk@0.35.0
+ gix-sec@0.14.2
+ gix-shallow@0.13.0
+ gix-status@0.34.1
+ gix-submodule@0.34.0
+ gix-tempfile@24.0.0
+ gix-trace@0.1.21
+ gix-transport@0.59.2
+ gix-traverse@0.61.0
+ gix-url@0.38.0
+ gix-utils@0.3.6
+ gix-validate@0.11.4
+ gix-worktree-stream@0.36.1
+ gix-worktree@0.56.0
+ gix-zlib@0.1.0
+ gix@0.87.1
+ gl_generator@0.14.0
+ glam@0.30.10
+ glob@0.3.4
+ glow@0.17.0
+ glutin_wgl_sys@0.6.1
+ gpu-allocator@0.28.0
+ gpu-descriptor-types@0.2.0
+ gpu-descriptor@0.3.2
+ half@2.7.1
+ harfrust@0.12.0
+ harfrust@0.5.2
+ hash32@0.3.1
+ hashbrown@0.14.5
+ hashbrown@0.15.5
+ hashbrown@0.16.1
+ hashbrown@0.17.1
+ hdrhistogram@7.6.0
+ heapless@0.8.0
+ heapless@0.9.3
+ heck@0.5.0
+ hermit-abi@0.5.3
+ hex@0.4.3
+ hexf-parse@0.2.1
+ hkdf@0.12.4
+ hmac@0.12.1
+ home@0.5.12
+ http@1.5.0
+ httparse@1.10.1
+ human_format@1.2.1
+ iana-time-zone-haiku@0.1.2
+ iana-time-zone@0.1.65
+ icu_collections@2.3.0
+ icu_locale_core@2.3.0
+ icu_normalizer@2.3.0
+ icu_normalizer_data@2.3.0
+ icu_properties@2.3.0
+ icu_properties_data@2.3.0
+ icu_provider@2.3.1
+ idna@1.1.0
+ idna_adapter@1.2.2
+ image-webp@0.2.4
+ image@0.25.10
+ imagesize@0.15.0
+ imgref@1.12.3
+ indexmap@2.14.2
+ inotify-sys@0.1.8
+ inotify@0.11.5
+ inout@0.1.4
+ interpolate_name@0.2.4
+ inventory@0.3.24
+ is-docker@0.2.0
+ is-wsl@0.4.0
+ is_terminal_polyfill@1.70.2
+ itertools@0.13.0
+ itertools@0.14.0
+ itertools@0.15.0
+ itoa@1.0.18
+ jiff-core@0.1.1
+ jiff-static@0.2.37
+ jiff-tzdb-platform@0.1.3
+ jiff-tzdb@0.1.8
+ jiff@0.2.37
+ jni-sys-macros@0.4.1
+ jni-sys@0.3.1
+ jni-sys@0.4.1
+ jobserver@0.1.35
+ js-sys@0.3.105
+ khronos-egl@6.0.0
+ khronos_api@3.1.0
+ kqueue-sys@1.1.2
+ kqueue@1.2.1
+ kurbo@0.13.1
+ lazy_static@1.5.0
+ lebe@0.5.3
+ libc@0.2.189
+ libfuzzer-sys@0.4.13
+ libloading@0.8.9
+ libm@0.2.16
+ libredox@0.1.24
+ libz-sys@1.1.29
+ linebender_resource_handle@0.1.1
+ link-section@0.19.3
+ linktime-proc-macro@0.2.3
+ linux-raw-sys@0.12.1
+ litemap@0.8.3
+ litrs@1.0.0
+ lock_api@0.4.14
+ log@0.4.34
+ loop9@0.1.5
+ lru@0.18.4
+ lyon@1.0.19
+ lyon_algorithms@1.0.21
+ lyon_geom@1.0.19
+ lyon_path@1.0.19
+ lyon_tessellation@1.0.22
+ mac-notification-sys@0.6.15
+ mach2@0.7.0
+ malloc_buf@0.0.6
+ maybe-rayon@0.1.1
+ md-5@0.10.6
+ memchr@2.8.3
+ memfd@0.6.6
+ memmap2@0.9.11
+ memoffset@0.9.1
+ metal@0.33.0
+ minimal-lexical@0.2.1
+ miniz_oxide@0.8.9
+ miniz_oxide@0.9.1
+ mio@1.2.3
+ miow@0.6.1
+ moxcms@0.8.1
+ multiversion-macros@0.9.0
+ multiversion@0.9.0
+ multiversion_no_op@1.0.0
+ naga@24.0.0
+ naga@29.0.4
+ ndk-sys@0.6.0+11769913
+ new_debug_unreachable@1.0.6
+ nix@0.31.3
+ no_std_io2@0.9.4
+ nom@7.1.3
+ nom@8.0.0
+ nonempty@0.12.0
+ noop_proc_macro@0.3.0
+ notify-rust@4.18.0
+ notify-types@2.1.0
+ notify@9.0.0-rc.5
+ ntapi@0.4.3
+ num-bigint-dig@0.9.1
+ num-bigint@0.4.8
+ num-complex@0.4.6
+ num-conv@0.2.2
+ num-derive@0.4.2
+ num-integer@0.1.47
+ num-iter@0.1.46
+ num-rational@0.4.2
+ num-traits@0.2.19
+ num@0.4.3
+ num_cpus@1.17.0
+ objc-sys@0.3.5
+ objc2-app-kit@0.2.2
+ objc2-app-kit@0.3.2
+ objc2-core-data@0.2.2
+ objc2-core-foundation@0.3.2
+ objc2-core-graphics@0.3.2
+ objc2-core-image@0.2.2
+ objc2-core-location@0.3.2
+ objc2-core-services@0.3.2
+ objc2-encode@4.1.0
+ objc2-foundation@0.2.2
+ objc2-foundation@0.3.2
+ objc2-io-kit@0.3.2
+ objc2-io-surface@0.3.2
+ objc2-metal@0.2.2
+ objc2-metal@0.3.2
+ objc2-quartz-core@0.2.2
+ objc2-quartz-core@0.3.2
+ objc2-user-notifications@0.3.2
+ objc2@0.5.2
+ objc2@0.6.4
+ objc@0.2.7
+ object@0.37.3
+ once_cell@1.21.4
+ once_cell_polyfill@1.70.2
+ oo7@0.6.0
+ oorandom@11.1.5
+ open@5.4.4
+ option-ext@0.2.0
+ ordered-float@5.5.0
+ ordered-stream@0.2.0
+ page_size@0.6.0
+ palette@0.7.7
+ palette_derive@0.7.7
+ palette_math@0.7.7
+ parking@2.2.1
+ parking_lot@0.12.5
+ parking_lot_core@0.9.12
+ paste@1.0.15
+ pastey@0.1.1
+ pathfinder_geometry@0.5.1
+ pathfinder_simd@0.5.6
+ pbkdf2@0.12.2
+ percent-encoding@2.3.2
+ phf@0.13.1
+ phf@0.14.0
+ phf_generator@0.14.0
+ phf_macros@0.14.0
+ phf_shared@0.13.1
+ phf_shared@0.14.0
+ pico-args@0.5.0
+ pin-project-internal@1.1.13
+ pin-project-lite@0.2.17
+ pin-project@1.1.13
+ piper@0.2.5
+ pkg-config@0.3.34
+ plotters-backend@0.3.7
+ plotters-svg@0.3.7
+ plotters@0.3.7
+ png@0.18.1
+ polling@3.11.0
+ pollster@0.2.5
+ pollster@1.0.1
+ polycool@0.4.0
+ portable-atomic-util@0.2.8
+ portable-atomic@1.15.0
+ postage@0.5.0
+ potential_utf@0.1.6
+ powerfmt@0.2.0
+ ppv-lite86@0.2.21
+ presser@0.3.1
+ prettyplease@0.3.0
+ proc-macro-crate@3.5.0
+ proc-macro2@1.0.107
+ process-wrap@10.0.0
+ prodash@31.0.0
+ profiling-procmacros@1.0.18
+ profiling@1.0.18
+ proptest-macro@0.5.0
+ proptest@1.11.0
+ pulldown-cmark-escape@0.11.0
+ pulldown-cmark@0.13.4
+ pulp-wasm-simd-flag@0.1.1
+ pulp@0.22.3
+ pxfm@0.1.30
+ qoi@0.4.1
+ quick-error@1.2.3
+ quick-error@2.0.1
+ quick-xml@0.41.0
+ quote@1.0.47
+ r-efi@5.3.0
+ r-efi@6.0.0
+ rand@0.10.2
+ rand@0.9.5
+ rand_chacha@0.9.0
+ rand_core@0.10.1
+ rand_core@0.9.5
+ rand_xorshift@0.4.0
+ range-alloc@0.1.5
+ rangemap@1.8.0
+ rav1e@0.8.1
+ ravif@0.13.0
+ raw-cpuid@11.6.0
+ raw-window-handle@0.6.2
+ raw-window-metal@1.1.0
+ rayon-core@1.13.0
+ rayon@1.12.0
+ read-fonts@0.37.0
+ read-fonts@0.41.0
+ read-fonts@0.44.0
+ reborrow@0.5.5
+ redox_syscall@0.5.18
+ redox_users@0.5.3
+ ref-cast-impl@1.0.27
+ ref-cast@1.0.27
+ regex-automata@0.4.18
+ regex-syntax@0.8.11
+ regex@1.13.1
+ renderdoc-sys@1.1.0
+ resvg@0.48.1
+ rgb@0.8.53
+ ring@0.17.14
+ roxmltree@0.20.0
+ roxmltree@0.21.1
+ rustc-demangle@0.1.28
+ rustc-hash@1.1.0
+ rustc-hash@2.1.3
+ rustc_version@0.4.1
+ rustfs-mimalloc-sys@0.5.4
+ rustfs-mimalloc@0.5.4
+ rustix-openpty@0.2.0
+ rustix@1.1.5
+ rustls-pki-types@1.15.1
+ rustls-webpki@0.103.15
+ rustls@0.23.45
+ rustversion@1.0.23
+ rusty-fork@0.3.1
+ ryu@1.0.23
+ same-file@1.0.6
+ schemars@1.2.2
+ schemars_derive@1.2.2
+ scoped-tls@1.0.1
+ scopeguard@1.2.0
+ seahash@4.1.0
+ self_cell@1.3.0
+ semver@1.0.28
+ serde@1.0.229
+ serde_bytes@0.11.19
+ serde_core@1.0.229
+ serde_derive@1.0.229
+ serde_derive_internals@0.30.0
+ serde_fmt@1.1.0
+ serde_json@1.0.151
+ serde_repr@0.1.21
+ serde_spanned@1.1.1
+ sha1-checked@0.10.0
+ sha1@0.10.7
+ sha1_smol@1.0.1
+ sha2@0.10.9
+ shlex@2.0.1
+ signal-hook-registry@1.4.8
+ signal-hook@0.4.4
+ simd-adler32@0.3.10
+ simd_helpers@0.1.0
+ simdutf8@0.1.5
+ simplecss@0.2.2
+ siphasher@1.0.3
+ skrifa@0.40.0
+ skrifa@0.44.0
+ skrifa@0.47.0
+ slab@0.4.12
+ slotmap@1.1.1
+ smallvec@1.16.1
+ smol@2.0.2
+ smol_str@0.3.6
+ snafu-derive@0.8.9
+ snafu@0.8.9
+ spin@0.12.3
+ spin@0.9.9
+ spirv@0.4.0+sdk-1.4.341.0
+ stable_deref_trait@1.2.1
+ static_assertions@1.1.0
+ stats_alloc@0.1.10
+ streaming-iterator@0.1.9
+ strict-num@0.1.1
+ strsim@0.11.1
+ strum@0.26.3
+ strum@0.28.0
+ strum_macros@0.26.4
+ strum_macros@0.28.0
+ subtle@2.6.1
+ sval@2.22.0
+ sval_buffer@2.22.0
+ sval_dynamic@2.22.0
+ sval_fmt@2.22.0
+ sval_json@2.22.0
+ sval_nested@2.22.0
+ sval_ref@2.22.0
+ sval_serde@2.22.0
+ svgtypes@0.16.1
+ swash@0.2.10
+ syn@2.0.119
+ syn@3.0.6
+ synstructure@0.14.0
+ sys-locale@0.3.2
+ sysinfo@0.39.6
+ taffy@0.14.0
+ tauri-winrt-notification@0.7.3
+ tempfile@3.27.0
+ termcolor@1.4.1
+ thiserror-impl@1.0.69
+ thiserror-impl@2.0.20
+ thiserror@1.0.69
+ thiserror@2.0.20
+ tiff@0.11.3
+ time-core@0.1.9
+ time@0.3.55
+ tiny-keccak@2.0.2
+ tiny-skia-path@0.12.0
+ tiny-skia@0.12.0
+ tinystr@0.8.4
+ tinytemplate@1.2.1
+ tinyvec@1.13.3
+ toml@1.1.6+spec-1.1.0
+ toml_datetime@1.1.1+spec-1.1.0
+ toml_edit@0.25.15+spec-1.1.0
+ toml_parser@1.1.3+spec-1.1.0
+ toml_writer@1.1.2+spec-1.1.0
+ tracing-attributes@0.1.31
+ tracing-core@0.1.36
+ tracing@0.1.44
+ tree-sitter-bash@0.25.1
+ tree-sitter-bicep@1.1.0
+ tree-sitter-c@0.24.2
+ tree-sitter-clojure-orchard@0.2.8
+ tree-sitter-cmake@0.7.5
+ tree-sitter-containerfile@0.9.2
+ tree-sitter-dart@0.2.0
+ tree-sitter-diff@0.1.0
+ tree-sitter-elixir@0.3.5
+ tree-sitter-erlang@0.20.0
+ tree-sitter-gleam@1.0.0
+ tree-sitter-go@0.25.0
+ tree-sitter-hcl@1.1.0
+ tree-sitter-ini@1.4.0
+ tree-sitter-java@0.23.5
+ tree-sitter-javascript@0.25.0
+ tree-sitter-jsdoc@0.25.0
+ tree-sitter-json@0.24.8
+ tree-sitter-jsonnet@0.0.1
+ tree-sitter-language@0.1.8
+ tree-sitter-llvm@1.1.0
+ tree-sitter-lua@0.5.0
+ tree-sitter-make@1.1.1
+ tree-sitter-nix@0.3.0
+ tree-sitter-pascal@0.10.2
+ tree-sitter-properties@0.3.0
+ tree-sitter-proto@0.6.0
+ tree-sitter-python@0.25.0
+ tree-sitter-r@1.3.0
+ tree-sitter-regex@0.25.0
+ tree-sitter-solidity@1.2.13
+ tree-sitter-svelte-ng@1.0.2
+ tree-sitter-toml-ng@0.7.0
+ tree-sitter-xml@0.7.0
+ tree-sitter-yaml@0.7.2
+ tree-sitter-zig@1.1.2
+ tree-sitter@0.27.0
+ ttf-parser@0.25.1
+ typeid@1.0.3
+ typenum@1.20.1
+ uds_windows@1.2.1
+ uluru@3.1.0
+ unarray@0.1.4
+ unicase@2.9.0
+ unicode-bidi@0.3.18
+ unicode-bom@2.0.3
+ unicode-ident@1.0.26
+ unicode-linebreak@0.1.5
+ unicode-normalization@0.1.25
+ unicode-script@0.5.8
+ unicode-segmentation@1.13.3
+ unicode-vo@0.1.0
+ unicode-width@0.1.14
+ unicode-width@0.2.2
+ unicode-xid@0.2.6
+ untrusted@0.9.0
+ ureq-proto@0.6.4
+ ureq@3.4.2
+ url@2.5.8
+ usvg@0.48.1
+ utf8-zero@0.8.1
+ utf8_iter@1.0.4
+ utf8parse@0.2.2
+ uuid@1.26.1
+ v_frame@0.3.9
+ value-bag-serde1@1.14.1
+ value-bag-sval2@1.14.1
+ value-bag@1.14.1
+ vcpkg@0.2.15
+ version_check@0.9.5
+ vswhom-sys@0.1.3
+ vswhom@0.1.0
+ vte@0.15.0
+ wait-timeout@0.2.1
+ waker-fn@1.2.0
+ walkdir@2.5.0
+ wasi@0.11.1+wasi-snapshot-preview1
+ wasip2@1.0.4+wasi-0.2.12
+ wasm-bindgen-futures@0.4.78
+ wasm-bindgen-macro-support@0.2.128
+ wasm-bindgen-macro@0.2.128
+ wasm-bindgen-shared@0.2.128
+ wasm-bindgen@0.2.128
+ wayland-backend@0.3.17
+ wayland-client@0.31.15
+ wayland-cursor@0.31.14
+ wayland-protocols-plasma@0.3.12
+ wayland-protocols-wlr@0.3.12
+ wayland-protocols@0.32.13
+ wayland-scanner@0.31.11
+ wayland-sys@0.31.11
+ web-sys@0.3.105
+ web-time@1.1.0
+ webpki-roots@1.0.9
+ weezl@0.1.12
+ wgpu-core-deps-apple@29.0.4
+ wgpu-core-deps-emscripten@29.0.4
+ wgpu-core-deps-wasm@29.0.4
+ wgpu-core-deps-windows-linux-android@29.0.4
+ wgpu-core@29.0.4
+ wgpu-hal@29.0.4
+ wgpu-naga-bridge@29.0.4
+ wgpu-types@29.0.4
+ wgpu@29.0.4
+ which@8.0.6
+ winapi-i686-pc-windows-gnu@0.4.0
+ winapi-util@0.1.11
+ winapi-x86_64-pc-windows-gnu@0.4.0
+ winapi@0.3.9
+ windows-collections@0.2.0
+ windows-collections@0.3.2
+ windows-core@0.61.2
+ windows-core@0.62.2
+ windows-future@0.2.1
+ windows-future@0.3.2
+ windows-implement@0.60.2
+ windows-interface@0.59.3
+ windows-link@0.1.3
+ windows-link@0.2.1
+ windows-numerics@0.2.0
+ windows-numerics@0.3.1
+ windows-registry@0.6.1
+ windows-result@0.3.4
+ windows-result@0.4.1
+ windows-strings@0.4.2
+ windows-strings@0.5.1
+ windows-sys@0.52.0
+ windows-sys@0.59.0
+ windows-sys@0.61.2
+ windows-targets@0.52.6
+ windows-threading@0.1.0
+ windows-threading@0.2.1
+ windows-version@0.1.7
+ windows@0.61.3
+ windows@0.62.2
+ windows_aarch64_gnullvm@0.52.6
+ windows_aarch64_msvc@0.52.6
+ windows_i686_gnu@0.52.6
+ windows_i686_gnullvm@0.52.6
+ windows_i686_msvc@0.52.6
+ windows_x86_64_gnu@0.52.6
+ windows_x86_64_gnullvm@0.52.6
+ windows_x86_64_msvc@0.52.6
+ winnow@1.0.4
+ winreg@0.55.0
+ wio@0.2.2
+ wit-bindgen@0.57.1
+ writeable@0.6.4
+ x11-clipboard@0.9.3
+ x11rb-protocol@0.13.2
+ x11rb-protocol@0.14.0
+ x11rb@0.13.2
+ x11rb@0.14.0
+ xcursor@0.3.11
+ xkbcommon@0.9.0
+ xkeysym@0.2.1
+ xml-rs@0.8.29
+ xmlwriter@0.1.0
+ xxhash-rust@0.8.18
+ y4m@0.8.0
+ yazi@0.2.1
+ yeslogic-fontconfig-sys@6.0.1
+ yoke-derive@0.8.3
+ yoke@0.8.3
+ zbus-lockstep-macros@0.5.2
+ zbus-lockstep@0.5.2
+ zbus@5.19.0
+ zbus_macros@5.19.0
+ zbus_names@4.3.4
+ zbus_xml@5.2.1
+ zcheapstr@1.1.0
+ zeno@0.3.3
+ zerocopy-derive@0.8.57
+ zerocopy@0.8.57
+ zerofrom-derive@0.1.8
+ zerofrom@0.1.8
+ zeroize@1.9.0
+ zeroize_derive@1.5.0
+ zerotrie@0.2.5
+ zerovec-derive@0.11.6
+ zerovec@0.11.8
+ zlib-rs@0.6.8
+ zmij@1.0.23
+ zune-core@0.5.3
+ zune-inflate@0.2.54
+ zune-jpeg@0.5.15
+ zvariant@5.15.0
+ zvariant_derive@5.15.0
+ zvariant_utils@4.2.0
+"
+
+declare -A GIT_CRATES=(
+ [font-kit]='https://github.com/Havunen/font-kit;cc6f86949e40ef3a5e9b2063f8127cdcb72d7ac4;font-kit-%commit%'
+ [gpui-ce]='https://github.com/Havunen/gpui-ce;711bd061b2074cde09fde053f7254546bbb9e73d;gpui-ce-%commit%/crates/gpui'
+ [gpui_ce_apple]='https://github.com/Havunen/gpui-ce;711bd061b2074cde09fde053f7254546bbb9e73d;gpui-ce-%commit%/crates/gpui_apple'
+ [gpui_ce_collections]='https://github.com/Havunen/gpui-ce;711bd061b2074cde09fde053f7254546bbb9e73d;gpui-ce-%commit%/crates/gpui_collections'
+ [gpui_ce_derive_refineable]='https://github.com/Havunen/gpui-ce;711bd061b2074cde09fde053f7254546bbb9e73d;gpui-ce-%commit%/crates/gpui_derive_refineable'
+ [gpui_ce_linux]='https://github.com/Havunen/gpui-ce;711bd061b2074cde09fde053f7254546bbb9e73d;gpui-ce-%commit%/crates/gpui_linux'
+ [gpui_ce_macos]='https://github.com/Havunen/gpui-ce;711bd061b2074cde09fde053f7254546bbb9e73d;gpui-ce-%commit%/crates/gpui_macos'
+ [gpui_ce_macros]='https://github.com/Havunen/gpui-ce;711bd061b2074cde09fde053f7254546bbb9e73d;gpui-ce-%commit%/crates/gpui_macros'
+ [gpui_ce_media]='https://github.com/Havunen/gpui-ce;711bd061b2074cde09fde053f7254546bbb9e73d;gpui-ce-%commit%/crates/gpui_media'
+ [gpui_ce_platform]='https://github.com/Havunen/gpui-ce;711bd061b2074cde09fde053f7254546bbb9e73d;gpui-ce-%commit%/crates/gpui_platform'
+ [gpui_ce_refineable]='https://github.com/Havunen/gpui-ce;711bd061b2074cde09fde053f7254546bbb9e73d;gpui-ce-%commit%/crates/gpui_refineable'
+ [gpui_ce_render]='https://github.com/Havunen/gpui-ce;711bd061b2074cde09fde053f7254546bbb9e73d;gpui-ce-%commit%/crates/gpui_render'
+ [gpui_ce_scheduler]='https://github.com/Havunen/gpui-ce;711bd061b2074cde09fde053f7254546bbb9e73d;gpui-ce-%commit%/crates/gpui_scheduler'
+ [gpui_ce_shared_string]='https://github.com/Havunen/gpui-ce;711bd061b2074cde09fde053f7254546bbb9e73d;gpui-ce-%commit%/crates/gpui_shared_string'
+ [gpui_ce_sum_tree]='https://github.com/Havunen/gpui-ce;711bd061b2074cde09fde053f7254546bbb9e73d;gpui-ce-%commit%/crates/gpui_sum_tree'
+ [gpui_ce_util]='https://github.com/Havunen/gpui-ce;711bd061b2074cde09fde053f7254546bbb9e73d;gpui-ce-%commit%/crates/gpui_ce_util'
+ [gpui_ce_web]='https://github.com/Havunen/gpui-ce;711bd061b2074cde09fde053f7254546bbb9e73d;gpui-ce-%commit%/crates/gpui_web'
+ [gpui_ce_wgpu]='https://github.com/Havunen/gpui-ce;711bd061b2074cde09fde053f7254546bbb9e73d;gpui-ce-%commit%/crates/gpui_wgpu'
+ [gpui_ce_windows]='https://github.com/Havunen/gpui-ce;711bd061b2074cde09fde053f7254546bbb9e73d;gpui-ce-%commit%/crates/gpui_windows'
+ [gpui_xim]='https://github.com/Havunen/gpui-ce;711bd061b2074cde09fde053f7254546bbb9e73d;gpui-ce-%commit%/crates/xim'
+ [tree-sitter-gitcommit]='https://github.com/zed-industries/tree-sitter-git-commit;88309716a69dd13ab83443721ba6e0b491d37ee9;tree-sitter-git-commit-%commit%'
+ [tree-sitter-gomod]='https://github.com/camdencheek/tree-sitter-go-mod;2e886870578eeba1927a2dc4bd2e2b3f598c5f9a;tree-sitter-go-mod-%commit%'
+ [tree-sitter-gowork]='https://github.com/zed-industries/tree-sitter-go-work;acb0617bf7f4fda02c6217676cc64acb89536dc7;tree-sitter-go-work-%commit%'
+ [tree-sitter-md]='https://github.com/tree-sitter-grammars/tree-sitter-markdown;9a23c1a96c0513d8fc6520972beedd419a973539;tree-sitter-markdown-%commit%'
+ [tree-sitter-perl]='https://github.com/ganezdragon/tree-sitter-perl;5b97493ce70686e22ec8b9ea261437147e342b49;tree-sitter-perl-%commit%'
+ [wgsl-rs-ir]='https://github.com/schell/wgsl-rs;b2de16a1b81e67d76bc265c296184f882864badb;wgsl-rs-%commit%/crates/wgsl-rs-ir'
+ [wgsl-rs-macros]='https://github.com/schell/wgsl-rs;b2de16a1b81e67d76bc265c296184f882864badb;wgsl-rs-%commit%/crates/wgsl-rs-macros'
+ [wgsl-rs]='https://github.com/schell/wgsl-rs;b2de16a1b81e67d76bc265c296184f882864badb;wgsl-rs-%commit%/crates/wgsl-rs'
+ [xim-ctext]='https://github.com/Havunen/gpui-ce;711bd061b2074cde09fde053f7254546bbb9e73d;gpui-ce-%commit%/crates/xim_ctext'
+ [xim-parser]='https://github.com/Havunen/gpui-ce;711bd061b2074cde09fde053f7254546bbb9e73d;gpui-ce-%commit%/crates/xim_parser'
+)
+
+RUST_MIN_VER="1.98.0"
+
+inherit cargo desktop wrapper xdg
+
+MY_PN="GitComet"
+MY_P=${MY_PN}-${PV}
+
+DESCRIPTION="GitComet is user interface for GIT workflows"
+HOMEPAGE="
+ https://gitcomet.dev/
+ https://github.com/Auto-Explore/GitComet
+"
+SRC_URI="
+ https://github.com/Auto-Explore/GitComet/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
+ ${CARGO_CRATE_URIS}
+"
+
+S="${WORKDIR}/${MY_P}/crates/${PN}"
+
+LICENSE="AGPL-3"
+# Dependent crate licenses
+LICENSE+="
+ Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD-2 BSD Boost-1.0
+ CC0-1.0 CDLA-Permissive-2.0 ISC MIT MPL-2.0 UoI-NCSA Unicode-3.0
+ ZLIB
+"
+SLOT="0"
+KEYWORDS="~amd64"
+
+DEPEND="
+ debug? ( virtual/zlib:= )
+ dev-libs/libgit2:=
+ media-libs/fontconfig
+ media-libs/freetype
+ x11-libs/libX11
+ x11-libs/libxcb
+ x11-libs/libxkbcommon
+ dev-libs/wayland
+"
+
+RDEPEND="
+ ${DEPEND}
+ >=dev-vcs/git-2.50.1
+"
+
+src_configure() {
+ export LIBGIT2_NO_VENDOR=1
+ local myfeatures=(
+ ui
+ gix
+ )
+ cargo_src_configure --bin gitcomet
+}
+
+src_install() {
+ cargo_src_install
+
+ dodir /usr/libexec/${PN}
+
+ mv "${ED}/usr/bin/${PN}" "${ED}/usr/libexec/${PN}/" || die
+
+ # prevents auto install of desktop & icons locally
+ make_wrapper ${PN} "env GITCOMET_NO_DESKTOP_INSTALL=1 ${EPREFIX}/usr/libexec/${PN}/${PN}"
+
+ cd "${WORKDIR}/${MY_P}" || die
+
+ local DOCS=(
+ {README,CONTRIBUTING}.md
+ NOTICE
+ docs
+ )
+
+ einstalldocs
+
+ domenu assets/linux/${PN}.desktop
+
+ local x
+ for x in 32 48 128 256 512; do
+ doicon -s ${x} assets/linux/hicolor/${x}*/apps/*
+ done
+
+ newicon -s scalable assets/${PN}_logo.svg ${PN}.svg
+}
diff --git a/gnome-extra/resources/resources-51.0.ebuild b/gnome-extra/resources/resources-51.0-r1.ebuild
index 74a2b57f07f4..a7afd910370b 100644
--- a/gnome-extra/resources/resources-51.0.ebuild
+++ b/gnome-extra/resources/resources-51.0-r1.ebuild
@@ -245,7 +245,11 @@ RDEPEND+="
>=gui-libs/libadwaita-1.8_alpha:1
>=x11-libs/cairo-1.14.0
media-libs/graphene
+ x11-libs/gdk-pixbuf
+ x11-libs/pango
+ net-libs/libsoup:3.0
"
+
QA_FLAGS_IGNORED="
usr/bin/resources
usr/libexec/resources/resources-kill
diff --git a/gui-wm/mangowm/Manifest b/gui-wm/mangowm/Manifest
index bc1d98c7efc2..94eed4110d20 100644
--- a/gui-wm/mangowm/Manifest
+++ b/gui-wm/mangowm/Manifest
@@ -1,5 +1,4 @@
-DIST mangowm-0.15.6.tar.gz 501916 BLAKE2B 5e4ce9b2aff9b67450f106fbf068fbea9c16f6befa1a41984e43039d8c499cc7f5eb269580cb318a294451f1aa1acedc8ef276c836235836ad3a3ca42448bf0c SHA512 c511b630063d49a8e49e39a07cb96bb80bea71b2314778a246703ade6b6efb46f26d2199bb5107ded9d80b79c0be9a0c8d1f09fac3b59fb9bfb90ed25dc1391c
-DIST mangowm-0.16.2.tar.gz 538452 BLAKE2B 84dbf33833aa4b5891592c1dce20fc4dce30edec804b3dc81ecb6ab02568dc05d934eba3eac5b57a495d9b97bb6942b75896bbb7a03cfa653627768a47110723 SHA512 a7c7dca42ca96b94f8a28525dc19a2b484228136dad44f71d37f992ab60be3f277cb3b8da40b3b2984206f24ac7ad673553958eef1af96a41a194b04101415a2
DIST mangowm-0.16.3.tar.gz 545032 BLAKE2B 092ca4532a1c515ab7f6d28f39abbcaf6a984f9351cb0a47438078e5146b25e8a1fae0acc5a50ca708f32b01407350032ae3e8387b3e50ef4e4d0bce03f74d15 SHA512 d9a7fbe8a058b2515ce986fa2822f83123868709bdcc2a0db47bad86e588921b2efe6f117cdbf3c372b18e87b71d18d078229898b41e507ce6748cfc19a1c9aa
DIST mangowm-0.17.0.tar.gz 577948 BLAKE2B e14a2a5fa543f5ee1bfbe47ed379dcd0b9b6d733f7e87130a686a7f1828cc8644076334e577ab4b064dc7242ef5ec066b509b7441213672c4fd84442d7ecb51f SHA512 8c7729ae80f632f0e0173450332b43ef189cbe58d1821d96ea4f025aaf498a4067c10919fc7c4ae37c6cda0607d7d7b27a56064ed83a41112d492e39276063bf
DIST mangowm-0.17.1.tar.gz 582243 BLAKE2B c7f14be6116576ad6fdabf84037729f3eabd8bf783baf6973670f45d00f36d27f12c7563efa38a8d1a7a335e07d55f5fe5bb0d807e69fc1a2ce6d33d089c66d3 SHA512 bf49ea81dd276e7842eea9ee6e98ccc98bc5334d3a5dc11dfcc7fdc331eafa1b0e9670bc4a82f6664004af60ce728805972810219669d45cd1a137ff86bb5983
+DIST mangowm-0.17.2.tar.gz 583177 BLAKE2B 4db0b3066736f5a09939c23f03f60e49bdb620b94af17ff8c7f08d6d457135173c8ac9a6835f0196efbd1f3ed823069821b64fe58e946ca394281dcc4a198e46 SHA512 bbfc9a6444ba2f282ddb1ab924d19a0a78c120b5d2649cd59bebc4ba97e507ac18fb3fdd7f3dad419e434bef4a7b1f8e90ebf0daa3a6a4cb6a4404622711c4a5
diff --git a/gui-wm/mangowm/mangowm-0.16.2.ebuild b/gui-wm/mangowm/mangowm-0.16.2.ebuild
deleted file mode 100644
index 1d001a237846..000000000000
--- a/gui-wm/mangowm/mangowm-0.16.2.ebuild
+++ /dev/null
@@ -1,78 +0,0 @@
-# Copyright 2022-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit meson
-
-MY_PN="mango"
-MY_P=${MY_PN}-${PV}
-
-if [[ ${PV} == *9999 ]]; then
- inherit git-r3
- EGIT_REPO_URI="https://github.com/mangowm/mango.git"
-else
- SRC_URI="https://github.com/mangowm/mango/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
- S="${WORKDIR}/${MY_P}"
- KEYWORDS="~amd64"
-fi
-
-DESCRIPTION="A fast, feature-rich Wayland compositor built on dwl"
-HOMEPAGE="
- https://github.com/mangowm/mango
- https://mangowm.github.io
-"
-
-LICENSE="CC0-1.0 GPL-3+ MIT"
-SLOT="0"
-
-DOCS=(
- README.md
- .github/CONTRIBUTING.md
-)
-
-IUSE="X asan"
-
-RDEPEND="
- >=gui-libs/wlroots-0.20:=[libinput,session,X?]
- <gui-libs/wlroots-0.21:=[X?]
- >=gui-libs/scenefx-0.5:0.5
-
- dev-libs/cJSON
- dev-libs/glib
- dev-libs/libinput:=
- dev-libs/libpcre2
- dev-libs/wayland
-
- x11-libs/cairo
- x11-libs/libxkbcommon
- x11-libs/pango
- x11-libs/pixman
-
- X? (
- x11-base/xwayland
- x11-libs/libxcb:=
- x11-libs/xcb-util-wm
- )
-"
-
-DEPEND="
- ${RDEPEND}
- sys-kernel/linux-headers
-"
-
-BDEPEND="
- >=dev-build/meson-0.60.0
- >=dev-libs/wayland-protocols-1.32
- >=dev-util/wayland-scanner-1.23
- virtual/pkgconfig
-"
-
-src_configure() {
- local emesonargs=(
- $(meson_feature X xwayland)
- $(meson_use asan)
- )
-
- meson_src_configure
-}
diff --git a/gui-wm/mangowm/mangowm-0.15.6.ebuild b/gui-wm/mangowm/mangowm-0.17.2.ebuild
index 1d001a237846..f2cb0e822667 100644
--- a/gui-wm/mangowm/mangowm-0.15.6.ebuild
+++ b/gui-wm/mangowm/mangowm-0.17.2.ebuild
@@ -68,6 +68,14 @@ BDEPEND="
virtual/pkgconfig
"
+src_prepare() {
+ if use elibc_musl; then
+ eapply "${FILESDIR}"/${PN}-musl.patch
+ fi
+
+ default
+}
+
src_configure() {
local emesonargs=(
$(meson_feature X xwayland)
diff --git a/llvm-runtimes/clang-runtime/clang-runtime-19.1.7-r1.ebuild b/llvm-runtimes/clang-runtime/clang-runtime-19.1.7-r2.ebuild
index 435ae80bb077..31f2898b7f9e 100644
--- a/llvm-runtimes/clang-runtime/clang-runtime-19.1.7-r1.ebuild
+++ b/llvm-runtimes/clang-runtime/clang-runtime-19.1.7-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2025 Gentoo Authors
+# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -12,7 +12,7 @@ S=${WORKDIR}
LICENSE="public-domain"
SLOT="${PV%%.*}"
KEYWORDS="amd64 arm arm64 ~loong ~mips ppc ppc64 ~riscv ~sparc x86 ~arm64-macos ~x64-macos"
-IUSE="+compiler-rt libcxx offload openmp +sanitize"
+IUSE="+compiler-rt libcxx openmp +sanitize"
REQUIRED_USE="sanitize? ( compiler-rt )"
RDEPEND="
@@ -23,12 +23,7 @@ RDEPEND="
)
)
libcxx? ( >=llvm-runtimes/libcxx-${PV}[${MULTILIB_USEDEP}] )
- openmp? (
- >=llvm-runtimes/openmp-${PV}[${MULTILIB_USEDEP}]
- offload? (
- >=llvm-runtimes/offload-${PV}
- )
- )
+ openmp? ( >=llvm-runtimes/openmp-${PV}[${MULTILIB_USEDEP}] )
llvm-core/clang-common
diff --git a/llvm-runtimes/clang-runtime/clang-runtime-20.1.8-r1.ebuild b/llvm-runtimes/clang-runtime/clang-runtime-20.1.8-r2.ebuild
index c21a64b31f09..efea9e1f6618 100644
--- a/llvm-runtimes/clang-runtime/clang-runtime-20.1.8-r1.ebuild
+++ b/llvm-runtimes/clang-runtime/clang-runtime-20.1.8-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2025 Gentoo Authors
+# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -13,7 +13,7 @@ LICENSE="public-domain"
SLOT="${PV%%.*}"
KEYWORDS="amd64 arm arm64 ~loong ~mips ppc ppc64 ~riscv ~sparc x86 ~arm64-macos ~x64-macos"
IUSE="
- +compiler-rt libcxx offload openmp +sanitize
+ +compiler-rt libcxx openmp +sanitize
default-compiler-rt default-libcxx default-lld llvm-libunwind polly
"
REQUIRED_USE="
@@ -28,12 +28,7 @@ RDEPEND="
)
)
libcxx? ( >=llvm-runtimes/libcxx-${PV}[${MULTILIB_USEDEP}] )
- openmp? (
- >=llvm-runtimes/openmp-${PV}[${MULTILIB_USEDEP}]
- offload? (
- >=llvm-runtimes/offload-${PV}
- )
- )
+ openmp? ( >=llvm-runtimes/openmp-${PV}[${MULTILIB_USEDEP}] )
llvm-core/clang-common
diff --git a/llvm-runtimes/clang-runtime/clang-runtime-21.1.8.ebuild b/llvm-runtimes/clang-runtime/clang-runtime-21.1.8-r1.ebuild
index 672387652f43..efea9e1f6618 100644
--- a/llvm-runtimes/clang-runtime/clang-runtime-21.1.8.ebuild
+++ b/llvm-runtimes/clang-runtime/clang-runtime-21.1.8-r1.ebuild
@@ -13,9 +13,8 @@ LICENSE="public-domain"
SLOT="${PV%%.*}"
KEYWORDS="amd64 arm arm64 ~loong ~mips ppc ppc64 ~riscv ~sparc x86 ~arm64-macos ~x64-macos"
IUSE="
- +compiler-rt libcxx offload openmp +sanitize
+ +compiler-rt libcxx openmp +sanitize
default-compiler-rt default-libcxx default-lld llvm-libunwind polly
- llvm_targets_AMDGPU llvm_targets_NVPTX
"
REQUIRED_USE="
sanitize? ( compiler-rt )
@@ -29,18 +28,7 @@ RDEPEND="
)
)
libcxx? ( >=llvm-runtimes/libcxx-${PV}[${MULTILIB_USEDEP}] )
- openmp? (
- >=llvm-runtimes/openmp-${PV}[${MULTILIB_USEDEP}]
- offload? (
- >=llvm-runtimes/offload-${PV}
- llvm_targets_AMDGPU? (
- >=llvm-runtimes/offload-${PV}[clang,llvm_targets_AMDGPU(-)]
- )
- llvm_targets_NVPTX? (
- >=llvm-runtimes/offload-${PV}[clang,llvm_targets_NVPTX(-)]
- )
- )
- )
+ openmp? ( >=llvm-runtimes/openmp-${PV}[${MULTILIB_USEDEP}] )
llvm-core/clang-common
diff --git a/llvm-runtimes/clang-runtime/clang-runtime-22.ebuild b/llvm-runtimes/clang-runtime/clang-runtime-22-r1.ebuild
index 53f62eeeb6a3..89889f8f56b0 100644
--- a/llvm-runtimes/clang-runtime/clang-runtime-22.ebuild
+++ b/llvm-runtimes/clang-runtime/clang-runtime-22-r1.ebuild
@@ -13,9 +13,8 @@ LICENSE="public-domain"
SLOT="${PV}"
KEYWORDS="amd64 arm arm64 ~loong ~mips ppc ppc64 ~riscv ~sparc x86 ~arm64-macos ~x64-macos"
IUSE="
- +compiler-rt libcxx offload openmp +sanitize
+ +compiler-rt libcxx openmp +sanitize
default-compiler-rt default-libcxx default-lld llvm-libunwind polly
- llvm_targets_AMDGPU llvm_targets_NVPTX
"
REQUIRED_USE="
sanitize? ( compiler-rt )
@@ -29,18 +28,7 @@ RDEPEND="
)
)
libcxx? ( >=llvm-runtimes/libcxx-${PV}[${MULTILIB_USEDEP}] )
- openmp? (
- >=llvm-runtimes/openmp-${PV}[${MULTILIB_USEDEP}]
- offload? (
- >=llvm-runtimes/offload-${PV}
- llvm_targets_AMDGPU? (
- >=llvm-runtimes/openmp-amdgcn-amd-amdhsa-${PV}
- )
- llvm_targets_NVPTX? (
- >=llvm-runtimes/openmp-nvptx64-nvidia-cuda-${PV}
- )
- )
- )
+ openmp? ( >=llvm-runtimes/openmp-${PV}[${MULTILIB_USEDEP}] )
llvm-core/clang-common
diff --git a/llvm-runtimes/clang-runtime/clang-runtime-23-r1.ebuild b/llvm-runtimes/clang-runtime/clang-runtime-23-r2.ebuild
index 83a010d322eb..3892f1921be0 100644
--- a/llvm-runtimes/clang-runtime/clang-runtime-23-r1.ebuild
+++ b/llvm-runtimes/clang-runtime/clang-runtime-23-r2.ebuild
@@ -13,9 +13,8 @@ LICENSE="public-domain"
SLOT="${PV}"
KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~arm64-macos ~x64-macos"
IUSE="
- +compiler-rt libcxx offload openmp +sanitize
+ +compiler-rt libcxx openmp +sanitize
default-compiler-rt default-libcxx default-lld llvm-libunwind polly
- llvm_targets_AMDGPU llvm_targets_NVPTX llvm_targets_SPIRV
"
REQUIRED_USE="
sanitize? ( compiler-rt )
@@ -29,20 +28,7 @@ RDEPEND="
)
)
libcxx? ( >=llvm-runtimes/libcxx-${PV}[${MULTILIB_USEDEP}] )
- openmp? (
- >=llvm-runtimes/openmp-${PV}[offload?,${MULTILIB_USEDEP}]
- offload? (
- llvm_targets_AMDGPU? (
- >=llvm-runtimes/openmp-${PV}[rocm(-)]
- )
- llvm_targets_NVPTX? (
- >=llvm-runtimes/openmp-${PV}[cuda(-)]
- )
- llvm_targets_SPIRV? (
- >=llvm-runtimes/openmp-${PV}[level-zero(-)]
- )
- )
- )
+ openmp? ( >=llvm-runtimes/openmp-${PV}[${MULTILIB_USEDEP}] )
llvm-core/clang-common
diff --git a/llvm-runtimes/clang-runtime/clang-runtime-24.ebuild b/llvm-runtimes/clang-runtime/clang-runtime-24.ebuild
index 137d5c1374ac..6060e9efb93c 100644
--- a/llvm-runtimes/clang-runtime/clang-runtime-24.ebuild
+++ b/llvm-runtimes/clang-runtime/clang-runtime-24.ebuild
@@ -12,9 +12,8 @@ S=${WORKDIR}
LICENSE="public-domain"
SLOT="${PV}"
IUSE="
- +compiler-rt libcxx offload openmp +sanitize
+ +compiler-rt libcxx openmp +sanitize
default-compiler-rt default-libcxx default-lld llvm-libunwind polly
- llvm_targets_AMDGPU llvm_targets_NVPTX llvm_targets_SPIRV
"
REQUIRED_USE="
sanitize? ( compiler-rt )
@@ -28,20 +27,7 @@ RDEPEND="
)
)
libcxx? ( >=llvm-runtimes/libcxx-${PV}[${MULTILIB_USEDEP}] )
- openmp? (
- >=llvm-runtimes/openmp-${PV}[offload?,${MULTILIB_USEDEP}]
- offload? (
- llvm_targets_AMDGPU? (
- >=llvm-runtimes/openmp-${PV}[rocm(-)]
- )
- llvm_targets_NVPTX? (
- >=llvm-runtimes/openmp-${PV}[cuda(-)]
- )
- llvm_targets_SPIRV? (
- >=llvm-runtimes/openmp-${PV}[level-zero(-)]
- )
- )
- )
+ openmp? ( >=llvm-runtimes/openmp-${PV}[${MULTILIB_USEDEP}] )
llvm-core/clang-common
diff --git a/llvm-runtimes/clang-runtime/metadata.xml b/llvm-runtimes/clang-runtime/metadata.xml
index 64947b15e39f..dbfadee939c5 100644
--- a/llvm-runtimes/clang-runtime/metadata.xml
+++ b/llvm-runtimes/clang-runtime/metadata.xml
@@ -7,7 +7,6 @@
<use>
<flag name="compiler-rt">Install <pkg>llvm-runtimes/compiler-rt</pkg> for -rtlib=compiler-rt</flag>
<flag name="libcxx">Install <pkg>llvm-runtimes/libcxx</pkg> for -stdlib=libc++</flag>
- <flag name="offload">Install <pkg>llvm-runtimes/offload</pkg> for -fopenmp GPU offloading</flag>
<flag name="openmp">Install <pkg>llvm-runtimes/openmp</pkg> for -fopenmp support</flag>
<flag name="sanitize">Enable compiler-rt sanitizer (-fsanitize*) support</flag>
<flag name="default-compiler-rt">Use compiler-rt + libunwind instead of libgcc as the default rtlib for clang</flag>
diff --git a/mail-client/thunderbird/thunderbird-140.16.0.ebuild b/mail-client/thunderbird/thunderbird-140.16.0.ebuild
index dcfeaa6de6d3..e2afe1d68d63 100644
--- a/mail-client/thunderbird/thunderbird-140.16.0.ebuild
+++ b/mail-client/thunderbird/thunderbird-140.16.0.ebuild
@@ -74,7 +74,7 @@ else
fi
LICENSE="MPL-2.0 GPL-2 LGPL-2.1"
-KEYWORDS="~amd64 ~arm64 ~loong ~ppc64 ~x86"
+KEYWORDS="amd64 arm64 ~loong ~ppc64 ~x86"
IUSE="+clang debug eme-free hardened hwaccel jack libproxy pgo pulseaudio selinux sndio"
IUSE+=" +system-av1 +system-harfbuzz +system-icu +system-jpeg +system-libevent +system-libvpx"
diff --git a/media-libs/libde265/Manifest b/media-libs/libde265/Manifest
index 7485fafa5f9c..bc553074aa0e 100644
--- a/media-libs/libde265/Manifest
+++ b/media-libs/libde265/Manifest
@@ -1,2 +1,2 @@
-DIST libde265-1.0.15.tar.gz 846016 BLAKE2B b968a46dd56c3dda7da0e24289ccf24d08baf382771794dafacba942de41b7458b3a515e22abe2f35465bac731e67f29b409dbc95ced3531a211e6e40a1ea774 SHA512 375d8e781108247e0e8b4d7a036d20cc5d0670bdbf6ddb40a6d3dbf912fa776d2f001fb762301cb97e4d43be29eb415b0cdbfc6e07aa18b3f2346f7409c64fce
DIST libde265-1.0.16.tar.gz 835657 BLAKE2B 7095d2659036e7323c2c26fea7c45c67152dd054856b2534456ec679ff6b75ba6375a3b154f68eb86b938d08ea99ae654e782ef1ff8a253252bd65d8225caaa8 SHA512 07f4dd75238030ed86f1b86d990a5a1c31866d5217db2aa23757432da214a19c5f4094a6c2f8fe3453c64d36ee745ca4f1e22a19a80b2685b6530431a35eb4e1
+DIST libde265-1.1.3.tar.gz 324452 BLAKE2B 8eb783fd545cae806f68a6c098bf210814f56a5fee9c82b04098c2a4c125f684282afdfa46139ea9f82d11dd0b8e2e0d5c0a675e7b4a5be9e719aa79225f7f42 SHA512 2068396658d43f0b1a52f96d6ffc6836271cc39e0fad89ce21980445be04da2792e2191bfc49130b2c6f640c7592010594dce1d5928c9eaa7e3290cc3e4f81d8
diff --git a/media-libs/libde265/libde265-1.0.15.ebuild b/media-libs/libde265/libde265-1.0.15.ebuild
deleted file mode 100644
index 3556c4bc00fc..000000000000
--- a/media-libs/libde265/libde265-1.0.15.ebuild
+++ /dev/null
@@ -1,95 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit autotools multilib-minimal
-
-if [[ ${PV} == *9999 ]] ; then
- EGIT_REPO_URI="https://github.com/strukturag/${PN}.git"
- inherit git-r3
-else
- SRC_URI="https://github.com/strukturag/libde265/releases/download/v${PV}/${P}.tar.gz"
- KEYWORDS="amd64 arm arm64 ~loong ppc64 ~riscv x86"
-fi
-
-DESCRIPTION="Open h.265 video codec implementation"
-HOMEPAGE="https://github.com/strukturag/libde265"
-
-LICENSE="GPL-3"
-SLOT="0"
-IUSE="enc265 dec265 sdl tools debug cpu_flags_x86_sse4_1 cpu_flags_arm_neon cpu_flags_arm_thumb"
-# IUSE+=" sherlock265" # Require libvideogfx or libswscale
-
-RDEPEND="
- dec265? (
- sdl? ( media-libs/libsdl2 )
- )"
-
-# Sherlock265 require libvideogfx or libswscale
-#RDEPEND+="
-# sherlock265? (
-# media-libs/libsdl
-# dev-qt/qtcore:5
-# dev-qt/qtgui:5
-# dev-qt/qtwidgets:5
-# media-libs/libswscale
-# )
-#"
-
-DEPEND="${RDEPEND}"
-BDEPEND="dec265? ( virtual/pkgconfig )"
-
-# Sherlock265 require libvideogfx or libswscale
-#BDEPEND+=" sherlock265? ( virtual/pkgconfig )"
-
-PATCHES=( "${FILESDIR}"/${PN}-1.0.2-qtbindir.patch )
-
-src_prepare() {
- default
-
- eautoreconf
-
- # without this, headers would be missing and make would fail
- multilib_copy_sources
-}
-
-multilib_src_configure() {
- local myeconfargs=(
- --enable-log-error
- ax_cv_check_cflags___msse4_1=$(usex cpu_flags_x86_sse4_1)
- ax_cv_check_cflags___mfpu_neon=$(usex cpu_flags_arm_neon)
- $(use_enable cpu_flags_arm_thumb thumb)
- $(use_enable debug log-info)
- $(use_enable debug log-debug)
- $(use_enable debug log-trace)
- $(multilib_native_use_enable enc265 encoder)
- $(multilib_native_use_enable dec265)
- )
-
- # myeconfargs+=( $(multilib_native_use_enable sherlock265) ) # Require libvideogfx or libswscale
- myeconfargs+=( --disable-sherlock265 )
-
- econf "${myeconfargs[@]}"
-}
-
-multilib_src_install() {
- default
-
- if multilib_is_native_abi; then
- # Remove useless, unready and test tools
- rm "${ED}"/usr/bin/{tests,gen-enc-table,yuv-distortion} || die
- if ! use tools; then
- rm "${ED}"/usr/bin/{bjoentegaard,block-rate-estim,rd-curves} || die
- rm "${ED}"/usr/bin/acceleration_speed || die
- fi
- else
- # Remove all non-native binary tools
- rm "${ED}"/usr/bin/* || die
- fi
-}
-
-multilib_src_install_all() {
- find "${ED}" -name '*.la' -delete || die
- einstalldocs
-}
diff --git a/media-libs/libde265/libde265-1.1.3.ebuild b/media-libs/libde265/libde265-1.1.3.ebuild
new file mode 100644
index 000000000000..fe22b19c9b17
--- /dev/null
+++ b/media-libs/libde265/libde265-1.1.3.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake-multilib
+
+DESCRIPTION="Open h.265 video codec implementation"
+HOMEPAGE="https://github.com/strukturag/libde265"
+
+if [[ ${PV} == *9999 ]] ; then
+ EGIT_REPO_URI="https://github.com/strukturag/libde265.git"
+ inherit git-r3
+else
+ SRC_URI="https://github.com/strukturag/libde265/releases/download/v${PV}/${P}.tar.gz"
+ KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86"
+fi
+
+LICENSE="LGPL-3 tools? ( MIT )"
+SLOT="0"
+IUSE="dec265 debug sdl tools"
+IUSE+=" cpu_flags_x86_avx2 cpu_flags_x86_avx512f cpu_flags_x86_sse cpu_flags_arm_neon"
+
+RDEPEND="
+ dec265? (
+ sdl? ( media-libs/libsdl2 )
+ )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="dec265? ( virtual/pkgconfig )"
+
+multilib_src_configure() {
+ local mycmakeargs=(
+ -DDE265_LOG_LEVEL=$(usex debug debug error)
+
+ -DENABLE_AVX2=$(usex cpu_flags_x86_avx2)
+ -DENABLE_AVX512=$(usex cpu_flags_x86_avx512f)
+
+ -DENABLE_DECODER=$(multilib_native_usex dec265)
+
+ -DENABLE_SDL=$(usex sdl)
+
+ # dev-tools dir isn't in release tarballs
+ #-DENABLE_INTERNAL_DEVELOPMENT_TOOLS=$(usex test)
+
+ # Require libvideogfx or libswscale
+ -DENABLE_SHERLOCK265=OFF
+ )
+
+ if use cpu_flags_x86_sse || use cpu_flags_arm_neon || use arm64 ; then
+ mycmakeargs+=( -DENABLE_SIMD=ON )
+ else
+ mycmakeargs+=( -DENABLE_SIMD=OFF )
+ fi
+
+ cmake_src_configure
+}
diff --git a/media-libs/libde265/libde265-9999.ebuild b/media-libs/libde265/libde265-9999.ebuild
index eafb9342e00a..fe22b19c9b17 100644
--- a/media-libs/libde265/libde265-9999.ebuild
+++ b/media-libs/libde265/libde265-9999.ebuild
@@ -1,97 +1,57 @@
-# Copyright 1999-2025 Gentoo Authors
+# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
-inherit autotools multilib-minimal
+inherit cmake-multilib
+
+DESCRIPTION="Open h.265 video codec implementation"
+HOMEPAGE="https://github.com/strukturag/libde265"
if [[ ${PV} == *9999 ]] ; then
- EGIT_REPO_URI="https://github.com/strukturag/${PN}.git"
+ EGIT_REPO_URI="https://github.com/strukturag/libde265.git"
inherit git-r3
else
SRC_URI="https://github.com/strukturag/libde265/releases/download/v${PV}/${P}.tar.gz"
KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86"
fi
-DESCRIPTION="Open h.265 video codec implementation"
-HOMEPAGE="https://github.com/strukturag/libde265"
-
-LICENSE="GPL-3"
+LICENSE="LGPL-3 tools? ( MIT )"
SLOT="0"
-IUSE="enc265 dec265 sdl tools debug cpu_flags_x86_sse4_1 cpu_flags_arm_neon cpu_flags_arm_thumb"
-# IUSE+=" sherlock265" # Require libvideogfx or libswscale
+IUSE="dec265 debug sdl tools"
+IUSE+=" cpu_flags_x86_avx2 cpu_flags_x86_avx512f cpu_flags_x86_sse cpu_flags_arm_neon"
RDEPEND="
dec265? (
sdl? ( media-libs/libsdl2 )
- )"
-
-# Sherlock265 require libvideogfx or libswscale
-#RDEPEND+="
-# sherlock265? (
-# media-libs/libsdl
-# dev-qt/qtcore:5
-# dev-qt/qtgui:5
-# dev-qt/qtwidgets:5
-# media-libs/libswscale
-# )
-#"
-
+ )
+"
DEPEND="${RDEPEND}"
BDEPEND="dec265? ( virtual/pkgconfig )"
-# Sherlock265 require libvideogfx or libswscale
-#BDEPEND+=" sherlock265? ( virtual/pkgconfig )"
+multilib_src_configure() {
+ local mycmakeargs=(
+ -DDE265_LOG_LEVEL=$(usex debug debug error)
-PATCHES=( "${FILESDIR}"/${PN}-1.0.2-qtbindir.patch )
+ -DENABLE_AVX2=$(usex cpu_flags_x86_avx2)
+ -DENABLE_AVX512=$(usex cpu_flags_x86_avx512f)
-src_prepare() {
- default
+ -DENABLE_DECODER=$(multilib_native_usex dec265)
- eautoreconf
+ -DENABLE_SDL=$(usex sdl)
- # without this, headers would be missing and make would fail
- multilib_copy_sources
-}
+ # dev-tools dir isn't in release tarballs
+ #-DENABLE_INTERNAL_DEVELOPMENT_TOOLS=$(usex test)
-multilib_src_configure() {
- local myeconfargs=(
- --enable-log-error
- ax_cv_check_cflags___msse4_1=$(usex cpu_flags_x86_sse4_1)
- ax_cv_check_cflags___mfpu_neon=$(usex cpu_flags_arm_neon)
- $(use_enable cpu_flags_arm_thumb thumb)
- $(use_enable debug log-info)
- $(use_enable debug log-debug)
- $(use_enable debug log-trace)
- $(multilib_native_use_enable enc265 encoder)
- $(multilib_native_use_enable dec265)
+ # Require libvideogfx or libswscale
+ -DENABLE_SHERLOCK265=OFF
)
- # myeconfargs+=( $(multilib_native_use_enable sherlock265) ) # Require libvideogfx or libswscale
- myeconfargs+=( --disable-sherlock265 )
-
- econf "${myeconfargs[@]}"
-}
-
-multilib_src_install() {
- default
-
- if multilib_is_native_abi; then
- # Remove useless, unready and test tools
- rm "${ED}"/usr/bin/{tests,gen-enc-table,yuv-distortion} || die
- if ! use tools; then
- rm "${ED}"/usr/bin/{bjoentegaard,block-rate-estim,rd-curves} || die
- # Disabled as of 1.0.16
- # https://github.com/strukturag/libde265/commit/edf58dd61c50fb28f4b31569c250389f125bd826
- #rm "${ED}"/usr/bin/acceleration_speed || die
- fi
+ if use cpu_flags_x86_sse || use cpu_flags_arm_neon || use arm64 ; then
+ mycmakeargs+=( -DENABLE_SIMD=ON )
else
- # Remove all non-native binary tools
- rm "${ED}"/usr/bin/* || die
+ mycmakeargs+=( -DENABLE_SIMD=OFF )
fi
-}
-multilib_src_install_all() {
- find "${ED}" -name '*.la' -delete || die
- einstalldocs
+ cmake_src_configure
}
diff --git a/media-libs/libde265/metadata.xml b/media-libs/libde265/metadata.xml
index ba7a48bf8e96..47890e6f9b7e 100644
--- a/media-libs/libde265/metadata.xml
+++ b/media-libs/libde265/metadata.xml
@@ -6,9 +6,9 @@
<name>Gentoo Video project</name>
</maintainer>
<use>
- <flag name="enc265">Enable build of enc265 tool</flag>
<flag name="dec265">Enable build of dec265 example program</flag>
- <flag name="sdl">Enable video output of dec265 example program with <pkg>media-libs/libsdl</pkg>
+ <flag name="enc265">Enable build of enc265 tool</flag>
+ <flag name="sdl">Enable video output of dec265 example program with <pkg>media-libs/libsdl2</pkg>
</flag>
<flag name="tools">Enable installation of varous binary tools</flag>
</use>
diff --git a/media-sound/Tauon/Tauon-12.0.0-r1.ebuild b/media-sound/Tauon/Tauon-12.0.0-r1.ebuild
new file mode 100644
index 000000000000..d30716185a66
--- /dev/null
+++ b/media-sound/Tauon/Tauon-12.0.0-r1.ebuild
@@ -0,0 +1,121 @@
+# Copyright 2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+PLOCALES="cs de es fr_FR hu id it ja_JP nb_NO pl pt pt_BR pt_PT ru sv tr zh_CN"
+
+PYTHON_COMPAT=( python3_{13..14} )
+DISTUTILS_EXT=1
+DISTUTILS_USE_PEP517=setuptools
+
+inherit desktop distutils-r1 optfeature plocale xdg
+
+DESCRIPTION="The desktop music player of today!"
+HOMEPAGE="https://tauonmusicbox.rocks/"
+
+if [[ ${PV} == *9999 ]]; then
+ EGIT_SUBMODULES=()
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/Taiko2k/${PN}"
+else
+ SRC_URI="https://github.com/Taiko2k/Tauon/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64"
+fi
+
+LICENSE="GPL-3"
+SLOT="0"
+
+PHAZOR_DEPS="
+ dev-libs/miniaudio
+ media-libs/flac:=
+ media-libs/game-music-emu
+ media-libs/libopenmpt
+ media-libs/libsamplerate
+ media-libs/libvorbis
+ media-libs/opus
+ media-libs/opusfile
+ media-sound/mpg123
+ media-sound/wavpack
+ media-video/pipewire:=
+ sci-libs/kissfft[-cpu_flags_x86_sse]
+"
+
+DEPEND="
+ dev-python/aiohttp[${PYTHON_USEDEP}]
+ dev-python/beautifulsoup4[${PYTHON_USEDEP}]
+ dev-python/musicbrainzngs[${PYTHON_USEDEP}]
+ dev-python/natsort[${PYTHON_USEDEP}]
+ dev-python/pillow[${PYTHON_USEDEP}]
+ dev-python/pyopengl[${PYTHON_USEDEP}]
+ dev-python/pygobject[${PYTHON_USEDEP}]
+ dev-python/pysdl3[${PYTHON_USEDEP}]
+ dev-python/rapidfuzz[${PYTHON_USEDEP}]
+ dev-python/requests[${PYTHON_USEDEP}]
+ dev-python/setproctitle[${PYTHON_USEDEP}]
+ dev-python/send2trash[${PYTHON_USEDEP}]
+ dev-python/unidecode[${PYTHON_USEDEP}]
+ media-video/ffmpeg
+ media-libs/mutagen[${PYTHON_USEDEP}]
+ media-libs/sdl3-image
+
+ ${PHAZOR_DEPS}
+"
+
+RDEPEND="
+ ${DEPEND}
+
+ dev-libs/libayatana-appindicator
+ media-sound/mpg123-base
+ x11-libs/libnotify
+"
+
+BDEPEND="sys-devel/gettext"
+
+PATCHES=(
+ "${FILESDIR}/${P}-phazor-build.patch"
+ "${FILESDIR}/${PN}-8.1.0-fix-locale-path.patch"
+)
+
+EPYTEST_DESELECT=( src/tauon/tests/test_launch.py::test_launch_main_script )
+EPYTEST_PLUGINS=()
+distutils_enable_tests pytest
+
+src_compile() {
+ distutils-r1_src_compile
+
+ build_locale() {
+ msgfmt -o "locale/${1}/LC_MESSAGES/tauon.mo" "locale/${1}/LC_MESSAGES/tauon.po" || die
+ }
+
+ plocale_for_each_locale build_locale
+}
+
+python_install() {
+ distutils-r1_python_install
+
+ install_locale() {
+ insinto "/usr/share/locale/${1}/LC_MESSAGES"
+ doins "locale/${1}/LC_MESSAGES/tauon.mo"
+ }
+
+ plocale_for_each_locale install_locale
+
+ sed -i 's/Exec=tauon/Exec=tauonmb/g' extra/tauonmb.desktop || die
+ domenu extra/tauonmb.desktop
+ doicon -s scalable extra/tauonmb.svg
+
+}
+
+python_test() {
+ epytest -vvv src/tauon/tests
+}
+
+pkg_postinst() {
+ optfeature "Chinese searches support" app-i18n/opencc[python]
+ optfeature "last fm support" dev-python/pylast
+ optfeature "PLEX support" dev-python/plexapi
+ optfeature "Spotify support" dev-python/tekore
+ optfeature "Discord Rich Presence support" dev-python/pypresence
+
+ xdg_pkg_postinst
+}
diff --git a/mpv-plugin/mpv-mpris/Manifest b/mpv-plugin/mpv-mpris/Manifest
index 0f4e37863bf4..4439cc324c5e 100644
--- a/mpv-plugin/mpv-mpris/Manifest
+++ b/mpv-plugin/mpv-mpris/Manifest
@@ -1,2 +1,2 @@
-DIST mpv-mpris-1.1.tar.gz 14511 BLAKE2B 17ad84088077748d1604aec0c6777b0edde6cddfe6dc6218f0e41f84547acbcf08b9b92f622345d27754e1300bbada250af0ecf3140885f163df41f99b3c43b5 SHA512 81622e5e34a8ebde735c39a1615569c833d6cf53c70b4f77794788fd8b19982cc33a71ff5768027826dafc608fa72a089e38c0925a907fa249f5c527d17f9541
DIST mpv-mpris-1.2.tar.gz 15181 BLAKE2B 8e36f0e80b57ddd821463a42c19b4740566351ed2eeeb85917181d38dbb930654083298349a312e1ff4321d9ae34daac0f85779ef82d5e6fe13d4a2f058230b8 SHA512 251348a14b4efbfd3eb8a482bcabb2a53a9ee4d33b89f6066efcfc60b6c8bcad6d953b10977d9cfbd23e28621f9117b436002b74ffa33deaec5ea224d9ce6753
+DIST mpv-mpris-1.3.tar.gz 16500 BLAKE2B 9feb8bf8a7e3df0b72f68f24b70a317f3501b17dfcc898ead1b0f033def2dbb71f5aa86987c723956b4e03a54dcf153a83b2ed63ba3b33d5f85cd5343909e78f SHA512 73397284d0180826f324398be4362920f8eb47cc38c271013b8e754163cb34bfc18b0a8a642b3b5b1fdf29eb3a689cc340ccb70bda4450db29c992e4526aff4a
diff --git a/mpv-plugin/mpv-mpris/mpv-mpris-1.1.ebuild b/mpv-plugin/mpv-mpris/mpv-mpris-1.3.ebuild
index 3b76d1b4bcec..3b76d1b4bcec 100644
--- a/mpv-plugin/mpv-mpris/mpv-mpris-1.1.ebuild
+++ b/mpv-plugin/mpv-mpris/mpv-mpris-1.3.ebuild
diff --git a/net-dns/unbound/unbound-1.26.1.ebuild b/net-dns/unbound/unbound-1.26.1.ebuild
index 2adbae1fbda9..59889da11d28 100644
--- a/net-dns/unbound/unbound-1.26.1.ebuild
+++ b/net-dns/unbound/unbound-1.26.1.ebuild
@@ -19,7 +19,7 @@ S="${WORKDIR}"/${MY_P}
LICENSE="BSD GPL-2"
SLOT="0/8" # ABI version of libunbound.so
if [[ ${PV} != *_rc* ]] ; then
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
+ KEYWORDS="~alpha amd64 arm arm64 ~hppa ~mips ppc ppc64 ~riscv ~sparc x86"
fi
IUSE="debug dnscrypt dnstap +ecdsa ecs gost +http2 python redis selinux static-libs systemd test +tfo"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
diff --git a/net-proxy/MTProxy/MTProxy-3.0.4-r1.ebuild b/net-proxy/MTProxy/MTProxy-3.0.4-r1.ebuild
deleted file mode 100644
index f0fa15c0b71d..000000000000
--- a/net-proxy/MTProxy/MTProxy-3.0.4-r1.ebuild
+++ /dev/null
@@ -1,28 +0,0 @@
-# Copyright 2024-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-DESCRIPTION="Community fork of MTProxy"
-HOMEPAGE="https://github.com/GetPageSpeed/MTProxy"
-SRC_URI="https://github.com/GetPageSpeed/MTProxy/archive/refs/tags/${PV}.tar.gz -> ${P}.gh.tar.gz"
-
-LICENSE="LGPL-2"
-SLOT="0"
-KEYWORDS="~amd64"
-
-DEPEND="
- dev-libs/openssl
- virtual/zlib:=
-"
-
-RDEPEND="${DEPEND}"
-
-PATCHES="
- ${FILESDIR}/${P}-adjust_flags.patch
- ${FILESDIR}/${P}-no_implicit_func.patch
-"
-
-src_install() {
- dobin objs/bin/mtproto-proxy
-}
diff --git a/net-proxy/MTProxy/Manifest b/net-proxy/MTProxy/Manifest
deleted file mode 100644
index d554ac0e0a61..000000000000
--- a/net-proxy/MTProxy/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST MTProxy-3.0.4.gh.tar.gz 197035 BLAKE2B f2476ef3125ced0425f7896eabd8b2fcb4a02faf92b9656aaa707566181022592f2d95bd8c5f9088e3874483ff1201cf2d383ba20ab367beac42475e41987bc0 SHA512 435b978071e2164e3955299b6772027666d82ca5e366d5f636987afb9c0ec1e74e27d79292679ca54c0f57a9bd60f68e10f50c6dc3ed2b8c5a74ef9ea6550aeb
diff --git a/net-proxy/MTProxy/files/MTProxy-3.0.4-adjust_flags.patch b/net-proxy/MTProxy/files/MTProxy-3.0.4-adjust_flags.patch
deleted file mode 100644
index ae460a558c49..000000000000
--- a/net-proxy/MTProxy/files/MTProxy-3.0.4-adjust_flags.patch
+++ /dev/null
@@ -1,158 +0,0 @@
-diff -Nru MTProxy.orig/common/crc32.c MTProxy/common/crc32.c
---- MTProxy.orig/common/crc32.c 2018-06-17 01:58:54.692000000 +0300
-+++ MTProxy/common/crc32.c 2018-06-17 05:58:10.893000000 +0300
-@@ -443,6 +443,12 @@
- static const v2di CRC64_K128 = { CRC64_REFLECTED_X191, CRC64_REFLECTED_X127 };
- static const v2di CRC64_MU = { CRC64_REFLECTED_MU, CRC64_REFLECTED_POLY_65_BIT };
-
-+#ifndef __PCLMUL__
-+#pragma GCC push_options
-+#pragma GCC target("ssse3,pclmul")
-+#define __DISABLE_PCLMUL__
-+#endif /* __PCLMUL__ */
-+
- static v2di crcXX_partial_clmul (const void *q, long len, v2di D, v2di E, v2di K256, v2di K128) __attribute__((aligned(32)));
- v2di crcXX_partial_clmul (const void *q, long len, v2di D, v2di E, v2di K256, v2di K128) {
- v2di G, H;
-@@ -538,6 +544,11 @@
- #endif
- }
-
-+#ifdef __DISABLE_PCLMUL__
-+#undef __DISABLE_PCLMUL__
-+#pragma GCC pop_options
-+#endif /* __DISABLE_PCLMUL__ */
-+
- /******************** CRC-64 ********************/
-
- static const uint64_t crc64_table[256] = {
-@@ -622,6 +633,12 @@
- return crc;
- }
-
-+#ifndef __PCLMUL__
-+#pragma GCC push_options
-+#pragma GCC target("ssse3,pclmul")
-+#define __DISABLE_PCLMUL__
-+#endif /* __PCLMUL__ */
-+
- static uint64_t crc64_barrett_reduction (v2di D) {
- /* After reflection mu constant is 64 bit */
- v2di E = __builtin_ia32_pclmulqdq128 (D, CRC64_MU, 0x00);
-@@ -665,6 +682,11 @@
- return crc64_barrett_reduction (D);
- }
-
-+#ifdef __DISABLE_PCLMUL__
-+#undef __DISABLE_PCLMUL__
-+#pragma GCC pop_options
-+#endif /* __DISABLE_PCLMUL__ */
-+
- /* {{{ GF-32 */
-
- unsigned gf32_mulx (unsigned a, unsigned poly) {
-@@ -756,6 +778,12 @@
- return crc1;
- }
-
-+#ifndef __PCLMUL__
-+#pragma GCC push_options
-+#pragma GCC target("ssse3,pclmul")
-+#define __DISABLE_PCLMUL__
-+#endif /* __PCLMUL__ */
-+
- uint64_t gf32_combine_clmul (unsigned *powers, unsigned crc1, int64_t len2) {
- v2di D;
- FASTMOV_RMI32_TO_SSE(D, crc1);
-@@ -781,6 +809,11 @@
- RETURN_SSE_UINT64(D);
- }
-
-+#ifdef __DISABLE_PCLMUL__
-+#undef __DISABLE_PCLMUL__
-+#pragma GCC pop_options
-+#endif /* __DISABLE_PCLMUL__ */
-+
- /* }}} */
-
- static unsigned compute_crc32_combine_generic (unsigned crc1, unsigned crc2, int64_t len2) {
-@@ -874,6 +907,12 @@
- assert (crc64_power_buf[125]);
- }
-
-+#ifndef __PCLMUL__
-+#pragma GCC push_options
-+#pragma GCC target("ssse3,pclmul")
-+#define __DISABLE_PCLMUL__
-+#endif /* __PCLMUL__ */
-+
- static uint64_t compute_crc64_combine_clmul (uint64_t crc1, uint64_t crc2, int64_t len2) {
- if (len2 <= 0) {
- return crc1;
-@@ -902,6 +941,11 @@
- return crc64_barrett_reduction (D) ^ crc2;
- }
-
-+#ifdef __DISABLE_PCLMUL__
-+#undef __DISABLE_PCLMUL__
-+#pragma GCC pop_options
-+#endif /* __DISABLE_PCLMUL__ */
-+
- static uint64_t compute_crc64_combine_generic (uint64_t crc1, uint64_t crc2, int64_t len2) {
- if (len2 <= 0) {
- return crc1;
-diff -Nru MTProxy.orig/common/crc32c.c MTProxy/common/crc32c.c
---- MTProxy.orig/common/crc32c.c 2018-06-17 01:58:54.693000000 +0300
-+++ MTProxy/common/crc32c.c 2018-06-17 05:51:35.910000000 +0300
-@@ -337,6 +337,12 @@
- return c;
- }
-
-+#ifndef __PCLMUL__
-+#pragma GCC push_options
-+#pragma GCC target("pclmul")
-+#define __DISABLE_PCLMUL__
-+#endif /* __PCLMUL__ */
-+
- static unsigned crc32c_partial_sse42_clmul (const void *data, long len, unsigned crc) {
- const char *p = data;
- if (unlikely ((((uintptr_t) p) & 1)) && (len > 0)) {
-@@ -527,6 +533,11 @@
- return crc;
- }
-
-+#ifdef __DISABLE_PCLMUL__
-+#undef __DISABLE_PCLMUL__
-+#pragma GCC pop_options
-+#endif /* __DISABLE_PCLMUL__ */
-+
- #else
- static unsigned crc32c_partial_sse42 (const void *data, long len, unsigned crc) {
- const char *p = data;
-diff -Nru MTProxy.orig/Makefile MTProxy/Makefile
---- MTProxy.orig/Makefile 2018-06-17 01:58:54.691000000 +0300
-+++ MTProxy/Makefile 2018-06-17 06:39:32.350000000 +0300
-@@ -12,8 +12,8 @@
- ARCH = -m64
- endif
-
--CFLAGS = $(ARCH) -O3 -std=gnu11 -Wall -mpclmul -march=core2 -mfpmath=sse -mssse3 -fno-strict-aliasing -fno-strict-overflow -fwrapv -DAES=1 -DCOMMIT=\"${COMMIT}\" -D_GNU_SOURCE=1 -D_FILE_OFFSET_BITS=64
--LDFLAGS = $(ARCH) -ggdb -rdynamic -lm -lrt -lcrypto -lz -lpthread -lcrypto
-+CFLAGS += -mcx16 -std=gnu11 -Wall -fno-strict-aliasing -fno-strict-overflow -fwrapv -DAES=1 -DCOMMIT=\"${COMMIT}\" -D_GNU_SOURCE=1 -D_FILE_OFFSET_BITS=64
-+LDFLAGS += -rdynamic -lm -lrt -lcrypto -lz -lpthread
-
- LIB = ${OBJ}/lib
- CINCLUDE = -iquote common -iquote .
-@@ -91,10 +91,10 @@
- ${EXELIST}: ${LIBLIST}
-
- ${EXE}/mtproto-proxy: ${OBJ}/mtproto/mtproto-proxy.o ${OBJ}/mtproto/mtproto-config.o ${OBJ}/net/net-tcp-rpc-ext-server.o
-- ${CC} -o $@ $^ ${LIB}/libkdb.a ${LDFLAGS}
-+ ${CC} ${CFLAGS} -o $@ $^ ${LIB}/libkdb.a ${LDFLAGS}
-
- ${LIB}/libkdb.a: ${LIB_OBJS}
-- rm -f $@ && ar rcs $@ $^
-+ rm -f $@ && ${AR} rcs $@ $^
-
- clean:
- rm -rf ${OBJ} ${DEP} ${EXE} || true
diff --git a/net-proxy/MTProxy/files/MTProxy-3.0.4-no_implicit_func.patch b/net-proxy/MTProxy/files/MTProxy-3.0.4-no_implicit_func.patch
deleted file mode 100644
index 45bb60a62884..000000000000
--- a/net-proxy/MTProxy/files/MTProxy-3.0.4-no_implicit_func.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/engine/engine.c b/engine/engine.c
-index d0c70d3..5c5a5a2 100644
---- a/engine/engine.c
-+++ b/engine/engine.c
-@@ -56,6 +56,8 @@
-
- #include "jobs/jobs.h"
-
-+#include "mtproto/mtproto-config.h"
-+
- #include "net/net-connections.h"
- #include "net/net-crypto-aes.h"
- #include "net/net-msg-buffers.h"
diff --git a/net-proxy/MTProxy/metadata.xml b/net-proxy/MTProxy/metadata.xml
deleted file mode 100644
index 6e8632a248e2..000000000000
--- a/net-proxy/MTProxy/metadata.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://docs.baldeagleos.com/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="person">
- <email>stkw0@disroot.org</email>
- <name>David Roman</name>
- </maintainer>
- <origin>baldeagleos-repo</origin>
-</pkgmetadata>
diff --git a/sci-ml/pytorch/files/pytorch-2.14.0-cpp-httplib.patch b/sci-ml/pytorch/files/pytorch-2.14.0-cpp-httplib.patch
new file mode 100644
index 000000000000..48f286d3c11f
--- /dev/null
+++ b/sci-ml/pytorch/files/pytorch-2.14.0-cpp-httplib.patch
@@ -0,0 +1,21 @@
+--- a/torch/csrc/distributed/c10d/control_plane/WorkerServer.cpp 2026-09-18 13:16:02.333994098 +0200
++++ b/torch/csrc/distributed/c10d/control_plane/WorkerServer.cpp 2026-09-18 13:18:25.083555926 +0200
+@@ -20,12 +20,17 @@
+ }
+
+ const std::multimap<std::string, std::string>& params() const override {
+- return req_.params;
++ cached_params_.clear();
++ for (const auto& pair : req_.params) {
++ cached_params_.insert(pair);
++ }
++ return cached_params_;
+ }
+
+ private:
+ // NOLINTNEXTLINE(cppcoreguidelines-avoid-const-or-ref-data-members)
+ const httplib::Request& req_;
++ mutable std::multimap<std::string, std::string> cached_params_;
+ };
+
+ class ResponseImpl : public Response {
diff --git a/sci-ml/pytorch/pytorch-2.14.0-r3.ebuild b/sci-ml/pytorch/pytorch-2.14.0-r3.ebuild
index 0e8558f1bd5c..89a3a324b33b 100644
--- a/sci-ml/pytorch/pytorch-2.14.0-r3.ebuild
+++ b/sci-ml/pytorch/pytorch-2.14.0-r3.ebuild
@@ -177,6 +177,7 @@ PATCHES=(
"${FILESDIR}"/${P}-unbundle_pocketfft.patch
"${FILESDIR}"/${PN}-2.13.0-xnnpack.patch
"${FILESDIR}"/${P}-license.patch
+ "${FILESDIR}"/${P}-cpp-httplib.patch
)
src_prepare() {
diff --git a/sci-visualization/gnuplot/gnuplot-6.0.5.ebuild b/sci-visualization/gnuplot/gnuplot-6.0.5.ebuild
index 183b1464b908..808391054080 100644
--- a/sci-visualization/gnuplot/gnuplot-6.0.5.ebuild
+++ b/sci-visualization/gnuplot/gnuplot-6.0.5.ebuild
@@ -20,7 +20,7 @@ if [[ -z ${PV%%*9999} ]]; then
else
MY_P="${P/_/.}"
SRC_URI="https://downloads.sourceforge.net/gnuplot/${MY_P}.tar.gz"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-macos ~x64-solaris"
+ KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~ppc ppc64 ~riscv ~s390 ~sparc x86 ~x64-macos ~x64-solaris"
fi
S="${WORKDIR}/${MY_P}"
diff --git a/sys-kernel/gentoo-sources/Manifest b/sys-kernel/gentoo-sources/Manifest
index 1552dd593bc5..bf03abcfcce6 100644
--- a/sys-kernel/gentoo-sources/Manifest
+++ b/sys-kernel/gentoo-sources/Manifest
@@ -1,30 +1,12 @@
-DIST genpatches-6.1-202.base.tar.xz 10068528 BLAKE2B 9ec32b8472aa508600f8067de5ba4293b5342fdc4ab2aec5948f9698e33aed99631f913d9be1debc3649493744fade1881efc8d610097725472df2c6b78d4d8f SHA512 288b2b7850d044354ee49eb46e3db855f06e22fc5842cccb9e2f738e9e33dd1dea1613fcba667fdb0be50ff7cfd02174dbd242128fd4ad0ccc23fd5b2885428b
-DIST genpatches-6.1-202.experimental.tar.xz 17712 BLAKE2B 10a76521c5545f9b00b6d56aecc1050228d27d1cba2d92be38333166b2896de28cf16d0d63ac7bdc3cb9b186b7c68dd8446138563a6e61448235181f9b71d358 SHA512 9a325146f52d200a932f9d73c37b389f708cec0f28a0dfbffc1d256c528a841c41a505ff3223026d7ce1e82232df6589070179a269859294120bfec2399f4077
-DIST genpatches-6.1-202.extras.tar.xz 4032 BLAKE2B 5358876e429dd996097968c01ec06828a9412a2562dea4aa15747759bc7567333d959eb7ce0416f8903c760921788e7e59711bcb773aa78935a2ce25ce5807b3 SHA512 b56228a2141a0ab51fddfcfeab2637de5efdfae4f3b350cac6337b75fd7817bc15bcbad81a95b02361d5091623907bb7adf4694e5c0e6080432a5474899a105d
-DIST genpatches-6.1-203.base.tar.xz 10096904 BLAKE2B 2403fb7ceb1d7ed511c123a3dc64a378147b5556653f991eaa39c305b10b12d52a8b9a6cae7a3cbd3a4cdc600e807424290214255c2c0b5b9f99ce8a4fa26f20 SHA512 2c671ba09249b5af0dd8d07ca16484d508edac943ada942dd51c61569c79cedffc557779de781b6522ff9b7af26e08472d8d82e2fc54c25a5892a9740accf5a3
-DIST genpatches-6.1-203.experimental.tar.xz 17704 BLAKE2B f8766fcdc100a6206d6089f76f7fa64d1e65d39b24fbfb8d8a44e4cf7d66da29206bbe9bbe001c940b474a116270dff63cbe6a3938a165aaddc59f5ff8a3f348 SHA512 0ecccf8c3376c6eb22b0095b9f1f2654f364976a6f7db12b15629fa0d0129111799bc9e2b5ab784a7da5a68cd60b6a8b8192ea3d131e2bcc0cc7df6661abd7ae
-DIST genpatches-6.1-203.extras.tar.xz 4032 BLAKE2B a3eb01b7f474fdafa81a02b24e8a5ca76515c696d22c8c1c7dafe98d96dc22cb28e16bdba524fda40b0729bdc60f13a76f889459dd96f48788420ce0089d31f5 SHA512 2996d9a60ebf9953f1f5ede780594c9ba639c0c5034e019ed48732b0605653a1733485ccd765681fa0569c7e1ada731bd99ee0b73f37481b3b7a91cdca2917f2
DIST genpatches-6.1-204.base.tar.xz 10418504 BLAKE2B d0055770d4eb7b76c28c81f496d5848d2c4fd4a0961c070c86e6cfb4e7918b72239dc171b30136a4864941bca8abdfa82e2abaf979a808670aa6e14950418c47 SHA512 57bb5693b203b2c0d3ef726601a000f2ddd396056bd8b8cfd98e6eb3b52474064888e8d084274d102a8da848f038c162d9b695d21066f2be1e230484ba9d44e4
DIST genpatches-6.1-204.experimental.tar.xz 17708 BLAKE2B 0791b5e89b9c4b78d758de77d7838442b1cbf159c55a8d8b4001e19c1d6822022fc1f6ce78dd6feace51be32f76da634e0ad00197310eeda74ac6592bf85c6e2 SHA512 658990ed66c1f430389cdc86f101fd61bb87033369988f05038586f7ddddf2719093235218c5b0b59341ccb175556acc6e857192d956254fb01f4b47c6845091
DIST genpatches-6.1-204.extras.tar.xz 4032 BLAKE2B 4daa1f7560285a659f8cff0f0807d551527c1e543799a8e395b994e0683a959d3e92f4ab26bb9be8a07868d28860a20cb85fa2daac3cbe4febbe89163367d5bb SHA512 616e05bdad9842b7d7dba3f00d79a0f69a38478efbaf7b7f3b76d5761261c23d14e06f1f452808e2353823509b9877e3744e896cfb8a8c4c1abda2c3179563eb
-DIST genpatches-6.12-119.base.tar.xz 6625800 BLAKE2B df833db761f479d4b0459ae3846d9c0f39ef8f70f0f8e706ec3e83b1520a29629738fc87660521415ddd650514c72045328dca64964c4cb388b2a757978b138a SHA512 52f4e61ef4646699a97074a5ce65550c95a9cad43558491b0b59aa3a4e1fdd7b08d34412b4436e2ff1c48cccbc7b8bef417b3a6fd78230363b5ce5497e393ea2
-DIST genpatches-6.12-119.experimental.tar.xz 6048 BLAKE2B 10da87c50b95c080b1ae5e9899c867b5fffdc4f0d88040a98e457bddd6c5c305d2d1c9bc1ee310f178463081cfad4df18964bde4c29d82bfe8b7185d02e3e673 SHA512 8fef799f8e96bfeb1d10a0826326cb582a656e8f4df46a6bee40df7545ea323650ee568efb66e51d21634a3bd88367d31d138aa980d294ba371402b8b127445e
-DIST genpatches-6.12-119.extras.tar.xz 4300 BLAKE2B d6a99c9efdf563bcf96754aaa274a57650ec81f9b0ea48a42244ae85d28673111befab4e7d27fadd0585af9b54b681d900f7a1395565ed750428da3431117c5b SHA512 8f13503fcf18d30b0b73cf50b2b436fcd83268e0872635c29b3c72de2d84c54bbfc7d74bfea535e68a3186ecf9fa300e1292c099d285ab2e066045db389cf9a2
-DIST genpatches-6.12-120.base.tar.xz 6660520 BLAKE2B 8971d64637c6068869f6b1f365792f72a5ff92fc02512095c68d8bde28f137b5c772795988ffc85e465bf9ef48e41f3ec6701dc1bceef02a2096c371b5e116bf SHA512 441f8620626f47d807fe64b146ab0ad6291c09c38ffd9043f6b8c99ad26e60b86572c033c4c5e70a3495515dccc13187a492ed2191c3c56dc3651be0461f9d1c
-DIST genpatches-6.12-120.experimental.tar.xz 6052 BLAKE2B 31b581808e921eecb334850f347cfa25a772a0d3caca6f298244d75bec1a83149628e92cb214e76fa91bfbbf4c74604391b272fecfb0ad4f59e012aae695e0b7 SHA512 83fe25dc59b1ddedd82da119010ddbb4ae30fe54d56e24b68c6c7c6cd2694e044c41360e6da5da3ef1a8e2f77757defd3cd13b9943663c4c7f846e7fe9199512
-DIST genpatches-6.12-120.extras.tar.xz 4296 BLAKE2B f0974ce0c05ec60dcd9d77d277677a2474707b74141f87aa7928d5d8de1df720c1357c47e9748346b9a026f4f88fa9ddd0f5112c26320a58e8707e1ee5a2f5a0 SHA512 d8886990a8277cacf7948614e33c65f1cd733b894dbaa8334e87a9554b33945a60bc9c23f42d26ecb21c4d0f868db277bc16d5acfffe1739ceedc493f64a8eb7
DIST genpatches-6.12-121.base.tar.xz 6758036 BLAKE2B c550dcc2504ea811a332f532f06aed6e630a40080284791866156e6eb16275d73c0a1bb7adeb1f11d08341a35795b3050b10ce7251d216467828c3c3a0ed4c75 SHA512 6b4d1ae4af72913ca9eace08f37b4ddd34453a520d8409f4d45855c1a659ce47012a7668d5c8930afa49957318ee0a674c78752b9f34c2119f8d5629aa057296
DIST genpatches-6.12-121.experimental.tar.xz 6052 BLAKE2B d053c28b230e651e2caf41547245cffdcacb29a178ccec834e55d2e9e0eb5e390e4c4f84b966430c5eb888fe3cbea2273156c07f13e9ab8b8635c2090eb16a8a SHA512 db1ff2937ac77344e89da06101b3323a5e9605766552519b526b6bf262098e5ac9a63326374466761bb1862a1d0cdadab2cf18a3e859a2e8b377e4a6f0612a78
DIST genpatches-6.12-121.extras.tar.xz 4300 BLAKE2B 7d5ce847a3ca2b7f9dd79794de05e718f591e49733fa7250fbdcd892e5c243a65b2cbdd3526cafbe2a9c75b708debbc51593ed530d4046c48ea29ecf966e4914 SHA512 55059a2fbd0a584066b476d16db1e1efd80c89512cca21a6d99605b4880a6a72f3f8014df91ac9d2543cbc96553ba6e7ba20c34f6c5a215eb422bda2f685aa9c
DIST genpatches-6.12-122.base.tar.xz 7158960 BLAKE2B a82b4c8c3051d3e74e018d235070a33c6ad9683c53f9eaf5e363477238e81ea03f20854e0f645a4d0529e18276bd7359ece73a03b563f9d760bf14811608b86d SHA512 a6bfc6a57eef45b3c9becc3e8a277607bec7ff578b38c97653d85e986ec4e622eff2d4f7bc64a4cfb3837b1c18e088639ac8017ecfc8e9e04a33647adc3f3051
DIST genpatches-6.12-122.experimental.tar.xz 6052 BLAKE2B ae6ba83764b30a4faff1f755bd18161018bfd353fe56fecb1f4ec8562cfb4924a775fb2e3d8646c478c62b92754cfa1b9028b03ead7ea7474cb19ea54999af3e SHA512 3d042c04c7ba0ec4bde65a4fb2704844b9d0a241ba9bfe884d04bd134ce409bf9846d5eac7434e5885ba2f5480005880efe27c0c46e9eb4b2ee4ae7baead7f91
DIST genpatches-6.12-122.extras.tar.xz 4300 BLAKE2B a2d4485ba7102841d740bb8e4707e05c032d26a12bd9e8976345a549160d29e67eb905777b94155f6e8cf7f8c7cf00ef8ec9f270b39e526235a42e240c532493 SHA512 17bdcdc914bdaae544f68f889888bf31ea23febf5a5708f53bfe00c20bc3197caea33f98f88022ff79c7eb8f931a3bce0330e3030f80a7914ec3a8eb086b50a9
-DIST genpatches-6.18-55.base.tar.xz 3541812 BLAKE2B bdb2bfb0ab3bcc33b78ae97239b5d5a04b46cbd7bc12f1c1734374873e5225fca56f6345335f47ca285f0c51c3fb491e0e4f46dcc8b6dfd33f955b27260aea3b SHA512 82e892fbd353ede694eca0931fa1bd1424f6b831946b931bd1df052af7b8ad87633f679e4b7a16f7922a6a6e1b2761cf2189ba129890fcc5945976111ecb6b06
-DIST genpatches-6.18-55.experimental.tar.xz 6004 BLAKE2B ff266b56f061adc0f6e18a377cb073bc1444e673cc674b921f3095216650b74a6e934690506af4ccc0b56ca7c47701ac469b581ffac3aba1d99854b1ad8da560 SHA512 0cb31585f99b34e563bffbceab9998dea6de5f425a54d910ef861fb09d4428094607f9298fd1ba105ca5e15b177ac91b40ecbd80a461d6597c927df553a5eda4
-DIST genpatches-6.18-55.extras.tar.xz 2176 BLAKE2B 2b7a5663495da66163ca13b8f0564ef55e60227ea382d63a6c2cec8618eec30ff808480ceac41cdaa861e2f53f5b5af1b210a609e165ba7c3f71d4994e801594 SHA512 0c842abceb93e45ab5eb777a1371c8a0159374667a8aef23cebe369fcfaaebad8c7a2dae998be184cbf1382cd834c517fcde083be709944d3d163b15a0e92963
-DIST genpatches-6.18-56.base.tar.xz 3570124 BLAKE2B a166af36b955267c3c1f50b7afc47a5c588e2deedfd616a7d61520484291a5dd8eee477cb1ebf830fb73caab912fe3270e3f3448e6eed241471be3d907b75761 SHA512 5d8e7569266afc0d13f9ca800c5a9be71b642742a35115ed3c7fb1ef6e9914f22d29acffe0fd2b8361cf9eb13f992cd4f270207890dd6ec8ee6763a9e109b831
-DIST genpatches-6.18-56.experimental.tar.xz 6004 BLAKE2B 50ef4f8741224964046fbd1da69259fe441e1f47e8f3f51617714a968d17b7343332e8c33533fa14f82f3380d11a322f66440388431f33ad79877bbc18ff5332 SHA512 0480dc91360b2ecdd0c904978fac1c38775a84a715c60d143134d85ba5d3512caf87e4253ca776ce889ab6d0ed789f4b3c35cb76bbe0b444e9a5aa3b0738b257
-DIST genpatches-6.18-56.extras.tar.xz 2176 BLAKE2B ecbd7a10a76e4ec28b7bad2a661eaaecb7973077d50a678c777a1475a7b8e065db1e956a8db3c131c060bd65cd200cbb72d04bec92d10a170365954ae3afdea6 SHA512 0b0bc3bd1942b92e4331f53c570cc734c9d9e4489ab04db240b62b00d306e504d0d4c54673c6c83c674e1427de336079014b63a378f1da222413c8af5bfe02ec
DIST genpatches-6.18-57.base.tar.xz 3710308 BLAKE2B 66f5c5628f6448a36be37fb94033965fdd683db4c80a5b9a6ac94693ca42739958bd2ecb8d498d19d4e78cf18411c2519c90b1a7b0e3f642f14c0adec3539fab SHA512 fcf54c6b4eb48b766c6966cb521d2f5bf1e01b3ca5c5fb748a7c033f873a76e0f8abceae1a8d85904472cdb758623c3b5763034a0ad4082318d6a1c0406d6f62
DIST genpatches-6.18-57.experimental.tar.xz 6004 BLAKE2B 5ad78f7ce97050b9baaf26c2337e0a2d3491897ec6f39e5a9eba7dde167eaa8448b7c604ee4e81e14f20990eafede26c0b33c78d7b05cb3976c9d1e137688753 SHA512 986410b7c870a56bd1ef87eee0379d104a888e798ecc6974a49ef688e96fc9f26528fbfa848d264654fda77371caae207fb32a2b0012bd547befe68fc79c46d6
DIST genpatches-6.18-57.extras.tar.xz 2176 BLAKE2B a7b6bda82a3ec551394411ee8ba10b3f652e78e35193c29183c5a636d0e5c2ada8315654049b89dae20757fc90e5278837abdf6f03967651c6a8e1c5ab1ef854 SHA512 92fe9c4c31303daf03ef4d69220cfa4c1f928a73db569fd3a25f2d318131f5dde3ac523479bbab9f759f52c728c04fe3e574e4d1eb1b2d739254928110978ab3
@@ -34,24 +16,9 @@ DIST genpatches-6.18-58.extras.tar.xz 2176 BLAKE2B 00604e5274ecde3f299b5f1cbe47a
DIST genpatches-6.18-59.base.tar.xz 4383624 BLAKE2B 120efefe8e08019cc3226bbb3c5e5f6942d2dcc384acbd2eed51d681c3f141908775dae003fac3b00e458c2608cd2ee819c88e3f59b37c8ec9fa9f597cc9ed20 SHA512 871e8beef6b1c9a4fe0445c34a3d240f20aa45ce8a3c53498a7fcd0dee6c9c769770ee34af60acb7bcb2450422acfbaa209f5441e7fff53031cbcea3f07511a2
DIST genpatches-6.18-59.experimental.tar.xz 6000 BLAKE2B 071d1437e61ec500c5ce1047a561c3798388b1111cc57a1e1a350a7a2c906017452609a1c3b540ca74ef9338b94780b7312a1fadb1b6c7bd7b4e1178af0bc872 SHA512 a5c3c20d1e3df67279ee80a798de165f2af5ca371a32de80f8520a928bc9c55d8eb909bdcd64025fc956cb2237f66ebb2529e2a33d85378487abd1881567e968
DIST genpatches-6.18-59.extras.tar.xz 2176 BLAKE2B 939ed95fa63011e966cc3b35872e0af458ded656d0591288f00cd91d827fcf8747e990c024027e87e71accc223a2ae35a837b16f64265f37afe86532ea8bc4c8 SHA512 46db5cdbde3c5ea212c2ebd19c9afa1c697054b48d402b3fa1237f3a05575fb6bc716096b8f024ceccd92208d24a5e5d308f117a11dd6604b1b8a8f19b61c21c
-DIST genpatches-6.6-169.base.tar.xz 8389116 BLAKE2B 0ccc10fa8b2626844997df44bff879e3f3913a2b0042ba84651c1580c4362d1c733b7cfaa0060e84c6cfc40aa99679c4904419c692c4bebbc77d0b54c8487e38 SHA512 2758b54d2d8dcc5caaa5a89fdf670c66b6124a98edd2431594c6e09f60c3a44a9fa41e7168b3a3559c4efcd73449a3b3bb53f2b35113d560497e97aa335a817e
-DIST genpatches-6.6-169.experimental.tar.xz 6052 BLAKE2B 1f24146a9dcecb58e393c55e897bcd0d6834b6834c8c5ab2d85faac0008bdb0ff324bdd9e628b57834e3e3b489c6c6418611e61b989e37c1f731b0e36d1823d7 SHA512 660cec2d1dbd492bf8fb2843085a797c4924a94d4e3541963ff383a4bd106470cefbf24ad9783993b5ccdd066e73b3ca9d1f47ce92ed5c4da549d0f9032194c5
-DIST genpatches-6.6-169.extras.tar.xz 4028 BLAKE2B 30a8a55f8bece00a92a12aa53b03adab7b8d8941575e58777f62025cfb9e786e5196561a9ff51b6edaf7b703bdd84d987661d575d1a2c007730276e2b639081a SHA512 03fae8c9d0757d10ce68e5cb9c9aa684391692afba88ff0771ae4c0e813c2fa9ee42b8558404dc1782452e91a80ec2adcbad328cf68453a19be8c400d83b617d
-DIST genpatches-6.6-170.base.tar.xz 8419868 BLAKE2B 23e906787639e838c7e1c9ba3dac5648bd8d34e6bce8895bbfaf888dba99355cc13fdf8228b12364b3d0d81bbe53f8f9c61fae48b5fc72b41584cef41e4659f6 SHA512 eb74afe29e5c4047862e473def52803b89768b0c953cf8568b8dca13291168823e130c591199567059305a01017659acd9a491876fd4d9236cd5df89014633dd
-DIST genpatches-6.6-170.experimental.tar.xz 6048 BLAKE2B fffc9854e81412fffd07f0f33ceecbd26a33e127ed4222c8a01a8e1289781ca041d197c27840ab4cc6ef82d80a290ce576f631adcf8fc347bd0897b433f28959 SHA512 3bd7f89f371b48fbef39508bc22a9e7fabc8378d538cc4819bf80cf6bf4ce7471c39b79863d7fdaeb63c7c9fbae78f52540553c01590d487e66861f52735668c
-DIST genpatches-6.6-170.extras.tar.xz 4032 BLAKE2B 5f33e50e718ae53cec2e92f1c6dad432dcacf174478c739de5d488d4e5981fcc23ce0a1f53f263b2cd4cce50b9b0a48960bcfce50dcb4dbad57657a96b4d0fc1 SHA512 4fe6aad78aa5a9b12c62155c4bc47625ecf7934e2302a6b26e2d09741d90cdbd08ccabc3c5c0fb5fef4f21f0531c096640ebcd33c261aae53e686135a9b3bfd8
DIST genpatches-6.6-171.base.tar.xz 8794668 BLAKE2B 59c8660afe0581d3814068f4a1984588807ebb464ce6b4e00222784dca0e7d2312bc3578b74631d1c795716ce2fd7191ee1fa467555d04e3e911f9e4154092b6 SHA512 f69296a5e0b888065054f0977e37d58c22e4dd8586c7b8dd82248ae46518f04d2a209e6e0cbdcae7fdce8947bd35d237c4c4ee24003c2ed8b04a3fc73b7169a2
DIST genpatches-6.6-171.experimental.tar.xz 6048 BLAKE2B 0ceb54d9ddf2d5924b658c7b4a35f5ca2b00226de03d7fd96b5097f4533e295b53a5a0269849b6005865552ff5ec4da780abf9a5711886545b17efc61824431d SHA512 9456dc5fe6b9219fc24412ee11b14e2e9d2a92d746a10ab4f596a709811b93d337dcc63d368a597dbe394e8f5b94990c135d35e03abecc641c4b01c7b964d401
DIST genpatches-6.6-171.extras.tar.xz 4032 BLAKE2B 3df3f41a4de0a744c58de290dcd0d26d5163c427da4f9aa3c76a9c742c7f83682ddd6f67df3c1f068abe28f0cd5b71e2098fc39ff37aea6992b412a83cc5c7a6 SHA512 85b6b2824945f7799b8f79a4a814f157b67f2f20e2be7ce267593fa7020e9bfa2cb1bc0eaffee1f855c7ae441a31fd5d8f08ff3721da139460962e04f07affb6
-DIST genpatches-7.1-15.base.tar.xz 1443592 BLAKE2B 1c4b9e1b06201bb4db2ab22a151f03db6fc0f77f2c38dafdaa5deb17f21211d9a9ea34b7c62745cbec88dd42179a2dce1a49ac92a7fec0caee776db07402d364 SHA512 cf760d6828dd61c3ece4eece33dfb7e6a9975c685fd40fb991da55a9bc8ef793cc7c166102dccdcb0792e5c68b82d6ab697faa9747ce74a9869a105e706d912e
-DIST genpatches-7.1-15.extras.tar.xz 2176 BLAKE2B feb1fa3f8d08cba7e55dde1137c9460c66fca1f955da907a64286cac99204e9cdfaf3d67569f7ce3831c5244c345a33ad0e0dc46dfe65f5a5dcc3848e70bd023 SHA512 e42815e6864282cee77e537b5883738b1379f6cc088c3ff08fddadcb9dbffc549fdd8f37e99d052749f5e5ba9775809990671433cd7071f24ab24fc2e1633970
-DIST genpatches-7.1-16.base.tar.xz 1471484 BLAKE2B 897e31bbca698babb1e8a8061c52308053e4077d072232269604e9263e274d0d1e4eb058042ddd3274edb2ef300dd0d2d3c29796fa70b07559de3be251c602a3 SHA512 8284453894f9a1cd9dc7403f88ac5ae43e3ba5180891be46d449ecf1535cb718dc96bfd2b30dbb3624c9ca1054fc5bbc973df748b6e97696a78874bbd89405db
-DIST genpatches-7.1-16.extras.tar.xz 2176 BLAKE2B 2cfd9f872314ae3097248b16a3800677e72253f837be680938b5dcd3e8828f92624203f0b7d52951ab7ad4c8e9ab0945e072d550503a3f476f6e18fc3e612b1e SHA512 340fb059bd2766a5f0b62e56c9f897491c20606e180056dc896067e93e4fa0a2083fd37c63e32e205bed8dd3dbcff9ce875a63697c7b703481a4c80166719e74
-DIST genpatches-7.2-3.base.tar.xz 40296 BLAKE2B 298dad4a3b891cf911cf4bf9da48dd352b9333a8442e11036cf2cffb615b6524b68a41b6544e7c3077766f60f0af973d98ce0aca888e30c185ff3a28c1d00785 SHA512 41ee3268a9ea67707bd3ed9122ac4c5b877d9c61af432c4f3e0c9766521d2e15153d8f4619473a73c0ef1140c2d3fd85c68721e552f946257ee29d99729febd1
-DIST genpatches-7.2-3.extras.tar.xz 2176 BLAKE2B a8c3ae15748f83e6dfb55b2baef2b61e3ef204beedd16e17b4795d113f6019ca8a05e0415228933ecf2dc14e44e757ca457543d044484d1c28f6d1b873613665 SHA512 44e0be3f420522fafeeb08e3a58b59ebfce243e6332e34573c6abc6ed7797c1c5bb6e1823abfa4b08a81408bfaf0ac49ff57a2d4ad27fa26da7609836aba937b
-DIST genpatches-7.2-4.base.tar.xz 70808 BLAKE2B 16864ac1847eff64c03b2c48fed01cb0deee39140d50a8e24aa0a2b9dd9c0171fc8e3261a9bfe8a118df8f9cddbfb3767891c2f7ab3b2575eb90097de7d501f5 SHA512 36d7bc8e1687c7bbbad40905e7d3d7686a91c652790004df6a4c407b2d2e3970b087ebfbaafef59f4015a6ff853debdbb257295ce006624636b97d614c62b7ea
-DIST genpatches-7.2-4.experimental.tar.xz 76420 BLAKE2B 2e08b3828699e7c64e4b07618f34670f85440837598c0399d71c4defb8301b2787ee0e3433687ab55326e23a35280d5e17d0bdc790d3dae7c6b8effb58eb8e2d SHA512 c328edf5a88d881cb857ef1d914a090c8f0bcbb1289393cb689af974f36ff36a29b9dc118aebb94fa850ff8c3de76d32231d6e517c484e363ef43106c22bdda8
-DIST genpatches-7.2-4.extras.tar.xz 2176 BLAKE2B a84c3da742f6018cc15cc55d0e3eeacad441ab62fe58c5c4f95ec72635ee4a32ad9178d4364d46cfe4af5d11820539f2ce6194e0b6f3dcb2dfd766e57dc726c3 SHA512 ed73ac41a3b13b076479cda52da8a4f2b79545bb9ac2c937ee5eefc0eebc77269758e10242b4d4408903ddb206079f6d362e325b73375560e5d4ad4be4da7b44
DIST genpatches-7.2-5.base.tar.xz 290200 BLAKE2B 451503b27366c50f924947eba204e4e245e06245f642189747eef33f59a6f11a3d82bb2f8b2ec15f20849c7ee5dae9e37f5ed67b5a88a14cccc961b6c1879a8e SHA512 9aac4e9db856e9dbdb02a74318a9875934e495b990ef4267c1d7be2e0f4c1e4d66206cb9109f54ef5861a3a2431043b632f19ad60a9e2da9db5be9a6394c3904
DIST genpatches-7.2-5.experimental.tar.xz 76408 BLAKE2B c4233f563fc105ce25f36fe7b7364928e8203aad3c18bc47634b411922f15e0f27b28bd77f81cb1888dd8d8259148ad7b5d9a16db148f81d8d7a7204b74233ea SHA512 d0d2c91feb2ff64a95f10be169f7664a1731bbfe92eaf99c93c88f12509d54b38060374dffcef0acff9a4618d68e301383ab127f68c28e6b337017980783c85e
DIST genpatches-7.2-5.extras.tar.xz 2176 BLAKE2B de52b3a4c63cc2bdb01b2aaf3f6800966c752cb3590fc9a4b7694d16cb8f7a617d600f5df68cd1b281f272423c08adf2bd21dcaa89e54579c9192177c15462f7 SHA512 ef21ede35666b442ca4c402bd36f66693739e4429b8961d25f8bfd7606cbcba6ce8112711f367c6454b4d4ebf43d78cd4bb80893cd91031530fd413d94bb340e
@@ -65,5 +32,4 @@ DIST linux-6.1.tar.xz 134728520 BLAKE2B ae60257860b2bd1bd708d183f0443afc60ebbd2b
DIST linux-6.12.tar.xz 147906904 BLAKE2B b2ec2fc69218cacabbbe49f78384a5d259ca581b717617c12b000b16f4a4c59ee348ea886b37147f5f70fb9a7a01c1e2c8f19021078f6b23f5bc62d1c48d5e5e SHA512 a37b1823df7b4f72542f689b65882634740ba0401a42fdcf6601d9efd2e132e5a7650e70450ba76f6cd1f13ca31180f2ccee9d54fe4df89bc0000ade4380a548
DIST linux-6.18.tar.xz 154309096 BLAKE2B b94b7b9bf18aca0c3e50baf79b009a1448fc6cd9c3ee019f641cc247dcf53a4abef4274ee0608ad8cd4943af69854363a95d26e117ff23620bb07dccb158859f SHA512 88599ffdec96d150c1feb9b261ba93bb0301a9d0e1ad6bef7aeab1f5372cbfc57d8b43c7e902bd8f76921d1dbd8189663c142ea869e51d0e2b483b150ee00fe0
DIST linux-6.6.tar.xz 140064536 BLAKE2B 5f02fd8696d42f7ec8c5fbadec8e7270bdcfcb1f9844a6c4db3e1fd461c93ce1ccda650ca72dceb4890ebcbbf768ba8fba0bce91efc49fbd2c307b04e95665f2 SHA512 458b2c34d46206f9b4ccbac54cc57aeca1eaecaf831bc441e59701bac6eadffc17f6ce24af6eadd0454964e843186539ac0d63295ad2cc32d112b60360c39a35
-DIST linux-7.1.tar.xz 158304768 BLAKE2B 5199b2057fd1b89f0275bdaff9d81035cf5e1e8e64318a4a67467399245628a0f8c5e82f9d80dfc54b094349a8cfcdc892b7a4ad4bdf5dd1daa268ff30c1cf38 SHA512 d4d9c45261813559341c67ea53d4a47f5a04d1ad15e3c2b8222a09b5483380d2bfd31b8c675e144db2eb91f560d6cb28f66187a5ea4f24f6dfb82a4ad48064cc
DIST linux-7.2.tar.xz 160068116 BLAKE2B cf5f3d87b96f223034c47c6e5fc972fe52c2556310eb2f064632537b8727231135a8540179fd5d51343738c8a51f51f09c7e8da374324b68551c84a4124bb71b SHA512 47e63679363261a864d271277340a6f2d45f544e1a056be4159df081f4f6537d0efa865c4af26611ab33a3079ee65db88ec2f6bc0e5fff43e0c043cde0cd91e1
diff --git a/sys-kernel/gentoo-sources/gentoo-sources-6.1.186.ebuild b/sys-kernel/gentoo-sources/gentoo-sources-6.1.186.ebuild
deleted file mode 100644
index 35ffea725e60..000000000000
--- a/sys-kernel/gentoo-sources/gentoo-sources-6.1.186.ebuild
+++ /dev/null
@@ -1,27 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="8"
-ETYPE="sources"
-K_WANT_GENPATCHES="base extras experimental"
-K_GENPATCHES_VER="202"
-
-inherit kernel-2
-detect_version
-detect_arch
-
-DESCRIPTION="Full sources including the Gentoo patchset for the ${KV_MAJOR}.${KV_MINOR} kernel tree"
-HOMEPAGE="https://dev.gentoo.org/~mpagano/genpatches"
-SRC_URI="${KERNEL_URI} ${GENPATCHES_URI} ${ARCH_URI}"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"
-IUSE="experimental"
-
-pkg_postinst() {
- kernel-2_pkg_postinst
- einfo "For more info on this patchset, and how to report problems, see:"
- einfo "${HOMEPAGE}"
-}
-
-pkg_postrm() {
- kernel-2_pkg_postrm
-}
diff --git a/sys-kernel/gentoo-sources/gentoo-sources-6.1.187.ebuild b/sys-kernel/gentoo-sources/gentoo-sources-6.1.187.ebuild
deleted file mode 100644
index 92174c884f1a..000000000000
--- a/sys-kernel/gentoo-sources/gentoo-sources-6.1.187.ebuild
+++ /dev/null
@@ -1,27 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="8"
-ETYPE="sources"
-K_WANT_GENPATCHES="base extras experimental"
-K_GENPATCHES_VER="203"
-
-inherit kernel-2
-detect_version
-detect_arch
-
-DESCRIPTION="Full sources including the Gentoo patchset for the ${KV_MAJOR}.${KV_MINOR} kernel tree"
-HOMEPAGE="https://dev.gentoo.org/~mpagano/genpatches"
-SRC_URI="${KERNEL_URI} ${GENPATCHES_URI} ${ARCH_URI}"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
-IUSE="experimental"
-
-pkg_postinst() {
- kernel-2_pkg_postinst
- einfo "For more info on this patchset, and how to report problems, see:"
- einfo "${HOMEPAGE}"
-}
-
-pkg_postrm() {
- kernel-2_pkg_postrm
-}
diff --git a/sys-kernel/gentoo-sources/gentoo-sources-6.1.188.ebuild b/sys-kernel/gentoo-sources/gentoo-sources-6.1.188.ebuild
index 6b2a0ffa93ce..d54d46b51814 100644
--- a/sys-kernel/gentoo-sources/gentoo-sources-6.1.188.ebuild
+++ b/sys-kernel/gentoo-sources/gentoo-sources-6.1.188.ebuild
@@ -14,7 +14,7 @@ detect_arch
DESCRIPTION="Full sources including the Gentoo patchset for the ${KV_MAJOR}.${KV_MINOR} kernel tree"
HOMEPAGE="https://dev.gentoo.org/~mpagano/genpatches"
SRC_URI="${KERNEL_URI} ${GENPATCHES_URI} ${ARCH_URI}"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+KEYWORDS="~alpha amd64 arm arm64 ~hppa ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"
IUSE="experimental"
pkg_postinst() {
diff --git a/sys-kernel/gentoo-sources/gentoo-sources-6.12.107.ebuild b/sys-kernel/gentoo-sources/gentoo-sources-6.12.107.ebuild
deleted file mode 100644
index d23b09e19e14..000000000000
--- a/sys-kernel/gentoo-sources/gentoo-sources-6.12.107.ebuild
+++ /dev/null
@@ -1,37 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="8"
-ETYPE="sources"
-K_WANT_GENPATCHES="base extras experimental"
-K_GENPATCHES_VER="119"
-
-inherit check-reqs kernel-2
-detect_version
-detect_arch
-
-DESCRIPTION="Full sources including the Gentoo patchset for the ${KV_MAJOR}.${KV_MINOR} kernel tree"
-HOMEPAGE="https://dev.gentoo.org/~mpagano/genpatches"
-SRC_URI="${KERNEL_URI} ${GENPATCHES_URI} ${ARCH_URI}"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"
-IUSE="experimental"
-
-pkg_pretend() {
- CHECKREQS_DISK_BUILD="4G"
- check-reqs_pkg_pretend
-}
-
-src_prepare() {
- kernel-2_src_prepare
- rm "${S}/tools/testing/selftests/tc-testing/action-ebpf"
-}
-
-pkg_postinst() {
- kernel-2_pkg_postinst
- einfo "For more info on this patchset, and how to report problems, see:"
- einfo "${HOMEPAGE}"
-}
-
-pkg_postrm() {
- kernel-2_pkg_postrm
-}
diff --git a/sys-kernel/gentoo-sources/gentoo-sources-6.12.108.ebuild b/sys-kernel/gentoo-sources/gentoo-sources-6.12.108.ebuild
deleted file mode 100644
index 585dd27a7615..000000000000
--- a/sys-kernel/gentoo-sources/gentoo-sources-6.12.108.ebuild
+++ /dev/null
@@ -1,37 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="8"
-ETYPE="sources"
-K_WANT_GENPATCHES="base extras experimental"
-K_GENPATCHES_VER="120"
-
-inherit check-reqs kernel-2
-detect_version
-detect_arch
-
-DESCRIPTION="Full sources including the Gentoo patchset for the ${KV_MAJOR}.${KV_MINOR} kernel tree"
-HOMEPAGE="https://dev.gentoo.org/~mpagano/genpatches"
-SRC_URI="${KERNEL_URI} ${GENPATCHES_URI} ${ARCH_URI}"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
-IUSE="experimental"
-
-pkg_pretend() {
- CHECKREQS_DISK_BUILD="4G"
- check-reqs_pkg_pretend
-}
-
-src_prepare() {
- kernel-2_src_prepare
- rm "${S}/tools/testing/selftests/tc-testing/action-ebpf"
-}
-
-pkg_postinst() {
- kernel-2_pkg_postinst
- einfo "For more info on this patchset, and how to report problems, see:"
- einfo "${HOMEPAGE}"
-}
-
-pkg_postrm() {
- kernel-2_pkg_postrm
-}
diff --git a/sys-kernel/gentoo-sources/gentoo-sources-6.12.110.ebuild b/sys-kernel/gentoo-sources/gentoo-sources-6.12.110.ebuild
index 894558b12c1b..43554e80ac29 100644
--- a/sys-kernel/gentoo-sources/gentoo-sources-6.12.110.ebuild
+++ b/sys-kernel/gentoo-sources/gentoo-sources-6.12.110.ebuild
@@ -14,7 +14,7 @@ detect_arch
DESCRIPTION="Full sources including the Gentoo patchset for the ${KV_MAJOR}.${KV_MINOR} kernel tree"
HOMEPAGE="https://dev.gentoo.org/~mpagano/genpatches"
SRC_URI="${KERNEL_URI} ${GENPATCHES_URI} ${ARCH_URI}"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"
IUSE="experimental"
pkg_pretend() {
diff --git a/sys-kernel/gentoo-sources/gentoo-sources-6.18.48.ebuild b/sys-kernel/gentoo-sources/gentoo-sources-6.18.48.ebuild
deleted file mode 100644
index 5b84dd83b3d3..000000000000
--- a/sys-kernel/gentoo-sources/gentoo-sources-6.18.48.ebuild
+++ /dev/null
@@ -1,27 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="8"
-ETYPE="sources"
-K_WANT_GENPATCHES="base extras experimental"
-K_GENPATCHES_VER="55"
-
-inherit kernel-2
-detect_version
-detect_arch
-
-DESCRIPTION="Full sources including the Gentoo patchset for the ${KV_MAJOR}.${KV_MINOR} kernel tree"
-HOMEPAGE="https://dev.gentoo.org/~mpagano/genpatches"
-SRC_URI="${KERNEL_URI} ${GENPATCHES_URI} ${ARCH_URI}"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"
-IUSE="experimental"
-
-pkg_postinst() {
- kernel-2_pkg_postinst
- einfo "For more info on this patchset, and how to report problems, see:"
- einfo "${HOMEPAGE}"
-}
-
-pkg_postrm() {
- kernel-2_pkg_postrm
-}
diff --git a/sys-kernel/gentoo-sources/gentoo-sources-6.18.49.ebuild b/sys-kernel/gentoo-sources/gentoo-sources-6.18.49.ebuild
deleted file mode 100644
index ec43d6a86caf..000000000000
--- a/sys-kernel/gentoo-sources/gentoo-sources-6.18.49.ebuild
+++ /dev/null
@@ -1,27 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="8"
-ETYPE="sources"
-K_WANT_GENPATCHES="base extras experimental"
-K_GENPATCHES_VER="56"
-
-inherit kernel-2
-detect_version
-detect_arch
-
-DESCRIPTION="Full sources including the Gentoo patchset for the ${KV_MAJOR}.${KV_MINOR} kernel tree"
-HOMEPAGE="https://dev.gentoo.org/~mpagano/genpatches"
-SRC_URI="${KERNEL_URI} ${GENPATCHES_URI} ${ARCH_URI}"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
-IUSE="experimental"
-
-pkg_postinst() {
- kernel-2_pkg_postinst
- einfo "For more info on this patchset, and how to report problems, see:"
- einfo "${HOMEPAGE}"
-}
-
-pkg_postrm() {
- kernel-2_pkg_postrm
-}
diff --git a/sys-kernel/gentoo-sources/gentoo-sources-6.18.52.ebuild b/sys-kernel/gentoo-sources/gentoo-sources-6.18.52.ebuild
index 27018644381a..90ea10e15ade 100644
--- a/sys-kernel/gentoo-sources/gentoo-sources-6.18.52.ebuild
+++ b/sys-kernel/gentoo-sources/gentoo-sources-6.18.52.ebuild
@@ -14,7 +14,7 @@ detect_arch
DESCRIPTION="Full sources including the Gentoo patchset for the ${KV_MAJOR}.${KV_MINOR} kernel tree"
HOMEPAGE="https://dev.gentoo.org/~mpagano/genpatches"
SRC_URI="${KERNEL_URI} ${GENPATCHES_URI} ${ARCH_URI}"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+KEYWORDS="~alpha amd64 arm arm64 ~hppa ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"
IUSE="experimental"
pkg_postinst() {
diff --git a/sys-kernel/gentoo-sources/gentoo-sources-6.6.155.ebuild b/sys-kernel/gentoo-sources/gentoo-sources-6.6.155.ebuild
deleted file mode 100644
index 05e79b9aec22..000000000000
--- a/sys-kernel/gentoo-sources/gentoo-sources-6.6.155.ebuild
+++ /dev/null
@@ -1,27 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="8"
-ETYPE="sources"
-K_WANT_GENPATCHES="base extras experimental"
-K_GENPATCHES_VER="169"
-
-inherit kernel-2
-detect_version
-detect_arch
-
-DESCRIPTION="Full sources including the Gentoo patchset for the ${KV_MAJOR}.${KV_MINOR} kernel tree"
-HOMEPAGE="https://dev.gentoo.org/~mpagano/genpatches"
-SRC_URI="${KERNEL_URI} ${GENPATCHES_URI} ${ARCH_URI}"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"
-IUSE="experimental"
-
-pkg_postinst() {
- kernel-2_pkg_postinst
- einfo "For more info on this patchset, and how to report problems, see:"
- einfo "${HOMEPAGE}"
-}
-
-pkg_postrm() {
- kernel-2_pkg_postrm
-}
diff --git a/sys-kernel/gentoo-sources/gentoo-sources-6.6.156.ebuild b/sys-kernel/gentoo-sources/gentoo-sources-6.6.156.ebuild
deleted file mode 100644
index fa827dd00cae..000000000000
--- a/sys-kernel/gentoo-sources/gentoo-sources-6.6.156.ebuild
+++ /dev/null
@@ -1,27 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="8"
-ETYPE="sources"
-K_WANT_GENPATCHES="base extras experimental"
-K_GENPATCHES_VER="170"
-
-inherit kernel-2
-detect_version
-detect_arch
-
-DESCRIPTION="Full sources including the Gentoo patchset for the ${KV_MAJOR}.${KV_MINOR} kernel tree"
-HOMEPAGE="https://dev.gentoo.org/~mpagano/genpatches"
-SRC_URI="${KERNEL_URI} ${GENPATCHES_URI} ${ARCH_URI}"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
-IUSE="experimental"
-
-pkg_postinst() {
- kernel-2_pkg_postinst
- einfo "For more info on this patchset, and how to report problems, see:"
- einfo "${HOMEPAGE}"
-}
-
-pkg_postrm() {
- kernel-2_pkg_postrm
-}
diff --git a/sys-kernel/gentoo-sources/gentoo-sources-6.6.157.ebuild b/sys-kernel/gentoo-sources/gentoo-sources-6.6.157.ebuild
index 516d5bf8089d..ec07037353f7 100644
--- a/sys-kernel/gentoo-sources/gentoo-sources-6.6.157.ebuild
+++ b/sys-kernel/gentoo-sources/gentoo-sources-6.6.157.ebuild
@@ -14,7 +14,7 @@ detect_arch
DESCRIPTION="Full sources including the Gentoo patchset for the ${KV_MAJOR}.${KV_MINOR} kernel tree"
HOMEPAGE="https://dev.gentoo.org/~mpagano/genpatches"
SRC_URI="${KERNEL_URI} ${GENPATCHES_URI} ${ARCH_URI}"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"
IUSE="experimental"
pkg_postinst() {
diff --git a/sys-kernel/gentoo-sources/gentoo-sources-7.1.12.ebuild b/sys-kernel/gentoo-sources/gentoo-sources-7.1.12.ebuild
deleted file mode 100644
index c18b6431f31b..000000000000
--- a/sys-kernel/gentoo-sources/gentoo-sources-7.1.12.ebuild
+++ /dev/null
@@ -1,27 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="8"
-ETYPE="sources"
-K_WANT_GENPATCHES="base extras"
-K_GENPATCHES_VER="15"
-
-inherit kernel-2
-detect_version
-detect_arch
-
-DESCRIPTION="Full sources including the Gentoo patchset for the ${KV_MAJOR}.${KV_MINOR} kernel tree"
-HOMEPAGE="https://dev.gentoo.org/~mpagano/genpatches"
-SRC_URI="${KERNEL_URI} ${GENPATCHES_URI} ${ARCH_URI}"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
-IUSE="experimental"
-
-pkg_postinst() {
- kernel-2_pkg_postinst
- einfo "For more info on this patchset, and how to report problems, see:"
- einfo "${HOMEPAGE}"
-}
-
-pkg_postrm() {
- kernel-2_pkg_postrm
-}
diff --git a/sys-kernel/gentoo-sources/gentoo-sources-7.1.13.ebuild b/sys-kernel/gentoo-sources/gentoo-sources-7.1.13.ebuild
deleted file mode 100644
index 6bca04382c88..000000000000
--- a/sys-kernel/gentoo-sources/gentoo-sources-7.1.13.ebuild
+++ /dev/null
@@ -1,27 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="8"
-ETYPE="sources"
-K_WANT_GENPATCHES="base extras"
-K_GENPATCHES_VER="16"
-
-inherit kernel-2
-detect_version
-detect_arch
-
-DESCRIPTION="Full sources including the Gentoo patchset for the ${KV_MAJOR}.${KV_MINOR} kernel tree"
-HOMEPAGE="https://dev.gentoo.org/~mpagano/genpatches"
-SRC_URI="${KERNEL_URI} ${GENPATCHES_URI} ${ARCH_URI}"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
-IUSE="experimental"
-
-pkg_postinst() {
- kernel-2_pkg_postinst
- einfo "For more info on this patchset, and how to report problems, see:"
- einfo "${HOMEPAGE}"
-}
-
-pkg_postrm() {
- kernel-2_pkg_postrm
-}
diff --git a/sys-kernel/gentoo-sources/gentoo-sources-7.2.2.ebuild b/sys-kernel/gentoo-sources/gentoo-sources-7.2.2.ebuild
deleted file mode 100644
index 32337e2c6336..000000000000
--- a/sys-kernel/gentoo-sources/gentoo-sources-7.2.2.ebuild
+++ /dev/null
@@ -1,28 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="8"
-ETYPE="sources"
-K_WANT_GENPATCHES="base extras"
-K_GENPATCHES_VER="3"
-K_NO_VERSION_CHECK=0
-
-inherit kernel-2
-detect_version
-detect_arch
-
-DESCRIPTION="Full sources including the Gentoo patchset for the ${KV_MAJOR}.${KV_MINOR} kernel tree"
-HOMEPAGE="https://dev.gentoo.org/~mpagano/genpatches"
-SRC_URI="${KERNEL_URI} ${GENPATCHES_URI} ${ARCH_URI}"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
-IUSE="experimental"
-
-pkg_postinst() {
- kernel-2_pkg_postinst
- einfo "For more info on this patchset, and how to report problems, see:"
- einfo "${HOMEPAGE}"
-}
-
-pkg_postrm() {
- kernel-2_pkg_postrm
-}
diff --git a/sys-kernel/gentoo-sources/gentoo-sources-7.2.3.ebuild b/sys-kernel/gentoo-sources/gentoo-sources-7.2.3.ebuild
deleted file mode 100644
index 21dbf535bae3..000000000000
--- a/sys-kernel/gentoo-sources/gentoo-sources-7.2.3.ebuild
+++ /dev/null
@@ -1,28 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="8"
-ETYPE="sources"
-K_WANT_GENPATCHES="base extras experimental"
-K_GENPATCHES_VER="4"
-K_NO_VERSION_CHECK=0
-
-inherit kernel-2
-detect_version
-detect_arch
-
-DESCRIPTION="Full sources including the Gentoo patchset for the ${KV_MAJOR}.${KV_MINOR} kernel tree"
-HOMEPAGE="https://dev.gentoo.org/~mpagano/genpatches"
-SRC_URI="${KERNEL_URI} ${GENPATCHES_URI} ${ARCH_URI}"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
-IUSE="experimental"
-
-pkg_postinst() {
- kernel-2_pkg_postinst
- einfo "For more info on this patchset, and how to report problems, see:"
- einfo "${HOMEPAGE}"
-}
-
-pkg_postrm() {
- kernel-2_pkg_postrm
-}
diff --git a/virtual/secret-service/secret-service-0-r1.ebuild b/virtual/secret-service/secret-service-0-r2.ebuild
index 21dc062551bb..975963b6adb0 100644
--- a/virtual/secret-service/secret-service-0-r1.ebuild
+++ b/virtual/secret-service/secret-service-0-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2025 Gentoo Authors
+# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -7,8 +7,11 @@ DESCRIPTION="Virtual for a freedesktop.org Secret Service API provider"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 ~loong ~mips ppc ppc64 ~riscv ~sparc x86"
-RDEPEND="|| (
- gnome-base/gnome-keyring
- >=kde-frameworks/kwallet-runtime-6.18.0[keyring]
- app-admin/keepassxc
-)"
+RDEPEND="
+ || (
+ gnome-base/gnome-keyring
+ >=kde-frameworks/kwallet-runtime-6.18.0[keyring]
+ app-admin/keepassxc
+ app-admin/chipass
+ )
+"
diff --git a/virtual/secret-service/secret-service-0.ebuild b/virtual/secret-service/secret-service-0.ebuild
deleted file mode 100644
index 185cc0b115a7..000000000000
--- a/virtual/secret-service/secret-service-0.ebuild
+++ /dev/null
@@ -1,15 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-DESCRIPTION="Virtual for a freedesktop.org Secret Service API provider"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 ~loong ~mips ppc ppc64 ~riscv ~sparc x86"
-
-RDEPEND="|| (
- gnome-base/gnome-keyring
- app-admin/keepassxc
-)"
-# TODO: add the KDE provider here once ready, there are still problems as of August 2023 though
-# (see https://bugs.kde.org/show_bug.cgi?id=458085)
diff --git a/www-apps/wordpress/Manifest b/www-apps/wordpress/Manifest
index 711ba4321467..148ef98e1892 100644
--- a/www-apps/wordpress/Manifest
+++ b/www-apps/wordpress/Manifest
@@ -5,4 +5,4 @@ DIST wordpress-6.7.2.tar.gz 26780969 BLAKE2B 2eaa761b524927f5a10c7d01bf93b505c93
DIST wordpress-6.8.6.tar.gz 26934695 BLAKE2B ff7db3ce1f0cb351d5b23856f7099f90b8f033b2e3ec038b5117db0179dcd91969c64ad19dfdae8b34b8ee277240fd674dc9c5f8e9db679d7fa7d6effe5ae02c SHA512 e2fe0b628764220fa366cd26ef85eae83a5052aab3befd320141178c681d2fa353d8c5d84a19e5e864fb30c4a0a3b2fa52e650bd78fec3a4e40e1675fc69c126
DIST wordpress-6.9.5.tar.gz 27062732 BLAKE2B e5aebf9ef03d04071af0792fe468bf3012b3e04c89e4a7f2b7314b117de63e8b364a52aef542c1e5ddbee95101020a9830ccb8a01b81a9d5cce0bd2f7da043d0 SHA512 9dcdbd5b46366657010eeb9b89dede46172d912d9cfe26458e7d5a1971263263e0e7cf732846b9edfa126e318bef3a7c5c8d532c433bf43f94ede224ab28a865
DIST wordpress-7.0.4.tar.gz 29551415 BLAKE2B 2a96a4e0ea58e463ec4deca2f1e55f27287c339b930289d969525733f5fdbaaaf5059ae6406d902ed31f0bce9db13f1279b0440d14f4f1eeadeeb4de496bb1fa SHA512 c20add4a81efe7f8e44abeec6bbf28c9ef80ca400b9fce1f9605fde5599a37dbe61435bb6a57d6cfbff9a4aba9bcde0d5a37ca1198f90b707aba70d895df4893
-DIST wordpress-7.1.tar.gz 35356041 BLAKE2B f93a610e90bf90cc3169a1f05bebc57c7930808e39e06f089d5a03d50f80666828f35a691a5d273a1d072da92d5d986e2daecb36e24f99154bb131a8343bfe3a SHA512 4bb95bddeb0d30778b9d744e42f7e21507ed3070fda3e34dd41918073618181e350cf77ea8dfaacc48c59a00f50273b4a1b7a6e4c43d2a81ccfd35f27df342bc
+DIST wordpress-7.1.1.tar.gz 35363789 BLAKE2B be91d872d1bcda41457cc708084cc2c0fdfdf981cb1c79a03f87ee3089c031e81b939ff2d2ced52370863c7e5a203bc5fed7cbc502286ff7f22c3a24ddc33806 SHA512 d28cf17d7d5bea655e2e45a5724411a2d910659e8e02524077f02974b220811fc3078c623b6c216746a15ae54dd01f5419b5d0f2d7f13a3dfdd8bed8305d30ab
diff --git a/www-apps/wordpress/wordpress-7.1.ebuild b/www-apps/wordpress/wordpress-7.1.1.ebuild
index 15b15f314414..15b15f314414 100644
--- a/www-apps/wordpress/wordpress-7.1.ebuild
+++ b/www-apps/wordpress/wordpress-7.1.1.ebuild
diff --git a/www-client/firefox/firefox-140.16.0.ebuild b/www-client/firefox/firefox-140.16.0.ebuild
index 70251c99a5e6..a05cf529448b 100644
--- a/www-client/firefox/firefox-140.16.0.ebuild
+++ b/www-client/firefox/firefox-140.16.0.ebuild
@@ -80,7 +80,7 @@ SRC_URI="${MOZ_SRC_BASE_URI}/source/${MOZ_P}.source.tar.xz -> ${MOZ_P_DISTFILES}
S="${WORKDIR}/${PN}-${PV%_*}"
LICENSE="MPL-2.0 GPL-2 LGPL-2.1"
-KEYWORDS="~amd64 ~arm64 ~loong ~ppc64 ~riscv ~x86"
+KEYWORDS="amd64 arm64 ~loong ~ppc64 ~riscv ~x86"
IUSE="+clang dbus debug eme-free hardened hwaccel jack libproxy pgo pulseaudio selinux sndio"
IUSE+=" +system-av1 +system-harfbuzz +system-icu +system-jpeg +system-libevent +system-libvpx"
diff --git a/www-client/ungoogled-chromium-bin/Manifest b/www-client/ungoogled-chromium-bin/Manifest
index d5b1cde980cf..6cdcee7c1e74 100644
--- a/www-client/ungoogled-chromium-bin/Manifest
+++ b/www-client/ungoogled-chromium-bin/Manifest
@@ -1,3 +1,4 @@
DIST ungoogled-chromium-bin-150.0.7871.186-x86-64.tar.bz2 161955683 BLAKE2B e6069bfeb13a6b8c8b6b68966f0e687684023dd2a4752f9566c3a929e718b221c741b49079a2e79fa364cb2101b454ad9629f88c0d3d4b5de166f2ba86352854 SHA512 bb0baa6c549163b84faaf5e6805f8340bc831c49bc52438a30313c763d48c824373a123f936affad32c6079b0acfb23a13fc74247ef9911d8478da68c71f4fd1
DIST ungoogled-chromium-bin-151.0.7922.169-x86-64.tar.bz2 168253636 BLAKE2B c18f27211a43ee1192bc0491956548b6e396858d30adaa15e81c86797d2ad5df70b5120d44d98b9106822f0a40e7041ff1838bbf8b135ce65cd6720a1ac76c4a SHA512 20df291af69f40851755fba6292e0ed65460c7e0cf2253596692396f72da798b0c330f9a01c261762c91979c71d8e9e7a6e604802fc35144fe3a866bb04efe80
DIST ungoogled-chromium-bin-152.0.7977.64-x86-64.tar.bz2 169147306 BLAKE2B 7c5d3ccabd39c1d8b8f2ebe5158a4aed7043f87beafdf150d92a1fb9127dea8d2130248b615d5ba6cd79135e6bb03e327854b76b7cdf7820debbabe6cec5128e SHA512 f0bb7ab4e89667a3af48a3547f797246c24c04ea32b2f4624012ad00db7de4bde2510f39aa317703527d59f3f468fe3c20c075415b9ab488c72e5730e5000ef4
+DIST ungoogled-chromium-bin-153.0.8010.36-x86-64.tar.bz2 179608223 BLAKE2B 309b48bf954702cb4dd02f3a34b324f525535f6781d4ac2fedce98e971b788a0350cf240189e7401d185c16cd63d3383680f255ce212f5aac1abbd7edad6f1b3 SHA512 ddb09b9875d1bc75a2fa74463571f66c56fb5d530d601762526a6608600529f9d8a172c02305a4870c44c8cf41aa1b51295acb4892c1cf4ac5f2963797fa73af
diff --git a/www-client/ungoogled-chromium-bin/ungoogled-chromium-bin-153.0.8010.36.ebuild b/www-client/ungoogled-chromium-bin/ungoogled-chromium-bin-153.0.8010.36.ebuild
new file mode 100644
index 000000000000..463b7bd112cd
--- /dev/null
+++ b/www-client/ungoogled-chromium-bin/ungoogled-chromium-bin-153.0.8010.36.ebuild
@@ -0,0 +1,218 @@
+# Copyright 2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+CHROMIUM_LANGS="af am ar as az be bg bn bs ca cs cy da de el en-GB es es-419 et eu fa fi fil
+ fr fr-CA gl gu he hi hr hu hy id is it ja ka kk km kn ko ky lo lt lv mk ml mn mr ms my
+ nb ne nl or pa pl pt-BR pt-PT ro ru si sk sl sq sr sr-Latn sv sw ta te th tr uk ur uz
+ vi zh-CN zh-HK zh-TW zu"
+
+inherit chromium-2 desktop readme.gentoo-r1 xdg-utils
+
+DESCRIPTION="Modifications to Chromium for removing Google integration and enhancing privacy"
+HOMEPAGE="https://www.chromium.org/Home https://github.com/ungoogled-software/ungoogled-chromium"
+DL_URL="https://github.com/PF4Public/${PN}/releases/download/${PV}"
+SRC_URI="
+ amd64? ( ${DL_URL}/x86-64.tar.bz2 -> ${PF}-x86-64.tar.bz2 )"
+ # x86? ( ${DL_URL}/i686.tar.bz2 -> ${PF}-i686.tar.bz2 )"
+
+RESTRICT="mirror"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64"
+IUSE="convert-dict widevine"
+
+REQUIRED_USE="
+ x86? ( !widevine )"
+
+CDEPEND="
+ x11-libs/libX11
+ x11-libs/libXcomposite
+ x11-libs/libXcursor
+ x11-libs/libXdamage
+ x11-libs/libXext
+ x11-libs/libXfixes
+ >=x11-libs/libXi-1.6.0
+ x11-libs/libXrandr
+ x11-libs/libXrender
+ x11-libs/libXtst
+ x11-libs/libxcb
+ media-libs/libva
+ >=net-print/cups-1.3.11
+ dev-libs/expat
+ dev-libs/glib:2
+ dev-libs/libxml2:2/16
+ dev-libs/nspr
+ >=dev-libs/nss-3.26
+ >=media-libs/alsa-lib-1.0.19
+ media-libs/fontconfig
+ media-libs/freetype
+ media-libs/libjpeg-turbo
+ media-libs/libpng
+ sys-apps/dbus
+ sys-apps/pciutils
+ virtual/udev
+ x11-libs/cairo
+ x11-libs/pango
+ media-libs/flac
+ >=media-libs/libwebp-0.4.0
+ sys-libs/zlib[minizip]
+ >=media-libs/libavif-1.2.0
+ app-accessibility/at-spi2-core
+ x11-libs/gtk+:3[X]
+ media-libs/lcms
+ dev-libs/libxslt"
+
+RDEPEND="${CDEPEND}
+ >=www-client/chromium-common-2
+ x11-misc/xdg-utils
+ virtual/opengl
+ virtual/ttf-fonts"
+
+DISABLE_AUTOFORMATTING="yes"
+DOC_CONTENTS="
+Some web pages may require additional fonts to display properly.
+Try installing some of the following packages if some characters
+are not displayed properly:
+- media-fonts/arphicfonts
+- media-fonts/droid
+- media-fonts/ipamonafont
+- media-fonts/noto
+- media-fonts/noto-emoji
+- media-fonts/ja-ipafonts
+- media-fonts/takao-fonts
+- media-fonts/wqy-microhei
+- media-fonts/wqy-zenhei
+
+To fix broken icons on the Downloads page, you should install an icon
+theme that covers the appropriate MIME types, and configure this as your
+GTK+ icon theme.
+
+For native file dialogs in KDE, install kde-apps/kdialog."
+
+QA_PREBUILT="*"
+S="${WORKDIR}"
+
+pkg_pretend() {
+ if ! use widevine; then
+ ewarn
+ ewarn "widevine was enabled in this build"
+ ewarn "If you think this is a mistake let me know in #193"
+ ewarn
+ fi
+ ewarn
+ ewarn "Fontations Rust font stack is disabled"
+ ewarn "Using media-libs/libavif instead of CrabbyAvif"
+ ewarn
+}
+
+src_install() {
+ local CHROMIUM_HOME="/opt/chromium-browser"
+ exeinto "${CHROMIUM_HOME}"
+ doexe ./usr/$(get_libdir)/ungoogled-chromium-browser-beta/chrome
+ #* https://github.com/ungoogled-software/ungoogled-chromium/pull/3563
+ doexe ./usr/$(get_libdir)/ungoogled-chromium-browser-beta/chrome_crashpad_handler
+
+ if use convert-dict; then
+ newexe "./usr/$(get_libdir)/ungoogled-chromium-browser-beta/update-dicts.sh" update-dicts.sh
+ doexe ./usr/$(get_libdir)/ungoogled-chromium-browser-beta/convert_dict
+ fi
+
+ # The launcher script must export the correct desktop file name
+ # as env var CHROME_DESKTOP so XDG can associate it with the app
+ local DESKTOP_FILE_NAME="chromium-browser-bin-${PN}.desktop"
+ local LAUNCHER_FILE_NAME="./usr/$(get_libdir)/ungoogled-chromium-browser-beta/chromium-launcher.sh"
+ sed -E "s/(^export CHROME_DESKTOP=)\".*\"/\\1\"${DESKTOP_FILE_NAME}\"/" -i "${LAUNCHER_FILE_NAME}" || die
+ doexe "${LAUNCHER_FILE_NAME}"
+
+ # It is important that we name the target "chromium-browser",
+ # xdg-utils expect it; bug #355517.
+ dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium-browser-bin
+ # keep the old symlink around for consistency
+ dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium-bin
+
+ #TODO where is default?
+ # if ! has_version "www-client/ungoogled-chromium" && ! has_version "www-client/chromium"; then
+ # # Allow users to override command-line options, bug #357629.
+ # insinto /etc/chromium
+ # doins ./etc/chromium/default
+ # fi
+
+ pushd ./usr/$(get_libdir)/ungoogled-chromium-browser-beta/locales > /dev/null || die
+ chromium_remove_language_paks
+ popd
+
+ insinto "${CHROMIUM_HOME}"
+ doins ./usr/$(get_libdir)/ungoogled-chromium-browser-beta/*.bin
+ doins ./usr/$(get_libdir)/ungoogled-chromium-browser-beta/*.pak
+ doins ./usr/$(get_libdir)/ungoogled-chromium-browser-beta/*.so
+ doins ./usr/$(get_libdir)/ungoogled-chromium-browser-beta/icudtl.dat
+
+ doins -r ./usr/$(get_libdir)/ungoogled-chromium-browser-beta/locales
+
+ # Install vk_swiftshader_icd.json; bug #827861
+ doins ./usr/$(get_libdir)/ungoogled-chromium-browser-beta/vk_swiftshader_icd.json
+
+ if [[ -d out/Release/swiftshader ]]; then
+ insinto "${CHROMIUM_HOME}/swiftshader"
+ doins ./usr/$(get_libdir)/ungoogled-chromium-browser-beta/swiftshader/*.so
+ fi
+
+ use widevine && dosym "../../usr/$(get_libdir)/ungoogled-chromium-browser-beta/WidevineCdm" "${CHROMIUM_HOME}/WidevineCdm"
+
+ # Install icons
+ local branding size
+ for size in 16 24 32 48 64 128 256 ; do
+ newicon -s ${size} "./usr/share/icons/hicolor/${size}x${size}/apps/ungoogled-chromium-browser-beta.png" \
+ chromium-browser-bin.png
+ done
+
+ local desktop_entry_name="Chromium"
+ if has_version "www-client/ungoogled-chromium" || has_version "www-client/chromium"; then
+ # Differentiate if others installed
+ desktop_entry_name="Ungoogled"
+ fi
+
+ local mime_types="text/html;text/xml;application/xhtml+xml;"
+ mime_types+="x-scheme-handler/http;x-scheme-handler/https;" # bug #360797
+ mime_types+="x-scheme-handler/ftp;" # bug #412185
+ mime_types+="x-scheme-handler/mailto;x-scheme-handler/webcal;" # bug #416393
+ make_desktop_entry \
+ chromium-browser-bin \
+ "${desktop_entry_name}" \
+ chromium-browser-bin \
+ "Network;WebBrowser" \
+ "MimeType=${mime_types}\nStartupWMClass=chromium-browser-bin"
+ sed -e "/^Exec/s/$/ %U/" -i "${ED}"/usr/share/applications/*.desktop || die
+
+ # Install GNOME default application entry (bug #303100).
+ insinto /usr/share/gnome-control-center/default-apps
+ sed -i '/chromium-browser/{s++chromium-browser-bin+;h};${x;/./{x;q0};x;q1}' \
+ ./usr/share/gnome-control-center/default-apps/ungoogled-chromium-browser-beta.xml || die
+ newins ./usr/share/gnome-control-center/default-apps/ungoogled-chromium-browser-beta.xml chromium-browser-bin.xml
+
+ readme.gentoo_create_doc
+}
+
+pkg_postrm() {
+ xdg_icon_cache_update
+ xdg_desktop_database_update
+}
+
+pkg_postinst() {
+ elog "VA-API is disabled by default at runtime. You have to enable it"
+ elog "by adding --enable-features=VaapiVideoDecoder and "
+ elog "--disable-features=UseChromeOSDirectVideoDecoder to CHROMIUM_FLAGS"
+ elog "in /etc/chromium/default."
+
+ if use widevine; then
+ elog "widevine requires binary plugins, which are distributed separately"
+ elog "Make sure you have www-plugins/chrome-binary-plugins installed"
+ fi
+
+ xdg_icon_cache_update
+ xdg_desktop_database_update
+ readme.gentoo_print_elog
+}
diff --git a/www-client/ungoogled-chromium/Manifest b/www-client/ungoogled-chromium/Manifest
index cc19f6f9b267..d58df4af266d 100644
--- a/www-client/ungoogled-chromium/Manifest
+++ b/www-client/ungoogled-chromium/Manifest
@@ -1,77 +1,13 @@
-DIST chromium-148.0.7778.178-linux.tar.xz 1592152904 BLAKE2B 8d25be51cab30f196044a8e8da1e65afd025261bd316d0d8f9b8047fe2c0ac72ad8431bc9ca2d637488665a7a44565f6718073a2823fafa20ae1698a44045b84 SHA512 82ff2b4bf9a573cec83ec2e12edd2f1b576dd42ac38c0ac226e751c058c5b5c6afadafffb7d5dac00ac599317d22be8309d68cef2d9a976142ed8a0f1fc7ff2a
-DIST chromium-148.0.7778.215-linux.tar.xz 1593166200 BLAKE2B da7ba3258bd15cdd02ce8c30571e8dcca25d9093e7daefc64ef662b445384b93c6acd548f12561cad9f0fc06b249fdda9e9cfab887cd708d63cef97e6436a961 SHA512 09f381d2b69c5a377ab421727e084857680210754051e922a9d96ba486323f877130f4ae289c408ca0af15f3ba1d4cbcdb02877016c085c81ad35254787e9fbd
-DIST chromium-149.0.7827.102-linux.tar.xz 1610590728 BLAKE2B 898a975cbb4a6b3c4f68517b2275ec507c029f119d52fd29e4ee3b63af6ccb8fa5cc50d6e14c4fb687189b5a80f369500735125035eb23c5cf5c85593c2ed464 SHA512 4001f7ae12f6d269148757c1fb1d0626a7e96630f0138d241df14ecfb7dfaeaf0899571b7a545788565e519cc7be6cbfac02bb31a4974de8c6667417398368c9
-DIST chromium-149.0.7827.114-linux.tar.xz 1610404720 BLAKE2B 999db7c1bfda7903295db07edb8a779dc0355005cf983ff9057b35d29ec704898ceb0f8f0c2a52c505394d20aee4691ee7eff1bca8123fd1763140f4fbf43008 SHA512 e3dd18406d7ceabdfa3c4cc75407d74a8340077ddf37fd44152582e36fdcd4be590cb57b093672704b59d4b66a21b170600ea1fef4bfa486802e8fe5b5cb65c0
-DIST chromium-149.0.7827.155-linux.tar.xz 1609965640 BLAKE2B bc9ccfe757adb043f55d308b8d47b2b701449f926d5bdc98a82df831d3253f1a477d89a3e3574be0f90ef7626f8be5b1400c54760dbedaf66852843e135e799f SHA512 137921f93b3af2a69f0d135dcb31aea3cc9ad80951a4f664bf51893bd9204c1f6b313825a749aae2838539b061a63190dcc71e54dbe47d7430c18f085d3a4c85
-DIST chromium-149.0.7827.196-linux.tar.xz 1609747760 BLAKE2B 35426def770e108f1668dbfedf390f8c939808ff29f4659a8def507ebfb57b53692bab5f23cddcb96c13a570c7d1f0aadd6a3a5959672e22f8e0753a83584708 SHA512 a8bf21550ea894ad30b7cacd55acdf54b8ca885a42e079114917ea703a65d7c60f0c2d468c723460920a9b0cfe2c9c7ac2d9a48b37bed68ed99df56ff964a8e3
-DIST chromium-149.0.7827.200-linux.tar.xz 1609868392 BLAKE2B 4ced9d2d5f3d273ce0049033c094e3401faf6d8bd4877fda60e6da79cafb96af876a0d92440b8b70067319f6881bda1d27ac696c4a9b9a971c4934ac49586305 SHA512 40d198bd9210fca8570787d7338a3ad0472deaaded00d1983b27bdbb7f98379cbbaecf4a6d99171d0a83ab8edf86f5ab5d015f73bb8c403c1c5c0c0d3ae1a02a
-DIST chromium-149.0.7827.53-linux.tar.xz 1611305116 BLAKE2B 72018ef444c4769234e13dab7cbe0d2abd03d140631d7ba3cf0dcd4b6fa87f777cb8bbfa6b8100de2166f991f4557197545cac090a9935ddf6ec0f988610ad11 SHA512 36aa5854152d0c0ce338331be28c077aa2cf9edc45c608096368fbbdd84700df4d428daf67b7c76c36a3ff423ccd5b5f6518814bc87facce3d2da529e9dafafd
-DIST chromium-150.0.7871.114-linux.tar.xz 1670274328 BLAKE2B 7462e3f64b27ef260197d7d3920ca38561404baf155fb2e2500628c9526bd774b7ed721415606d4b0704bd923536aedc8b750fc2eb0b2cfe01cefaa5b9f15984 SHA512 c6ab88182810bbf9423f01c1c4d02abfb3dcec8c182095ddfae5a49bb3817aef21a43eb743dcc95a6418ffaa54f3a8a4686795fb2e7be67f4c3d0ab489f0ee66
-DIST chromium-150.0.7871.124-linux.tar.xz 1670364688 BLAKE2B 68a19fca963ca95e1bbea6afa28bde1de3ac84301e719cf0c6885dba82061688966940b91bf6b821c620e1e07540bea88cc4a677ca815c62b61b6220321fa575 SHA512 bd9ff49b3d48a7311878f358a3fb15e31e882b234f7ff36f9657c28a0e1d0f3e7bda7324452cb0aecc08d4ca2f34fc19700651813e309d92936f068cbe0de527
-DIST chromium-150.0.7871.128-linux.tar.xz 1670297068 BLAKE2B c99df5e0961adddfcd754f1b80732beefce5d58c7e57accba0ae9d9e8216c641fad794c4d6c8fbe7d3c42430a4f8ae41a389d59f0f8eac9275bd329ba1b75577 SHA512 543f66d3164c27f138d44630fedf4e769bf9577282130ec1083430aa698c9967eb63be35d297100dd842acb6e3cf330bbe94d194ef02a8d932f0f2a78d83a9f9
-DIST chromium-150.0.7871.181-linux.tar.xz 1668476496 BLAKE2B 9d6fb2cc9a12c935f16b1b7e28b0fa82cc8bc891deda1896c31d9b1a67a342d1cc16101ec750f663a06e4e1246d558d8ec01c1b7199d594971a3db938257455c SHA512 e45213d626456f72b2994e44a7026ebcc92262066c436f51c7922b9d161d1a4900ca042dfe2c617eba04c488e76de0728acad43bd542fdce68098144d25c7d30
-DIST chromium-150.0.7871.186-linux.tar.xz 1668494832 BLAKE2B 8edda676c99dab33bab5ffe6c87bcb5bc3066ee9f7bb36d1a0d0aa7b58e4009f35f4d7e4776a9d80722b54429931d6c1720c77284f2877cf925a6275d38b9dd2 SHA512 e1ee5851277c5a32d89a021b8f20736dfeab1bd046f6dbfa8d22137ff5366119cc845cdb8f87ce42a26d48703734984db4181dfa219dba093a52915f5be9976f
-DIST chromium-151.0.7922.108-lite.tar.xz 1711817516 BLAKE2B 9418fa9cae2da16907c412f0cd660323d05567b0d5792682374812b4a361356a729ccb19bc40aab7499081479b50095b974daab10a72d45b8f0b74593b51017b SHA512 8c68056914f598f4c828c610fa909f7ceaad9fca25d33908ee82c49b70b744ff93fd8ae3e5beefd41e13580d8d47311e27862ec18de612623ce275d9652d27f5
-DIST chromium-151.0.7922.137-lite.tar.xz 1712008940 BLAKE2B c69afd5b51c267e6228edecdacd162aeb06b4eef838fc1688b2884798fa04f827bab6513988e4b2ab6239855de74dc48b421dc3251bc1860562d8a3642a6f169 SHA512 61ec7b654342a68394ff0907e5b344d97cecbca2bced851e4ead0fa93f05f7b2d6d8dc8953cc7d86204ddcf49a3b2f401626b79cbcf4b023628a721d6c543b29
-DIST chromium-151.0.7922.169-lite.tar.xz 1712206164 BLAKE2B 08d4646af13de05f13fb4794d494403cb1da03cff17f970f8b0486a9f391f60b16b6e1695426286b362a737cfd6631a526240f7b8979b168a9e32061c9e4da31 SHA512 b74eb0a19f3358de10d075621529fd94d867e840bb1654ec809c8a3109160d964a347cfe9b048d5ba587ca0566c09c59dc93b8b5eacf664b4c52fb541f080845
-DIST chromium-151.0.7922.173-lite.tar.xz 1712173636 BLAKE2B 6e10fc43dc6e93b8d6600513a1d3d96d2427f20d4cfa2dd0d248f33f290fd392d01034342c98e692909fbc972ee4f721b34531f4fc7281986cdf332a078647e8 SHA512 aa121805df437cf59e108c7a519edc3f43d391a5537f69176c23685f525288dc20d211849f9714c01fcb76a00b3f6033987b80ce98bbfe399774f063b698a985
-DIST chromium-151.0.7922.47-linux.tar.xz 1703818532 BLAKE2B de98282d161a7cf1338e0549f5b2aa22906a1dec633f6a76b0b1a939f1ec3596a0303a9234a9a46db927f3075fe80f9d000eeb5947c09285fb719c1dbfcedae0 SHA512 7db9d306176ce24b7db678822656b7ed50dde388404a702aa7acb444d83c148cf3f39019d8dba48fcc689dd579932bae7eceabd8efc5f955cb25b7248d1b2df9
-DIST chromium-151.0.7922.71-linux.tar.xz 1703837492 BLAKE2B 47f0ab59b1cce901d625da5ceea145a1d5e5decadd38aba3744f59e9c24ad277da90bac50ff78acabedb8f9393ebe8bcf94752c081a1badabea1efb9818ae1c1 SHA512 f76c3d927f05e3bce8d28f42693f97ddafe5e55b933c2427dcb90aec376fa9b4f546cb083e61e65525121c9eb1cc9cede24c716085f90e3bac7f4494beb196f3
-DIST chromium-151.0.7922.75-linux.tar.xz 1700937524 BLAKE2B 6d8599bbca4fc6c9d2b54eea1993fc308f9990db9c2bdf7f67b7346feebd8c9cd907b35b21437ac2c5220c869bffbec0774490e4a8799285dc1a263c067fbb48 SHA512 06b0cddfb244c75905623587d58818838f3d2a03395fc899c54f13ef2c10e95f5cd1b345cdb31571695f4de961f463dfd1e1980fd4b8f7948ac8ffdebc1e3d9e
-DIST chromium-152.0.7977.64-lite.tar.xz 1774931660 BLAKE2B 6f70a5f9848f47a489d9198fb65bd83982ea37e02ae238e3c90d7128a48dc3b01c66beecf59b37bccde6994b92158ab6ae6826d744be379eb5b8e144bf8f4912 SHA512 01b0c9b52186f0574e985184209842950148e65db44520d3de08046f7572d7bf95f774ab24c416ac98e98c54aafcd386d2c79ca40d1eaa7368610fafb7fb3cc7
-DIST chromium-152.0.7977.75-lite.tar.xz 1774839940 BLAKE2B 28ac4882a322c95f0ab2d94cbab6388f6c8ef35daa65e3beadf167fd939b0c461b89601e9584e5d7be58aecf99a0831cc908fdd76125cde5971e596736d05c35 SHA512 d5b3277e3fdf6bc276672cc687330a05ce24344be8947cadf6cb8e73a58eb8cb37c9a48d9f8356b54fe2f64660d158125401895d9803a3dc0e8ac0ecc9c86cee
-DIST chromium-152.0.7977.82-lite.tar.xz 1774798136 BLAKE2B 0ab98c51511d3ee92ad8dea94da4ad00beb7c7ac781b6f0487e3c725c865ab821e461f198a3ed19c5a623b9908fb06b58d47aaa36094feb9f83c4bc908cb6b25 SHA512 25df873b56d4e20e1c0b8e778f87d215a158f64054de4027e4e008ca98d3000d7e27b20d6c4b2f30ab9a0075318d4f67d5d99eef69d6433f50dac3d575d9b2f8
DIST chromium-153.0.8010.36-lite.tar.xz 1878222540 BLAKE2B c9826900468b24a852bcfa72e1338e9f6344ab91da5af2cd696b2bd87be2e0a924125c00a70895ecac95ef97ec3711cf1ca7cc611cb8e4904dc4396d8746c569 SHA512 cdbeb7d14768f7c7291a290176ef108a33685ff5c1414daf1b0d9a35da7b2c508dece141b82f73343abce942dd612c17a2bddbd77541ef5899976045b656ef4b
-DIST chromium-27f8690db999f6e56f0af7a9ea3d28a019ed72ca.patch 1583 BLAKE2B 58cb88a7e73d62ff5f1e886a710dda3ba7010c8afd8dc11f3ed08ec32e46a40a73a7ca84fa8c979bf5350390befb78296d3a03d01df326c55afdbfd1f2f1dbba SHA512 507327be55daf058555cb74733b2385d7b47795a8a627025c97b943c0dd15ebd900733d31c6d54f3d299c7b22263016e3a8c1bd5f0395b5833c13db5a909b195
+DIST chromium-153.0.8010.52-linux.tar.xz 1878470976 BLAKE2B 3e4bff18a63a51be2428f925af8f41119601bf1b39df2e4b9e20e7819e957b224e85fd06e939f17196d40e4271ba8f83fb5b78f9334f112f1da25a93a515b181 SHA512 144667ff65b4018b9afd911bd9acfa83f8e396b984d03b5b0f5588c46f36989e5d523522b1cfb471d2cef0f29a60b7ea3e7ec21f3cae100ca65835be1c023d17
DIST chromium-cf94ed446320d35c8613ed9b3ffb6e6a61bfcb5f.patch 9972 BLAKE2B 72d3b755214a8cc0299129c645b938746a2e4dff31cc9aa154019ebaf5c29d5ce9a8378dbecbf0455f253c5e10b83dbfd03a10573d8fa93992f2d6ac965a2b1f SHA512 62ffd3162a0c1aa4be51d3ead238b3a84463f8c6d55b9aad5806bcb23dfb2b832ad6aec7f348690c4b3aaf430260352ca558e791ca611d5e791e6b3eadcffcf1
-DIST chromium-clang-llvmorg-23-init-10931-g20b6ec66-11.tar.xz 69635068 BLAKE2B 5250889dac7ca048030266b9e5eb9b08a1288acb1023fff3513555ca361f787fdb273b04d5cb5cc9960d7d13e804604ca63e65b056d1873a8f5e1d56e8f59db8 SHA512 4a1f06bacfb5894e277f3957df3adcc937f262ec91927d6fd97a2e4b88b795e2559a8498be633d6b191dd4d52a5df52669f76c59c2939689f5f88fc7457cabae
-DIST chromium-clang-llvmorg-23-init-10931-g20b6ec66-8.tar.xz 69605340 BLAKE2B 5ab6a03bfa76a8523d35c9f9541bc8aff2c33331208ffd2c729e6cd7e6d58e225d236ca8233893df57a52d4cefb0c62d79d61c8f902fbd909cdac8f148822fb8 SHA512 6e013faba35b624144535207c5c884d4675e4166f4eb212d2494c43dbb430b35030734d6f28fc087f5da79a8318531560529a0d0754a96d13e628eb5090de6b5
DIST chromium-clang-llvmorg-23-init-19482-g53d18800-1.tar.xz 59093892 BLAKE2B faf8c5011b0271903a9a09a4539002088030eac34ac01c4b84581a556f761f89eac035feda5b97be350679325968db99face036c201972b01dd081ced3468edc SHA512 5d88f1ed4901c80963b6740c9b15a28c33db397f8bf31503502b00caff172e17d37f7b946da31162e04794fee763e0b7456a9fc476827c8a19cdd1e737b9b68a
-DIST chromium-clang-llvmorg-23-init-5669-g8a0be0bc-4.tar.xz 68803796 BLAKE2B 334d273c85a8e22dd7f6eec0f0591d54c5acdf85d01925511d0e912c611f5f07c448b3ff35925b4329307a601439dbabf54f5ee186f3b11d1229dc531e2a26af SHA512 570f00c716dd9d6f8ecc1d6364f735884e0485fba5d003bb45e8095cc60215107d11272702c387ce7273400a8c1679180ac5b51ec639e81fc73657aa55043903
DIST chromium-openpower-7aae8a84e3.tar.bz2 441026 BLAKE2B efceb75ba53899388398a4564ef29c9fe66427e160a3e7f3375fd3eec8d1ffef335ca14865c11510e9c3719daab11dfb0954ed4a7b847dee602773d51f5e1e0f SHA512 cbe75ae78226b784904a263f7eb01e44faab71efb4a35ca46ff551ff17c0c5f1cdd8f839313ad3bb678b6ca56e4d95899f7802a548ffe7bb90582d9df5614c21
-DIST chromium-openpower-a85b64f07b.tar.bz2 387899 BLAKE2B b01fda2d64ce73068d1536a10cc0896f07a4b714cdb25698b1df8b3252baa0c21c4209b307cf1cb554854f6d0bfe3cd35e06aaa8d02ac5d409a119335084c324 SHA512 05eee81677e8766808441c939bee68e2e6c58ec91f471d88a40181d2eda78614a0a6d27d92ff8f9dda564d12f3451bace4ff2727594748c5c238a3533038019b
-DIST chromium-patches-148-3.tar.bz2 20088 BLAKE2B 063146caf3fae4c4522e00c0abcbbd32652e4f401a81a6cfece043c36189a4177507ef9f44fc733e470d654e079e51e1ee3cd31604f55fd7625567406a228345 SHA512 769ada4905ad216ee1d6595d15dd88a9e2af432f820fc277d9483a5cb19357b15b5e9a94078a54b5c002afc6a7e7b1739f8d7d41893ea6d15f32e3df23555009
-DIST chromium-patches-149-2.tar.bz2 21452 BLAKE2B b9f9ce66998eaa3ff7d23b1d1296ad4a7a984bed08b2031a6e9398e2f724280ca2b4bdd48ddb415cdb5e79f952545c8d322ef3d007f1e5f8303307e45704dd7a SHA512 a318ab70ee226519f02bc114343c4f9794569252f1a2857a71adefdcdd66c6de9ac1ef48ac25e71cef4cbea2c2a56aa537fde7f7142d48e9aedbf1b81c78d027
-DIST chromium-patches-150-1.tar.bz2 23403 BLAKE2B d8fee8a13aa6cddc3a465663bb1ec23384560e9fa5de5bd40fc606087570d484b8a4c208eae3da17f46a82b4ba64b8b5e21cda0336ea8729dfca36b67fd9935a SHA512 847ad4ae0d3d0090d2bbb28444bb91361f0bcc05aafa239b3a8900b0ec5934f2080fe21a783f6caf1bd8e222f2bdbb2a43ee991f1ad0cabcc9f9a6583441c1d2
-DIST chromium-patches-151-1.tar.bz2 24163 BLAKE2B 1e5a396dc203120be4514940ffe5ea7351e3ddec7732a3987adafceb8eed363770d9834eef73857373c393de9c2f4bf945ab26ac70536484acd57a4ec08b60b8 SHA512 a13612ef6094dcfe739bb66105578ee3ef76e653378587a97b3df364ee30d6a200f04e83af34675776feb02cda5f6ff987e552aafe1303930aff801307e3a76b
-DIST chromium-patches-151-3.tar.bz2 23198 BLAKE2B 5227fb7f6e1c80297b6b7d8b4efaa31ead935ffb63e5ad47e45c70d2e7c6692cc4d015ae1dc9234c7ea3365a67db8ec2912890af2508a5132062a9b1f395b94c SHA512 3839400b31b58965d1340b26112c6c4b4ce613fd54290d141bb875aa7163107d02a10edbfdc18fb8b92c7d6e2e1b1f07b545ba5379fe070adb3040ea2ae3458b
-DIST chromium-patches-151.tar.bz2 23398 BLAKE2B 42606d6123bca47afe573df8f44b77511c1aa48c3e26cf7a9ac45af0f887ba88e71dff08ac4b1c2a2f277d337c577c19b903baf817280f29a499cbd3e7b86560 SHA512 5b81fefc84a395f7401e15db19a056140bd414bcb547beab697b54c7063db1df6c2109cc1e581601b7ac89b49c9df555ae7ba0d8fff9bed5bf554d5393cbc272
DIST chromium-patches-152.tar.bz2 22963 BLAKE2B f27e4e839c1c1040c3afed38ad730e5d2671e3f8bc1448e343e4c272fb586fbc6a8df17c76db0408ae803471e98107cbf23626882a3745153baef0005a2a572c SHA512 bf2e736b44b7da6e304ff4dc89e61003a11b1ff07320a296e999251160b3ef3254cb2d1ed8944fe4e6998e99378b6a3c6b201fb5cf42ce797dafd1764618b8a9
DIST chromium-patches-copium-3c7e56fb45.tar.gz 13304 BLAKE2B 782f3b24d817aaa03cbf45dcfe679c580e62a2f7f8493ecd8398bd936c5cc635c5999f8c3b487b1b7ce1e86496eeef73e55a750424c42252b3e8c4363ccc5e19 SHA512 b8af6b95bbb7c8ea47db00912372bfbabd60d56f060a41707a94d14e37acebe693a853cfed74b8d557f8ef15491807f3121226ca7db86823dfcade85e3b2e5a1
-DIST chromium-patches-copium-b00f26bb5e.tar.gz 15099 BLAKE2B 886897afba6cb4495ab74298d8ae72643294dba1996a5a7d2939f83fb4af1cb599f7e4cd263b852fe595cf52e0a3689305d6a3c028014f9c4172df7deaf3e2dd SHA512 c337bcb6487252fa679b5910672230677aba87fa7572ecbfea32b369785326e12f06fd3d44c65f16fe32c1e83b5b8e710e81c970cdf03f24f25a68577f6984b9
-DIST chromium-patches-copium-fe1caafa06.tar.gz 15572 BLAKE2B 4baa36a4536f9199caa89553fc10deac79ae7effa336fc4bd92fac59eb81a57749eead426e6f01ffecd9954b417eb34c29c899cc49a9d726fe65bf2e303712a0 SHA512 5310e48743a32f2f998b34138b1ed9667feed873ad16c18d3e495383f44a0d5df0f9634c7c4275cf1839002ae887ef58f6c3ec5fd9c5d46ad5114ffab439a664
-DIST chromium-rust-toolchain-4c4205163a-2-llvmorg-23-init-10931-g20b6ec66.tar.xz 274625900 BLAKE2B dc3851eb65570795fd789abe5135291cbfeb1fbf9df2c9c9fa3d61b6e3fb0daeb90b43f18c733e28e60bc138391fa9bb028ad3e5b5a4d5acad6addaeef8abdd4 SHA512 6894b2abc7d0e56784485d600d87a1adb373fdf25001c3be2a05d455584b7648ac458938fa84c9f5db4e8bac4c320e8e162b15e05dd8252c1749962a7f5c5e6e
-DIST chromium-rust-toolchain-4c4205163a-5-llvmorg-23-init-10931-g20b6ec66.tar.xz 274476304 BLAKE2B 007d4f955a915f000ace0d4473601c4602c9b47b80a60e1c60b8b1872cf6d19ff18b5d21bd0e5db52f82c839c9957882da291cbc6b619ec20b5dfdcde1298778 SHA512 0366b292a26d47de85eb28a7a085f6a670ca4e0e274d1e8090dc472deacd12fcbe3abc0f2a9401c6a9857405d87c38de9c7e3af55413bbbdb677b41fc5d3732a
-DIST chromium-rust-toolchain-6f54d591c3-7-llvmorg-23-init-5669-g8a0be0bc.tar.xz 271641712 BLAKE2B 7436b7243fbdd2c46b6dd0d9e16a6727718bfdc1870df86395229f3f6420e6109d5e5b881b21c48e2e1434844e4d7a6080bf36c2877a60e0f61f3baa9b803389 SHA512 420122a3b4fd984a848d47aed7cd04c3fb9bbdc5e0413c94165a6dc091713ca5f2dfd78dc238357ce05ea547bdd8a36d116f106bd4d94a54e358f0e93c7a6028
DIST chromium-rust-toolchain-b998449636-2-llvmorg-23-init-19482-g53d18800.tar.xz 274790504 BLAKE2B ff04e59cbb3272790bd80e0e79a547c1439c7f12861fc92da39c4b1b5daeecf012d1cfe1b6b3896051e33aca8b379c33b7b2c4810067c8cb55ffef7c92c2d293 SHA512 0ca4419d701664c25859bfc60e7d9fe5e8e1b52552536e6db46acaf79a6ea53a00e3a10607d8c8c5f6226b674be7d96515f4a3ce8ff148db9672d826156fa6a6
DIST chromium-testfonts-9c07d19d9c.tar.gz 33413117 BLAKE2B 95cb79288de5697b6de2a6f503f81bcfb7687ea1af0bd0e6db8cfc09af7cdaedd9a83f36dd9d0a3ac19dfca8ac7a6c3a891922a192db012688565c06da8a9cf8 SHA512 2d3602b7a924d2bb8d538882f13a05428e23bf16ea3a9cf07eb13801fe7f33261ce61f2e5dc12e5c6f61f21b392526024d1969e8a967cf1f5138c647b84025b6
-DIST chromium-testfonts-a28b222b79.tar.gz 33233004 BLAKE2B 2329d6a6069a19058c6fd58b61ae2d66cff3b4971984a5d2449be708ead2ef169bd4401ba3b5e9d3aedeeb910b6bb8e7c81b6e338808df327b3102420d6ab2d0 SHA512 ca4f98300f2037a40e02f6c2ffa04427fdf08cdce8de34cc944a5ccb69d4279090d2b8476d5e77bd610db6542696eb3ed4d135c3462fc0375cbf9277bf2fa670
DIST cromite-49c23e54e61a84486bb6581cccf6d51ada75999b.tar.gz 175429613 BLAKE2B 1ba19b0d8b25a11a50f8d2ea35cebbae65fcdc89a1d20c4d403ef9ac68079b5f71d97a59fd98e6f9a10ccf1cf62e5cac67fbe3dd605bde450510f70d0c0179d5 SHA512 dee56e323c531024dce2616cc4a685f7d1203c03331db3444a2f3bd6a0dae4f60d22a8821e5464f1db2b6d024b75d220f788648ad4905d3138260a929466e63e
-DIST cromite-69e841fd35cd92ce5fa1a336791c7989809e0f17.tar.gz 175387683 BLAKE2B 70c72d2cb3048171e21f3d9407925d2b63ef6a640de9e21988cadf6897e8289c0fae9baf604364d39b52329d118de4efe4a74087d000a6aaf48dc58c930f585b SHA512 10bd58fc6fe015cb991b7e5f2b913d147981bb56b5fd50d88489700c7204f146c88c1b46327d6ed7084f966ffdb705566d5e18b508e35aa196de079e4d94f6c3
-DIST cromite-cb3baf14f52eb4365d017f640f85310735c19b79.tar.gz 175351669 BLAKE2B f578d0783d2af02d62de152fea5364465aee457bc82c84cb9533d07683e475cdb0ede81999d526b1a3acd6fd78a9b06a18a4325c76c3c7a7fe0dfef08a42dbd8 SHA512 a6c97e36e5056a2fd0b8b2d708de637edf51f91a83561b124fe798d177edf37bdd7cf272f692a7b814d853da5ecf3bea63768d7e18078e4c1e04998f0aaa0ee3
-DIST devtools-frontend-c72c7b0971e3e31974b0adea0dac42278e22e3b0.patch 7155 BLAKE2B 7241fddd7d733f50cc6987a662e8f8993ea903c598f7e58b9215b173da99fa6920c1bbd67f41950098bd3a7d28342559d492dc259fe391eb7c604cb15d85d629 SHA512 9eb14afc59a07ed5ef1ab72c4f63b1336ce1c1366212145e819a5209180afa05da3f1b831b7546266167f469dc9885dc59a56523cf44f74afd4efdb9b28df39d
DIST rollup-wasm-node-4.57.1.tgz 792515 BLAKE2B 52fa9c4b65f3e20149c66fdd44b3c2a8b47e836d87de85535dbbf8b7243acef3d65c5be9f794eebb1533af2f16888a1cb42a75ed392ba65251cf60b73b41d559 SHA512 6f4adc247f329046a77e04de0ed94fb9b86984850ec74a1a01e93ede18b34da164a02d450524ec6341a2c700780f91d9e6bdc6b76c88f5cf0cd7739c5bf916e4
-DIST ungoogled-chromium-148.0.7778.178-1.tar.gz 661720 BLAKE2B 24aa515095c25725f9abf38a7d9c8ea3a92eaf3f575dedd3c3c80a6f111a11f3dec585012a50c9e4c00e3129d910eb171526aea4a5d64d3b6f2a18cddcaa655f SHA512 ebd236bc2c8e686b29a9a2be47b8355f6e1b489858e4ba12ba8e7f09c2ec4df45bcea9405e4577e9ec52888dff33e3ee2458dfa8695002f9397d75f317f1f49c
-DIST ungoogled-chromium-148.0.7778.215-1.tar.gz 662274 BLAKE2B f7b5572128a48af4711512f9c1c43b1bcae3f6a41d3e5fda7916a50f276e878c92dfad1e2f457d55abf7665d6b2a09d1a08306c2e61d0ae456d78991c949949b SHA512 725bce1e30177918468f0d68f91cf4c254e22ba8497bcc01241547ac5826d5f30e22ca977692165402696afaa943a6755a7e85ad749d33963717e21a8e114dcb
-DIST ungoogled-chromium-149.0.7827.114-1.tar.gz 665728 BLAKE2B 962ff8dca3d2f87682db3cf43c3564ff9c9cb18fb6b899a9367cb6ff2e14542bd53008f74948db48a0db301285004db9ef9fcd16bb9db5195322dddbff961c22 SHA512 57d3cc66ac83a2cc983602594fa86cd240256cd362f9de841c395e7ec7d2847f0afaa9c07b26234c6b0eb7552ec678dad2abf2bdb1d36bc20179a4f8f7b96434
-DIST ungoogled-chromium-149.0.7827.155-1.tar.gz 665723 BLAKE2B bc68c51a19b4fb5b2408f23546aeebca66598c8f252e27390eb37b69c5f3c8b1b80d153fcffeb290acc21f5b4fc82c6556d77de322ad488c15a444aad1a1ee77 SHA512 d4658f34f2a984af0a3864576f2313de76a0c3a4e36c4e111878b0d5b918cc3b1c83aaf02d0c19d51027f6a9c46f81a5653da727d8e9d35e297a09a2f741f164
-DIST ungoogled-chromium-149.0.7827.196-1.tar.gz 665767 BLAKE2B bb080b21bee602be016cb810e75823257609ba0a8def23d5cffe2826cbcd896ff7901298dd67d9a53e114f7c44dd70bf14fe532061f85eeaa67586dbf8567750 SHA512 599280daea9adfec1e43eaf2c3afbde81abf9dfe426183ffa19b08fe9f1c2c54f7f04af12e56b67bfadad63f92e9983180103aa2f823dcccce30807424684740
-DIST ungoogled-chromium-149.0.7827.200-1.tar.gz 665727 BLAKE2B 4374ff19aeccd38bc47551c895250a3f972ecac6d9e8e79fb14817d1bd4b0bc8dbebb209db07da8a1cedc4c4a26b3fe252c300021d6a1b724b1a46e9bbe2a99a SHA512 f194ed2f943b6f58b09f1547e67fdca842456c4847f5d0d9dc9d0959af86853edac8cb4a8b897241bfe30fb4e5d60f63cecfd3f0b1d1e43c1a81b933bba59925
-DIST ungoogled-chromium-149.0.7827.53-1.tar.gz 664795 BLAKE2B 1f64ccac79b560cecc25b5e9d0846d6bd048900edffe06c5549a18f7d7312634a868f1b1b08c178826e95fb4f96fa9d3d48665288bf3ad943f385f56e3f9e5f6 SHA512 dd6dbb61fdab41924c7e417b593521d747bb51ec16c68f5fef9e0e3c574abd338cd9b4d98f8216c741ba4178d2612a4dd0ef6f164b3402d1b3b0ee3bb56c7921
-DIST ungoogled-chromium-150.0.7871.114-1.tar.gz 669709 BLAKE2B 1e79d1a073ffbb3733e0e758130cf2b206eace70937e984791f2d08760d15cbb8b352ada59e0c21d05b7761cfdd5a3d9d33564b249162a3c07d25e178105d11d SHA512 caf5810553f68d15dfe72a180fd568601302cc52d311b5d5e7621e696a4e53944f72b0f5a93fb0a442ca1c87e2f0d66c7efb1db0ff7e903a966be3dce38653de
-DIST ungoogled-chromium-150.0.7871.124-1.tar.gz 669575 BLAKE2B eeac190b02144ba88e18a3610de73387800d6d13927c519221538c4e13cfdb221de5fcd806bec5073c1386544a5f60324a77de1ef598926f2f880f3289e15921 SHA512 61e13d7b19791e58ed769d70e98bf454c83e48b8d408f8d2d060a3ca3a62dd059f21cb4e649235f1fcfd8665136bd98716591ea570f4980d5f2e953fe6883033
-DIST ungoogled-chromium-150.0.7871.128-1.tar.gz 669587 BLAKE2B 6ccb3a8fd78691563f8e59dc97f66157830affa74a2c947e3620d6ce63a56ff2c7b2a52b76cd7169927f0cf92cef60503bf395e0be78a7df0669d98015f69c63 SHA512 e292c78c3f9a976df3d141e818783e843a2c66a78a88cc29cb9e17df461e4b0e9c1353c44cfa09ca1c442738ef468d28c3fad2aa70746a432444c4c5eac47ae6
-DIST ungoogled-chromium-150.0.7871.181-1.tar.gz 669574 BLAKE2B df192323b07c68ee088e1f3bb9f5df7ea1fe9f3b98453bf05944a40b62e05ed771be30edcae15f301456cce5f69352b182c5b8f8c98c1865d505e4b22084fa0f SHA512 57717fc4488c36e4bbbc8cca6d5ee884d5fe854d9b61524ccf49a28c7eb61832e2040cb1a1780e98f45167517623a0181a8866494157282408a52e191fb1d8f7
-DIST ungoogled-chromium-150.0.7871.186-1.tar.gz 669698 BLAKE2B a02d1072f5e07f02bac3c1cd91a39852b4b3a5fec527ae9fdffd507bce6246ab9b5d6cdf428f5ba5a3cc2b0efb8d091cfd786cb8a067f0cc706b2def80997ecf SHA512 6a633fd54d17d6851823a22e88a9640ff957f2d2a8b103f0c6f9d0a33607a94aad42d8bcb54ae36cd3935acc292698e6111a471c1e773948b3f1f0e94788074d
-DIST ungoogled-chromium-151.0.7922.108-1.tar.gz 670490 BLAKE2B 2254e858dd787a6f5844814260526c260a16415390b91bb26e7fb8df92b00ec460dd7bc9c6e292aed96372968acc22878fe90b47a674fc0e0af4c83b9b417525 SHA512 20309249e0ad59652c5482c24688d813f93dbaccdf71dca4f48e368c4b3026c4be6ea49b1129ebeae68e16ac453bd30e315d20305fa1b378323fd1f67ad94177
-DIST ungoogled-chromium-151.0.7922.137-1.tar.gz 670488 BLAKE2B 14443275115ebe1e1ceb5b692580429fcc431f653e3c3d676ec150db2195dcd2e11209ac0f70fa23cb21f6e6c7e5f9b09bb72f66cd0e2776255b07e9530db8d8 SHA512 3240ecd3724f0c7c404d99ba8f6f0c827e859b7a2471dd8324de20b28ca26a3879e0d603eb03c2bdcde3abcde3214dd4e9b0496426e25bc17a04df2bb1479bb2
-DIST ungoogled-chromium-151.0.7922.169-1.tar.gz 670587 BLAKE2B 00538b5b5d0d7b4a11adb8f6a1d325ebf59b10092d6f58a311c108d778bddb7283282af22e591b16b5a49af5c39b20f62b0a042b3a5bed4d32149280ea332dde SHA512 2c539bb3aacb3cdd459fa8d64a75d895145d3806219d9f96d766948f3912f66de594b42da505d33bb3439e1c2e4b393af16c815cbf2f211033b2003cadf3761f
-DIST ungoogled-chromium-151.0.7922.71-1.tar.gz 670363 BLAKE2B df0c82404b74654f47b14e65514b38595e67b890a6bd66d1e2af14d0cfadd5d48cf335143297c8474eccab6ce0fe194afa1b26ec381a7bea1db77b0ae54653fa SHA512 2a5624628d7922ee837cf47d981da4bd7c5c21efb7e969113f77beedbe3f84bf402334f849c08969541dd18367b4534c84913a9b77d2d7bebcc134c1f25f4d03
-DIST ungoogled-chromium-151.0.7922.75-1.tar.gz 670502 BLAKE2B 57c204077ebfdfdc527a690d4dafbe5e286ee2707696d26472991089f44b7eec9b915e29a8d543d9dcd617e12e3df6737b5ef8ba16abb676e7da5b27e3f5ea29 SHA512 4a7b3e026742bd3c8421436a5552bd2a6c46d40a48b9d20e3ef232615a65b8c94aff5b249d98d4ed327cc00aeaf258868bd610df65bb923e7dfdbd081abd32e6
-DIST ungoogled-chromium-152.0.7977.64-1.tar.gz 670160 BLAKE2B 3b367b063171165fef6965dcef10006084e035ae5b929486af9a348db4464c1ec010edf155411aad8658950eeee1e2e0bcd5aea4d7706ce1cdce474d9c66cc08 SHA512 0be5192684bc5e77b48e43185884a20ec9f5138006015951977e98cf17b9a9a34827885dad65a28379abba9efadc1f5c180b18f9eb1478f16bbd77bfb7818b7e
-DIST ungoogled-chromium-152.0.7977.75-1.tar.gz 670284 BLAKE2B 49f1c85a310189f510a96332bfe19526b857d370e3e4aeed51275d3621516361eb429c0730797af025ca851f31b33b38e7cfc649dcd6eaf85c26b8bd521804d5 SHA512 574dddb069de3aac00a28b4121c9cf0733b2a9416c11f8b03295ff321209bfb80e5a7bd24af7a3c8b073aef4b15f6ba506c0d8b31edab85c14d98618b99f4b56
-DIST ungoogled-chromium-152.0.7977.82-1.tar.gz 670285 BLAKE2B 5cf79e643b3ea0525be0bae28acc89c2674a87fcea6c800bc9938a95115cf8ebf419c235ab624142b6b7448db77731a657a0e773e5e73e2efb3f8e3a4ba4097e SHA512 b73b57ff5795186d2d98d149d44b16ef697d70519c8f12dc557e7c2271b420c3e8e3e4a70268e571903d6668cc43031d801e036e345549427aa1d27e8833986f
DIST ungoogled-chromium-153.0.8010.36-1.tar.gz 671692 BLAKE2B 202ebbc47843e838ae0cbf87f7f4f3d7b6f52abe6781c5cc398f684b1ed51a96770477995263c3684698dbbe085414711b11348ba75372518b3dd057aab07d37 SHA512 7ab1c73b21c5415a10f232f6ef1ecd9c1df14fb376f2516ff09f08759c449f0ec487a3930645e7109cb3b5386ed09604e2c286ae289bd4746713f56855b05242
-DIST ungoogled-chromium-4087f48e6d66e55486fe7c3a634303559634ba3f.tar.gz 670504 BLAKE2B d01153b1d8ddac8a0287cd42889c1ca618397a59f14a479d222d40415624d6e2ec2b8ecf3ec5d9614fa5c873c8e72d52d65da12e13b55020827a50a5d0242045 SHA512 dc30ee5e3b05382dc9ee02c114d8cabda140b36d505b4d2faf31357b75c23fbff7e3b589baf2f74741a4f7c99093df0ad69c9c368a5f69d6a361e042f43310e5
-DIST ungoogled-chromium-4d7bb965938b072e1dc7d9a5fa26121805f97fc8.tar.gz 665638 BLAKE2B 84d8ef00835f9d880007db9c125729209900d4df1087099af9fd9b66727fbb37b1520908d3bedcf3416302e45866a4f7278cc0589ef6de25a5e6142c123d08b9 SHA512 b6653986b3af157ad5749eabd185280ccd24cf5a551f2e639a6ac9b51aff2fa4f5aa7c0b3cd881162b0da2f44e022755013d1f747e1268378a18fcb9cdfde015
-DIST ungoogled-chromium-6fda5bc707792220745f9d53c25e84b89ceaabe4.tar.gz 669732 BLAKE2B 6a50e0428bcbb35383f1f039bf0d0a09fd853ae899a7ab366a516c29296bdc45a927cbe11b1b97c61c73cef98b252500a5e455ef0714b5b8ef42bdd3e180296c SHA512 97ec74a2b119a952a023a28de0d0ab93d81ba6c6623280f81eaf1cfadd0cbcec6fbf0d0574cdc2e777c89818c468cb2a55378f6be18c60b3bf8f92fb3a1de703
+DIST ungoogled-chromium-153.0.8010.52-1.tar.gz 671744 BLAKE2B e61223de882b2dc7b57b46543e05b1770f319f595e19fd7164a2f4340e3484a4e691e6db97a0a58ce40f883acddda886131d7b7a7e5481594f54f00bdee9212b SHA512 59f1cae28a5faa95a645bbd6bfe3def03e4b2e75e614fad25d43b2099f690bae7032c1f41cdde0fa53c03d03b8b478aff328fb5a785ed938ac411fbbb528ae52
diff --git a/www-client/ungoogled-chromium/files/chromium-142-work-with-old-fontconfig.patch b/www-client/ungoogled-chromium/files/chromium-142-work-with-old-fontconfig.patch
deleted file mode 100644
index f8c2e403ea39..000000000000
--- a/www-client/ungoogled-chromium/files/chromium-142-work-with-old-fontconfig.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From 0103e0e07f3cfd1a1e426b63354881cc547022e1 Mon Sep 17 00:00:00 2001
-From: Matt Jolly <kangie@gentoo.org>
-Date: Sat, 20 Sep 2025 11:47:38 +1000
-Subject: [PATCH] build with actually released fontconfig
-
-https://chromium.googlesource.com/chromium/src/+/9af749d9dfb0f4a5aaa0463bcad126973e3d5363
-
-rolls Chromium's fontconfig to include
-
-https://chromium.googlesource.com/external/fontconfig.git/+/59da606145558a0041eb90d9c80a26a6f0c1d348%5E%21/
-
-which _is_ available upstream, but is not in _any_ fontconfig release;
-this change updates the fontconfig cache magic number from `9` to `10`.
-
-As a result, any Chromium build using an unbundled fontconfig (like, say,
-every Linux distro...) will fail if building test targets, despite fontconfig
-being one of the few libraries supported by
-`build/linux/unbundle/replace_gn_files.py`.
-
-Further changes to work around regressions in fontations also configure bundled
-fontconfig to suffix `-reindex1` to the cache path which, as per the above, also
-breaks builds using system fontconfig.
-
-https://github.com/chromium/chromium/commit/bbf7b467a342847e94eadf02777ab70073807fa7
-
-And further changes in M142 have bumped the cache version to `11`. Hopefully this stabilises
-soon and fontconfig gets a release.
-
-This patch reverts enough of these changes to allow Chromium to build with
-unbundled (and actually released) fontconfig versions again.
-
-See-also: https://issues.chromium.org/issues/442698344
-Signed-off-by: Matt Jolly <kangie@gentoo.org>
---- a/third_party/test_fonts/fontconfig/BUILD.gn
-+++ b/third_party/test_fonts/fontconfig/BUILD.gn
-@@ -49,7 +49,7 @@ if (is_linux || is_chromeos) {
- args = []
- inputs = [ "$root_out_dir/etc/fonts/fonts.conf" ]
- outputs = [
-- "$root_out_dir/fontconfig_caches/fb5c91b2895aa445d23aebf7f9e2189c-le64.cache-11",
-+ "$root_out_dir/fontconfig_caches/fb5c91b2895aa445d23aebf7f9e2189c-le64.cache-9",
- "$root_out_dir/fontconfig_caches/CACHEDIR.TAG",
- ]
- }
---- a/third_party/test_fonts/fontconfig/generate_fontconfig_caches.cc
-+++ b/third_party/test_fonts/fontconfig/generate_fontconfig_caches.cc
-@@ -56,7 +56,7 @@ int main() {
- FcFini();
-
- // Check existence of intended fontconfig cache file.
-- auto cache = fontconfig_caches + "/" + kCacheKey + "-le64.cache-11";
-+ auto cache = fontconfig_caches + "/" + kCacheKey + "-le64.cache-9";
- bool cache_exists = access(cache.c_str(), F_OK) == 0;
- return !cache_exists;
- }
---
-2.50.1
diff --git a/www-client/ungoogled-chromium/files/chromium-151-cbor-fix.patch b/www-client/ungoogled-chromium/files/chromium-151-cbor-fix.patch
deleted file mode 100644
index da59b59ba30a..000000000000
--- a/www-client/ungoogled-chromium/files/chromium-151-cbor-fix.patch
+++ /dev/null
@@ -1,29 +0,0 @@
---- a/components/cbor/BUILD.gn
-+++ b/components/cbor/BUILD.gn
-@@ -12,7 +12,7 @@
- # TODO(crbug.com/535682335): Remove `USE_CBOR_RUST` buildflag entirely,
- # unconditionally enable Rust CBOR parser, and drop `is_cronet_build` check
- # once Cronet supports Crubit dependencies.
-- flags = [ "USE_CBOR_RUST=!$is_cronet_build" ]
-+ flags = [ "USE_CBOR_RUST=$enable_cpp_api_from_rust" ]
- }
-
- component("cbor") {
-@@ -37,7 +37,7 @@
- "//base",
- ]
-
-- if (!is_cronet_build) {
-+ if (enable_cpp_api_from_rust) {
- public_deps = [
- "//build/rust/crubit",
- "//components/cbor/rust:cbor_rust_bindings",
-@@ -63,7 +63,7 @@
- "//testing/gtest",
- "//third_party/fuzztest",
- ]
-- if (!is_cronet_build) {
-+ if (enable_cpp_api_from_rust) {
- deps += [ "//components/cbor/rust:cbor_rust_unittests" ]
- }
-
diff --git a/www-client/ungoogled-chromium/files/restore-x86-r3.patch b/www-client/ungoogled-chromium/files/restore-x86-r3.patch
deleted file mode 100644
index 50672bd148b4..000000000000
--- a/www-client/ungoogled-chromium/files/restore-x86-r3.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- a/BUILD.gn
-+++ b/BUILD.gn
-@@ -1501,17 +1501,6 @@ if (use_blink && !is_cronet_build) {
- # While linux-x86 is unsupported, chromeos-x86 is not, and since ChromeOS uses
- # the linux sysroot (and thus linux modulemaps), generating chromeos-x86
- # modulemaps requires building targets on linux-x86
--if (!running_modularize) {
-- # TODO(cassew): Add more OS's that don't support x86.
-- is_valid_x86_target =
-- target_os != "ios" && target_os != "mac" &&
-- (target_os != "linux" || use_libfuzzer || !build_with_chromium)
--
-- # Note: v8_target_cpu == arm allows using the V8 arm simulator on x86 for fuzzing.
-- assert(
-- is_valid_x86_target || target_cpu != "x86" || v8_target_cpu == "arm",
-- "'target_cpu=x86' is not supported for 'target_os=$target_os'. Consider omitting 'target_cpu' (default) or using 'target_cpu=x64' instead.")
--}
-
- group("chromium_builder_perf") {
- testonly = true
diff --git a/www-client/ungoogled-chromium/metadata.xml b/www-client/ungoogled-chromium/metadata.xml
index 0b0fccacb08f..cf81d90242bc 100644
--- a/www-client/ungoogled-chromium/metadata.xml
+++ b/www-client/ungoogled-chromium/metadata.xml
@@ -28,6 +28,7 @@
<flag name="debug">Enable DCHECK feature with severity configurable at runtime. Mostly intended for debugging and development, NOT RECOMMENDED for general use.</flag>
<flag name="enable-driver">Build chromedriver</flag>
<flag name="ffmpeg-chromium">(binpkg only) Use Chromium FFmpeg fork (<pkg>media-video/ffmpeg-chromium</pkg>) rather than mainline FFmpeg (<pkg>media-video/ffmpeg</pkg>)</flag>
+ <flag name="gclient">Fetch the Chromium sources with gclient (<pkg>dev-util/depot-tools</pkg>) instead of the tarball. The git mirror cache is kept in ${DISTDIR}/gclient-src (configurable via GCLIENT_STORE_DIR).</flag>
<flag name="gtk4">Build with GTK4 headers</flag>
<flag name="hangouts">Enable support for Google Hangouts features such as screen sharing</flag>
<flag name="headless">Build Ozone only with headless backend, NOT RECOMMENDED for general uses</flag>
diff --git a/www-client/ungoogled-chromium/ungoogled-chromium-148.0.7778.178_p1.ebuild b/www-client/ungoogled-chromium/ungoogled-chromium-148.0.7778.178_p1.ebuild
deleted file mode 100644
index 9bc7b94501cc..000000000000
--- a/www-client/ungoogled-chromium/ungoogled-chromium-148.0.7778.178_p1.ebuild
+++ /dev/null
@@ -1,2512 +0,0 @@
-# Copyright 2009-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-# Use following environment variables to customise the build
-# EXTRA_GN — pass extra options to gn
-# NINJAOPTS="-k0 -j8" useful to populate ccache even if ebuild is still failing
-# UGC_SKIP_PATCHES — space-separated list of patches to skip
-# UGC_KEEP_BINARIES — space-separated list of binaries to keep
-# UGC_SKIP_SUBSTITUTION — space-separated list of files to skip domain substitution
-
-# USE=bundled-toolchain is intended for users who want to use the same toolchain
-# as the upstream releases. It's also a good fallback in case we fall behind
-# and need to get a release out quickly (less likely with `dev` in-tree).
-# We can't rely on it as a default since the toolchain is only shipped for x86-64;
-# other architectures will need to use system toolchain.
-
-# Since m133 we are using CI-generated tarballs from
-# https://github.com/chromium-linux-tarballs/chromium-tarballs/
-
-# These are bit-for-bit identical to the official releases, but are built
-# using an external CI system that we have some control over, in case
-# issues pop up again with official tarball generation.
-
-GN_MIN_VER=0.2354
-# chromium-tools/get-chromium-toolchain-strings.py (or just use Chromicler)
-# Node for M145+ should be 24.12.0 but that's not packaged in Gentoo yet. See #969145
-TEST_FONT="a28b222b79851716f8358d2800157d9ffe117b3545031ae51f69b7e1e1b9a969"
-BUNDLED_CLANG_VER="llvmorg-23-init-5669-g8a0be0bc-4"
-BUNDLED_RUST_VER="6f54d591c3116ee7f8ce9321ddeca286810cc142-7"
-RUST_SHORT_HASH=${BUNDLED_RUST_VER:0:10}-${BUNDLED_RUST_VER##*-}
-NODE_VER="24.12.0"
-ESBUILD_VER="0.25.1"
-ROLLUP_VER="4.57.1" # currently manual.
-VIRTUALX_REQUIRED="pgo"
-
-#UGC_COMMIT_ID="7c07c452ea3374a68e3a0b3f059e93464d7fc4a2"
-# UGC_PR_COMMITS=(
-# c917e096342e5b90eeea91ab1f8516447c8756cf
-# 5794e9d12bf82620d5f24505798fecb45ca5a22d
-# )
-
-CROMITE_COMMIT_ID="cb3baf14f52eb4365d017f640f85310735c19b79"
-
-#declare -A CHROMIUM_COMMITS=(
-# ["fcfb1a42813f1e9d8babedc7bb2e0f06101a3151"]="." #148+
-# ["-acb47d9a6b56c4889a2ed4216e9968cfc740086c"]="."
-# # ["-37c28a19804e47a68eabf3cf882a310689fc325b"]="." #disable style check for cromite
-# # ["cd5a0df905a28faa89ff2a4ab44f893f84dc4487"]="net/third_party/quiche/src"
-#)
-
-CHROMIUM_LANGS="af am ar as az be bg bn bs ca cs cy da de el en-GB es es-419 et eu fa fi fil
- fr fr-CA gl gu he hi hr hu hy id is it ja ka kk km kn ko ky lo lt lv mk ml mn mr ms my
- nb ne nl or pa pl pt-BR pt-PT ro ru si sk sl sq sr sr-Latn sv sw ta te th tr uk ur uz
- vi zh-CN zh-HK zh-TW zu"
-
-LLVM_COMPAT=( 21 22 23 )
-PYTHON_COMPAT=( python3_{13..14} )
-PYTHON_REQ_USE="xml(+)"
-RUST_MIN_VER=1.91.0
-RUST_NEEDS_LLVM="yes please"
-RUST_OPTIONAL="yes" # Not actually optional, but we don't need system Rust (or LLVM) with USE=bundled-toolchain
-RUST_REQ_USE="rustfmt" # Upstream run rustfmt on bindgen output, so we need it to be available.
-
-inherit check-reqs chromium-2 desktop flag-o-matic llvm-r1 multiprocessing ninja-utils pax-utils
-inherit python-any-r1 readme.gentoo-r1 rust systemd toolchain-funcs xdg-utils
-
-DESCRIPTION="Modifications to Chromium for removing Google integration and enhancing privacy"
-HOMEPAGE="https://github.com/ungoogled-software/ungoogled-chromium"
-PPC64_HASH="a85b64f07b489b8c6fdb13ecf79c16c56c560fc6"
-PATCH_V="${PV%%\.*}-3"
-COPIUM_COMMIT="fe1caafa06f27542c18a881348f78e984e2d9fe2"
-SRC_URI="https://github.com/chromium-linux-tarballs/chromium-tarballs/releases/download/${PV/_*}/chromium-${PV/_*}-linux.tar.xz
- https://deps.gentoo.zip/www-client/chromium/rollup-wasm-node-${ROLLUP_VER}.tgz
- https://gitlab.com/Matt.Jolly/chromium-patches/-/archive/${PATCH_V}/chromium-patches-${PATCH_V}.tar.bz2
- !bundled-toolchain? (
- https://codeberg.org/selfisekai/copium/archive/${COPIUM_COMMIT}.tar.gz
- -> chromium-patches-copium-${COPIUM_COMMIT:0:10}.tar.gz
- )
- bundled-toolchain? (
- https://commondatastorage.googleapis.com/chromium-browser-clang/Linux_x64/clang-${BUNDLED_CLANG_VER}.tar.xz
- -> chromium-clang-${BUNDLED_CLANG_VER}.tar.xz
- https://commondatastorage.googleapis.com/chromium-browser-clang/Linux_x64/rust-toolchain-${BUNDLED_RUST_VER}-${BUNDLED_CLANG_VER%-*}.tar.xz
- -> chromium-rust-toolchain-${RUST_SHORT_HASH}-${BUNDLED_CLANG_VER%-*}.tar.xz
- )
- test? (
- https://chromium-fonts.storage.googleapis.com/${TEST_FONT} -> chromium-testfonts-${TEST_FONT:0:10}.tar.gz
- )
- ppc64? (
- https://gitlab.raptorengineering.com/raptor-engineering-public/chromium/openpower-patches/-/archive/${PPC64_HASH}/openpower-patches-${PPC64_HASH}.tar.bz2 -> chromium-openpower-${PPC64_HASH:0:10}.tar.bz2
- )
-"
-
-# Gentoo tarball:
-# https://chromium-tarballs.distfiles.gentoo.org/chromium-${PV/_*}.tar.xz -> chromium-${PV/_*}-gentoo.tar.xz
-
-# chromium-linux-tarballs
-# https://github.com/chromium-linux-tarballs/chromium-tarballs/releases/download/${PV/_*}/chromium-${PV/_*}-linux.tar.xz
-
-# Official tarball:
-# https://commondatastorage.googleapis.com/chromium-browser-official/chromium-${PV/_*}${LITE_TARBALL:+-lite}.tar.xz
-
-# https://gitweb.gentoo.org/proj/chromium-tools.git/tree/get-chromium-licences.py @ 145.0.7632.76
-LICENSE="Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD BSD-2 Base64 Boost-1.0 CC-BY-3.0 CC-BY-4.0 Clear-BSD FFT2D FTL"
-LICENSE+=" IJG ISC LGPL-2 LGPL-2.1 MIT MPL-1.1 MPL-2.0 Ms-PL PSF-2 SGI-B-2.0 SSLeay SunSoft Unicode-3.0"
-LICENSE+=" Unicode-DFS-2015 Unlicense UoI-NCSA ZLIB libtiff openssl"
-LICENSE+=" cromite? ( GPL-3 )"
-
-SLOT="stable"
-KEYWORDS="amd64 ~arm64 ~ppc64 ~x86"
-
-IUSE_SYSTEM_LIBS="abseil-cpp av1 brotli crc32c double-conversion ffmpeg +harfbuzz icu jsoncpp +libusb libvpx +openh264 openjpeg re2 snappy woff2 +zstd"
-IUSE="+X bindist bluetooth bundled-toolchain cfi convert-dict cups custom-cflags debug ffmpeg-chromium enable-driver gtk4 hangouts headless kerberos +libcxx nvidia +official optimize-thinlto optimize-webui override-data-dir pax-kernel pgo"
-IUSE+=" +proprietary-codecs pulseaudio qt6 screencast selinux test thinlto cromite vaapi wayland widevine cpu_flags_ppc_vsx3"
-RESTRICT="
- !bindist? ( bindist )
- !test? ( test )
- arm64? ( test )
- !system-ffmpeg? ( proprietary-codecs? ( bindist ) )
- !system-openh264? ( bindist )
- cromite? ( bindist )
-"
-
-REQUIRED_USE="
- !headless? ( || ( X wayland ) )
- screencast? ( wayland )
- ffmpeg-chromium? ( bindist proprietary-codecs )
- optimize-thinlto? ( thinlto )
- cfi? ( thinlto )
- x86? ( !thinlto !widevine )
- debug? ( !official )
- vaapi? ( !system-av1 !system-libvpx )
-"
-
-UGC_PV="${PV/_p/-}"
-UGC_PF="${PN}-${UGC_PV}"
-UGC_URL="https://github.com/ungoogled-software/${PN}/archive/"
-
-if [ -z "$UGC_COMMIT_ID" ]; then
- UGC_URL="${UGC_URL}${UGC_PV}.tar.gz -> ${UGC_PF}.tar.gz"
- UGC_WD="${WORKDIR}/${UGC_PF}"
-else
- UGC_URL="${UGC_URL}${UGC_COMMIT_ID}.tar.gz -> ${PN}-${UGC_COMMIT_ID}.tar.gz"
- UGC_WD="${WORKDIR}/ungoogled-chromium-${UGC_COMMIT_ID}"
-fi
-
-SRC_URI+="${UGC_URL}
-"
-
-if [ ! -z "${UGC_PR_COMMITS[*]}" ]; then
- for i in "${UGC_PR_COMMITS[@]}"; do
- SRC_URI+="https://github.com/ungoogled-software/${PN}/commit/$i.patch?full_index=true -> ${PN}-$i.patch
- "
- done
-fi
-
-if [ ! -z "${CHROMIUM_COMMITS[*]}" ]; then
- # for i in "${CHROMIUM_COMMITS[@]}"; do
- for i in "${!CHROMIUM_COMMITS[@]}"; do
- if [[ ${CHROMIUM_COMMITS[$i]} =~ webrtc ]]; then
- #TODO: is it safe to use this mirror?
- SRC_URI+="https://github.com/webrtc-mirror/webrtc/commit/${i/-}.patch?full_index=true -> webrtc-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ angle ]]; then
- SRC_URI+="https://github.com/google/angle/commit/${i/-}.patch?full_index=true -> angle-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ quiche ]]; then
- SRC_URI+="https://github.com/google/quiche/commit/${i/-}.patch?full_index=true -> quiche-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ dawn ]]; then
- SRC_URI+="https://github.com/google/dawn/commit/${i/-}.patch?full_index=true -> dawn-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ perfetto ]]; then
- SRC_URI+="https://github.com/google/perfetto/commit/${i/-}.patch?full_index=true -> perfetto-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ink ]]; then
- SRC_URI+="https://github.com/google/ink/commit/${i/-}.patch?full_index=true -> ink-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ vulkan-utility-libraries ]]; then
- SRC_URI+="https://github.com/KhronosGroup/Vulkan-Utility-Libraries/commit/${i/-}.patch?full_index=true -> vulkan-utility-libraries-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ruy ]]; then
- SRC_URI+="https://github.com/google/ruy/commit/${i/-}.patch?full_index=true -> ruy-${i/-}.patch
- "
- else
- SRC_URI+="https://github.com/chromium/chromium/commit/${i/-}.patch?full_index=true -> chromium-${i/-}.patch
- "
- fi
- done
-fi
-
-SRC_URI+="cromite? ( https://github.com/uazo/cromite/archive/${CROMITE_COMMIT_ID}.tar.gz -> cromite-${CROMITE_COMMIT_ID}.tar.gz )
-"
-
-for i in ${IUSE_SYSTEM_LIBS}; do
- [[ $i =~ ^(\+)?(.*)$ ]]
- IUSE+=" ${BASH_REMATCH[1]}system-${BASH_REMATCH[2]}"
-done
-
-COMMON_X_DEPEND="
- x11-libs/libXcomposite:=
- x11-libs/libXcursor:=
- x11-libs/libXdamage:=
- x11-libs/libXfixes:=
- >=x11-libs/libXi-1.6.0:=
- x11-libs/libXrandr:=
- x11-libs/libXrender:=
- x11-libs/libXtst:=
- x11-libs/libxshmfence:=
-"
-
-# sys-libs/zlib: https://bugs.gentoo.org/930365; -ng is not compatible.
-# We _could_ use the bundled minizip, but that's against policy.
-COMMON_SNAPSHOT_DEPEND="
- system-icu? ( >=dev-libs/icu-78:= )
- system-abseil-cpp? ( >=dev-cpp/abseil-cpp-20260107.0 )
- system-brotli? ( >=app-arch/brotli-9999 )
- system-crc32c? ( dev-libs/crc32c )
- system-double-conversion? ( dev-libs/double-conversion )
- system-woff2? ( media-libs/woff2 )
- system-snappy? ( app-arch/snappy )
- system-jsoncpp? ( dev-libs/jsoncpp )
- system-openjpeg? ( media-libs/openjpeg:2= )
- system-re2? ( >=dev-libs/re2-0.2019.08.01:= )
- system-libvpx? ( >=media-libs/libvpx-1.13.0:=[postproc] )
- system-libusb? ( virtual/libusb:1 )
- cromite? ( dev-util/patchutils )
- >=dev-libs/libxml2-2.12.4:=[icu]
- dev-libs/nspr:=
- >=dev-libs/nss-3.26:=
- dev-libs/libxslt:=
- media-libs/fontconfig:=
- >=media-libs/freetype-2.11.0-r1:=
- system-harfbuzz? ( >=media-libs/harfbuzz-3:0=[icu(-)] )
- media-libs/libjpeg-turbo:=
- media-libs/libpng:=
- system-zstd? ( >=app-arch/zstd-1.5.5:= )
- >=media-libs/libwebp-0.4.0:=
- media-libs/mesa:=[gbm(+)]
- >=media-libs/openh264-1.6.0:=
- system-av1? (
- >=media-libs/dav1d-1.0.0:=
- >=media-libs/libaom-3.7.0:=
- )
- sys-libs/zlib:=
- !headless? (
- dev-libs/glib:2
- >=media-libs/alsa-lib-1.0.19:=
- pulseaudio? (
- || (
- media-libs/libpulse
- >=media-sound/apulse-0.1.9
- )
- )
- sys-apps/pciutils:=
- kerberos? ( virtual/krb5 )
- vaapi? ( >=media-libs/libva-2.7:=[X?,wayland?] )
- X? (
- x11-base/xorg-proto:=
- x11-libs/libX11:=
- x11-libs/libxcb:=
- x11-libs/libXext:=
- )
- x11-libs/libxkbcommon:=
- wayland? (
- dev-libs/libffi:=
- dev-libs/wayland:=
- screencast? (
- media-video/pipewire:=
- || (
- sys-apps/xdg-desktop-portal-gnome
- sys-apps/xdg-desktop-portal-gtk
- kde-plasma/xdg-desktop-portal-kde
- gui-libs/xdg-desktop-portal-lxqt
- gui-libs/xdg-desktop-portal-wlr
- )
- )
- )
- )
-"
-
-COMMON_DEPEND="
- ${COMMON_SNAPSHOT_DEPEND}
- app-arch/bzip2:=
- dev-libs/expat:=
- system-ffmpeg? (
- >=media-video/ffmpeg-6.1:=
- >=media-libs/opus-1.3.1:=
- )
- net-misc/curl[ssl]
- sys-apps/dbus:=
- media-libs/flac:=
- sys-libs/zlib:=[minizip]
- !headless? (
- >=app-accessibility/at-spi2-core-2.46.0:2
- media-libs/mesa:=[X?,wayland?]
- virtual/udev
- x11-libs/cairo:=
- x11-libs/gdk-pixbuf:2
- x11-libs/pango:=
- cups? ( >=net-print/cups-1.3.11:= )
- qt6? ( dev-qt/qtbase:6[gui,widgets] )
- X? ( ${COMMON_X_DEPEND} )
- )
-"
-RDEPEND="${COMMON_DEPEND}
- !www-client/ungoogled-chromium:0
- >=www-client/chromium-common-2
- !headless? (
- || (
- x11-libs/gtk+:3[X?,wayland?]
- gui-libs/gtk:4[X?,wayland?]
- )
- qt6? ( dev-qt/qtbase:6[X?,wayland?] )
- )
- virtual/ttf-fonts
- selinux? ( sec-policy/selinux-chromium )
- bindist? (
- ffmpeg-chromium? ( media-video/ffmpeg-chromium:${PV%%\.*} )
- )
- !override-data-dir? (
- !www-client/chromium:${SLOT}
- !www-client/cromite:${SLOT}[-override-data-dir]
- )
-"
-
-DEPEND="${COMMON_DEPEND}
- !headless? (
- gtk4? ( gui-libs/gtk:4[X?,wayland?] )
- !gtk4? ( x11-libs/gtk+:3[X?,wayland?] )
- )
-"
-
- # pgo? ( >=llvm-core/clang-22.0.0_pre20260106 >=llvm-core/lld-22.0.0_pre20260106 )
-BDEPEND="
- ${COMMON_SNAPSHOT_DEPEND}
- ${PYTHON_DEPS}
- $(python_gen_any_dep '
- dev-python/setuptools[${PYTHON_USEDEP}]
- ')
- >=app-arch/gzip-1.7
- !headless? (
- qt6? ( dev-qt/qtbase:6 )
- )
- !bundled-toolchain? ( $(llvm_gen_dep '
- llvm-core/clang:${LLVM_SLOT}
- llvm-core/llvm:${LLVM_SLOT}
- llvm-core/lld:${LLVM_SLOT}
- cfi? ( llvm-runtimes/clang-runtime:${LLVM_SLOT}[sanitize] )
- official? (
- !ppc64? ( llvm-runtimes/compiler-rt-sanitizers:${LLVM_SLOT}[cfi] )
- ) ')
- ${RUST_DEPEND}
- )
- >=dev-util/bindgen-0.72.1
- >=dev-build/gn-${GN_MIN_VER}
- app-alternatives/ninja
- dev-lang/perl
- >=dev-util/gperf-3.2
- dev-util/esbuild:${ESBUILD_VER}
- dev-vcs/git
- >=net-libs/nodejs-${NODE_VER}[inspector]
- sys-apps/hwdata
- >=sys-devel/bison-2.4.3
- sys-devel/flex
- virtual/pkgconfig
- x11-misc/xdg-utils
-"
-
-if ! has chromium_pkg_die ${EBUILD_DEATH_HOOKS}; then
- EBUILD_DEATH_HOOKS+=" chromium_pkg_die";
-fi
-
-DISABLE_AUTOFORMATTING="yes"
-DOC_CONTENTS="
-Some web pages may require additional fonts to display properly.
-Try installing some of the following packages if some characters
-are not displayed properly:
-- media-fonts/arphicfonts
-- media-fonts/droid
-- media-fonts/ipamonafont
-- media-fonts/noto
-- media-fonts/ja-ipafonts
-- media-fonts/takao-fonts
-- media-fonts/wqy-microhei
-- media-fonts/wqy-zenhei
-
-To fix broken icons on the Downloads page, you should install an icon
-theme that covers the appropriate MIME types, and configure this as your
-GTK+ icon theme.
-
-For native file dialogs in KDE, install kde-apps/kdialog.
-
-To make password storage work with your desktop environment you may
-have install one of the supported credentials management applications:
-- app-crypt/libsecret (GNOME)
-- kde-frameworks/kwallet (KDE)
-If you have one of above packages installed, but don't want to use
-them in Chromium, then add --password-store=basic to CHROMIUM_FLAGS
-in /etc/chromium/default.
-"
-
-S="${WORKDIR}/chromium-${PV/_*}"
-
-python_check_deps() {
- python_has_version "dev-python/setuptools[${PYTHON_USEDEP}]"
-}
-
-pre_build_checks() {
- # Check build requirements: bugs #471810, #541816, #914220
- # We're going to start doing maths here on the size of an unpacked source tarball,
- # this should make updates easier as chromium continues to balloon in size.
- # xz -l /var/cache/distfiles/chromium-${PV}*.tar.xz
- local base_disk=9 # Round up
- use test && base_disk=$((base_disk + 5))
- local extra_disk=1 # Always include a little extra space
- local memory=4
- tc-is-cross-compiler && extra_disk=$((extra_disk * 2))
- if tc-is-lto || use pgo; then
- memory=$((memory * 2 + 1))
- tc-is-cross-compiler && extra_disk=$((extra_disk * 2)) # Double the requirements
- use pgo && extra_disk=$((extra_disk + 4))
- fi
- if is-flagq '-g?(gdb)?([1-9])'; then
- if use custom-cflags; then
- extra_disk=$((extra_disk + 5))
- fi
- memory=$((memory * 2))
- fi
- local CHECKREQS_MEMORY="${memory}G"
- local CHECKREQS_DISK_BUILD="$((base_disk + extra_disk))G"
- check-reqs_${EBUILD_PHASE_FUNC}
-}
-
-pkg_pretend() {
- if [[ ${MERGE_TYPE} != binary ]]; then
- # The pre_build_checks are all about compilation resources, no need to run it for a binpkg
- pre_build_checks
- fi
-
- if use headless; then
- local headless_unused_flags=("cups" "kerberos" "pulseaudio" "qt6" "vaapi" "wayland")
- for myiuse in ${headless_unused_flags[@]}; do
- use ${myiuse} && ewarn "Ignoring USE=${myiuse}, USE=headless is set."
- done
- fi
-
- if ! use bindist && use ffmpeg-chromium; then
- ewarn "Ignoring USE=ffmpeg-chromium, USE=bindist is not set."
- fi
- if use libcxx; then
- ewarn
- ewarn "Building with libcxx, please be aware that system-*"
- ewarn "and some other c++ dependencies need to be compiled"
- ewarn "with the same c++ library as ungoogled-chromium itself"
- ewarn "dev-libs/jsoncpp is most problematic, see #58 #49 #119 for details"
- ewarn "Simplest solution would be to disable corresponding system-* flags"
- ewarn
- fi
- if use cfi; then
- ewarn
- ewarn "Building with cfi is only possible if building with -stdlib=libc++"
- ewarn "Make sure all dependencies are also built this way, see #40"
- ewarn
- fi
- if use cromite; then
- ewarn
- ewarn "Cromite patches are very experimental and unstable"
- ewarn "Please consider testing them and giving feedback upstream:"
- ewarn "https://github.com/uazo/cromite/issues"
- ewarn "Not all patches are applied, let me know if others should be considered too"
- ewarn
- fi
-}
-
-pkg_setup() {
- if [[ ${MERGE_TYPE} != binary ]]; then
- # The pre_build_checks are all about compilation resources, no need to run it for a binpkg
- pre_build_checks
-
- # We haven't massaged any CFLAGS yet, so we want to do this before we force CC/CXX to prevent warnings.
- local want_lto="false"
- tc-is-lto && want_lto="true"
-
- # The linux:unbundle toolchain in GN grabs CC, CXX, CPP (etc) from the environment
- # We'll set these to clang here then use llvm-utils functions to very explicitly set these
- # to a sane value.
- # This is effectively the 'force-clang' path if GCC support is re-added.
- if use !bundled-toolchain; then
- llvm-r1_pkg_setup
- rust_pkg_setup
-
- # Forcing clang; respect llvm_slot_x to enable selection of impl via LLVM_COMPAT
- AR=llvm-ar
- CPP="${CHOST}-clang++-${LLVM_SLOT} -E"
- NM=llvm-nm
- CC="${CHOST}-clang-${LLVM_SLOT}"
- CXX="${CHOST}-clang++-${LLVM_SLOT}"
- fi
-
- use_lto="false"
- local lto_usable="true"
- if [[ "$want_lto" == "true" ]]; then
- if use arm64 && [[ "${LLVM_SLOT}" -lt 22 ]]; then
- einfo "LTO is broken with LLVM 21 on arm64, ignoring CFLAGS."
- lto_usable="false"
- else
- use_lto="true"
- fi
- # We can rely on GN to do this for us; without this builds
- # take significantly longer with LTO enabled.
- filter-lto
- fi
-
- if [[ "$use_lto" == "false" ]] && use official && [[ "$lto_usable" == "true" ]]; then
- einfo "USE=official selected and LTO not detected."
- einfo "It is _highly_ recommended that LTO be enabled for performance reasons"
- einfo "and to be consistent with the upstream \"official\" build optimisations."
- fi
-
- if [[ "$use_lto" == "false" ]] && use test; then
- die "Tests require CFI which requires LTO"
- fi
-
- export use_lto
-
- # 936858
- if tc-ld-is-mold; then
- eerror "Your toolchain is using the mold linker."
- eerror "This is not supported by Chromium."
- die "Please switch to a different linker."
- fi
-
- if tc-is-cross-compiler; then
- use pgo && die "The pgo USE flag cannot be used when cross-compiling"
- CPP="${CBUILD}-clang++-${LLVM_SLOT} -E"
- fi
-
- # Sanity checks for development convenience
- if ver_test $(gn --version || die) -lt ${GN_MIN_VER}; then
- die "dev-build/gn >= ${GN_MIN_VER} is required to build this Chromium"
- fi
-
- # Sometimes, when adding a new LLVM slot, devs (me) forget to install an appropriate lld.
- local lld_ver=$(ld.lld --version | awk '{split($2,a,"."); print a[1]}' || die "Failed to check lld version")
- if [[ ${lld_ver} -lt ${LLVM_SLOT} ]]; then
- die "Your lld version (${lld_ver}) is too old for the selected LLVM slot (${LLVM_SLOT}). Please install a newer lld or select an older LLVM slot."
- fi
- fi
-
- chromium_suid_sandbox_check_kernel_config
-}
-
-src_unpack() {
- # # Here be dragons!
- # local XCLD="--exclude=chromium-${PV/_*}/third_party/instrumented_libs \
- # --exclude=chromium-${PV/_*}/third_party/llvm \
- # --exclude=chromium-${PV/_*}/third_party/llvm-build \
- # --exclude=chromium-${PV/_*}/third_party/node/linux \
- # --exclude=chromium-${PV/_*}/third_party/rust-src \
- # --exclude=chromium-${PV/_*}/third_party/rust-toolchain \
- # --exclude=chromium-${PV/_*}/build/linux/debian_bullseye_i386-sysroot \
- # --exclude=chromium-${PV/_*}/build/linux/debian_bullseye_amd64-sysroot \
- # --exclude=chromium-${PV/_*}/third_party/angle/third_party/VK-GL-CTS \
- # "
-
- # if ! use libcxx ; then
- # XCLD+=" --exclude=chromium-${PV/_*}/third_party/libc++"
- # fi
-
- # if ! use pgo ; then
- # XCLD+=" --exclude=chromium-${PV/_*}/chrome/build/pgo_profiles"
- # fi
-
- # einfo "Unpacking chromium-${PV/_*}.tar.xz to ${WORKDIR}"
- # # Gentoo tarball:
- # # tar ${XCLD} -xf "${DISTDIR}/chromium-${PV/_*}-gentoo.tar.xz" -C "${WORKDIR}" || die
- # tar ${XCLD} -xf "${DISTDIR}/chromium-${PV/_*}${LITE_TARBALL:+-lite}.tar.xz" -C "${WORKDIR}" || die
-
- # unpack ${UGC_URL#*->}
- # # unpack chromium-patches-${PATCH_V}.tar.bz2
- # # Warned you!
-
- unpack chromium-${PV/_*}-linux.tar.xz
- unpack chromium-patches-${PATCH_V}.tar.bz2
- # These should only be required when we're not using the official toolchain
- if use !bundled-toolchain; then
- unpack chromium-patches-copium-${COPIUM_COMMIT:0:10}.tar.gz
- fi
-
- if use test; then
- # This just contains a bunch of font files that need to be unpacked (or moved) to the correct location.
- local testfonts_dir="${WORKDIR}/chromium-${PV/_*}/third_party/test_fonts/test_fonts"
- local testfonts_tar="${DISTDIR}/chromium-testfonts-${TEST_FONT:0:10}.tar.gz"
- einfo "Unpacking test fonts ..."
- tar xf "${testfonts_tar}" -C "${testfonts_dir}" || die "Failed to unpack testfonts"
- fi
-
- # We need to manually unpack this since M126 else we'd unpack one toolchain over the other.
- # Since we're doing that anyway let's unpack to sensible locations to make symlink creation easier.
- if use bundled-toolchain; then
- einfo "Unpacking bundled Clang ..."
- mkdir -p "${WORKDIR}"/clang || die "Failed to create clang directory"
- tar xf "${DISTDIR}/chromium-clang-${BUNDLED_CLANG_VER}.tar.xz" -C "${WORKDIR}/clang" || die "Failed to unpack Clang"
- einfo "Unpacking bundled Rust ..."
- local rust_dir="${WORKDIR}/rust-toolchain"
- mkdir -p "${rust_dir}" || die "Failed to create rust toolchain directory"
- tar xf "${DISTDIR}/chromium-rust-toolchain-${RUST_SHORT_HASH}-${BUNDLED_CLANG_VER%-*}.tar.xz" -C "${rust_dir}" ||
- die "Failed to unpack Rust"
- fi
-
- if use ppc64; then
- unpack chromium-openpower-${PPC64_HASH:0:10}.tar.bz2
- fi
-
- # This is a dirty hack, but we need rollup to build successfully and it's proving to be challenging
- # to build locally due to deps
- unpack rollup-wasm-node-${ROLLUP_VER}.tgz
-
- if use cromite; then
- unpack cromite-${CROMITE_COMMIT_ID}.tar.gz
- fi
-
- unpack ${UGC_URL#*->}
-}
-
-remove_compiler_builtins() {
- # We can't use the bundled compiler builtins with the system toolchain
- # We used to `grep` then `sed`, but it was indirect. Combining the two into a single
- # `awk` command is more efficient and lets us document the logic more clearly.
-
- local pattern=' configs += [ "//build/config/clang:compiler_builtins" ]'
- local target='build/config/compiler/BUILD.gn'
-
- local tmpfile
- tmpfile=$(mktemp) || die "Failed to create temporary file."
-
- if awk -v pat="${pattern}" '
- BEGIN {
- match_found = 0
- }
-
- # If the delete countdown is active, decrement it and skip to the next line.
- d > 0 { d--; next }
-
- # If the current line matches the pattern...
- $0 == pat {
- match_found = 1 # ...set our flag to true.
- d = 2 # Set delete counter for this line and the next two.
- prev = "" # Clear the buffered previous line so it is not printed.
- next
- }
-
- # For any other line, print the buffered previous line.
- NR > 1 { print prev }
-
- # Buffer the current line to be printed on the next cycle.
- { prev = $0 }
-
- END {
- # Print the last line if it was not part of a deleted block.
- if (d == 0) { print prev }
-
- # If the pattern was never found, exit with a failure code.
- if (match_found == 0) {
- exit 1
- }
- }
- ' "${target}" > "${tmpfile}"; then
- # AWK SUCCEEDED (exit code 0): The pattern was found and edited.
- # This is to avoid gawk's `-i inplace` option which users complain about.
- mv "${tmpfile}" "${target}"
- else
- # AWK FAILED (exit code 1): The pattern was not found.
- rm -f "${tmpfile}"
- die "Awk patch failed: Pattern not found in ${target}."
- fi
-}
-
-src_prepare() {
- # Calling this here supports resumption via FEATURES=keepwork
- python_setup
-
- # We'll fill this in as we go. Patches go in chromium-patches.
- local PATCHES=()
-
- rm "${WORKDIR}/chromium-patches-${PATCH_V}/common/cr131-unbundle-icu-target.patch"
- if use pgo; then
- rm "${WORKDIR}/chromium-patches-${PATCH_V}/rust/cr146-fix-botched-bytemuck-roll.patch"
- sed -i '/SupportedLaneCount/d' third_party/rust/chromium_crates_io/vendor/bytemuck-v1/src/zeroable.rs || die
- sed -i '/SupportedLaneCount/d' third_party/rust/chromium_crates_io/vendor/bytemuck-v1/src/pod.rs || die
- fi
-
- #cp -f ${WORKDIR}/chromium-patches-${PATCH_V}/*-compiler.patch "${T}/compiler.patch"
- ##cp -f ${FILESDIR}/chromium-147-compiler.patch "${T}/compiler.patch"
- #if ! use custom-cflags; then #See #25 #92
- # sed -i '/default_stack_frames/Q' "${T}/compiler.patch" || die
- #fi
-
- PATCHES+=( "${WORKDIR}/chromium-patches-${PATCH_V}/common/" )
- PATCHES+=( "${FILESDIR}/restore-x86-r3.patch" )
-
- # https://issues.chromium.org/issues/442698344
- # Unreleased fontconfig changed magic numbers and google have rolled to this version
- if has_version "<=media-libs/fontconfig-2.17.1"; then
- PATCHES+=( "${FILESDIR}/chromium-142-work-with-old-fontconfig.patch" )
- fi
-
- if use bundled-toolchain; then
- # We need to symlink the toolchain into the expected location
- einfo "Symlinking Clang toolchain to expected location ..."
- mkdir -p third_party/llvm-build/ || die "Failed to create llvm-build directory"
- # the 'Chromium Linux Tarballs' seem to already have 'Release+Asserts/{lib,bin}'; not sure if this is an
- # upstream change - we're using the same scripts to build, theoretically. We'll still attempt to create
- # llvm-build, but we'll rm Release+Asserts and symlink directly.
- if [[ -d third_party/llvm-build/Release+Asserts ]]; then
- rm -r third_party/llvm-build/Release+Asserts || die "Failed to remove third_party/llvm-build/Release+Asserts"
- fi
- ln -s "${WORKDIR}"/clang third_party/llvm-build/Release+Asserts || die "Failed to bundle Clang"
- einfo "Symlinking Rust toolchain to expected location ..."
- # As above, so below
- if [[ -d third_party/rust-toolchain ]]; then
- rm -r third_party/rust-toolchain || die "Failed to remove third_party/rust-toolchain"
- fi
- ln -s "${WORKDIR}"/rust-toolchain third_party/rust-toolchain || die "Failed to bundle rust"
- cp "${WORKDIR}"/rust-toolchain/VERSION \
- "${WORKDIR}"/rust-toolchain/INSTALLED_VERSION || die "Failed to set rust version"
- else
- # We don't need our toolchain patches if we're using the official toolchain
-
- # Copium patches go here.
- PATCHES+=(
- "${WORKDIR}/copium/cr143-libsync-__BEGIN_DECLS.patch"
- )
-
- # Automate conditional application of chromium-patches
- # The directory structure is expected to be something like:
- # chromium-patches-145/
- # ├── toolchain/
- # │ ├── cr123-foo.patch
- # │ └── cr135-bar.patch
- # ├── llvm/
- # │ ├── cr144-baz.patch
- # │ └── lt-23/
- # │ └── cr145-bleeding-edge-llvm-feature.patch
- # Where `lt-23` means "apply this patch if the LLVM version is less than 23".
- # Only categories in `slot_map` will be checked for version constraints.
- shopt -s nullglob
- local -A slot_map=( [llvm]="${LLVM_SLOT}" [rust]="${RUST_SLOT}" )
-
- for category in "${WORKDIR}/chromium-patches-${PATCH_V}"/*/; do
- local category_name="${category%/}"
- category_name="${category_name##*/}"
-
- # Skip arch-specific categories
- if [[ "${category_name}" == "ppc64le" ]]; then
- use ppc64 || continue
- fi
-
- # We applied common patches above, no need to apply them again here
- [[ "${category_name}" == "common" ]] && continue
-
- # Unconditional patches for this category
- PATCHES+=( "${category}"*.patch )
-
- # Version-constrained subdirectories (e.g., llvm/lt-23/)
- for constraint_dir in "${category}"*/; do
- local dir_name="${constraint_dir%/}"
- dir_name="${dir_name##*/}"
- if [[ "${dir_name}" =~ ^lt-(.*)$ && -v slot_map[${category_name}] ]]; then
- ver_test "${slot_map[${category_name}]}" -lt "${BASH_REMATCH[1]}" &&
- PATCHES+=( "${constraint_dir}"*.patch )
- fi
- done
- done
-
- shopt -u nullglob
-
- # Strictly speaking this doesn't need to be gated (no bundled toolchain for ppc64); it keeps the logic together
- if use ppc64; then
- local patchset_dir="${WORKDIR}/openpower-patches-${PPC64_HASH}/patches"
- # patch causes build errors on 4K page systems (https://bugs.gentoo.org/show_bug.cgi?id=940304)
- local page_size_patch="ppc64le/third_party/use-sysconf-page-size-on-ppc64.patch"
- local isa_3_patch="ppc64le/core/baseline-isa-3-0.patch"
- # Apply the OpenPOWER patches (check for page size and isa 3.0)
- openpower_patches=( $(grep -E "^ppc64le|^upstream" "${patchset_dir}/series" | grep -v "${page_size_patch}" |
- grep -v "${isa_3_patch}" || die) )
- for patch in "${openpower_patches[@]}"; do
- PATCHES+=( "${patchset_dir}/${patch}" )
- done
- if [[ $(getconf PAGESIZE) == 65536 ]]; then
- PATCHES+=( "${patchset_dir}/${page_size_patch}" )
- fi
- # We use vsx3 as a proxy for 'want isa3.0' (POWER9)
- if use cpu_flags_ppc_vsx3 ; then
- PATCHES+=( "${patchset_dir}/${isa_3_patch}" )
- fi
- fi
-
- remove_compiler_builtins
-
- # We can't rely on the eselect'd Rust to actually include rustfmt, so we'll point to the selected slot specifically.
- local suffix=""
- if [[ "${RUST_TYPE}" == "binary" ]]; then
- suffix="-bin-${RUST_SLOT}"
- else
- suffix="-${RUST_SLOT}"
- fi
- sed -i "s|/bin/rustfmt|/bin/rustfmt${suffix}|g" build/rust/rust_bindgen_generator.gni ||
- die "Failed to update rustfmt path"
-
- fi
-
- # Do this before we apply patches since (e.g.) ppc64 needs to patch rollup and it's easier in ${S}
- einfo "Moving rollup wasm-node package into place ..."
- mkdir -p third_party/devtools-frontend/src/node_modules/@rollup/wasm-node ||
- die "Failed to create node_modules/@rollup/wasm-node"
- mv "${WORKDIR}"/package/* third_party/devtools-frontend/src/node_modules/@rollup/wasm-node ||
- die "Failed to move rollup package"
-
- if [ ! -z "${CHROMIUM_COMMITS[*]}" ]; then
- # for i in "${CHROMIUM_COMMITS[@]}"; do
- for i in "${!CHROMIUM_COMMITS[@]}"; do
- if [[ ${CHROMIUM_COMMITS[$i]} =~ webrtc ]]; then
- patch_prefix="webrtc"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ angle ]]; then
- patch_prefix="angle"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ quiche ]]; then
- patch_prefix="quiche"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ dawn ]]; then
- patch_prefix="dawn"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ perfetto ]]; then
- patch_prefix="perfetto"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ink ]]; then
- patch_prefix="ink"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ vulkan-utility-libraries ]]; then
- patch_prefix="vulkan-utility-libraries"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ruy ]]; then
- patch_prefix="ruy"
- else
- patch_prefix="chromium"
- fi
- pushd "${CHROMIUM_COMMITS[$i]}" > /dev/null || die
- if [[ $i = -* ]]; then
- einfo "Reverting ${patch_prefix}-${i/-}.patch"
- git_wrapper apply -R --exclude="*unittest.cc" --exclude="DEPS" \
- -p1 < "${DISTDIR}/${patch_prefix}-${i/-}.patch"
- else
- einfo "Applying ${patch_prefix}-${i/-}.patch"
- git_wrapper apply --exclude="*unittest.cc" --exclude="DEPS" \
- -p1 < "${DISTDIR}/${patch_prefix}-${i/-}.patch"
- fi
- popd > /dev/null || die
- done
- fi
-
- if ! use bluetooth ; then
- PATCHES+=(
- "${FILESDIR}/disable-bluez-r7.patch"
- )
- fi
-
- if use convert-dict ; then
- PATCHES+=(
- "${FILESDIR}/chromium-ucf-dict-utility-r3.patch"
- )
- fi
-
- if ! use libcxx ; then
- PATCHES+=(
- "${FILESDIR}/fix-wayland-oncecallback-copy.patch"
- )
- fi
-
- if use system-ffmpeg; then
- PATCHES+=(
- "${FILESDIR}/chromium-141-opus-mp3.patch"
- "${FILESDIR}/chromium-135-hevc.patch"
- )
- sed -i "\!AVFMT_FLAG_NOH264PARSE!d" media/filters/ffmpeg_glue.cc || die
- ewarn "You need to expose \"av_stream_get_first_dts\" in ffmpeg via user patch"
- fi
-
- if use system-av1; then
- PATCHES+=(
- "${FILESDIR}/chromium-system-av1.patch"
- )
- fi
-
- if use system-libvpx; then
- PATCHES+=(
- "${FILESDIR}/chromium-system-libvpx.patch"
- )
- fi
-
- if use system-openjpeg ; then
- PATCHES+=(
- "${FILESDIR}/chromium-system-openjpeg-r4.patch"
- )
- fi
-
- if use x86 ; then
- #* Fixes a segfault in transport_security_state_generator
- PATCHES+=(
- "${FILESDIR}/fix-segfault-x86.patch"
- )
- fi
-
- # Testing all patches when NODIE is defined
- if [ ! -z "${NODIE}" ]; then
- for i in "${PATCHES[@]}"; do
- eapply_wrapper "$i"
- done
- nonfatal eapply_user
- else
- default
- fi
-
- if use cromite ; then
- BR_PA_PATH="${WORKDIR}/cromite-${CROMITE_COMMIT_ID}/build/patches"
-
- sed -i '/b\/components\/components_strings\.grd/,+10d' "${BR_PA_PATH}/Add-cromite-flags-support.patch" || die
- sed -i '/b\/chrome\/android\/java\/res\/xml\/privacy_preferences\.xml/,+13d' "${BR_PA_PATH}/Add-cromite-flags-support.patch" || die
- sed -i '/b\/android_webview\/support_library\/java\/src\/org\/chromium\/support_lib_glue/,+11d' "${BR_PA_PATH}/Client-hints-overrides.patch" || die
- sed -i '/webapps_strings.grdp" \/>/{s++webapps_strings.grdp" /><part file="cromite_components_strings_grd/placeholder.txt"/>+;h};${x;/./{x;q0};x;q1}' \
- components/components_strings.grd || die
-
- sed -i 's/absl::/std::/' "${BR_PA_PATH}/Add-a-proxy-configuration-page.patch" || die
-
- filterdiff -p1 "${BR_PA_PATH}/JIT-site-settings.patch" --exclude="content/browser/renderer_host/render_process_host_impl.cc" \
- > "${BR_PA_PATH}/JIT-site-settings.patch1"
- mv -f "${BR_PA_PATH}/JIT-site-settings.patch1" "${BR_PA_PATH}/JIT-site-settings.patch"
-
- BROMITE_PATCHES=(
- "${BR_PA_PATH}/bromite-build-utils.patch"
- "${BR_PA_PATH}/Battery-API-return-nothing.patch"
- "${BR_PA_PATH}/Multiple-fingerprinting-mitigations.patch"
- "${BR_PA_PATH}/Add-flag-to-configure-maximum-connections-per-host.patch"
- "${BR_PA_PATH}/Add-a-proxy-configuration-page.patch"
- "${BR_PA_PATH}/Enable-StrictOriginIsolation-and-SitePerProcess.patch"
- "${BR_PA_PATH}/Disable-requests-for-single-word-Omnibar-searches.patch"
- "${BR_PA_PATH}/Reduce-HTTP-headers-in-DoH-requests-to-bare-minimum.patch"
- "${BR_PA_PATH}/Client-hints-overrides.patch"
- "${BR_PA_PATH}/Disable-idle-detection.patch"
- "${BR_PA_PATH}/Disable-TLS-resumption.patch"
- "${BR_PA_PATH}/Remove-navigator.connection-info.patch"
-
- "${BR_PA_PATH}/AudioBuffer-AnalyserNode-fp-mitigations.patch"
- "${BR_PA_PATH}/Fonts-fingerprinting-mitigation.patch"
- "${BR_PA_PATH}/Content-settings-infrastructure.patch"
- "${BR_PA_PATH}/Add-autoplay-site-setting.patch"
- "${BR_PA_PATH}/Site-setting-for-images.patch"
- "${BR_PA_PATH}/JIT-site-settings.patch"
- "${BR_PA_PATH}/Add-webGL-site-setting.patch"
- "${BR_PA_PATH}/Add-webRTC-site-settings.patch"
- "${BR_PA_PATH}/Show-site-settings-for-cookies-javascript-and-ads.patch"
- "${BR_PA_PATH}/Viewport-Protection-flag.patch"
- "${BR_PA_PATH}/Revert-remove-allowscript-content-setting-secondary-url.patch"
- "${BR_PA_PATH}/Timezone-customization.patch"
- "${BR_PA_PATH}/Disable-speechSynthesis-getVoices-API.patch"
- "${BR_PA_PATH}/Remove-support-for-device-memory-and-cpu-recovery.patch"
- "${BR_PA_PATH}/Disable-Feeback-Collector.patch"
- "${BR_PA_PATH}/Disable-remote-altsvc-for-h3-connections.patch"
- "${BR_PA_PATH}/Add-cromite-flags-support.patch"
- "${BR_PA_PATH}/Enables-deactivation-of-the-js-debugger-statement.patch"
- )
- for i in "${BROMITE_PATCHES[@]}"; do
- if [[ "$i" =~ "Add-autoplay-site-setting.patch" ]] ||
- [[ "$i" =~ "JIT-site-settings.patch" ]] ||
- [[ "$i" =~ "Site-setting-for-images.patch" ]]; then
- einfo "Git binary patch: ${i##*/}"
- git_wrapper apply -p1 < "$i"
- else
- filter_wrapper "$i" --exclude="chrome/android/*"
- fi
- done
-
- #! conflicting patches
- sed -i '/browser_features.cc/,+17d' \
- "${UGC_WD}/patches/extra/ungoogled-chromium/add-flag-to-clear-data-on-exit.patch" || die
- sed -i 's$} // namespace features$BASE_FEATURE(kClearDataOnExit, "ClearDataOnExit", base::FEATURE_DISABLED_BY_DEFAULT);}$' \
- chrome/browser/browser_features.cc || die
- sed -i 's$} // namespace features$BASE_DECLARE_FEATURE(kClearDataOnExit);}$' \
- chrome/browser/browser_features.h || die
- sed -i 's$kChromeUIAboutHost,$kChromeUIAboutHost,"ungoogled-first-run",$' \
- chrome/common/webui_url_constants.cc || die
- sed -i '/chrome\/common\/webui_url_constants.cc/Q' \
- "${UGC_WD}/patches/extra/ungoogled-chromium/first-run-page.patch" || die
-
- #! normalise paths in py
- sed -i 's$os.path.dirname(include_file)$os.path.abspath(os.path.dirname(include_file))$' \
- build/bromite/gyp/cpp_bromite_include.py || die
- fi
-
- # if [[ ${LLVM_SLOT} == "19" ]]; then
- # # Upstream now hard depend on a feature that was added in LLVM 20.1, but we don't want to stabilise that yet.
- # # Do the temp file shuffle in case someone is using something other than `gawk`
- # {
- # awk '/config\("clang_warning_suppression"\) \{/ { print $0 " }"; sub(/clang/, "xclang"); print; next }
- # { print }' build/config/compiler/BUILD.gn > "${T}/build.gn" && \
- # mv "${T}/build.gn" build/config/compiler/BUILD.gn
- # } || die "Unable to disable warning suppression"
- # fi
-
- ## Not included in -lite tarballs, but we should check for it anyway.
- #if [[ -f third_party/node/linux/node-linux-x64/bin/node ]]; then
- # rm third_party/node/linux/node-linux-x64/bin/node || die
- #else
- # mkdir -p third_party/node/linux/node-linux-x64/bin || die
- #fi
- #ln -s "${EPREFIX}"/usr/bin/node third_party/node/linux/node-linux-x64/bin/node || die
-
- cp "${FILESDIR}/libusb.gn" build/linux/unbundle || die
- sed -i '/^REPLACEMENTS.*$/{s++REPLACEMENTS = {"libusb":"third_party/libusb/BUILD.gn",+;h};${x;/./{x;q0};x;q1}' \
- build/linux/unbundle/replace_gn_files.py || die
- sed -i '/^.*deps.*third_party\/jsoncpp.*$/{s++public_deps \+= [ "//third_party/jsoncpp" ]+;h};${x;/./{x;q0};x;q1}' \
- third_party/webrtc/rtc_base/BUILD.gn || die
-
- if use override-data-dir; then
- sed -i '/"chromium";/{s++"ungoogled-chromium";+;h};${x;/./{x;q0};x;q1}' \
- chrome/common/chrome_paths_linux.cc || die
- fi
-
- if use system-abseil-cpp; then
- eapply_wrapper "${FILESDIR}/chromium-147-system-abseil.patch"
-
- #! SFINAE mangling incompatibility between clang and gcc:
- #! https://github.com/llvm/llvm-project/issues/85656
- #! gcc: _ZN4absl12lts_202601074CordC1INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELi0EEEOT_
- #! clang: _ZN4absl12lts_202601074CordC1INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEETnNSt9enable_ifIXsr3std7is_sameIT_S8_EE5valueEiE4typeELi0EEEOSA_
- #! So, either this:
- eapply_wrapper "${FILESDIR}/chromium-141-system-abseil-cord.patch"
- #! or build with -fclang-abi-compat=17
-
- # cp -f /usr/include/absl/base/options.h third_party/abseil-cpp/absl/base/options.h
- # sed -i '/^#define ABSL_OPTION_USE_STD_ORDERING.*$/{s++#define ABSL_OPTION_USE_STD_ORDERING 1+;h};${x;/./{x;q0};x;q1}' \
- # third_party/abseil-cpp/absl/base/options.h || die
- fi
-
- #* Applying UGC PRs here
- if [ ! -z "${UGC_PR_COMMITS[*]}" ]; then
- pushd "${UGC_WD}" >/dev/null
- for i in "${UGC_PR_COMMITS[@]}"; do
- eapply_wrapper "${DISTDIR}/${PN}-$i.patch"
- done
- popd >/dev/null
- fi
-
- # From here we adapt ungoogled-chromium's patches to our needs
- local ugc_pruning_list="${UGC_WD}/pruning.list"
- local ugc_patch_series="${UGC_WD}/patches/series"
- local ugc_substitution_list="${UGC_WD}/domain_substitution.list"
-
- local ugc_unneeded=(
- # GN bootstrap
- extra/debian/gn/parallel
- # following Gentoo's Chromium
- core/ungoogled-chromium/build-with-wasm-rollup
- )
-
- if use cromite ; then
- einfo "Using fingerprinting patches from Cromite instead"
- ugc_unneeded+=(
- extra/bromite/fingerprinting-flags-client-rects-and-measuretext
- extra/bromite/flag-max-connections-per-host
- extra/bromite/flag-fingerprinting-canvas-image-data-noise
- extra/ungoogled-chromium/add-components-ungoogled
- extra/ungoogled-chromium/remove-pac-size-limit
- )
- fi
-
- # #* Temporary fix
- # sed -i "\!ios/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/icu/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/libjpeg_turbo/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/snappy/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/closure_compiler/!d" "${ugc_pruning_list}" || die
-
- # #* Didn't unpack them at the first place
- # sed -i "\!build/linux/debian_bullseye_i386-sysroot!d" "${ugc_pruning_list}" || die
- # sed -i "\!build/linux/debian_bullseye_amd64-sysroot!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/llvm-build!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/node/linux!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/rust-src!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/rust-toolchain!d" "${ugc_pruning_list}" || die
- # if ! use libcxx ; then
- # sed -i "\!third_party/libc!d" "${ugc_pruning_list}" || die
- # fi
- sed -i "s|debug('files|error('files|" \
- "${UGC_WD}/utils/prune_binaries.py" || die
- sed -i "\!third_party/node/linux!d" \
- "${UGC_WD}/utils/prune_binaries.py" || die
-
- local ugc_p ugc_dir
- for p in "${ugc_unneeded[@]}"; do
- einfo "Removing ${p}.patch"
- sed -i "\!${p}.patch!d" "${ugc_patch_series}" || die
- done
-
- if [ ! -z "${UGC_SKIP_PATCHES}" ]; then
- for p in ${UGC_SKIP_PATCHES}; do
- ewarn "Removing ${p}"
- sed -i "\!${p}!d" "${ugc_patch_series}" || die
- done
- fi
-
- if [ ! -z "${UGC_KEEP_BINARIES}" ]; then
- for p in ${UGC_KEEP_BINARIES}; do
- ewarn "Keeping binary ${p}"
- sed -i "\!${p}!d" "${ugc_pruning_list}" || die
- done
- fi
-
- if [ ! -z "${UGC_SKIP_SUBSTITUTION}" ]; then
- for p in ${UGC_SKIP_SUBSTITUTION}; do
- ewarn "No substitutions in ${p}"
- sed -i "\!${p}!d" "${ugc_substitution_list}" || die
- done
- fi
-
- ebegin "Pruning binaries"
- "${UGC_WD}/utils/prune_binaries.py" -q . "${UGC_WD}/pruning.list"
- eend $? || die
-
- ebegin "Applying ungoogled-chromium patches"
- "${UGC_WD}/utils/patches.py" -q apply . "${UGC_WD}/patches"
- eend $? || die
-
- ebegin "Applying domain substitution"
- "${UGC_WD}/utils/domain_substitution.py" -q apply -r "${UGC_WD}/domain_regex.list" -f "${UGC_WD}/domain_substitution.list" .
- eend $? || die
-
- # Sanity check esbuild version before we start removing files.
- # We _could_ patch the version check out - in theory esbuild upstream are being super conservative after
- # arch(AUR) packaged an `esbuild` binary and set ESBUILD_BINARY_PATH=/usr/bin/esbuild, causing much breakage,
- # but this is fine too and exactly matches what upstream are expecting.
- # https://github.com/evanw/esbuild/issues/2894
- local esbuild_js="${S}/third_party/devtools-frontend/src/node_modules/esbuild/lib/main.js"
- local found
- found=$(awk -F'"' '/if \(binaryVersion !==/ {print $2}' "${esbuild_js}")
- if [[ "${found}" != "${ESBUILD_VER}" ]]; then
- die "esbuild version mismatch: expected ${ESBUILD_VER}, found ${found}"
- fi
-
- elog "Removing bundled binaries from source tree ..."
- # Purge bundled ELF files: These are non-portable and will cause issues if used instead of system versions.
- # Use `--wasm` to also remove WebAssembly binaries, if desired - they're portable so shouldn't break builds.
- ${EPYTHON} "${FILESDIR}/bin-finder.py" --elf "${S}" | awk '{print $1}' | xargs rm -f ||
- die "Failed to remove bundled binaries"
-
- # And now we restore any that we actually need, from the host system
- local esbuild_path="${S}/third_party/devtools-frontend/src/third_party/esbuild"
- local -A restore_list=(
- ["/usr/bin/esbuild-${ESBUILD_VER}"]="${esbuild_path}/esbuild"
- ["/usr/bin/gperf"]="${S}/third_party/gperf/cipd/bin/gperf"
- ["/usr/bin/node"]="${S}/third_party/node/linux/node-linux-x64/bin/node"
- )
-
- for src in "${!restore_list[@]}"; do
- dst="${restore_list[${src}]}"
- if [[ -f "${src}" ]]; then
- einfo "Symlinking ${src} ..."
- # Make sure the parent dir exists; some tarballs don't include (e.g.) node's bindir
- mkdir -p "$(dirname "${dst}")" || die "Failed to create directory for ${dst}"
- ln -s "${src}" "${dst}" || die "Failed to symlink ${dst} from ${src}"
- if [[ ! -L "${dst}" || "$(readlink -f "${dst}")" != "${src}" ]]; then
- die "Symlink verification failed for ${dst} -> ${src}"
- fi
- else
- die "Expected to find ${src} to restore ${dst}, but it does not exist."
- fi
- done
-
- # adjust python interpreter version
- sed -i -e "s|\(^script_executable = \).*|\1\"${EPYTHON}\"|g" .gn || die
-
- # Use the system copy of hwdata's usb.ids; upstream is woefully out of date (2015!)
- sed 's|//third_party/usb_ids/usb.ids|/usr/share/hwdata/usb.ids|g' \
- -i services/device/public/cpp/usb/BUILD.gn || die "Failed to set system usb.ids path"
-
- # remove_bundled_libraries.py walks the source tree and looks for paths containing the substring 'third_party'
- # whitelist matches use the right-most matching path component, so we need to whitelist from that point down.
- local keeplibs=(
- base/third_party/cityhash
- )
- use system-double-conversion || keeplibs+=(
- base/third_party/double_conversion
- )
- keeplibs+=(
- base/third_party/icu
- base/third_party/nspr
- base/third_party/superfasthash
- base/third_party/symbolize
- base/third_party/xdg_user_dirs
- buildtools/third_party/libc++
- buildtools/third_party/libc++abi
- )
- use cromite && keeplibs+=(
- cromite_flags/third_party
- )
- keeplibs+=(
- net/third_party/mozilla_security_manager
- net/third_party/quic
- net/third_party/uri_template
- )
- use system-abseil-cpp || keeplibs+=(
- third_party/abseil-cpp
- )
- keeplibs+=(
- third_party/angle
- third_party/angle/src/common/third_party/xxhash
- third_party/angle/src/third_party/ceval
- )
- use nvidia || keeplibs+=(
- third_party/angle/src/third_party/libXNVCtrl
- )
- keeplibs+=(
- third_party/angle/src/third_party/volk
- third_party/anonymous_tokens
- third_party/apple_apsl
- third_party/axe-core
- third_party/bidimapper
- third_party/blink
- third_party/boringssl
- third_party/boringssl/src/third_party/fiat
- third_party/breakpad
- third_party/breakpad/breakpad/src/third_party/curl
- )
- use system-brotli || keeplibs+=(
- third_party/brotli
- )
- keeplibs+=(
- third_party/catapult
- third_party/catapult/common/py_vulcanize/third_party/rcssmin
- third_party/catapult/common/py_vulcanize/third_party/rjsmin
- third_party/catapult/third_party/beautifulsoup4-4.9.3
- third_party/catapult/third_party/html5lib-1.1
- third_party/catapult/third_party/polymer
- third_party/catapult/third_party/six
- third_party/catapult/third_party/typ
- third_party/catapult/tracing/third_party/d3
- third_party/catapult/tracing/third_party/gl-matrix
- third_party/catapult/tracing/third_party/jpeg-js
- third_party/catapult/tracing/third_party/jszip
- third_party/catapult/tracing/third_party/mannwhitneyu
- third_party/catapult/tracing/third_party/oboe
- third_party/catapult/tracing/third_party/pako
- third_party/ced
- third_party/cld_3
- third_party/closure_compiler
- )
- use libcxx && keeplibs+=(
- third_party/compiler-rt
- )
- keeplibs+=(
- third_party/content_analysis_sdk
- third_party/cpuinfo
- third_party/crabbyavif
- third_party/crashpad
- third_party/crashpad/crashpad/third_party/lss
- third_party/crashpad/crashpad/third_party/zlib
- )
- use system-crc32c || keeplibs+=(
- third_party/crc32c
- )
- keeplibs+=(
- third_party/cros_system_api
- third_party/d3
- third_party/dawn
- third_party/dawn/third_party/gn/webgpu-cts
- third_party/dawn/third_party/OpenGL-Registry
- third_party/dawn/third_party/renderdoc
- third_party/dawn/third_party/webgpu-headers
- third_party/depot_tools
- third_party/devscripts
- third_party/devtools-frontend
- third_party/devtools-frontend/src/front_end/third_party/acorn
- third_party/devtools-frontend/src/front_end/third_party/additional_readme_paths.json
- third_party/devtools-frontend/src/front_end/third_party/axe-core
- third_party/devtools-frontend/src/front_end/third_party/chromium
- third_party/devtools-frontend/src/front_end/third_party/codemirror
- third_party/devtools-frontend/src/front_end/third_party/csp_evaluator
- third_party/devtools-frontend/src/front_end/third_party/diff
- third_party/devtools-frontend/src/front_end/third_party/i18n
- third_party/devtools-frontend/src/front_end/third_party/intl-messageformat
- third_party/devtools-frontend/src/front_end/third_party/json5
- third_party/devtools-frontend/src/front_end/third_party/legacy-javascript
- third_party/devtools-frontend/src/front_end/third_party/lighthouse
- third_party/devtools-frontend/src/front_end/third_party/lit
- third_party/devtools-frontend/src/front_end/third_party/marked
- third_party/devtools-frontend/src/front_end/third_party/puppeteer
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/esm/third_party/mitt
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/esm/third_party/parsel-js
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/esm/third_party/rxjs
- third_party/devtools-frontend/src/front_end/third_party/source-map-scopes-codec
- third_party/devtools-frontend/src/front_end/third_party/third-party-web
- third_party/devtools-frontend/src/front_end/third_party/vscode.web-custom-data
- third_party/devtools-frontend/src/front_end/third_party/wasmparser
- third_party/devtools-frontend/src/front_end/third_party/web-vitals
- third_party/devtools-frontend/src/third_party
- third_party/dom_distiller_js
- third_party/dragonbox
- third_party/eigen3
- third_party/emoji-segmenter
- third_party/farmhash
- third_party/fast_float
- third_party/fdlibm
- third_party/federated_compute/chromium/fcp/confidentialcompute
- third_party/federated_compute/src/fcp/base
- third_party/federated_compute/src/fcp/confidentialcompute
- third_party/federated_compute/src/fcp/protos/confidentialcompute
- third_party/federated_compute/src/fcp/protos/federatedcompute
- third_party/fft2d
- third_party/flatbuffers
- third_party/fp16
- third_party/freetype
- third_party/fusejs
- third_party/fxdiv
- third_party/gemmlowp
- third_party/google_input_tools
- third_party/google_input_tools/third_party/closure_library
- third_party/google_input_tools/third_party/closure_library/third_party/closure
- third_party/googletest
- third_party/gperf # We symlink system gperf, but this will purge the symlink since we tidy up afterwards.
- third_party/highway
- third_party/hunspell
- third_party/hyphenation-patterns
- third_party/ink_stroke_modeler/src/ink_stroke_modeler
- third_party/ink_stroke_modeler/src/ink_stroke_modeler/internal
- third_party/ink/src/ink/brush
- third_party/ink/src/ink/color
- third_party/ink/src/ink/geometry
- third_party/ink/src/ink/rendering
- third_party/ink/src/ink/rendering/skia/common_internal
- third_party/ink/src/ink/rendering/skia/native
- third_party/ink/src/ink/rendering/skia/native/internal
- third_party/ink/src/ink/strokes
- third_party/ink/src/ink/types
- third_party/inspector_protocol
- third_party/ipcz
- third_party/jinja2
- )
- use system-jsoncpp || keeplibs+=(
- third_party/jsoncpp
- )
- keeplibs+=(
- third_party/khronos
- third_party/lens_server_proto
- third_party/leveldatabase
- third_party/libaddressinput
- )
- use libcxx && keeplibs+=(
- third_party/libc++
- )
- keeplibs+=(
- third_party/libdrm
- third_party/libgav1
- third_party/libjingle
- third_party/libpfm4
- third_party/libphonenumber
- third_party/libpng
- third_party/libsecret
- third_party/libsrtp
- third_party/libsync
- third_party/libtess2/libtess2
- third_party/libtess2/src/Include
- third_party/libtess2/src/Source
- third_party/liburlpattern
- )
- use system-libusb || keeplibs+=(
- third_party/libusb
- )
- keeplibs+=(
- third_party/libva_protected_content
- )
- use system-libvpx || keeplibs+=(
- third_party/libvpx
- third_party/libvpx/source/libvpx/third_party/x86inc
- )
- keeplibs+=(
- third_party/libwebm
- third_party/libx11
- third_party/libxcb-keysyms
- third_party/libxml/chromium
- third_party/libyuv
- third_party/libzip
- third_party/lit
- )
- use libcxx && keeplibs+=(
- third_party/llvm-libc
- third_party/llvm-libc/src/shared/
- )
- keeplibs+=(
- third_party/lottie
- third_party/lss
- third_party/lzma_sdk
- third_party/mako
- third_party/markupsafe
- third_party/material_color_utilities
- third_party/metrics_proto
- third_party/minigbm
- third_party/ml_dtypes
- third_party/modp_b64
- third_party/nasm
- third_party/nearby
- third_party/neon_2_sse
- third_party/node
- third_party/oak/chromium/proto
- third_party/oak/chromium/proto/attestation
- third_party/omnibox_proto
- third_party/one_euro_filter
- third_party/openscreen
- third_party/openscreen/src/third_party/
- third_party/openscreen/src/third_party/tinycbor/src/src
- third_party/ots
- third_party/pdfium
- third_party/pdfium/third_party/agg23
- third_party/pdfium/third_party/bigint
- third_party/pdfium/third_party/freetype
- third_party/pdfium/third_party/lcms
- )
- use system-openjpeg || keeplibs+=(
- third_party/pdfium/third_party/libopenjpeg
- )
- keeplibs+=(
- third_party/pdfium/third_party/libtiff
- third_party/perfetto
- third_party/perfetto/protos/third_party/chromium
- third_party/perfetto/protos/third_party/pprof
- third_party/perfetto/protos/third_party/primes
- third_party/perfetto/protos/third_party/simpleperf
- third_party/pffft
- third_party/ply
- third_party/polymer
- third_party/private_membership
- third_party/private-join-and-compute
- third_party/protobuf
- third_party/protobuf/third_party/utf8_range
- third_party/pthreadpool
- third_party/puffin
- third_party/pyjson5
- third_party/pyyaml
- third_party/rapidhash
- third_party/readability
- third_party/rnnoise
- third_party/rust
- third_party/ruy
- third_party/s2cellid
- third_party/search_engines_data
- third_party/securemessage
- third_party/selenium-atoms
- third_party/sentencepiece
- third_party/sentencepiece/src/third_party/darts_clone
- third_party/shell-encryption
- third_party/simdutf
- third_party/simplejson
- third_party/six
- third_party/skia
- third_party/skia/include/third_party/vulkan
- third_party/smhasher
- )
- use system-snappy || keeplibs+=(
- third_party/snappy
- )
- keeplibs+=(
- third_party/spirv-headers
- third_party/spirv-tools
- third_party/sqlite
- third_party/swiftshader
- third_party/swiftshader/third_party/astc-encoder
- third_party/swiftshader/third_party/llvm-subzero
- third_party/swiftshader/third_party/marl
- third_party/swiftshader/third_party/SPIRV-Headers/include/spirv
- third_party/swiftshader/third_party/SPIRV-Tools
- third_party/swiftshader/third_party/subzero
- third_party/tensorflow_models
- third_party/tensorflow-text
- third_party/tflite
- third_party/tflite/src/third_party/fft2d
- third_party/tflite/src/third_party/xla/third_party/tsl
- third_party/tflite/src/third_party/xla/xla/tsl/framework
- third_party/tflite/src/third_party/xla/xla/tsl/lib/random
- third_party/tflite/src/third_party/xla/xla/tsl/platform
- third_party/tflite/src/third_party/xla/xla/tsl/protobuf
- third_party/tflite/src/third_party/xla/xla/tsl/util
- third_party/ukey2
- third_party/utf
- third_party/vulkan
- third_party/wayland
- third_party/webdriver
- third_party/webgpu-cts
- third_party/webrtc
- third_party/webrtc/common_audio/third_party/ooura
- third_party/webrtc/common_audio/third_party/spl_sqrt_floor
- third_party/webrtc/modules/third_party/fft
- third_party/webrtc/modules/third_party/g711
- third_party/webrtc/modules/third_party/g722
- third_party/widevine
- )
- use system-woff2 || keeplibs+=(
- third_party/woff2
- )
- keeplibs+=(
- third_party/wuffs
- third_party/x11proto
- third_party/xcbproto
- third_party/xnnpack
- third_party/zlib/google
- third_party/zxcvbn-cpp
- url/third_party/mozilla
- v8/third_party/glibc
- v8/third_party/inspector_protocol
- v8/third_party/rapidhash-v8
- v8/third_party/siphash
- v8/third_party/utf8-decoder
- v8/third_party/v8
- v8/third_party/valgrind
-
- # gyp -> gn leftovers
- third_party/speech-dispatcher
- third_party/usb_ids
- )
-
- if use test; then
- keeplibs+=(
- third_party/breakpad/breakpad/src/processor
- third_party/fuzztest
- third_party/google_benchmark/src/include/benchmark
- third_party/google_benchmark/src/src
- third_party/test_fonts
- third_party/test_fonts/fontconfig
- third_party/test_fonts/test_fonts
- )
- fi
-
- # USE=system-*
- if ! use system-harfbuzz; then
- keeplibs+=( third_party/harfbuzz )
- fi
-
- if ! use system-ffmpeg; then
- keeplibs+=( third_party/ffmpeg third_party/opus )
- fi
-
- if ! use system-icu; then
- keeplibs+=( third_party/icu )
- fi
-
- if ! use system-zstd; then
- keeplibs+=( third_party/zstd )
- fi
-
- if ! use system-av1; then
- keeplibs+=(
- third_party/dav1d
- third_party/libaom
- third_party/libaom/source/libaom/third_party/fastfeat
- third_party/libaom/source/libaom/third_party/vector
- third_party/libaom/source/libaom/third_party/x86inc
- )
- fi
-
- if use libcxx; then
- keeplibs+=(
- third_party/libc++
- third_party/llvm-libc
- )
- fi
-
- if ! use system-openh264; then
- keeplibs+=( third_party/openh264 )
- fi
-
- if ! use system-re2; then
- keeplibs+=( third_party/re2 )
- fi
-
- # Arch-specific
- if use arm64 || use ppc64 ; then
- keeplibs+=( third_party/swiftshader/third_party/llvm-10.0 )
- fi
- # we need to generate ppc64 stuff because upstream does not ship it yet
- # it has to be done before unbundling.
- if use ppc64; then
- pushd third_party/libvpx >/dev/null || die
- mkdir -p source/config/linux/ppc64 || die
- # requires git and clang, bug #832803
- # Revert https://chromium.googlesource.com/chromium/src/+/b463d0f40b08b4e896e7f458d89ae58ce2a27165%5E%21/third_party/libvpx/generate_gni.sh
- # and https://chromium.googlesource.com/chromium/src/+/71ebcbce867dd31da5f8b405a28fcb0de0657d91%5E%21/third_party/libvpx/generate_gni.sh
- # since we're not in a git repo
- sed -i -e "s|^update_readme||g; s|clang-format|${EPREFIX}/bin/true|g; /^git -C/d; /git cl/d; /cd \$BASE_DIR\/\$LIBVPX_SRC_DIR/ign format --in-place \$BASE_DIR\/BUILD.gn\ngn format --in-place \$BASE_DIR\/libvpx_srcs.gni" \
- generate_gni.sh || die
- ./generate_gni.sh || die
- popd >/dev/null || die
-
- pushd third_party/ffmpeg >/dev/null || die
- cp libavcodec/ppc/h264dsp.c libavcodec/ppc/h264dsp_ppc.c || die
- cp libavcodec/ppc/h264qpel.c libavcodec/ppc/h264qpel_ppc.c || die
- popd >/dev/null || die
- fi
-
- # Sanity check keeplibs, on major version bumps it is often necessary to update this list
- # and this enables us to hit them all at once.
- # There are some entries that need to be whitelisted (TODO: Why? The file is understandable, the rest seem odd)
- whitelist_libs=(
- net/third_party/quic
- third_party/devtools-frontend/src/front_end/third_party/additional_readme_paths.json
- third_party/libjingle
- third_party/mesa
- third_party/skia/third_party/vulkan
- third_party/vulkan
- )
- local not_found_libs=()
- for lib in "${keeplibs[@]}"; do
- if [[ ! -d "${lib}" ]] && ! has "${lib}" "${whitelist_libs[@]}"; then
- not_found_libs+=( "${lib}" )
- fi
- done
-
- if [[ ${#not_found_libs[@]} -gt 0 ]]; then
- ewarn "The following \`keeplibs\` directories were not found in the source tree:"
- for lib in "${not_found_libs[@]}"; do
- ewarn " ${lib}"
- done
- fi
-
- keeplibs+=( third_party/ungoogled )
-
- # Remove most bundled libraries. Some are still needed.
- einfo "Unbundling third-party libraries ..."
- build/linux/unbundle/remove_bundled_libraries.py "${keeplibs[@]}" --do-remove || die
-
- # Interferes with our bundled clang path; we don't want stripped binaries anyway.
- sed -i -e 's|${clang_base_path}/bin/llvm-strip|/bin/true|g' \
- -e 's|${clang_base_path}/bin/llvm-objcopy|/bin/true|g' \
- build/linux/strip_binary.gni || die
-}
-
-src_configure() {
- # Calling this here supports resumption via FEATURES=keepwork
- python_setup
-
- # Bug 491582.
- export TMPDIR="${WORKDIR}/temp"
- mkdir -p -m 755 "${TMPDIR}" || die
-
- # https://bugs.gentoo.org/654216
- addpredict /dev/dri/ #nowarn
-
- # Use system-provided libraries.
- # TODO: freetype -- remove sources (https://bugs.chromium.org/p/pdfium/issues/detail?id=733).
- # TODO: use_system_hunspell (upstream changes needed).
- # TODO: use_system_protobuf (bug #525560).
- # TODO: use_system_sqlite (http://crbug.com/22208).
-
- # libevent: https://bugs.gentoo.org/593458
- local gn_system_libraries=(
- flac
- fontconfig
- freetype
- libjpeg
- libwebp
- libxml
- libxslt
- zlib
- )
- if use system-abseil-cpp; then
- gn_system_libraries+=(
- absl_algorithm
- absl_base
- absl_cleanup
- absl_container
- absl_crc
- absl_debugging
- absl_flags
- absl_functional
- absl_hash
- absl_log
- absl_log_internal
- absl_memory
- absl_meta
- absl_numeric
- absl_random
- absl_status
- absl_strings
- absl_synchronization
- absl_time
- absl_types
- absl_utility
- )
- fi
- if use system-brotli; then
- gn_system_libraries+=( brotli )
- fi
- if use system-crc32c; then
- gn_system_libraries+=( crc32c )
- fi
- if use system-double-conversion; then
- gn_system_libraries+=( double-conversion )
- fi
- if use system-woff2; then
- gn_system_libraries+=( woff2 )
- fi
- if use nvidia; then
- gn_system_libraries+=( libXNVCtrl )
- fi
- if use system-ffmpeg; then
- gn_system_libraries+=( ffmpeg opus )
- fi
- if use system-jsoncpp; then
- gn_system_libraries+=( jsoncpp )
- fi
- if use system-icu; then
- gn_system_libraries+=( icu )
- fi
- if use system-zstd; then
- gn_system_libraries+=( zstd )
- fi
- if use system-av1; then
- gn_system_libraries+=( dav1d libaom )
- fi
- if use system-libusb; then
- gn_system_libraries+=( libusb )
- fi
- if use system-libvpx; then
- gn_system_libraries+=( libvpx )
- fi
- use system-openh264 && gn_system_libraries+=(
- openh264
- )
- use system-re2 && gn_system_libraries+=(
- re2
- )
- use system-snappy && gn_system_libraries+=(
- snappy
- )
-
- build/linux/unbundle/replace_gn_files.py --system-libraries "${gn_system_libraries[@]}" ||
- die "Failed to replace GN files for system libraries"
-
- # TODO 131: The above call clobbers `enable_freetype = true` in the freetype gni file
- # drop the last line, then append the freetype line and a new curly brace to end the block
- local freetype_gni="build/config/freetype/freetype.gni"
- sed -i -e '$d' ${freetype_gni} || die
- echo " enable_freetype = true" >> ${freetype_gni} || die
- echo "}" >> ${freetype_gni} || die
-
- if use !custom-cflags; then
- replace-flags "-Os" "-O2"
- strip-flags
- # Debug info section overflows without component build
- # Prevent linker from running out of address space, bug #471810 .
- filter-flags "-g*"
- # 949123: Several multimedia components explicitly build with specific CFLAGS and
- # use runtime detection to enable optimisations; unfortunately any of our CFLAGS are suffixed
- # to the end of the command line, which causes build failures.
- use arm64 && filter-flags "-march*" "-mtune*" "-mcpu*"
- fi
-
- # We don't use the same clang version as upstream, and with -Werror
- # we need to make sure that we don't get superfluous warnings.
- append-flags -Wno-unknown-warning-option
- if tc-is-cross-compiler; then # can you cross-compile with the bundled toolchain?
- export BUILD_CXXFLAGS+=" -Wno-unknown-warning-option"
- export BUILD_CFLAGS+=" -Wno-unknown-warning-option"
- fi
-
- # Start building our GN options
- local myconf_gn=() # Tip: strings must be quoted, bools or numbers are fine
-
- if use !bundled-toolchain; then
- # We already forced the "correct" clang via pkg_setup
-
- if tc-is-cross-compiler; then
- CC="${CC} -target ${CHOST} --sysroot ${ESYSROOT}"
- CXX="${CXX} -target ${CHOST} --sysroot ${ESYSROOT}"
- BUILD_AR=${AR}
- BUILD_CC=${CC}
- BUILD_CXX=${CXX}
- BUILD_NM=${NM}
- fi
-
- # Make sure the build system will use the right tools, bug #340795.
- tc-export AR CC CXX NM
-
- strip-unsupported-flags
- append-ldflags -Wl,--undefined-version # https://bugs.gentoo.org/918897#c32
-
- myconf_gn+=(
- "is_clang=true"
- "clang_use_chrome_plugins=false"
- "use_clang_modules=false" # M141 enables this for the linux platform by default.
- "use_lld=true"
- 'custom_toolchain="//build/toolchain/linux/unbundle:default"'
- # From M127 we need to provide a location for libclang.
- # We patch this in for gentoo - see chromium-*-bindgen-custom-toolchain.patch
- # rust_bindgen_root = directory with `bin/bindgen` beneath it.
- # We don't need to set 'clang_base_path' for anything in our build
- # and it defaults to the google toolchain location. Instead provide a location
- # to where system clang lives so that bindgen can find system headers (e.g. stddef.h)
- "bindgen_libclang_path=\"$(get_llvm_prefix)/$(get_libdir)\""
- "clang_base_path=\"${EPREFIX}/usr/lib/clang/${LLVM_SLOT}/\""
- "rust_bindgen_root=\"${EPREFIX}/usr/\""
- "rust_sysroot_absolute=\"$(get_rust_prefix)\""
- "rustc_version=\"${RUST_SLOT}\""
- )
-
- if ! tc-is-cross-compiler; then
- myconf_gn+=( 'host_toolchain="//build/toolchain/linux/unbundle:default"' )
- else
- tc-export BUILD_{AR,CC,CXX,NM}
- myconf_gn+=(
- 'host_toolchain="//build/toolchain/linux/unbundle:host"'
- 'v8_snapshot_toolchain="//build/toolchain/linux/unbundle:host"'
- "host_pkg_config=\"$(tc-getBUILD_PKG_CONFIG)\""
- "pkg_config=\"$(tc-getPKG_CONFIG)\""
- )
-
- # setup cups-config, build system only uses --libs option
- if use cups; then
- mkdir "${T}/cups-config" || die
- cp "${ESYSROOT}/usr/bin/${CHOST}-cups-config" "${T}/cups-config/cups-config" || die
- export PATH="${PATH}:${T}/cups-config"
- fi
-
- # Don't inherit PKG_CONFIG_PATH from environment
- local -x PKG_CONFIG_PATH=
- fi
-
- fi # !bundled-toolchain
-
- local myarch
- myarch="$(tc-arch)"
- case ${myarch} in
- amd64)
- # Bug 530248, 544702, 546984, 853646.
- use !custom-cflags && filter-flags -mno-mmx -mno-sse2 -mno-ssse3 -mno-sse4.1 \
- -mno-avx -mno-avx2 -mno-fma -mno-fma4 -mno-xop -mno-sse4a
- myconf_gn+=( 'target_cpu="x64"' )
- ;;
- x86)
- # Bug 530248, 544702, 546984, 853646.
- use !custom-cflags && filter-flags -mno-mmx -mno-sse2 -mno-ssse3 -mno-sse4.1 \
- -mno-avx -mno-avx2 -mno-fma -mno-fma4 -mno-xop -mno-sse4a
- myconf_gn+=( 'target_cpu="x86"' )
- ;;
- arm64)
- myconf_gn+=( 'target_cpu="arm64"' )
- ;;
- ppc64)
- myconf_gn+=( 'target_cpu="ppc64"' )
- ;;
- *)
- die "Failed to determine target arch, got '${myarch}'."
- ;;
- esac
-
- # Common options
-
- myconf_gn+=(
- # Disable code formating of generated files
- "blink_enable_generated_code_formatting=false"
- # enable DCHECK with USE=debug only, increases chrome binary size by 30%, bug #811138.
- # DCHECK is fatal by default, make it configurable at runtime, #bug 807881.
- "dcheck_always_on=$(usex debug true false)"
- "dcheck_is_configurable=$(usex debug true false)"
- # Chromium builds provided by Linux distros should disable the testing config
- "disable_fieldtrial_testing_config=true"
- # Custom patch: Enable building Chromium as individual channels (e.g. stable, beta, dev) that
- # use different profile directories, desktop entries, etc. This enables slotting the ebuild.
- "enable_channel_branding=true"
- # 131 began laying the groundwork for replacing freetype with
- # "Rust-based Fontations set of libraries plus Skia path rendering"
- # We now need to opt-in
- "enable_freetype=true"
- "enable_hangout_services_extension=$(usex hangouts true false)"
- # Don't need nocompile checks and GN crashes with our config (verify with modern GN)
- "enable_nocompile_tests=false"
- # pseudolocales are only used for testing
- "enable_pseudolocales=false"
- "enable_widevine=$(usex widevine true false)"
- # Disable fatal linker warnings, bug 506268.
- "fatal_linker_warnings=false"
- # Component build isn't generally intended for use by end users. It's mostly useful
- # for development and debugging.
- "is_component_build=false"
- # GN needs explicit config for Debug/Release as opposed to inferring it from build directory.
- "is_debug=false"
- "is_official_build=$(usex official true false)"
- # Enable ozone wayland and/or headless support
- "ozone_auto_platforms=false"
- "ozone_platform_headless=true"
- # Enables building without non-free unRAR licence
- "safe_browsing_use_unrar=false"
- # "thin_lto_enable_optimizations=${use_lto}"
- "treat_warnings_as_errors=false"
- # Use in-tree libc++ (buildtools/third_party/libc++ and buildtools/third_party/libc++abi)
- # instead of the system C++ library for C++ standard library support.
- # default: true, but let's be explicit (forced since 120 ; USE removed 127).
- "use_custom_libcxx=true"
- # Enable ozone wayland and/or headless support
- "use_ozone=true"
- # The sysroot is the oldest debian image that chromium supports, we don't need it
- "use_sysroot=false"
- # See dependency logic in third_party/BUILD.gn
- "use_system_harfbuzz=$(usex system-harfbuzz true false)"
- # "use_thin_lto=${use_lto}"
- # Only enabled for clang, but gcc has endian macros too
- "v8_use_libm_trig_functions=true"
- )
-
- myconf_gn+=( "enable_iterator_debugging=$(usex debug true false)" )
-
- if use debug; then
- myconf_gn+=(
- "symbol_level=2"
- "blink_symbol_level=2"
- "v8_symbol_level=2"
- )
- else
- myconf_gn+=(
- "symbol_level=0"
- "blink_symbol_level=0"
- "v8_symbol_level=0"
- )
- fi
-
- if use bindist ; then
- myconf_gn+=(
- # If this is set to false Chromium won't be able to load any proprietary codecs
- # even if provided with an ffmpeg capable of h264/aac decoding
- "proprietary_codecs=true"
- 'ffmpeg_branding="Chrome"'
- # build ffmpeg as an external component (libffmpeg.so) that we can remove / substitute
- "is_component_ffmpeg=true"
- )
- else
- myconf_gn+=(
- "proprietary_codecs=$(usex proprietary-codecs true false)"
- "ffmpeg_branding=\"$(usex proprietary-codecs Chrome Chromium)\""
- )
- fi
-
- if use headless; then
- myconf_gn+=(
- "enable_print_preview=false"
- "enable_remoting=false"
- 'ozone_platform="headless"'
- "rtc_use_pipewire=false"
- "use_alsa=false"
- "use_cups=false"
- "use_gio=false"
- "use_glib=false"
- "use_gtk=false"
- "use_kerberos=false"
- "use_libpci=false"
- "use_pangocairo=false"
- "use_pulseaudio=false"
- "use_qt5=false"
- "use_qt6=false"
- "use_udev=false"
- "use_vaapi=false"
- "use_xkbcommon=false"
- )
- else
- myconf_gn+=(
- "gtk_version=$(usex gtk4 4 3)"
- # link pulseaudio directly (DT_NEEDED) instead of using dlopen.
- # helps with automated detection of ABI mismatches and prevents silent errors.
- "link_pulseaudio=$(usex pulseaudio true false)"
- "ozone_platform_wayland=$(usex wayland true false)"
- "ozone_platform_x11=$(usex X true false)"
- "ozone_platform=\"$(usex wayland wayland x11)\""
- "rtc_use_pipewire=$(usex screencast true false)"
- "use_cups=$(usex cups true false)"
- "use_kerberos=$(usex kerberos true false)"
- "use_pulseaudio=$(usex pulseaudio true false)"
- "use_qt5=false"
- "use_system_libffi=$(usex wayland true false)"
- "use_system_minigbm=true"
- "use_vaapi=$(usex vaapi true false)"
- "use_xkbcommon=true"
- )
- if use qt6; then
- local cbuild_libdir
- cbuild_libdir="$(get_libdir)"
- if tc-is-cross-compiler; then
- # Hack to workaround get_libdir not being able to handle CBUILD, bug #794181
- cbuild_libdir="$($(tc-getBUILD_PKG_CONFIG) --keep-system-libs --libs-only-L libxslt)"
- cbuild_libdir="${cbuild_libdir:2}"
- cbuild_libdir="${cbuild_libdir/% }"
- fi
- myconf_gn+=(
- "use_qt6=true"
- "moc_qt6_path=\"${EPREFIX}/usr/${cbuild_libdir}/qt6/libexec\""
- )
- else
- myconf_gn+=( "use_qt6=false" )
- fi
- fi
-
- # Explicitly disable ICU data file support for system-icu/headless builds.
- if use system-icu || use headless; then
- myconf_gn+=( "icu_use_data_file=false" )
- fi
-
- if use official; then
- # Allow building against system libraries in official builds
- sed -i 's/OFFICIAL_BUILD/GOOGLE_CHROME_BUILD/' \
- tools/generate_shim_headers/generate_shim_headers.py || die
- # Don't add symbols to build
- myconf_gn+=( "symbol_level=0" )
- fi
-
- if use pgo; then
- myconf_gn+=(
- "chrome_pgo_phase=2"
- "v8_enable_builtins_optimization=true"
- )
- else
- myconf_gn+=( "chrome_pgo_phase=0" )
- fi
-
- # Odds and ends
-
- # skipping typecheck is only supported on amd64, bug #876157
- if ! use amd64; then
- myconf_gn+=( "devtools_skip_typecheck=false" )
- fi
-
- # Disable external code space for V8 for ppc64. It is disabled for ppc64
- # by default, but cross-compiling on amd64 enables it again.
- if tc-is-cross-compiler && use ppc64; then
- myconf_gn+=( "v8_enable_external_code_space=false" )
- fi
-
- # This determines whether or not GN uses the bundled libcxx
- if use libcxx; then
- myconf_gn+=( "use_custom_libcxx=true" )
- else
- myconf_gn+=(
- "use_custom_libcxx=false"
- "use_llvm_libatomic=false"
- )
- append-cppflags -U_GLIBCXX_ASSERTIONS #See #318
- fi
-
- myconf_gn+=( "use_bluez=$(usex bluetooth true false)" )
-
- myconf_gn+=( "is_cfi=$(usex cfi true false)" )
-
- if use cfi; then
- myconf_gn+=(
- "use_cfi_icall=true"
- "use_cfi_cast=true"
- )
- fi
-
- myconf_gn+=(
- "optimize_webui=$(usex optimize-webui true false)"
- "use_system_freetype=$(usex system-harfbuzz true false)"
- "use_system_libopenjpeg2=$(usex system-openjpeg true false)"
- "enable_pdf=true"
- "use_system_lcms2=true"
- "enable_print_preview=true"
- "use_thin_lto=$(usex thinlto true false)"
- "thin_lto_enable_optimizations=$(usex optimize-thinlto true false)"
-
- # Ungoogled flags
- "build_with_tflite_lib=false"
- "enable_mdns=false"
- "enable_mse_mpeg2ts_stream_parser=$(usex proprietary-codecs true false)"
- "enable_remoting=false"
- "enable_reporting=false"
- "enable_service_discovery=false"
- "exclude_unwind_tables=true"
- "google_api_key=\"\""
- "google_default_client_id=\"\""
- "google_default_client_secret=\"\""
- "safe_browsing_mode=0"
- "use_official_google_api_keys=false"
- "use_unofficial_version_number=false"
-
- # "enable_swiftshader=false"
-
- # Additional flags
- # "perfetto_use_system_zlib=true"
- # "use_system_zlib=true"
- # "use_system_libjpeg=true"
- # "rtc_build_examples=false"
- # "enable_chromium_prelude=false"
- # "enable_updater=false"
- # "enable_update_notifications=false"
- # "enable_constraints=false"
- # "rtc_rusty_base64=false"
- # "v8_enable_temporal_support=false"
- # "media_use_symphonia=false"
- # "pdf_enable_rust_png=false"
- # "skia_use_libpng_encode=true"
- # "skia_use_libpng_decode=true"
- # "skia_use_rust_png_decode=false"
- # "skia_use_rust_png_encode=false"
- # "enable_jxl_decoder=false"
- )
-
- if use amd64 || use arm64; then
- myconf_gn+=(
- "v8_drumbrake_bounds_checks=true"
- "v8_enable_drumbrake=true"
- )
- fi
-
- if use thinlto; then
- # We need to change the default value of import-instr-limit in
- # LLVM to limit the text size increase. The default value is
- # 100, and we change it to 30 to reduce the text size increase
- # from 25% to 10%. The performance number of page_cycler is the
- # same on two of the thinLTO configurations, we got 1% slowdown
- # on speedometer when changing import-instr-limit from 100 to 30.
- # append-ldflags "-Wl,-plugin-opt,-import-instr-limit=30"
- sed -i '/import_instr_limit = 5/{s++import_instr_limit = 30+;h};${x;/./{x;q0};x;q1}' \
- build/config/compiler/BUILD.gn || die
-
- append-ldflags "-Wl,--thinlto-jobs=$(makeopts_jobs)"
- fi
-
- # Facilitate deterministic builds (taken from build/config/compiler/BUILD.gn)
- append-cflags -Wno-builtin-macro-redefined
- append-cxxflags -Wno-builtin-macro-redefined
- append-cppflags "-D__DATE__= -D__TIME__= -D__TIMESTAMP__="
-
- local flags
- einfo "Building with the following compiler settings:"
- for flags in C{C,XX} AR NM RANLIB {C,CXX,CPP,LD}FLAGS \
- EXTRA_GN UGC_{SKIP_{PATCHES,SUBSTITUTION},KEEP_BINARIES} ; do
- einfo " ${flags} = \"${!flags}\""
- done
-
- # Since we build from tarballs, we need to set the channel here so that it can be used in the build.
- export CHROME_VERSION_EXTRA="${SLOT}"
-
- einfo "Configuring Chromium ..."
- set -- gn gen --args="${myconf_gn[*]}${EXTRA_GN:+ ${EXTRA_GN}}" out/Release
- echo "$@"
- "$@" || die "Failed to configure Chromium"
-
- # The "if" below should not be executed unless testing
- if [ ! -z "${NODIE}" ]; then
- # List all args
- # gn args --list out/Release
-
- # Quick compiler check
- eninja -C out/Release protoc torque
- fi
-}
-
-src_compile() {
- # Final link uses lots of file descriptors.
- ulimit -n 2048
-
- # Calling this here supports resumption via FEATURES=keepwork
- python_setup
- # I hate doing this but upstream Rust have yet to come up with a better solution for
- # us poor packagers. Required for Split LTO units, which are required for CFI.
- export RUSTC_BOOTSTRAP=1
-
- # Don't inherit PYTHONPATH from environment, bug #789021, #812689
- local -x PYTHONPATH=
-
- # Build mksnapshot and pax-mark it.
- if use pax-kernel; then
- local x
- for x in mksnapshot v8_context_snapshot_generator code_cache_generator; do
- if tc-is-cross-compiler; then
- eninja -C out/Release "host/${x}"
- pax-mark m "out/Release/host/${x}"
- else
- eninja -C out/Release "${x}"
- pax-mark m "out/Release/${x}"
- fi
- done
- fi
-
- # Even though ninja autodetects number of CPUs, we respect
- # user's options, for debugging with -j 1 or any other reason.
- eninja -C out/Release chrome chrome_sandbox $(use test && echo "base_unittests")
-
- pax-mark m out/Release/chrome
-
- # This codepath does minimal patching, so we're at the mercy of upstream
- # CFLAGS. This is fine - we're not intending to force this on users
- # and we do a lot of flag 'management' anyway.
- if use bundled-toolchain; then
- QA_FLAGS_IGNORED="
- usr/lib64/chromium-browser/chrome
- usr/lib64/chromium-browser/chrome-sandbox
- usr/lib64/chromium-browser/chromedriver
- usr/lib64/chromium-browser/chrome_crashpad_handler
- usr/lib64/chromium-browser/libEGL.so
- usr/lib64/chromium-browser/libGLESv2.so
- usr/lib64/chromium-browser/libVkICD_mock_icd.so
- usr/lib64/chromium-browser/libVkLayer_khronos_validation.so
- usr/lib64/chromium-browser/libqt6_shim.so
- usr/lib64/chromium-browser/libvk_swiftshader.so
- usr/lib64/chromium-browser/libvulkan.so.1
- "
- fi
-
- use convert-dict && eninja -C out/Release convert_dict
-
- use enable-driver && eninja -C out/Release chromedriver
- #use suid && eninja -C out/Release chrome_sandbox
-
- use enable-driver && mv out/Release/chromedriver{.unstripped,}
-
- rm -f out/Release/locales/*.pak.info || die
-
- # Generate support files (desktop file, manpage, etc.) See: #684550 #706786 #968958
- ${EPYTHON} "${FILESDIR}/generate-support-files.py" \
- --installdir "/usr/$(get_libdir)/ungoogled-chromium-browser" \
- --channel "${SLOT}" ||
- die "Failed to generate support files"
-}
-
-src_test() {
- # Tests may be flaky with usersandbox, and the test runner executes significantly faster without.
- # If you seem to be excluding too many tests for a particular milestone: comment them out, reboot, and
- # run the tests again. If that doesn't help, try FEATURES="-usersandbox" and send it because obviously the
- # chromium gods are not smiling upon you today. Do some runtime testing, obvs.
- local skip_tests=(
- # Wildcard exclusions (if all tests in a test suite are broken)
- 'AlternateTestParams/PartitionAllocDeathTest.RepeatedAllocReturnNullDirect/*'
- 'AlternateTestParams/PartitionAllocDeathTest.RepeatedReallocReturnNullDirect/*'
- 'AlternateTestParams/PartitionAllocTest.*' # 200+ tests, >= 1 crashes entire test runner with usersandbox.
- 'CheckExitCodeAfterSignalHandlerDeathTest.*'
- 'CriticalProcessAndThreadSpotChecks/HangWatcherAnyCriticalThreadTests.*'
- 'LazyThreadPoolTaskRunnerEnvironmentTest.*' # M142
- 'ToolsSanityTest.BadVirtualCall*'
- # requires en-us locale
- SysStrings.SysNativeMBAndWide
- SysStrings.SysNativeMBToWide
- SysStrings.SysWideToNativeMB
- # Specific test cases
- CancelableEventTest.BothCancelFailureAndSucceedOccurUnderContention
- FilePathTest.FromUTF8Unsafe_And_AsUTF8Unsafe
- HistogramTesterTest.PumaTestUniqueSample
- PathServiceTest.CheckedGetFailure
- PlatformThreadTest.CanChangeThreadType
- RawPtrTest.SetLookupUsesGetForComparison # M146 ; also broken for alpine in M144.
- RustLogIntegrationTest.CheckAllSeverity
- StackCanary.ChangingStackCanaryCrashesOnReturn
- StackTraceDeathTest.StackDumpSignalHandlerIsMallocFree
- TestLauncherTools.TruncateSnippetFocusedMatchesFatalMessagesTest
- ThreadPoolEnvironmentConfig.CanUseBackgroundPriorityForWorker
- # M148 Beta
- RunUntilTestWithMockTime.ConditionOnlyObservedIfWorkIsDone
- )
- local test_filter="-$(IFS=:; printf '%s' "${skip_tests[*]}")"
- # test-launcher-bot-mode enables parallelism and plain output
- # Check individual tests with --gtest_filter=<test you want> --single-process-tests
- ./out/Release/base_unittests --test-launcher-bot-mode \
- --test-launcher-jobs="$(get_makeopts_jobs)" \
- --gtest_filter="${test_filter}" || die "Tests failed!"
-}
-
-src_install() {
- local browser_suffix
- if [[ "${SLOT}" != "stable" ]]; then
- browser_suffix="-${SLOT}"
- else
- browser_suffix=""
- fi
- local CHROMIUM_HOME="/usr/$(get_libdir)/ungoogled-chromium-browser${browser_suffix}"
- exeinto "${CHROMIUM_HOME}"
- doexe out/Release/chrome
-
- #newexe out/Release/chrome_sandbox chrome-sandbox
- #fperms 4755 "${CHROMIUM_HOME}/chrome-sandbox"
-
- use enable-driver && doexe out/Release/chromedriver
-
- #* https://github.com/ungoogled-software/ungoogled-chromium/pull/3563
- doexe out/Release/chrome_crashpad_handler
-
- if use convert-dict; then
- newexe "${FILESDIR}/update-dicts.sh" update-dicts.sh
- doexe out/Release/convert_dict
- fi
-
- ozone_auto_session () {
- use X && use wayland && ! use headless && echo true || echo false
- }
-
- cat <<- EOF > "${D}${CHROMIUM_HOME}/chromium-launcher.sh" || die
- #!/bin/bash
- # Wrapper to launch slotted Chromium via the chromium-common launcher script.
- export CHROME_DESKTOP="ungoogled-chromium-browser${browser_suffix}.desktop"
- export CHROME_EXEC_NAME="ungoogled-chromium-browser${browser_suffix}"
- export CHROME_VERSION_EXTRA="${SLOT}"
- export CHROME_WRAPPER="\$(readlink -f "\$0")"
- export OZONE_AUTO_SESSION=$(ozone_auto_session)
-
- exec /usr/libexec/chromium/chromium-launcher.sh "\$@"
- EOF
-
- chmod 755 "${D}${CHROMIUM_HOME}/chromium-launcher.sh" || die
-
- # It is important that we name the target "chromium-browser",
- # xdg-utils expect it; bug #355517.
- dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/ungoogled-chromium-browser${browser_suffix}
- # keep the old symlink around for consistency
- dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/ungoogled-chromium${browser_suffix}
-
- use enable-driver && dosym "${CHROMIUM_HOME}/chromedriver" /usr/bin/ungoogled-chromedriver${browser_suffix}
-
- pushd out/Release/locales > /dev/null || die
- chromium_remove_language_paks
- popd > /dev/null || die
-
- insinto "${CHROMIUM_HOME}"
- doins out/Release/*.bin
- doins out/Release/*.pak
- doins -r out/Release/hyphen-data
-
- if use bindist; then
- # We built libffmpeg as a component library, but we can't distribute it
- # with proprietary codec support. Remove it and make a symlink to the requested
- # system library.
- rm -f out/Release/libffmpeg.so \
- || die "Failed to remove bundled libffmpeg.so (with proprietary codecs)"
- # symlink the libffmpeg.so from either ffmpeg-chromium or ffmpeg[chromium].
- einfo "Creating symlink to libffmpeg.so from $(usex ffmpeg-chromium ffmpeg-chromium ffmpeg[chromium])..."
- dosym ../chromium/libffmpeg.so$(usex ffmpeg-chromium .${PV%%\.*} "") \
- /usr/$(get_libdir)/ungoogled-chromium-browser/libffmpeg.so
- fi
-
- (
- shopt -s nullglob
- local files=(out/Release/*.so out/Release/*.so.[0-9])
- [[ ${#files[@]} -gt 0 ]] && doins "${files[@]}"
- )
-
- if ! use system-icu && ! use headless; then
- doins out/Release/icudtl.dat
- fi
-
- doins -r out/Release/locales
- #doins -r out/Release/MEIPreload
-
- # Install vk_swiftshader_icd.json; bug #827861
- doins out/Release/vk_swiftshader_icd.json
-
- if [[ -d out/Release/swiftshader ]]; then
- insinto "${CHROMIUM_HOME}/swiftshader"
- doins out/Release/swiftshader/*.so
- fi
-
- use widevine && dosym WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so "${CHROMIUM_HOME}/libwidevinecdm.so"
-
- # Install icons
- local branding size
- for size in 16 24 32 48 64 128 256 ; do
- case ${size} in
- 16|32) branding="chrome/app/theme/default_100_percent/chromium" ;;
- *) branding="chrome/app/theme/chromium" ;;
- esac
- newicon -s ${size} "${branding}/product_logo_${size}.png" \
- ungoogled-chromium-browser${browser_suffix}.png
- done
-
- # Install desktop entry
- domenu out/Release/ungoogled-chromium-browser${browser_suffix}.desktop
-
- # Install GNOME default application entry (bug #303100).
- insinto /usr/share/gnome-control-center/default-apps
- doins out/Release/ungoogled-chromium-browser${browser_suffix}.xml
-
- # Install AppStream metadata
- insinto /usr/share/appdata
- doins out/Release/ungoogled-chromium-browser${browser_suffix}.appdata.xml
-
- # Install manpage; bug #684550
- doman out/Release/ungoogled-chromium-browser${browser_suffix}.1
- dosym ungoogled-chromium-browser${browser_suffix}.1 /usr/share/man/man1/ungoogled-chromium${browser_suffix}.1
-
- readme.gentoo_create_doc
-}
-
-pkg_postrm() {
- xdg_icon_cache_update
- xdg_desktop_database_update
-}
-
-pkg_postinst() {
- xdg_icon_cache_update
- xdg_desktop_database_update
- readme.gentoo_print_elog
-
- if use !headless && [[ -z "${REPLACING_VERSIONS}" ]]; then
- if use vaapi; then
- elog "Hardware-accelerated video decoding configuration:"
- elog
- elog "Chromium supports multiple backends for hardware acceleration. To enable one,"
- elog " Add to CHROMIUM_FLAGS in /etc/chromium/default:"
- elog
- elog "1. VA-API with OpenGL (recommended for most users):"
- elog " --enable-features=AcceleratedVideoDecodeLinuxGL"
- elog " VaapiVideoDecoder may need to be added as well, but try without first."
- elog
- if use wayland; then
- elog "2. Enhanced Wayland/EGL performance:"
- elog " --enable-features=AcceleratedVideoDecodeLinuxGL,AcceleratedVideoDecodeLinuxZeroCopyGL"
- elog
- fi
- if use X; then
- elog "$(usex wayland "3" "2"). VA-API with Vulkan:"
- elog " --enable-features=VaapiVideoDecoder,VaapiIgnoreDriverChecks,Vulkan,DefaultANGLEVulkan,VulkanFromANGLE"
- elog
- if use wayland; then
- elog " NOTE: Vulkan acceleration requires X11 and will not work under Wayland sessions."
- elog " Use OpenGL-based acceleration instead when running under Wayland."
- elog
- fi
- fi
- elog "Additional options:"
- elog " To enable hardware-accelerated encoding (if supported)"
- elog " add 'AcceleratedVideoEncoder' to your feature list"
- elog " VaapiIgnoreDriverChecks bypasses driver compatibility checks"
- elog " (may be needed for newer/unsupported hardware)"
- elog
- else
- elog "This Chromium build was compiled without VA-API support, which provides"
- elog "hardware-accelerated video decoding."
- fi
- if use screencast; then
- elog "Screencast is disabled by default at runtime. Either enable it"
- elog "by navigating to chrome://flags/#enable-webrtc-pipewire-capturer"
- elog "inside Chromium or add --enable-features=WebRTCPipeWireCapturer"
- elog "to CHROMIUM_FLAGS in /etc/chromium/default."
- elog
- elog "Additional setup may be required for screencasting to work."
- elog "See issue: https://github.com/PF4Public/gentoo-overlay/issues/314"
- fi
- if use gtk4; then
- elog "Chromium prefers GTK3 over GTK4 at runtime. To override this"
- elog "behaviour you need to pass --gtk-version=4, e.g. by adding it"
- elog "to CHROMIUM_FLAGS in /etc/chromium/default."
- fi
- if use widevine; then
- elog "widevine requires binary plugins, which are distributed separately"
- elog "Make sure you have www-plugins/chrome-binary-plugins installed"
- fi
- fi
-
- if systemd_is_booted && ! [[ -f "/etc/machine-id" ]]; then
- ewarn "The lack of an '/etc/machine-id' file on this system booted with systemd"
- ewarn "indicates that the Gentoo handbook was not followed to completion."
- ewarn ""
- ewarn "Chromium is known to behave unpredictably with this system configuration;"
- ewarn "please complete the configuration of this system before logging any bugs."
- fi
-
- # Stable slot doesn't change profile directory, and it's vanishingly unlikely that users will downgrade from dev.
- if [[ -n "${REPLACING_VERSIONS}" ]]; then
- local replacing_non_slotted=false
- # there could be more than one PVR
- for version in ${REPLACING_VERSIONS}; do
- if ver_test "${version}" -le "145.0.7632.116"; then
- replacing_non_slotted=true
- break
- fi
- done
- if ${replacing_non_slotted}; then
- ewarn "This version of Chromium has replaced a non-slotted ebuild."
- if [[ ${SLOT} != "stable" ]]; then
- ewarn "This channel has its own profile directory, so your existing profile will not be used."
- ewarn "To use your existing profile, either copy or move it to the new location."
- ewarn "See https://wiki.gentoo.org/wiki/Chromium#Profile_Directories for more information."
- ewarn ""
- fi
- ewarn "Any existing Progressive Web Apps (PWAs) will need to be reinstalled,"
- ewarn "or have the path in the desktop files updated to point to the new wrapper script."
- fi
- fi
-}
-
-eapply_wrapper () {
- if [ ! -z "${NODIE}" ]; then
- nonfatal eapply "$@"
- else
- eapply "$@"
- fi
-}
-
-git_wrapper () {
- if [ ! -z "${NODIE}" ]; then
- git "$@"
- else
- git "$@" || die
- fi
-}
-
-filter_wrapper () {
- einfo "Applying ${i##*/}"
- #? fuzz factor of 3 is OK?
- if [ ! -z "${NODIE}" ]; then
- filterdiff -p1 "${@:2}" < "$1" | patch -F 3 -p1
- else
- filterdiff -p1 "${@:2}" < "$1" | patch -F 3 -p1 || die
- fi
-}
diff --git a/www-client/ungoogled-chromium/ungoogled-chromium-148.0.7778.215_p1.ebuild b/www-client/ungoogled-chromium/ungoogled-chromium-148.0.7778.215_p1.ebuild
deleted file mode 100644
index 9bc7b94501cc..000000000000
--- a/www-client/ungoogled-chromium/ungoogled-chromium-148.0.7778.215_p1.ebuild
+++ /dev/null
@@ -1,2512 +0,0 @@
-# Copyright 2009-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-# Use following environment variables to customise the build
-# EXTRA_GN — pass extra options to gn
-# NINJAOPTS="-k0 -j8" useful to populate ccache even if ebuild is still failing
-# UGC_SKIP_PATCHES — space-separated list of patches to skip
-# UGC_KEEP_BINARIES — space-separated list of binaries to keep
-# UGC_SKIP_SUBSTITUTION — space-separated list of files to skip domain substitution
-
-# USE=bundled-toolchain is intended for users who want to use the same toolchain
-# as the upstream releases. It's also a good fallback in case we fall behind
-# and need to get a release out quickly (less likely with `dev` in-tree).
-# We can't rely on it as a default since the toolchain is only shipped for x86-64;
-# other architectures will need to use system toolchain.
-
-# Since m133 we are using CI-generated tarballs from
-# https://github.com/chromium-linux-tarballs/chromium-tarballs/
-
-# These are bit-for-bit identical to the official releases, but are built
-# using an external CI system that we have some control over, in case
-# issues pop up again with official tarball generation.
-
-GN_MIN_VER=0.2354
-# chromium-tools/get-chromium-toolchain-strings.py (or just use Chromicler)
-# Node for M145+ should be 24.12.0 but that's not packaged in Gentoo yet. See #969145
-TEST_FONT="a28b222b79851716f8358d2800157d9ffe117b3545031ae51f69b7e1e1b9a969"
-BUNDLED_CLANG_VER="llvmorg-23-init-5669-g8a0be0bc-4"
-BUNDLED_RUST_VER="6f54d591c3116ee7f8ce9321ddeca286810cc142-7"
-RUST_SHORT_HASH=${BUNDLED_RUST_VER:0:10}-${BUNDLED_RUST_VER##*-}
-NODE_VER="24.12.0"
-ESBUILD_VER="0.25.1"
-ROLLUP_VER="4.57.1" # currently manual.
-VIRTUALX_REQUIRED="pgo"
-
-#UGC_COMMIT_ID="7c07c452ea3374a68e3a0b3f059e93464d7fc4a2"
-# UGC_PR_COMMITS=(
-# c917e096342e5b90eeea91ab1f8516447c8756cf
-# 5794e9d12bf82620d5f24505798fecb45ca5a22d
-# )
-
-CROMITE_COMMIT_ID="cb3baf14f52eb4365d017f640f85310735c19b79"
-
-#declare -A CHROMIUM_COMMITS=(
-# ["fcfb1a42813f1e9d8babedc7bb2e0f06101a3151"]="." #148+
-# ["-acb47d9a6b56c4889a2ed4216e9968cfc740086c"]="."
-# # ["-37c28a19804e47a68eabf3cf882a310689fc325b"]="." #disable style check for cromite
-# # ["cd5a0df905a28faa89ff2a4ab44f893f84dc4487"]="net/third_party/quiche/src"
-#)
-
-CHROMIUM_LANGS="af am ar as az be bg bn bs ca cs cy da de el en-GB es es-419 et eu fa fi fil
- fr fr-CA gl gu he hi hr hu hy id is it ja ka kk km kn ko ky lo lt lv mk ml mn mr ms my
- nb ne nl or pa pl pt-BR pt-PT ro ru si sk sl sq sr sr-Latn sv sw ta te th tr uk ur uz
- vi zh-CN zh-HK zh-TW zu"
-
-LLVM_COMPAT=( 21 22 23 )
-PYTHON_COMPAT=( python3_{13..14} )
-PYTHON_REQ_USE="xml(+)"
-RUST_MIN_VER=1.91.0
-RUST_NEEDS_LLVM="yes please"
-RUST_OPTIONAL="yes" # Not actually optional, but we don't need system Rust (or LLVM) with USE=bundled-toolchain
-RUST_REQ_USE="rustfmt" # Upstream run rustfmt on bindgen output, so we need it to be available.
-
-inherit check-reqs chromium-2 desktop flag-o-matic llvm-r1 multiprocessing ninja-utils pax-utils
-inherit python-any-r1 readme.gentoo-r1 rust systemd toolchain-funcs xdg-utils
-
-DESCRIPTION="Modifications to Chromium for removing Google integration and enhancing privacy"
-HOMEPAGE="https://github.com/ungoogled-software/ungoogled-chromium"
-PPC64_HASH="a85b64f07b489b8c6fdb13ecf79c16c56c560fc6"
-PATCH_V="${PV%%\.*}-3"
-COPIUM_COMMIT="fe1caafa06f27542c18a881348f78e984e2d9fe2"
-SRC_URI="https://github.com/chromium-linux-tarballs/chromium-tarballs/releases/download/${PV/_*}/chromium-${PV/_*}-linux.tar.xz
- https://deps.gentoo.zip/www-client/chromium/rollup-wasm-node-${ROLLUP_VER}.tgz
- https://gitlab.com/Matt.Jolly/chromium-patches/-/archive/${PATCH_V}/chromium-patches-${PATCH_V}.tar.bz2
- !bundled-toolchain? (
- https://codeberg.org/selfisekai/copium/archive/${COPIUM_COMMIT}.tar.gz
- -> chromium-patches-copium-${COPIUM_COMMIT:0:10}.tar.gz
- )
- bundled-toolchain? (
- https://commondatastorage.googleapis.com/chromium-browser-clang/Linux_x64/clang-${BUNDLED_CLANG_VER}.tar.xz
- -> chromium-clang-${BUNDLED_CLANG_VER}.tar.xz
- https://commondatastorage.googleapis.com/chromium-browser-clang/Linux_x64/rust-toolchain-${BUNDLED_RUST_VER}-${BUNDLED_CLANG_VER%-*}.tar.xz
- -> chromium-rust-toolchain-${RUST_SHORT_HASH}-${BUNDLED_CLANG_VER%-*}.tar.xz
- )
- test? (
- https://chromium-fonts.storage.googleapis.com/${TEST_FONT} -> chromium-testfonts-${TEST_FONT:0:10}.tar.gz
- )
- ppc64? (
- https://gitlab.raptorengineering.com/raptor-engineering-public/chromium/openpower-patches/-/archive/${PPC64_HASH}/openpower-patches-${PPC64_HASH}.tar.bz2 -> chromium-openpower-${PPC64_HASH:0:10}.tar.bz2
- )
-"
-
-# Gentoo tarball:
-# https://chromium-tarballs.distfiles.gentoo.org/chromium-${PV/_*}.tar.xz -> chromium-${PV/_*}-gentoo.tar.xz
-
-# chromium-linux-tarballs
-# https://github.com/chromium-linux-tarballs/chromium-tarballs/releases/download/${PV/_*}/chromium-${PV/_*}-linux.tar.xz
-
-# Official tarball:
-# https://commondatastorage.googleapis.com/chromium-browser-official/chromium-${PV/_*}${LITE_TARBALL:+-lite}.tar.xz
-
-# https://gitweb.gentoo.org/proj/chromium-tools.git/tree/get-chromium-licences.py @ 145.0.7632.76
-LICENSE="Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD BSD-2 Base64 Boost-1.0 CC-BY-3.0 CC-BY-4.0 Clear-BSD FFT2D FTL"
-LICENSE+=" IJG ISC LGPL-2 LGPL-2.1 MIT MPL-1.1 MPL-2.0 Ms-PL PSF-2 SGI-B-2.0 SSLeay SunSoft Unicode-3.0"
-LICENSE+=" Unicode-DFS-2015 Unlicense UoI-NCSA ZLIB libtiff openssl"
-LICENSE+=" cromite? ( GPL-3 )"
-
-SLOT="stable"
-KEYWORDS="amd64 ~arm64 ~ppc64 ~x86"
-
-IUSE_SYSTEM_LIBS="abseil-cpp av1 brotli crc32c double-conversion ffmpeg +harfbuzz icu jsoncpp +libusb libvpx +openh264 openjpeg re2 snappy woff2 +zstd"
-IUSE="+X bindist bluetooth bundled-toolchain cfi convert-dict cups custom-cflags debug ffmpeg-chromium enable-driver gtk4 hangouts headless kerberos +libcxx nvidia +official optimize-thinlto optimize-webui override-data-dir pax-kernel pgo"
-IUSE+=" +proprietary-codecs pulseaudio qt6 screencast selinux test thinlto cromite vaapi wayland widevine cpu_flags_ppc_vsx3"
-RESTRICT="
- !bindist? ( bindist )
- !test? ( test )
- arm64? ( test )
- !system-ffmpeg? ( proprietary-codecs? ( bindist ) )
- !system-openh264? ( bindist )
- cromite? ( bindist )
-"
-
-REQUIRED_USE="
- !headless? ( || ( X wayland ) )
- screencast? ( wayland )
- ffmpeg-chromium? ( bindist proprietary-codecs )
- optimize-thinlto? ( thinlto )
- cfi? ( thinlto )
- x86? ( !thinlto !widevine )
- debug? ( !official )
- vaapi? ( !system-av1 !system-libvpx )
-"
-
-UGC_PV="${PV/_p/-}"
-UGC_PF="${PN}-${UGC_PV}"
-UGC_URL="https://github.com/ungoogled-software/${PN}/archive/"
-
-if [ -z "$UGC_COMMIT_ID" ]; then
- UGC_URL="${UGC_URL}${UGC_PV}.tar.gz -> ${UGC_PF}.tar.gz"
- UGC_WD="${WORKDIR}/${UGC_PF}"
-else
- UGC_URL="${UGC_URL}${UGC_COMMIT_ID}.tar.gz -> ${PN}-${UGC_COMMIT_ID}.tar.gz"
- UGC_WD="${WORKDIR}/ungoogled-chromium-${UGC_COMMIT_ID}"
-fi
-
-SRC_URI+="${UGC_URL}
-"
-
-if [ ! -z "${UGC_PR_COMMITS[*]}" ]; then
- for i in "${UGC_PR_COMMITS[@]}"; do
- SRC_URI+="https://github.com/ungoogled-software/${PN}/commit/$i.patch?full_index=true -> ${PN}-$i.patch
- "
- done
-fi
-
-if [ ! -z "${CHROMIUM_COMMITS[*]}" ]; then
- # for i in "${CHROMIUM_COMMITS[@]}"; do
- for i in "${!CHROMIUM_COMMITS[@]}"; do
- if [[ ${CHROMIUM_COMMITS[$i]} =~ webrtc ]]; then
- #TODO: is it safe to use this mirror?
- SRC_URI+="https://github.com/webrtc-mirror/webrtc/commit/${i/-}.patch?full_index=true -> webrtc-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ angle ]]; then
- SRC_URI+="https://github.com/google/angle/commit/${i/-}.patch?full_index=true -> angle-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ quiche ]]; then
- SRC_URI+="https://github.com/google/quiche/commit/${i/-}.patch?full_index=true -> quiche-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ dawn ]]; then
- SRC_URI+="https://github.com/google/dawn/commit/${i/-}.patch?full_index=true -> dawn-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ perfetto ]]; then
- SRC_URI+="https://github.com/google/perfetto/commit/${i/-}.patch?full_index=true -> perfetto-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ink ]]; then
- SRC_URI+="https://github.com/google/ink/commit/${i/-}.patch?full_index=true -> ink-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ vulkan-utility-libraries ]]; then
- SRC_URI+="https://github.com/KhronosGroup/Vulkan-Utility-Libraries/commit/${i/-}.patch?full_index=true -> vulkan-utility-libraries-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ruy ]]; then
- SRC_URI+="https://github.com/google/ruy/commit/${i/-}.patch?full_index=true -> ruy-${i/-}.patch
- "
- else
- SRC_URI+="https://github.com/chromium/chromium/commit/${i/-}.patch?full_index=true -> chromium-${i/-}.patch
- "
- fi
- done
-fi
-
-SRC_URI+="cromite? ( https://github.com/uazo/cromite/archive/${CROMITE_COMMIT_ID}.tar.gz -> cromite-${CROMITE_COMMIT_ID}.tar.gz )
-"
-
-for i in ${IUSE_SYSTEM_LIBS}; do
- [[ $i =~ ^(\+)?(.*)$ ]]
- IUSE+=" ${BASH_REMATCH[1]}system-${BASH_REMATCH[2]}"
-done
-
-COMMON_X_DEPEND="
- x11-libs/libXcomposite:=
- x11-libs/libXcursor:=
- x11-libs/libXdamage:=
- x11-libs/libXfixes:=
- >=x11-libs/libXi-1.6.0:=
- x11-libs/libXrandr:=
- x11-libs/libXrender:=
- x11-libs/libXtst:=
- x11-libs/libxshmfence:=
-"
-
-# sys-libs/zlib: https://bugs.gentoo.org/930365; -ng is not compatible.
-# We _could_ use the bundled minizip, but that's against policy.
-COMMON_SNAPSHOT_DEPEND="
- system-icu? ( >=dev-libs/icu-78:= )
- system-abseil-cpp? ( >=dev-cpp/abseil-cpp-20260107.0 )
- system-brotli? ( >=app-arch/brotli-9999 )
- system-crc32c? ( dev-libs/crc32c )
- system-double-conversion? ( dev-libs/double-conversion )
- system-woff2? ( media-libs/woff2 )
- system-snappy? ( app-arch/snappy )
- system-jsoncpp? ( dev-libs/jsoncpp )
- system-openjpeg? ( media-libs/openjpeg:2= )
- system-re2? ( >=dev-libs/re2-0.2019.08.01:= )
- system-libvpx? ( >=media-libs/libvpx-1.13.0:=[postproc] )
- system-libusb? ( virtual/libusb:1 )
- cromite? ( dev-util/patchutils )
- >=dev-libs/libxml2-2.12.4:=[icu]
- dev-libs/nspr:=
- >=dev-libs/nss-3.26:=
- dev-libs/libxslt:=
- media-libs/fontconfig:=
- >=media-libs/freetype-2.11.0-r1:=
- system-harfbuzz? ( >=media-libs/harfbuzz-3:0=[icu(-)] )
- media-libs/libjpeg-turbo:=
- media-libs/libpng:=
- system-zstd? ( >=app-arch/zstd-1.5.5:= )
- >=media-libs/libwebp-0.4.0:=
- media-libs/mesa:=[gbm(+)]
- >=media-libs/openh264-1.6.0:=
- system-av1? (
- >=media-libs/dav1d-1.0.0:=
- >=media-libs/libaom-3.7.0:=
- )
- sys-libs/zlib:=
- !headless? (
- dev-libs/glib:2
- >=media-libs/alsa-lib-1.0.19:=
- pulseaudio? (
- || (
- media-libs/libpulse
- >=media-sound/apulse-0.1.9
- )
- )
- sys-apps/pciutils:=
- kerberos? ( virtual/krb5 )
- vaapi? ( >=media-libs/libva-2.7:=[X?,wayland?] )
- X? (
- x11-base/xorg-proto:=
- x11-libs/libX11:=
- x11-libs/libxcb:=
- x11-libs/libXext:=
- )
- x11-libs/libxkbcommon:=
- wayland? (
- dev-libs/libffi:=
- dev-libs/wayland:=
- screencast? (
- media-video/pipewire:=
- || (
- sys-apps/xdg-desktop-portal-gnome
- sys-apps/xdg-desktop-portal-gtk
- kde-plasma/xdg-desktop-portal-kde
- gui-libs/xdg-desktop-portal-lxqt
- gui-libs/xdg-desktop-portal-wlr
- )
- )
- )
- )
-"
-
-COMMON_DEPEND="
- ${COMMON_SNAPSHOT_DEPEND}
- app-arch/bzip2:=
- dev-libs/expat:=
- system-ffmpeg? (
- >=media-video/ffmpeg-6.1:=
- >=media-libs/opus-1.3.1:=
- )
- net-misc/curl[ssl]
- sys-apps/dbus:=
- media-libs/flac:=
- sys-libs/zlib:=[minizip]
- !headless? (
- >=app-accessibility/at-spi2-core-2.46.0:2
- media-libs/mesa:=[X?,wayland?]
- virtual/udev
- x11-libs/cairo:=
- x11-libs/gdk-pixbuf:2
- x11-libs/pango:=
- cups? ( >=net-print/cups-1.3.11:= )
- qt6? ( dev-qt/qtbase:6[gui,widgets] )
- X? ( ${COMMON_X_DEPEND} )
- )
-"
-RDEPEND="${COMMON_DEPEND}
- !www-client/ungoogled-chromium:0
- >=www-client/chromium-common-2
- !headless? (
- || (
- x11-libs/gtk+:3[X?,wayland?]
- gui-libs/gtk:4[X?,wayland?]
- )
- qt6? ( dev-qt/qtbase:6[X?,wayland?] )
- )
- virtual/ttf-fonts
- selinux? ( sec-policy/selinux-chromium )
- bindist? (
- ffmpeg-chromium? ( media-video/ffmpeg-chromium:${PV%%\.*} )
- )
- !override-data-dir? (
- !www-client/chromium:${SLOT}
- !www-client/cromite:${SLOT}[-override-data-dir]
- )
-"
-
-DEPEND="${COMMON_DEPEND}
- !headless? (
- gtk4? ( gui-libs/gtk:4[X?,wayland?] )
- !gtk4? ( x11-libs/gtk+:3[X?,wayland?] )
- )
-"
-
- # pgo? ( >=llvm-core/clang-22.0.0_pre20260106 >=llvm-core/lld-22.0.0_pre20260106 )
-BDEPEND="
- ${COMMON_SNAPSHOT_DEPEND}
- ${PYTHON_DEPS}
- $(python_gen_any_dep '
- dev-python/setuptools[${PYTHON_USEDEP}]
- ')
- >=app-arch/gzip-1.7
- !headless? (
- qt6? ( dev-qt/qtbase:6 )
- )
- !bundled-toolchain? ( $(llvm_gen_dep '
- llvm-core/clang:${LLVM_SLOT}
- llvm-core/llvm:${LLVM_SLOT}
- llvm-core/lld:${LLVM_SLOT}
- cfi? ( llvm-runtimes/clang-runtime:${LLVM_SLOT}[sanitize] )
- official? (
- !ppc64? ( llvm-runtimes/compiler-rt-sanitizers:${LLVM_SLOT}[cfi] )
- ) ')
- ${RUST_DEPEND}
- )
- >=dev-util/bindgen-0.72.1
- >=dev-build/gn-${GN_MIN_VER}
- app-alternatives/ninja
- dev-lang/perl
- >=dev-util/gperf-3.2
- dev-util/esbuild:${ESBUILD_VER}
- dev-vcs/git
- >=net-libs/nodejs-${NODE_VER}[inspector]
- sys-apps/hwdata
- >=sys-devel/bison-2.4.3
- sys-devel/flex
- virtual/pkgconfig
- x11-misc/xdg-utils
-"
-
-if ! has chromium_pkg_die ${EBUILD_DEATH_HOOKS}; then
- EBUILD_DEATH_HOOKS+=" chromium_pkg_die";
-fi
-
-DISABLE_AUTOFORMATTING="yes"
-DOC_CONTENTS="
-Some web pages may require additional fonts to display properly.
-Try installing some of the following packages if some characters
-are not displayed properly:
-- media-fonts/arphicfonts
-- media-fonts/droid
-- media-fonts/ipamonafont
-- media-fonts/noto
-- media-fonts/ja-ipafonts
-- media-fonts/takao-fonts
-- media-fonts/wqy-microhei
-- media-fonts/wqy-zenhei
-
-To fix broken icons on the Downloads page, you should install an icon
-theme that covers the appropriate MIME types, and configure this as your
-GTK+ icon theme.
-
-For native file dialogs in KDE, install kde-apps/kdialog.
-
-To make password storage work with your desktop environment you may
-have install one of the supported credentials management applications:
-- app-crypt/libsecret (GNOME)
-- kde-frameworks/kwallet (KDE)
-If you have one of above packages installed, but don't want to use
-them in Chromium, then add --password-store=basic to CHROMIUM_FLAGS
-in /etc/chromium/default.
-"
-
-S="${WORKDIR}/chromium-${PV/_*}"
-
-python_check_deps() {
- python_has_version "dev-python/setuptools[${PYTHON_USEDEP}]"
-}
-
-pre_build_checks() {
- # Check build requirements: bugs #471810, #541816, #914220
- # We're going to start doing maths here on the size of an unpacked source tarball,
- # this should make updates easier as chromium continues to balloon in size.
- # xz -l /var/cache/distfiles/chromium-${PV}*.tar.xz
- local base_disk=9 # Round up
- use test && base_disk=$((base_disk + 5))
- local extra_disk=1 # Always include a little extra space
- local memory=4
- tc-is-cross-compiler && extra_disk=$((extra_disk * 2))
- if tc-is-lto || use pgo; then
- memory=$((memory * 2 + 1))
- tc-is-cross-compiler && extra_disk=$((extra_disk * 2)) # Double the requirements
- use pgo && extra_disk=$((extra_disk + 4))
- fi
- if is-flagq '-g?(gdb)?([1-9])'; then
- if use custom-cflags; then
- extra_disk=$((extra_disk + 5))
- fi
- memory=$((memory * 2))
- fi
- local CHECKREQS_MEMORY="${memory}G"
- local CHECKREQS_DISK_BUILD="$((base_disk + extra_disk))G"
- check-reqs_${EBUILD_PHASE_FUNC}
-}
-
-pkg_pretend() {
- if [[ ${MERGE_TYPE} != binary ]]; then
- # The pre_build_checks are all about compilation resources, no need to run it for a binpkg
- pre_build_checks
- fi
-
- if use headless; then
- local headless_unused_flags=("cups" "kerberos" "pulseaudio" "qt6" "vaapi" "wayland")
- for myiuse in ${headless_unused_flags[@]}; do
- use ${myiuse} && ewarn "Ignoring USE=${myiuse}, USE=headless is set."
- done
- fi
-
- if ! use bindist && use ffmpeg-chromium; then
- ewarn "Ignoring USE=ffmpeg-chromium, USE=bindist is not set."
- fi
- if use libcxx; then
- ewarn
- ewarn "Building with libcxx, please be aware that system-*"
- ewarn "and some other c++ dependencies need to be compiled"
- ewarn "with the same c++ library as ungoogled-chromium itself"
- ewarn "dev-libs/jsoncpp is most problematic, see #58 #49 #119 for details"
- ewarn "Simplest solution would be to disable corresponding system-* flags"
- ewarn
- fi
- if use cfi; then
- ewarn
- ewarn "Building with cfi is only possible if building with -stdlib=libc++"
- ewarn "Make sure all dependencies are also built this way, see #40"
- ewarn
- fi
- if use cromite; then
- ewarn
- ewarn "Cromite patches are very experimental and unstable"
- ewarn "Please consider testing them and giving feedback upstream:"
- ewarn "https://github.com/uazo/cromite/issues"
- ewarn "Not all patches are applied, let me know if others should be considered too"
- ewarn
- fi
-}
-
-pkg_setup() {
- if [[ ${MERGE_TYPE} != binary ]]; then
- # The pre_build_checks are all about compilation resources, no need to run it for a binpkg
- pre_build_checks
-
- # We haven't massaged any CFLAGS yet, so we want to do this before we force CC/CXX to prevent warnings.
- local want_lto="false"
- tc-is-lto && want_lto="true"
-
- # The linux:unbundle toolchain in GN grabs CC, CXX, CPP (etc) from the environment
- # We'll set these to clang here then use llvm-utils functions to very explicitly set these
- # to a sane value.
- # This is effectively the 'force-clang' path if GCC support is re-added.
- if use !bundled-toolchain; then
- llvm-r1_pkg_setup
- rust_pkg_setup
-
- # Forcing clang; respect llvm_slot_x to enable selection of impl via LLVM_COMPAT
- AR=llvm-ar
- CPP="${CHOST}-clang++-${LLVM_SLOT} -E"
- NM=llvm-nm
- CC="${CHOST}-clang-${LLVM_SLOT}"
- CXX="${CHOST}-clang++-${LLVM_SLOT}"
- fi
-
- use_lto="false"
- local lto_usable="true"
- if [[ "$want_lto" == "true" ]]; then
- if use arm64 && [[ "${LLVM_SLOT}" -lt 22 ]]; then
- einfo "LTO is broken with LLVM 21 on arm64, ignoring CFLAGS."
- lto_usable="false"
- else
- use_lto="true"
- fi
- # We can rely on GN to do this for us; without this builds
- # take significantly longer with LTO enabled.
- filter-lto
- fi
-
- if [[ "$use_lto" == "false" ]] && use official && [[ "$lto_usable" == "true" ]]; then
- einfo "USE=official selected and LTO not detected."
- einfo "It is _highly_ recommended that LTO be enabled for performance reasons"
- einfo "and to be consistent with the upstream \"official\" build optimisations."
- fi
-
- if [[ "$use_lto" == "false" ]] && use test; then
- die "Tests require CFI which requires LTO"
- fi
-
- export use_lto
-
- # 936858
- if tc-ld-is-mold; then
- eerror "Your toolchain is using the mold linker."
- eerror "This is not supported by Chromium."
- die "Please switch to a different linker."
- fi
-
- if tc-is-cross-compiler; then
- use pgo && die "The pgo USE flag cannot be used when cross-compiling"
- CPP="${CBUILD}-clang++-${LLVM_SLOT} -E"
- fi
-
- # Sanity checks for development convenience
- if ver_test $(gn --version || die) -lt ${GN_MIN_VER}; then
- die "dev-build/gn >= ${GN_MIN_VER} is required to build this Chromium"
- fi
-
- # Sometimes, when adding a new LLVM slot, devs (me) forget to install an appropriate lld.
- local lld_ver=$(ld.lld --version | awk '{split($2,a,"."); print a[1]}' || die "Failed to check lld version")
- if [[ ${lld_ver} -lt ${LLVM_SLOT} ]]; then
- die "Your lld version (${lld_ver}) is too old for the selected LLVM slot (${LLVM_SLOT}). Please install a newer lld or select an older LLVM slot."
- fi
- fi
-
- chromium_suid_sandbox_check_kernel_config
-}
-
-src_unpack() {
- # # Here be dragons!
- # local XCLD="--exclude=chromium-${PV/_*}/third_party/instrumented_libs \
- # --exclude=chromium-${PV/_*}/third_party/llvm \
- # --exclude=chromium-${PV/_*}/third_party/llvm-build \
- # --exclude=chromium-${PV/_*}/third_party/node/linux \
- # --exclude=chromium-${PV/_*}/third_party/rust-src \
- # --exclude=chromium-${PV/_*}/third_party/rust-toolchain \
- # --exclude=chromium-${PV/_*}/build/linux/debian_bullseye_i386-sysroot \
- # --exclude=chromium-${PV/_*}/build/linux/debian_bullseye_amd64-sysroot \
- # --exclude=chromium-${PV/_*}/third_party/angle/third_party/VK-GL-CTS \
- # "
-
- # if ! use libcxx ; then
- # XCLD+=" --exclude=chromium-${PV/_*}/third_party/libc++"
- # fi
-
- # if ! use pgo ; then
- # XCLD+=" --exclude=chromium-${PV/_*}/chrome/build/pgo_profiles"
- # fi
-
- # einfo "Unpacking chromium-${PV/_*}.tar.xz to ${WORKDIR}"
- # # Gentoo tarball:
- # # tar ${XCLD} -xf "${DISTDIR}/chromium-${PV/_*}-gentoo.tar.xz" -C "${WORKDIR}" || die
- # tar ${XCLD} -xf "${DISTDIR}/chromium-${PV/_*}${LITE_TARBALL:+-lite}.tar.xz" -C "${WORKDIR}" || die
-
- # unpack ${UGC_URL#*->}
- # # unpack chromium-patches-${PATCH_V}.tar.bz2
- # # Warned you!
-
- unpack chromium-${PV/_*}-linux.tar.xz
- unpack chromium-patches-${PATCH_V}.tar.bz2
- # These should only be required when we're not using the official toolchain
- if use !bundled-toolchain; then
- unpack chromium-patches-copium-${COPIUM_COMMIT:0:10}.tar.gz
- fi
-
- if use test; then
- # This just contains a bunch of font files that need to be unpacked (or moved) to the correct location.
- local testfonts_dir="${WORKDIR}/chromium-${PV/_*}/third_party/test_fonts/test_fonts"
- local testfonts_tar="${DISTDIR}/chromium-testfonts-${TEST_FONT:0:10}.tar.gz"
- einfo "Unpacking test fonts ..."
- tar xf "${testfonts_tar}" -C "${testfonts_dir}" || die "Failed to unpack testfonts"
- fi
-
- # We need to manually unpack this since M126 else we'd unpack one toolchain over the other.
- # Since we're doing that anyway let's unpack to sensible locations to make symlink creation easier.
- if use bundled-toolchain; then
- einfo "Unpacking bundled Clang ..."
- mkdir -p "${WORKDIR}"/clang || die "Failed to create clang directory"
- tar xf "${DISTDIR}/chromium-clang-${BUNDLED_CLANG_VER}.tar.xz" -C "${WORKDIR}/clang" || die "Failed to unpack Clang"
- einfo "Unpacking bundled Rust ..."
- local rust_dir="${WORKDIR}/rust-toolchain"
- mkdir -p "${rust_dir}" || die "Failed to create rust toolchain directory"
- tar xf "${DISTDIR}/chromium-rust-toolchain-${RUST_SHORT_HASH}-${BUNDLED_CLANG_VER%-*}.tar.xz" -C "${rust_dir}" ||
- die "Failed to unpack Rust"
- fi
-
- if use ppc64; then
- unpack chromium-openpower-${PPC64_HASH:0:10}.tar.bz2
- fi
-
- # This is a dirty hack, but we need rollup to build successfully and it's proving to be challenging
- # to build locally due to deps
- unpack rollup-wasm-node-${ROLLUP_VER}.tgz
-
- if use cromite; then
- unpack cromite-${CROMITE_COMMIT_ID}.tar.gz
- fi
-
- unpack ${UGC_URL#*->}
-}
-
-remove_compiler_builtins() {
- # We can't use the bundled compiler builtins with the system toolchain
- # We used to `grep` then `sed`, but it was indirect. Combining the two into a single
- # `awk` command is more efficient and lets us document the logic more clearly.
-
- local pattern=' configs += [ "//build/config/clang:compiler_builtins" ]'
- local target='build/config/compiler/BUILD.gn'
-
- local tmpfile
- tmpfile=$(mktemp) || die "Failed to create temporary file."
-
- if awk -v pat="${pattern}" '
- BEGIN {
- match_found = 0
- }
-
- # If the delete countdown is active, decrement it and skip to the next line.
- d > 0 { d--; next }
-
- # If the current line matches the pattern...
- $0 == pat {
- match_found = 1 # ...set our flag to true.
- d = 2 # Set delete counter for this line and the next two.
- prev = "" # Clear the buffered previous line so it is not printed.
- next
- }
-
- # For any other line, print the buffered previous line.
- NR > 1 { print prev }
-
- # Buffer the current line to be printed on the next cycle.
- { prev = $0 }
-
- END {
- # Print the last line if it was not part of a deleted block.
- if (d == 0) { print prev }
-
- # If the pattern was never found, exit with a failure code.
- if (match_found == 0) {
- exit 1
- }
- }
- ' "${target}" > "${tmpfile}"; then
- # AWK SUCCEEDED (exit code 0): The pattern was found and edited.
- # This is to avoid gawk's `-i inplace` option which users complain about.
- mv "${tmpfile}" "${target}"
- else
- # AWK FAILED (exit code 1): The pattern was not found.
- rm -f "${tmpfile}"
- die "Awk patch failed: Pattern not found in ${target}."
- fi
-}
-
-src_prepare() {
- # Calling this here supports resumption via FEATURES=keepwork
- python_setup
-
- # We'll fill this in as we go. Patches go in chromium-patches.
- local PATCHES=()
-
- rm "${WORKDIR}/chromium-patches-${PATCH_V}/common/cr131-unbundle-icu-target.patch"
- if use pgo; then
- rm "${WORKDIR}/chromium-patches-${PATCH_V}/rust/cr146-fix-botched-bytemuck-roll.patch"
- sed -i '/SupportedLaneCount/d' third_party/rust/chromium_crates_io/vendor/bytemuck-v1/src/zeroable.rs || die
- sed -i '/SupportedLaneCount/d' third_party/rust/chromium_crates_io/vendor/bytemuck-v1/src/pod.rs || die
- fi
-
- #cp -f ${WORKDIR}/chromium-patches-${PATCH_V}/*-compiler.patch "${T}/compiler.patch"
- ##cp -f ${FILESDIR}/chromium-147-compiler.patch "${T}/compiler.patch"
- #if ! use custom-cflags; then #See #25 #92
- # sed -i '/default_stack_frames/Q' "${T}/compiler.patch" || die
- #fi
-
- PATCHES+=( "${WORKDIR}/chromium-patches-${PATCH_V}/common/" )
- PATCHES+=( "${FILESDIR}/restore-x86-r3.patch" )
-
- # https://issues.chromium.org/issues/442698344
- # Unreleased fontconfig changed magic numbers and google have rolled to this version
- if has_version "<=media-libs/fontconfig-2.17.1"; then
- PATCHES+=( "${FILESDIR}/chromium-142-work-with-old-fontconfig.patch" )
- fi
-
- if use bundled-toolchain; then
- # We need to symlink the toolchain into the expected location
- einfo "Symlinking Clang toolchain to expected location ..."
- mkdir -p third_party/llvm-build/ || die "Failed to create llvm-build directory"
- # the 'Chromium Linux Tarballs' seem to already have 'Release+Asserts/{lib,bin}'; not sure if this is an
- # upstream change - we're using the same scripts to build, theoretically. We'll still attempt to create
- # llvm-build, but we'll rm Release+Asserts and symlink directly.
- if [[ -d third_party/llvm-build/Release+Asserts ]]; then
- rm -r third_party/llvm-build/Release+Asserts || die "Failed to remove third_party/llvm-build/Release+Asserts"
- fi
- ln -s "${WORKDIR}"/clang third_party/llvm-build/Release+Asserts || die "Failed to bundle Clang"
- einfo "Symlinking Rust toolchain to expected location ..."
- # As above, so below
- if [[ -d third_party/rust-toolchain ]]; then
- rm -r third_party/rust-toolchain || die "Failed to remove third_party/rust-toolchain"
- fi
- ln -s "${WORKDIR}"/rust-toolchain third_party/rust-toolchain || die "Failed to bundle rust"
- cp "${WORKDIR}"/rust-toolchain/VERSION \
- "${WORKDIR}"/rust-toolchain/INSTALLED_VERSION || die "Failed to set rust version"
- else
- # We don't need our toolchain patches if we're using the official toolchain
-
- # Copium patches go here.
- PATCHES+=(
- "${WORKDIR}/copium/cr143-libsync-__BEGIN_DECLS.patch"
- )
-
- # Automate conditional application of chromium-patches
- # The directory structure is expected to be something like:
- # chromium-patches-145/
- # ├── toolchain/
- # │ ├── cr123-foo.patch
- # │ └── cr135-bar.patch
- # ├── llvm/
- # │ ├── cr144-baz.patch
- # │ └── lt-23/
- # │ └── cr145-bleeding-edge-llvm-feature.patch
- # Where `lt-23` means "apply this patch if the LLVM version is less than 23".
- # Only categories in `slot_map` will be checked for version constraints.
- shopt -s nullglob
- local -A slot_map=( [llvm]="${LLVM_SLOT}" [rust]="${RUST_SLOT}" )
-
- for category in "${WORKDIR}/chromium-patches-${PATCH_V}"/*/; do
- local category_name="${category%/}"
- category_name="${category_name##*/}"
-
- # Skip arch-specific categories
- if [[ "${category_name}" == "ppc64le" ]]; then
- use ppc64 || continue
- fi
-
- # We applied common patches above, no need to apply them again here
- [[ "${category_name}" == "common" ]] && continue
-
- # Unconditional patches for this category
- PATCHES+=( "${category}"*.patch )
-
- # Version-constrained subdirectories (e.g., llvm/lt-23/)
- for constraint_dir in "${category}"*/; do
- local dir_name="${constraint_dir%/}"
- dir_name="${dir_name##*/}"
- if [[ "${dir_name}" =~ ^lt-(.*)$ && -v slot_map[${category_name}] ]]; then
- ver_test "${slot_map[${category_name}]}" -lt "${BASH_REMATCH[1]}" &&
- PATCHES+=( "${constraint_dir}"*.patch )
- fi
- done
- done
-
- shopt -u nullglob
-
- # Strictly speaking this doesn't need to be gated (no bundled toolchain for ppc64); it keeps the logic together
- if use ppc64; then
- local patchset_dir="${WORKDIR}/openpower-patches-${PPC64_HASH}/patches"
- # patch causes build errors on 4K page systems (https://bugs.gentoo.org/show_bug.cgi?id=940304)
- local page_size_patch="ppc64le/third_party/use-sysconf-page-size-on-ppc64.patch"
- local isa_3_patch="ppc64le/core/baseline-isa-3-0.patch"
- # Apply the OpenPOWER patches (check for page size and isa 3.0)
- openpower_patches=( $(grep -E "^ppc64le|^upstream" "${patchset_dir}/series" | grep -v "${page_size_patch}" |
- grep -v "${isa_3_patch}" || die) )
- for patch in "${openpower_patches[@]}"; do
- PATCHES+=( "${patchset_dir}/${patch}" )
- done
- if [[ $(getconf PAGESIZE) == 65536 ]]; then
- PATCHES+=( "${patchset_dir}/${page_size_patch}" )
- fi
- # We use vsx3 as a proxy for 'want isa3.0' (POWER9)
- if use cpu_flags_ppc_vsx3 ; then
- PATCHES+=( "${patchset_dir}/${isa_3_patch}" )
- fi
- fi
-
- remove_compiler_builtins
-
- # We can't rely on the eselect'd Rust to actually include rustfmt, so we'll point to the selected slot specifically.
- local suffix=""
- if [[ "${RUST_TYPE}" == "binary" ]]; then
- suffix="-bin-${RUST_SLOT}"
- else
- suffix="-${RUST_SLOT}"
- fi
- sed -i "s|/bin/rustfmt|/bin/rustfmt${suffix}|g" build/rust/rust_bindgen_generator.gni ||
- die "Failed to update rustfmt path"
-
- fi
-
- # Do this before we apply patches since (e.g.) ppc64 needs to patch rollup and it's easier in ${S}
- einfo "Moving rollup wasm-node package into place ..."
- mkdir -p third_party/devtools-frontend/src/node_modules/@rollup/wasm-node ||
- die "Failed to create node_modules/@rollup/wasm-node"
- mv "${WORKDIR}"/package/* third_party/devtools-frontend/src/node_modules/@rollup/wasm-node ||
- die "Failed to move rollup package"
-
- if [ ! -z "${CHROMIUM_COMMITS[*]}" ]; then
- # for i in "${CHROMIUM_COMMITS[@]}"; do
- for i in "${!CHROMIUM_COMMITS[@]}"; do
- if [[ ${CHROMIUM_COMMITS[$i]} =~ webrtc ]]; then
- patch_prefix="webrtc"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ angle ]]; then
- patch_prefix="angle"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ quiche ]]; then
- patch_prefix="quiche"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ dawn ]]; then
- patch_prefix="dawn"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ perfetto ]]; then
- patch_prefix="perfetto"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ink ]]; then
- patch_prefix="ink"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ vulkan-utility-libraries ]]; then
- patch_prefix="vulkan-utility-libraries"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ruy ]]; then
- patch_prefix="ruy"
- else
- patch_prefix="chromium"
- fi
- pushd "${CHROMIUM_COMMITS[$i]}" > /dev/null || die
- if [[ $i = -* ]]; then
- einfo "Reverting ${patch_prefix}-${i/-}.patch"
- git_wrapper apply -R --exclude="*unittest.cc" --exclude="DEPS" \
- -p1 < "${DISTDIR}/${patch_prefix}-${i/-}.patch"
- else
- einfo "Applying ${patch_prefix}-${i/-}.patch"
- git_wrapper apply --exclude="*unittest.cc" --exclude="DEPS" \
- -p1 < "${DISTDIR}/${patch_prefix}-${i/-}.patch"
- fi
- popd > /dev/null || die
- done
- fi
-
- if ! use bluetooth ; then
- PATCHES+=(
- "${FILESDIR}/disable-bluez-r7.patch"
- )
- fi
-
- if use convert-dict ; then
- PATCHES+=(
- "${FILESDIR}/chromium-ucf-dict-utility-r3.patch"
- )
- fi
-
- if ! use libcxx ; then
- PATCHES+=(
- "${FILESDIR}/fix-wayland-oncecallback-copy.patch"
- )
- fi
-
- if use system-ffmpeg; then
- PATCHES+=(
- "${FILESDIR}/chromium-141-opus-mp3.patch"
- "${FILESDIR}/chromium-135-hevc.patch"
- )
- sed -i "\!AVFMT_FLAG_NOH264PARSE!d" media/filters/ffmpeg_glue.cc || die
- ewarn "You need to expose \"av_stream_get_first_dts\" in ffmpeg via user patch"
- fi
-
- if use system-av1; then
- PATCHES+=(
- "${FILESDIR}/chromium-system-av1.patch"
- )
- fi
-
- if use system-libvpx; then
- PATCHES+=(
- "${FILESDIR}/chromium-system-libvpx.patch"
- )
- fi
-
- if use system-openjpeg ; then
- PATCHES+=(
- "${FILESDIR}/chromium-system-openjpeg-r4.patch"
- )
- fi
-
- if use x86 ; then
- #* Fixes a segfault in transport_security_state_generator
- PATCHES+=(
- "${FILESDIR}/fix-segfault-x86.patch"
- )
- fi
-
- # Testing all patches when NODIE is defined
- if [ ! -z "${NODIE}" ]; then
- for i in "${PATCHES[@]}"; do
- eapply_wrapper "$i"
- done
- nonfatal eapply_user
- else
- default
- fi
-
- if use cromite ; then
- BR_PA_PATH="${WORKDIR}/cromite-${CROMITE_COMMIT_ID}/build/patches"
-
- sed -i '/b\/components\/components_strings\.grd/,+10d' "${BR_PA_PATH}/Add-cromite-flags-support.patch" || die
- sed -i '/b\/chrome\/android\/java\/res\/xml\/privacy_preferences\.xml/,+13d' "${BR_PA_PATH}/Add-cromite-flags-support.patch" || die
- sed -i '/b\/android_webview\/support_library\/java\/src\/org\/chromium\/support_lib_glue/,+11d' "${BR_PA_PATH}/Client-hints-overrides.patch" || die
- sed -i '/webapps_strings.grdp" \/>/{s++webapps_strings.grdp" /><part file="cromite_components_strings_grd/placeholder.txt"/>+;h};${x;/./{x;q0};x;q1}' \
- components/components_strings.grd || die
-
- sed -i 's/absl::/std::/' "${BR_PA_PATH}/Add-a-proxy-configuration-page.patch" || die
-
- filterdiff -p1 "${BR_PA_PATH}/JIT-site-settings.patch" --exclude="content/browser/renderer_host/render_process_host_impl.cc" \
- > "${BR_PA_PATH}/JIT-site-settings.patch1"
- mv -f "${BR_PA_PATH}/JIT-site-settings.patch1" "${BR_PA_PATH}/JIT-site-settings.patch"
-
- BROMITE_PATCHES=(
- "${BR_PA_PATH}/bromite-build-utils.patch"
- "${BR_PA_PATH}/Battery-API-return-nothing.patch"
- "${BR_PA_PATH}/Multiple-fingerprinting-mitigations.patch"
- "${BR_PA_PATH}/Add-flag-to-configure-maximum-connections-per-host.patch"
- "${BR_PA_PATH}/Add-a-proxy-configuration-page.patch"
- "${BR_PA_PATH}/Enable-StrictOriginIsolation-and-SitePerProcess.patch"
- "${BR_PA_PATH}/Disable-requests-for-single-word-Omnibar-searches.patch"
- "${BR_PA_PATH}/Reduce-HTTP-headers-in-DoH-requests-to-bare-minimum.patch"
- "${BR_PA_PATH}/Client-hints-overrides.patch"
- "${BR_PA_PATH}/Disable-idle-detection.patch"
- "${BR_PA_PATH}/Disable-TLS-resumption.patch"
- "${BR_PA_PATH}/Remove-navigator.connection-info.patch"
-
- "${BR_PA_PATH}/AudioBuffer-AnalyserNode-fp-mitigations.patch"
- "${BR_PA_PATH}/Fonts-fingerprinting-mitigation.patch"
- "${BR_PA_PATH}/Content-settings-infrastructure.patch"
- "${BR_PA_PATH}/Add-autoplay-site-setting.patch"
- "${BR_PA_PATH}/Site-setting-for-images.patch"
- "${BR_PA_PATH}/JIT-site-settings.patch"
- "${BR_PA_PATH}/Add-webGL-site-setting.patch"
- "${BR_PA_PATH}/Add-webRTC-site-settings.patch"
- "${BR_PA_PATH}/Show-site-settings-for-cookies-javascript-and-ads.patch"
- "${BR_PA_PATH}/Viewport-Protection-flag.patch"
- "${BR_PA_PATH}/Revert-remove-allowscript-content-setting-secondary-url.patch"
- "${BR_PA_PATH}/Timezone-customization.patch"
- "${BR_PA_PATH}/Disable-speechSynthesis-getVoices-API.patch"
- "${BR_PA_PATH}/Remove-support-for-device-memory-and-cpu-recovery.patch"
- "${BR_PA_PATH}/Disable-Feeback-Collector.patch"
- "${BR_PA_PATH}/Disable-remote-altsvc-for-h3-connections.patch"
- "${BR_PA_PATH}/Add-cromite-flags-support.patch"
- "${BR_PA_PATH}/Enables-deactivation-of-the-js-debugger-statement.patch"
- )
- for i in "${BROMITE_PATCHES[@]}"; do
- if [[ "$i" =~ "Add-autoplay-site-setting.patch" ]] ||
- [[ "$i" =~ "JIT-site-settings.patch" ]] ||
- [[ "$i" =~ "Site-setting-for-images.patch" ]]; then
- einfo "Git binary patch: ${i##*/}"
- git_wrapper apply -p1 < "$i"
- else
- filter_wrapper "$i" --exclude="chrome/android/*"
- fi
- done
-
- #! conflicting patches
- sed -i '/browser_features.cc/,+17d' \
- "${UGC_WD}/patches/extra/ungoogled-chromium/add-flag-to-clear-data-on-exit.patch" || die
- sed -i 's$} // namespace features$BASE_FEATURE(kClearDataOnExit, "ClearDataOnExit", base::FEATURE_DISABLED_BY_DEFAULT);}$' \
- chrome/browser/browser_features.cc || die
- sed -i 's$} // namespace features$BASE_DECLARE_FEATURE(kClearDataOnExit);}$' \
- chrome/browser/browser_features.h || die
- sed -i 's$kChromeUIAboutHost,$kChromeUIAboutHost,"ungoogled-first-run",$' \
- chrome/common/webui_url_constants.cc || die
- sed -i '/chrome\/common\/webui_url_constants.cc/Q' \
- "${UGC_WD}/patches/extra/ungoogled-chromium/first-run-page.patch" || die
-
- #! normalise paths in py
- sed -i 's$os.path.dirname(include_file)$os.path.abspath(os.path.dirname(include_file))$' \
- build/bromite/gyp/cpp_bromite_include.py || die
- fi
-
- # if [[ ${LLVM_SLOT} == "19" ]]; then
- # # Upstream now hard depend on a feature that was added in LLVM 20.1, but we don't want to stabilise that yet.
- # # Do the temp file shuffle in case someone is using something other than `gawk`
- # {
- # awk '/config\("clang_warning_suppression"\) \{/ { print $0 " }"; sub(/clang/, "xclang"); print; next }
- # { print }' build/config/compiler/BUILD.gn > "${T}/build.gn" && \
- # mv "${T}/build.gn" build/config/compiler/BUILD.gn
- # } || die "Unable to disable warning suppression"
- # fi
-
- ## Not included in -lite tarballs, but we should check for it anyway.
- #if [[ -f third_party/node/linux/node-linux-x64/bin/node ]]; then
- # rm third_party/node/linux/node-linux-x64/bin/node || die
- #else
- # mkdir -p third_party/node/linux/node-linux-x64/bin || die
- #fi
- #ln -s "${EPREFIX}"/usr/bin/node third_party/node/linux/node-linux-x64/bin/node || die
-
- cp "${FILESDIR}/libusb.gn" build/linux/unbundle || die
- sed -i '/^REPLACEMENTS.*$/{s++REPLACEMENTS = {"libusb":"third_party/libusb/BUILD.gn",+;h};${x;/./{x;q0};x;q1}' \
- build/linux/unbundle/replace_gn_files.py || die
- sed -i '/^.*deps.*third_party\/jsoncpp.*$/{s++public_deps \+= [ "//third_party/jsoncpp" ]+;h};${x;/./{x;q0};x;q1}' \
- third_party/webrtc/rtc_base/BUILD.gn || die
-
- if use override-data-dir; then
- sed -i '/"chromium";/{s++"ungoogled-chromium";+;h};${x;/./{x;q0};x;q1}' \
- chrome/common/chrome_paths_linux.cc || die
- fi
-
- if use system-abseil-cpp; then
- eapply_wrapper "${FILESDIR}/chromium-147-system-abseil.patch"
-
- #! SFINAE mangling incompatibility between clang and gcc:
- #! https://github.com/llvm/llvm-project/issues/85656
- #! gcc: _ZN4absl12lts_202601074CordC1INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELi0EEEOT_
- #! clang: _ZN4absl12lts_202601074CordC1INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEETnNSt9enable_ifIXsr3std7is_sameIT_S8_EE5valueEiE4typeELi0EEEOSA_
- #! So, either this:
- eapply_wrapper "${FILESDIR}/chromium-141-system-abseil-cord.patch"
- #! or build with -fclang-abi-compat=17
-
- # cp -f /usr/include/absl/base/options.h third_party/abseil-cpp/absl/base/options.h
- # sed -i '/^#define ABSL_OPTION_USE_STD_ORDERING.*$/{s++#define ABSL_OPTION_USE_STD_ORDERING 1+;h};${x;/./{x;q0};x;q1}' \
- # third_party/abseil-cpp/absl/base/options.h || die
- fi
-
- #* Applying UGC PRs here
- if [ ! -z "${UGC_PR_COMMITS[*]}" ]; then
- pushd "${UGC_WD}" >/dev/null
- for i in "${UGC_PR_COMMITS[@]}"; do
- eapply_wrapper "${DISTDIR}/${PN}-$i.patch"
- done
- popd >/dev/null
- fi
-
- # From here we adapt ungoogled-chromium's patches to our needs
- local ugc_pruning_list="${UGC_WD}/pruning.list"
- local ugc_patch_series="${UGC_WD}/patches/series"
- local ugc_substitution_list="${UGC_WD}/domain_substitution.list"
-
- local ugc_unneeded=(
- # GN bootstrap
- extra/debian/gn/parallel
- # following Gentoo's Chromium
- core/ungoogled-chromium/build-with-wasm-rollup
- )
-
- if use cromite ; then
- einfo "Using fingerprinting patches from Cromite instead"
- ugc_unneeded+=(
- extra/bromite/fingerprinting-flags-client-rects-and-measuretext
- extra/bromite/flag-max-connections-per-host
- extra/bromite/flag-fingerprinting-canvas-image-data-noise
- extra/ungoogled-chromium/add-components-ungoogled
- extra/ungoogled-chromium/remove-pac-size-limit
- )
- fi
-
- # #* Temporary fix
- # sed -i "\!ios/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/icu/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/libjpeg_turbo/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/snappy/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/closure_compiler/!d" "${ugc_pruning_list}" || die
-
- # #* Didn't unpack them at the first place
- # sed -i "\!build/linux/debian_bullseye_i386-sysroot!d" "${ugc_pruning_list}" || die
- # sed -i "\!build/linux/debian_bullseye_amd64-sysroot!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/llvm-build!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/node/linux!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/rust-src!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/rust-toolchain!d" "${ugc_pruning_list}" || die
- # if ! use libcxx ; then
- # sed -i "\!third_party/libc!d" "${ugc_pruning_list}" || die
- # fi
- sed -i "s|debug('files|error('files|" \
- "${UGC_WD}/utils/prune_binaries.py" || die
- sed -i "\!third_party/node/linux!d" \
- "${UGC_WD}/utils/prune_binaries.py" || die
-
- local ugc_p ugc_dir
- for p in "${ugc_unneeded[@]}"; do
- einfo "Removing ${p}.patch"
- sed -i "\!${p}.patch!d" "${ugc_patch_series}" || die
- done
-
- if [ ! -z "${UGC_SKIP_PATCHES}" ]; then
- for p in ${UGC_SKIP_PATCHES}; do
- ewarn "Removing ${p}"
- sed -i "\!${p}!d" "${ugc_patch_series}" || die
- done
- fi
-
- if [ ! -z "${UGC_KEEP_BINARIES}" ]; then
- for p in ${UGC_KEEP_BINARIES}; do
- ewarn "Keeping binary ${p}"
- sed -i "\!${p}!d" "${ugc_pruning_list}" || die
- done
- fi
-
- if [ ! -z "${UGC_SKIP_SUBSTITUTION}" ]; then
- for p in ${UGC_SKIP_SUBSTITUTION}; do
- ewarn "No substitutions in ${p}"
- sed -i "\!${p}!d" "${ugc_substitution_list}" || die
- done
- fi
-
- ebegin "Pruning binaries"
- "${UGC_WD}/utils/prune_binaries.py" -q . "${UGC_WD}/pruning.list"
- eend $? || die
-
- ebegin "Applying ungoogled-chromium patches"
- "${UGC_WD}/utils/patches.py" -q apply . "${UGC_WD}/patches"
- eend $? || die
-
- ebegin "Applying domain substitution"
- "${UGC_WD}/utils/domain_substitution.py" -q apply -r "${UGC_WD}/domain_regex.list" -f "${UGC_WD}/domain_substitution.list" .
- eend $? || die
-
- # Sanity check esbuild version before we start removing files.
- # We _could_ patch the version check out - in theory esbuild upstream are being super conservative after
- # arch(AUR) packaged an `esbuild` binary and set ESBUILD_BINARY_PATH=/usr/bin/esbuild, causing much breakage,
- # but this is fine too and exactly matches what upstream are expecting.
- # https://github.com/evanw/esbuild/issues/2894
- local esbuild_js="${S}/third_party/devtools-frontend/src/node_modules/esbuild/lib/main.js"
- local found
- found=$(awk -F'"' '/if \(binaryVersion !==/ {print $2}' "${esbuild_js}")
- if [[ "${found}" != "${ESBUILD_VER}" ]]; then
- die "esbuild version mismatch: expected ${ESBUILD_VER}, found ${found}"
- fi
-
- elog "Removing bundled binaries from source tree ..."
- # Purge bundled ELF files: These are non-portable and will cause issues if used instead of system versions.
- # Use `--wasm` to also remove WebAssembly binaries, if desired - they're portable so shouldn't break builds.
- ${EPYTHON} "${FILESDIR}/bin-finder.py" --elf "${S}" | awk '{print $1}' | xargs rm -f ||
- die "Failed to remove bundled binaries"
-
- # And now we restore any that we actually need, from the host system
- local esbuild_path="${S}/third_party/devtools-frontend/src/third_party/esbuild"
- local -A restore_list=(
- ["/usr/bin/esbuild-${ESBUILD_VER}"]="${esbuild_path}/esbuild"
- ["/usr/bin/gperf"]="${S}/third_party/gperf/cipd/bin/gperf"
- ["/usr/bin/node"]="${S}/third_party/node/linux/node-linux-x64/bin/node"
- )
-
- for src in "${!restore_list[@]}"; do
- dst="${restore_list[${src}]}"
- if [[ -f "${src}" ]]; then
- einfo "Symlinking ${src} ..."
- # Make sure the parent dir exists; some tarballs don't include (e.g.) node's bindir
- mkdir -p "$(dirname "${dst}")" || die "Failed to create directory for ${dst}"
- ln -s "${src}" "${dst}" || die "Failed to symlink ${dst} from ${src}"
- if [[ ! -L "${dst}" || "$(readlink -f "${dst}")" != "${src}" ]]; then
- die "Symlink verification failed for ${dst} -> ${src}"
- fi
- else
- die "Expected to find ${src} to restore ${dst}, but it does not exist."
- fi
- done
-
- # adjust python interpreter version
- sed -i -e "s|\(^script_executable = \).*|\1\"${EPYTHON}\"|g" .gn || die
-
- # Use the system copy of hwdata's usb.ids; upstream is woefully out of date (2015!)
- sed 's|//third_party/usb_ids/usb.ids|/usr/share/hwdata/usb.ids|g' \
- -i services/device/public/cpp/usb/BUILD.gn || die "Failed to set system usb.ids path"
-
- # remove_bundled_libraries.py walks the source tree and looks for paths containing the substring 'third_party'
- # whitelist matches use the right-most matching path component, so we need to whitelist from that point down.
- local keeplibs=(
- base/third_party/cityhash
- )
- use system-double-conversion || keeplibs+=(
- base/third_party/double_conversion
- )
- keeplibs+=(
- base/third_party/icu
- base/third_party/nspr
- base/third_party/superfasthash
- base/third_party/symbolize
- base/third_party/xdg_user_dirs
- buildtools/third_party/libc++
- buildtools/third_party/libc++abi
- )
- use cromite && keeplibs+=(
- cromite_flags/third_party
- )
- keeplibs+=(
- net/third_party/mozilla_security_manager
- net/third_party/quic
- net/third_party/uri_template
- )
- use system-abseil-cpp || keeplibs+=(
- third_party/abseil-cpp
- )
- keeplibs+=(
- third_party/angle
- third_party/angle/src/common/third_party/xxhash
- third_party/angle/src/third_party/ceval
- )
- use nvidia || keeplibs+=(
- third_party/angle/src/third_party/libXNVCtrl
- )
- keeplibs+=(
- third_party/angle/src/third_party/volk
- third_party/anonymous_tokens
- third_party/apple_apsl
- third_party/axe-core
- third_party/bidimapper
- third_party/blink
- third_party/boringssl
- third_party/boringssl/src/third_party/fiat
- third_party/breakpad
- third_party/breakpad/breakpad/src/third_party/curl
- )
- use system-brotli || keeplibs+=(
- third_party/brotli
- )
- keeplibs+=(
- third_party/catapult
- third_party/catapult/common/py_vulcanize/third_party/rcssmin
- third_party/catapult/common/py_vulcanize/third_party/rjsmin
- third_party/catapult/third_party/beautifulsoup4-4.9.3
- third_party/catapult/third_party/html5lib-1.1
- third_party/catapult/third_party/polymer
- third_party/catapult/third_party/six
- third_party/catapult/third_party/typ
- third_party/catapult/tracing/third_party/d3
- third_party/catapult/tracing/third_party/gl-matrix
- third_party/catapult/tracing/third_party/jpeg-js
- third_party/catapult/tracing/third_party/jszip
- third_party/catapult/tracing/third_party/mannwhitneyu
- third_party/catapult/tracing/third_party/oboe
- third_party/catapult/tracing/third_party/pako
- third_party/ced
- third_party/cld_3
- third_party/closure_compiler
- )
- use libcxx && keeplibs+=(
- third_party/compiler-rt
- )
- keeplibs+=(
- third_party/content_analysis_sdk
- third_party/cpuinfo
- third_party/crabbyavif
- third_party/crashpad
- third_party/crashpad/crashpad/third_party/lss
- third_party/crashpad/crashpad/third_party/zlib
- )
- use system-crc32c || keeplibs+=(
- third_party/crc32c
- )
- keeplibs+=(
- third_party/cros_system_api
- third_party/d3
- third_party/dawn
- third_party/dawn/third_party/gn/webgpu-cts
- third_party/dawn/third_party/OpenGL-Registry
- third_party/dawn/third_party/renderdoc
- third_party/dawn/third_party/webgpu-headers
- third_party/depot_tools
- third_party/devscripts
- third_party/devtools-frontend
- third_party/devtools-frontend/src/front_end/third_party/acorn
- third_party/devtools-frontend/src/front_end/third_party/additional_readme_paths.json
- third_party/devtools-frontend/src/front_end/third_party/axe-core
- third_party/devtools-frontend/src/front_end/third_party/chromium
- third_party/devtools-frontend/src/front_end/third_party/codemirror
- third_party/devtools-frontend/src/front_end/third_party/csp_evaluator
- third_party/devtools-frontend/src/front_end/third_party/diff
- third_party/devtools-frontend/src/front_end/third_party/i18n
- third_party/devtools-frontend/src/front_end/third_party/intl-messageformat
- third_party/devtools-frontend/src/front_end/third_party/json5
- third_party/devtools-frontend/src/front_end/third_party/legacy-javascript
- third_party/devtools-frontend/src/front_end/third_party/lighthouse
- third_party/devtools-frontend/src/front_end/third_party/lit
- third_party/devtools-frontend/src/front_end/third_party/marked
- third_party/devtools-frontend/src/front_end/third_party/puppeteer
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/esm/third_party/mitt
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/esm/third_party/parsel-js
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/esm/third_party/rxjs
- third_party/devtools-frontend/src/front_end/third_party/source-map-scopes-codec
- third_party/devtools-frontend/src/front_end/third_party/third-party-web
- third_party/devtools-frontend/src/front_end/third_party/vscode.web-custom-data
- third_party/devtools-frontend/src/front_end/third_party/wasmparser
- third_party/devtools-frontend/src/front_end/third_party/web-vitals
- third_party/devtools-frontend/src/third_party
- third_party/dom_distiller_js
- third_party/dragonbox
- third_party/eigen3
- third_party/emoji-segmenter
- third_party/farmhash
- third_party/fast_float
- third_party/fdlibm
- third_party/federated_compute/chromium/fcp/confidentialcompute
- third_party/federated_compute/src/fcp/base
- third_party/federated_compute/src/fcp/confidentialcompute
- third_party/federated_compute/src/fcp/protos/confidentialcompute
- third_party/federated_compute/src/fcp/protos/federatedcompute
- third_party/fft2d
- third_party/flatbuffers
- third_party/fp16
- third_party/freetype
- third_party/fusejs
- third_party/fxdiv
- third_party/gemmlowp
- third_party/google_input_tools
- third_party/google_input_tools/third_party/closure_library
- third_party/google_input_tools/third_party/closure_library/third_party/closure
- third_party/googletest
- third_party/gperf # We symlink system gperf, but this will purge the symlink since we tidy up afterwards.
- third_party/highway
- third_party/hunspell
- third_party/hyphenation-patterns
- third_party/ink_stroke_modeler/src/ink_stroke_modeler
- third_party/ink_stroke_modeler/src/ink_stroke_modeler/internal
- third_party/ink/src/ink/brush
- third_party/ink/src/ink/color
- third_party/ink/src/ink/geometry
- third_party/ink/src/ink/rendering
- third_party/ink/src/ink/rendering/skia/common_internal
- third_party/ink/src/ink/rendering/skia/native
- third_party/ink/src/ink/rendering/skia/native/internal
- third_party/ink/src/ink/strokes
- third_party/ink/src/ink/types
- third_party/inspector_protocol
- third_party/ipcz
- third_party/jinja2
- )
- use system-jsoncpp || keeplibs+=(
- third_party/jsoncpp
- )
- keeplibs+=(
- third_party/khronos
- third_party/lens_server_proto
- third_party/leveldatabase
- third_party/libaddressinput
- )
- use libcxx && keeplibs+=(
- third_party/libc++
- )
- keeplibs+=(
- third_party/libdrm
- third_party/libgav1
- third_party/libjingle
- third_party/libpfm4
- third_party/libphonenumber
- third_party/libpng
- third_party/libsecret
- third_party/libsrtp
- third_party/libsync
- third_party/libtess2/libtess2
- third_party/libtess2/src/Include
- third_party/libtess2/src/Source
- third_party/liburlpattern
- )
- use system-libusb || keeplibs+=(
- third_party/libusb
- )
- keeplibs+=(
- third_party/libva_protected_content
- )
- use system-libvpx || keeplibs+=(
- third_party/libvpx
- third_party/libvpx/source/libvpx/third_party/x86inc
- )
- keeplibs+=(
- third_party/libwebm
- third_party/libx11
- third_party/libxcb-keysyms
- third_party/libxml/chromium
- third_party/libyuv
- third_party/libzip
- third_party/lit
- )
- use libcxx && keeplibs+=(
- third_party/llvm-libc
- third_party/llvm-libc/src/shared/
- )
- keeplibs+=(
- third_party/lottie
- third_party/lss
- third_party/lzma_sdk
- third_party/mako
- third_party/markupsafe
- third_party/material_color_utilities
- third_party/metrics_proto
- third_party/minigbm
- third_party/ml_dtypes
- third_party/modp_b64
- third_party/nasm
- third_party/nearby
- third_party/neon_2_sse
- third_party/node
- third_party/oak/chromium/proto
- third_party/oak/chromium/proto/attestation
- third_party/omnibox_proto
- third_party/one_euro_filter
- third_party/openscreen
- third_party/openscreen/src/third_party/
- third_party/openscreen/src/third_party/tinycbor/src/src
- third_party/ots
- third_party/pdfium
- third_party/pdfium/third_party/agg23
- third_party/pdfium/third_party/bigint
- third_party/pdfium/third_party/freetype
- third_party/pdfium/third_party/lcms
- )
- use system-openjpeg || keeplibs+=(
- third_party/pdfium/third_party/libopenjpeg
- )
- keeplibs+=(
- third_party/pdfium/third_party/libtiff
- third_party/perfetto
- third_party/perfetto/protos/third_party/chromium
- third_party/perfetto/protos/third_party/pprof
- third_party/perfetto/protos/third_party/primes
- third_party/perfetto/protos/third_party/simpleperf
- third_party/pffft
- third_party/ply
- third_party/polymer
- third_party/private_membership
- third_party/private-join-and-compute
- third_party/protobuf
- third_party/protobuf/third_party/utf8_range
- third_party/pthreadpool
- third_party/puffin
- third_party/pyjson5
- third_party/pyyaml
- third_party/rapidhash
- third_party/readability
- third_party/rnnoise
- third_party/rust
- third_party/ruy
- third_party/s2cellid
- third_party/search_engines_data
- third_party/securemessage
- third_party/selenium-atoms
- third_party/sentencepiece
- third_party/sentencepiece/src/third_party/darts_clone
- third_party/shell-encryption
- third_party/simdutf
- third_party/simplejson
- third_party/six
- third_party/skia
- third_party/skia/include/third_party/vulkan
- third_party/smhasher
- )
- use system-snappy || keeplibs+=(
- third_party/snappy
- )
- keeplibs+=(
- third_party/spirv-headers
- third_party/spirv-tools
- third_party/sqlite
- third_party/swiftshader
- third_party/swiftshader/third_party/astc-encoder
- third_party/swiftshader/third_party/llvm-subzero
- third_party/swiftshader/third_party/marl
- third_party/swiftshader/third_party/SPIRV-Headers/include/spirv
- third_party/swiftshader/third_party/SPIRV-Tools
- third_party/swiftshader/third_party/subzero
- third_party/tensorflow_models
- third_party/tensorflow-text
- third_party/tflite
- third_party/tflite/src/third_party/fft2d
- third_party/tflite/src/third_party/xla/third_party/tsl
- third_party/tflite/src/third_party/xla/xla/tsl/framework
- third_party/tflite/src/third_party/xla/xla/tsl/lib/random
- third_party/tflite/src/third_party/xla/xla/tsl/platform
- third_party/tflite/src/third_party/xla/xla/tsl/protobuf
- third_party/tflite/src/third_party/xla/xla/tsl/util
- third_party/ukey2
- third_party/utf
- third_party/vulkan
- third_party/wayland
- third_party/webdriver
- third_party/webgpu-cts
- third_party/webrtc
- third_party/webrtc/common_audio/third_party/ooura
- third_party/webrtc/common_audio/third_party/spl_sqrt_floor
- third_party/webrtc/modules/third_party/fft
- third_party/webrtc/modules/third_party/g711
- third_party/webrtc/modules/third_party/g722
- third_party/widevine
- )
- use system-woff2 || keeplibs+=(
- third_party/woff2
- )
- keeplibs+=(
- third_party/wuffs
- third_party/x11proto
- third_party/xcbproto
- third_party/xnnpack
- third_party/zlib/google
- third_party/zxcvbn-cpp
- url/third_party/mozilla
- v8/third_party/glibc
- v8/third_party/inspector_protocol
- v8/third_party/rapidhash-v8
- v8/third_party/siphash
- v8/third_party/utf8-decoder
- v8/third_party/v8
- v8/third_party/valgrind
-
- # gyp -> gn leftovers
- third_party/speech-dispatcher
- third_party/usb_ids
- )
-
- if use test; then
- keeplibs+=(
- third_party/breakpad/breakpad/src/processor
- third_party/fuzztest
- third_party/google_benchmark/src/include/benchmark
- third_party/google_benchmark/src/src
- third_party/test_fonts
- third_party/test_fonts/fontconfig
- third_party/test_fonts/test_fonts
- )
- fi
-
- # USE=system-*
- if ! use system-harfbuzz; then
- keeplibs+=( third_party/harfbuzz )
- fi
-
- if ! use system-ffmpeg; then
- keeplibs+=( third_party/ffmpeg third_party/opus )
- fi
-
- if ! use system-icu; then
- keeplibs+=( third_party/icu )
- fi
-
- if ! use system-zstd; then
- keeplibs+=( third_party/zstd )
- fi
-
- if ! use system-av1; then
- keeplibs+=(
- third_party/dav1d
- third_party/libaom
- third_party/libaom/source/libaom/third_party/fastfeat
- third_party/libaom/source/libaom/third_party/vector
- third_party/libaom/source/libaom/third_party/x86inc
- )
- fi
-
- if use libcxx; then
- keeplibs+=(
- third_party/libc++
- third_party/llvm-libc
- )
- fi
-
- if ! use system-openh264; then
- keeplibs+=( third_party/openh264 )
- fi
-
- if ! use system-re2; then
- keeplibs+=( third_party/re2 )
- fi
-
- # Arch-specific
- if use arm64 || use ppc64 ; then
- keeplibs+=( third_party/swiftshader/third_party/llvm-10.0 )
- fi
- # we need to generate ppc64 stuff because upstream does not ship it yet
- # it has to be done before unbundling.
- if use ppc64; then
- pushd third_party/libvpx >/dev/null || die
- mkdir -p source/config/linux/ppc64 || die
- # requires git and clang, bug #832803
- # Revert https://chromium.googlesource.com/chromium/src/+/b463d0f40b08b4e896e7f458d89ae58ce2a27165%5E%21/third_party/libvpx/generate_gni.sh
- # and https://chromium.googlesource.com/chromium/src/+/71ebcbce867dd31da5f8b405a28fcb0de0657d91%5E%21/third_party/libvpx/generate_gni.sh
- # since we're not in a git repo
- sed -i -e "s|^update_readme||g; s|clang-format|${EPREFIX}/bin/true|g; /^git -C/d; /git cl/d; /cd \$BASE_DIR\/\$LIBVPX_SRC_DIR/ign format --in-place \$BASE_DIR\/BUILD.gn\ngn format --in-place \$BASE_DIR\/libvpx_srcs.gni" \
- generate_gni.sh || die
- ./generate_gni.sh || die
- popd >/dev/null || die
-
- pushd third_party/ffmpeg >/dev/null || die
- cp libavcodec/ppc/h264dsp.c libavcodec/ppc/h264dsp_ppc.c || die
- cp libavcodec/ppc/h264qpel.c libavcodec/ppc/h264qpel_ppc.c || die
- popd >/dev/null || die
- fi
-
- # Sanity check keeplibs, on major version bumps it is often necessary to update this list
- # and this enables us to hit them all at once.
- # There are some entries that need to be whitelisted (TODO: Why? The file is understandable, the rest seem odd)
- whitelist_libs=(
- net/third_party/quic
- third_party/devtools-frontend/src/front_end/third_party/additional_readme_paths.json
- third_party/libjingle
- third_party/mesa
- third_party/skia/third_party/vulkan
- third_party/vulkan
- )
- local not_found_libs=()
- for lib in "${keeplibs[@]}"; do
- if [[ ! -d "${lib}" ]] && ! has "${lib}" "${whitelist_libs[@]}"; then
- not_found_libs+=( "${lib}" )
- fi
- done
-
- if [[ ${#not_found_libs[@]} -gt 0 ]]; then
- ewarn "The following \`keeplibs\` directories were not found in the source tree:"
- for lib in "${not_found_libs[@]}"; do
- ewarn " ${lib}"
- done
- fi
-
- keeplibs+=( third_party/ungoogled )
-
- # Remove most bundled libraries. Some are still needed.
- einfo "Unbundling third-party libraries ..."
- build/linux/unbundle/remove_bundled_libraries.py "${keeplibs[@]}" --do-remove || die
-
- # Interferes with our bundled clang path; we don't want stripped binaries anyway.
- sed -i -e 's|${clang_base_path}/bin/llvm-strip|/bin/true|g' \
- -e 's|${clang_base_path}/bin/llvm-objcopy|/bin/true|g' \
- build/linux/strip_binary.gni || die
-}
-
-src_configure() {
- # Calling this here supports resumption via FEATURES=keepwork
- python_setup
-
- # Bug 491582.
- export TMPDIR="${WORKDIR}/temp"
- mkdir -p -m 755 "${TMPDIR}" || die
-
- # https://bugs.gentoo.org/654216
- addpredict /dev/dri/ #nowarn
-
- # Use system-provided libraries.
- # TODO: freetype -- remove sources (https://bugs.chromium.org/p/pdfium/issues/detail?id=733).
- # TODO: use_system_hunspell (upstream changes needed).
- # TODO: use_system_protobuf (bug #525560).
- # TODO: use_system_sqlite (http://crbug.com/22208).
-
- # libevent: https://bugs.gentoo.org/593458
- local gn_system_libraries=(
- flac
- fontconfig
- freetype
- libjpeg
- libwebp
- libxml
- libxslt
- zlib
- )
- if use system-abseil-cpp; then
- gn_system_libraries+=(
- absl_algorithm
- absl_base
- absl_cleanup
- absl_container
- absl_crc
- absl_debugging
- absl_flags
- absl_functional
- absl_hash
- absl_log
- absl_log_internal
- absl_memory
- absl_meta
- absl_numeric
- absl_random
- absl_status
- absl_strings
- absl_synchronization
- absl_time
- absl_types
- absl_utility
- )
- fi
- if use system-brotli; then
- gn_system_libraries+=( brotli )
- fi
- if use system-crc32c; then
- gn_system_libraries+=( crc32c )
- fi
- if use system-double-conversion; then
- gn_system_libraries+=( double-conversion )
- fi
- if use system-woff2; then
- gn_system_libraries+=( woff2 )
- fi
- if use nvidia; then
- gn_system_libraries+=( libXNVCtrl )
- fi
- if use system-ffmpeg; then
- gn_system_libraries+=( ffmpeg opus )
- fi
- if use system-jsoncpp; then
- gn_system_libraries+=( jsoncpp )
- fi
- if use system-icu; then
- gn_system_libraries+=( icu )
- fi
- if use system-zstd; then
- gn_system_libraries+=( zstd )
- fi
- if use system-av1; then
- gn_system_libraries+=( dav1d libaom )
- fi
- if use system-libusb; then
- gn_system_libraries+=( libusb )
- fi
- if use system-libvpx; then
- gn_system_libraries+=( libvpx )
- fi
- use system-openh264 && gn_system_libraries+=(
- openh264
- )
- use system-re2 && gn_system_libraries+=(
- re2
- )
- use system-snappy && gn_system_libraries+=(
- snappy
- )
-
- build/linux/unbundle/replace_gn_files.py --system-libraries "${gn_system_libraries[@]}" ||
- die "Failed to replace GN files for system libraries"
-
- # TODO 131: The above call clobbers `enable_freetype = true` in the freetype gni file
- # drop the last line, then append the freetype line and a new curly brace to end the block
- local freetype_gni="build/config/freetype/freetype.gni"
- sed -i -e '$d' ${freetype_gni} || die
- echo " enable_freetype = true" >> ${freetype_gni} || die
- echo "}" >> ${freetype_gni} || die
-
- if use !custom-cflags; then
- replace-flags "-Os" "-O2"
- strip-flags
- # Debug info section overflows without component build
- # Prevent linker from running out of address space, bug #471810 .
- filter-flags "-g*"
- # 949123: Several multimedia components explicitly build with specific CFLAGS and
- # use runtime detection to enable optimisations; unfortunately any of our CFLAGS are suffixed
- # to the end of the command line, which causes build failures.
- use arm64 && filter-flags "-march*" "-mtune*" "-mcpu*"
- fi
-
- # We don't use the same clang version as upstream, and with -Werror
- # we need to make sure that we don't get superfluous warnings.
- append-flags -Wno-unknown-warning-option
- if tc-is-cross-compiler; then # can you cross-compile with the bundled toolchain?
- export BUILD_CXXFLAGS+=" -Wno-unknown-warning-option"
- export BUILD_CFLAGS+=" -Wno-unknown-warning-option"
- fi
-
- # Start building our GN options
- local myconf_gn=() # Tip: strings must be quoted, bools or numbers are fine
-
- if use !bundled-toolchain; then
- # We already forced the "correct" clang via pkg_setup
-
- if tc-is-cross-compiler; then
- CC="${CC} -target ${CHOST} --sysroot ${ESYSROOT}"
- CXX="${CXX} -target ${CHOST} --sysroot ${ESYSROOT}"
- BUILD_AR=${AR}
- BUILD_CC=${CC}
- BUILD_CXX=${CXX}
- BUILD_NM=${NM}
- fi
-
- # Make sure the build system will use the right tools, bug #340795.
- tc-export AR CC CXX NM
-
- strip-unsupported-flags
- append-ldflags -Wl,--undefined-version # https://bugs.gentoo.org/918897#c32
-
- myconf_gn+=(
- "is_clang=true"
- "clang_use_chrome_plugins=false"
- "use_clang_modules=false" # M141 enables this for the linux platform by default.
- "use_lld=true"
- 'custom_toolchain="//build/toolchain/linux/unbundle:default"'
- # From M127 we need to provide a location for libclang.
- # We patch this in for gentoo - see chromium-*-bindgen-custom-toolchain.patch
- # rust_bindgen_root = directory with `bin/bindgen` beneath it.
- # We don't need to set 'clang_base_path' for anything in our build
- # and it defaults to the google toolchain location. Instead provide a location
- # to where system clang lives so that bindgen can find system headers (e.g. stddef.h)
- "bindgen_libclang_path=\"$(get_llvm_prefix)/$(get_libdir)\""
- "clang_base_path=\"${EPREFIX}/usr/lib/clang/${LLVM_SLOT}/\""
- "rust_bindgen_root=\"${EPREFIX}/usr/\""
- "rust_sysroot_absolute=\"$(get_rust_prefix)\""
- "rustc_version=\"${RUST_SLOT}\""
- )
-
- if ! tc-is-cross-compiler; then
- myconf_gn+=( 'host_toolchain="//build/toolchain/linux/unbundle:default"' )
- else
- tc-export BUILD_{AR,CC,CXX,NM}
- myconf_gn+=(
- 'host_toolchain="//build/toolchain/linux/unbundle:host"'
- 'v8_snapshot_toolchain="//build/toolchain/linux/unbundle:host"'
- "host_pkg_config=\"$(tc-getBUILD_PKG_CONFIG)\""
- "pkg_config=\"$(tc-getPKG_CONFIG)\""
- )
-
- # setup cups-config, build system only uses --libs option
- if use cups; then
- mkdir "${T}/cups-config" || die
- cp "${ESYSROOT}/usr/bin/${CHOST}-cups-config" "${T}/cups-config/cups-config" || die
- export PATH="${PATH}:${T}/cups-config"
- fi
-
- # Don't inherit PKG_CONFIG_PATH from environment
- local -x PKG_CONFIG_PATH=
- fi
-
- fi # !bundled-toolchain
-
- local myarch
- myarch="$(tc-arch)"
- case ${myarch} in
- amd64)
- # Bug 530248, 544702, 546984, 853646.
- use !custom-cflags && filter-flags -mno-mmx -mno-sse2 -mno-ssse3 -mno-sse4.1 \
- -mno-avx -mno-avx2 -mno-fma -mno-fma4 -mno-xop -mno-sse4a
- myconf_gn+=( 'target_cpu="x64"' )
- ;;
- x86)
- # Bug 530248, 544702, 546984, 853646.
- use !custom-cflags && filter-flags -mno-mmx -mno-sse2 -mno-ssse3 -mno-sse4.1 \
- -mno-avx -mno-avx2 -mno-fma -mno-fma4 -mno-xop -mno-sse4a
- myconf_gn+=( 'target_cpu="x86"' )
- ;;
- arm64)
- myconf_gn+=( 'target_cpu="arm64"' )
- ;;
- ppc64)
- myconf_gn+=( 'target_cpu="ppc64"' )
- ;;
- *)
- die "Failed to determine target arch, got '${myarch}'."
- ;;
- esac
-
- # Common options
-
- myconf_gn+=(
- # Disable code formating of generated files
- "blink_enable_generated_code_formatting=false"
- # enable DCHECK with USE=debug only, increases chrome binary size by 30%, bug #811138.
- # DCHECK is fatal by default, make it configurable at runtime, #bug 807881.
- "dcheck_always_on=$(usex debug true false)"
- "dcheck_is_configurable=$(usex debug true false)"
- # Chromium builds provided by Linux distros should disable the testing config
- "disable_fieldtrial_testing_config=true"
- # Custom patch: Enable building Chromium as individual channels (e.g. stable, beta, dev) that
- # use different profile directories, desktop entries, etc. This enables slotting the ebuild.
- "enable_channel_branding=true"
- # 131 began laying the groundwork for replacing freetype with
- # "Rust-based Fontations set of libraries plus Skia path rendering"
- # We now need to opt-in
- "enable_freetype=true"
- "enable_hangout_services_extension=$(usex hangouts true false)"
- # Don't need nocompile checks and GN crashes with our config (verify with modern GN)
- "enable_nocompile_tests=false"
- # pseudolocales are only used for testing
- "enable_pseudolocales=false"
- "enable_widevine=$(usex widevine true false)"
- # Disable fatal linker warnings, bug 506268.
- "fatal_linker_warnings=false"
- # Component build isn't generally intended for use by end users. It's mostly useful
- # for development and debugging.
- "is_component_build=false"
- # GN needs explicit config for Debug/Release as opposed to inferring it from build directory.
- "is_debug=false"
- "is_official_build=$(usex official true false)"
- # Enable ozone wayland and/or headless support
- "ozone_auto_platforms=false"
- "ozone_platform_headless=true"
- # Enables building without non-free unRAR licence
- "safe_browsing_use_unrar=false"
- # "thin_lto_enable_optimizations=${use_lto}"
- "treat_warnings_as_errors=false"
- # Use in-tree libc++ (buildtools/third_party/libc++ and buildtools/third_party/libc++abi)
- # instead of the system C++ library for C++ standard library support.
- # default: true, but let's be explicit (forced since 120 ; USE removed 127).
- "use_custom_libcxx=true"
- # Enable ozone wayland and/or headless support
- "use_ozone=true"
- # The sysroot is the oldest debian image that chromium supports, we don't need it
- "use_sysroot=false"
- # See dependency logic in third_party/BUILD.gn
- "use_system_harfbuzz=$(usex system-harfbuzz true false)"
- # "use_thin_lto=${use_lto}"
- # Only enabled for clang, but gcc has endian macros too
- "v8_use_libm_trig_functions=true"
- )
-
- myconf_gn+=( "enable_iterator_debugging=$(usex debug true false)" )
-
- if use debug; then
- myconf_gn+=(
- "symbol_level=2"
- "blink_symbol_level=2"
- "v8_symbol_level=2"
- )
- else
- myconf_gn+=(
- "symbol_level=0"
- "blink_symbol_level=0"
- "v8_symbol_level=0"
- )
- fi
-
- if use bindist ; then
- myconf_gn+=(
- # If this is set to false Chromium won't be able to load any proprietary codecs
- # even if provided with an ffmpeg capable of h264/aac decoding
- "proprietary_codecs=true"
- 'ffmpeg_branding="Chrome"'
- # build ffmpeg as an external component (libffmpeg.so) that we can remove / substitute
- "is_component_ffmpeg=true"
- )
- else
- myconf_gn+=(
- "proprietary_codecs=$(usex proprietary-codecs true false)"
- "ffmpeg_branding=\"$(usex proprietary-codecs Chrome Chromium)\""
- )
- fi
-
- if use headless; then
- myconf_gn+=(
- "enable_print_preview=false"
- "enable_remoting=false"
- 'ozone_platform="headless"'
- "rtc_use_pipewire=false"
- "use_alsa=false"
- "use_cups=false"
- "use_gio=false"
- "use_glib=false"
- "use_gtk=false"
- "use_kerberos=false"
- "use_libpci=false"
- "use_pangocairo=false"
- "use_pulseaudio=false"
- "use_qt5=false"
- "use_qt6=false"
- "use_udev=false"
- "use_vaapi=false"
- "use_xkbcommon=false"
- )
- else
- myconf_gn+=(
- "gtk_version=$(usex gtk4 4 3)"
- # link pulseaudio directly (DT_NEEDED) instead of using dlopen.
- # helps with automated detection of ABI mismatches and prevents silent errors.
- "link_pulseaudio=$(usex pulseaudio true false)"
- "ozone_platform_wayland=$(usex wayland true false)"
- "ozone_platform_x11=$(usex X true false)"
- "ozone_platform=\"$(usex wayland wayland x11)\""
- "rtc_use_pipewire=$(usex screencast true false)"
- "use_cups=$(usex cups true false)"
- "use_kerberos=$(usex kerberos true false)"
- "use_pulseaudio=$(usex pulseaudio true false)"
- "use_qt5=false"
- "use_system_libffi=$(usex wayland true false)"
- "use_system_minigbm=true"
- "use_vaapi=$(usex vaapi true false)"
- "use_xkbcommon=true"
- )
- if use qt6; then
- local cbuild_libdir
- cbuild_libdir="$(get_libdir)"
- if tc-is-cross-compiler; then
- # Hack to workaround get_libdir not being able to handle CBUILD, bug #794181
- cbuild_libdir="$($(tc-getBUILD_PKG_CONFIG) --keep-system-libs --libs-only-L libxslt)"
- cbuild_libdir="${cbuild_libdir:2}"
- cbuild_libdir="${cbuild_libdir/% }"
- fi
- myconf_gn+=(
- "use_qt6=true"
- "moc_qt6_path=\"${EPREFIX}/usr/${cbuild_libdir}/qt6/libexec\""
- )
- else
- myconf_gn+=( "use_qt6=false" )
- fi
- fi
-
- # Explicitly disable ICU data file support for system-icu/headless builds.
- if use system-icu || use headless; then
- myconf_gn+=( "icu_use_data_file=false" )
- fi
-
- if use official; then
- # Allow building against system libraries in official builds
- sed -i 's/OFFICIAL_BUILD/GOOGLE_CHROME_BUILD/' \
- tools/generate_shim_headers/generate_shim_headers.py || die
- # Don't add symbols to build
- myconf_gn+=( "symbol_level=0" )
- fi
-
- if use pgo; then
- myconf_gn+=(
- "chrome_pgo_phase=2"
- "v8_enable_builtins_optimization=true"
- )
- else
- myconf_gn+=( "chrome_pgo_phase=0" )
- fi
-
- # Odds and ends
-
- # skipping typecheck is only supported on amd64, bug #876157
- if ! use amd64; then
- myconf_gn+=( "devtools_skip_typecheck=false" )
- fi
-
- # Disable external code space for V8 for ppc64. It is disabled for ppc64
- # by default, but cross-compiling on amd64 enables it again.
- if tc-is-cross-compiler && use ppc64; then
- myconf_gn+=( "v8_enable_external_code_space=false" )
- fi
-
- # This determines whether or not GN uses the bundled libcxx
- if use libcxx; then
- myconf_gn+=( "use_custom_libcxx=true" )
- else
- myconf_gn+=(
- "use_custom_libcxx=false"
- "use_llvm_libatomic=false"
- )
- append-cppflags -U_GLIBCXX_ASSERTIONS #See #318
- fi
-
- myconf_gn+=( "use_bluez=$(usex bluetooth true false)" )
-
- myconf_gn+=( "is_cfi=$(usex cfi true false)" )
-
- if use cfi; then
- myconf_gn+=(
- "use_cfi_icall=true"
- "use_cfi_cast=true"
- )
- fi
-
- myconf_gn+=(
- "optimize_webui=$(usex optimize-webui true false)"
- "use_system_freetype=$(usex system-harfbuzz true false)"
- "use_system_libopenjpeg2=$(usex system-openjpeg true false)"
- "enable_pdf=true"
- "use_system_lcms2=true"
- "enable_print_preview=true"
- "use_thin_lto=$(usex thinlto true false)"
- "thin_lto_enable_optimizations=$(usex optimize-thinlto true false)"
-
- # Ungoogled flags
- "build_with_tflite_lib=false"
- "enable_mdns=false"
- "enable_mse_mpeg2ts_stream_parser=$(usex proprietary-codecs true false)"
- "enable_remoting=false"
- "enable_reporting=false"
- "enable_service_discovery=false"
- "exclude_unwind_tables=true"
- "google_api_key=\"\""
- "google_default_client_id=\"\""
- "google_default_client_secret=\"\""
- "safe_browsing_mode=0"
- "use_official_google_api_keys=false"
- "use_unofficial_version_number=false"
-
- # "enable_swiftshader=false"
-
- # Additional flags
- # "perfetto_use_system_zlib=true"
- # "use_system_zlib=true"
- # "use_system_libjpeg=true"
- # "rtc_build_examples=false"
- # "enable_chromium_prelude=false"
- # "enable_updater=false"
- # "enable_update_notifications=false"
- # "enable_constraints=false"
- # "rtc_rusty_base64=false"
- # "v8_enable_temporal_support=false"
- # "media_use_symphonia=false"
- # "pdf_enable_rust_png=false"
- # "skia_use_libpng_encode=true"
- # "skia_use_libpng_decode=true"
- # "skia_use_rust_png_decode=false"
- # "skia_use_rust_png_encode=false"
- # "enable_jxl_decoder=false"
- )
-
- if use amd64 || use arm64; then
- myconf_gn+=(
- "v8_drumbrake_bounds_checks=true"
- "v8_enable_drumbrake=true"
- )
- fi
-
- if use thinlto; then
- # We need to change the default value of import-instr-limit in
- # LLVM to limit the text size increase. The default value is
- # 100, and we change it to 30 to reduce the text size increase
- # from 25% to 10%. The performance number of page_cycler is the
- # same on two of the thinLTO configurations, we got 1% slowdown
- # on speedometer when changing import-instr-limit from 100 to 30.
- # append-ldflags "-Wl,-plugin-opt,-import-instr-limit=30"
- sed -i '/import_instr_limit = 5/{s++import_instr_limit = 30+;h};${x;/./{x;q0};x;q1}' \
- build/config/compiler/BUILD.gn || die
-
- append-ldflags "-Wl,--thinlto-jobs=$(makeopts_jobs)"
- fi
-
- # Facilitate deterministic builds (taken from build/config/compiler/BUILD.gn)
- append-cflags -Wno-builtin-macro-redefined
- append-cxxflags -Wno-builtin-macro-redefined
- append-cppflags "-D__DATE__= -D__TIME__= -D__TIMESTAMP__="
-
- local flags
- einfo "Building with the following compiler settings:"
- for flags in C{C,XX} AR NM RANLIB {C,CXX,CPP,LD}FLAGS \
- EXTRA_GN UGC_{SKIP_{PATCHES,SUBSTITUTION},KEEP_BINARIES} ; do
- einfo " ${flags} = \"${!flags}\""
- done
-
- # Since we build from tarballs, we need to set the channel here so that it can be used in the build.
- export CHROME_VERSION_EXTRA="${SLOT}"
-
- einfo "Configuring Chromium ..."
- set -- gn gen --args="${myconf_gn[*]}${EXTRA_GN:+ ${EXTRA_GN}}" out/Release
- echo "$@"
- "$@" || die "Failed to configure Chromium"
-
- # The "if" below should not be executed unless testing
- if [ ! -z "${NODIE}" ]; then
- # List all args
- # gn args --list out/Release
-
- # Quick compiler check
- eninja -C out/Release protoc torque
- fi
-}
-
-src_compile() {
- # Final link uses lots of file descriptors.
- ulimit -n 2048
-
- # Calling this here supports resumption via FEATURES=keepwork
- python_setup
- # I hate doing this but upstream Rust have yet to come up with a better solution for
- # us poor packagers. Required for Split LTO units, which are required for CFI.
- export RUSTC_BOOTSTRAP=1
-
- # Don't inherit PYTHONPATH from environment, bug #789021, #812689
- local -x PYTHONPATH=
-
- # Build mksnapshot and pax-mark it.
- if use pax-kernel; then
- local x
- for x in mksnapshot v8_context_snapshot_generator code_cache_generator; do
- if tc-is-cross-compiler; then
- eninja -C out/Release "host/${x}"
- pax-mark m "out/Release/host/${x}"
- else
- eninja -C out/Release "${x}"
- pax-mark m "out/Release/${x}"
- fi
- done
- fi
-
- # Even though ninja autodetects number of CPUs, we respect
- # user's options, for debugging with -j 1 or any other reason.
- eninja -C out/Release chrome chrome_sandbox $(use test && echo "base_unittests")
-
- pax-mark m out/Release/chrome
-
- # This codepath does minimal patching, so we're at the mercy of upstream
- # CFLAGS. This is fine - we're not intending to force this on users
- # and we do a lot of flag 'management' anyway.
- if use bundled-toolchain; then
- QA_FLAGS_IGNORED="
- usr/lib64/chromium-browser/chrome
- usr/lib64/chromium-browser/chrome-sandbox
- usr/lib64/chromium-browser/chromedriver
- usr/lib64/chromium-browser/chrome_crashpad_handler
- usr/lib64/chromium-browser/libEGL.so
- usr/lib64/chromium-browser/libGLESv2.so
- usr/lib64/chromium-browser/libVkICD_mock_icd.so
- usr/lib64/chromium-browser/libVkLayer_khronos_validation.so
- usr/lib64/chromium-browser/libqt6_shim.so
- usr/lib64/chromium-browser/libvk_swiftshader.so
- usr/lib64/chromium-browser/libvulkan.so.1
- "
- fi
-
- use convert-dict && eninja -C out/Release convert_dict
-
- use enable-driver && eninja -C out/Release chromedriver
- #use suid && eninja -C out/Release chrome_sandbox
-
- use enable-driver && mv out/Release/chromedriver{.unstripped,}
-
- rm -f out/Release/locales/*.pak.info || die
-
- # Generate support files (desktop file, manpage, etc.) See: #684550 #706786 #968958
- ${EPYTHON} "${FILESDIR}/generate-support-files.py" \
- --installdir "/usr/$(get_libdir)/ungoogled-chromium-browser" \
- --channel "${SLOT}" ||
- die "Failed to generate support files"
-}
-
-src_test() {
- # Tests may be flaky with usersandbox, and the test runner executes significantly faster without.
- # If you seem to be excluding too many tests for a particular milestone: comment them out, reboot, and
- # run the tests again. If that doesn't help, try FEATURES="-usersandbox" and send it because obviously the
- # chromium gods are not smiling upon you today. Do some runtime testing, obvs.
- local skip_tests=(
- # Wildcard exclusions (if all tests in a test suite are broken)
- 'AlternateTestParams/PartitionAllocDeathTest.RepeatedAllocReturnNullDirect/*'
- 'AlternateTestParams/PartitionAllocDeathTest.RepeatedReallocReturnNullDirect/*'
- 'AlternateTestParams/PartitionAllocTest.*' # 200+ tests, >= 1 crashes entire test runner with usersandbox.
- 'CheckExitCodeAfterSignalHandlerDeathTest.*'
- 'CriticalProcessAndThreadSpotChecks/HangWatcherAnyCriticalThreadTests.*'
- 'LazyThreadPoolTaskRunnerEnvironmentTest.*' # M142
- 'ToolsSanityTest.BadVirtualCall*'
- # requires en-us locale
- SysStrings.SysNativeMBAndWide
- SysStrings.SysNativeMBToWide
- SysStrings.SysWideToNativeMB
- # Specific test cases
- CancelableEventTest.BothCancelFailureAndSucceedOccurUnderContention
- FilePathTest.FromUTF8Unsafe_And_AsUTF8Unsafe
- HistogramTesterTest.PumaTestUniqueSample
- PathServiceTest.CheckedGetFailure
- PlatformThreadTest.CanChangeThreadType
- RawPtrTest.SetLookupUsesGetForComparison # M146 ; also broken for alpine in M144.
- RustLogIntegrationTest.CheckAllSeverity
- StackCanary.ChangingStackCanaryCrashesOnReturn
- StackTraceDeathTest.StackDumpSignalHandlerIsMallocFree
- TestLauncherTools.TruncateSnippetFocusedMatchesFatalMessagesTest
- ThreadPoolEnvironmentConfig.CanUseBackgroundPriorityForWorker
- # M148 Beta
- RunUntilTestWithMockTime.ConditionOnlyObservedIfWorkIsDone
- )
- local test_filter="-$(IFS=:; printf '%s' "${skip_tests[*]}")"
- # test-launcher-bot-mode enables parallelism and plain output
- # Check individual tests with --gtest_filter=<test you want> --single-process-tests
- ./out/Release/base_unittests --test-launcher-bot-mode \
- --test-launcher-jobs="$(get_makeopts_jobs)" \
- --gtest_filter="${test_filter}" || die "Tests failed!"
-}
-
-src_install() {
- local browser_suffix
- if [[ "${SLOT}" != "stable" ]]; then
- browser_suffix="-${SLOT}"
- else
- browser_suffix=""
- fi
- local CHROMIUM_HOME="/usr/$(get_libdir)/ungoogled-chromium-browser${browser_suffix}"
- exeinto "${CHROMIUM_HOME}"
- doexe out/Release/chrome
-
- #newexe out/Release/chrome_sandbox chrome-sandbox
- #fperms 4755 "${CHROMIUM_HOME}/chrome-sandbox"
-
- use enable-driver && doexe out/Release/chromedriver
-
- #* https://github.com/ungoogled-software/ungoogled-chromium/pull/3563
- doexe out/Release/chrome_crashpad_handler
-
- if use convert-dict; then
- newexe "${FILESDIR}/update-dicts.sh" update-dicts.sh
- doexe out/Release/convert_dict
- fi
-
- ozone_auto_session () {
- use X && use wayland && ! use headless && echo true || echo false
- }
-
- cat <<- EOF > "${D}${CHROMIUM_HOME}/chromium-launcher.sh" || die
- #!/bin/bash
- # Wrapper to launch slotted Chromium via the chromium-common launcher script.
- export CHROME_DESKTOP="ungoogled-chromium-browser${browser_suffix}.desktop"
- export CHROME_EXEC_NAME="ungoogled-chromium-browser${browser_suffix}"
- export CHROME_VERSION_EXTRA="${SLOT}"
- export CHROME_WRAPPER="\$(readlink -f "\$0")"
- export OZONE_AUTO_SESSION=$(ozone_auto_session)
-
- exec /usr/libexec/chromium/chromium-launcher.sh "\$@"
- EOF
-
- chmod 755 "${D}${CHROMIUM_HOME}/chromium-launcher.sh" || die
-
- # It is important that we name the target "chromium-browser",
- # xdg-utils expect it; bug #355517.
- dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/ungoogled-chromium-browser${browser_suffix}
- # keep the old symlink around for consistency
- dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/ungoogled-chromium${browser_suffix}
-
- use enable-driver && dosym "${CHROMIUM_HOME}/chromedriver" /usr/bin/ungoogled-chromedriver${browser_suffix}
-
- pushd out/Release/locales > /dev/null || die
- chromium_remove_language_paks
- popd > /dev/null || die
-
- insinto "${CHROMIUM_HOME}"
- doins out/Release/*.bin
- doins out/Release/*.pak
- doins -r out/Release/hyphen-data
-
- if use bindist; then
- # We built libffmpeg as a component library, but we can't distribute it
- # with proprietary codec support. Remove it and make a symlink to the requested
- # system library.
- rm -f out/Release/libffmpeg.so \
- || die "Failed to remove bundled libffmpeg.so (with proprietary codecs)"
- # symlink the libffmpeg.so from either ffmpeg-chromium or ffmpeg[chromium].
- einfo "Creating symlink to libffmpeg.so from $(usex ffmpeg-chromium ffmpeg-chromium ffmpeg[chromium])..."
- dosym ../chromium/libffmpeg.so$(usex ffmpeg-chromium .${PV%%\.*} "") \
- /usr/$(get_libdir)/ungoogled-chromium-browser/libffmpeg.so
- fi
-
- (
- shopt -s nullglob
- local files=(out/Release/*.so out/Release/*.so.[0-9])
- [[ ${#files[@]} -gt 0 ]] && doins "${files[@]}"
- )
-
- if ! use system-icu && ! use headless; then
- doins out/Release/icudtl.dat
- fi
-
- doins -r out/Release/locales
- #doins -r out/Release/MEIPreload
-
- # Install vk_swiftshader_icd.json; bug #827861
- doins out/Release/vk_swiftshader_icd.json
-
- if [[ -d out/Release/swiftshader ]]; then
- insinto "${CHROMIUM_HOME}/swiftshader"
- doins out/Release/swiftshader/*.so
- fi
-
- use widevine && dosym WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so "${CHROMIUM_HOME}/libwidevinecdm.so"
-
- # Install icons
- local branding size
- for size in 16 24 32 48 64 128 256 ; do
- case ${size} in
- 16|32) branding="chrome/app/theme/default_100_percent/chromium" ;;
- *) branding="chrome/app/theme/chromium" ;;
- esac
- newicon -s ${size} "${branding}/product_logo_${size}.png" \
- ungoogled-chromium-browser${browser_suffix}.png
- done
-
- # Install desktop entry
- domenu out/Release/ungoogled-chromium-browser${browser_suffix}.desktop
-
- # Install GNOME default application entry (bug #303100).
- insinto /usr/share/gnome-control-center/default-apps
- doins out/Release/ungoogled-chromium-browser${browser_suffix}.xml
-
- # Install AppStream metadata
- insinto /usr/share/appdata
- doins out/Release/ungoogled-chromium-browser${browser_suffix}.appdata.xml
-
- # Install manpage; bug #684550
- doman out/Release/ungoogled-chromium-browser${browser_suffix}.1
- dosym ungoogled-chromium-browser${browser_suffix}.1 /usr/share/man/man1/ungoogled-chromium${browser_suffix}.1
-
- readme.gentoo_create_doc
-}
-
-pkg_postrm() {
- xdg_icon_cache_update
- xdg_desktop_database_update
-}
-
-pkg_postinst() {
- xdg_icon_cache_update
- xdg_desktop_database_update
- readme.gentoo_print_elog
-
- if use !headless && [[ -z "${REPLACING_VERSIONS}" ]]; then
- if use vaapi; then
- elog "Hardware-accelerated video decoding configuration:"
- elog
- elog "Chromium supports multiple backends for hardware acceleration. To enable one,"
- elog " Add to CHROMIUM_FLAGS in /etc/chromium/default:"
- elog
- elog "1. VA-API with OpenGL (recommended for most users):"
- elog " --enable-features=AcceleratedVideoDecodeLinuxGL"
- elog " VaapiVideoDecoder may need to be added as well, but try without first."
- elog
- if use wayland; then
- elog "2. Enhanced Wayland/EGL performance:"
- elog " --enable-features=AcceleratedVideoDecodeLinuxGL,AcceleratedVideoDecodeLinuxZeroCopyGL"
- elog
- fi
- if use X; then
- elog "$(usex wayland "3" "2"). VA-API with Vulkan:"
- elog " --enable-features=VaapiVideoDecoder,VaapiIgnoreDriverChecks,Vulkan,DefaultANGLEVulkan,VulkanFromANGLE"
- elog
- if use wayland; then
- elog " NOTE: Vulkan acceleration requires X11 and will not work under Wayland sessions."
- elog " Use OpenGL-based acceleration instead when running under Wayland."
- elog
- fi
- fi
- elog "Additional options:"
- elog " To enable hardware-accelerated encoding (if supported)"
- elog " add 'AcceleratedVideoEncoder' to your feature list"
- elog " VaapiIgnoreDriverChecks bypasses driver compatibility checks"
- elog " (may be needed for newer/unsupported hardware)"
- elog
- else
- elog "This Chromium build was compiled without VA-API support, which provides"
- elog "hardware-accelerated video decoding."
- fi
- if use screencast; then
- elog "Screencast is disabled by default at runtime. Either enable it"
- elog "by navigating to chrome://flags/#enable-webrtc-pipewire-capturer"
- elog "inside Chromium or add --enable-features=WebRTCPipeWireCapturer"
- elog "to CHROMIUM_FLAGS in /etc/chromium/default."
- elog
- elog "Additional setup may be required for screencasting to work."
- elog "See issue: https://github.com/PF4Public/gentoo-overlay/issues/314"
- fi
- if use gtk4; then
- elog "Chromium prefers GTK3 over GTK4 at runtime. To override this"
- elog "behaviour you need to pass --gtk-version=4, e.g. by adding it"
- elog "to CHROMIUM_FLAGS in /etc/chromium/default."
- fi
- if use widevine; then
- elog "widevine requires binary plugins, which are distributed separately"
- elog "Make sure you have www-plugins/chrome-binary-plugins installed"
- fi
- fi
-
- if systemd_is_booted && ! [[ -f "/etc/machine-id" ]]; then
- ewarn "The lack of an '/etc/machine-id' file on this system booted with systemd"
- ewarn "indicates that the Gentoo handbook was not followed to completion."
- ewarn ""
- ewarn "Chromium is known to behave unpredictably with this system configuration;"
- ewarn "please complete the configuration of this system before logging any bugs."
- fi
-
- # Stable slot doesn't change profile directory, and it's vanishingly unlikely that users will downgrade from dev.
- if [[ -n "${REPLACING_VERSIONS}" ]]; then
- local replacing_non_slotted=false
- # there could be more than one PVR
- for version in ${REPLACING_VERSIONS}; do
- if ver_test "${version}" -le "145.0.7632.116"; then
- replacing_non_slotted=true
- break
- fi
- done
- if ${replacing_non_slotted}; then
- ewarn "This version of Chromium has replaced a non-slotted ebuild."
- if [[ ${SLOT} != "stable" ]]; then
- ewarn "This channel has its own profile directory, so your existing profile will not be used."
- ewarn "To use your existing profile, either copy or move it to the new location."
- ewarn "See https://wiki.gentoo.org/wiki/Chromium#Profile_Directories for more information."
- ewarn ""
- fi
- ewarn "Any existing Progressive Web Apps (PWAs) will need to be reinstalled,"
- ewarn "or have the path in the desktop files updated to point to the new wrapper script."
- fi
- fi
-}
-
-eapply_wrapper () {
- if [ ! -z "${NODIE}" ]; then
- nonfatal eapply "$@"
- else
- eapply "$@"
- fi
-}
-
-git_wrapper () {
- if [ ! -z "${NODIE}" ]; then
- git "$@"
- else
- git "$@" || die
- fi
-}
-
-filter_wrapper () {
- einfo "Applying ${i##*/}"
- #? fuzz factor of 3 is OK?
- if [ ! -z "${NODIE}" ]; then
- filterdiff -p1 "${@:2}" < "$1" | patch -F 3 -p1
- else
- filterdiff -p1 "${@:2}" < "$1" | patch -F 3 -p1 || die
- fi
-}
diff --git a/www-client/ungoogled-chromium/ungoogled-chromium-149.0.7827.102_p1.ebuild b/www-client/ungoogled-chromium/ungoogled-chromium-149.0.7827.102_p1.ebuild
deleted file mode 100644
index b383d3b160b7..000000000000
--- a/www-client/ungoogled-chromium/ungoogled-chromium-149.0.7827.102_p1.ebuild
+++ /dev/null
@@ -1,2512 +0,0 @@
-# Copyright 2009-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-# Use following environment variables to customise the build
-# EXTRA_GN — pass extra options to gn
-# NINJAOPTS="-k0 -j8" useful to populate ccache even if ebuild is still failing
-# UGC_SKIP_PATCHES — space-separated list of patches to skip
-# UGC_KEEP_BINARIES — space-separated list of binaries to keep
-# UGC_SKIP_SUBSTITUTION — space-separated list of files to skip domain substitution
-
-# USE=bundled-toolchain is intended for users who want to use the same toolchain
-# as the upstream releases. It's also a good fallback in case we fall behind
-# and need to get a release out quickly (less likely with `dev` in-tree).
-# We can't rely on it as a default since the toolchain is only shipped for x86-64;
-# other architectures will need to use system toolchain.
-
-# Since m133 we are using CI-generated tarballs from
-# https://github.com/chromium-linux-tarballs/chromium-tarballs/
-
-# These are bit-for-bit identical to the official releases, but are built
-# using an external CI system that we have some control over, in case
-# issues pop up again with official tarball generation.
-
-GN_MIN_VER=0.2374
-# chromium-tools/get-chromium-toolchain-strings.py (or just use Chromicler)
-# Node for M145+ should be 24.12.0 but that's not packaged in Gentoo yet. See #969145
-TEST_FONT="9c07d19d9c5ee1ff94f717e6fb17e0c8c354e6f9"
-BUNDLED_CLANG_VER="llvmorg-23-init-10931-g20b6ec66-8"
-BUNDLED_RUST_VER="4c4205163abcbd08948b3efab796c543ba1ea687-2"
-RUST_SHORT_HASH=${BUNDLED_RUST_VER:0:10}-${BUNDLED_RUST_VER##*-}
-NODE_VER="24.12.0"
-ESBUILD_VER="0.25.1"
-ROLLUP_VER="4.57.1" # currently manual.
-
-CHROMIUM_LANGS="af am ar as az be bg bn bs ca cs cy da de el en-GB es es-419 et eu fa fi fil
- fr fr-CA gl gu he hi hr hu hy id is it ja ka kk km kn ko ky lo lt lv mk ml mn mr ms my
- nb ne nl or pa pl pt-BR pt-PT ro ru si sk sl sq sr sr-Latn sv sw ta te th tr uk ur uz
- vi zh-CN zh-HK zh-TW zu"
-
-UGC_COMMIT_ID="4d7bb965938b072e1dc7d9a5fa26121805f97fc8"
-# UGC_PR_COMMITS=(
-# c917e096342e5b90eeea91ab1f8516447c8756cf
-# 5794e9d12bf82620d5f24505798fecb45ca5a22d
-# )
-
-CROMITE_COMMIT_ID="cb3baf14f52eb4365d017f640f85310735c19b79"
-
-#declare -A CHROMIUM_COMMITS=(
-# ["fcfb1a42813f1e9d8babedc7bb2e0f06101a3151"]="." #148+
-# ["-acb47d9a6b56c4889a2ed4216e9968cfc740086c"]="."
-# # ["-37c28a19804e47a68eabf3cf882a310689fc325b"]="." #disable style check for cromite
-# # ["cd5a0df905a28faa89ff2a4ab44f893f84dc4487"]="net/third_party/quiche/src"
-#)
-
-LLVM_COMPAT=( 21 22 23 )
-PYTHON_COMPAT=( python3_{13..14} )
-PYTHON_REQ_USE="xml(+)"
-RUST_MIN_VER=1.91.0
-RUST_NEEDS_LLVM="yes please"
-RUST_OPTIONAL="yes" # Not actually optional, but we don't need system Rust (or LLVM) with USE=bundled-toolchain
-RUST_REQ_USE="rustfmt" # Upstream run rustfmt on bindgen output, so we need it to be available.
-
-inherit check-reqs chromium-2 desktop flag-o-matic llvm-r1 multiprocessing ninja-utils pax-utils
-inherit python-any-r1 readme.gentoo-r1 rust systemd toolchain-funcs xdg-utils
-
-DESCRIPTION="Modifications to Chromium for removing Google integration and enhancing privacy"
-HOMEPAGE="https://github.com/ungoogled-software/ungoogled-chromium"
-PPC64_HASH="a85b64f07b489b8c6fdb13ecf79c16c56c560fc6"
-PATCH_V="${PV%%\.*}-2"
-COPIUM_COMMIT="b00f26bb5e0781020da5f830981472a142c6baf1"
-SRC_URI="https://github.com/chromium-linux-tarballs/chromium-tarballs/releases/download/${PV/_*}/chromium-${PV/_*}-linux.tar.xz
- https://deps.gentoo.zip/www-client/chromium/rollup-wasm-node-${ROLLUP_VER}.tgz
- https://gitlab.com/Matt.Jolly/chromium-patches/-/archive/${PATCH_V}/chromium-patches-${PATCH_V}.tar.bz2
- !bundled-toolchain? (
- https://codeberg.org/selfisekai/copium/archive/${COPIUM_COMMIT}.tar.gz
- -> chromium-patches-copium-${COPIUM_COMMIT:0:10}.tar.gz
- )
- bundled-toolchain? (
- https://commondatastorage.googleapis.com/chromium-browser-clang/Linux_x64/clang-${BUNDLED_CLANG_VER}.tar.xz
- -> chromium-clang-${BUNDLED_CLANG_VER}.tar.xz
- https://commondatastorage.googleapis.com/chromium-browser-clang/Linux_x64/rust-toolchain-${BUNDLED_RUST_VER}-${BUNDLED_CLANG_VER%-*}.tar.xz
- -> chromium-rust-toolchain-${RUST_SHORT_HASH}-${BUNDLED_CLANG_VER%-*}.tar.xz
- )
- test? (
- https://chromium-fonts.storage.googleapis.com/${TEST_FONT} -> chromium-testfonts-${TEST_FONT:0:10}.tar.gz
- )
- ppc64? (
- https://gitlab.raptorengineering.com/raptor-engineering-public/chromium/openpower-patches/-/archive/${PPC64_HASH}/openpower-patches-${PPC64_HASH}.tar.bz2 -> chromium-openpower-${PPC64_HASH:0:10}.tar.bz2
- )
-"
-
-# Gentoo tarball:
-# https://chromium-tarballs.distfiles.gentoo.org/chromium-${PV/_*}.tar.xz -> chromium-${PV/_*}-gentoo.tar.xz
-
-# chromium-linux-tarballs
-# https://github.com/chromium-linux-tarballs/chromium-tarballs/releases/download/${PV/_*}/chromium-${PV/_*}-linux.tar.xz
-
-# Official tarball:
-# https://commondatastorage.googleapis.com/chromium-browser-official/chromium-${PV/_*}${LITE_TARBALL:+-lite}.tar.xz
-
-# https://gitweb.gentoo.org/proj/chromium-tools.git/tree/get-chromium-licences.py @ 145.0.7632.76
-LICENSE="Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD BSD-2 Base64 Boost-1.0 CC-BY-3.0 CC-BY-4.0 Clear-BSD FFT2D FTL"
-LICENSE+=" IJG ISC LGPL-2 LGPL-2.1 MIT MPL-1.1 MPL-2.0 Ms-PL PSF-2 SGI-B-2.0 SSLeay SunSoft Unicode-3.0"
-LICENSE+=" Unicode-DFS-2015 Unlicense UoI-NCSA ZLIB libtiff openssl"
-LICENSE+=" cromite? ( GPL-3 )"
-
-SLOT="beta"
-KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
-
-IUSE_SYSTEM_LIBS="abseil-cpp av1 brotli crc32c double-conversion ffmpeg +harfbuzz icu jsoncpp +libusb libvpx +openh264 openjpeg re2 snappy woff2 +zstd"
-IUSE="+X bindist bluetooth bundled-toolchain cfi convert-dict cups custom-cflags debug ffmpeg-chromium enable-driver gtk4 hangouts headless kerberos +libcxx nvidia +official optimize-thinlto optimize-webui override-data-dir pax-kernel pgo"
-IUSE+=" +proprietary-codecs pulseaudio qt6 screencast selinux test thinlto cromite vaapi wayland widevine cpu_flags_ppc_vsx3"
-RESTRICT="
- !bindist? ( bindist )
- !test? ( test )
- arm64? ( test )
- !system-ffmpeg? ( proprietary-codecs? ( bindist ) )
- !system-openh264? ( bindist )
- cromite? ( bindist )"
-
-REQUIRED_USE="
- !headless? ( || ( X wayland ) )
- screencast? ( wayland )
- ffmpeg-chromium? ( bindist proprietary-codecs )
- optimize-thinlto? ( thinlto )
- cfi? ( thinlto )
- x86? ( !thinlto !widevine )
- debug? ( !official )
- vaapi? ( !system-av1 !system-libvpx )
-"
-
-UGC_PV="${PV/_p/-}"
-UGC_PF="${PN}-${UGC_PV}"
-UGC_URL="https://github.com/ungoogled-software/${PN}/archive/"
-
-if [ -z "$UGC_COMMIT_ID" ]; then
- UGC_URL="${UGC_URL}${UGC_PV}.tar.gz -> ${UGC_PF}.tar.gz"
- UGC_WD="${WORKDIR}/${UGC_PF}"
-else
- UGC_URL="${UGC_URL}${UGC_COMMIT_ID}.tar.gz -> ${PN}-${UGC_COMMIT_ID}.tar.gz"
- UGC_WD="${WORKDIR}/ungoogled-chromium-${UGC_COMMIT_ID}"
-fi
-
-SRC_URI+="${UGC_URL}
-"
-
-if [ ! -z "${UGC_PR_COMMITS[*]}" ]; then
- for i in "${UGC_PR_COMMITS[@]}"; do
- SRC_URI+="https://github.com/ungoogled-software/${PN}/commit/$i.patch?full_index=true -> ${PN}-$i.patch
- "
- done
-fi
-
-if [ ! -z "${CHROMIUM_COMMITS[*]}" ]; then
- # for i in "${CHROMIUM_COMMITS[@]}"; do
- for i in "${!CHROMIUM_COMMITS[@]}"; do
- if [[ ${CHROMIUM_COMMITS[$i]} =~ webrtc ]]; then
- #TODO: is it safe to use this mirror?
- SRC_URI+="https://github.com/webrtc-mirror/webrtc/commit/${i/-}.patch?full_index=true -> webrtc-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ angle ]]; then
- SRC_URI+="https://github.com/google/angle/commit/${i/-}.patch?full_index=true -> angle-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ quiche ]]; then
- SRC_URI+="https://github.com/google/quiche/commit/${i/-}.patch?full_index=true -> quiche-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ dawn ]]; then
- SRC_URI+="https://github.com/google/dawn/commit/${i/-}.patch?full_index=true -> dawn-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ perfetto ]]; then
- SRC_URI+="https://github.com/google/perfetto/commit/${i/-}.patch?full_index=true -> perfetto-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ink ]]; then
- SRC_URI+="https://github.com/google/ink/commit/${i/-}.patch?full_index=true -> ink-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ vulkan-utility-libraries ]]; then
- SRC_URI+="https://github.com/KhronosGroup/Vulkan-Utility-Libraries/commit/${i/-}.patch?full_index=true -> vulkan-utility-libraries-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ruy ]]; then
- SRC_URI+="https://github.com/google/ruy/commit/${i/-}.patch?full_index=true -> ruy-${i/-}.patch
- "
- else
- SRC_URI+="https://github.com/chromium/chromium/commit/${i/-}.patch?full_index=true -> chromium-${i/-}.patch
- "
- fi
- done
-fi
-
-SRC_URI+="cromite? ( https://github.com/uazo/cromite/archive/${CROMITE_COMMIT_ID}.tar.gz -> cromite-${CROMITE_COMMIT_ID}.tar.gz )
-"
-
-for i in ${IUSE_SYSTEM_LIBS}; do
- [[ $i =~ ^(\+)?(.*)$ ]]
- IUSE+=" ${BASH_REMATCH[1]}system-${BASH_REMATCH[2]}"
-done
-
-COMMON_X_DEPEND="
- x11-libs/libXcomposite:=
- x11-libs/libXcursor:=
- x11-libs/libXdamage:=
- x11-libs/libXfixes:=
- >=x11-libs/libXi-1.6.0:=
- x11-libs/libXrandr:=
- x11-libs/libXrender:=
- x11-libs/libXtst:=
- x11-libs/libxshmfence:=
-"
-
-# sys-libs/zlib: https://bugs.gentoo.org/930365; -ng is not compatible.
-# We _could_ use the bundled minizip, but that's against policy.
-COMMON_SNAPSHOT_DEPEND="
- system-icu? ( >=dev-libs/icu-78:= )
- system-abseil-cpp? ( >=dev-cpp/abseil-cpp-20260107.0 )
- system-brotli? ( >=app-arch/brotli-9999 )
- system-crc32c? ( dev-libs/crc32c )
- system-double-conversion? ( dev-libs/double-conversion )
- system-woff2? ( media-libs/woff2 )
- system-snappy? ( app-arch/snappy )
- system-jsoncpp? ( dev-libs/jsoncpp )
- system-openjpeg? ( media-libs/openjpeg:2= )
- system-re2? ( >=dev-libs/re2-0.2019.08.01:= )
- system-libvpx? ( >=media-libs/libvpx-1.13.0:=[postproc] )
- system-libusb? ( virtual/libusb:1 )
- cromite? ( dev-util/patchutils )
- >=dev-libs/libxml2-2.12.4:=[icu]
- dev-libs/nspr:=
- >=dev-libs/nss-3.26:=
- dev-libs/libxslt:=
- media-libs/fontconfig:=
- >=media-libs/freetype-2.11.0-r1:=
- system-harfbuzz? ( >=media-libs/harfbuzz-3:0=[icu(-)] )
- media-libs/libjpeg-turbo:=
- media-libs/libpng:=
- system-zstd? ( >=app-arch/zstd-1.5.5:= )
- >=media-libs/libwebp-0.4.0:=
- media-libs/mesa:=[gbm(+)]
- >=media-libs/openh264-2.6.0:=
- system-av1? (
- >=media-libs/dav1d-1.0.0:=
- >=media-libs/libaom-3.7.0:=
- )
- sys-libs/zlib:=
- !headless? (
- dev-libs/glib:2
- >=media-libs/alsa-lib-1.0.19:=
- pulseaudio? (
- || (
- media-libs/libpulse
- >=media-sound/apulse-0.1.9
- )
- )
- sys-apps/pciutils:=
- kerberos? ( virtual/krb5 )
- vaapi? ( >=media-libs/libva-2.7:=[X?,wayland?] )
- X? (
- x11-base/xorg-proto:=
- x11-libs/libX11:=
- x11-libs/libxcb:=
- x11-libs/libXext:=
- )
- x11-libs/libxkbcommon:=
- wayland? (
- dev-libs/libffi:=
- dev-libs/wayland:=
- screencast? (
- media-video/pipewire:=
- || (
- sys-apps/xdg-desktop-portal-gnome
- sys-apps/xdg-desktop-portal-gtk
- kde-plasma/xdg-desktop-portal-kde
- gui-libs/xdg-desktop-portal-lxqt
- gui-libs/xdg-desktop-portal-wlr
- )
- )
- )
- )
-"
-
-COMMON_DEPEND="
- ${COMMON_SNAPSHOT_DEPEND}
- app-arch/bzip2:=
- dev-libs/expat:=
- system-ffmpeg? (
- >=media-video/ffmpeg-6.1:=
- >=media-libs/opus-1.3.1:=
- )
- net-misc/curl[ssl]
- sys-apps/dbus:=
- media-libs/flac:=
- sys-libs/zlib:=[minizip]
- !headless? (
- >=app-accessibility/at-spi2-core-2.46.0:2
- media-libs/mesa:=[X?,wayland?]
- virtual/udev
- x11-libs/cairo:=
- x11-libs/gdk-pixbuf:2
- x11-libs/pango:=
- cups? ( >=net-print/cups-1.3.11:= )
- qt6? ( dev-qt/qtbase:6[gui,widgets] )
- X? ( ${COMMON_X_DEPEND} )
- )
-"
-RDEPEND="${COMMON_DEPEND}
- !www-client/ungoogled-chromium:0
- >=www-client/chromium-common-2
- !headless? (
- || (
- x11-libs/gtk+:3[X?,wayland?]
- gui-libs/gtk:4[X?,wayland?]
- )
- qt6? ( dev-qt/qtbase:6[X?,wayland?] )
- )
- virtual/ttf-fonts
- selinux? ( sec-policy/selinux-chromium )
- bindist? (
- ffmpeg-chromium? ( media-video/ffmpeg-chromium:${PV%%\.*} )
- )
- !override-data-dir? (
- !www-client/chromium:${SLOT}
- !www-client/cromite:${SLOT}[-override-data-dir]
- )
-"
-
-DEPEND="${COMMON_DEPEND}
- !headless? (
- gtk4? ( gui-libs/gtk:4[X?,wayland?] )
- !gtk4? ( x11-libs/gtk+:3[X?,wayland?] )
- )
-"
-
- # pgo? ( >=llvm-core/clang-22.0.0_pre20260106 >=llvm-core/lld-22.0.0_pre20260106 )
-BDEPEND="
- ${COMMON_SNAPSHOT_DEPEND}
- ${PYTHON_DEPS}
- $(python_gen_any_dep '
- dev-python/setuptools[${PYTHON_USEDEP}]
- ')
- >=app-arch/gzip-1.7
- !headless? (
- qt6? ( dev-qt/qtbase:6 )
- )
- !bundled-toolchain? ( $(llvm_gen_dep '
- llvm-core/clang:${LLVM_SLOT}
- llvm-core/llvm:${LLVM_SLOT}
- llvm-core/lld:${LLVM_SLOT}
- cfi? ( llvm-runtimes/clang-runtime:${LLVM_SLOT}[sanitize] )
- official? (
- !ppc64? ( llvm-runtimes/compiler-rt-sanitizers:${LLVM_SLOT}[cfi] )
- ) ')
- ${RUST_DEPEND}
- )
- >=dev-util/bindgen-0.72.1
- >=dev-build/gn-${GN_MIN_VER}
- app-alternatives/ninja
- dev-lang/perl
- >=dev-util/gperf-3.2
- dev-util/esbuild:${ESBUILD_VER}
- dev-vcs/git
- >=net-libs/nodejs-${NODE_VER}[inspector]
- sys-apps/hwdata
- >=sys-devel/bison-2.4.3
- sys-devel/flex
- virtual/pkgconfig
- x11-misc/xdg-utils
-"
-
-if ! has chromium_pkg_die ${EBUILD_DEATH_HOOKS}; then
- EBUILD_DEATH_HOOKS+=" chromium_pkg_die";
-fi
-
-DISABLE_AUTOFORMATTING="yes"
-DOC_CONTENTS="
-Some web pages may require additional fonts to display properly.
-Try installing some of the following packages if some characters
-are not displayed properly:
-- media-fonts/arphicfonts
-- media-fonts/droid
-- media-fonts/ipamonafont
-- media-fonts/noto
-- media-fonts/ja-ipafonts
-- media-fonts/takao-fonts
-- media-fonts/wqy-microhei
-- media-fonts/wqy-zenhei
-
-To fix broken icons on the Downloads page, you should install an icon
-theme that covers the appropriate MIME types, and configure this as your
-GTK+ icon theme.
-
-For native file dialogs in KDE, install kde-apps/kdialog.
-
-To make password storage work with your desktop environment you may
-have install one of the supported credentials management applications:
-- app-crypt/libsecret (GNOME)
-- kde-frameworks/kwallet (KDE)
-If you have one of above packages installed, but don't want to use
-them in Chromium, then add --password-store=basic to CHROMIUM_FLAGS
-in /etc/chromium/default.
-"
-
-S="${WORKDIR}/chromium-${PV/_*}"
-
-python_check_deps() {
- python_has_version "dev-python/setuptools[${PYTHON_USEDEP}]"
-}
-
-pre_build_checks() {
- # Check build requirements: bugs #471810, #541816, #914220
- # We're going to start doing maths here on the size of an unpacked source tarball,
- # this should make updates easier as chromium continues to balloon in size.
- # xz -l /var/cache/distfiles/chromium-${PV}*.tar.xz
- local base_disk=9 # Round up
- use test && base_disk=$((base_disk + 5))
- local extra_disk=1 # Always include a little extra space
- local memory=4
- tc-is-cross-compiler && extra_disk=$((extra_disk * 2))
- if tc-is-lto || use pgo; then
- memory=$((memory * 2 + 1))
- tc-is-cross-compiler && extra_disk=$((extra_disk * 2)) # Double the requirements
- use pgo && extra_disk=$((extra_disk + 4))
- fi
- if is-flagq '-g?(gdb)?([1-9])'; then
- if use custom-cflags; then
- extra_disk=$((extra_disk + 5))
- fi
- memory=$((memory * 2))
- fi
- local CHECKREQS_MEMORY="${memory}G"
- local CHECKREQS_DISK_BUILD="$((base_disk + extra_disk))G"
- check-reqs_${EBUILD_PHASE_FUNC}
-}
-
-pkg_pretend() {
- if [[ ${MERGE_TYPE} != binary ]]; then
- # The pre_build_checks are all about compilation resources, no need to run it for a binpkg
- pre_build_checks
- fi
-
- if use headless; then
- local headless_unused_flags=("cups" "kerberos" "pulseaudio" "qt6" "vaapi" "wayland")
- for myiuse in ${headless_unused_flags[@]}; do
- use ${myiuse} && ewarn "Ignoring USE=${myiuse}, USE=headless is set."
- done
- fi
-
- if ! use bindist && use ffmpeg-chromium; then
- ewarn "Ignoring USE=ffmpeg-chromium, USE=bindist is not set."
- fi
- if use libcxx; then
- ewarn
- ewarn "Building with libcxx, please be aware that system-*"
- ewarn "and some other c++ dependencies need to be compiled"
- ewarn "with the same c++ library as ungoogled-chromium itself"
- ewarn "dev-libs/jsoncpp is most problematic, see #58 #49 #119 for details"
- ewarn "Simplest solution would be to disable corresponding system-* flags"
- ewarn
- fi
- if use cfi; then
- ewarn
- ewarn "Building with cfi is only possible if building with -stdlib=libc++"
- ewarn "Make sure all dependencies are also built this way, see #40"
- ewarn
- fi
- if use cromite; then
- ewarn
- ewarn "Cromite patches are very experimental and unstable"
- ewarn "Please consider testing them and giving feedback upstream:"
- ewarn "https://github.com/uazo/cromite/issues"
- ewarn "Not all patches are applied, let me know if others should be considered too"
- ewarn
- fi
-}
-
-pkg_setup() {
- if [[ ${MERGE_TYPE} != binary ]]; then
- # The pre_build_checks are all about compilation resources, no need to run it for a binpkg
- pre_build_checks
-
- # We haven't massaged any CFLAGS yet, so we want to do this before we force CC/CXX to prevent warnings.
- local want_lto="false"
- tc-is-lto && want_lto="true"
-
- # The linux:unbundle toolchain in GN grabs CC, CXX, CPP (etc) from the environment
- # We'll set these to clang here then use llvm-utils functions to very explicitly set these
- # to a sane value.
- # This is effectively the 'force-clang' path if GCC support is re-added.
- if use !bundled-toolchain; then
- llvm-r1_pkg_setup
- rust_pkg_setup
-
- # Forcing clang; respect llvm_slot_x to enable selection of impl via LLVM_COMPAT
- AR=llvm-ar
- CPP="${CHOST}-clang++-${LLVM_SLOT} -E"
- NM=llvm-nm
- CC="${CHOST}-clang-${LLVM_SLOT}"
- CXX="${CHOST}-clang++-${LLVM_SLOT}"
- fi
-
- use_lto="false"
- local lto_usable="true"
- if [[ "$want_lto" == "true" ]]; then
- if use arm64 && [[ "${LLVM_SLOT}" -lt 22 ]]; then
- einfo "LTO is broken with LLVM 21 on arm64, ignoring CFLAGS."
- lto_usable="false"
- else
- use_lto="true"
- fi
- # We can rely on GN to do this for us; without this builds
- # take significantly longer with LTO enabled.
- filter-lto
- fi
-
- if [[ "$use_lto" == "false" ]] && use official && [[ "$lto_usable" == "true" ]]; then
- einfo "USE=official selected and LTO not detected."
- einfo "It is _highly_ recommended that LTO be enabled for performance reasons"
- einfo "and to be consistent with the upstream \"official\" build optimisations."
- fi
-
- if [[ "$use_lto" == "false" ]] && use test; then
- die "Tests require CFI which requires LTO"
- fi
-
- export use_lto
-
- # 936858
- if tc-ld-is-mold; then
- eerror "Your toolchain is using the mold linker."
- eerror "This is not supported by Chromium."
- die "Please switch to a different linker."
- fi
-
- if tc-is-cross-compiler; then
- use pgo && die "The pgo USE flag cannot be used when cross-compiling"
- CPP="${CBUILD}-clang++-${LLVM_SLOT} -E"
- fi
-
- # Sanity checks for development convenience
- if ver_test $(gn --version || die) -lt ${GN_MIN_VER}; then
- die "dev-build/gn >= ${GN_MIN_VER} is required to build this Chromium"
- fi
-
- # Sometimes, when adding a new LLVM slot, devs (me) forget to install an appropriate lld.
- local lld_ver=$(ld.lld --version | awk '{split($2,a,"."); print a[1]}' || die "Failed to check lld version")
- if [[ ${lld_ver} -lt ${LLVM_SLOT} ]]; then
- die "Your lld version (${lld_ver}) is too old for the selected LLVM slot (${LLVM_SLOT}). Please install a newer lld or select an older LLVM slot."
- fi
- fi
-
- chromium_suid_sandbox_check_kernel_config
-}
-
-src_unpack() {
- # # Here be dragons!
- # local XCLD="--exclude=chromium-${PV/_*}/third_party/instrumented_libs \
- # --exclude=chromium-${PV/_*}/third_party/llvm \
- # --exclude=chromium-${PV/_*}/third_party/llvm-build \
- # --exclude=chromium-${PV/_*}/third_party/node/linux \
- # --exclude=chromium-${PV/_*}/third_party/rust-src \
- # --exclude=chromium-${PV/_*}/third_party/rust-toolchain \
- # --exclude=chromium-${PV/_*}/build/linux/debian_bullseye_i386-sysroot \
- # --exclude=chromium-${PV/_*}/build/linux/debian_bullseye_amd64-sysroot \
- # --exclude=chromium-${PV/_*}/third_party/angle/third_party/VK-GL-CTS \
- # "
-
- # if ! use libcxx ; then
- # XCLD+=" --exclude=chromium-${PV/_*}/third_party/libc++"
- # fi
-
- # if ! use pgo ; then
- # XCLD+=" --exclude=chromium-${PV/_*}/chrome/build/pgo_profiles"
- # fi
-
- # einfo "Unpacking chromium-${PV/_*}.tar.xz to ${WORKDIR}"
- # # Gentoo tarball:
- # # tar ${XCLD} -xf "${DISTDIR}/chromium-${PV/_*}-gentoo.tar.xz" -C "${WORKDIR}" || die
- # tar ${XCLD} -xf "${DISTDIR}/chromium-${PV/_*}${LITE_TARBALL:+-lite}.tar.xz" -C "${WORKDIR}" || die
-
- # unpack ${UGC_URL#*->}
- # # unpack chromium-patches-${PATCH_V}.tar.bz2
- # # Warned you!
-
- unpack chromium-${PV/_*}-linux.tar.xz
- unpack chromium-patches-${PATCH_V}.tar.bz2
- # These should only be required when we're not using the official toolchain
- if use !bundled-toolchain; then
- unpack chromium-patches-copium-${COPIUM_COMMIT:0:10}.tar.gz
- fi
-
- if use test; then
- # This just contains a bunch of font files that need to be unpacked (or moved) to the correct location.
- local testfonts_dir="${WORKDIR}/chromium-${PV/_*}/third_party/test_fonts/test_fonts"
- local testfonts_tar="${DISTDIR}/chromium-testfonts-${TEST_FONT:0:10}.tar.gz"
- einfo "Unpacking test fonts ..."
- tar xf "${testfonts_tar}" -C "${testfonts_dir}" || die "Failed to unpack testfonts"
- fi
-
- # We need to manually unpack this since M126 else we'd unpack one toolchain over the other.
- # Since we're doing that anyway let's unpack to sensible locations to make symlink creation easier.
- if use bundled-toolchain; then
- einfo "Unpacking bundled Clang ..."
- mkdir -p "${WORKDIR}"/clang || die "Failed to create clang directory"
- tar xf "${DISTDIR}/chromium-clang-${BUNDLED_CLANG_VER}.tar.xz" -C "${WORKDIR}/clang" || die "Failed to unpack Clang"
- einfo "Unpacking bundled Rust ..."
- local rust_dir="${WORKDIR}/rust-toolchain"
- mkdir -p "${rust_dir}" || die "Failed to create rust toolchain directory"
- tar xf "${DISTDIR}/chromium-rust-toolchain-${RUST_SHORT_HASH}-${BUNDLED_CLANG_VER%-*}.tar.xz" -C "${rust_dir}" ||
- die "Failed to unpack Rust"
- fi
-
- if use ppc64; then
- unpack chromium-openpower-${PPC64_HASH:0:10}.tar.bz2
- fi
-
- # This is a dirty hack, but we need rollup to build successfully and it's proving to be challenging
- # to build locally due to deps
- unpack rollup-wasm-node-${ROLLUP_VER}.tgz
-
- if use cromite; then
- unpack cromite-${CROMITE_COMMIT_ID}.tar.gz
- fi
-
- unpack ${UGC_URL#*->}
-}
-
-remove_compiler_builtins() {
- # We can't use the bundled compiler builtins with the system toolchain
- # We used to `grep` then `sed`, but it was indirect. Combining the two into a single
- # `awk` command is more efficient and lets us document the logic more clearly.
-
- local pattern=' configs += [ "//build/config/clang:compiler_builtins" ]'
- local target='build/config/compiler/BUILD.gn'
-
- local tmpfile
- tmpfile=$(mktemp) || die "Failed to create temporary file."
-
- if awk -v pat="${pattern}" '
- BEGIN {
- match_found = 0
- }
-
- # If the delete countdown is active, decrement it and skip to the next line.
- d > 0 { d--; next }
-
- # If the current line matches the pattern...
- $0 == pat {
- match_found = 1 # ...set our flag to true.
- d = 2 # Set delete counter for this line and the next two.
- prev = "" # Clear the buffered previous line so it is not printed.
- next
- }
-
- # For any other line, print the buffered previous line.
- NR > 1 { print prev }
-
- # Buffer the current line to be printed on the next cycle.
- { prev = $0 }
-
- END {
- # Print the last line if it was not part of a deleted block.
- if (d == 0) { print prev }
-
- # If the pattern was never found, exit with a failure code.
- if (match_found == 0) {
- exit 1
- }
- }
- ' "${target}" > "${tmpfile}"; then
- # AWK SUCCEEDED (exit code 0): The pattern was found and edited.
- # This is to avoid gawk's `-i inplace` option which users complain about.
- mv "${tmpfile}" "${target}"
- else
- # AWK FAILED (exit code 1): The pattern was not found.
- rm -f "${tmpfile}"
- die "Awk patch failed: Pattern not found in ${target}."
- fi
-}
-
-src_prepare() {
- # Calling this here supports resumption via FEATURES=keepwork
- python_setup
-
- # We'll fill this in as we go. Patches go in chromium-patches.
- local PATCHES=()
-
- rm "${WORKDIR}/chromium-patches-${PATCH_V}/common/cr131-unbundle-icu-target.patch"
- if use pgo; then
- rm "${WORKDIR}/chromium-patches-${PATCH_V}/rust/cr146-fix-botched-bytemuck-roll.patch"
- sed -i '/SupportedLaneCount/d' third_party/rust/chromium_crates_io/vendor/bytemuck-v1/src/zeroable.rs || die
- sed -i '/SupportedLaneCount/d' third_party/rust/chromium_crates_io/vendor/bytemuck-v1/src/pod.rs || die
- fi
-
- #cp -f ${WORKDIR}/chromium-patches-${PATCH_V}/*-compiler.patch "${T}/compiler.patch"
- ##cp -f ${FILESDIR}/chromium-147-compiler.patch "${T}/compiler.patch"
- #if ! use custom-cflags; then #See #25 #92
- # sed -i '/default_stack_frames/Q' "${T}/compiler.patch" || die
- #fi
-
- PATCHES+=( "${WORKDIR}/chromium-patches-${PATCH_V}/common/" )
- PATCHES+=( "${FILESDIR}/restore-x86-r3.patch" )
-
- # https://issues.chromium.org/issues/442698344
- # Unreleased fontconfig changed magic numbers and google have rolled to this version
- if has_version "<=media-libs/fontconfig-2.17.1"; then
- PATCHES+=( "${FILESDIR}/chromium-142-work-with-old-fontconfig.patch" )
- fi
-
- if use bundled-toolchain; then
- # We need to symlink the toolchain into the expected location
- einfo "Symlinking Clang toolchain to expected location ..."
- mkdir -p third_party/llvm-build/ || die "Failed to create llvm-build directory"
- # the 'Chromium Linux Tarballs' seem to already have 'Release+Asserts/{lib,bin}'; not sure if this is an
- # upstream change - we're using the same scripts to build, theoretically. We'll still attempt to create
- # llvm-build, but we'll rm Release+Asserts and symlink directly.
- if [[ -d third_party/llvm-build/Release+Asserts ]]; then
- rm -r third_party/llvm-build/Release+Asserts || die "Failed to remove third_party/llvm-build/Release+Asserts"
- fi
- ln -s "${WORKDIR}"/clang third_party/llvm-build/Release+Asserts || die "Failed to bundle Clang"
- einfo "Symlinking Rust toolchain to expected location ..."
- # As above, so below
- if [[ -d third_party/rust-toolchain ]]; then
- rm -r third_party/rust-toolchain || die "Failed to remove third_party/rust-toolchain"
- fi
- ln -s "${WORKDIR}"/rust-toolchain third_party/rust-toolchain || die "Failed to bundle rust"
- cp "${WORKDIR}"/rust-toolchain/VERSION \
- "${WORKDIR}"/rust-toolchain/INSTALLED_VERSION || die "Failed to set rust version"
- else
- # We don't need our toolchain patches if we're using the official toolchain
-
- # Copium patches go here.
- PATCHES+=(
- "${WORKDIR}/copium/cr143-libsync-__BEGIN_DECLS.patch"
- "${WORKDIR}/copium/cr149-unbundle-minizip-undo-unicode.patch"
- )
-
- # Automate conditional application of chromium-patches
- # The directory structure is expected to be something like:
- # chromium-patches-145/
- # ├── toolchain/
- # │ ├── cr123-foo.patch
- # │ └── cr135-bar.patch
- # ├── llvm/
- # │ ├── cr144-baz.patch
- # │ └── lt-23/
- # │ └── cr145-bleeding-edge-llvm-feature.patch
- # Where `lt-23` means "apply this patch if the LLVM version is less than 23".
- # Only categories in `slot_map` will be checked for version constraints.
- shopt -s nullglob
- local -A slot_map=( [llvm]="${LLVM_SLOT}" [rust]="${RUST_SLOT}" )
-
- for category in "${WORKDIR}/chromium-patches-${PATCH_V}"/*/; do
- local category_name="${category%/}"
- category_name="${category_name##*/}"
-
- # Skip arch-specific categories
- if [[ "${category_name}" == "ppc64le" ]]; then
- use ppc64 || continue
- fi
-
- # We applied common patches above, no need to apply them again here
- [[ "${category_name}" == "common" ]] && continue
-
- # Unconditional patches for this category
- local category_patches=( "${category}"*.patch )
- [[ ${#category_patches[@]} -gt 0 ]] && PATCHES+=( "${category}" )
-
- # Version-constrained subdirectories (e.g., llvm/lt-23/)
- for constraint_dir in "${category}"*/; do
- local dir_name="${constraint_dir%/}"
- dir_name="${dir_name##*/}"
- if [[ "${dir_name}" =~ ^lt-(.*)$ && -v slot_map[${category_name}] ]]; then
- ver_test "${slot_map[${category_name}]}" -lt "${BASH_REMATCH[1]}" &&
- PATCHES+=( "${constraint_dir}" )
- fi
- done
- done
-
- shopt -u nullglob
-
- # Strictly speaking this doesn't need to be gated (no bundled toolchain for ppc64); it keeps the logic together
- if use ppc64; then
- local patchset_dir="${WORKDIR}/openpower-patches-${PPC64_HASH}/patches"
- # patch causes build errors on 4K page systems (https://bugs.gentoo.org/show_bug.cgi?id=940304)
- local page_size_patch="ppc64le/third_party/use-sysconf-page-size-on-ppc64.patch"
- local isa_3_patch="ppc64le/core/baseline-isa-3-0.patch"
- # Apply the OpenPOWER patches (check for page size and isa 3.0)
- openpower_patches=( $(grep -E "^ppc64le|^upstream" "${patchset_dir}/series" | grep -v "${page_size_patch}" |
- grep -v "${isa_3_patch}" || die) )
- for patch in "${openpower_patches[@]}"; do
- PATCHES+=( "${patchset_dir}/${patch}" )
- done
- if [[ $(getconf PAGESIZE) == 65536 ]]; then
- PATCHES+=( "${patchset_dir}/${page_size_patch}" )
- fi
- # We use vsx3 as a proxy for 'want isa3.0' (POWER9)
- if use cpu_flags_ppc_vsx3 ; then
- PATCHES+=( "${patchset_dir}/${isa_3_patch}" )
- fi
- fi
-
- remove_compiler_builtins
-
- # We can't rely on the eselect'd Rust to actually include rustfmt, so we'll point to the selected slot specifically.
- local suffix=""
- if [[ "${RUST_TYPE}" == "binary" ]]; then
- suffix="-bin-${RUST_SLOT}"
- else
- suffix="-${RUST_SLOT}"
- fi
- sed -i "s|/bin/rustfmt|/bin/rustfmt${suffix}|g" build/rust/rust_bindgen_generator.gni ||
- die "Failed to update rustfmt path"
-
- fi
-
- # Do this before we apply patches since (e.g.) ppc64 needs to patch rollup and it's easier in ${S}
- einfo "Moving rollup wasm-node package into place ..."
- mkdir -p third_party/devtools-frontend/src/node_modules/@rollup/wasm-node ||
- die "Failed to create node_modules/@rollup/wasm-node"
- mv "${WORKDIR}"/package/* third_party/devtools-frontend/src/node_modules/@rollup/wasm-node ||
- die "Failed to move rollup package"
-
- if [ ! -z "${CHROMIUM_COMMITS[*]}" ]; then
- # for i in "${CHROMIUM_COMMITS[@]}"; do
- for i in "${!CHROMIUM_COMMITS[@]}"; do
- if [[ ${CHROMIUM_COMMITS[$i]} =~ webrtc ]]; then
- patch_prefix="webrtc"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ angle ]]; then
- patch_prefix="angle"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ quiche ]]; then
- patch_prefix="quiche"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ dawn ]]; then
- patch_prefix="dawn"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ perfetto ]]; then
- patch_prefix="perfetto"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ink ]]; then
- patch_prefix="ink"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ vulkan-utility-libraries ]]; then
- patch_prefix="vulkan-utility-libraries"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ruy ]]; then
- patch_prefix="ruy"
- else
- patch_prefix="chromium"
- fi
- pushd "${CHROMIUM_COMMITS[$i]}" > /dev/null || die
- if [[ $i = -* ]]; then
- einfo "Reverting ${patch_prefix}-${i/-}.patch"
- git_wrapper apply -R --exclude="*unittest.cc" --exclude="DEPS" \
- -p1 < "${DISTDIR}/${patch_prefix}-${i/-}.patch"
- else
- einfo "Applying ${patch_prefix}-${i/-}.patch"
- git_wrapper apply --exclude="*unittest.cc" --exclude="DEPS" \
- -p1 < "${DISTDIR}/${patch_prefix}-${i/-}.patch"
- fi
- popd > /dev/null || die
- done
- fi
-
- if ! use bluetooth ; then
- PATCHES+=(
- "${FILESDIR}/disable-bluez-r7.patch"
- )
- fi
-
- if use convert-dict ; then
- PATCHES+=(
- "${FILESDIR}/chromium-ucf-dict-utility-r3.patch"
- )
- fi
-
- if ! use libcxx ; then
- PATCHES+=(
- "${FILESDIR}/fix-wayland-oncecallback-copy.patch"
- )
- fi
-
- if use system-ffmpeg; then
- PATCHES+=(
- "${FILESDIR}/chromium-141-opus-mp3.patch"
- "${FILESDIR}/chromium-135-hevc.patch"
- )
- sed -i "\!AVFMT_FLAG_NOH264PARSE!d" media/filters/ffmpeg_glue.cc || die
- ewarn "You need to expose \"av_stream_get_first_dts\" in ffmpeg via user patch"
- fi
-
- if use system-av1; then
- PATCHES+=(
- "${FILESDIR}/chromium-system-av1.patch"
- )
- fi
-
- if use system-libvpx; then
- PATCHES+=(
- "${FILESDIR}/chromium-system-libvpx.patch"
- )
- fi
-
- if use system-openjpeg ; then
- PATCHES+=(
- "${FILESDIR}/chromium-system-openjpeg-r4.patch"
- )
- fi
-
- if use x86 ; then
- #* Fixes a segfault in transport_security_state_generator
- PATCHES+=(
- "${FILESDIR}/fix-segfault-x86.patch"
- )
- fi
-
- # Testing all patches when NODIE is defined
- if [ ! -z "${NODIE}" ]; then
- for i in "${PATCHES[@]}"; do
- eapply_wrapper "$i"
- done
- nonfatal eapply_user
- else
- default
- fi
-
- if use cromite ; then
- BR_PA_PATH="${WORKDIR}/cromite-${CROMITE_COMMIT_ID}/build/patches"
-
- sed -i '/b\/components\/components_strings\.grd/,+10d' "${BR_PA_PATH}/Add-cromite-flags-support.patch" || die
- sed -i '/b\/chrome\/android\/java\/res\/xml\/privacy_preferences\.xml/,+13d' "${BR_PA_PATH}/Add-cromite-flags-support.patch" || die
- sed -i '/b\/android_webview\/support_library\/java\/src\/org\/chromium\/support_lib_glue/,+11d' "${BR_PA_PATH}/Client-hints-overrides.patch" || die
- sed -i '/webapps_strings.grdp" \/>/{s++webapps_strings.grdp" /><part file="cromite_components_strings_grd/placeholder.txt"/>+;h};${x;/./{x;q0};x;q1}' \
- components/components_strings.grd || die
-
- sed -i 's/absl::/std::/' "${BR_PA_PATH}/Add-a-proxy-configuration-page.patch" || die
-
- filterdiff -p1 "${BR_PA_PATH}/JIT-site-settings.patch" --exclude="content/browser/renderer_host/render_process_host_impl.cc" \
- > "${BR_PA_PATH}/JIT-site-settings.patch1"
- mv -f "${BR_PA_PATH}/JIT-site-settings.patch1" "${BR_PA_PATH}/JIT-site-settings.patch"
-
- BROMITE_PATCHES=(
- "${BR_PA_PATH}/bromite-build-utils.patch"
- "${BR_PA_PATH}/Battery-API-return-nothing.patch"
- "${BR_PA_PATH}/Multiple-fingerprinting-mitigations.patch"
- "${BR_PA_PATH}/Add-flag-to-configure-maximum-connections-per-host.patch"
- "${BR_PA_PATH}/Add-a-proxy-configuration-page.patch"
- "${BR_PA_PATH}/Enable-StrictOriginIsolation-and-SitePerProcess.patch"
- "${BR_PA_PATH}/Disable-requests-for-single-word-Omnibar-searches.patch"
- "${BR_PA_PATH}/Reduce-HTTP-headers-in-DoH-requests-to-bare-minimum.patch"
- "${BR_PA_PATH}/Client-hints-overrides.patch"
- "${BR_PA_PATH}/Disable-idle-detection.patch"
- "${BR_PA_PATH}/Disable-TLS-resumption.patch"
- "${BR_PA_PATH}/Remove-navigator.connection-info.patch"
-
- "${BR_PA_PATH}/AudioBuffer-AnalyserNode-fp-mitigations.patch"
- "${BR_PA_PATH}/Fonts-fingerprinting-mitigation.patch"
- "${BR_PA_PATH}/Content-settings-infrastructure.patch"
- "${BR_PA_PATH}/Add-autoplay-site-setting.patch"
- "${BR_PA_PATH}/Site-setting-for-images.patch"
- "${BR_PA_PATH}/JIT-site-settings.patch"
- "${BR_PA_PATH}/Add-webGL-site-setting.patch"
- "${BR_PA_PATH}/Add-webRTC-site-settings.patch"
- "${BR_PA_PATH}/Show-site-settings-for-cookies-javascript-and-ads.patch"
- "${BR_PA_PATH}/Viewport-Protection-flag.patch"
- "${BR_PA_PATH}/Revert-remove-allowscript-content-setting-secondary-url.patch"
- "${BR_PA_PATH}/Timezone-customization.patch"
- "${BR_PA_PATH}/Disable-speechSynthesis-getVoices-API.patch"
- "${BR_PA_PATH}/Remove-support-for-device-memory-and-cpu-recovery.patch"
- "${BR_PA_PATH}/Disable-Feeback-Collector.patch"
- "${BR_PA_PATH}/Disable-remote-altsvc-for-h3-connections.patch"
- "${BR_PA_PATH}/Add-cromite-flags-support.patch"
- "${BR_PA_PATH}/Enables-deactivation-of-the-js-debugger-statement.patch"
- )
- for i in "${BROMITE_PATCHES[@]}"; do
- if [[ "$i" =~ "Add-autoplay-site-setting.patch" ]] ||
- [[ "$i" =~ "JIT-site-settings.patch" ]] ||
- [[ "$i" =~ "Site-setting-for-images.patch" ]]; then
- einfo "Git binary patch: ${i##*/}"
- git_wrapper apply -p1 < "$i"
- else
- filter_wrapper "$i" --exclude="chrome/android/*"
- fi
- done
-
- #! conflicting patches
- sed -i '/browser_features.cc/,+17d' \
- "${UGC_WD}/patches/extra/ungoogled-chromium/add-flag-to-clear-data-on-exit.patch" || die
- sed -i 's$} // namespace features$BASE_FEATURE(kClearDataOnExit, "ClearDataOnExit", base::FEATURE_DISABLED_BY_DEFAULT);}$' \
- chrome/browser/browser_features.cc || die
- sed -i 's$} // namespace features$BASE_DECLARE_FEATURE(kClearDataOnExit);}$' \
- chrome/browser/browser_features.h || die
- sed -i 's$kChromeUIAboutHost,$kChromeUIAboutHost,"ungoogled-first-run",$' \
- chrome/common/webui_url_constants.cc || die
- sed -i '/chrome\/common\/webui_url_constants.cc/Q' \
- "${UGC_WD}/patches/extra/ungoogled-chromium/first-run-page.patch" || die
-
- #! normalise paths in py
- sed -i 's$os.path.dirname(include_file)$os.path.abspath(os.path.dirname(include_file))$' \
- build/bromite/gyp/cpp_bromite_include.py || die
- fi
-
- # if [[ ${LLVM_SLOT} == "19" ]]; then
- # # Upstream now hard depend on a feature that was added in LLVM 20.1, but we don't want to stabilise that yet.
- # # Do the temp file shuffle in case someone is using something other than `gawk`
- # {
- # awk '/config\("clang_warning_suppression"\) \{/ { print $0 " }"; sub(/clang/, "xclang"); print; next }
- # { print }' build/config/compiler/BUILD.gn > "${T}/build.gn" && \
- # mv "${T}/build.gn" build/config/compiler/BUILD.gn
- # } || die "Unable to disable warning suppression"
- # fi
-
- ## Not included in -lite tarballs, but we should check for it anyway.
- #if [[ -f third_party/node/linux/node-linux-x64/bin/node ]]; then
- # rm third_party/node/linux/node-linux-x64/bin/node || die
- #else
- # mkdir -p third_party/node/linux/node-linux-x64/bin || die
- #fi
- #ln -s "${EPREFIX}"/usr/bin/node third_party/node/linux/node-linux-x64/bin/node || die
-
- cp "${FILESDIR}/libusb.gn" build/linux/unbundle || die
- sed -i '/^REPLACEMENTS.*$/{s++REPLACEMENTS = {"libusb":"third_party/libusb/BUILD.gn",+;h};${x;/./{x;q0};x;q1}' \
- build/linux/unbundle/replace_gn_files.py || die
- sed -i '/^.*deps.*third_party\/jsoncpp.*$/{s++public_deps \+= [ "//third_party/jsoncpp" ]+;h};${x;/./{x;q0};x;q1}' \
- third_party/webrtc/rtc_base/BUILD.gn || die
-
- if use override-data-dir; then
- sed -i '/"chromium";/{s++"ungoogled-chromium";+;h};${x;/./{x;q0};x;q1}' \
- chrome/common/chrome_paths_linux.cc || die
- fi
-
- if use system-abseil-cpp; then
- eapply_wrapper "${FILESDIR}/chromium-147-system-abseil.patch"
-
- #! SFINAE mangling incompatibility between clang and gcc:
- #! https://github.com/llvm/llvm-project/issues/85656
- #! gcc: _ZN4absl12lts_202601074CordC1INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELi0EEEOT_
- #! clang: _ZN4absl12lts_202601074CordC1INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEETnNSt9enable_ifIXsr3std7is_sameIT_S8_EE5valueEiE4typeELi0EEEOSA_
- #! So, either this:
- eapply_wrapper "${FILESDIR}/chromium-141-system-abseil-cord.patch"
- #! or build with -fclang-abi-compat=17
-
- # cp -f /usr/include/absl/base/options.h third_party/abseil-cpp/absl/base/options.h
- # sed -i '/^#define ABSL_OPTION_USE_STD_ORDERING.*$/{s++#define ABSL_OPTION_USE_STD_ORDERING 1+;h};${x;/./{x;q0};x;q1}' \
- # third_party/abseil-cpp/absl/base/options.h || die
- fi
-
- #* Applying UGC PRs here
- if [ ! -z "${UGC_PR_COMMITS[*]}" ]; then
- pushd "${UGC_WD}" >/dev/null
- for i in "${UGC_PR_COMMITS[@]}"; do
- eapply_wrapper "${DISTDIR}/${PN}-$i.patch"
- done
- popd >/dev/null
- fi
-
- # From here we adapt ungoogled-chromium's patches to our needs
- local ugc_pruning_list="${UGC_WD}/pruning.list"
- local ugc_patch_series="${UGC_WD}/patches/series"
- local ugc_substitution_list="${UGC_WD}/domain_substitution.list"
-
- local ugc_unneeded=(
- # GN bootstrap
- extra/debian/gn/parallel
- # following Gentoo's Chromium
- core/ungoogled-chromium/build-with-wasm-rollup
- )
-
- if use cromite ; then
- einfo "Using fingerprinting patches from Cromite instead"
- ugc_unneeded+=(
- extra/bromite/fingerprinting-flags-client-rects-and-measuretext
- extra/bromite/flag-max-connections-per-host
- extra/bromite/flag-fingerprinting-canvas-image-data-noise
- extra/ungoogled-chromium/add-components-ungoogled
- extra/ungoogled-chromium/remove-pac-size-limit
- )
- fi
-
- # #* Temporary fix
- # sed -i "\!ios/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/icu/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/libjpeg_turbo/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/snappy/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/closure_compiler/!d" "${ugc_pruning_list}" || die
-
- # #* Didn't unpack them at the first place
- # sed -i "\!build/linux/debian_bullseye_i386-sysroot!d" "${ugc_pruning_list}" || die
- # sed -i "\!build/linux/debian_bullseye_amd64-sysroot!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/llvm-build!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/node/linux!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/rust-src!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/rust-toolchain!d" "${ugc_pruning_list}" || die
- # if ! use libcxx ; then
- # sed -i "\!third_party/libc!d" "${ugc_pruning_list}" || die
- # fi
- sed -i "s|debug('files|error('files|" \
- "${UGC_WD}/utils/prune_binaries.py" || die
- sed -i "\!third_party/node/linux!d" \
- "${UGC_WD}/utils/prune_binaries.py" || die
-
- local ugc_p ugc_dir
- for p in "${ugc_unneeded[@]}"; do
- einfo "Removing ${p}.patch"
- sed -i "\!${p}.patch!d" "${ugc_patch_series}" || die
- done
-
- if [ ! -z "${UGC_SKIP_PATCHES}" ]; then
- for p in ${UGC_SKIP_PATCHES}; do
- ewarn "Removing ${p}"
- sed -i "\!${p}!d" "${ugc_patch_series}" || die
- done
- fi
-
- if [ ! -z "${UGC_KEEP_BINARIES}" ]; then
- for p in ${UGC_KEEP_BINARIES}; do
- ewarn "Keeping binary ${p}"
- sed -i "\!${p}!d" "${ugc_pruning_list}" || die
- done
- fi
-
- if [ ! -z "${UGC_SKIP_SUBSTITUTION}" ]; then
- for p in ${UGC_SKIP_SUBSTITUTION}; do
- ewarn "No substitutions in ${p}"
- sed -i "\!${p}!d" "${ugc_substitution_list}" || die
- done
- fi
-
- ebegin "Pruning binaries"
- "${UGC_WD}/utils/prune_binaries.py" -q . "${UGC_WD}/pruning.list"
- eend $? || die
-
- ebegin "Applying ungoogled-chromium patches"
- "${UGC_WD}/utils/patches.py" -q apply . "${UGC_WD}/patches"
- eend $? || die
-
- ebegin "Applying domain substitution"
- "${UGC_WD}/utils/domain_substitution.py" -q apply -r "${UGC_WD}/domain_regex.list" -f "${UGC_WD}/domain_substitution.list" .
- eend $? || die
-
- # Sanity check esbuild version before we start removing files.
- # We _could_ patch the version check out - in theory esbuild upstream are being super conservative after
- # arch(AUR) packaged an `esbuild` binary and set ESBUILD_BINARY_PATH=/usr/bin/esbuild, causing much breakage,
- # but this is fine too and exactly matches what upstream are expecting.
- # https://github.com/evanw/esbuild/issues/2894
- local esbuild_js="${S}/third_party/devtools-frontend/src/node_modules/esbuild/lib/main.js"
- local found
- found=$(awk -F'"' '/if \(binaryVersion !==/ {print $2}' "${esbuild_js}")
- if [[ "${found}" != "${ESBUILD_VER}" ]]; then
- die "esbuild version mismatch: expected ${ESBUILD_VER}, found ${found}"
- fi
-
- elog "Removing bundled binaries from source tree ..."
- # Purge bundled ELF files: These are non-portable and will cause issues if used instead of system versions.
- # Use `--wasm` to also remove WebAssembly binaries, if desired - they're portable so shouldn't break builds.
- ${EPYTHON} "${FILESDIR}/bin-finder.py" --elf "${S}" | awk '{print $1}' | xargs rm -f ||
- die "Failed to remove bundled binaries"
-
- # And now we restore any that we actually need, from the host system
- local esbuild_path="${S}/third_party/devtools-frontend/src/third_party/esbuild"
- local -A restore_list=(
- ["/usr/bin/esbuild-${ESBUILD_VER}"]="${esbuild_path}/esbuild"
- ["/usr/bin/gperf"]="${S}/third_party/gperf/cipd/bin/gperf"
- ["/usr/bin/node"]="${S}/third_party/node/linux/node-linux-x64/bin/node"
- )
-
- for src in "${!restore_list[@]}"; do
- dst="${restore_list[${src}]}"
- if [[ -f "${src}" ]]; then
- einfo "Symlinking ${src} ..."
- # Make sure the parent dir exists; some tarballs don't include (e.g.) node's bindir
- mkdir -p "$(dirname "${dst}")" || die "Failed to create directory for ${dst}"
- ln -s "${src}" "${dst}" || die "Failed to symlink ${dst} from ${src}"
- if [[ ! -L "${dst}" || "$(readlink -f "${dst}")" != "${src}" ]]; then
- die "Symlink verification failed for ${dst} -> ${src}"
- fi
- else
- die "Expected to find ${src} to restore ${dst}, but it does not exist."
- fi
- done
-
- # adjust python interpreter version
- sed -i -e "s|\(^script_executable = \).*|\1\"${EPYTHON}\"|g" .gn || die
-
- # Use the system copy of hwdata's usb.ids; upstream is woefully out of date (2015!)
- sed 's|//third_party/usb_ids/usb.ids|/usr/share/hwdata/usb.ids|g' \
- -i services/device/public/cpp/usb/BUILD.gn || die "Failed to set system usb.ids path"
-
- # remove_bundled_libraries.py walks the source tree and looks for paths containing the substring 'third_party'
- # whitelist matches use the right-most matching path component, so we need to whitelist from that point down.
- local keeplibs=(
- base/third_party/cityhash
- )
- use system-double-conversion || keeplibs+=(
- base/third_party/double_conversion
- )
- keeplibs+=(
- base/third_party/icu
- base/third_party/nspr
- base/third_party/superfasthash
- base/third_party/symbolize
- base/third_party/xdg_user_dirs
- buildtools/third_party/libc++
- buildtools/third_party/libc++abi
- )
- use cromite && keeplibs+=(
- cromite_flags/third_party
- )
- keeplibs+=(
- net/third_party/mozilla_security_manager
- net/third_party/quic
- net/third_party/uri_template
- )
- use system-abseil-cpp || keeplibs+=(
- third_party/abseil-cpp
- )
- keeplibs+=(
- third_party/angle
- third_party/angle/src/common/third_party/xxhash
- third_party/angle/src/third_party/ceval
- )
- use nvidia || keeplibs+=(
- third_party/angle/src/third_party/libXNVCtrl
- )
- keeplibs+=(
- third_party/angle/src/third_party/volk
- third_party/anonymous_tokens
- third_party/apple_apsl
- third_party/axe-core
- third_party/bidimapper
- third_party/blink
- third_party/boringssl
- third_party/boringssl/src/third_party/fiat
- third_party/breakpad
- third_party/breakpad/breakpad/src/third_party/curl
- )
- use system-brotli || keeplibs+=(
- third_party/brotli
- )
- keeplibs+=(
- third_party/catapult
- third_party/catapult/common/py_vulcanize/third_party/rcssmin
- third_party/catapult/common/py_vulcanize/third_party/rjsmin
- third_party/catapult/third_party/beautifulsoup4-4.9.3
- third_party/catapult/third_party/html5lib-1.1
- third_party/catapult/third_party/polymer
- third_party/catapult/third_party/six
- third_party/catapult/third_party/typ
- third_party/catapult/tracing/third_party/d3
- third_party/catapult/tracing/third_party/gl-matrix
- third_party/catapult/tracing/third_party/jpeg-js
- third_party/catapult/tracing/third_party/jszip
- third_party/catapult/tracing/third_party/mannwhitneyu
- third_party/catapult/tracing/third_party/oboe
- third_party/catapult/tracing/third_party/pako
- third_party/ced
- third_party/cld_3
- third_party/closure_compiler
- )
- use libcxx && keeplibs+=(
- third_party/compiler-rt
- )
- keeplibs+=(
- third_party/content_analysis_sdk
- third_party/cpuinfo
- third_party/crabbyavif
- third_party/crashpad
- third_party/crashpad/crashpad/third_party/lss
- third_party/crashpad/crashpad/third_party/zlib
- )
- use system-crc32c || keeplibs+=(
- third_party/crc32c
- )
- keeplibs+=(
- third_party/cros_system_api
- third_party/d3
- third_party/dawn
- third_party/dawn/third_party/gn/webgpu-cts
- third_party/dawn/third_party/OpenGL-Registry
- third_party/dawn/third_party/renderdoc
- third_party/dawn/third_party/webgpu-headers
- third_party/depot_tools
- third_party/devscripts
- third_party/devtools-frontend
- third_party/devtools-frontend/src/front_end/third_party/acorn
- third_party/devtools-frontend/src/front_end/third_party/additional_readme_paths.json
- third_party/devtools-frontend/src/front_end/third_party/axe-core
- third_party/devtools-frontend/src/front_end/third_party/chromium
- third_party/devtools-frontend/src/front_end/third_party/codemirror
- third_party/devtools-frontend/src/front_end/third_party/csp_evaluator
- third_party/devtools-frontend/src/front_end/third_party/diff
- third_party/devtools-frontend/src/front_end/third_party/i18n
- third_party/devtools-frontend/src/front_end/third_party/intl-messageformat
- third_party/devtools-frontend/src/front_end/third_party/json5
- third_party/devtools-frontend/src/front_end/third_party/legacy-javascript
- third_party/devtools-frontend/src/front_end/third_party/lighthouse
- third_party/devtools-frontend/src/front_end/third_party/lit
- third_party/devtools-frontend/src/front_end/third_party/marked
- third_party/devtools-frontend/src/front_end/third_party/puppeteer
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/esm/third_party/mitt
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/esm/third_party/parsel-js
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/esm/third_party/rxjs
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/esm/third_party/urlpattern-polyfill
- third_party/devtools-frontend/src/front_end/third_party/source-map-scopes-codec
- third_party/devtools-frontend/src/front_end/third_party/third-party-web
- third_party/devtools-frontend/src/front_end/third_party/vscode.web-custom-data
- third_party/devtools-frontend/src/front_end/third_party/wasmparser
- third_party/devtools-frontend/src/front_end/third_party/web-vitals
- third_party/devtools-frontend/src/third_party
- third_party/dom_distiller_js
- third_party/dragonbox
- third_party/eigen3
- third_party/emoji-segmenter
- third_party/farmhash
- third_party/fast_float
- third_party/fdlibm
- third_party/federated_compute/chromium/fcp/confidentialcompute
- third_party/federated_compute/src/fcp/base
- third_party/federated_compute/src/fcp/confidentialcompute
- third_party/federated_compute/src/fcp/protos/confidentialcompute
- third_party/federated_compute/src/fcp/protos/federatedcompute
- third_party/fft2d
- third_party/flatbuffers
- third_party/fp16
- third_party/freetype
- third_party/fusejs
- third_party/fxdiv
- third_party/gemmlowp
- third_party/google_input_tools
- third_party/google_input_tools/third_party/closure_library
- third_party/google_input_tools/third_party/closure_library/third_party/closure
- third_party/googletest
- third_party/gperf # We symlink system gperf, but this will purge the symlink since we tidy up afterwards.
- third_party/highway
- third_party/hunspell
- third_party/hyphenation-patterns
- third_party/ink/src/ink/brush
- third_party/ink/src/ink/color
- third_party/ink/src/ink/geometry
- third_party/ink/src/ink/rendering
- third_party/ink/src/ink/rendering/skia/common_internal
- third_party/ink/src/ink/rendering/skia/native
- third_party/ink/src/ink/rendering/skia/native/internal
- third_party/ink/src/ink/strokes
- third_party/ink/src/ink/types
- third_party/inspector_protocol
- third_party/ipcz
- third_party/jinja2
- )
- use system-jsoncpp || keeplibs+=(
- third_party/jsoncpp
- )
- keeplibs+=(
- third_party/khronos
- third_party/lens_server_proto
- third_party/leveldatabase
- third_party/libaddressinput
- )
- use libcxx && keeplibs+=(
- third_party/libc++
- )
- keeplibs+=(
- third_party/libdrm
- third_party/libgav1
- third_party/libjingle
- third_party/libpfm4
- third_party/libphonenumber
- third_party/libpng
- third_party/libsecret
- third_party/libsrtp
- third_party/libsync
- third_party/libtess2/libtess2
- third_party/libtess2/src/Include
- third_party/libtess2/src/Source
- third_party/liburlpattern
- )
- use system-libusb || keeplibs+=(
- third_party/libusb
- )
- keeplibs+=(
- third_party/libva_protected_content
- )
- use system-libvpx || keeplibs+=(
- third_party/libvpx
- third_party/libvpx/source/libvpx/third_party/x86inc
- )
- keeplibs+=(
- third_party/libwebm
- third_party/libx11
- third_party/libxcb-keysyms
- third_party/libxml/chromium
- third_party/libyuv
- third_party/libzip
- third_party/lit
- )
- use libcxx && keeplibs+=(
- third_party/llvm-libc
- third_party/llvm-libc/src/shared/
- )
- keeplibs+=(
- third_party/lottie
- third_party/lss
- third_party/lzma_sdk
- third_party/mako
- third_party/markupsafe
- third_party/material_color_utilities
- third_party/metrics_proto
- third_party/minigbm
- third_party/ml_dtypes
- third_party/modp_b64
- third_party/nasm
- third_party/nearby
- third_party/neon_2_sse
- third_party/node
- third_party/oak/chromium/proto
- third_party/oak/chromium/proto/attestation
- third_party/omnibox_proto
- third_party/one_euro_filter
- third_party/openscreen
- third_party/openscreen/src/third_party/
- third_party/openscreen/src/third_party/tinycbor/src/src
- third_party/ots
- third_party/pdfium
- third_party/pdfium/third_party/agg23
- third_party/pdfium/third_party/bigint
- third_party/pdfium/third_party/freetype
- third_party/pdfium/third_party/lcms
- )
- use system-openjpeg || keeplibs+=(
- third_party/pdfium/third_party/libopenjpeg
- )
- keeplibs+=(
- third_party/pdfium/third_party/libtiff
- third_party/perfetto
- third_party/perfetto/protos/third_party/chromium
- third_party/perfetto/protos/third_party/pprof
- third_party/perfetto/protos/third_party/primes
- third_party/perfetto/protos/third_party/simpleperf
- third_party/pffft
- third_party/ply
- third_party/polymer
- third_party/private_membership
- third_party/private-join-and-compute
- third_party/protobuf
- third_party/protobuf/third_party/utf8_range
- third_party/pthreadpool
- third_party/puffin
- third_party/pyjson5
- third_party/pyyaml
- third_party/rapidhash
- third_party/readability
- third_party/rnnoise
- third_party/rust
- third_party/ruy
- third_party/s2cellid
- third_party/search_engines_data
- third_party/securemessage
- third_party/selenium-atoms
- third_party/sentencepiece
- third_party/sentencepiece/src/third_party/darts_clone
- third_party/shell-encryption
- third_party/simdutf
- third_party/simplejson
- third_party/six
- third_party/skia
- third_party/skia/include/third_party/vulkan
- third_party/smhasher
- )
- use system-snappy || keeplibs+=(
- third_party/snappy
- )
- keeplibs+=(
- third_party/spirv-headers
- third_party/spirv-tools
- third_party/sqlite
- third_party/swiftshader
- third_party/swiftshader/third_party/astc-encoder
- third_party/swiftshader/third_party/llvm-subzero
- third_party/swiftshader/third_party/marl
- third_party/swiftshader/third_party/SPIRV-Headers/include/spirv
- third_party/swiftshader/third_party/SPIRV-Tools
- third_party/swiftshader/third_party/subzero
- third_party/tensorflow_models
- third_party/tensorflow-text
- third_party/tflite
- third_party/tflite/src/third_party/fft2d
- third_party/tflite/src/third_party/xla/third_party/tsl
- third_party/tflite/src/third_party/xla/xla/tsl/framework
- third_party/tflite/src/third_party/xla/xla/tsl/lib/random
- third_party/tflite/src/third_party/xla/xla/tsl/platform
- third_party/tflite/src/third_party/xla/xla/tsl/protobuf
- third_party/tflite/src/third_party/xla/xla/tsl/util
- third_party/ukey2
- third_party/utf
- third_party/vulkan
- third_party/wayland
- third_party/webdriver
- third_party/webgpu-cts
- third_party/webrtc
- third_party/webrtc/common_audio/third_party/ooura
- third_party/webrtc/common_audio/third_party/spl_sqrt_floor
- third_party/webrtc/modules/third_party/fft
- third_party/webrtc/modules/third_party/g711
- third_party/webrtc/modules/third_party/g722
- third_party/widevine
- )
- use system-woff2 || keeplibs+=(
- third_party/woff2
- )
- keeplibs+=(
- third_party/wuffs
- third_party/x11proto
- third_party/xcbproto
- third_party/xnnpack
- third_party/zlib/google
- third_party/zxcvbn-cpp
- url/third_party/mozilla
- v8/third_party/glibc
- v8/third_party/inspector_protocol
- v8/third_party/rapidhash-v8
- v8/third_party/siphash
- v8/third_party/utf8-decoder
- v8/third_party/v8
- v8/third_party/valgrind
-
- # gyp -> gn leftovers
- third_party/speech-dispatcher
- third_party/usb_ids
- )
-
- if use test; then
- keeplibs+=(
- third_party/breakpad/breakpad/src/processor
- third_party/fuzztest
- third_party/google_benchmark/src/include/benchmark
- third_party/google_benchmark/src/src
- third_party/test_fonts
- third_party/test_fonts/fontconfig
- third_party/test_fonts/test_fonts
- )
- fi
-
- # USE=system-*
- if ! use system-harfbuzz; then
- keeplibs+=( third_party/harfbuzz )
- fi
-
- if ! use system-ffmpeg; then
- keeplibs+=( third_party/ffmpeg third_party/opus )
- fi
-
- if ! use system-icu; then
- keeplibs+=( third_party/icu )
- fi
-
- if ! use system-zstd; then
- keeplibs+=( third_party/zstd )
- fi
-
- if ! use system-av1; then
- keeplibs+=(
- third_party/dav1d
- third_party/libaom
- third_party/libaom/source/libaom/third_party/fastfeat
- third_party/libaom/source/libaom/third_party/vector
- third_party/libaom/source/libaom/third_party/x86inc
- )
- fi
-
- if use libcxx; then
- keeplibs+=(
- third_party/libc++
- third_party/llvm-libc
- )
- fi
-
- if ! use system-openh264; then
- keeplibs+=( third_party/openh264 )
- fi
-
- if ! use system-re2; then
- keeplibs+=( third_party/re2 )
- fi
-
- # Arch-specific
- if use arm64 || use ppc64 ; then
- keeplibs+=( third_party/swiftshader/third_party/llvm-10.0 )
- fi
- # we need to generate ppc64 stuff because upstream does not ship it yet
- # it has to be done before unbundling.
- if use ppc64; then
- pushd third_party/libvpx >/dev/null || die
- mkdir -p source/config/linux/ppc64 || die
- # requires git and clang, bug #832803
- # Revert https://chromium.googlesource.com/chromium/src/+/b463d0f40b08b4e896e7f458d89ae58ce2a27165%5E%21/third_party/libvpx/generate_gni.sh
- # and https://chromium.googlesource.com/chromium/src/+/71ebcbce867dd31da5f8b405a28fcb0de0657d91%5E%21/third_party/libvpx/generate_gni.sh
- # since we're not in a git repo
- sed -i -e "s|^update_readme||g; s|clang-format|${EPREFIX}/bin/true|g; /^git -C/d; /git cl/d; /cd \$BASE_DIR\/\$LIBVPX_SRC_DIR/ign format --in-place \$BASE_DIR\/BUILD.gn\ngn format --in-place \$BASE_DIR\/libvpx_srcs.gni" \
- generate_gni.sh || die
- ./generate_gni.sh || die
- popd >/dev/null || die
-
- pushd third_party/ffmpeg >/dev/null || die
- cp libavcodec/ppc/h264dsp.c libavcodec/ppc/h264dsp_ppc.c || die
- cp libavcodec/ppc/h264qpel.c libavcodec/ppc/h264qpel_ppc.c || die
- popd >/dev/null || die
- fi
-
- # Sanity check keeplibs, on major version bumps it is often necessary to update this list
- # and this enables us to hit them all at once.
- # There are some entries that need to be whitelisted (TODO: Why? The file is understandable, the rest seem odd)
- whitelist_libs=(
- net/third_party/quic
- third_party/devtools-frontend/src/front_end/third_party/additional_readme_paths.json
- third_party/libjingle
- third_party/mesa
- third_party/skia/third_party/vulkan
- third_party/vulkan
- )
- local not_found_libs=()
- for lib in "${keeplibs[@]}"; do
- if [[ ! -d "${lib}" ]] && ! has "${lib}" "${whitelist_libs[@]}"; then
- not_found_libs+=( "${lib}" )
- fi
- done
-
- if [[ ${#not_found_libs[@]} -gt 0 ]]; then
- ewarn "The following \`keeplibs\` directories were not found in the source tree:"
- for lib in "${not_found_libs[@]}"; do
- ewarn " ${lib}"
- done
- fi
-
- keeplibs+=( third_party/ungoogled )
-
- # Remove most bundled libraries. Some are still needed.
- einfo "Unbundling third-party libraries ..."
- build/linux/unbundle/remove_bundled_libraries.py "${keeplibs[@]}" --do-remove || die
-
- # Interferes with our bundled clang path; we don't want stripped binaries anyway.
- sed -i -e 's|${clang_base_path}/bin/llvm-strip|/bin/true|g' \
- -e 's|${clang_base_path}/bin/llvm-objcopy|/bin/true|g' \
- build/linux/strip_binary.gni || die
-}
-
-src_configure() {
- # Calling this here supports resumption via FEATURES=keepwork
- python_setup
-
- # Bug 491582.
- export TMPDIR="${WORKDIR}/temp"
- mkdir -p -m 755 "${TMPDIR}" || die
-
- # https://bugs.gentoo.org/654216
- addpredict /dev/dri/ #nowarn
-
- # Use system-provided libraries.
- # TODO: freetype -- remove sources (https://bugs.chromium.org/p/pdfium/issues/detail?id=733).
- # TODO: use_system_hunspell (upstream changes needed).
- # TODO: use_system_protobuf (bug #525560).
- # TODO: use_system_sqlite (http://crbug.com/22208).
-
- # libevent: https://bugs.gentoo.org/593458
- local gn_system_libraries=(
- flac
- fontconfig
- freetype
- libjpeg
- libwebp
- libxml
- libxslt
- zlib
- )
- if use system-abseil-cpp; then
- gn_system_libraries+=(
- absl_algorithm
- absl_base
- absl_cleanup
- absl_container
- absl_crc
- absl_debugging
- absl_flags
- absl_functional
- absl_hash
- absl_log
- absl_log_internal
- absl_memory
- absl_meta
- absl_numeric
- absl_random
- absl_status
- absl_strings
- absl_synchronization
- absl_time
- absl_types
- absl_utility
- )
- fi
- if use system-brotli; then
- gn_system_libraries+=( brotli )
- fi
- if use system-crc32c; then
- gn_system_libraries+=( crc32c )
- fi
- if use system-double-conversion; then
- gn_system_libraries+=( double-conversion )
- fi
- if use system-woff2; then
- gn_system_libraries+=( woff2 )
- fi
- if use nvidia; then
- gn_system_libraries+=( libXNVCtrl )
- fi
- if use system-ffmpeg; then
- gn_system_libraries+=( ffmpeg opus )
- fi
- if use system-jsoncpp; then
- gn_system_libraries+=( jsoncpp )
- fi
- if use system-icu; then
- gn_system_libraries+=( icu )
- fi
- if use system-zstd; then
- gn_system_libraries+=( zstd )
- fi
- if use system-av1; then
- gn_system_libraries+=( dav1d libaom )
- fi
- if use system-libusb; then
- gn_system_libraries+=( libusb )
- fi
- if use system-libvpx; then
- gn_system_libraries+=( libvpx )
- fi
- use system-openh264 && gn_system_libraries+=(
- openh264
- )
- use system-re2 && gn_system_libraries+=(
- re2
- )
- use system-snappy && gn_system_libraries+=(
- snappy
- )
-
- build/linux/unbundle/replace_gn_files.py --system-libraries "${gn_system_libraries[@]}" ||
- die "Failed to replace GN files for system libraries"
-
- # TODO 131: The above call clobbers `enable_freetype = true` in the freetype gni file
- # drop the last line, then append the freetype line and a new curly brace to end the block
- local freetype_gni="build/config/freetype/freetype.gni"
- sed -i -e '$d' ${freetype_gni} || die
- echo " enable_freetype = true" >> ${freetype_gni} || die
- echo "}" >> ${freetype_gni} || die
-
- if use !custom-cflags; then
- replace-flags "-Os" "-O2"
- strip-flags
- # Debug info section overflows without component build
- # Prevent linker from running out of address space, bug #471810 .
- filter-flags "-g*"
- # 949123: Several multimedia components explicitly build with specific CFLAGS and
- # use runtime detection to enable optimisations; unfortunately any of our CFLAGS are suffixed
- # to the end of the command line, which causes build failures.
- use arm64 && filter-flags "-march*" "-mtune*" "-mcpu*"
- fi
-
- # We don't use the same clang version as upstream, and with -Werror
- # we need to make sure that we don't get superfluous warnings.
- append-flags -Wno-unknown-warning-option
- if tc-is-cross-compiler; then # can you cross-compile with the bundled toolchain?
- export BUILD_CXXFLAGS+=" -Wno-unknown-warning-option"
- export BUILD_CFLAGS+=" -Wno-unknown-warning-option"
- fi
-
- # Start building our GN options
- local myconf_gn=() # Tip: strings must be quoted, bools or numbers are fine
-
- if use !bundled-toolchain; then
- # We already forced the "correct" clang via pkg_setup
-
- if tc-is-cross-compiler; then
- CC="${CC} -target ${CHOST} --sysroot ${ESYSROOT}"
- CXX="${CXX} -target ${CHOST} --sysroot ${ESYSROOT}"
- BUILD_AR=${AR}
- BUILD_CC=${CC}
- BUILD_CXX=${CXX}
- BUILD_NM=${NM}
- fi
-
- # Make sure the build system will use the right tools, bug #340795.
- tc-export AR CC CXX NM
-
- strip-unsupported-flags
- append-ldflags -Wl,--undefined-version # https://bugs.gentoo.org/918897#c32
-
- myconf_gn+=(
- "is_clang=true"
- "clang_use_chrome_plugins=false"
- "use_clang_modules=false" # M141 enables this for the linux platform by default.
- "use_lld=true"
- 'custom_toolchain="//build/toolchain/linux/unbundle:default"'
- # From M127 we need to provide a location for libclang and the clang resource dir so that bindgen can find them
- "bindgen_libclang_path=\"$(get_llvm_prefix)/$(get_libdir)\""
- "bindgen_clang_resource_dir=\"${EPREFIX}/usr/lib/clang/${LLVM_SLOT}/include\""
- "bindgen_extra_clang_args=[\"-I${EPREFIX}/usr/lib/clang/${LLVM_SLOT}/include\"]"
- "clang_base_path=\"${EPREFIX}/usr/lib/clang/${LLVM_SLOT}/\""
- "rust_bindgen_root=\"${EPREFIX}/usr/\""
- "rust_sysroot_absolute=\"$(get_rust_prefix)\""
- "rustc_version=\"${RUST_SLOT}\""
- )
-
- if [[ ${LLVM_SLOT} -lt 23 ]]; then
- # Workaround for -fsanitize-ignore-for-ubsan-feature (added in LLVM 23)
- myconf_gn+=( 'clang_has_ubsan_feature_ignore=false' )
- fi
-
- if ! tc-is-cross-compiler; then
- myconf_gn+=( 'host_toolchain="//build/toolchain/linux/unbundle:default"' )
- else
- tc-export BUILD_{AR,CC,CXX,NM}
- myconf_gn+=(
- 'host_toolchain="//build/toolchain/linux/unbundle:host"'
- 'v8_snapshot_toolchain="//build/toolchain/linux/unbundle:host"'
- "host_pkg_config=\"$(tc-getBUILD_PKG_CONFIG)\""
- "pkg_config=\"$(tc-getPKG_CONFIG)\""
- )
-
- # setup cups-config, build system only uses --libs option
- if use cups; then
- mkdir "${T}/cups-config" || die
- cp "${ESYSROOT}/usr/bin/${CHOST}-cups-config" "${T}/cups-config/cups-config" || die
- export PATH="${PATH}:${T}/cups-config"
- fi
-
- # Don't inherit PKG_CONFIG_PATH from environment
- local -x PKG_CONFIG_PATH=
- fi
-
- fi # !bundled-toolchain
-
- local myarch
- myarch="$(tc-arch)"
- case ${myarch} in
- amd64)
- # Bug 530248, 544702, 546984, 853646.
- use !custom-cflags && filter-flags -mno-mmx -mno-sse2 -mno-ssse3 -mno-sse4.1 \
- -mno-avx -mno-avx2 -mno-fma -mno-fma4 -mno-xop -mno-sse4a
- myconf_gn+=( 'target_cpu="x64"' )
- ;;
- x86)
- # Bug 530248, 544702, 546984, 853646.
- use !custom-cflags && filter-flags -mno-mmx -mno-sse2 -mno-ssse3 -mno-sse4.1 \
- -mno-avx -mno-avx2 -mno-fma -mno-fma4 -mno-xop -mno-sse4a
- myconf_gn+=( 'target_cpu="x86"' )
- ;;
- arm64)
- myconf_gn+=( 'target_cpu="arm64"' )
- ;;
- ppc64)
- myconf_gn+=( 'target_cpu="ppc64"' )
- ;;
- *)
- die "Failed to determine target arch, got '${myarch}'."
- ;;
- esac
-
- # Common options
-
- myconf_gn+=(
- # Disable code formating of generated files
- "blink_enable_generated_code_formatting=false"
- # enable DCHECK with USE=debug only, increases chrome binary size by 30%, bug #811138.
- # DCHECK is fatal by default, make it configurable at runtime, #bug 807881.
- "dcheck_always_on=$(usex debug true false)"
- "dcheck_is_configurable=$(usex debug true false)"
- # Chromium builds provided by Linux distros should disable the testing config
- "disable_fieldtrial_testing_config=true"
- # Custom patch: Enable building Chromium as individual channels (e.g. stable, beta, dev) that
- # use different profile directories, desktop entries, etc. This enables slotting the ebuild.
- "enable_channel_branding=true"
- # 131 began laying the groundwork for replacing freetype with
- # "Rust-based Fontations set of libraries plus Skia path rendering"
- # We now need to opt-in
- "enable_freetype=true"
- "enable_hangout_services_extension=$(usex hangouts true false)"
- # Don't need nocompile checks and GN crashes with our config (verify with modern GN)
- "enable_nocompile_tests=false"
- # pseudolocales are only used for testing
- "enable_pseudolocales=false"
- "enable_widevine=$(usex widevine true false)"
- # Disable fatal linker warnings, bug 506268.
- "fatal_linker_warnings=false"
- # Component build isn't generally intended for use by end users. It's mostly useful
- # for development and debugging.
- "is_component_build=false"
- # GN needs explicit config for Debug/Release as opposed to inferring it from build directory.
- "is_debug=false"
- "is_official_build=$(usex official true false)"
- # Enable ozone wayland and/or headless support
- "ozone_auto_platforms=false"
- "ozone_platform_headless=true"
- # Enables building without non-free unRAR licence
- "safe_browsing_use_unrar=false"
- # "thin_lto_enable_optimizations=${use_lto}"
- "treat_warnings_as_errors=false"
- # Use in-tree libc++ (buildtools/third_party/libc++ and buildtools/third_party/libc++abi)
- # instead of the system C++ library for C++ standard library support.
- # default: true, but let's be explicit (forced since 120 ; USE removed 127).
- "use_custom_libcxx=true"
- # Enable ozone wayland and/or headless support
- "use_ozone=true"
- # The sysroot is the oldest debian image that chromium supports, we don't need it
- "use_sysroot=false"
- # See dependency logic in third_party/BUILD.gn
- "use_system_harfbuzz=$(usex system-harfbuzz true false)"
- # "use_thin_lto=${use_lto}"
- # Only enabled for clang, but gcc has endian macros too
- "v8_use_libm_trig_functions=true"
- )
-
- myconf_gn+=( "enable_iterator_debugging=$(usex debug true false)" )
-
- if use debug; then
- myconf_gn+=(
- "symbol_level=2"
- "blink_symbol_level=2"
- "v8_symbol_level=2"
- )
- else
- myconf_gn+=(
- "symbol_level=0"
- "blink_symbol_level=0"
- "v8_symbol_level=0"
- )
- fi
-
- if use bindist ; then
- myconf_gn+=(
- # If this is set to false Chromium won't be able to load any proprietary codecs
- # even if provided with an ffmpeg capable of h264/aac decoding
- "proprietary_codecs=true"
- 'ffmpeg_branding="Chrome"'
- # build ffmpeg as an external component (libffmpeg.so) that we can remove / substitute
- "is_component_ffmpeg=true"
- )
- else
- myconf_gn+=(
- "proprietary_codecs=$(usex proprietary-codecs true false)"
- "ffmpeg_branding=\"$(usex proprietary-codecs Chrome Chromium)\""
- )
- fi
-
- if use headless; then
- myconf_gn+=(
- "enable_print_preview=false"
- "enable_remoting=false"
- 'ozone_platform="headless"'
- "rtc_use_pipewire=false"
- "use_alsa=false"
- "use_cups=false"
- "use_gio=false"
- "use_glib=false"
- "use_gtk=false"
- "use_kerberos=false"
- "use_libpci=false"
- "use_pangocairo=false"
- "use_pulseaudio=false"
- "use_qt5=false"
- "use_qt6=false"
- "use_udev=false"
- "use_vaapi=false"
- "use_xkbcommon=false"
- )
- else
- myconf_gn+=(
- "gtk_version=$(usex gtk4 4 3)"
- # link pulseaudio directly (DT_NEEDED) instead of using dlopen.
- # helps with automated detection of ABI mismatches and prevents silent errors.
- "link_pulseaudio=$(usex pulseaudio true false)"
- "ozone_platform_wayland=$(usex wayland true false)"
- "ozone_platform_x11=$(usex X true false)"
- "ozone_platform=\"$(usex wayland wayland x11)\""
- "rtc_use_pipewire=$(usex screencast true false)"
- "use_cups=$(usex cups true false)"
- "use_kerberos=$(usex kerberos true false)"
- "use_pulseaudio=$(usex pulseaudio true false)"
- "use_qt5=false"
- "use_system_libffi=$(usex wayland true false)"
- "use_system_minigbm=true"
- "use_vaapi=$(usex vaapi true false)"
- "use_xkbcommon=true"
- )
- if use qt6; then
- local cbuild_libdir
- cbuild_libdir="$(get_libdir)"
- if tc-is-cross-compiler; then
- # Hack to workaround get_libdir not being able to handle CBUILD, bug #794181
- cbuild_libdir="$($(tc-getBUILD_PKG_CONFIG) --keep-system-libs --libs-only-L libxslt)"
- cbuild_libdir="${cbuild_libdir:2}"
- cbuild_libdir="${cbuild_libdir/% }"
- fi
- myconf_gn+=(
- "use_qt6=true"
- "moc_qt6_path=\"${EPREFIX}/usr/${cbuild_libdir}/qt6/libexec\""
- )
- else
- myconf_gn+=( "use_qt6=false" )
- fi
- fi
-
- # Explicitly disable ICU data file support for system-icu/headless builds.
- if use system-icu || use headless; then
- myconf_gn+=( "icu_use_data_file=false" )
- fi
-
- if use official; then
- # Allow building against system libraries in official builds
- sed -i 's/OFFICIAL_BUILD/GOOGLE_CHROME_BUILD/' \
- tools/generate_shim_headers/generate_shim_headers.py || die
- # Don't add symbols to build
- myconf_gn+=( "symbol_level=0" )
- fi
-
- if use pgo; then
- myconf_gn+=(
- "chrome_pgo_phase=2"
- "v8_enable_builtins_optimization=true"
- )
- else
- myconf_gn+=( "chrome_pgo_phase=0" )
- fi
-
- # Odds and ends
-
- # skipping typecheck is only supported on amd64, bug #876157
- if ! use amd64; then
- myconf_gn+=( "devtools_skip_typecheck=false" )
- fi
-
- # Disable external code space for V8 for ppc64. It is disabled for ppc64
- # by default, but cross-compiling on amd64 enables it again.
- if tc-is-cross-compiler && use ppc64; then
- myconf_gn+=( "v8_enable_external_code_space=false" )
- fi
-
- # This determines whether or not GN uses the bundled libcxx
- if use libcxx; then
- myconf_gn+=( "use_custom_libcxx=true" )
- else
- myconf_gn+=(
- "use_custom_libcxx=false"
- "use_llvm_libatomic=false"
- )
- append-cppflags -U_GLIBCXX_ASSERTIONS #See #318
- fi
-
- myconf_gn+=( "use_bluez=$(usex bluetooth true false)" )
-
- myconf_gn+=( "is_cfi=$(usex cfi true false)" )
-
- if use cfi; then
- myconf_gn+=(
- "use_cfi_icall=true"
- "use_cfi_cast=true"
- )
- fi
-
- myconf_gn+=(
- "optimize_webui=$(usex optimize-webui true false)"
- "use_system_freetype=$(usex system-harfbuzz true false)"
- "use_system_libopenjpeg2=$(usex system-openjpeg true false)"
- "enable_pdf=true"
- "use_system_lcms2=true"
- "enable_print_preview=true"
- "use_thin_lto=$(usex thinlto true false)"
- "thin_lto_enable_optimizations=$(usex optimize-thinlto true false)"
-
- # Ungoogled flags
- "build_with_tflite_lib=false"
- "enable_mdns=false"
- "enable_mse_mpeg2ts_stream_parser=$(usex proprietary-codecs true false)"
- "enable_remoting=false"
- "enable_reporting=false"
- "enable_service_discovery=false"
- "exclude_unwind_tables=true"
- "google_api_key=\"\""
- "google_default_client_id=\"\""
- "google_default_client_secret=\"\""
- "safe_browsing_mode=0"
- "use_official_google_api_keys=false"
- "use_unofficial_version_number=false"
-
- # "enable_swiftshader=false"
-
- # Additional flags
- # "perfetto_use_system_zlib=true"
- # "use_system_zlib=true"
- # "use_system_libjpeg=true"
- # "rtc_build_examples=false"
- # "enable_chromium_prelude=false"
- # "enable_updater=false"
- # "enable_update_notifications=false"
- # "enable_constraints=false"
- # "rtc_rusty_base64=false"
- # "v8_enable_temporal_support=false"
- # "media_use_symphonia=false"
- # "pdf_enable_rust_png=false"
- # "skia_use_libpng_encode=true"
- # "skia_use_libpng_decode=true"
- # "skia_use_rust_png_decode=false"
- # "skia_use_rust_png_encode=false"
- # "enable_jxl_decoder=false"
- )
-
- if use amd64 || use arm64; then
- myconf_gn+=(
- "v8_drumbrake_bounds_checks=true"
- # "v8_enable_drumbrake=true"
- )
- fi
-
- if use thinlto; then
- # We need to change the default value of import-instr-limit in
- # LLVM to limit the text size increase. The default value is
- # 100, and we change it to 30 to reduce the text size increase
- # from 25% to 10%. The performance number of page_cycler is the
- # same on two of the thinLTO configurations, we got 1% slowdown
- # on speedometer when changing import-instr-limit from 100 to 30.
- # append-ldflags "-Wl,-plugin-opt,-import-instr-limit=30"
- sed -i '/import_instr_limit = 5/{s++import_instr_limit = 30+;h};${x;/./{x;q0};x;q1}' \
- build/config/compiler/BUILD.gn || die
-
- append-ldflags "-Wl,--thinlto-jobs=$(makeopts_jobs)"
- fi
-
- # Facilitate deterministic builds (taken from build/config/compiler/BUILD.gn)
- append-cflags -Wno-builtin-macro-redefined
- append-cxxflags -Wno-builtin-macro-redefined
- append-cppflags "-D__DATE__= -D__TIME__= -D__TIMESTAMP__="
-
- local flags
- einfo "Building with the following compiler settings:"
- for flags in C{C,XX} AR NM RANLIB {C,CXX,CPP,LD}FLAGS \
- EXTRA_GN UGC_{SKIP_{PATCHES,SUBSTITUTION},KEEP_BINARIES} ; do
- einfo " ${flags} = \"${!flags}\""
- done
-
- # Since we build from tarballs, we need to set the channel here so that it can be used in the build.
- export CHROME_VERSION_EXTRA="${SLOT}"
-
- einfo "Configuring Chromium ..."
- set -- gn gen --args="${myconf_gn[*]}${EXTRA_GN:+ ${EXTRA_GN}}" out/Release
- echo "$@"
- "$@" || die "Failed to configure Chromium"
-
- # The "if" below should not be executed unless testing
- if [ ! -z "${NODIE}" ]; then
- # List all args
- # gn args --list out/Release
-
- # Quick compiler check
- eninja -C out/Release protoc torque
- fi
-}
-
-src_compile() {
- # Final link uses lots of file descriptors.
- ulimit -n 2048
-
- # Calling this here supports resumption via FEATURES=keepwork
- python_setup
-
- # I hate doing this but upstream Rust have yet to come up with a better solution for
- # us poor packagers. Required for Split LTO units, which are required for CFI.
- export RUSTC_BOOTSTRAP=1
-
- # Don't inherit PYTHONPATH from environment, bug #789021, #812689
- local -x PYTHONPATH=
-
- # Build mksnapshot and pax-mark it.
- if use pax-kernel; then
- local x
- for x in mksnapshot v8_context_snapshot_generator code_cache_generator; do
- if tc-is-cross-compiler; then
- eninja -C out/Release "host/${x}"
- pax-mark m "out/Release/host/${x}"
- else
- eninja -C out/Release "${x}"
- pax-mark m "out/Release/${x}"
- fi
- done
- fi
-
- # Even though ninja autodetects number of CPUs, we respect
- # user's options, for debugging with -j 1 or any other reason.
- eninja -C out/Release chrome chrome_sandbox $(use test && echo "base_unittests")
-
- pax-mark m out/Release/chrome
-
- # This codepath does minimal patching, so we're at the mercy of upstream
- # CFLAGS. This is fine - we're not intending to force this on users
- # and we do a lot of flag 'management' anyway.
- if use bundled-toolchain; then
- QA_FLAGS_IGNORED="
- usr/lib64/chromium-browser/chrome
- usr/lib64/chromium-browser/chrome-sandbox
- usr/lib64/chromium-browser/chromedriver
- usr/lib64/chromium-browser/chrome_crashpad_handler
- usr/lib64/chromium-browser/libEGL.so
- usr/lib64/chromium-browser/libGLESv2.so
- usr/lib64/chromium-browser/libVkICD_mock_icd.so
- usr/lib64/chromium-browser/libVkLayer_khronos_validation.so
- usr/lib64/chromium-browser/libqt6_shim.so
- usr/lib64/chromium-browser/libvk_swiftshader.so
- usr/lib64/chromium-browser/libvulkan.so.1
- "
- fi
-
- use convert-dict && eninja -C out/Release convert_dict
-
- use enable-driver && eninja -C out/Release chromedriver
- #use suid && eninja -C out/Release chrome_sandbox
-
- use enable-driver && mv out/Release/chromedriver{.unstripped,}
-
- rm -f out/Release/locales/*.pak.info || die
-
- # Generate support files (desktop file, manpage, etc.) See: #684550 #706786 #968958
- ${EPYTHON} "${FILESDIR}/generate-support-files.py" \
- --installdir "/usr/$(get_libdir)/ungoogled-chromium-browser" \
- --channel "${SLOT}" ||
- die "Failed to generate support files"
-}
-
-src_test() {
- # Tests may be flaky with usersandbox, and the test runner executes significantly faster without.
- # If you seem to be excluding too many tests for a particular milestone: comment them out, reboot, and
- # run the tests again. If that doesn't help, try FEATURES="-usersandbox" and send it because obviously the
- # chromium gods are not smiling upon you today. Do some runtime testing, obvs.
- local skip_tests=(
- # Wildcard exclusions (if all tests in a test suite are broken)
- 'AlternateTestParams/PartitionAllocDeathTest.RepeatedAllocReturnNullDirect/*'
- 'AlternateTestParams/PartitionAllocDeathTest.RepeatedReallocReturnNullDirect/*'
- 'AlternateTestParams/PartitionAllocTest.*' # 200+ tests, >= 1 crashes entire test runner with usersandbox.
- 'CheckExitCodeAfterSignalHandlerDeathTest.*'
- 'CriticalProcessAndThreadSpotChecks/HangWatcherAnyCriticalThreadTests.*'
- 'LazyThreadPoolTaskRunnerEnvironmentTest.*' # M142
- 'ToolsSanityTest.BadVirtualCall*'
- # requires en-us locale
- SysStrings.SysNativeMBAndWide
- SysStrings.SysNativeMBToWide
- SysStrings.SysWideToNativeMB
- # Specific test cases
- CancelableEventTest.BothCancelFailureAndSucceedOccurUnderContention
- FilePathTest.FromUTF8Unsafe_And_AsUTF8Unsafe
- HistogramTesterTest.PumaTestUniqueSample
- PathServiceTest.CheckedGetFailure
- PlatformThreadTest.CanChangeThreadType
- RawPtrTest.SetLookupUsesGetForComparison # M146 ; also broken for alpine in M144.
- RustLogIntegrationTest.CheckAllSeverity
- StackCanary.ChangingStackCanaryCrashesOnReturn
- StackTraceDeathTest.StackDumpSignalHandlerIsMallocFree
- TestLauncherTools.TruncateSnippetFocusedMatchesFatalMessagesTest
- ThreadPoolEnvironmentConfig.CanUseBackgroundPriorityForWorker
- )
- local test_filter="-$(IFS=:; printf '%s' "${skip_tests[*]}")"
- # test-launcher-bot-mode enables parallelism and plain output
- # Check individual tests with --gtest_filter=<test you want> --single-process-tests
- ./out/Release/base_unittests --test-launcher-bot-mode \
- --test-launcher-jobs="$(get_makeopts_jobs)" \
- --gtest_filter="${test_filter}" || die "Tests failed!"
-}
-
-src_install() {
- local browser_suffix
- if [[ "${SLOT}" != "stable" ]]; then
- browser_suffix="-${SLOT}"
- else
- browser_suffix=""
- fi
- local CHROMIUM_HOME="/usr/$(get_libdir)/ungoogled-chromium-browser${browser_suffix}"
- exeinto "${CHROMIUM_HOME}"
- doexe out/Release/chrome
-
- #newexe out/Release/chrome_sandbox chrome-sandbox
- #fperms 4755 "${CHROMIUM_HOME}/chrome-sandbox"
-
- use enable-driver && doexe out/Release/chromedriver
-
- #* https://github.com/ungoogled-software/ungoogled-chromium/pull/3563
- doexe out/Release/chrome_crashpad_handler
-
- if use convert-dict; then
- newexe "${FILESDIR}/update-dicts.sh" update-dicts.sh
- doexe out/Release/convert_dict
- fi
-
- ozone_auto_session () {
- use X && use wayland && ! use headless && echo true || echo false
- }
-
- cat <<- EOF > "${D}${CHROMIUM_HOME}/chromium-launcher.sh" || die
- #!/bin/bash
- # Wrapper to launch slotted Chromium via the chromium-common launcher script.
- export CHROME_DESKTOP="ungoogled-chromium-browser${browser_suffix}.desktop"
- export CHROME_EXEC_NAME="ungoogled-chromium-browser${browser_suffix}"
- export CHROME_VERSION_EXTRA="${SLOT}"
- export CHROME_WRAPPER="\$(readlink -f "\$0")"
- export OZONE_AUTO_SESSION=$(ozone_auto_session)
-
- exec /usr/libexec/chromium/chromium-launcher.sh "\$@"
- EOF
-
- chmod 755 "${D}${CHROMIUM_HOME}/chromium-launcher.sh" || die
-
- # It is important that we name the target "chromium-browser",
- # xdg-utils expect it; bug #355517.
- dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/ungoogled-chromium-browser${browser_suffix}
- # keep the old symlink around for consistency
- dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/ungoogled-chromium${browser_suffix}
-
- use enable-driver && dosym "${CHROMIUM_HOME}/chromedriver" /usr/bin/ungoogled-chromedriver${browser_suffix}
-
- pushd out/Release/locales > /dev/null || die
- chromium_remove_language_paks
- popd > /dev/null || die
-
- insinto "${CHROMIUM_HOME}"
- doins out/Release/*.bin
- doins out/Release/*.pak
- doins -r out/Release/hyphen-data
-
- if use bindist; then
- # We built libffmpeg as a component library, but we can't distribute it
- # with proprietary codec support. Remove it and make a symlink to the requested
- # system library.
- rm -f out/Release/libffmpeg.so \
- || die "Failed to remove bundled libffmpeg.so (with proprietary codecs)"
- # symlink the libffmpeg.so from either ffmpeg-chromium or ffmpeg[chromium].
- einfo "Creating symlink to libffmpeg.so from $(usex ffmpeg-chromium ffmpeg-chromium ffmpeg[chromium])..."
- dosym ../chromium/libffmpeg.so$(usex ffmpeg-chromium .${PV%%\.*} "") \
- /usr/$(get_libdir)/ungoogled-chromium-browser/libffmpeg.so
- fi
-
- (
- shopt -s nullglob
- local files=(out/Release/*.so out/Release/*.so.[0-9])
- [[ ${#files[@]} -gt 0 ]] && doins "${files[@]}"
- )
-
- if ! use system-icu && ! use headless; then
- doins out/Release/icudtl.dat
- fi
-
- doins -r out/Release/locales
- #doins -r out/Release/MEIPreload
-
- # Install vk_swiftshader_icd.json; bug #827861
- doins out/Release/vk_swiftshader_icd.json
-
- if [[ -d out/Release/swiftshader ]]; then
- insinto "${CHROMIUM_HOME}/swiftshader"
- doins out/Release/swiftshader/*.so
- fi
-
- use widevine && dosym WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so "${CHROMIUM_HOME}/libwidevinecdm.so"
-
- # Install icons
- local branding size
- for size in 16 24 32 48 64 128 256 ; do
- case ${size} in
- 16|32) branding="chrome/app/theme/default_100_percent/chromium" ;;
- *) branding="chrome/app/theme/chromium" ;;
- esac
- newicon -s ${size} "${branding}/product_logo_${size}.png" \
- ungoogled-chromium-browser${browser_suffix}.png
- done
-
- # Install desktop entry
- domenu out/Release/ungoogled-chromium-browser${browser_suffix}.desktop
-
- # Install GNOME default application entry (bug #303100).
- insinto /usr/share/gnome-control-center/default-apps
- doins out/Release/ungoogled-chromium-browser${browser_suffix}.xml
-
- # Install AppStream metadata
- insinto /usr/share/appdata
- doins out/Release/ungoogled-chromium-browser${browser_suffix}.appdata.xml
-
- # Install manpage; bug #684550
- doman out/Release/ungoogled-chromium-browser${browser_suffix}.1
- dosym ungoogled-chromium-browser${browser_suffix}.1 /usr/share/man/man1/ungoogled-chromium${browser_suffix}.1
-
- readme.gentoo_create_doc
-}
-
-pkg_postrm() {
- xdg_icon_cache_update
- xdg_desktop_database_update
-}
-
-pkg_postinst() {
- xdg_icon_cache_update
- xdg_desktop_database_update
- readme.gentoo_print_elog
-
- if use !headless && [[ -z "${REPLACING_VERSIONS}" ]]; then
- if use vaapi; then
- elog "Hardware-accelerated video decoding configuration:"
- elog
- elog "Chromium supports multiple backends for hardware acceleration. To enable one,"
- elog " Add to CHROMIUM_FLAGS in /etc/chromium/default:"
- elog
- elog "1. VA-API with OpenGL (recommended for most users):"
- elog " --enable-features=AcceleratedVideoDecodeLinuxGL"
- elog " VaapiVideoDecoder may need to be added as well, but try without first."
- elog
- if use wayland; then
- elog "2. Enhanced Wayland/EGL performance:"
- elog " --enable-features=AcceleratedVideoDecodeLinuxGL,AcceleratedVideoDecodeLinuxZeroCopyGL"
- elog
- fi
- if use X; then
- elog "$(usex wayland "3" "2"). VA-API with Vulkan:"
- elog " --enable-features=VaapiVideoDecoder,VaapiIgnoreDriverChecks,Vulkan,DefaultANGLEVulkan,VulkanFromANGLE"
- elog
- if use wayland; then
- elog " NOTE: Vulkan acceleration requires X11 and will not work under Wayland sessions."
- elog " Use OpenGL-based acceleration instead when running under Wayland."
- elog
- fi
- fi
- elog "Additional options:"
- elog " To enable hardware-accelerated encoding (if supported)"
- elog " add 'AcceleratedVideoEncoder' to your feature list"
- elog " VaapiIgnoreDriverChecks bypasses driver compatibility checks"
- elog " (may be needed for newer/unsupported hardware)"
- elog
- else
- elog "This Chromium build was compiled without VA-API support, which provides"
- elog "hardware-accelerated video decoding."
- fi
- if use screencast; then
- elog "Screencast is disabled by default at runtime. Either enable it"
- elog "by navigating to chrome://flags/#enable-webrtc-pipewire-capturer"
- elog "inside Chromium or add --enable-features=WebRTCPipeWireCapturer"
- elog "to CHROMIUM_FLAGS in /etc/chromium/default."
- elog
- elog "Additional setup may be required for screencasting to work."
- elog "See issue: https://github.com/PF4Public/gentoo-overlay/issues/314"
- fi
- if use gtk4; then
- elog "Chromium prefers GTK3 over GTK4 at runtime. To override this"
- elog "behaviour you need to pass --gtk-version=4, e.g. by adding it"
- elog "to CHROMIUM_FLAGS in /etc/chromium/default."
- fi
- if use widevine; then
- elog "widevine requires binary plugins, which are distributed separately"
- elog "Make sure you have www-plugins/chrome-binary-plugins installed"
- fi
- fi
-
- if systemd_is_booted && ! [[ -f "/etc/machine-id" ]]; then
- ewarn "The lack of an '/etc/machine-id' file on this system booted with systemd"
- ewarn "indicates that the Gentoo handbook was not followed to completion."
- ewarn ""
- ewarn "Chromium is known to behave unpredictably with this system configuration;"
- ewarn "please complete the configuration of this system before logging any bugs."
- fi
-
- # Stable slot doesn't change profile directory, and it's vanishingly unlikely that users will downgrade from dev.
- if [[ -n "${REPLACING_VERSIONS}" ]]; then
- local replacing_non_slotted=false
- # there could be more than one PVR
- for version in ${REPLACING_VERSIONS}; do
- if ver_test "${version}" -le "145.0.7632.116"; then
- replacing_non_slotted=true
- break
- fi
- done
- if ${replacing_non_slotted}; then
- ewarn "This version of Chromium has replaced a non-slotted ebuild."
- if [[ ${SLOT} != "stable" ]]; then
- ewarn "This channel has its own profile directory, so your existing profile will not be used."
- ewarn "To use your existing profile, either copy or move it to the new location."
- ewarn "See https://wiki.gentoo.org/wiki/Chromium#Profile_Directories for more information."
- ewarn ""
- fi
- ewarn "Any existing Progressive Web Apps (PWAs) will need to be reinstalled,"
- ewarn "or have the path in the desktop files updated to point to the new wrapper script."
- fi
- fi
-}
-
-eapply_wrapper () {
- if [ ! -z "${NODIE}" ]; then
- nonfatal eapply "$@"
- else
- eapply "$@"
- fi
-}
-
-git_wrapper () {
- if [ ! -z "${NODIE}" ]; then
- git "$@"
- else
- git "$@" || die
- fi
-}
-
-filter_wrapper () {
- einfo "Applying ${i##*/}"
- #? fuzz factor of 3 is OK?
- if [ ! -z "${NODIE}" ]; then
- filterdiff -p1 "${@:2}" < "$1" | patch -F 3 -p1
- else
- filterdiff -p1 "${@:2}" < "$1" | patch -F 3 -p1 || die
- fi
-}
diff --git a/www-client/ungoogled-chromium/ungoogled-chromium-149.0.7827.114_p1.ebuild b/www-client/ungoogled-chromium/ungoogled-chromium-149.0.7827.114_p1.ebuild
deleted file mode 100644
index b0d34a13ecf2..000000000000
--- a/www-client/ungoogled-chromium/ungoogled-chromium-149.0.7827.114_p1.ebuild
+++ /dev/null
@@ -1,2512 +0,0 @@
-# Copyright 2009-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-# Use following environment variables to customise the build
-# EXTRA_GN — pass extra options to gn
-# NINJAOPTS="-k0 -j8" useful to populate ccache even if ebuild is still failing
-# UGC_SKIP_PATCHES — space-separated list of patches to skip
-# UGC_KEEP_BINARIES — space-separated list of binaries to keep
-# UGC_SKIP_SUBSTITUTION — space-separated list of files to skip domain substitution
-
-# USE=bundled-toolchain is intended for users who want to use the same toolchain
-# as the upstream releases. It's also a good fallback in case we fall behind
-# and need to get a release out quickly (less likely with `dev` in-tree).
-# We can't rely on it as a default since the toolchain is only shipped for x86-64;
-# other architectures will need to use system toolchain.
-
-# Since m133 we are using CI-generated tarballs from
-# https://github.com/chromium-linux-tarballs/chromium-tarballs/
-
-# These are bit-for-bit identical to the official releases, but are built
-# using an external CI system that we have some control over, in case
-# issues pop up again with official tarball generation.
-
-GN_MIN_VER=0.2374
-# chromium-tools/get-chromium-toolchain-strings.py (or just use Chromicler)
-# Node for M145+ should be 24.12.0 but that's not packaged in Gentoo yet. See #969145
-TEST_FONT="9c07d19d9c5ee1ff94f717e6fb17e0c8c354e6f9"
-BUNDLED_CLANG_VER="llvmorg-23-init-10931-g20b6ec66-8"
-BUNDLED_RUST_VER="4c4205163abcbd08948b3efab796c543ba1ea687-2"
-RUST_SHORT_HASH=${BUNDLED_RUST_VER:0:10}-${BUNDLED_RUST_VER##*-}
-NODE_VER="24.12.0"
-ESBUILD_VER="0.25.1"
-ROLLUP_VER="4.57.1" # currently manual.
-
-CHROMIUM_LANGS="af am ar as az be bg bn bs ca cs cy da de el en-GB es es-419 et eu fa fi fil
- fr fr-CA gl gu he hi hr hu hy id is it ja ka kk km kn ko ky lo lt lv mk ml mn mr ms my
- nb ne nl or pa pl pt-BR pt-PT ro ru si sk sl sq sr sr-Latn sv sw ta te th tr uk ur uz
- vi zh-CN zh-HK zh-TW zu"
-
-# UGC_COMMIT_ID="4d7bb965938b072e1dc7d9a5fa26121805f97fc8"
-# UGC_PR_COMMITS=(
-# c917e096342e5b90eeea91ab1f8516447c8756cf
-# 5794e9d12bf82620d5f24505798fecb45ca5a22d
-# )
-
-CROMITE_COMMIT_ID="cb3baf14f52eb4365d017f640f85310735c19b79"
-
-#declare -A CHROMIUM_COMMITS=(
-# ["fcfb1a42813f1e9d8babedc7bb2e0f06101a3151"]="." #148+
-# ["-acb47d9a6b56c4889a2ed4216e9968cfc740086c"]="."
-# # ["-37c28a19804e47a68eabf3cf882a310689fc325b"]="." #disable style check for cromite
-# # ["cd5a0df905a28faa89ff2a4ab44f893f84dc4487"]="net/third_party/quiche/src"
-#)
-
-LLVM_COMPAT=( 21 22 23 )
-PYTHON_COMPAT=( python3_{13..14} )
-PYTHON_REQ_USE="xml(+)"
-RUST_MIN_VER=1.91.0
-RUST_NEEDS_LLVM="yes please"
-RUST_OPTIONAL="yes" # Not actually optional, but we don't need system Rust (or LLVM) with USE=bundled-toolchain
-RUST_REQ_USE="rustfmt" # Upstream run rustfmt on bindgen output, so we need it to be available.
-
-inherit check-reqs chromium-2 desktop flag-o-matic llvm-r1 multiprocessing ninja-utils pax-utils
-inherit python-any-r1 readme.gentoo-r1 rust systemd toolchain-funcs xdg-utils
-
-DESCRIPTION="Modifications to Chromium for removing Google integration and enhancing privacy"
-HOMEPAGE="https://github.com/ungoogled-software/ungoogled-chromium"
-PPC64_HASH="a85b64f07b489b8c6fdb13ecf79c16c56c560fc6"
-PATCH_V="${PV%%\.*}-2"
-COPIUM_COMMIT="b00f26bb5e0781020da5f830981472a142c6baf1"
-SRC_URI="https://github.com/chromium-linux-tarballs/chromium-tarballs/releases/download/${PV/_*}/chromium-${PV/_*}-linux.tar.xz
- https://deps.gentoo.zip/www-client/chromium/rollup-wasm-node-${ROLLUP_VER}.tgz
- https://gitlab.com/Matt.Jolly/chromium-patches/-/archive/${PATCH_V}/chromium-patches-${PATCH_V}.tar.bz2
- !bundled-toolchain? (
- https://codeberg.org/selfisekai/copium/archive/${COPIUM_COMMIT}.tar.gz
- -> chromium-patches-copium-${COPIUM_COMMIT:0:10}.tar.gz
- )
- bundled-toolchain? (
- https://commondatastorage.googleapis.com/chromium-browser-clang/Linux_x64/clang-${BUNDLED_CLANG_VER}.tar.xz
- -> chromium-clang-${BUNDLED_CLANG_VER}.tar.xz
- https://commondatastorage.googleapis.com/chromium-browser-clang/Linux_x64/rust-toolchain-${BUNDLED_RUST_VER}-${BUNDLED_CLANG_VER%-*}.tar.xz
- -> chromium-rust-toolchain-${RUST_SHORT_HASH}-${BUNDLED_CLANG_VER%-*}.tar.xz
- )
- test? (
- https://chromium-fonts.storage.googleapis.com/${TEST_FONT} -> chromium-testfonts-${TEST_FONT:0:10}.tar.gz
- )
- ppc64? (
- https://gitlab.raptorengineering.com/raptor-engineering-public/chromium/openpower-patches/-/archive/${PPC64_HASH}/openpower-patches-${PPC64_HASH}.tar.bz2 -> chromium-openpower-${PPC64_HASH:0:10}.tar.bz2
- )
-"
-
-# Gentoo tarball:
-# https://chromium-tarballs.distfiles.gentoo.org/chromium-${PV/_*}.tar.xz -> chromium-${PV/_*}-gentoo.tar.xz
-
-# chromium-linux-tarballs
-# https://github.com/chromium-linux-tarballs/chromium-tarballs/releases/download/${PV/_*}/chromium-${PV/_*}-linux.tar.xz
-
-# Official tarball:
-# https://commondatastorage.googleapis.com/chromium-browser-official/chromium-${PV/_*}${LITE_TARBALL:+-lite}.tar.xz
-
-# https://gitweb.gentoo.org/proj/chromium-tools.git/tree/get-chromium-licences.py @ 145.0.7632.76
-LICENSE="Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD BSD-2 Base64 Boost-1.0 CC-BY-3.0 CC-BY-4.0 Clear-BSD FFT2D FTL"
-LICENSE+=" IJG ISC LGPL-2 LGPL-2.1 MIT MPL-1.1 MPL-2.0 Ms-PL PSF-2 SGI-B-2.0 SSLeay SunSoft Unicode-3.0"
-LICENSE+=" Unicode-DFS-2015 Unlicense UoI-NCSA ZLIB libtiff openssl"
-LICENSE+=" cromite? ( GPL-3 )"
-
-SLOT="stable"
-KEYWORDS="amd64 ~arm64 ~ppc64 ~x86"
-
-IUSE_SYSTEM_LIBS="abseil-cpp av1 brotli crc32c double-conversion ffmpeg +harfbuzz icu jsoncpp +libusb libvpx +openh264 openjpeg re2 snappy woff2 +zstd"
-IUSE="+X bindist bluetooth bundled-toolchain cfi convert-dict cups custom-cflags debug ffmpeg-chromium enable-driver gtk4 hangouts headless kerberos +libcxx nvidia +official optimize-thinlto optimize-webui override-data-dir pax-kernel pgo"
-IUSE+=" +proprietary-codecs pulseaudio qt6 screencast selinux test thinlto cromite vaapi wayland widevine cpu_flags_ppc_vsx3"
-RESTRICT="
- !bindist? ( bindist )
- !test? ( test )
- arm64? ( test )
- !system-ffmpeg? ( proprietary-codecs? ( bindist ) )
- !system-openh264? ( bindist )
- cromite? ( bindist )"
-
-REQUIRED_USE="
- !headless? ( || ( X wayland ) )
- screencast? ( wayland )
- ffmpeg-chromium? ( bindist proprietary-codecs )
- optimize-thinlto? ( thinlto )
- cfi? ( thinlto )
- x86? ( !thinlto !widevine )
- debug? ( !official )
- vaapi? ( !system-av1 !system-libvpx )
-"
-
-UGC_PV="${PV/_p/-}"
-UGC_PF="${PN}-${UGC_PV}"
-UGC_URL="https://github.com/ungoogled-software/${PN}/archive/"
-
-if [ -z "$UGC_COMMIT_ID" ]; then
- UGC_URL="${UGC_URL}${UGC_PV}.tar.gz -> ${UGC_PF}.tar.gz"
- UGC_WD="${WORKDIR}/${UGC_PF}"
-else
- UGC_URL="${UGC_URL}${UGC_COMMIT_ID}.tar.gz -> ${PN}-${UGC_COMMIT_ID}.tar.gz"
- UGC_WD="${WORKDIR}/ungoogled-chromium-${UGC_COMMIT_ID}"
-fi
-
-SRC_URI+="${UGC_URL}
-"
-
-if [ ! -z "${UGC_PR_COMMITS[*]}" ]; then
- for i in "${UGC_PR_COMMITS[@]}"; do
- SRC_URI+="https://github.com/ungoogled-software/${PN}/commit/$i.patch?full_index=true -> ${PN}-$i.patch
- "
- done
-fi
-
-if [ ! -z "${CHROMIUM_COMMITS[*]}" ]; then
- # for i in "${CHROMIUM_COMMITS[@]}"; do
- for i in "${!CHROMIUM_COMMITS[@]}"; do
- if [[ ${CHROMIUM_COMMITS[$i]} =~ webrtc ]]; then
- #TODO: is it safe to use this mirror?
- SRC_URI+="https://github.com/webrtc-mirror/webrtc/commit/${i/-}.patch?full_index=true -> webrtc-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ angle ]]; then
- SRC_URI+="https://github.com/google/angle/commit/${i/-}.patch?full_index=true -> angle-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ quiche ]]; then
- SRC_URI+="https://github.com/google/quiche/commit/${i/-}.patch?full_index=true -> quiche-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ dawn ]]; then
- SRC_URI+="https://github.com/google/dawn/commit/${i/-}.patch?full_index=true -> dawn-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ perfetto ]]; then
- SRC_URI+="https://github.com/google/perfetto/commit/${i/-}.patch?full_index=true -> perfetto-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ink ]]; then
- SRC_URI+="https://github.com/google/ink/commit/${i/-}.patch?full_index=true -> ink-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ vulkan-utility-libraries ]]; then
- SRC_URI+="https://github.com/KhronosGroup/Vulkan-Utility-Libraries/commit/${i/-}.patch?full_index=true -> vulkan-utility-libraries-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ruy ]]; then
- SRC_URI+="https://github.com/google/ruy/commit/${i/-}.patch?full_index=true -> ruy-${i/-}.patch
- "
- else
- SRC_URI+="https://github.com/chromium/chromium/commit/${i/-}.patch?full_index=true -> chromium-${i/-}.patch
- "
- fi
- done
-fi
-
-SRC_URI+="cromite? ( https://github.com/uazo/cromite/archive/${CROMITE_COMMIT_ID}.tar.gz -> cromite-${CROMITE_COMMIT_ID}.tar.gz )
-"
-
-for i in ${IUSE_SYSTEM_LIBS}; do
- [[ $i =~ ^(\+)?(.*)$ ]]
- IUSE+=" ${BASH_REMATCH[1]}system-${BASH_REMATCH[2]}"
-done
-
-COMMON_X_DEPEND="
- x11-libs/libXcomposite:=
- x11-libs/libXcursor:=
- x11-libs/libXdamage:=
- x11-libs/libXfixes:=
- >=x11-libs/libXi-1.6.0:=
- x11-libs/libXrandr:=
- x11-libs/libXrender:=
- x11-libs/libXtst:=
- x11-libs/libxshmfence:=
-"
-
-# sys-libs/zlib: https://bugs.gentoo.org/930365; -ng is not compatible.
-# We _could_ use the bundled minizip, but that's against policy.
-COMMON_SNAPSHOT_DEPEND="
- system-icu? ( >=dev-libs/icu-78:= )
- system-abseil-cpp? ( >=dev-cpp/abseil-cpp-20260107.0 )
- system-brotli? ( >=app-arch/brotli-9999 )
- system-crc32c? ( dev-libs/crc32c )
- system-double-conversion? ( dev-libs/double-conversion )
- system-woff2? ( media-libs/woff2 )
- system-snappy? ( app-arch/snappy )
- system-jsoncpp? ( dev-libs/jsoncpp )
- system-openjpeg? ( media-libs/openjpeg:2= )
- system-re2? ( >=dev-libs/re2-0.2019.08.01:= )
- system-libvpx? ( >=media-libs/libvpx-1.13.0:=[postproc] )
- system-libusb? ( virtual/libusb:1 )
- cromite? ( dev-util/patchutils )
- >=dev-libs/libxml2-2.12.4:=[icu]
- dev-libs/nspr:=
- >=dev-libs/nss-3.26:=
- dev-libs/libxslt:=
- media-libs/fontconfig:=
- >=media-libs/freetype-2.11.0-r1:=
- system-harfbuzz? ( >=media-libs/harfbuzz-3:0=[icu(-)] )
- media-libs/libjpeg-turbo:=
- media-libs/libpng:=
- system-zstd? ( >=app-arch/zstd-1.5.5:= )
- >=media-libs/libwebp-0.4.0:=
- media-libs/mesa:=[gbm(+)]
- >=media-libs/openh264-2.6.0:=
- system-av1? (
- >=media-libs/dav1d-1.0.0:=
- >=media-libs/libaom-3.7.0:=
- )
- sys-libs/zlib:=
- !headless? (
- dev-libs/glib:2
- >=media-libs/alsa-lib-1.0.19:=
- pulseaudio? (
- || (
- media-libs/libpulse
- >=media-sound/apulse-0.1.9
- )
- )
- sys-apps/pciutils:=
- kerberos? ( virtual/krb5 )
- vaapi? ( >=media-libs/libva-2.7:=[X?,wayland?] )
- X? (
- x11-base/xorg-proto:=
- x11-libs/libX11:=
- x11-libs/libxcb:=
- x11-libs/libXext:=
- )
- x11-libs/libxkbcommon:=
- wayland? (
- dev-libs/libffi:=
- dev-libs/wayland:=
- screencast? (
- media-video/pipewire:=
- || (
- sys-apps/xdg-desktop-portal-gnome
- sys-apps/xdg-desktop-portal-gtk
- kde-plasma/xdg-desktop-portal-kde
- gui-libs/xdg-desktop-portal-lxqt
- gui-libs/xdg-desktop-portal-wlr
- )
- )
- )
- )
-"
-
-COMMON_DEPEND="
- ${COMMON_SNAPSHOT_DEPEND}
- app-arch/bzip2:=
- dev-libs/expat:=
- system-ffmpeg? (
- >=media-video/ffmpeg-6.1:=
- >=media-libs/opus-1.3.1:=
- )
- net-misc/curl[ssl]
- sys-apps/dbus:=
- media-libs/flac:=
- sys-libs/zlib:=[minizip]
- !headless? (
- >=app-accessibility/at-spi2-core-2.46.0:2
- media-libs/mesa:=[X?,wayland?]
- virtual/udev
- x11-libs/cairo:=
- x11-libs/gdk-pixbuf:2
- x11-libs/pango:=
- cups? ( >=net-print/cups-1.3.11:= )
- qt6? ( dev-qt/qtbase:6[gui,widgets] )
- X? ( ${COMMON_X_DEPEND} )
- )
-"
-RDEPEND="${COMMON_DEPEND}
- !www-client/ungoogled-chromium:0
- >=www-client/chromium-common-2
- !headless? (
- || (
- x11-libs/gtk+:3[X?,wayland?]
- gui-libs/gtk:4[X?,wayland?]
- )
- qt6? ( dev-qt/qtbase:6[X?,wayland?] )
- )
- virtual/ttf-fonts
- selinux? ( sec-policy/selinux-chromium )
- bindist? (
- ffmpeg-chromium? ( media-video/ffmpeg-chromium:${PV%%\.*} )
- )
- !override-data-dir? (
- !www-client/chromium:${SLOT}
- !www-client/cromite:${SLOT}[-override-data-dir]
- )
-"
-
-DEPEND="${COMMON_DEPEND}
- !headless? (
- gtk4? ( gui-libs/gtk:4[X?,wayland?] )
- !gtk4? ( x11-libs/gtk+:3[X?,wayland?] )
- )
-"
-
- # pgo? ( >=llvm-core/clang-22.0.0_pre20260106 >=llvm-core/lld-22.0.0_pre20260106 )
-BDEPEND="
- ${COMMON_SNAPSHOT_DEPEND}
- ${PYTHON_DEPS}
- $(python_gen_any_dep '
- dev-python/setuptools[${PYTHON_USEDEP}]
- ')
- >=app-arch/gzip-1.7
- !headless? (
- qt6? ( dev-qt/qtbase:6 )
- )
- !bundled-toolchain? ( $(llvm_gen_dep '
- llvm-core/clang:${LLVM_SLOT}
- llvm-core/llvm:${LLVM_SLOT}
- llvm-core/lld:${LLVM_SLOT}
- cfi? ( llvm-runtimes/clang-runtime:${LLVM_SLOT}[sanitize] )
- official? (
- !ppc64? ( llvm-runtimes/compiler-rt-sanitizers:${LLVM_SLOT}[cfi] )
- ) ')
- ${RUST_DEPEND}
- )
- >=dev-util/bindgen-0.72.1
- >=dev-build/gn-${GN_MIN_VER}
- app-alternatives/ninja
- dev-lang/perl
- >=dev-util/gperf-3.2
- dev-util/esbuild:${ESBUILD_VER}
- dev-vcs/git
- >=net-libs/nodejs-${NODE_VER}[inspector]
- sys-apps/hwdata
- >=sys-devel/bison-2.4.3
- sys-devel/flex
- virtual/pkgconfig
- x11-misc/xdg-utils
-"
-
-if ! has chromium_pkg_die ${EBUILD_DEATH_HOOKS}; then
- EBUILD_DEATH_HOOKS+=" chromium_pkg_die";
-fi
-
-DISABLE_AUTOFORMATTING="yes"
-DOC_CONTENTS="
-Some web pages may require additional fonts to display properly.
-Try installing some of the following packages if some characters
-are not displayed properly:
-- media-fonts/arphicfonts
-- media-fonts/droid
-- media-fonts/ipamonafont
-- media-fonts/noto
-- media-fonts/ja-ipafonts
-- media-fonts/takao-fonts
-- media-fonts/wqy-microhei
-- media-fonts/wqy-zenhei
-
-To fix broken icons on the Downloads page, you should install an icon
-theme that covers the appropriate MIME types, and configure this as your
-GTK+ icon theme.
-
-For native file dialogs in KDE, install kde-apps/kdialog.
-
-To make password storage work with your desktop environment you may
-have install one of the supported credentials management applications:
-- app-crypt/libsecret (GNOME)
-- kde-frameworks/kwallet (KDE)
-If you have one of above packages installed, but don't want to use
-them in Chromium, then add --password-store=basic to CHROMIUM_FLAGS
-in /etc/chromium/default.
-"
-
-S="${WORKDIR}/chromium-${PV/_*}"
-
-python_check_deps() {
- python_has_version "dev-python/setuptools[${PYTHON_USEDEP}]"
-}
-
-pre_build_checks() {
- # Check build requirements: bugs #471810, #541816, #914220
- # We're going to start doing maths here on the size of an unpacked source tarball,
- # this should make updates easier as chromium continues to balloon in size.
- # xz -l /var/cache/distfiles/chromium-${PV}*.tar.xz
- local base_disk=9 # Round up
- use test && base_disk=$((base_disk + 5))
- local extra_disk=1 # Always include a little extra space
- local memory=4
- tc-is-cross-compiler && extra_disk=$((extra_disk * 2))
- if tc-is-lto || use pgo; then
- memory=$((memory * 2 + 1))
- tc-is-cross-compiler && extra_disk=$((extra_disk * 2)) # Double the requirements
- use pgo && extra_disk=$((extra_disk + 4))
- fi
- if is-flagq '-g?(gdb)?([1-9])'; then
- if use custom-cflags; then
- extra_disk=$((extra_disk + 5))
- fi
- memory=$((memory * 2))
- fi
- local CHECKREQS_MEMORY="${memory}G"
- local CHECKREQS_DISK_BUILD="$((base_disk + extra_disk))G"
- check-reqs_${EBUILD_PHASE_FUNC}
-}
-
-pkg_pretend() {
- if [[ ${MERGE_TYPE} != binary ]]; then
- # The pre_build_checks are all about compilation resources, no need to run it for a binpkg
- pre_build_checks
- fi
-
- if use headless; then
- local headless_unused_flags=("cups" "kerberos" "pulseaudio" "qt6" "vaapi" "wayland")
- for myiuse in ${headless_unused_flags[@]}; do
- use ${myiuse} && ewarn "Ignoring USE=${myiuse}, USE=headless is set."
- done
- fi
-
- if ! use bindist && use ffmpeg-chromium; then
- ewarn "Ignoring USE=ffmpeg-chromium, USE=bindist is not set."
- fi
- if use libcxx; then
- ewarn
- ewarn "Building with libcxx, please be aware that system-*"
- ewarn "and some other c++ dependencies need to be compiled"
- ewarn "with the same c++ library as ungoogled-chromium itself"
- ewarn "dev-libs/jsoncpp is most problematic, see #58 #49 #119 for details"
- ewarn "Simplest solution would be to disable corresponding system-* flags"
- ewarn
- fi
- if use cfi; then
- ewarn
- ewarn "Building with cfi is only possible if building with -stdlib=libc++"
- ewarn "Make sure all dependencies are also built this way, see #40"
- ewarn
- fi
- if use cromite; then
- ewarn
- ewarn "Cromite patches are very experimental and unstable"
- ewarn "Please consider testing them and giving feedback upstream:"
- ewarn "https://github.com/uazo/cromite/issues"
- ewarn "Not all patches are applied, let me know if others should be considered too"
- ewarn
- fi
-}
-
-pkg_setup() {
- if [[ ${MERGE_TYPE} != binary ]]; then
- # The pre_build_checks are all about compilation resources, no need to run it for a binpkg
- pre_build_checks
-
- # We haven't massaged any CFLAGS yet, so we want to do this before we force CC/CXX to prevent warnings.
- local want_lto="false"
- tc-is-lto && want_lto="true"
-
- # The linux:unbundle toolchain in GN grabs CC, CXX, CPP (etc) from the environment
- # We'll set these to clang here then use llvm-utils functions to very explicitly set these
- # to a sane value.
- # This is effectively the 'force-clang' path if GCC support is re-added.
- if use !bundled-toolchain; then
- llvm-r1_pkg_setup
- rust_pkg_setup
-
- # Forcing clang; respect llvm_slot_x to enable selection of impl via LLVM_COMPAT
- AR=llvm-ar
- CPP="${CHOST}-clang++-${LLVM_SLOT} -E"
- NM=llvm-nm
- CC="${CHOST}-clang-${LLVM_SLOT}"
- CXX="${CHOST}-clang++-${LLVM_SLOT}"
- fi
-
- use_lto="false"
- local lto_usable="true"
- if [[ "$want_lto" == "true" ]]; then
- if use arm64 && [[ "${LLVM_SLOT}" -lt 22 ]]; then
- einfo "LTO is broken with LLVM 21 on arm64, ignoring CFLAGS."
- lto_usable="false"
- else
- use_lto="true"
- fi
- # We can rely on GN to do this for us; without this builds
- # take significantly longer with LTO enabled.
- filter-lto
- fi
-
- if [[ "$use_lto" == "false" ]] && use official && [[ "$lto_usable" == "true" ]]; then
- einfo "USE=official selected and LTO not detected."
- einfo "It is _highly_ recommended that LTO be enabled for performance reasons"
- einfo "and to be consistent with the upstream \"official\" build optimisations."
- fi
-
- if [[ "$use_lto" == "false" ]] && use test; then
- die "Tests require CFI which requires LTO"
- fi
-
- export use_lto
-
- # 936858
- if tc-ld-is-mold; then
- eerror "Your toolchain is using the mold linker."
- eerror "This is not supported by Chromium."
- die "Please switch to a different linker."
- fi
-
- if tc-is-cross-compiler; then
- use pgo && die "The pgo USE flag cannot be used when cross-compiling"
- CPP="${CBUILD}-clang++-${LLVM_SLOT} -E"
- fi
-
- # Sanity checks for development convenience
- if ver_test $(gn --version || die) -lt ${GN_MIN_VER}; then
- die "dev-build/gn >= ${GN_MIN_VER} is required to build this Chromium"
- fi
-
- # Sometimes, when adding a new LLVM slot, devs (me) forget to install an appropriate lld.
- local lld_ver=$(ld.lld --version | awk '{split($2,a,"."); print a[1]}' || die "Failed to check lld version")
- if [[ ${lld_ver} -lt ${LLVM_SLOT} ]]; then
- die "Your lld version (${lld_ver}) is too old for the selected LLVM slot (${LLVM_SLOT}). Please install a newer lld or select an older LLVM slot."
- fi
- fi
-
- chromium_suid_sandbox_check_kernel_config
-}
-
-src_unpack() {
- # # Here be dragons!
- # local XCLD="--exclude=chromium-${PV/_*}/third_party/instrumented_libs \
- # --exclude=chromium-${PV/_*}/third_party/llvm \
- # --exclude=chromium-${PV/_*}/third_party/llvm-build \
- # --exclude=chromium-${PV/_*}/third_party/node/linux \
- # --exclude=chromium-${PV/_*}/third_party/rust-src \
- # --exclude=chromium-${PV/_*}/third_party/rust-toolchain \
- # --exclude=chromium-${PV/_*}/build/linux/debian_bullseye_i386-sysroot \
- # --exclude=chromium-${PV/_*}/build/linux/debian_bullseye_amd64-sysroot \
- # --exclude=chromium-${PV/_*}/third_party/angle/third_party/VK-GL-CTS \
- # "
-
- # if ! use libcxx ; then
- # XCLD+=" --exclude=chromium-${PV/_*}/third_party/libc++"
- # fi
-
- # if ! use pgo ; then
- # XCLD+=" --exclude=chromium-${PV/_*}/chrome/build/pgo_profiles"
- # fi
-
- # einfo "Unpacking chromium-${PV/_*}.tar.xz to ${WORKDIR}"
- # # Gentoo tarball:
- # # tar ${XCLD} -xf "${DISTDIR}/chromium-${PV/_*}-gentoo.tar.xz" -C "${WORKDIR}" || die
- # tar ${XCLD} -xf "${DISTDIR}/chromium-${PV/_*}${LITE_TARBALL:+-lite}.tar.xz" -C "${WORKDIR}" || die
-
- # unpack ${UGC_URL#*->}
- # # unpack chromium-patches-${PATCH_V}.tar.bz2
- # # Warned you!
-
- unpack chromium-${PV/_*}-linux.tar.xz
- unpack chromium-patches-${PATCH_V}.tar.bz2
- # These should only be required when we're not using the official toolchain
- if use !bundled-toolchain; then
- unpack chromium-patches-copium-${COPIUM_COMMIT:0:10}.tar.gz
- fi
-
- if use test; then
- # This just contains a bunch of font files that need to be unpacked (or moved) to the correct location.
- local testfonts_dir="${WORKDIR}/chromium-${PV/_*}/third_party/test_fonts/test_fonts"
- local testfonts_tar="${DISTDIR}/chromium-testfonts-${TEST_FONT:0:10}.tar.gz"
- einfo "Unpacking test fonts ..."
- tar xf "${testfonts_tar}" -C "${testfonts_dir}" || die "Failed to unpack testfonts"
- fi
-
- # We need to manually unpack this since M126 else we'd unpack one toolchain over the other.
- # Since we're doing that anyway let's unpack to sensible locations to make symlink creation easier.
- if use bundled-toolchain; then
- einfo "Unpacking bundled Clang ..."
- mkdir -p "${WORKDIR}"/clang || die "Failed to create clang directory"
- tar xf "${DISTDIR}/chromium-clang-${BUNDLED_CLANG_VER}.tar.xz" -C "${WORKDIR}/clang" || die "Failed to unpack Clang"
- einfo "Unpacking bundled Rust ..."
- local rust_dir="${WORKDIR}/rust-toolchain"
- mkdir -p "${rust_dir}" || die "Failed to create rust toolchain directory"
- tar xf "${DISTDIR}/chromium-rust-toolchain-${RUST_SHORT_HASH}-${BUNDLED_CLANG_VER%-*}.tar.xz" -C "${rust_dir}" ||
- die "Failed to unpack Rust"
- fi
-
- if use ppc64; then
- unpack chromium-openpower-${PPC64_HASH:0:10}.tar.bz2
- fi
-
- # This is a dirty hack, but we need rollup to build successfully and it's proving to be challenging
- # to build locally due to deps
- unpack rollup-wasm-node-${ROLLUP_VER}.tgz
-
- if use cromite; then
- unpack cromite-${CROMITE_COMMIT_ID}.tar.gz
- fi
-
- unpack ${UGC_URL#*->}
-}
-
-remove_compiler_builtins() {
- # We can't use the bundled compiler builtins with the system toolchain
- # We used to `grep` then `sed`, but it was indirect. Combining the two into a single
- # `awk` command is more efficient and lets us document the logic more clearly.
-
- local pattern=' configs += [ "//build/config/clang:compiler_builtins" ]'
- local target='build/config/compiler/BUILD.gn'
-
- local tmpfile
- tmpfile=$(mktemp) || die "Failed to create temporary file."
-
- if awk -v pat="${pattern}" '
- BEGIN {
- match_found = 0
- }
-
- # If the delete countdown is active, decrement it and skip to the next line.
- d > 0 { d--; next }
-
- # If the current line matches the pattern...
- $0 == pat {
- match_found = 1 # ...set our flag to true.
- d = 2 # Set delete counter for this line and the next two.
- prev = "" # Clear the buffered previous line so it is not printed.
- next
- }
-
- # For any other line, print the buffered previous line.
- NR > 1 { print prev }
-
- # Buffer the current line to be printed on the next cycle.
- { prev = $0 }
-
- END {
- # Print the last line if it was not part of a deleted block.
- if (d == 0) { print prev }
-
- # If the pattern was never found, exit with a failure code.
- if (match_found == 0) {
- exit 1
- }
- }
- ' "${target}" > "${tmpfile}"; then
- # AWK SUCCEEDED (exit code 0): The pattern was found and edited.
- # This is to avoid gawk's `-i inplace` option which users complain about.
- mv "${tmpfile}" "${target}"
- else
- # AWK FAILED (exit code 1): The pattern was not found.
- rm -f "${tmpfile}"
- die "Awk patch failed: Pattern not found in ${target}."
- fi
-}
-
-src_prepare() {
- # Calling this here supports resumption via FEATURES=keepwork
- python_setup
-
- # We'll fill this in as we go. Patches go in chromium-patches.
- local PATCHES=()
-
- rm "${WORKDIR}/chromium-patches-${PATCH_V}/common/cr131-unbundle-icu-target.patch"
- if use pgo; then
- rm "${WORKDIR}/chromium-patches-${PATCH_V}/rust/cr146-fix-botched-bytemuck-roll.patch"
- sed -i '/SupportedLaneCount/d' third_party/rust/chromium_crates_io/vendor/bytemuck-v1/src/zeroable.rs || die
- sed -i '/SupportedLaneCount/d' third_party/rust/chromium_crates_io/vendor/bytemuck-v1/src/pod.rs || die
- fi
-
- #cp -f ${WORKDIR}/chromium-patches-${PATCH_V}/*-compiler.patch "${T}/compiler.patch"
- ##cp -f ${FILESDIR}/chromium-147-compiler.patch "${T}/compiler.patch"
- #if ! use custom-cflags; then #See #25 #92
- # sed -i '/default_stack_frames/Q' "${T}/compiler.patch" || die
- #fi
-
- PATCHES+=( "${WORKDIR}/chromium-patches-${PATCH_V}/common/" )
- PATCHES+=( "${FILESDIR}/restore-x86-r3.patch" )
-
- # https://issues.chromium.org/issues/442698344
- # Unreleased fontconfig changed magic numbers and google have rolled to this version
- if has_version "<=media-libs/fontconfig-2.17.1"; then
- PATCHES+=( "${FILESDIR}/chromium-142-work-with-old-fontconfig.patch" )
- fi
-
- if use bundled-toolchain; then
- # We need to symlink the toolchain into the expected location
- einfo "Symlinking Clang toolchain to expected location ..."
- mkdir -p third_party/llvm-build/ || die "Failed to create llvm-build directory"
- # the 'Chromium Linux Tarballs' seem to already have 'Release+Asserts/{lib,bin}'; not sure if this is an
- # upstream change - we're using the same scripts to build, theoretically. We'll still attempt to create
- # llvm-build, but we'll rm Release+Asserts and symlink directly.
- if [[ -d third_party/llvm-build/Release+Asserts ]]; then
- rm -r third_party/llvm-build/Release+Asserts || die "Failed to remove third_party/llvm-build/Release+Asserts"
- fi
- ln -s "${WORKDIR}"/clang third_party/llvm-build/Release+Asserts || die "Failed to bundle Clang"
- einfo "Symlinking Rust toolchain to expected location ..."
- # As above, so below
- if [[ -d third_party/rust-toolchain ]]; then
- rm -r third_party/rust-toolchain || die "Failed to remove third_party/rust-toolchain"
- fi
- ln -s "${WORKDIR}"/rust-toolchain third_party/rust-toolchain || die "Failed to bundle rust"
- cp "${WORKDIR}"/rust-toolchain/VERSION \
- "${WORKDIR}"/rust-toolchain/INSTALLED_VERSION || die "Failed to set rust version"
- else
- # We don't need our toolchain patches if we're using the official toolchain
-
- # Copium patches go here.
- PATCHES+=(
- "${WORKDIR}/copium/cr143-libsync-__BEGIN_DECLS.patch"
- "${WORKDIR}/copium/cr149-unbundle-minizip-undo-unicode.patch"
- )
-
- # Automate conditional application of chromium-patches
- # The directory structure is expected to be something like:
- # chromium-patches-145/
- # ├── toolchain/
- # │ ├── cr123-foo.patch
- # │ └── cr135-bar.patch
- # ├── llvm/
- # │ ├── cr144-baz.patch
- # │ └── lt-23/
- # │ └── cr145-bleeding-edge-llvm-feature.patch
- # Where `lt-23` means "apply this patch if the LLVM version is less than 23".
- # Only categories in `slot_map` will be checked for version constraints.
- shopt -s nullglob
- local -A slot_map=( [llvm]="${LLVM_SLOT}" [rust]="${RUST_SLOT}" )
-
- for category in "${WORKDIR}/chromium-patches-${PATCH_V}"/*/; do
- local category_name="${category%/}"
- category_name="${category_name##*/}"
-
- # Skip arch-specific categories
- if [[ "${category_name}" == "ppc64le" ]]; then
- use ppc64 || continue
- fi
-
- # We applied common patches above, no need to apply them again here
- [[ "${category_name}" == "common" ]] && continue
-
- # Unconditional patches for this category
- local category_patches=( "${category}"*.patch )
- [[ ${#category_patches[@]} -gt 0 ]] && PATCHES+=( "${category}" )
-
- # Version-constrained subdirectories (e.g., llvm/lt-23/)
- for constraint_dir in "${category}"*/; do
- local dir_name="${constraint_dir%/}"
- dir_name="${dir_name##*/}"
- if [[ "${dir_name}" =~ ^lt-(.*)$ && -v slot_map[${category_name}] ]]; then
- ver_test "${slot_map[${category_name}]}" -lt "${BASH_REMATCH[1]}" &&
- PATCHES+=( "${constraint_dir}" )
- fi
- done
- done
-
- shopt -u nullglob
-
- # Strictly speaking this doesn't need to be gated (no bundled toolchain for ppc64); it keeps the logic together
- if use ppc64; then
- local patchset_dir="${WORKDIR}/openpower-patches-${PPC64_HASH}/patches"
- # patch causes build errors on 4K page systems (https://bugs.gentoo.org/show_bug.cgi?id=940304)
- local page_size_patch="ppc64le/third_party/use-sysconf-page-size-on-ppc64.patch"
- local isa_3_patch="ppc64le/core/baseline-isa-3-0.patch"
- # Apply the OpenPOWER patches (check for page size and isa 3.0)
- openpower_patches=( $(grep -E "^ppc64le|^upstream" "${patchset_dir}/series" | grep -v "${page_size_patch}" |
- grep -v "${isa_3_patch}" || die) )
- for patch in "${openpower_patches[@]}"; do
- PATCHES+=( "${patchset_dir}/${patch}" )
- done
- if [[ $(getconf PAGESIZE) == 65536 ]]; then
- PATCHES+=( "${patchset_dir}/${page_size_patch}" )
- fi
- # We use vsx3 as a proxy for 'want isa3.0' (POWER9)
- if use cpu_flags_ppc_vsx3 ; then
- PATCHES+=( "${patchset_dir}/${isa_3_patch}" )
- fi
- fi
-
- remove_compiler_builtins
-
- # We can't rely on the eselect'd Rust to actually include rustfmt, so we'll point to the selected slot specifically.
- local suffix=""
- if [[ "${RUST_TYPE}" == "binary" ]]; then
- suffix="-bin-${RUST_SLOT}"
- else
- suffix="-${RUST_SLOT}"
- fi
- sed -i "s|/bin/rustfmt|/bin/rustfmt${suffix}|g" build/rust/rust_bindgen_generator.gni ||
- die "Failed to update rustfmt path"
-
- fi
-
- # Do this before we apply patches since (e.g.) ppc64 needs to patch rollup and it's easier in ${S}
- einfo "Moving rollup wasm-node package into place ..."
- mkdir -p third_party/devtools-frontend/src/node_modules/@rollup/wasm-node ||
- die "Failed to create node_modules/@rollup/wasm-node"
- mv "${WORKDIR}"/package/* third_party/devtools-frontend/src/node_modules/@rollup/wasm-node ||
- die "Failed to move rollup package"
-
- if [ ! -z "${CHROMIUM_COMMITS[*]}" ]; then
- # for i in "${CHROMIUM_COMMITS[@]}"; do
- for i in "${!CHROMIUM_COMMITS[@]}"; do
- if [[ ${CHROMIUM_COMMITS[$i]} =~ webrtc ]]; then
- patch_prefix="webrtc"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ angle ]]; then
- patch_prefix="angle"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ quiche ]]; then
- patch_prefix="quiche"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ dawn ]]; then
- patch_prefix="dawn"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ perfetto ]]; then
- patch_prefix="perfetto"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ink ]]; then
- patch_prefix="ink"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ vulkan-utility-libraries ]]; then
- patch_prefix="vulkan-utility-libraries"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ruy ]]; then
- patch_prefix="ruy"
- else
- patch_prefix="chromium"
- fi
- pushd "${CHROMIUM_COMMITS[$i]}" > /dev/null || die
- if [[ $i = -* ]]; then
- einfo "Reverting ${patch_prefix}-${i/-}.patch"
- git_wrapper apply -R --exclude="*unittest.cc" --exclude="DEPS" \
- -p1 < "${DISTDIR}/${patch_prefix}-${i/-}.patch"
- else
- einfo "Applying ${patch_prefix}-${i/-}.patch"
- git_wrapper apply --exclude="*unittest.cc" --exclude="DEPS" \
- -p1 < "${DISTDIR}/${patch_prefix}-${i/-}.patch"
- fi
- popd > /dev/null || die
- done
- fi
-
- if ! use bluetooth ; then
- PATCHES+=(
- "${FILESDIR}/disable-bluez-r7.patch"
- )
- fi
-
- if use convert-dict ; then
- PATCHES+=(
- "${FILESDIR}/chromium-ucf-dict-utility-r3.patch"
- )
- fi
-
- if ! use libcxx ; then
- PATCHES+=(
- "${FILESDIR}/fix-wayland-oncecallback-copy.patch"
- )
- fi
-
- if use system-ffmpeg; then
- PATCHES+=(
- "${FILESDIR}/chromium-141-opus-mp3.patch"
- "${FILESDIR}/chromium-135-hevc.patch"
- )
- sed -i "\!AVFMT_FLAG_NOH264PARSE!d" media/filters/ffmpeg_glue.cc || die
- ewarn "You need to expose \"av_stream_get_first_dts\" in ffmpeg via user patch"
- fi
-
- if use system-av1; then
- PATCHES+=(
- "${FILESDIR}/chromium-system-av1.patch"
- )
- fi
-
- if use system-libvpx; then
- PATCHES+=(
- "${FILESDIR}/chromium-system-libvpx.patch"
- )
- fi
-
- if use system-openjpeg ; then
- PATCHES+=(
- "${FILESDIR}/chromium-system-openjpeg-r4.patch"
- )
- fi
-
- if use x86 ; then
- #* Fixes a segfault in transport_security_state_generator
- PATCHES+=(
- "${FILESDIR}/fix-segfault-x86.patch"
- )
- fi
-
- # Testing all patches when NODIE is defined
- if [ ! -z "${NODIE}" ]; then
- for i in "${PATCHES[@]}"; do
- eapply_wrapper "$i"
- done
- nonfatal eapply_user
- else
- default
- fi
-
- if use cromite ; then
- BR_PA_PATH="${WORKDIR}/cromite-${CROMITE_COMMIT_ID}/build/patches"
-
- sed -i '/b\/components\/components_strings\.grd/,+10d' "${BR_PA_PATH}/Add-cromite-flags-support.patch" || die
- sed -i '/b\/chrome\/android\/java\/res\/xml\/privacy_preferences\.xml/,+13d' "${BR_PA_PATH}/Add-cromite-flags-support.patch" || die
- sed -i '/b\/android_webview\/support_library\/java\/src\/org\/chromium\/support_lib_glue/,+11d' "${BR_PA_PATH}/Client-hints-overrides.patch" || die
- sed -i '/webapps_strings.grdp" \/>/{s++webapps_strings.grdp" /><part file="cromite_components_strings_grd/placeholder.txt"/>+;h};${x;/./{x;q0};x;q1}' \
- components/components_strings.grd || die
-
- sed -i 's/absl::/std::/' "${BR_PA_PATH}/Add-a-proxy-configuration-page.patch" || die
-
- filterdiff -p1 "${BR_PA_PATH}/JIT-site-settings.patch" --exclude="content/browser/renderer_host/render_process_host_impl.cc" \
- > "${BR_PA_PATH}/JIT-site-settings.patch1"
- mv -f "${BR_PA_PATH}/JIT-site-settings.patch1" "${BR_PA_PATH}/JIT-site-settings.patch"
-
- BROMITE_PATCHES=(
- "${BR_PA_PATH}/bromite-build-utils.patch"
- "${BR_PA_PATH}/Battery-API-return-nothing.patch"
- "${BR_PA_PATH}/Multiple-fingerprinting-mitigations.patch"
- "${BR_PA_PATH}/Add-flag-to-configure-maximum-connections-per-host.patch"
- "${BR_PA_PATH}/Add-a-proxy-configuration-page.patch"
- "${BR_PA_PATH}/Enable-StrictOriginIsolation-and-SitePerProcess.patch"
- "${BR_PA_PATH}/Disable-requests-for-single-word-Omnibar-searches.patch"
- "${BR_PA_PATH}/Reduce-HTTP-headers-in-DoH-requests-to-bare-minimum.patch"
- "${BR_PA_PATH}/Client-hints-overrides.patch"
- "${BR_PA_PATH}/Disable-idle-detection.patch"
- "${BR_PA_PATH}/Disable-TLS-resumption.patch"
- "${BR_PA_PATH}/Remove-navigator.connection-info.patch"
-
- "${BR_PA_PATH}/AudioBuffer-AnalyserNode-fp-mitigations.patch"
- "${BR_PA_PATH}/Fonts-fingerprinting-mitigation.patch"
- "${BR_PA_PATH}/Content-settings-infrastructure.patch"
- "${BR_PA_PATH}/Add-autoplay-site-setting.patch"
- "${BR_PA_PATH}/Site-setting-for-images.patch"
- "${BR_PA_PATH}/JIT-site-settings.patch"
- "${BR_PA_PATH}/Add-webGL-site-setting.patch"
- "${BR_PA_PATH}/Add-webRTC-site-settings.patch"
- "${BR_PA_PATH}/Show-site-settings-for-cookies-javascript-and-ads.patch"
- "${BR_PA_PATH}/Viewport-Protection-flag.patch"
- "${BR_PA_PATH}/Revert-remove-allowscript-content-setting-secondary-url.patch"
- "${BR_PA_PATH}/Timezone-customization.patch"
- "${BR_PA_PATH}/Disable-speechSynthesis-getVoices-API.patch"
- "${BR_PA_PATH}/Remove-support-for-device-memory-and-cpu-recovery.patch"
- "${BR_PA_PATH}/Disable-Feeback-Collector.patch"
- "${BR_PA_PATH}/Disable-remote-altsvc-for-h3-connections.patch"
- "${BR_PA_PATH}/Add-cromite-flags-support.patch"
- "${BR_PA_PATH}/Enables-deactivation-of-the-js-debugger-statement.patch"
- )
- for i in "${BROMITE_PATCHES[@]}"; do
- if [[ "$i" =~ "Add-autoplay-site-setting.patch" ]] ||
- [[ "$i" =~ "JIT-site-settings.patch" ]] ||
- [[ "$i" =~ "Site-setting-for-images.patch" ]]; then
- einfo "Git binary patch: ${i##*/}"
- git_wrapper apply -p1 < "$i"
- else
- filter_wrapper "$i" --exclude="chrome/android/*"
- fi
- done
-
- #! conflicting patches
- sed -i '/browser_features.cc/,+17d' \
- "${UGC_WD}/patches/extra/ungoogled-chromium/add-flag-to-clear-data-on-exit.patch" || die
- sed -i 's$} // namespace features$BASE_FEATURE(kClearDataOnExit, "ClearDataOnExit", base::FEATURE_DISABLED_BY_DEFAULT);}$' \
- chrome/browser/browser_features.cc || die
- sed -i 's$} // namespace features$BASE_DECLARE_FEATURE(kClearDataOnExit);}$' \
- chrome/browser/browser_features.h || die
- sed -i 's$kChromeUIAboutHost,$kChromeUIAboutHost,"ungoogled-first-run",$' \
- chrome/common/webui_url_constants.cc || die
- sed -i '/chrome\/common\/webui_url_constants.cc/Q' \
- "${UGC_WD}/patches/extra/ungoogled-chromium/first-run-page.patch" || die
-
- #! normalise paths in py
- sed -i 's$os.path.dirname(include_file)$os.path.abspath(os.path.dirname(include_file))$' \
- build/bromite/gyp/cpp_bromite_include.py || die
- fi
-
- # if [[ ${LLVM_SLOT} == "19" ]]; then
- # # Upstream now hard depend on a feature that was added in LLVM 20.1, but we don't want to stabilise that yet.
- # # Do the temp file shuffle in case someone is using something other than `gawk`
- # {
- # awk '/config\("clang_warning_suppression"\) \{/ { print $0 " }"; sub(/clang/, "xclang"); print; next }
- # { print }' build/config/compiler/BUILD.gn > "${T}/build.gn" && \
- # mv "${T}/build.gn" build/config/compiler/BUILD.gn
- # } || die "Unable to disable warning suppression"
- # fi
-
- ## Not included in -lite tarballs, but we should check for it anyway.
- #if [[ -f third_party/node/linux/node-linux-x64/bin/node ]]; then
- # rm third_party/node/linux/node-linux-x64/bin/node || die
- #else
- # mkdir -p third_party/node/linux/node-linux-x64/bin || die
- #fi
- #ln -s "${EPREFIX}"/usr/bin/node third_party/node/linux/node-linux-x64/bin/node || die
-
- cp "${FILESDIR}/libusb.gn" build/linux/unbundle || die
- sed -i '/^REPLACEMENTS.*$/{s++REPLACEMENTS = {"libusb":"third_party/libusb/BUILD.gn",+;h};${x;/./{x;q0};x;q1}' \
- build/linux/unbundle/replace_gn_files.py || die
- sed -i '/^.*deps.*third_party\/jsoncpp.*$/{s++public_deps \+= [ "//third_party/jsoncpp" ]+;h};${x;/./{x;q0};x;q1}' \
- third_party/webrtc/rtc_base/BUILD.gn || die
-
- if use override-data-dir; then
- sed -i '/"chromium";/{s++"ungoogled-chromium";+;h};${x;/./{x;q0};x;q1}' \
- chrome/common/chrome_paths_linux.cc || die
- fi
-
- if use system-abseil-cpp; then
- eapply_wrapper "${FILESDIR}/chromium-147-system-abseil.patch"
-
- #! SFINAE mangling incompatibility between clang and gcc:
- #! https://github.com/llvm/llvm-project/issues/85656
- #! gcc: _ZN4absl12lts_202601074CordC1INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELi0EEEOT_
- #! clang: _ZN4absl12lts_202601074CordC1INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEETnNSt9enable_ifIXsr3std7is_sameIT_S8_EE5valueEiE4typeELi0EEEOSA_
- #! So, either this:
- eapply_wrapper "${FILESDIR}/chromium-141-system-abseil-cord.patch"
- #! or build with -fclang-abi-compat=17
-
- # cp -f /usr/include/absl/base/options.h third_party/abseil-cpp/absl/base/options.h
- # sed -i '/^#define ABSL_OPTION_USE_STD_ORDERING.*$/{s++#define ABSL_OPTION_USE_STD_ORDERING 1+;h};${x;/./{x;q0};x;q1}' \
- # third_party/abseil-cpp/absl/base/options.h || die
- fi
-
- #* Applying UGC PRs here
- if [ ! -z "${UGC_PR_COMMITS[*]}" ]; then
- pushd "${UGC_WD}" >/dev/null
- for i in "${UGC_PR_COMMITS[@]}"; do
- eapply_wrapper "${DISTDIR}/${PN}-$i.patch"
- done
- popd >/dev/null
- fi
-
- # From here we adapt ungoogled-chromium's patches to our needs
- local ugc_pruning_list="${UGC_WD}/pruning.list"
- local ugc_patch_series="${UGC_WD}/patches/series"
- local ugc_substitution_list="${UGC_WD}/domain_substitution.list"
-
- local ugc_unneeded=(
- # GN bootstrap
- extra/debian/gn/parallel
- # following Gentoo's Chromium
- core/ungoogled-chromium/build-with-wasm-rollup
- )
-
- if use cromite ; then
- einfo "Using fingerprinting patches from Cromite instead"
- ugc_unneeded+=(
- extra/bromite/fingerprinting-flags-client-rects-and-measuretext
- extra/bromite/flag-max-connections-per-host
- extra/bromite/flag-fingerprinting-canvas-image-data-noise
- extra/ungoogled-chromium/add-components-ungoogled
- extra/ungoogled-chromium/remove-pac-size-limit
- )
- fi
-
- # #* Temporary fix
- # sed -i "\!ios/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/icu/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/libjpeg_turbo/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/snappy/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/closure_compiler/!d" "${ugc_pruning_list}" || die
-
- # #* Didn't unpack them at the first place
- # sed -i "\!build/linux/debian_bullseye_i386-sysroot!d" "${ugc_pruning_list}" || die
- # sed -i "\!build/linux/debian_bullseye_amd64-sysroot!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/llvm-build!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/node/linux!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/rust-src!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/rust-toolchain!d" "${ugc_pruning_list}" || die
- # if ! use libcxx ; then
- # sed -i "\!third_party/libc!d" "${ugc_pruning_list}" || die
- # fi
- sed -i "s|debug('files|error('files|" \
- "${UGC_WD}/utils/prune_binaries.py" || die
- sed -i "\!third_party/node/linux!d" \
- "${UGC_WD}/utils/prune_binaries.py" || die
-
- local ugc_p ugc_dir
- for p in "${ugc_unneeded[@]}"; do
- einfo "Removing ${p}.patch"
- sed -i "\!${p}.patch!d" "${ugc_patch_series}" || die
- done
-
- if [ ! -z "${UGC_SKIP_PATCHES}" ]; then
- for p in ${UGC_SKIP_PATCHES}; do
- ewarn "Removing ${p}"
- sed -i "\!${p}!d" "${ugc_patch_series}" || die
- done
- fi
-
- if [ ! -z "${UGC_KEEP_BINARIES}" ]; then
- for p in ${UGC_KEEP_BINARIES}; do
- ewarn "Keeping binary ${p}"
- sed -i "\!${p}!d" "${ugc_pruning_list}" || die
- done
- fi
-
- if [ ! -z "${UGC_SKIP_SUBSTITUTION}" ]; then
- for p in ${UGC_SKIP_SUBSTITUTION}; do
- ewarn "No substitutions in ${p}"
- sed -i "\!${p}!d" "${ugc_substitution_list}" || die
- done
- fi
-
- ebegin "Pruning binaries"
- "${UGC_WD}/utils/prune_binaries.py" -q . "${UGC_WD}/pruning.list"
- eend $? || die
-
- ebegin "Applying ungoogled-chromium patches"
- "${UGC_WD}/utils/patches.py" -q apply . "${UGC_WD}/patches"
- eend $? || die
-
- ebegin "Applying domain substitution"
- "${UGC_WD}/utils/domain_substitution.py" -q apply -r "${UGC_WD}/domain_regex.list" -f "${UGC_WD}/domain_substitution.list" .
- eend $? || die
-
- # Sanity check esbuild version before we start removing files.
- # We _could_ patch the version check out - in theory esbuild upstream are being super conservative after
- # arch(AUR) packaged an `esbuild` binary and set ESBUILD_BINARY_PATH=/usr/bin/esbuild, causing much breakage,
- # but this is fine too and exactly matches what upstream are expecting.
- # https://github.com/evanw/esbuild/issues/2894
- local esbuild_js="${S}/third_party/devtools-frontend/src/node_modules/esbuild/lib/main.js"
- local found
- found=$(awk -F'"' '/if \(binaryVersion !==/ {print $2}' "${esbuild_js}")
- if [[ "${found}" != "${ESBUILD_VER}" ]]; then
- die "esbuild version mismatch: expected ${ESBUILD_VER}, found ${found}"
- fi
-
- elog "Removing bundled binaries from source tree ..."
- # Purge bundled ELF files: These are non-portable and will cause issues if used instead of system versions.
- # Use `--wasm` to also remove WebAssembly binaries, if desired - they're portable so shouldn't break builds.
- ${EPYTHON} "${FILESDIR}/bin-finder.py" --elf "${S}" | awk '{print $1}' | xargs rm -f ||
- die "Failed to remove bundled binaries"
-
- # And now we restore any that we actually need, from the host system
- local esbuild_path="${S}/third_party/devtools-frontend/src/third_party/esbuild"
- local -A restore_list=(
- ["/usr/bin/esbuild-${ESBUILD_VER}"]="${esbuild_path}/esbuild"
- ["/usr/bin/gperf"]="${S}/third_party/gperf/cipd/bin/gperf"
- ["/usr/bin/node"]="${S}/third_party/node/linux/node-linux-x64/bin/node"
- )
-
- for src in "${!restore_list[@]}"; do
- dst="${restore_list[${src}]}"
- if [[ -f "${src}" ]]; then
- einfo "Symlinking ${src} ..."
- # Make sure the parent dir exists; some tarballs don't include (e.g.) node's bindir
- mkdir -p "$(dirname "${dst}")" || die "Failed to create directory for ${dst}"
- ln -s "${src}" "${dst}" || die "Failed to symlink ${dst} from ${src}"
- if [[ ! -L "${dst}" || "$(readlink -f "${dst}")" != "${src}" ]]; then
- die "Symlink verification failed for ${dst} -> ${src}"
- fi
- else
- die "Expected to find ${src} to restore ${dst}, but it does not exist."
- fi
- done
-
- # adjust python interpreter version
- sed -i -e "s|\(^script_executable = \).*|\1\"${EPYTHON}\"|g" .gn || die
-
- # Use the system copy of hwdata's usb.ids; upstream is woefully out of date (2015!)
- sed 's|//third_party/usb_ids/usb.ids|/usr/share/hwdata/usb.ids|g' \
- -i services/device/public/cpp/usb/BUILD.gn || die "Failed to set system usb.ids path"
-
- # remove_bundled_libraries.py walks the source tree and looks for paths containing the substring 'third_party'
- # whitelist matches use the right-most matching path component, so we need to whitelist from that point down.
- local keeplibs=(
- base/third_party/cityhash
- )
- use system-double-conversion || keeplibs+=(
- base/third_party/double_conversion
- )
- keeplibs+=(
- base/third_party/icu
- base/third_party/nspr
- base/third_party/superfasthash
- base/third_party/symbolize
- base/third_party/xdg_user_dirs
- buildtools/third_party/libc++
- buildtools/third_party/libc++abi
- )
- use cromite && keeplibs+=(
- cromite_flags/third_party
- )
- keeplibs+=(
- net/third_party/mozilla_security_manager
- net/third_party/quic
- net/third_party/uri_template
- )
- use system-abseil-cpp || keeplibs+=(
- third_party/abseil-cpp
- )
- keeplibs+=(
- third_party/angle
- third_party/angle/src/common/third_party/xxhash
- third_party/angle/src/third_party/ceval
- )
- use nvidia || keeplibs+=(
- third_party/angle/src/third_party/libXNVCtrl
- )
- keeplibs+=(
- third_party/angle/src/third_party/volk
- third_party/anonymous_tokens
- third_party/apple_apsl
- third_party/axe-core
- third_party/bidimapper
- third_party/blink
- third_party/boringssl
- third_party/boringssl/src/third_party/fiat
- third_party/breakpad
- third_party/breakpad/breakpad/src/third_party/curl
- )
- use system-brotli || keeplibs+=(
- third_party/brotli
- )
- keeplibs+=(
- third_party/catapult
- third_party/catapult/common/py_vulcanize/third_party/rcssmin
- third_party/catapult/common/py_vulcanize/third_party/rjsmin
- third_party/catapult/third_party/beautifulsoup4-4.9.3
- third_party/catapult/third_party/html5lib-1.1
- third_party/catapult/third_party/polymer
- third_party/catapult/third_party/six
- third_party/catapult/third_party/typ
- third_party/catapult/tracing/third_party/d3
- third_party/catapult/tracing/third_party/gl-matrix
- third_party/catapult/tracing/third_party/jpeg-js
- third_party/catapult/tracing/third_party/jszip
- third_party/catapult/tracing/third_party/mannwhitneyu
- third_party/catapult/tracing/third_party/oboe
- third_party/catapult/tracing/third_party/pako
- third_party/ced
- third_party/cld_3
- third_party/closure_compiler
- )
- use libcxx && keeplibs+=(
- third_party/compiler-rt
- )
- keeplibs+=(
- third_party/content_analysis_sdk
- third_party/cpuinfo
- third_party/crabbyavif
- third_party/crashpad
- third_party/crashpad/crashpad/third_party/lss
- third_party/crashpad/crashpad/third_party/zlib
- )
- use system-crc32c || keeplibs+=(
- third_party/crc32c
- )
- keeplibs+=(
- third_party/cros_system_api
- third_party/d3
- third_party/dawn
- third_party/dawn/third_party/gn/webgpu-cts
- third_party/dawn/third_party/OpenGL-Registry
- third_party/dawn/third_party/renderdoc
- third_party/dawn/third_party/webgpu-headers
- third_party/depot_tools
- third_party/devscripts
- third_party/devtools-frontend
- third_party/devtools-frontend/src/front_end/third_party/acorn
- third_party/devtools-frontend/src/front_end/third_party/additional_readme_paths.json
- third_party/devtools-frontend/src/front_end/third_party/axe-core
- third_party/devtools-frontend/src/front_end/third_party/chromium
- third_party/devtools-frontend/src/front_end/third_party/codemirror
- third_party/devtools-frontend/src/front_end/third_party/csp_evaluator
- third_party/devtools-frontend/src/front_end/third_party/diff
- third_party/devtools-frontend/src/front_end/third_party/i18n
- third_party/devtools-frontend/src/front_end/third_party/intl-messageformat
- third_party/devtools-frontend/src/front_end/third_party/json5
- third_party/devtools-frontend/src/front_end/third_party/legacy-javascript
- third_party/devtools-frontend/src/front_end/third_party/lighthouse
- third_party/devtools-frontend/src/front_end/third_party/lit
- third_party/devtools-frontend/src/front_end/third_party/marked
- third_party/devtools-frontend/src/front_end/third_party/puppeteer
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/esm/third_party/mitt
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/esm/third_party/parsel-js
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/esm/third_party/rxjs
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/esm/third_party/urlpattern-polyfill
- third_party/devtools-frontend/src/front_end/third_party/source-map-scopes-codec
- third_party/devtools-frontend/src/front_end/third_party/third-party-web
- third_party/devtools-frontend/src/front_end/third_party/vscode.web-custom-data
- third_party/devtools-frontend/src/front_end/third_party/wasmparser
- third_party/devtools-frontend/src/front_end/third_party/web-vitals
- third_party/devtools-frontend/src/third_party
- third_party/dom_distiller_js
- third_party/dragonbox
- third_party/eigen3
- third_party/emoji-segmenter
- third_party/farmhash
- third_party/fast_float
- third_party/fdlibm
- third_party/federated_compute/chromium/fcp/confidentialcompute
- third_party/federated_compute/src/fcp/base
- third_party/federated_compute/src/fcp/confidentialcompute
- third_party/federated_compute/src/fcp/protos/confidentialcompute
- third_party/federated_compute/src/fcp/protos/federatedcompute
- third_party/fft2d
- third_party/flatbuffers
- third_party/fp16
- third_party/freetype
- third_party/fusejs
- third_party/fxdiv
- third_party/gemmlowp
- third_party/google_input_tools
- third_party/google_input_tools/third_party/closure_library
- third_party/google_input_tools/third_party/closure_library/third_party/closure
- third_party/googletest
- third_party/gperf # We symlink system gperf, but this will purge the symlink since we tidy up afterwards.
- third_party/highway
- third_party/hunspell
- third_party/hyphenation-patterns
- third_party/ink/src/ink/brush
- third_party/ink/src/ink/color
- third_party/ink/src/ink/geometry
- third_party/ink/src/ink/rendering
- third_party/ink/src/ink/rendering/skia/common_internal
- third_party/ink/src/ink/rendering/skia/native
- third_party/ink/src/ink/rendering/skia/native/internal
- third_party/ink/src/ink/strokes
- third_party/ink/src/ink/types
- third_party/inspector_protocol
- third_party/ipcz
- third_party/jinja2
- )
- use system-jsoncpp || keeplibs+=(
- third_party/jsoncpp
- )
- keeplibs+=(
- third_party/khronos
- third_party/lens_server_proto
- third_party/leveldatabase
- third_party/libaddressinput
- )
- use libcxx && keeplibs+=(
- third_party/libc++
- )
- keeplibs+=(
- third_party/libdrm
- third_party/libgav1
- third_party/libjingle
- third_party/libpfm4
- third_party/libphonenumber
- third_party/libpng
- third_party/libsecret
- third_party/libsrtp
- third_party/libsync
- third_party/libtess2/libtess2
- third_party/libtess2/src/Include
- third_party/libtess2/src/Source
- third_party/liburlpattern
- )
- use system-libusb || keeplibs+=(
- third_party/libusb
- )
- keeplibs+=(
- third_party/libva_protected_content
- )
- use system-libvpx || keeplibs+=(
- third_party/libvpx
- third_party/libvpx/source/libvpx/third_party/x86inc
- )
- keeplibs+=(
- third_party/libwebm
- third_party/libx11
- third_party/libxcb-keysyms
- third_party/libxml/chromium
- third_party/libyuv
- third_party/libzip
- third_party/lit
- )
- use libcxx && keeplibs+=(
- third_party/llvm-libc
- third_party/llvm-libc/src/shared/
- )
- keeplibs+=(
- third_party/lottie
- third_party/lss
- third_party/lzma_sdk
- third_party/mako
- third_party/markupsafe
- third_party/material_color_utilities
- third_party/metrics_proto
- third_party/minigbm
- third_party/ml_dtypes
- third_party/modp_b64
- third_party/nasm
- third_party/nearby
- third_party/neon_2_sse
- third_party/node
- third_party/oak/chromium/proto
- third_party/oak/chromium/proto/attestation
- third_party/omnibox_proto
- third_party/one_euro_filter
- third_party/openscreen
- third_party/openscreen/src/third_party/
- third_party/openscreen/src/third_party/tinycbor/src/src
- third_party/ots
- third_party/pdfium
- third_party/pdfium/third_party/agg23
- third_party/pdfium/third_party/bigint
- third_party/pdfium/third_party/freetype
- third_party/pdfium/third_party/lcms
- )
- use system-openjpeg || keeplibs+=(
- third_party/pdfium/third_party/libopenjpeg
- )
- keeplibs+=(
- third_party/pdfium/third_party/libtiff
- third_party/perfetto
- third_party/perfetto/protos/third_party/chromium
- third_party/perfetto/protos/third_party/pprof
- third_party/perfetto/protos/third_party/primes
- third_party/perfetto/protos/third_party/simpleperf
- third_party/pffft
- third_party/ply
- third_party/polymer
- third_party/private_membership
- third_party/private-join-and-compute
- third_party/protobuf
- third_party/protobuf/third_party/utf8_range
- third_party/pthreadpool
- third_party/puffin
- third_party/pyjson5
- third_party/pyyaml
- third_party/rapidhash
- third_party/readability
- third_party/rnnoise
- third_party/rust
- third_party/ruy
- third_party/s2cellid
- third_party/search_engines_data
- third_party/securemessage
- third_party/selenium-atoms
- third_party/sentencepiece
- third_party/sentencepiece/src/third_party/darts_clone
- third_party/shell-encryption
- third_party/simdutf
- third_party/simplejson
- third_party/six
- third_party/skia
- third_party/skia/include/third_party/vulkan
- third_party/smhasher
- )
- use system-snappy || keeplibs+=(
- third_party/snappy
- )
- keeplibs+=(
- third_party/spirv-headers
- third_party/spirv-tools
- third_party/sqlite
- third_party/swiftshader
- third_party/swiftshader/third_party/astc-encoder
- third_party/swiftshader/third_party/llvm-subzero
- third_party/swiftshader/third_party/marl
- third_party/swiftshader/third_party/SPIRV-Headers/include/spirv
- third_party/swiftshader/third_party/SPIRV-Tools
- third_party/swiftshader/third_party/subzero
- third_party/tensorflow_models
- third_party/tensorflow-text
- third_party/tflite
- third_party/tflite/src/third_party/fft2d
- third_party/tflite/src/third_party/xla/third_party/tsl
- third_party/tflite/src/third_party/xla/xla/tsl/framework
- third_party/tflite/src/third_party/xla/xla/tsl/lib/random
- third_party/tflite/src/third_party/xla/xla/tsl/platform
- third_party/tflite/src/third_party/xla/xla/tsl/protobuf
- third_party/tflite/src/third_party/xla/xla/tsl/util
- third_party/ukey2
- third_party/utf
- third_party/vulkan
- third_party/wayland
- third_party/webdriver
- third_party/webgpu-cts
- third_party/webrtc
- third_party/webrtc/common_audio/third_party/ooura
- third_party/webrtc/common_audio/third_party/spl_sqrt_floor
- third_party/webrtc/modules/third_party/fft
- third_party/webrtc/modules/third_party/g711
- third_party/webrtc/modules/third_party/g722
- third_party/widevine
- )
- use system-woff2 || keeplibs+=(
- third_party/woff2
- )
- keeplibs+=(
- third_party/wuffs
- third_party/x11proto
- third_party/xcbproto
- third_party/xnnpack
- third_party/zlib/google
- third_party/zxcvbn-cpp
- url/third_party/mozilla
- v8/third_party/glibc
- v8/third_party/inspector_protocol
- v8/third_party/rapidhash-v8
- v8/third_party/siphash
- v8/third_party/utf8-decoder
- v8/third_party/v8
- v8/third_party/valgrind
-
- # gyp -> gn leftovers
- third_party/speech-dispatcher
- third_party/usb_ids
- )
-
- if use test; then
- keeplibs+=(
- third_party/breakpad/breakpad/src/processor
- third_party/fuzztest
- third_party/google_benchmark/src/include/benchmark
- third_party/google_benchmark/src/src
- third_party/test_fonts
- third_party/test_fonts/fontconfig
- third_party/test_fonts/test_fonts
- )
- fi
-
- # USE=system-*
- if ! use system-harfbuzz; then
- keeplibs+=( third_party/harfbuzz )
- fi
-
- if ! use system-ffmpeg; then
- keeplibs+=( third_party/ffmpeg third_party/opus )
- fi
-
- if ! use system-icu; then
- keeplibs+=( third_party/icu )
- fi
-
- if ! use system-zstd; then
- keeplibs+=( third_party/zstd )
- fi
-
- if ! use system-av1; then
- keeplibs+=(
- third_party/dav1d
- third_party/libaom
- third_party/libaom/source/libaom/third_party/fastfeat
- third_party/libaom/source/libaom/third_party/vector
- third_party/libaom/source/libaom/third_party/x86inc
- )
- fi
-
- if use libcxx; then
- keeplibs+=(
- third_party/libc++
- third_party/llvm-libc
- )
- fi
-
- if ! use system-openh264; then
- keeplibs+=( third_party/openh264 )
- fi
-
- if ! use system-re2; then
- keeplibs+=( third_party/re2 )
- fi
-
- # Arch-specific
- if use arm64 || use ppc64 ; then
- keeplibs+=( third_party/swiftshader/third_party/llvm-10.0 )
- fi
- # we need to generate ppc64 stuff because upstream does not ship it yet
- # it has to be done before unbundling.
- if use ppc64; then
- pushd third_party/libvpx >/dev/null || die
- mkdir -p source/config/linux/ppc64 || die
- # requires git and clang, bug #832803
- # Revert https://chromium.googlesource.com/chromium/src/+/b463d0f40b08b4e896e7f458d89ae58ce2a27165%5E%21/third_party/libvpx/generate_gni.sh
- # and https://chromium.googlesource.com/chromium/src/+/71ebcbce867dd31da5f8b405a28fcb0de0657d91%5E%21/third_party/libvpx/generate_gni.sh
- # since we're not in a git repo
- sed -i -e "s|^update_readme||g; s|clang-format|${EPREFIX}/bin/true|g; /^git -C/d; /git cl/d; /cd \$BASE_DIR\/\$LIBVPX_SRC_DIR/ign format --in-place \$BASE_DIR\/BUILD.gn\ngn format --in-place \$BASE_DIR\/libvpx_srcs.gni" \
- generate_gni.sh || die
- ./generate_gni.sh || die
- popd >/dev/null || die
-
- pushd third_party/ffmpeg >/dev/null || die
- cp libavcodec/ppc/h264dsp.c libavcodec/ppc/h264dsp_ppc.c || die
- cp libavcodec/ppc/h264qpel.c libavcodec/ppc/h264qpel_ppc.c || die
- popd >/dev/null || die
- fi
-
- # Sanity check keeplibs, on major version bumps it is often necessary to update this list
- # and this enables us to hit them all at once.
- # There are some entries that need to be whitelisted (TODO: Why? The file is understandable, the rest seem odd)
- whitelist_libs=(
- net/third_party/quic
- third_party/devtools-frontend/src/front_end/third_party/additional_readme_paths.json
- third_party/libjingle
- third_party/mesa
- third_party/skia/third_party/vulkan
- third_party/vulkan
- )
- local not_found_libs=()
- for lib in "${keeplibs[@]}"; do
- if [[ ! -d "${lib}" ]] && ! has "${lib}" "${whitelist_libs[@]}"; then
- not_found_libs+=( "${lib}" )
- fi
- done
-
- if [[ ${#not_found_libs[@]} -gt 0 ]]; then
- ewarn "The following \`keeplibs\` directories were not found in the source tree:"
- for lib in "${not_found_libs[@]}"; do
- ewarn " ${lib}"
- done
- fi
-
- keeplibs+=( third_party/ungoogled )
-
- # Remove most bundled libraries. Some are still needed.
- einfo "Unbundling third-party libraries ..."
- build/linux/unbundle/remove_bundled_libraries.py "${keeplibs[@]}" --do-remove || die
-
- # Interferes with our bundled clang path; we don't want stripped binaries anyway.
- sed -i -e 's|${clang_base_path}/bin/llvm-strip|/bin/true|g' \
- -e 's|${clang_base_path}/bin/llvm-objcopy|/bin/true|g' \
- build/linux/strip_binary.gni || die
-}
-
-src_configure() {
- # Calling this here supports resumption via FEATURES=keepwork
- python_setup
-
- # Bug 491582.
- export TMPDIR="${WORKDIR}/temp"
- mkdir -p -m 755 "${TMPDIR}" || die
-
- # https://bugs.gentoo.org/654216
- addpredict /dev/dri/ #nowarn
-
- # Use system-provided libraries.
- # TODO: freetype -- remove sources (https://bugs.chromium.org/p/pdfium/issues/detail?id=733).
- # TODO: use_system_hunspell (upstream changes needed).
- # TODO: use_system_protobuf (bug #525560).
- # TODO: use_system_sqlite (http://crbug.com/22208).
-
- # libevent: https://bugs.gentoo.org/593458
- local gn_system_libraries=(
- flac
- fontconfig
- freetype
- libjpeg
- libwebp
- libxml
- libxslt
- zlib
- )
- if use system-abseil-cpp; then
- gn_system_libraries+=(
- absl_algorithm
- absl_base
- absl_cleanup
- absl_container
- absl_crc
- absl_debugging
- absl_flags
- absl_functional
- absl_hash
- absl_log
- absl_log_internal
- absl_memory
- absl_meta
- absl_numeric
- absl_random
- absl_status
- absl_strings
- absl_synchronization
- absl_time
- absl_types
- absl_utility
- )
- fi
- if use system-brotli; then
- gn_system_libraries+=( brotli )
- fi
- if use system-crc32c; then
- gn_system_libraries+=( crc32c )
- fi
- if use system-double-conversion; then
- gn_system_libraries+=( double-conversion )
- fi
- if use system-woff2; then
- gn_system_libraries+=( woff2 )
- fi
- if use nvidia; then
- gn_system_libraries+=( libXNVCtrl )
- fi
- if use system-ffmpeg; then
- gn_system_libraries+=( ffmpeg opus )
- fi
- if use system-jsoncpp; then
- gn_system_libraries+=( jsoncpp )
- fi
- if use system-icu; then
- gn_system_libraries+=( icu )
- fi
- if use system-zstd; then
- gn_system_libraries+=( zstd )
- fi
- if use system-av1; then
- gn_system_libraries+=( dav1d libaom )
- fi
- if use system-libusb; then
- gn_system_libraries+=( libusb )
- fi
- if use system-libvpx; then
- gn_system_libraries+=( libvpx )
- fi
- use system-openh264 && gn_system_libraries+=(
- openh264
- )
- use system-re2 && gn_system_libraries+=(
- re2
- )
- use system-snappy && gn_system_libraries+=(
- snappy
- )
-
- build/linux/unbundle/replace_gn_files.py --system-libraries "${gn_system_libraries[@]}" ||
- die "Failed to replace GN files for system libraries"
-
- # TODO 131: The above call clobbers `enable_freetype = true` in the freetype gni file
- # drop the last line, then append the freetype line and a new curly brace to end the block
- local freetype_gni="build/config/freetype/freetype.gni"
- sed -i -e '$d' ${freetype_gni} || die
- echo " enable_freetype = true" >> ${freetype_gni} || die
- echo "}" >> ${freetype_gni} || die
-
- if use !custom-cflags; then
- replace-flags "-Os" "-O2"
- strip-flags
- # Debug info section overflows without component build
- # Prevent linker from running out of address space, bug #471810 .
- filter-flags "-g*"
- # 949123: Several multimedia components explicitly build with specific CFLAGS and
- # use runtime detection to enable optimisations; unfortunately any of our CFLAGS are suffixed
- # to the end of the command line, which causes build failures.
- use arm64 && filter-flags "-march*" "-mtune*" "-mcpu*"
- fi
-
- # We don't use the same clang version as upstream, and with -Werror
- # we need to make sure that we don't get superfluous warnings.
- append-flags -Wno-unknown-warning-option
- if tc-is-cross-compiler; then # can you cross-compile with the bundled toolchain?
- export BUILD_CXXFLAGS+=" -Wno-unknown-warning-option"
- export BUILD_CFLAGS+=" -Wno-unknown-warning-option"
- fi
-
- # Start building our GN options
- local myconf_gn=() # Tip: strings must be quoted, bools or numbers are fine
-
- if use !bundled-toolchain; then
- # We already forced the "correct" clang via pkg_setup
-
- if tc-is-cross-compiler; then
- CC="${CC} -target ${CHOST} --sysroot ${ESYSROOT}"
- CXX="${CXX} -target ${CHOST} --sysroot ${ESYSROOT}"
- BUILD_AR=${AR}
- BUILD_CC=${CC}
- BUILD_CXX=${CXX}
- BUILD_NM=${NM}
- fi
-
- # Make sure the build system will use the right tools, bug #340795.
- tc-export AR CC CXX NM
-
- strip-unsupported-flags
- append-ldflags -Wl,--undefined-version # https://bugs.gentoo.org/918897#c32
-
- myconf_gn+=(
- "is_clang=true"
- "clang_use_chrome_plugins=false"
- "use_clang_modules=false" # M141 enables this for the linux platform by default.
- "use_lld=true"
- 'custom_toolchain="//build/toolchain/linux/unbundle:default"'
- # From M127 we need to provide a location for libclang and the clang resource dir so that bindgen can find them
- "bindgen_libclang_path=\"$(get_llvm_prefix)/$(get_libdir)\""
- "bindgen_clang_resource_dir=\"${EPREFIX}/usr/lib/clang/${LLVM_SLOT}/include\""
- "bindgen_extra_clang_args=[\"-I${EPREFIX}/usr/lib/clang/${LLVM_SLOT}/include\"]"
- "clang_base_path=\"${EPREFIX}/usr/lib/clang/${LLVM_SLOT}/\""
- "rust_bindgen_root=\"${EPREFIX}/usr/\""
- "rust_sysroot_absolute=\"$(get_rust_prefix)\""
- "rustc_version=\"${RUST_SLOT}\""
- )
-
- if [[ ${LLVM_SLOT} -lt 23 ]]; then
- # Workaround for -fsanitize-ignore-for-ubsan-feature (added in LLVM 23)
- myconf_gn+=( 'clang_has_ubsan_feature_ignore=false' )
- fi
-
- if ! tc-is-cross-compiler; then
- myconf_gn+=( 'host_toolchain="//build/toolchain/linux/unbundle:default"' )
- else
- tc-export BUILD_{AR,CC,CXX,NM}
- myconf_gn+=(
- 'host_toolchain="//build/toolchain/linux/unbundle:host"'
- 'v8_snapshot_toolchain="//build/toolchain/linux/unbundle:host"'
- "host_pkg_config=\"$(tc-getBUILD_PKG_CONFIG)\""
- "pkg_config=\"$(tc-getPKG_CONFIG)\""
- )
-
- # setup cups-config, build system only uses --libs option
- if use cups; then
- mkdir "${T}/cups-config" || die
- cp "${ESYSROOT}/usr/bin/${CHOST}-cups-config" "${T}/cups-config/cups-config" || die
- export PATH="${PATH}:${T}/cups-config"
- fi
-
- # Don't inherit PKG_CONFIG_PATH from environment
- local -x PKG_CONFIG_PATH=
- fi
-
- fi # !bundled-toolchain
-
- local myarch
- myarch="$(tc-arch)"
- case ${myarch} in
- amd64)
- # Bug 530248, 544702, 546984, 853646.
- use !custom-cflags && filter-flags -mno-mmx -mno-sse2 -mno-ssse3 -mno-sse4.1 \
- -mno-avx -mno-avx2 -mno-fma -mno-fma4 -mno-xop -mno-sse4a
- myconf_gn+=( 'target_cpu="x64"' )
- ;;
- x86)
- # Bug 530248, 544702, 546984, 853646.
- use !custom-cflags && filter-flags -mno-mmx -mno-sse2 -mno-ssse3 -mno-sse4.1 \
- -mno-avx -mno-avx2 -mno-fma -mno-fma4 -mno-xop -mno-sse4a
- myconf_gn+=( 'target_cpu="x86"' )
- ;;
- arm64)
- myconf_gn+=( 'target_cpu="arm64"' )
- ;;
- ppc64)
- myconf_gn+=( 'target_cpu="ppc64"' )
- ;;
- *)
- die "Failed to determine target arch, got '${myarch}'."
- ;;
- esac
-
- # Common options
-
- myconf_gn+=(
- # Disable code formating of generated files
- "blink_enable_generated_code_formatting=false"
- # enable DCHECK with USE=debug only, increases chrome binary size by 30%, bug #811138.
- # DCHECK is fatal by default, make it configurable at runtime, #bug 807881.
- "dcheck_always_on=$(usex debug true false)"
- "dcheck_is_configurable=$(usex debug true false)"
- # Chromium builds provided by Linux distros should disable the testing config
- "disable_fieldtrial_testing_config=true"
- # Custom patch: Enable building Chromium as individual channels (e.g. stable, beta, dev) that
- # use different profile directories, desktop entries, etc. This enables slotting the ebuild.
- "enable_channel_branding=true"
- # 131 began laying the groundwork for replacing freetype with
- # "Rust-based Fontations set of libraries plus Skia path rendering"
- # We now need to opt-in
- "enable_freetype=true"
- "enable_hangout_services_extension=$(usex hangouts true false)"
- # Don't need nocompile checks and GN crashes with our config (verify with modern GN)
- "enable_nocompile_tests=false"
- # pseudolocales are only used for testing
- "enable_pseudolocales=false"
- "enable_widevine=$(usex widevine true false)"
- # Disable fatal linker warnings, bug 506268.
- "fatal_linker_warnings=false"
- # Component build isn't generally intended for use by end users. It's mostly useful
- # for development and debugging.
- "is_component_build=false"
- # GN needs explicit config for Debug/Release as opposed to inferring it from build directory.
- "is_debug=false"
- "is_official_build=$(usex official true false)"
- # Enable ozone wayland and/or headless support
- "ozone_auto_platforms=false"
- "ozone_platform_headless=true"
- # Enables building without non-free unRAR licence
- "safe_browsing_use_unrar=false"
- # "thin_lto_enable_optimizations=${use_lto}"
- "treat_warnings_as_errors=false"
- # Use in-tree libc++ (buildtools/third_party/libc++ and buildtools/third_party/libc++abi)
- # instead of the system C++ library for C++ standard library support.
- # default: true, but let's be explicit (forced since 120 ; USE removed 127).
- "use_custom_libcxx=true"
- # Enable ozone wayland and/or headless support
- "use_ozone=true"
- # The sysroot is the oldest debian image that chromium supports, we don't need it
- "use_sysroot=false"
- # See dependency logic in third_party/BUILD.gn
- "use_system_harfbuzz=$(usex system-harfbuzz true false)"
- # "use_thin_lto=${use_lto}"
- # Only enabled for clang, but gcc has endian macros too
- "v8_use_libm_trig_functions=true"
- )
-
- myconf_gn+=( "enable_iterator_debugging=$(usex debug true false)" )
-
- if use debug; then
- myconf_gn+=(
- "symbol_level=2"
- "blink_symbol_level=2"
- "v8_symbol_level=2"
- )
- else
- myconf_gn+=(
- "symbol_level=0"
- "blink_symbol_level=0"
- "v8_symbol_level=0"
- )
- fi
-
- if use bindist ; then
- myconf_gn+=(
- # If this is set to false Chromium won't be able to load any proprietary codecs
- # even if provided with an ffmpeg capable of h264/aac decoding
- "proprietary_codecs=true"
- 'ffmpeg_branding="Chrome"'
- # build ffmpeg as an external component (libffmpeg.so) that we can remove / substitute
- "is_component_ffmpeg=true"
- )
- else
- myconf_gn+=(
- "proprietary_codecs=$(usex proprietary-codecs true false)"
- "ffmpeg_branding=\"$(usex proprietary-codecs Chrome Chromium)\""
- )
- fi
-
- if use headless; then
- myconf_gn+=(
- "enable_print_preview=false"
- "enable_remoting=false"
- 'ozone_platform="headless"'
- "rtc_use_pipewire=false"
- "use_alsa=false"
- "use_cups=false"
- "use_gio=false"
- "use_glib=false"
- "use_gtk=false"
- "use_kerberos=false"
- "use_libpci=false"
- "use_pangocairo=false"
- "use_pulseaudio=false"
- "use_qt5=false"
- "use_qt6=false"
- "use_udev=false"
- "use_vaapi=false"
- "use_xkbcommon=false"
- )
- else
- myconf_gn+=(
- "gtk_version=$(usex gtk4 4 3)"
- # link pulseaudio directly (DT_NEEDED) instead of using dlopen.
- # helps with automated detection of ABI mismatches and prevents silent errors.
- "link_pulseaudio=$(usex pulseaudio true false)"
- "ozone_platform_wayland=$(usex wayland true false)"
- "ozone_platform_x11=$(usex X true false)"
- "ozone_platform=\"$(usex wayland wayland x11)\""
- "rtc_use_pipewire=$(usex screencast true false)"
- "use_cups=$(usex cups true false)"
- "use_kerberos=$(usex kerberos true false)"
- "use_pulseaudio=$(usex pulseaudio true false)"
- "use_qt5=false"
- "use_system_libffi=$(usex wayland true false)"
- "use_system_minigbm=true"
- "use_vaapi=$(usex vaapi true false)"
- "use_xkbcommon=true"
- )
- if use qt6; then
- local cbuild_libdir
- cbuild_libdir="$(get_libdir)"
- if tc-is-cross-compiler; then
- # Hack to workaround get_libdir not being able to handle CBUILD, bug #794181
- cbuild_libdir="$($(tc-getBUILD_PKG_CONFIG) --keep-system-libs --libs-only-L libxslt)"
- cbuild_libdir="${cbuild_libdir:2}"
- cbuild_libdir="${cbuild_libdir/% }"
- fi
- myconf_gn+=(
- "use_qt6=true"
- "moc_qt6_path=\"${EPREFIX}/usr/${cbuild_libdir}/qt6/libexec\""
- )
- else
- myconf_gn+=( "use_qt6=false" )
- fi
- fi
-
- # Explicitly disable ICU data file support for system-icu/headless builds.
- if use system-icu || use headless; then
- myconf_gn+=( "icu_use_data_file=false" )
- fi
-
- if use official; then
- # Allow building against system libraries in official builds
- sed -i 's/OFFICIAL_BUILD/GOOGLE_CHROME_BUILD/' \
- tools/generate_shim_headers/generate_shim_headers.py || die
- # Don't add symbols to build
- myconf_gn+=( "symbol_level=0" )
- fi
-
- if use pgo; then
- myconf_gn+=(
- "chrome_pgo_phase=2"
- "v8_enable_builtins_optimization=true"
- )
- else
- myconf_gn+=( "chrome_pgo_phase=0" )
- fi
-
- # Odds and ends
-
- # skipping typecheck is only supported on amd64, bug #876157
- if ! use amd64; then
- myconf_gn+=( "devtools_skip_typecheck=false" )
- fi
-
- # Disable external code space for V8 for ppc64. It is disabled for ppc64
- # by default, but cross-compiling on amd64 enables it again.
- if tc-is-cross-compiler && use ppc64; then
- myconf_gn+=( "v8_enable_external_code_space=false" )
- fi
-
- # This determines whether or not GN uses the bundled libcxx
- if use libcxx; then
- myconf_gn+=( "use_custom_libcxx=true" )
- else
- myconf_gn+=(
- "use_custom_libcxx=false"
- "use_llvm_libatomic=false"
- )
- append-cppflags -U_GLIBCXX_ASSERTIONS #See #318
- fi
-
- myconf_gn+=( "use_bluez=$(usex bluetooth true false)" )
-
- myconf_gn+=( "is_cfi=$(usex cfi true false)" )
-
- if use cfi; then
- myconf_gn+=(
- "use_cfi_icall=true"
- "use_cfi_cast=true"
- )
- fi
-
- myconf_gn+=(
- "optimize_webui=$(usex optimize-webui true false)"
- "use_system_freetype=$(usex system-harfbuzz true false)"
- "use_system_libopenjpeg2=$(usex system-openjpeg true false)"
- "enable_pdf=true"
- "use_system_lcms2=true"
- "enable_print_preview=true"
- "use_thin_lto=$(usex thinlto true false)"
- "thin_lto_enable_optimizations=$(usex optimize-thinlto true false)"
-
- # Ungoogled flags
- "build_with_tflite_lib=false"
- "enable_mdns=false"
- "enable_mse_mpeg2ts_stream_parser=$(usex proprietary-codecs true false)"
- "enable_remoting=false"
- "enable_reporting=false"
- "enable_service_discovery=false"
- "exclude_unwind_tables=true"
- "google_api_key=\"\""
- "google_default_client_id=\"\""
- "google_default_client_secret=\"\""
- "safe_browsing_mode=0"
- "use_official_google_api_keys=false"
- "use_unofficial_version_number=false"
-
- # "enable_swiftshader=false"
-
- # Additional flags
- # "perfetto_use_system_zlib=true"
- # "use_system_zlib=true"
- # "use_system_libjpeg=true"
- # "rtc_build_examples=false"
- # "enable_chromium_prelude=false"
- # "enable_updater=false"
- # "enable_update_notifications=false"
- # "enable_constraints=false"
- # "rtc_rusty_base64=false"
- # "v8_enable_temporal_support=false"
- # "media_use_symphonia=false"
- # "pdf_enable_rust_png=false"
- # "skia_use_libpng_encode=true"
- # "skia_use_libpng_decode=true"
- # "skia_use_rust_png_decode=false"
- # "skia_use_rust_png_encode=false"
- # "enable_jxl_decoder=false"
- )
-
- if use amd64 || use arm64; then
- myconf_gn+=(
- "v8_drumbrake_bounds_checks=true"
- # "v8_enable_drumbrake=true"
- )
- fi
-
- if use thinlto; then
- # We need to change the default value of import-instr-limit in
- # LLVM to limit the text size increase. The default value is
- # 100, and we change it to 30 to reduce the text size increase
- # from 25% to 10%. The performance number of page_cycler is the
- # same on two of the thinLTO configurations, we got 1% slowdown
- # on speedometer when changing import-instr-limit from 100 to 30.
- # append-ldflags "-Wl,-plugin-opt,-import-instr-limit=30"
- sed -i '/import_instr_limit = 5/{s++import_instr_limit = 30+;h};${x;/./{x;q0};x;q1}' \
- build/config/compiler/BUILD.gn || die
-
- append-ldflags "-Wl,--thinlto-jobs=$(makeopts_jobs)"
- fi
-
- # Facilitate deterministic builds (taken from build/config/compiler/BUILD.gn)
- append-cflags -Wno-builtin-macro-redefined
- append-cxxflags -Wno-builtin-macro-redefined
- append-cppflags "-D__DATE__= -D__TIME__= -D__TIMESTAMP__="
-
- local flags
- einfo "Building with the following compiler settings:"
- for flags in C{C,XX} AR NM RANLIB {C,CXX,CPP,LD}FLAGS \
- EXTRA_GN UGC_{SKIP_{PATCHES,SUBSTITUTION},KEEP_BINARIES} ; do
- einfo " ${flags} = \"${!flags}\""
- done
-
- # Since we build from tarballs, we need to set the channel here so that it can be used in the build.
- export CHROME_VERSION_EXTRA="${SLOT}"
-
- einfo "Configuring Chromium ..."
- set -- gn gen --args="${myconf_gn[*]}${EXTRA_GN:+ ${EXTRA_GN}}" out/Release
- echo "$@"
- "$@" || die "Failed to configure Chromium"
-
- # The "if" below should not be executed unless testing
- if [ ! -z "${NODIE}" ]; then
- # List all args
- # gn args --list out/Release
-
- # Quick compiler check
- eninja -C out/Release protoc torque
- fi
-}
-
-src_compile() {
- # Final link uses lots of file descriptors.
- ulimit -n 2048
-
- # Calling this here supports resumption via FEATURES=keepwork
- python_setup
-
- # I hate doing this but upstream Rust have yet to come up with a better solution for
- # us poor packagers. Required for Split LTO units, which are required for CFI.
- export RUSTC_BOOTSTRAP=1
-
- # Don't inherit PYTHONPATH from environment, bug #789021, #812689
- local -x PYTHONPATH=
-
- # Build mksnapshot and pax-mark it.
- if use pax-kernel; then
- local x
- for x in mksnapshot v8_context_snapshot_generator code_cache_generator; do
- if tc-is-cross-compiler; then
- eninja -C out/Release "host/${x}"
- pax-mark m "out/Release/host/${x}"
- else
- eninja -C out/Release "${x}"
- pax-mark m "out/Release/${x}"
- fi
- done
- fi
-
- # Even though ninja autodetects number of CPUs, we respect
- # user's options, for debugging with -j 1 or any other reason.
- eninja -C out/Release chrome chrome_sandbox $(use test && echo "base_unittests")
-
- pax-mark m out/Release/chrome
-
- # This codepath does minimal patching, so we're at the mercy of upstream
- # CFLAGS. This is fine - we're not intending to force this on users
- # and we do a lot of flag 'management' anyway.
- if use bundled-toolchain; then
- QA_FLAGS_IGNORED="
- usr/lib64/chromium-browser/chrome
- usr/lib64/chromium-browser/chrome-sandbox
- usr/lib64/chromium-browser/chromedriver
- usr/lib64/chromium-browser/chrome_crashpad_handler
- usr/lib64/chromium-browser/libEGL.so
- usr/lib64/chromium-browser/libGLESv2.so
- usr/lib64/chromium-browser/libVkICD_mock_icd.so
- usr/lib64/chromium-browser/libVkLayer_khronos_validation.so
- usr/lib64/chromium-browser/libqt6_shim.so
- usr/lib64/chromium-browser/libvk_swiftshader.so
- usr/lib64/chromium-browser/libvulkan.so.1
- "
- fi
-
- use convert-dict && eninja -C out/Release convert_dict
-
- use enable-driver && eninja -C out/Release chromedriver
- #use suid && eninja -C out/Release chrome_sandbox
-
- use enable-driver && mv out/Release/chromedriver{.unstripped,}
-
- rm -f out/Release/locales/*.pak.info || die
-
- # Generate support files (desktop file, manpage, etc.) See: #684550 #706786 #968958
- ${EPYTHON} "${FILESDIR}/generate-support-files.py" \
- --installdir "/usr/$(get_libdir)/ungoogled-chromium-browser" \
- --channel "${SLOT}" ||
- die "Failed to generate support files"
-}
-
-src_test() {
- # Tests may be flaky with usersandbox, and the test runner executes significantly faster without.
- # If you seem to be excluding too many tests for a particular milestone: comment them out, reboot, and
- # run the tests again. If that doesn't help, try FEATURES="-usersandbox" and send it because obviously the
- # chromium gods are not smiling upon you today. Do some runtime testing, obvs.
- local skip_tests=(
- # Wildcard exclusions (if all tests in a test suite are broken)
- 'AlternateTestParams/PartitionAllocDeathTest.RepeatedAllocReturnNullDirect/*'
- 'AlternateTestParams/PartitionAllocDeathTest.RepeatedReallocReturnNullDirect/*'
- 'AlternateTestParams/PartitionAllocTest.*' # 200+ tests, >= 1 crashes entire test runner with usersandbox.
- 'CheckExitCodeAfterSignalHandlerDeathTest.*'
- 'CriticalProcessAndThreadSpotChecks/HangWatcherAnyCriticalThreadTests.*'
- 'LazyThreadPoolTaskRunnerEnvironmentTest.*' # M142
- 'ToolsSanityTest.BadVirtualCall*'
- # requires en-us locale
- SysStrings.SysNativeMBAndWide
- SysStrings.SysNativeMBToWide
- SysStrings.SysWideToNativeMB
- # Specific test cases
- CancelableEventTest.BothCancelFailureAndSucceedOccurUnderContention
- FilePathTest.FromUTF8Unsafe_And_AsUTF8Unsafe
- HistogramTesterTest.PumaTestUniqueSample
- PathServiceTest.CheckedGetFailure
- PlatformThreadTest.CanChangeThreadType
- RawPtrTest.SetLookupUsesGetForComparison # M146 ; also broken for alpine in M144.
- RustLogIntegrationTest.CheckAllSeverity
- StackCanary.ChangingStackCanaryCrashesOnReturn
- StackTraceDeathTest.StackDumpSignalHandlerIsMallocFree
- TestLauncherTools.TruncateSnippetFocusedMatchesFatalMessagesTest
- ThreadPoolEnvironmentConfig.CanUseBackgroundPriorityForWorker
- )
- local test_filter="-$(IFS=:; printf '%s' "${skip_tests[*]}")"
- # test-launcher-bot-mode enables parallelism and plain output
- # Check individual tests with --gtest_filter=<test you want> --single-process-tests
- ./out/Release/base_unittests --test-launcher-bot-mode \
- --test-launcher-jobs="$(get_makeopts_jobs)" \
- --gtest_filter="${test_filter}" || die "Tests failed!"
-}
-
-src_install() {
- local browser_suffix
- if [[ "${SLOT}" != "stable" ]]; then
- browser_suffix="-${SLOT}"
- else
- browser_suffix=""
- fi
- local CHROMIUM_HOME="/usr/$(get_libdir)/ungoogled-chromium-browser${browser_suffix}"
- exeinto "${CHROMIUM_HOME}"
- doexe out/Release/chrome
-
- #newexe out/Release/chrome_sandbox chrome-sandbox
- #fperms 4755 "${CHROMIUM_HOME}/chrome-sandbox"
-
- use enable-driver && doexe out/Release/chromedriver
-
- #* https://github.com/ungoogled-software/ungoogled-chromium/pull/3563
- doexe out/Release/chrome_crashpad_handler
-
- if use convert-dict; then
- newexe "${FILESDIR}/update-dicts.sh" update-dicts.sh
- doexe out/Release/convert_dict
- fi
-
- ozone_auto_session () {
- use X && use wayland && ! use headless && echo true || echo false
- }
-
- cat <<- EOF > "${D}${CHROMIUM_HOME}/chromium-launcher.sh" || die
- #!/bin/bash
- # Wrapper to launch slotted Chromium via the chromium-common launcher script.
- export CHROME_DESKTOP="ungoogled-chromium-browser${browser_suffix}.desktop"
- export CHROME_EXEC_NAME="ungoogled-chromium-browser${browser_suffix}"
- export CHROME_VERSION_EXTRA="${SLOT}"
- export CHROME_WRAPPER="\$(readlink -f "\$0")"
- export OZONE_AUTO_SESSION=$(ozone_auto_session)
-
- exec /usr/libexec/chromium/chromium-launcher.sh "\$@"
- EOF
-
- chmod 755 "${D}${CHROMIUM_HOME}/chromium-launcher.sh" || die
-
- # It is important that we name the target "chromium-browser",
- # xdg-utils expect it; bug #355517.
- dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/ungoogled-chromium-browser${browser_suffix}
- # keep the old symlink around for consistency
- dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/ungoogled-chromium${browser_suffix}
-
- use enable-driver && dosym "${CHROMIUM_HOME}/chromedriver" /usr/bin/ungoogled-chromedriver${browser_suffix}
-
- pushd out/Release/locales > /dev/null || die
- chromium_remove_language_paks
- popd > /dev/null || die
-
- insinto "${CHROMIUM_HOME}"
- doins out/Release/*.bin
- doins out/Release/*.pak
- doins -r out/Release/hyphen-data
-
- if use bindist; then
- # We built libffmpeg as a component library, but we can't distribute it
- # with proprietary codec support. Remove it and make a symlink to the requested
- # system library.
- rm -f out/Release/libffmpeg.so \
- || die "Failed to remove bundled libffmpeg.so (with proprietary codecs)"
- # symlink the libffmpeg.so from either ffmpeg-chromium or ffmpeg[chromium].
- einfo "Creating symlink to libffmpeg.so from $(usex ffmpeg-chromium ffmpeg-chromium ffmpeg[chromium])..."
- dosym ../chromium/libffmpeg.so$(usex ffmpeg-chromium .${PV%%\.*} "") \
- /usr/$(get_libdir)/ungoogled-chromium-browser/libffmpeg.so
- fi
-
- (
- shopt -s nullglob
- local files=(out/Release/*.so out/Release/*.so.[0-9])
- [[ ${#files[@]} -gt 0 ]] && doins "${files[@]}"
- )
-
- if ! use system-icu && ! use headless; then
- doins out/Release/icudtl.dat
- fi
-
- doins -r out/Release/locales
- #doins -r out/Release/MEIPreload
-
- # Install vk_swiftshader_icd.json; bug #827861
- doins out/Release/vk_swiftshader_icd.json
-
- if [[ -d out/Release/swiftshader ]]; then
- insinto "${CHROMIUM_HOME}/swiftshader"
- doins out/Release/swiftshader/*.so
- fi
-
- use widevine && dosym WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so "${CHROMIUM_HOME}/libwidevinecdm.so"
-
- # Install icons
- local branding size
- for size in 16 24 32 48 64 128 256 ; do
- case ${size} in
- 16|32) branding="chrome/app/theme/default_100_percent/chromium" ;;
- *) branding="chrome/app/theme/chromium" ;;
- esac
- newicon -s ${size} "${branding}/product_logo_${size}.png" \
- ungoogled-chromium-browser${browser_suffix}.png
- done
-
- # Install desktop entry
- domenu out/Release/ungoogled-chromium-browser${browser_suffix}.desktop
-
- # Install GNOME default application entry (bug #303100).
- insinto /usr/share/gnome-control-center/default-apps
- doins out/Release/ungoogled-chromium-browser${browser_suffix}.xml
-
- # Install AppStream metadata
- insinto /usr/share/appdata
- doins out/Release/ungoogled-chromium-browser${browser_suffix}.appdata.xml
-
- # Install manpage; bug #684550
- doman out/Release/ungoogled-chromium-browser${browser_suffix}.1
- dosym ungoogled-chromium-browser${browser_suffix}.1 /usr/share/man/man1/ungoogled-chromium${browser_suffix}.1
-
- readme.gentoo_create_doc
-}
-
-pkg_postrm() {
- xdg_icon_cache_update
- xdg_desktop_database_update
-}
-
-pkg_postinst() {
- xdg_icon_cache_update
- xdg_desktop_database_update
- readme.gentoo_print_elog
-
- if use !headless && [[ -z "${REPLACING_VERSIONS}" ]]; then
- if use vaapi; then
- elog "Hardware-accelerated video decoding configuration:"
- elog
- elog "Chromium supports multiple backends for hardware acceleration. To enable one,"
- elog " Add to CHROMIUM_FLAGS in /etc/chromium/default:"
- elog
- elog "1. VA-API with OpenGL (recommended for most users):"
- elog " --enable-features=AcceleratedVideoDecodeLinuxGL"
- elog " VaapiVideoDecoder may need to be added as well, but try without first."
- elog
- if use wayland; then
- elog "2. Enhanced Wayland/EGL performance:"
- elog " --enable-features=AcceleratedVideoDecodeLinuxGL,AcceleratedVideoDecodeLinuxZeroCopyGL"
- elog
- fi
- if use X; then
- elog "$(usex wayland "3" "2"). VA-API with Vulkan:"
- elog " --enable-features=VaapiVideoDecoder,VaapiIgnoreDriverChecks,Vulkan,DefaultANGLEVulkan,VulkanFromANGLE"
- elog
- if use wayland; then
- elog " NOTE: Vulkan acceleration requires X11 and will not work under Wayland sessions."
- elog " Use OpenGL-based acceleration instead when running under Wayland."
- elog
- fi
- fi
- elog "Additional options:"
- elog " To enable hardware-accelerated encoding (if supported)"
- elog " add 'AcceleratedVideoEncoder' to your feature list"
- elog " VaapiIgnoreDriverChecks bypasses driver compatibility checks"
- elog " (may be needed for newer/unsupported hardware)"
- elog
- else
- elog "This Chromium build was compiled without VA-API support, which provides"
- elog "hardware-accelerated video decoding."
- fi
- if use screencast; then
- elog "Screencast is disabled by default at runtime. Either enable it"
- elog "by navigating to chrome://flags/#enable-webrtc-pipewire-capturer"
- elog "inside Chromium or add --enable-features=WebRTCPipeWireCapturer"
- elog "to CHROMIUM_FLAGS in /etc/chromium/default."
- elog
- elog "Additional setup may be required for screencasting to work."
- elog "See issue: https://github.com/PF4Public/gentoo-overlay/issues/314"
- fi
- if use gtk4; then
- elog "Chromium prefers GTK3 over GTK4 at runtime. To override this"
- elog "behaviour you need to pass --gtk-version=4, e.g. by adding it"
- elog "to CHROMIUM_FLAGS in /etc/chromium/default."
- fi
- if use widevine; then
- elog "widevine requires binary plugins, which are distributed separately"
- elog "Make sure you have www-plugins/chrome-binary-plugins installed"
- fi
- fi
-
- if systemd_is_booted && ! [[ -f "/etc/machine-id" ]]; then
- ewarn "The lack of an '/etc/machine-id' file on this system booted with systemd"
- ewarn "indicates that the Gentoo handbook was not followed to completion."
- ewarn ""
- ewarn "Chromium is known to behave unpredictably with this system configuration;"
- ewarn "please complete the configuration of this system before logging any bugs."
- fi
-
- # Stable slot doesn't change profile directory, and it's vanishingly unlikely that users will downgrade from dev.
- if [[ -n "${REPLACING_VERSIONS}" ]]; then
- local replacing_non_slotted=false
- # there could be more than one PVR
- for version in ${REPLACING_VERSIONS}; do
- if ver_test "${version}" -le "145.0.7632.116"; then
- replacing_non_slotted=true
- break
- fi
- done
- if ${replacing_non_slotted}; then
- ewarn "This version of Chromium has replaced a non-slotted ebuild."
- if [[ ${SLOT} != "stable" ]]; then
- ewarn "This channel has its own profile directory, so your existing profile will not be used."
- ewarn "To use your existing profile, either copy or move it to the new location."
- ewarn "See https://wiki.gentoo.org/wiki/Chromium#Profile_Directories for more information."
- ewarn ""
- fi
- ewarn "Any existing Progressive Web Apps (PWAs) will need to be reinstalled,"
- ewarn "or have the path in the desktop files updated to point to the new wrapper script."
- fi
- fi
-}
-
-eapply_wrapper () {
- if [ ! -z "${NODIE}" ]; then
- nonfatal eapply "$@"
- else
- eapply "$@"
- fi
-}
-
-git_wrapper () {
- if [ ! -z "${NODIE}" ]; then
- git "$@"
- else
- git "$@" || die
- fi
-}
-
-filter_wrapper () {
- einfo "Applying ${i##*/}"
- #? fuzz factor of 3 is OK?
- if [ ! -z "${NODIE}" ]; then
- filterdiff -p1 "${@:2}" < "$1" | patch -F 3 -p1
- else
- filterdiff -p1 "${@:2}" < "$1" | patch -F 3 -p1 || die
- fi
-}
diff --git a/www-client/ungoogled-chromium/ungoogled-chromium-149.0.7827.155_p1.ebuild b/www-client/ungoogled-chromium/ungoogled-chromium-149.0.7827.155_p1.ebuild
deleted file mode 100644
index 52c217f2f8ff..000000000000
--- a/www-client/ungoogled-chromium/ungoogled-chromium-149.0.7827.155_p1.ebuild
+++ /dev/null
@@ -1,2512 +0,0 @@
-# Copyright 2009-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-# Use following environment variables to customise the build
-# EXTRA_GN — pass extra options to gn
-# NINJAOPTS="-k0 -j8" useful to populate ccache even if ebuild is still failing
-# UGC_SKIP_PATCHES — space-separated list of patches to skip
-# UGC_KEEP_BINARIES — space-separated list of binaries to keep
-# UGC_SKIP_SUBSTITUTION — space-separated list of files to skip domain substitution
-
-# USE=bundled-toolchain is intended for users who want to use the same toolchain
-# as the upstream releases. It's also a good fallback in case we fall behind
-# and need to get a release out quickly (less likely with `dev` in-tree).
-# We can't rely on it as a default since the toolchain is only shipped for x86-64;
-# other architectures will need to use system toolchain.
-
-# Since m133 we are using CI-generated tarballs from
-# https://github.com/chromium-linux-tarballs/chromium-tarballs/
-
-# These are bit-for-bit identical to the official releases, but are built
-# using an external CI system that we have some control over, in case
-# issues pop up again with official tarball generation.
-
-GN_MIN_VER=0.2374
-# chromium-tools/get-chromium-toolchain-strings.py (or just use Chromicler)
-# Node for M145+ should be 24.12.0 but that's not packaged in Gentoo yet. See #969145
-TEST_FONT="9c07d19d9c5ee1ff94f717e6fb17e0c8c354e6f9"
-BUNDLED_CLANG_VER="llvmorg-23-init-10931-g20b6ec66-8"
-BUNDLED_RUST_VER="4c4205163abcbd08948b3efab796c543ba1ea687-2"
-RUST_SHORT_HASH=${BUNDLED_RUST_VER:0:10}-${BUNDLED_RUST_VER##*-}
-NODE_VER="24.12.0"
-ESBUILD_VER="0.25.1"
-ROLLUP_VER="4.57.1" # currently manual.
-
-CHROMIUM_LANGS="af am ar as az be bg bn bs ca cs cy da de el en-GB es es-419 et eu fa fi fil
- fr fr-CA gl gu he hi hr hu hy id is it ja ka kk km kn ko ky lo lt lv mk ml mn mr ms my
- nb ne nl or pa pl pt-BR pt-PT ro ru si sk sl sq sr sr-Latn sv sw ta te th tr uk ur uz
- vi zh-CN zh-HK zh-TW zu"
-
-#UGC_COMMIT_ID="4e5e867125b1db1d00e51055deb5a8eee75217ba"
-# UGC_PR_COMMITS=(
-# c917e096342e5b90eeea91ab1f8516447c8756cf
-# 5794e9d12bf82620d5f24505798fecb45ca5a22d
-# )
-
-CROMITE_COMMIT_ID="cb3baf14f52eb4365d017f640f85310735c19b79"
-
-#declare -A CHROMIUM_COMMITS=(
-# ["fcfb1a42813f1e9d8babedc7bb2e0f06101a3151"]="." #148+
-# ["-acb47d9a6b56c4889a2ed4216e9968cfc740086c"]="."
-# # ["-37c28a19804e47a68eabf3cf882a310689fc325b"]="." #disable style check for cromite
-# # ["cd5a0df905a28faa89ff2a4ab44f893f84dc4487"]="net/third_party/quiche/src"
-#)
-
-LLVM_COMPAT=( 21 22 23 )
-PYTHON_COMPAT=( python3_{13..14} )
-PYTHON_REQ_USE="xml(+)"
-RUST_MIN_VER=1.91.0
-RUST_NEEDS_LLVM="yes please"
-RUST_OPTIONAL="yes" # Not actually optional, but we don't need system Rust (or LLVM) with USE=bundled-toolchain
-RUST_REQ_USE="rustfmt" # Upstream run rustfmt on bindgen output, so we need it to be available.
-
-inherit check-reqs chromium-2 desktop flag-o-matic llvm-r1 multiprocessing ninja-utils pax-utils
-inherit python-any-r1 readme.gentoo-r1 rust systemd toolchain-funcs xdg-utils
-
-DESCRIPTION="Modifications to Chromium for removing Google integration and enhancing privacy"
-HOMEPAGE="https://github.com/ungoogled-software/ungoogled-chromium"
-PPC64_HASH="a85b64f07b489b8c6fdb13ecf79c16c56c560fc6"
-PATCH_V="${PV%%\.*}-2"
-COPIUM_COMMIT="b00f26bb5e0781020da5f830981472a142c6baf1"
-SRC_URI="https://github.com/chromium-linux-tarballs/chromium-tarballs/releases/download/${PV/_*}/chromium-${PV/_*}-linux.tar.xz
- https://deps.gentoo.zip/www-client/chromium/rollup-wasm-node-${ROLLUP_VER}.tgz
- https://gitlab.com/Matt.Jolly/chromium-patches/-/archive/${PATCH_V}/chromium-patches-${PATCH_V}.tar.bz2
- !bundled-toolchain? (
- https://codeberg.org/selfisekai/copium/archive/${COPIUM_COMMIT}.tar.gz
- -> chromium-patches-copium-${COPIUM_COMMIT:0:10}.tar.gz
- )
- bundled-toolchain? (
- https://commondatastorage.googleapis.com/chromium-browser-clang/Linux_x64/clang-${BUNDLED_CLANG_VER}.tar.xz
- -> chromium-clang-${BUNDLED_CLANG_VER}.tar.xz
- https://commondatastorage.googleapis.com/chromium-browser-clang/Linux_x64/rust-toolchain-${BUNDLED_RUST_VER}-${BUNDLED_CLANG_VER%-*}.tar.xz
- -> chromium-rust-toolchain-${RUST_SHORT_HASH}-${BUNDLED_CLANG_VER%-*}.tar.xz
- )
- test? (
- https://chromium-fonts.storage.googleapis.com/${TEST_FONT} -> chromium-testfonts-${TEST_FONT:0:10}.tar.gz
- )
- ppc64? (
- https://gitlab.raptorengineering.com/raptor-engineering-public/chromium/openpower-patches/-/archive/${PPC64_HASH}/openpower-patches-${PPC64_HASH}.tar.bz2 -> chromium-openpower-${PPC64_HASH:0:10}.tar.bz2
- )
-"
-
-# Gentoo tarball:
-# https://chromium-tarballs.distfiles.gentoo.org/chromium-${PV/_*}.tar.xz -> chromium-${PV/_*}-gentoo.tar.xz
-
-# chromium-linux-tarballs
-# https://github.com/chromium-linux-tarballs/chromium-tarballs/releases/download/${PV/_*}/chromium-${PV/_*}-linux.tar.xz
-
-# Official tarball:
-# https://commondatastorage.googleapis.com/chromium-browser-official/chromium-${PV/_*}${LITE_TARBALL:+-lite}.tar.xz
-
-# https://gitweb.gentoo.org/proj/chromium-tools.git/tree/get-chromium-licences.py @ 145.0.7632.76
-LICENSE="Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD BSD-2 Base64 Boost-1.0 CC-BY-3.0 CC-BY-4.0 Clear-BSD FFT2D FTL"
-LICENSE+=" IJG ISC LGPL-2 LGPL-2.1 MIT MPL-1.1 MPL-2.0 Ms-PL PSF-2 SGI-B-2.0 SSLeay SunSoft Unicode-3.0"
-LICENSE+=" Unicode-DFS-2015 Unlicense UoI-NCSA ZLIB libtiff openssl"
-LICENSE+=" cromite? ( GPL-3 )"
-
-SLOT="stable"
-KEYWORDS="amd64 ~arm64 ~ppc64 ~x86"
-
-IUSE_SYSTEM_LIBS="abseil-cpp av1 brotli crc32c double-conversion ffmpeg +harfbuzz icu jsoncpp +libusb libvpx +openh264 openjpeg re2 snappy woff2 +zstd"
-IUSE="+X bindist bluetooth bundled-toolchain cfi convert-dict cups custom-cflags debug ffmpeg-chromium enable-driver gtk4 hangouts headless kerberos +libcxx nvidia +official optimize-thinlto optimize-webui override-data-dir pax-kernel pgo"
-IUSE+=" +proprietary-codecs pulseaudio qt6 screencast selinux test thinlto cromite vaapi wayland widevine cpu_flags_ppc_vsx3"
-RESTRICT="
- !bindist? ( bindist )
- !test? ( test )
- arm64? ( test )
- !system-ffmpeg? ( proprietary-codecs? ( bindist ) )
- !system-openh264? ( bindist )
- cromite? ( bindist )"
-
-REQUIRED_USE="
- !headless? ( || ( X wayland ) )
- screencast? ( wayland )
- ffmpeg-chromium? ( bindist proprietary-codecs )
- optimize-thinlto? ( thinlto )
- cfi? ( thinlto )
- x86? ( !thinlto !widevine )
- debug? ( !official )
- vaapi? ( !system-av1 !system-libvpx )
-"
-
-UGC_PV="${PV/_p/-}"
-UGC_PF="${PN}-${UGC_PV}"
-UGC_URL="https://github.com/ungoogled-software/${PN}/archive/"
-
-if [ -z "$UGC_COMMIT_ID" ]; then
- UGC_URL="${UGC_URL}${UGC_PV}.tar.gz -> ${UGC_PF}.tar.gz"
- UGC_WD="${WORKDIR}/${UGC_PF}"
-else
- UGC_URL="${UGC_URL}${UGC_COMMIT_ID}.tar.gz -> ${PN}-${UGC_COMMIT_ID}.tar.gz"
- UGC_WD="${WORKDIR}/ungoogled-chromium-${UGC_COMMIT_ID}"
-fi
-
-SRC_URI+="${UGC_URL}
-"
-
-if [ ! -z "${UGC_PR_COMMITS[*]}" ]; then
- for i in "${UGC_PR_COMMITS[@]}"; do
- SRC_URI+="https://github.com/ungoogled-software/${PN}/commit/$i.patch?full_index=true -> ${PN}-$i.patch
- "
- done
-fi
-
-if [ ! -z "${CHROMIUM_COMMITS[*]}" ]; then
- # for i in "${CHROMIUM_COMMITS[@]}"; do
- for i in "${!CHROMIUM_COMMITS[@]}"; do
- if [[ ${CHROMIUM_COMMITS[$i]} =~ webrtc ]]; then
- #TODO: is it safe to use this mirror?
- SRC_URI+="https://github.com/webrtc-mirror/webrtc/commit/${i/-}.patch?full_index=true -> webrtc-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ angle ]]; then
- SRC_URI+="https://github.com/google/angle/commit/${i/-}.patch?full_index=true -> angle-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ quiche ]]; then
- SRC_URI+="https://github.com/google/quiche/commit/${i/-}.patch?full_index=true -> quiche-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ dawn ]]; then
- SRC_URI+="https://github.com/google/dawn/commit/${i/-}.patch?full_index=true -> dawn-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ perfetto ]]; then
- SRC_URI+="https://github.com/google/perfetto/commit/${i/-}.patch?full_index=true -> perfetto-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ink ]]; then
- SRC_URI+="https://github.com/google/ink/commit/${i/-}.patch?full_index=true -> ink-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ vulkan-utility-libraries ]]; then
- SRC_URI+="https://github.com/KhronosGroup/Vulkan-Utility-Libraries/commit/${i/-}.patch?full_index=true -> vulkan-utility-libraries-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ruy ]]; then
- SRC_URI+="https://github.com/google/ruy/commit/${i/-}.patch?full_index=true -> ruy-${i/-}.patch
- "
- else
- SRC_URI+="https://github.com/chromium/chromium/commit/${i/-}.patch?full_index=true -> chromium-${i/-}.patch
- "
- fi
- done
-fi
-
-SRC_URI+="cromite? ( https://github.com/uazo/cromite/archive/${CROMITE_COMMIT_ID}.tar.gz -> cromite-${CROMITE_COMMIT_ID}.tar.gz )
-"
-
-for i in ${IUSE_SYSTEM_LIBS}; do
- [[ $i =~ ^(\+)?(.*)$ ]]
- IUSE+=" ${BASH_REMATCH[1]}system-${BASH_REMATCH[2]}"
-done
-
-COMMON_X_DEPEND="
- x11-libs/libXcomposite:=
- x11-libs/libXcursor:=
- x11-libs/libXdamage:=
- x11-libs/libXfixes:=
- >=x11-libs/libXi-1.6.0:=
- x11-libs/libXrandr:=
- x11-libs/libXrender:=
- x11-libs/libXtst:=
- x11-libs/libxshmfence:=
-"
-
-# sys-libs/zlib: https://bugs.gentoo.org/930365; -ng is not compatible.
-# We _could_ use the bundled minizip, but that's against policy.
-COMMON_SNAPSHOT_DEPEND="
- system-icu? ( >=dev-libs/icu-78:= )
- system-abseil-cpp? ( >=dev-cpp/abseil-cpp-20260107.0 )
- system-brotli? ( >=app-arch/brotli-9999 )
- system-crc32c? ( dev-libs/crc32c )
- system-double-conversion? ( dev-libs/double-conversion )
- system-woff2? ( media-libs/woff2 )
- system-snappy? ( app-arch/snappy )
- system-jsoncpp? ( dev-libs/jsoncpp )
- system-openjpeg? ( media-libs/openjpeg:2= )
- system-re2? ( >=dev-libs/re2-0.2019.08.01:= )
- system-libvpx? ( >=media-libs/libvpx-1.13.0:=[postproc] )
- system-libusb? ( virtual/libusb:1 )
- cromite? ( dev-util/patchutils )
- >=dev-libs/libxml2-2.12.4:=[icu]
- dev-libs/nspr:=
- >=dev-libs/nss-3.26:=
- dev-libs/libxslt:=
- media-libs/fontconfig:=
- >=media-libs/freetype-2.11.0-r1:=
- system-harfbuzz? ( >=media-libs/harfbuzz-3:0=[icu(-)] )
- media-libs/libjpeg-turbo:=
- media-libs/libpng:=
- system-zstd? ( >=app-arch/zstd-1.5.5:= )
- >=media-libs/libwebp-0.4.0:=
- media-libs/mesa:=[gbm(+)]
- >=media-libs/openh264-2.6.0:=
- system-av1? (
- >=media-libs/dav1d-1.0.0:=
- >=media-libs/libaom-3.7.0:=
- )
- sys-libs/zlib:=
- !headless? (
- dev-libs/glib:2
- >=media-libs/alsa-lib-1.0.19:=
- pulseaudio? (
- || (
- media-libs/libpulse
- >=media-sound/apulse-0.1.9
- )
- )
- sys-apps/pciutils:=
- kerberos? ( virtual/krb5 )
- vaapi? ( >=media-libs/libva-2.7:=[X?,wayland?] )
- X? (
- x11-base/xorg-proto:=
- x11-libs/libX11:=
- x11-libs/libxcb:=
- x11-libs/libXext:=
- )
- x11-libs/libxkbcommon:=
- wayland? (
- dev-libs/libffi:=
- dev-libs/wayland:=
- screencast? (
- media-video/pipewire:=
- || (
- sys-apps/xdg-desktop-portal-gnome
- sys-apps/xdg-desktop-portal-gtk
- kde-plasma/xdg-desktop-portal-kde
- gui-libs/xdg-desktop-portal-lxqt
- gui-libs/xdg-desktop-portal-wlr
- )
- )
- )
- )
-"
-
-COMMON_DEPEND="
- ${COMMON_SNAPSHOT_DEPEND}
- app-arch/bzip2:=
- dev-libs/expat:=
- system-ffmpeg? (
- >=media-video/ffmpeg-6.1:=
- >=media-libs/opus-1.3.1:=
- )
- net-misc/curl[ssl]
- sys-apps/dbus:=
- media-libs/flac:=
- sys-libs/zlib:=[minizip]
- !headless? (
- >=app-accessibility/at-spi2-core-2.46.0:2
- media-libs/mesa:=[X?,wayland?]
- virtual/udev
- x11-libs/cairo:=
- x11-libs/gdk-pixbuf:2
- x11-libs/pango:=
- cups? ( >=net-print/cups-1.3.11:= )
- qt6? ( dev-qt/qtbase:6[gui,widgets] )
- X? ( ${COMMON_X_DEPEND} )
- )
-"
-RDEPEND="${COMMON_DEPEND}
- !www-client/ungoogled-chromium:0
- >=www-client/chromium-common-2
- !headless? (
- || (
- x11-libs/gtk+:3[X?,wayland?]
- gui-libs/gtk:4[X?,wayland?]
- )
- qt6? ( dev-qt/qtbase:6[X?,wayland?] )
- )
- virtual/ttf-fonts
- selinux? ( sec-policy/selinux-chromium )
- bindist? (
- ffmpeg-chromium? ( media-video/ffmpeg-chromium:${PV%%\.*} )
- )
- !override-data-dir? (
- !www-client/chromium:${SLOT}
- !www-client/cromite:${SLOT}[-override-data-dir]
- )
-"
-
-DEPEND="${COMMON_DEPEND}
- !headless? (
- gtk4? ( gui-libs/gtk:4[X?,wayland?] )
- !gtk4? ( x11-libs/gtk+:3[X?,wayland?] )
- )
-"
-
- # pgo? ( >=llvm-core/clang-22.0.0_pre20260106 >=llvm-core/lld-22.0.0_pre20260106 )
-BDEPEND="
- ${COMMON_SNAPSHOT_DEPEND}
- ${PYTHON_DEPS}
- $(python_gen_any_dep '
- dev-python/setuptools[${PYTHON_USEDEP}]
- ')
- >=app-arch/gzip-1.7
- !headless? (
- qt6? ( dev-qt/qtbase:6 )
- )
- !bundled-toolchain? ( $(llvm_gen_dep '
- llvm-core/clang:${LLVM_SLOT}
- llvm-core/llvm:${LLVM_SLOT}
- llvm-core/lld:${LLVM_SLOT}
- cfi? ( llvm-runtimes/clang-runtime:${LLVM_SLOT}[sanitize] )
- official? (
- !ppc64? ( llvm-runtimes/compiler-rt-sanitizers:${LLVM_SLOT}[cfi] )
- ) ')
- ${RUST_DEPEND}
- )
- >=dev-util/bindgen-0.72.1
- >=dev-build/gn-${GN_MIN_VER}
- app-alternatives/ninja
- dev-lang/perl
- >=dev-util/gperf-3.2
- dev-util/esbuild:${ESBUILD_VER}
- dev-vcs/git
- >=net-libs/nodejs-${NODE_VER}[inspector]
- sys-apps/hwdata
- >=sys-devel/bison-2.4.3
- sys-devel/flex
- virtual/pkgconfig
- x11-misc/xdg-utils
-"
-
-if ! has chromium_pkg_die ${EBUILD_DEATH_HOOKS}; then
- EBUILD_DEATH_HOOKS+=" chromium_pkg_die";
-fi
-
-DISABLE_AUTOFORMATTING="yes"
-DOC_CONTENTS="
-Some web pages may require additional fonts to display properly.
-Try installing some of the following packages if some characters
-are not displayed properly:
-- media-fonts/arphicfonts
-- media-fonts/droid
-- media-fonts/ipamonafont
-- media-fonts/noto
-- media-fonts/ja-ipafonts
-- media-fonts/takao-fonts
-- media-fonts/wqy-microhei
-- media-fonts/wqy-zenhei
-
-To fix broken icons on the Downloads page, you should install an icon
-theme that covers the appropriate MIME types, and configure this as your
-GTK+ icon theme.
-
-For native file dialogs in KDE, install kde-apps/kdialog.
-
-To make password storage work with your desktop environment you may
-have install one of the supported credentials management applications:
-- app-crypt/libsecret (GNOME)
-- kde-frameworks/kwallet (KDE)
-If you have one of above packages installed, but don't want to use
-them in Chromium, then add --password-store=basic to CHROMIUM_FLAGS
-in /etc/chromium/default.
-"
-
-S="${WORKDIR}/chromium-${PV/_*}"
-
-python_check_deps() {
- python_has_version "dev-python/setuptools[${PYTHON_USEDEP}]"
-}
-
-pre_build_checks() {
- # Check build requirements: bugs #471810, #541816, #914220
- # We're going to start doing maths here on the size of an unpacked source tarball,
- # this should make updates easier as chromium continues to balloon in size.
- # xz -l /var/cache/distfiles/chromium-${PV}*.tar.xz
- local base_disk=9 # Round up
- use test && base_disk=$((base_disk + 5))
- local extra_disk=1 # Always include a little extra space
- local memory=4
- tc-is-cross-compiler && extra_disk=$((extra_disk * 2))
- if tc-is-lto || use pgo; then
- memory=$((memory * 2 + 1))
- tc-is-cross-compiler && extra_disk=$((extra_disk * 2)) # Double the requirements
- use pgo && extra_disk=$((extra_disk + 4))
- fi
- if is-flagq '-g?(gdb)?([1-9])'; then
- if use custom-cflags; then
- extra_disk=$((extra_disk + 5))
- fi
- memory=$((memory * 2))
- fi
- local CHECKREQS_MEMORY="${memory}G"
- local CHECKREQS_DISK_BUILD="$((base_disk + extra_disk))G"
- check-reqs_${EBUILD_PHASE_FUNC}
-}
-
-pkg_pretend() {
- if [[ ${MERGE_TYPE} != binary ]]; then
- # The pre_build_checks are all about compilation resources, no need to run it for a binpkg
- pre_build_checks
- fi
-
- if use headless; then
- local headless_unused_flags=("cups" "kerberos" "pulseaudio" "qt6" "vaapi" "wayland")
- for myiuse in ${headless_unused_flags[@]}; do
- use ${myiuse} && ewarn "Ignoring USE=${myiuse}, USE=headless is set."
- done
- fi
-
- if ! use bindist && use ffmpeg-chromium; then
- ewarn "Ignoring USE=ffmpeg-chromium, USE=bindist is not set."
- fi
- if use libcxx; then
- ewarn
- ewarn "Building with libcxx, please be aware that system-*"
- ewarn "and some other c++ dependencies need to be compiled"
- ewarn "with the same c++ library as ungoogled-chromium itself"
- ewarn "dev-libs/jsoncpp is most problematic, see #58 #49 #119 for details"
- ewarn "Simplest solution would be to disable corresponding system-* flags"
- ewarn
- fi
- if use cfi; then
- ewarn
- ewarn "Building with cfi is only possible if building with -stdlib=libc++"
- ewarn "Make sure all dependencies are also built this way, see #40"
- ewarn
- fi
- if use cromite; then
- ewarn
- ewarn "Cromite patches are very experimental and unstable"
- ewarn "Please consider testing them and giving feedback upstream:"
- ewarn "https://github.com/uazo/cromite/issues"
- ewarn "Not all patches are applied, let me know if others should be considered too"
- ewarn
- fi
-}
-
-pkg_setup() {
- if [[ ${MERGE_TYPE} != binary ]]; then
- # The pre_build_checks are all about compilation resources, no need to run it for a binpkg
- pre_build_checks
-
- # We haven't massaged any CFLAGS yet, so we want to do this before we force CC/CXX to prevent warnings.
- local want_lto="false"
- tc-is-lto && want_lto="true"
-
- # The linux:unbundle toolchain in GN grabs CC, CXX, CPP (etc) from the environment
- # We'll set these to clang here then use llvm-utils functions to very explicitly set these
- # to a sane value.
- # This is effectively the 'force-clang' path if GCC support is re-added.
- if use !bundled-toolchain; then
- llvm-r1_pkg_setup
- rust_pkg_setup
-
- # Forcing clang; respect llvm_slot_x to enable selection of impl via LLVM_COMPAT
- AR=llvm-ar
- CPP="${CHOST}-clang++-${LLVM_SLOT} -E"
- NM=llvm-nm
- CC="${CHOST}-clang-${LLVM_SLOT}"
- CXX="${CHOST}-clang++-${LLVM_SLOT}"
- fi
-
- use_lto="false"
- local lto_usable="true"
- if [[ "$want_lto" == "true" ]]; then
- if use arm64 && [[ "${LLVM_SLOT}" -lt 22 ]]; then
- einfo "LTO is broken with LLVM 21 on arm64, ignoring CFLAGS."
- lto_usable="false"
- else
- use_lto="true"
- fi
- # We can rely on GN to do this for us; without this builds
- # take significantly longer with LTO enabled.
- filter-lto
- fi
-
- if [[ "$use_lto" == "false" ]] && use official && [[ "$lto_usable" == "true" ]]; then
- einfo "USE=official selected and LTO not detected."
- einfo "It is _highly_ recommended that LTO be enabled for performance reasons"
- einfo "and to be consistent with the upstream \"official\" build optimisations."
- fi
-
- if [[ "$use_lto" == "false" ]] && use test; then
- die "Tests require CFI which requires LTO"
- fi
-
- export use_lto
-
- # 936858
- if tc-ld-is-mold; then
- eerror "Your toolchain is using the mold linker."
- eerror "This is not supported by Chromium."
- die "Please switch to a different linker."
- fi
-
- if tc-is-cross-compiler; then
- use pgo && die "The pgo USE flag cannot be used when cross-compiling"
- CPP="${CBUILD}-clang++-${LLVM_SLOT} -E"
- fi
-
- # Sanity checks for development convenience
- if ver_test $(gn --version || die) -lt ${GN_MIN_VER}; then
- die "dev-build/gn >= ${GN_MIN_VER} is required to build this Chromium"
- fi
-
- # Sometimes, when adding a new LLVM slot, devs (me) forget to install an appropriate lld.
- local lld_ver=$(ld.lld --version | awk '{split($2,a,"."); print a[1]}' || die "Failed to check lld version")
- if [[ ${lld_ver} -lt ${LLVM_SLOT} ]]; then
- die "Your lld version (${lld_ver}) is too old for the selected LLVM slot (${LLVM_SLOT}). Please install a newer lld or select an older LLVM slot."
- fi
- fi
-
- chromium_suid_sandbox_check_kernel_config
-}
-
-src_unpack() {
- # # Here be dragons!
- # local XCLD="--exclude=chromium-${PV/_*}/third_party/instrumented_libs \
- # --exclude=chromium-${PV/_*}/third_party/llvm \
- # --exclude=chromium-${PV/_*}/third_party/llvm-build \
- # --exclude=chromium-${PV/_*}/third_party/node/linux \
- # --exclude=chromium-${PV/_*}/third_party/rust-src \
- # --exclude=chromium-${PV/_*}/third_party/rust-toolchain \
- # --exclude=chromium-${PV/_*}/build/linux/debian_bullseye_i386-sysroot \
- # --exclude=chromium-${PV/_*}/build/linux/debian_bullseye_amd64-sysroot \
- # --exclude=chromium-${PV/_*}/third_party/angle/third_party/VK-GL-CTS \
- # "
-
- # if ! use libcxx ; then
- # XCLD+=" --exclude=chromium-${PV/_*}/third_party/libc++"
- # fi
-
- # if ! use pgo ; then
- # XCLD+=" --exclude=chromium-${PV/_*}/chrome/build/pgo_profiles"
- # fi
-
- # einfo "Unpacking chromium-${PV/_*}.tar.xz to ${WORKDIR}"
- # # Gentoo tarball:
- # # tar ${XCLD} -xf "${DISTDIR}/chromium-${PV/_*}-gentoo.tar.xz" -C "${WORKDIR}" || die
- # tar ${XCLD} -xf "${DISTDIR}/chromium-${PV/_*}${LITE_TARBALL:+-lite}.tar.xz" -C "${WORKDIR}" || die
-
- # unpack ${UGC_URL#*->}
- # # unpack chromium-patches-${PATCH_V}.tar.bz2
- # # Warned you!
-
- unpack chromium-${PV/_*}-linux.tar.xz
- unpack chromium-patches-${PATCH_V}.tar.bz2
- # These should only be required when we're not using the official toolchain
- if use !bundled-toolchain; then
- unpack chromium-patches-copium-${COPIUM_COMMIT:0:10}.tar.gz
- fi
-
- if use test; then
- # This just contains a bunch of font files that need to be unpacked (or moved) to the correct location.
- local testfonts_dir="${WORKDIR}/chromium-${PV/_*}/third_party/test_fonts/test_fonts"
- local testfonts_tar="${DISTDIR}/chromium-testfonts-${TEST_FONT:0:10}.tar.gz"
- einfo "Unpacking test fonts ..."
- tar xf "${testfonts_tar}" -C "${testfonts_dir}" || die "Failed to unpack testfonts"
- fi
-
- # We need to manually unpack this since M126 else we'd unpack one toolchain over the other.
- # Since we're doing that anyway let's unpack to sensible locations to make symlink creation easier.
- if use bundled-toolchain; then
- einfo "Unpacking bundled Clang ..."
- mkdir -p "${WORKDIR}"/clang || die "Failed to create clang directory"
- tar xf "${DISTDIR}/chromium-clang-${BUNDLED_CLANG_VER}.tar.xz" -C "${WORKDIR}/clang" || die "Failed to unpack Clang"
- einfo "Unpacking bundled Rust ..."
- local rust_dir="${WORKDIR}/rust-toolchain"
- mkdir -p "${rust_dir}" || die "Failed to create rust toolchain directory"
- tar xf "${DISTDIR}/chromium-rust-toolchain-${RUST_SHORT_HASH}-${BUNDLED_CLANG_VER%-*}.tar.xz" -C "${rust_dir}" ||
- die "Failed to unpack Rust"
- fi
-
- if use ppc64; then
- unpack chromium-openpower-${PPC64_HASH:0:10}.tar.bz2
- fi
-
- # This is a dirty hack, but we need rollup to build successfully and it's proving to be challenging
- # to build locally due to deps
- unpack rollup-wasm-node-${ROLLUP_VER}.tgz
-
- if use cromite; then
- unpack cromite-${CROMITE_COMMIT_ID}.tar.gz
- fi
-
- unpack ${UGC_URL#*->}
-}
-
-remove_compiler_builtins() {
- # We can't use the bundled compiler builtins with the system toolchain
- # We used to `grep` then `sed`, but it was indirect. Combining the two into a single
- # `awk` command is more efficient and lets us document the logic more clearly.
-
- local pattern=' configs += [ "//build/config/clang:compiler_builtins" ]'
- local target='build/config/compiler/BUILD.gn'
-
- local tmpfile
- tmpfile=$(mktemp) || die "Failed to create temporary file."
-
- if awk -v pat="${pattern}" '
- BEGIN {
- match_found = 0
- }
-
- # If the delete countdown is active, decrement it and skip to the next line.
- d > 0 { d--; next }
-
- # If the current line matches the pattern...
- $0 == pat {
- match_found = 1 # ...set our flag to true.
- d = 2 # Set delete counter for this line and the next two.
- prev = "" # Clear the buffered previous line so it is not printed.
- next
- }
-
- # For any other line, print the buffered previous line.
- NR > 1 { print prev }
-
- # Buffer the current line to be printed on the next cycle.
- { prev = $0 }
-
- END {
- # Print the last line if it was not part of a deleted block.
- if (d == 0) { print prev }
-
- # If the pattern was never found, exit with a failure code.
- if (match_found == 0) {
- exit 1
- }
- }
- ' "${target}" > "${tmpfile}"; then
- # AWK SUCCEEDED (exit code 0): The pattern was found and edited.
- # This is to avoid gawk's `-i inplace` option which users complain about.
- mv "${tmpfile}" "${target}"
- else
- # AWK FAILED (exit code 1): The pattern was not found.
- rm -f "${tmpfile}"
- die "Awk patch failed: Pattern not found in ${target}."
- fi
-}
-
-src_prepare() {
- # Calling this here supports resumption via FEATURES=keepwork
- python_setup
-
- # We'll fill this in as we go. Patches go in chromium-patches.
- local PATCHES=()
-
- rm "${WORKDIR}/chromium-patches-${PATCH_V}/common/cr131-unbundle-icu-target.patch"
- if use pgo; then
- rm "${WORKDIR}/chromium-patches-${PATCH_V}/rust/cr146-fix-botched-bytemuck-roll.patch"
- sed -i '/SupportedLaneCount/d' third_party/rust/chromium_crates_io/vendor/bytemuck-v1/src/zeroable.rs || die
- sed -i '/SupportedLaneCount/d' third_party/rust/chromium_crates_io/vendor/bytemuck-v1/src/pod.rs || die
- fi
-
- #cp -f ${WORKDIR}/chromium-patches-${PATCH_V}/*-compiler.patch "${T}/compiler.patch"
- ##cp -f ${FILESDIR}/chromium-147-compiler.patch "${T}/compiler.patch"
- #if ! use custom-cflags; then #See #25 #92
- # sed -i '/default_stack_frames/Q' "${T}/compiler.patch" || die
- #fi
-
- PATCHES+=( "${WORKDIR}/chromium-patches-${PATCH_V}/common/" )
- PATCHES+=( "${FILESDIR}/restore-x86-r3.patch" )
-
- # https://issues.chromium.org/issues/442698344
- # Unreleased fontconfig changed magic numbers and google have rolled to this version
- if has_version "<=media-libs/fontconfig-2.17.1"; then
- PATCHES+=( "${FILESDIR}/chromium-142-work-with-old-fontconfig.patch" )
- fi
-
- if use bundled-toolchain; then
- # We need to symlink the toolchain into the expected location
- einfo "Symlinking Clang toolchain to expected location ..."
- mkdir -p third_party/llvm-build/ || die "Failed to create llvm-build directory"
- # the 'Chromium Linux Tarballs' seem to already have 'Release+Asserts/{lib,bin}'; not sure if this is an
- # upstream change - we're using the same scripts to build, theoretically. We'll still attempt to create
- # llvm-build, but we'll rm Release+Asserts and symlink directly.
- if [[ -d third_party/llvm-build/Release+Asserts ]]; then
- rm -r third_party/llvm-build/Release+Asserts || die "Failed to remove third_party/llvm-build/Release+Asserts"
- fi
- ln -s "${WORKDIR}"/clang third_party/llvm-build/Release+Asserts || die "Failed to bundle Clang"
- einfo "Symlinking Rust toolchain to expected location ..."
- # As above, so below
- if [[ -d third_party/rust-toolchain ]]; then
- rm -r third_party/rust-toolchain || die "Failed to remove third_party/rust-toolchain"
- fi
- ln -s "${WORKDIR}"/rust-toolchain third_party/rust-toolchain || die "Failed to bundle rust"
- cp "${WORKDIR}"/rust-toolchain/VERSION \
- "${WORKDIR}"/rust-toolchain/INSTALLED_VERSION || die "Failed to set rust version"
- else
- # We don't need our toolchain patches if we're using the official toolchain
-
- # Copium patches go here.
- PATCHES+=(
- "${WORKDIR}/copium/cr143-libsync-__BEGIN_DECLS.patch"
- "${WORKDIR}/copium/cr149-unbundle-minizip-undo-unicode.patch"
- )
-
- # Automate conditional application of chromium-patches
- # The directory structure is expected to be something like:
- # chromium-patches-145/
- # ├── toolchain/
- # │ ├── cr123-foo.patch
- # │ └── cr135-bar.patch
- # ├── llvm/
- # │ ├── cr144-baz.patch
- # │ └── lt-23/
- # │ └── cr145-bleeding-edge-llvm-feature.patch
- # Where `lt-23` means "apply this patch if the LLVM version is less than 23".
- # Only categories in `slot_map` will be checked for version constraints.
- shopt -s nullglob
- local -A slot_map=( [llvm]="${LLVM_SLOT}" [rust]="${RUST_SLOT}" )
-
- for category in "${WORKDIR}/chromium-patches-${PATCH_V}"/*/; do
- local category_name="${category%/}"
- category_name="${category_name##*/}"
-
- # Skip arch-specific categories
- if [[ "${category_name}" == "ppc64le" ]]; then
- use ppc64 || continue
- fi
-
- # We applied common patches above, no need to apply them again here
- [[ "${category_name}" == "common" ]] && continue
-
- # Unconditional patches for this category
- local category_patches=( "${category}"*.patch )
- [[ ${#category_patches[@]} -gt 0 ]] && PATCHES+=( "${category}" )
-
- # Version-constrained subdirectories (e.g., llvm/lt-23/)
- for constraint_dir in "${category}"*/; do
- local dir_name="${constraint_dir%/}"
- dir_name="${dir_name##*/}"
- if [[ "${dir_name}" =~ ^lt-(.*)$ && -v slot_map[${category_name}] ]]; then
- ver_test "${slot_map[${category_name}]}" -lt "${BASH_REMATCH[1]}" &&
- PATCHES+=( "${constraint_dir}" )
- fi
- done
- done
-
- shopt -u nullglob
-
- # Strictly speaking this doesn't need to be gated (no bundled toolchain for ppc64); it keeps the logic together
- if use ppc64; then
- local patchset_dir="${WORKDIR}/openpower-patches-${PPC64_HASH}/patches"
- # patch causes build errors on 4K page systems (https://bugs.gentoo.org/show_bug.cgi?id=940304)
- local page_size_patch="ppc64le/third_party/use-sysconf-page-size-on-ppc64.patch"
- local isa_3_patch="ppc64le/core/baseline-isa-3-0.patch"
- # Apply the OpenPOWER patches (check for page size and isa 3.0)
- openpower_patches=( $(grep -E "^ppc64le|^upstream" "${patchset_dir}/series" | grep -v "${page_size_patch}" |
- grep -v "${isa_3_patch}" || die) )
- for patch in "${openpower_patches[@]}"; do
- PATCHES+=( "${patchset_dir}/${patch}" )
- done
- if [[ $(getconf PAGESIZE) == 65536 ]]; then
- PATCHES+=( "${patchset_dir}/${page_size_patch}" )
- fi
- # We use vsx3 as a proxy for 'want isa3.0' (POWER9)
- if use cpu_flags_ppc_vsx3 ; then
- PATCHES+=( "${patchset_dir}/${isa_3_patch}" )
- fi
- fi
-
- remove_compiler_builtins
-
- # We can't rely on the eselect'd Rust to actually include rustfmt, so we'll point to the selected slot specifically.
- local suffix=""
- if [[ "${RUST_TYPE}" == "binary" ]]; then
- suffix="-bin-${RUST_SLOT}"
- else
- suffix="-${RUST_SLOT}"
- fi
- sed -i "s|/bin/rustfmt|/bin/rustfmt${suffix}|g" build/rust/rust_bindgen_generator.gni ||
- die "Failed to update rustfmt path"
-
- fi
-
- # Do this before we apply patches since (e.g.) ppc64 needs to patch rollup and it's easier in ${S}
- einfo "Moving rollup wasm-node package into place ..."
- mkdir -p third_party/devtools-frontend/src/node_modules/@rollup/wasm-node ||
- die "Failed to create node_modules/@rollup/wasm-node"
- mv "${WORKDIR}"/package/* third_party/devtools-frontend/src/node_modules/@rollup/wasm-node ||
- die "Failed to move rollup package"
-
- if [ ! -z "${CHROMIUM_COMMITS[*]}" ]; then
- # for i in "${CHROMIUM_COMMITS[@]}"; do
- for i in "${!CHROMIUM_COMMITS[@]}"; do
- if [[ ${CHROMIUM_COMMITS[$i]} =~ webrtc ]]; then
- patch_prefix="webrtc"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ angle ]]; then
- patch_prefix="angle"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ quiche ]]; then
- patch_prefix="quiche"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ dawn ]]; then
- patch_prefix="dawn"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ perfetto ]]; then
- patch_prefix="perfetto"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ink ]]; then
- patch_prefix="ink"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ vulkan-utility-libraries ]]; then
- patch_prefix="vulkan-utility-libraries"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ruy ]]; then
- patch_prefix="ruy"
- else
- patch_prefix="chromium"
- fi
- pushd "${CHROMIUM_COMMITS[$i]}" > /dev/null || die
- if [[ $i = -* ]]; then
- einfo "Reverting ${patch_prefix}-${i/-}.patch"
- git_wrapper apply -R --exclude="*unittest.cc" --exclude="DEPS" \
- -p1 < "${DISTDIR}/${patch_prefix}-${i/-}.patch"
- else
- einfo "Applying ${patch_prefix}-${i/-}.patch"
- git_wrapper apply --exclude="*unittest.cc" --exclude="DEPS" \
- -p1 < "${DISTDIR}/${patch_prefix}-${i/-}.patch"
- fi
- popd > /dev/null || die
- done
- fi
-
- if ! use bluetooth ; then
- PATCHES+=(
- "${FILESDIR}/disable-bluez-r7.patch"
- )
- fi
-
- if use convert-dict ; then
- PATCHES+=(
- "${FILESDIR}/chromium-ucf-dict-utility-r3.patch"
- )
- fi
-
- if ! use libcxx ; then
- PATCHES+=(
- "${FILESDIR}/fix-wayland-oncecallback-copy.patch"
- )
- fi
-
- if use system-ffmpeg; then
- PATCHES+=(
- "${FILESDIR}/chromium-141-opus-mp3.patch"
- "${FILESDIR}/chromium-135-hevc.patch"
- )
- sed -i "\!AVFMT_FLAG_NOH264PARSE!d" media/filters/ffmpeg_glue.cc || die
- ewarn "You need to expose \"av_stream_get_first_dts\" in ffmpeg via user patch"
- fi
-
- if use system-av1; then
- PATCHES+=(
- "${FILESDIR}/chromium-system-av1.patch"
- )
- fi
-
- if use system-libvpx; then
- PATCHES+=(
- "${FILESDIR}/chromium-system-libvpx.patch"
- )
- fi
-
- if use system-openjpeg ; then
- PATCHES+=(
- "${FILESDIR}/chromium-system-openjpeg-r4.patch"
- )
- fi
-
- if use x86 ; then
- #* Fixes a segfault in transport_security_state_generator
- PATCHES+=(
- "${FILESDIR}/fix-segfault-x86.patch"
- )
- fi
-
- # Testing all patches when NODIE is defined
- if [ ! -z "${NODIE}" ]; then
- for i in "${PATCHES[@]}"; do
- eapply_wrapper "$i"
- done
- nonfatal eapply_user
- else
- default
- fi
-
- if use cromite ; then
- BR_PA_PATH="${WORKDIR}/cromite-${CROMITE_COMMIT_ID}/build/patches"
-
- sed -i '/b\/components\/components_strings\.grd/,+10d' "${BR_PA_PATH}/Add-cromite-flags-support.patch" || die
- sed -i '/b\/chrome\/android\/java\/res\/xml\/privacy_preferences\.xml/,+13d' "${BR_PA_PATH}/Add-cromite-flags-support.patch" || die
- sed -i '/b\/android_webview\/support_library\/java\/src\/org\/chromium\/support_lib_glue/,+11d' "${BR_PA_PATH}/Client-hints-overrides.patch" || die
- sed -i '/webapps_strings.grdp" \/>/{s++webapps_strings.grdp" /><part file="cromite_components_strings_grd/placeholder.txt"/>+;h};${x;/./{x;q0};x;q1}' \
- components/components_strings.grd || die
-
- sed -i 's/absl::/std::/' "${BR_PA_PATH}/Add-a-proxy-configuration-page.patch" || die
-
- filterdiff -p1 "${BR_PA_PATH}/JIT-site-settings.patch" --exclude="content/browser/renderer_host/render_process_host_impl.cc" \
- > "${BR_PA_PATH}/JIT-site-settings.patch1"
- mv -f "${BR_PA_PATH}/JIT-site-settings.patch1" "${BR_PA_PATH}/JIT-site-settings.patch"
-
- BROMITE_PATCHES=(
- "${BR_PA_PATH}/bromite-build-utils.patch"
- "${BR_PA_PATH}/Battery-API-return-nothing.patch"
- "${BR_PA_PATH}/Multiple-fingerprinting-mitigations.patch"
- "${BR_PA_PATH}/Add-flag-to-configure-maximum-connections-per-host.patch"
- "${BR_PA_PATH}/Add-a-proxy-configuration-page.patch"
- "${BR_PA_PATH}/Enable-StrictOriginIsolation-and-SitePerProcess.patch"
- "${BR_PA_PATH}/Disable-requests-for-single-word-Omnibar-searches.patch"
- "${BR_PA_PATH}/Reduce-HTTP-headers-in-DoH-requests-to-bare-minimum.patch"
- "${BR_PA_PATH}/Client-hints-overrides.patch"
- "${BR_PA_PATH}/Disable-idle-detection.patch"
- "${BR_PA_PATH}/Disable-TLS-resumption.patch"
- "${BR_PA_PATH}/Remove-navigator.connection-info.patch"
-
- "${BR_PA_PATH}/AudioBuffer-AnalyserNode-fp-mitigations.patch"
- "${BR_PA_PATH}/Fonts-fingerprinting-mitigation.patch"
- "${BR_PA_PATH}/Content-settings-infrastructure.patch"
- "${BR_PA_PATH}/Add-autoplay-site-setting.patch"
- "${BR_PA_PATH}/Site-setting-for-images.patch"
- "${BR_PA_PATH}/JIT-site-settings.patch"
- "${BR_PA_PATH}/Add-webGL-site-setting.patch"
- "${BR_PA_PATH}/Add-webRTC-site-settings.patch"
- "${BR_PA_PATH}/Show-site-settings-for-cookies-javascript-and-ads.patch"
- "${BR_PA_PATH}/Viewport-Protection-flag.patch"
- "${BR_PA_PATH}/Revert-remove-allowscript-content-setting-secondary-url.patch"
- "${BR_PA_PATH}/Timezone-customization.patch"
- "${BR_PA_PATH}/Disable-speechSynthesis-getVoices-API.patch"
- "${BR_PA_PATH}/Remove-support-for-device-memory-and-cpu-recovery.patch"
- "${BR_PA_PATH}/Disable-Feeback-Collector.patch"
- "${BR_PA_PATH}/Disable-remote-altsvc-for-h3-connections.patch"
- "${BR_PA_PATH}/Add-cromite-flags-support.patch"
- "${BR_PA_PATH}/Enables-deactivation-of-the-js-debugger-statement.patch"
- )
- for i in "${BROMITE_PATCHES[@]}"; do
- if [[ "$i" =~ "Add-autoplay-site-setting.patch" ]] ||
- [[ "$i" =~ "JIT-site-settings.patch" ]] ||
- [[ "$i" =~ "Site-setting-for-images.patch" ]]; then
- einfo "Git binary patch: ${i##*/}"
- git_wrapper apply -p1 < "$i"
- else
- filter_wrapper "$i" --exclude="chrome/android/*"
- fi
- done
-
- #! conflicting patches
- sed -i '/browser_features.cc/,+17d' \
- "${UGC_WD}/patches/extra/ungoogled-chromium/add-flag-to-clear-data-on-exit.patch" || die
- sed -i 's$} // namespace features$BASE_FEATURE(kClearDataOnExit, "ClearDataOnExit", base::FEATURE_DISABLED_BY_DEFAULT);}$' \
- chrome/browser/browser_features.cc || die
- sed -i 's$} // namespace features$BASE_DECLARE_FEATURE(kClearDataOnExit);}$' \
- chrome/browser/browser_features.h || die
- sed -i 's$kChromeUIAboutHost,$kChromeUIAboutHost,"ungoogled-first-run",$' \
- chrome/common/webui_url_constants.cc || die
- sed -i '/chrome\/common\/webui_url_constants.cc/Q' \
- "${UGC_WD}/patches/extra/ungoogled-chromium/first-run-page.patch" || die
-
- #! normalise paths in py
- sed -i 's$os.path.dirname(include_file)$os.path.abspath(os.path.dirname(include_file))$' \
- build/bromite/gyp/cpp_bromite_include.py || die
- fi
-
- # if [[ ${LLVM_SLOT} == "19" ]]; then
- # # Upstream now hard depend on a feature that was added in LLVM 20.1, but we don't want to stabilise that yet.
- # # Do the temp file shuffle in case someone is using something other than `gawk`
- # {
- # awk '/config\("clang_warning_suppression"\) \{/ { print $0 " }"; sub(/clang/, "xclang"); print; next }
- # { print }' build/config/compiler/BUILD.gn > "${T}/build.gn" && \
- # mv "${T}/build.gn" build/config/compiler/BUILD.gn
- # } || die "Unable to disable warning suppression"
- # fi
-
- ## Not included in -lite tarballs, but we should check for it anyway.
- #if [[ -f third_party/node/linux/node-linux-x64/bin/node ]]; then
- # rm third_party/node/linux/node-linux-x64/bin/node || die
- #else
- # mkdir -p third_party/node/linux/node-linux-x64/bin || die
- #fi
- #ln -s "${EPREFIX}"/usr/bin/node third_party/node/linux/node-linux-x64/bin/node || die
-
- cp "${FILESDIR}/libusb.gn" build/linux/unbundle || die
- sed -i '/^REPLACEMENTS.*$/{s++REPLACEMENTS = {"libusb":"third_party/libusb/BUILD.gn",+;h};${x;/./{x;q0};x;q1}' \
- build/linux/unbundle/replace_gn_files.py || die
- sed -i '/^.*deps.*third_party\/jsoncpp.*$/{s++public_deps \+= [ "//third_party/jsoncpp" ]+;h};${x;/./{x;q0};x;q1}' \
- third_party/webrtc/rtc_base/BUILD.gn || die
-
- if use override-data-dir; then
- sed -i '/"chromium";/{s++"ungoogled-chromium";+;h};${x;/./{x;q0};x;q1}' \
- chrome/common/chrome_paths_linux.cc || die
- fi
-
- if use system-abseil-cpp; then
- eapply_wrapper "${FILESDIR}/chromium-147-system-abseil.patch"
-
- #! SFINAE mangling incompatibility between clang and gcc:
- #! https://github.com/llvm/llvm-project/issues/85656
- #! gcc: _ZN4absl12lts_202601074CordC1INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELi0EEEOT_
- #! clang: _ZN4absl12lts_202601074CordC1INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEETnNSt9enable_ifIXsr3std7is_sameIT_S8_EE5valueEiE4typeELi0EEEOSA_
- #! So, either this:
- eapply_wrapper "${FILESDIR}/chromium-141-system-abseil-cord.patch"
- #! or build with -fclang-abi-compat=17
-
- # cp -f /usr/include/absl/base/options.h third_party/abseil-cpp/absl/base/options.h
- # sed -i '/^#define ABSL_OPTION_USE_STD_ORDERING.*$/{s++#define ABSL_OPTION_USE_STD_ORDERING 1+;h};${x;/./{x;q0};x;q1}' \
- # third_party/abseil-cpp/absl/base/options.h || die
- fi
-
- #* Applying UGC PRs here
- if [ ! -z "${UGC_PR_COMMITS[*]}" ]; then
- pushd "${UGC_WD}" >/dev/null
- for i in "${UGC_PR_COMMITS[@]}"; do
- eapply_wrapper "${DISTDIR}/${PN}-$i.patch"
- done
- popd >/dev/null
- fi
-
- # From here we adapt ungoogled-chromium's patches to our needs
- local ugc_pruning_list="${UGC_WD}/pruning.list"
- local ugc_patch_series="${UGC_WD}/patches/series"
- local ugc_substitution_list="${UGC_WD}/domain_substitution.list"
-
- local ugc_unneeded=(
- # GN bootstrap
- extra/debian/gn/parallel
- # following Gentoo's Chromium
- core/ungoogled-chromium/build-with-wasm-rollup
- )
-
- if use cromite ; then
- einfo "Using fingerprinting patches from Cromite instead"
- ugc_unneeded+=(
- extra/bromite/fingerprinting-flags-client-rects-and-measuretext
- extra/bromite/flag-max-connections-per-host
- extra/bromite/flag-fingerprinting-canvas-image-data-noise
- extra/ungoogled-chromium/add-components-ungoogled
- extra/ungoogled-chromium/remove-pac-size-limit
- )
- fi
-
- # #* Temporary fix
- # sed -i "\!ios/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/icu/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/libjpeg_turbo/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/snappy/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/closure_compiler/!d" "${ugc_pruning_list}" || die
-
- # #* Didn't unpack them at the first place
- # sed -i "\!build/linux/debian_bullseye_i386-sysroot!d" "${ugc_pruning_list}" || die
- # sed -i "\!build/linux/debian_bullseye_amd64-sysroot!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/llvm-build!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/node/linux!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/rust-src!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/rust-toolchain!d" "${ugc_pruning_list}" || die
- # if ! use libcxx ; then
- # sed -i "\!third_party/libc!d" "${ugc_pruning_list}" || die
- # fi
- sed -i "s|debug('files|error('files|" \
- "${UGC_WD}/utils/prune_binaries.py" || die
- sed -i "\!third_party/node/linux!d" \
- "${UGC_WD}/utils/prune_binaries.py" || die
-
- local ugc_p ugc_dir
- for p in "${ugc_unneeded[@]}"; do
- einfo "Removing ${p}.patch"
- sed -i "\!${p}.patch!d" "${ugc_patch_series}" || die
- done
-
- if [ ! -z "${UGC_SKIP_PATCHES}" ]; then
- for p in ${UGC_SKIP_PATCHES}; do
- ewarn "Removing ${p}"
- sed -i "\!${p}!d" "${ugc_patch_series}" || die
- done
- fi
-
- if [ ! -z "${UGC_KEEP_BINARIES}" ]; then
- for p in ${UGC_KEEP_BINARIES}; do
- ewarn "Keeping binary ${p}"
- sed -i "\!${p}!d" "${ugc_pruning_list}" || die
- done
- fi
-
- if [ ! -z "${UGC_SKIP_SUBSTITUTION}" ]; then
- for p in ${UGC_SKIP_SUBSTITUTION}; do
- ewarn "No substitutions in ${p}"
- sed -i "\!${p}!d" "${ugc_substitution_list}" || die
- done
- fi
-
- ebegin "Pruning binaries"
- "${UGC_WD}/utils/prune_binaries.py" -q . "${UGC_WD}/pruning.list"
- eend $? || die
-
- ebegin "Applying ungoogled-chromium patches"
- "${UGC_WD}/utils/patches.py" -q apply . "${UGC_WD}/patches"
- eend $? || die
-
- ebegin "Applying domain substitution"
- "${UGC_WD}/utils/domain_substitution.py" -q apply -r "${UGC_WD}/domain_regex.list" -f "${UGC_WD}/domain_substitution.list" .
- eend $? || die
-
- # Sanity check esbuild version before we start removing files.
- # We _could_ patch the version check out - in theory esbuild upstream are being super conservative after
- # arch(AUR) packaged an `esbuild` binary and set ESBUILD_BINARY_PATH=/usr/bin/esbuild, causing much breakage,
- # but this is fine too and exactly matches what upstream are expecting.
- # https://github.com/evanw/esbuild/issues/2894
- local esbuild_js="${S}/third_party/devtools-frontend/src/node_modules/esbuild/lib/main.js"
- local found
- found=$(awk -F'"' '/if \(binaryVersion !==/ {print $2}' "${esbuild_js}")
- if [[ "${found}" != "${ESBUILD_VER}" ]]; then
- die "esbuild version mismatch: expected ${ESBUILD_VER}, found ${found}"
- fi
-
- elog "Removing bundled binaries from source tree ..."
- # Purge bundled ELF files: These are non-portable and will cause issues if used instead of system versions.
- # Use `--wasm` to also remove WebAssembly binaries, if desired - they're portable so shouldn't break builds.
- ${EPYTHON} "${FILESDIR}/bin-finder.py" --elf "${S}" | awk '{print $1}' | xargs rm -f ||
- die "Failed to remove bundled binaries"
-
- # And now we restore any that we actually need, from the host system
- local esbuild_path="${S}/third_party/devtools-frontend/src/third_party/esbuild"
- local -A restore_list=(
- ["/usr/bin/esbuild-${ESBUILD_VER}"]="${esbuild_path}/esbuild"
- ["/usr/bin/gperf"]="${S}/third_party/gperf/cipd/bin/gperf"
- ["/usr/bin/node"]="${S}/third_party/node/linux/node-linux-x64/bin/node"
- )
-
- for src in "${!restore_list[@]}"; do
- dst="${restore_list[${src}]}"
- if [[ -f "${src}" ]]; then
- einfo "Symlinking ${src} ..."
- # Make sure the parent dir exists; some tarballs don't include (e.g.) node's bindir
- mkdir -p "$(dirname "${dst}")" || die "Failed to create directory for ${dst}"
- ln -s "${src}" "${dst}" || die "Failed to symlink ${dst} from ${src}"
- if [[ ! -L "${dst}" || "$(readlink -f "${dst}")" != "${src}" ]]; then
- die "Symlink verification failed for ${dst} -> ${src}"
- fi
- else
- die "Expected to find ${src} to restore ${dst}, but it does not exist."
- fi
- done
-
- # adjust python interpreter version
- sed -i -e "s|\(^script_executable = \).*|\1\"${EPYTHON}\"|g" .gn || die
-
- # Use the system copy of hwdata's usb.ids; upstream is woefully out of date (2015!)
- sed 's|//third_party/usb_ids/usb.ids|/usr/share/hwdata/usb.ids|g' \
- -i services/device/public/cpp/usb/BUILD.gn || die "Failed to set system usb.ids path"
-
- # remove_bundled_libraries.py walks the source tree and looks for paths containing the substring 'third_party'
- # whitelist matches use the right-most matching path component, so we need to whitelist from that point down.
- local keeplibs=(
- base/third_party/cityhash
- )
- use system-double-conversion || keeplibs+=(
- base/third_party/double_conversion
- )
- keeplibs+=(
- base/third_party/icu
- base/third_party/nspr
- base/third_party/superfasthash
- base/third_party/symbolize
- base/third_party/xdg_user_dirs
- buildtools/third_party/libc++
- buildtools/third_party/libc++abi
- )
- use cromite && keeplibs+=(
- cromite_flags/third_party
- )
- keeplibs+=(
- net/third_party/mozilla_security_manager
- net/third_party/quic
- net/third_party/uri_template
- )
- use system-abseil-cpp || keeplibs+=(
- third_party/abseil-cpp
- )
- keeplibs+=(
- third_party/angle
- third_party/angle/src/common/third_party/xxhash
- third_party/angle/src/third_party/ceval
- )
- use nvidia || keeplibs+=(
- third_party/angle/src/third_party/libXNVCtrl
- )
- keeplibs+=(
- third_party/angle/src/third_party/volk
- third_party/anonymous_tokens
- third_party/apple_apsl
- third_party/axe-core
- third_party/bidimapper
- third_party/blink
- third_party/boringssl
- third_party/boringssl/src/third_party/fiat
- third_party/breakpad
- third_party/breakpad/breakpad/src/third_party/curl
- )
- use system-brotli || keeplibs+=(
- third_party/brotli
- )
- keeplibs+=(
- third_party/catapult
- third_party/catapult/common/py_vulcanize/third_party/rcssmin
- third_party/catapult/common/py_vulcanize/third_party/rjsmin
- third_party/catapult/third_party/beautifulsoup4-4.9.3
- third_party/catapult/third_party/html5lib-1.1
- third_party/catapult/third_party/polymer
- third_party/catapult/third_party/six
- third_party/catapult/third_party/typ
- third_party/catapult/tracing/third_party/d3
- third_party/catapult/tracing/third_party/gl-matrix
- third_party/catapult/tracing/third_party/jpeg-js
- third_party/catapult/tracing/third_party/jszip
- third_party/catapult/tracing/third_party/mannwhitneyu
- third_party/catapult/tracing/third_party/oboe
- third_party/catapult/tracing/third_party/pako
- third_party/ced
- third_party/cld_3
- third_party/closure_compiler
- )
- use libcxx && keeplibs+=(
- third_party/compiler-rt
- )
- keeplibs+=(
- third_party/content_analysis_sdk
- third_party/cpuinfo
- third_party/crabbyavif
- third_party/crashpad
- third_party/crashpad/crashpad/third_party/lss
- third_party/crashpad/crashpad/third_party/zlib
- )
- use system-crc32c || keeplibs+=(
- third_party/crc32c
- )
- keeplibs+=(
- third_party/cros_system_api
- third_party/d3
- third_party/dawn
- third_party/dawn/third_party/gn/webgpu-cts
- third_party/dawn/third_party/OpenGL-Registry
- third_party/dawn/third_party/renderdoc
- third_party/dawn/third_party/webgpu-headers
- third_party/depot_tools
- third_party/devscripts
- third_party/devtools-frontend
- third_party/devtools-frontend/src/front_end/third_party/acorn
- third_party/devtools-frontend/src/front_end/third_party/additional_readme_paths.json
- third_party/devtools-frontend/src/front_end/third_party/axe-core
- third_party/devtools-frontend/src/front_end/third_party/chromium
- third_party/devtools-frontend/src/front_end/third_party/codemirror
- third_party/devtools-frontend/src/front_end/third_party/csp_evaluator
- third_party/devtools-frontend/src/front_end/third_party/diff
- third_party/devtools-frontend/src/front_end/third_party/i18n
- third_party/devtools-frontend/src/front_end/third_party/intl-messageformat
- third_party/devtools-frontend/src/front_end/third_party/json5
- third_party/devtools-frontend/src/front_end/third_party/legacy-javascript
- third_party/devtools-frontend/src/front_end/third_party/lighthouse
- third_party/devtools-frontend/src/front_end/third_party/lit
- third_party/devtools-frontend/src/front_end/third_party/marked
- third_party/devtools-frontend/src/front_end/third_party/puppeteer
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/esm/third_party/mitt
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/esm/third_party/parsel-js
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/esm/third_party/rxjs
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/esm/third_party/urlpattern-polyfill
- third_party/devtools-frontend/src/front_end/third_party/source-map-scopes-codec
- third_party/devtools-frontend/src/front_end/third_party/third-party-web
- third_party/devtools-frontend/src/front_end/third_party/vscode.web-custom-data
- third_party/devtools-frontend/src/front_end/third_party/wasmparser
- third_party/devtools-frontend/src/front_end/third_party/web-vitals
- third_party/devtools-frontend/src/third_party
- third_party/dom_distiller_js
- third_party/dragonbox
- third_party/eigen3
- third_party/emoji-segmenter
- third_party/farmhash
- third_party/fast_float
- third_party/fdlibm
- third_party/federated_compute/chromium/fcp/confidentialcompute
- third_party/federated_compute/src/fcp/base
- third_party/federated_compute/src/fcp/confidentialcompute
- third_party/federated_compute/src/fcp/protos/confidentialcompute
- third_party/federated_compute/src/fcp/protos/federatedcompute
- third_party/fft2d
- third_party/flatbuffers
- third_party/fp16
- third_party/freetype
- third_party/fusejs
- third_party/fxdiv
- third_party/gemmlowp
- third_party/google_input_tools
- third_party/google_input_tools/third_party/closure_library
- third_party/google_input_tools/third_party/closure_library/third_party/closure
- third_party/googletest
- third_party/gperf # We symlink system gperf, but this will purge the symlink since we tidy up afterwards.
- third_party/highway
- third_party/hunspell
- third_party/hyphenation-patterns
- third_party/ink/src/ink/brush
- third_party/ink/src/ink/color
- third_party/ink/src/ink/geometry
- third_party/ink/src/ink/rendering
- third_party/ink/src/ink/rendering/skia/common_internal
- third_party/ink/src/ink/rendering/skia/native
- third_party/ink/src/ink/rendering/skia/native/internal
- third_party/ink/src/ink/strokes
- third_party/ink/src/ink/types
- third_party/inspector_protocol
- third_party/ipcz
- third_party/jinja2
- )
- use system-jsoncpp || keeplibs+=(
- third_party/jsoncpp
- )
- keeplibs+=(
- third_party/khronos
- third_party/lens_server_proto
- third_party/leveldatabase
- third_party/libaddressinput
- )
- use libcxx && keeplibs+=(
- third_party/libc++
- )
- keeplibs+=(
- third_party/libdrm
- third_party/libgav1
- third_party/libjingle
- third_party/libpfm4
- third_party/libphonenumber
- third_party/libpng
- third_party/libsecret
- third_party/libsrtp
- third_party/libsync
- third_party/libtess2/libtess2
- third_party/libtess2/src/Include
- third_party/libtess2/src/Source
- third_party/liburlpattern
- )
- use system-libusb || keeplibs+=(
- third_party/libusb
- )
- keeplibs+=(
- third_party/libva_protected_content
- )
- use system-libvpx || keeplibs+=(
- third_party/libvpx
- third_party/libvpx/source/libvpx/third_party/x86inc
- )
- keeplibs+=(
- third_party/libwebm
- third_party/libx11
- third_party/libxcb-keysyms
- third_party/libxml/chromium
- third_party/libyuv
- third_party/libzip
- third_party/lit
- )
- use libcxx && keeplibs+=(
- third_party/llvm-libc
- third_party/llvm-libc/src/shared/
- )
- keeplibs+=(
- third_party/lottie
- third_party/lss
- third_party/lzma_sdk
- third_party/mako
- third_party/markupsafe
- third_party/material_color_utilities
- third_party/metrics_proto
- third_party/minigbm
- third_party/ml_dtypes
- third_party/modp_b64
- third_party/nasm
- third_party/nearby
- third_party/neon_2_sse
- third_party/node
- third_party/oak/chromium/proto
- third_party/oak/chromium/proto/attestation
- third_party/omnibox_proto
- third_party/one_euro_filter
- third_party/openscreen
- third_party/openscreen/src/third_party/
- third_party/openscreen/src/third_party/tinycbor/src/src
- third_party/ots
- third_party/pdfium
- third_party/pdfium/third_party/agg23
- third_party/pdfium/third_party/bigint
- third_party/pdfium/third_party/freetype
- third_party/pdfium/third_party/lcms
- )
- use system-openjpeg || keeplibs+=(
- third_party/pdfium/third_party/libopenjpeg
- )
- keeplibs+=(
- third_party/pdfium/third_party/libtiff
- third_party/perfetto
- third_party/perfetto/protos/third_party/chromium
- third_party/perfetto/protos/third_party/pprof
- third_party/perfetto/protos/third_party/primes
- third_party/perfetto/protos/third_party/simpleperf
- third_party/pffft
- third_party/ply
- third_party/polymer
- third_party/private_membership
- third_party/private-join-and-compute
- third_party/protobuf
- third_party/protobuf/third_party/utf8_range
- third_party/pthreadpool
- third_party/puffin
- third_party/pyjson5
- third_party/pyyaml
- third_party/rapidhash
- third_party/readability
- third_party/rnnoise
- third_party/rust
- third_party/ruy
- third_party/s2cellid
- third_party/search_engines_data
- third_party/securemessage
- third_party/selenium-atoms
- third_party/sentencepiece
- third_party/sentencepiece/src/third_party/darts_clone
- third_party/shell-encryption
- third_party/simdutf
- third_party/simplejson
- third_party/six
- third_party/skia
- third_party/skia/include/third_party/vulkan
- third_party/smhasher
- )
- use system-snappy || keeplibs+=(
- third_party/snappy
- )
- keeplibs+=(
- third_party/spirv-headers
- third_party/spirv-tools
- third_party/sqlite
- third_party/swiftshader
- third_party/swiftshader/third_party/astc-encoder
- third_party/swiftshader/third_party/llvm-subzero
- third_party/swiftshader/third_party/marl
- third_party/swiftshader/third_party/SPIRV-Headers/include/spirv
- third_party/swiftshader/third_party/SPIRV-Tools
- third_party/swiftshader/third_party/subzero
- third_party/tensorflow_models
- third_party/tensorflow-text
- third_party/tflite
- third_party/tflite/src/third_party/fft2d
- third_party/tflite/src/third_party/xla/third_party/tsl
- third_party/tflite/src/third_party/xla/xla/tsl/framework
- third_party/tflite/src/third_party/xla/xla/tsl/lib/random
- third_party/tflite/src/third_party/xla/xla/tsl/platform
- third_party/tflite/src/third_party/xla/xla/tsl/protobuf
- third_party/tflite/src/third_party/xla/xla/tsl/util
- third_party/ukey2
- third_party/utf
- third_party/vulkan
- third_party/wayland
- third_party/webdriver
- third_party/webgpu-cts
- third_party/webrtc
- third_party/webrtc/common_audio/third_party/ooura
- third_party/webrtc/common_audio/third_party/spl_sqrt_floor
- third_party/webrtc/modules/third_party/fft
- third_party/webrtc/modules/third_party/g711
- third_party/webrtc/modules/third_party/g722
- third_party/widevine
- )
- use system-woff2 || keeplibs+=(
- third_party/woff2
- )
- keeplibs+=(
- third_party/wuffs
- third_party/x11proto
- third_party/xcbproto
- third_party/xnnpack
- third_party/zlib/google
- third_party/zxcvbn-cpp
- url/third_party/mozilla
- v8/third_party/glibc
- v8/third_party/inspector_protocol
- v8/third_party/rapidhash-v8
- v8/third_party/siphash
- v8/third_party/utf8-decoder
- v8/third_party/v8
- v8/third_party/valgrind
-
- # gyp -> gn leftovers
- third_party/speech-dispatcher
- third_party/usb_ids
- )
-
- if use test; then
- keeplibs+=(
- third_party/breakpad/breakpad/src/processor
- third_party/fuzztest
- third_party/google_benchmark/src/include/benchmark
- third_party/google_benchmark/src/src
- third_party/test_fonts
- third_party/test_fonts/fontconfig
- third_party/test_fonts/test_fonts
- )
- fi
-
- # USE=system-*
- if ! use system-harfbuzz; then
- keeplibs+=( third_party/harfbuzz )
- fi
-
- if ! use system-ffmpeg; then
- keeplibs+=( third_party/ffmpeg third_party/opus )
- fi
-
- if ! use system-icu; then
- keeplibs+=( third_party/icu )
- fi
-
- if ! use system-zstd; then
- keeplibs+=( third_party/zstd )
- fi
-
- if ! use system-av1; then
- keeplibs+=(
- third_party/dav1d
- third_party/libaom
- third_party/libaom/source/libaom/third_party/fastfeat
- third_party/libaom/source/libaom/third_party/vector
- third_party/libaom/source/libaom/third_party/x86inc
- )
- fi
-
- if use libcxx; then
- keeplibs+=(
- third_party/libc++
- third_party/llvm-libc
- )
- fi
-
- if ! use system-openh264; then
- keeplibs+=( third_party/openh264 )
- fi
-
- if ! use system-re2; then
- keeplibs+=( third_party/re2 )
- fi
-
- # Arch-specific
- if use arm64 || use ppc64 ; then
- keeplibs+=( third_party/swiftshader/third_party/llvm-10.0 )
- fi
- # we need to generate ppc64 stuff because upstream does not ship it yet
- # it has to be done before unbundling.
- if use ppc64; then
- pushd third_party/libvpx >/dev/null || die
- mkdir -p source/config/linux/ppc64 || die
- # requires git and clang, bug #832803
- # Revert https://chromium.googlesource.com/chromium/src/+/b463d0f40b08b4e896e7f458d89ae58ce2a27165%5E%21/third_party/libvpx/generate_gni.sh
- # and https://chromium.googlesource.com/chromium/src/+/71ebcbce867dd31da5f8b405a28fcb0de0657d91%5E%21/third_party/libvpx/generate_gni.sh
- # since we're not in a git repo
- sed -i -e "s|^update_readme||g; s|clang-format|${EPREFIX}/bin/true|g; /^git -C/d; /git cl/d; /cd \$BASE_DIR\/\$LIBVPX_SRC_DIR/ign format --in-place \$BASE_DIR\/BUILD.gn\ngn format --in-place \$BASE_DIR\/libvpx_srcs.gni" \
- generate_gni.sh || die
- ./generate_gni.sh || die
- popd >/dev/null || die
-
- pushd third_party/ffmpeg >/dev/null || die
- cp libavcodec/ppc/h264dsp.c libavcodec/ppc/h264dsp_ppc.c || die
- cp libavcodec/ppc/h264qpel.c libavcodec/ppc/h264qpel_ppc.c || die
- popd >/dev/null || die
- fi
-
- # Sanity check keeplibs, on major version bumps it is often necessary to update this list
- # and this enables us to hit them all at once.
- # There are some entries that need to be whitelisted (TODO: Why? The file is understandable, the rest seem odd)
- whitelist_libs=(
- net/third_party/quic
- third_party/devtools-frontend/src/front_end/third_party/additional_readme_paths.json
- third_party/libjingle
- third_party/mesa
- third_party/skia/third_party/vulkan
- third_party/vulkan
- )
- local not_found_libs=()
- for lib in "${keeplibs[@]}"; do
- if [[ ! -d "${lib}" ]] && ! has "${lib}" "${whitelist_libs[@]}"; then
- not_found_libs+=( "${lib}" )
- fi
- done
-
- if [[ ${#not_found_libs[@]} -gt 0 ]]; then
- ewarn "The following \`keeplibs\` directories were not found in the source tree:"
- for lib in "${not_found_libs[@]}"; do
- ewarn " ${lib}"
- done
- fi
-
- keeplibs+=( third_party/ungoogled )
-
- # Remove most bundled libraries. Some are still needed.
- einfo "Unbundling third-party libraries ..."
- build/linux/unbundle/remove_bundled_libraries.py "${keeplibs[@]}" --do-remove || die
-
- # Interferes with our bundled clang path; we don't want stripped binaries anyway.
- sed -i -e 's|${clang_base_path}/bin/llvm-strip|/bin/true|g' \
- -e 's|${clang_base_path}/bin/llvm-objcopy|/bin/true|g' \
- build/linux/strip_binary.gni || die
-}
-
-src_configure() {
- # Calling this here supports resumption via FEATURES=keepwork
- python_setup
-
- # Bug 491582.
- export TMPDIR="${WORKDIR}/temp"
- mkdir -p -m 755 "${TMPDIR}" || die
-
- # https://bugs.gentoo.org/654216
- addpredict /dev/dri/ #nowarn
-
- # Use system-provided libraries.
- # TODO: freetype -- remove sources (https://bugs.chromium.org/p/pdfium/issues/detail?id=733).
- # TODO: use_system_hunspell (upstream changes needed).
- # TODO: use_system_protobuf (bug #525560).
- # TODO: use_system_sqlite (http://crbug.com/22208).
-
- # libevent: https://bugs.gentoo.org/593458
- local gn_system_libraries=(
- flac
- fontconfig
- freetype
- libjpeg
- libwebp
- libxml
- libxslt
- zlib
- )
- if use system-abseil-cpp; then
- gn_system_libraries+=(
- absl_algorithm
- absl_base
- absl_cleanup
- absl_container
- absl_crc
- absl_debugging
- absl_flags
- absl_functional
- absl_hash
- absl_log
- absl_log_internal
- absl_memory
- absl_meta
- absl_numeric
- absl_random
- absl_status
- absl_strings
- absl_synchronization
- absl_time
- absl_types
- absl_utility
- )
- fi
- if use system-brotli; then
- gn_system_libraries+=( brotli )
- fi
- if use system-crc32c; then
- gn_system_libraries+=( crc32c )
- fi
- if use system-double-conversion; then
- gn_system_libraries+=( double-conversion )
- fi
- if use system-woff2; then
- gn_system_libraries+=( woff2 )
- fi
- if use nvidia; then
- gn_system_libraries+=( libXNVCtrl )
- fi
- if use system-ffmpeg; then
- gn_system_libraries+=( ffmpeg opus )
- fi
- if use system-jsoncpp; then
- gn_system_libraries+=( jsoncpp )
- fi
- if use system-icu; then
- gn_system_libraries+=( icu )
- fi
- if use system-zstd; then
- gn_system_libraries+=( zstd )
- fi
- if use system-av1; then
- gn_system_libraries+=( dav1d libaom )
- fi
- if use system-libusb; then
- gn_system_libraries+=( libusb )
- fi
- if use system-libvpx; then
- gn_system_libraries+=( libvpx )
- fi
- use system-openh264 && gn_system_libraries+=(
- openh264
- )
- use system-re2 && gn_system_libraries+=(
- re2
- )
- use system-snappy && gn_system_libraries+=(
- snappy
- )
-
- build/linux/unbundle/replace_gn_files.py --system-libraries "${gn_system_libraries[@]}" ||
- die "Failed to replace GN files for system libraries"
-
- # TODO 131: The above call clobbers `enable_freetype = true` in the freetype gni file
- # drop the last line, then append the freetype line and a new curly brace to end the block
- local freetype_gni="build/config/freetype/freetype.gni"
- sed -i -e '$d' ${freetype_gni} || die
- echo " enable_freetype = true" >> ${freetype_gni} || die
- echo "}" >> ${freetype_gni} || die
-
- if use !custom-cflags; then
- replace-flags "-Os" "-O2"
- strip-flags
- # Debug info section overflows without component build
- # Prevent linker from running out of address space, bug #471810 .
- filter-flags "-g*"
- # 949123: Several multimedia components explicitly build with specific CFLAGS and
- # use runtime detection to enable optimisations; unfortunately any of our CFLAGS are suffixed
- # to the end of the command line, which causes build failures.
- use arm64 && filter-flags "-march*" "-mtune*" "-mcpu*"
- fi
-
- # We don't use the same clang version as upstream, and with -Werror
- # we need to make sure that we don't get superfluous warnings.
- append-flags -Wno-unknown-warning-option
- if tc-is-cross-compiler; then # can you cross-compile with the bundled toolchain?
- export BUILD_CXXFLAGS+=" -Wno-unknown-warning-option"
- export BUILD_CFLAGS+=" -Wno-unknown-warning-option"
- fi
-
- # Start building our GN options
- local myconf_gn=() # Tip: strings must be quoted, bools or numbers are fine
-
- if use !bundled-toolchain; then
- # We already forced the "correct" clang via pkg_setup
-
- if tc-is-cross-compiler; then
- CC="${CC} -target ${CHOST} --sysroot ${ESYSROOT}"
- CXX="${CXX} -target ${CHOST} --sysroot ${ESYSROOT}"
- BUILD_AR=${AR}
- BUILD_CC=${CC}
- BUILD_CXX=${CXX}
- BUILD_NM=${NM}
- fi
-
- # Make sure the build system will use the right tools, bug #340795.
- tc-export AR CC CXX NM
-
- strip-unsupported-flags
- append-ldflags -Wl,--undefined-version # https://bugs.gentoo.org/918897#c32
-
- myconf_gn+=(
- "is_clang=true"
- "clang_use_chrome_plugins=false"
- "use_clang_modules=false" # M141 enables this for the linux platform by default.
- "use_lld=true"
- 'custom_toolchain="//build/toolchain/linux/unbundle:default"'
- # From M127 we need to provide a location for libclang and the clang resource dir so that bindgen can find them
- "bindgen_libclang_path=\"$(get_llvm_prefix)/$(get_libdir)\""
- "bindgen_clang_resource_dir=\"${EPREFIX}/usr/lib/clang/${LLVM_SLOT}/include\""
- "bindgen_extra_clang_args=[\"-I${EPREFIX}/usr/lib/clang/${LLVM_SLOT}/include\"]"
- "clang_base_path=\"${EPREFIX}/usr/lib/clang/${LLVM_SLOT}/\""
- "rust_bindgen_root=\"${EPREFIX}/usr/\""
- "rust_sysroot_absolute=\"$(get_rust_prefix)\""
- "rustc_version=\"${RUST_SLOT}\""
- )
-
- if [[ ${LLVM_SLOT} -lt 23 ]]; then
- # Workaround for -fsanitize-ignore-for-ubsan-feature (added in LLVM 23)
- myconf_gn+=( 'clang_has_ubsan_feature_ignore=false' )
- fi
-
- if ! tc-is-cross-compiler; then
- myconf_gn+=( 'host_toolchain="//build/toolchain/linux/unbundle:default"' )
- else
- tc-export BUILD_{AR,CC,CXX,NM}
- myconf_gn+=(
- 'host_toolchain="//build/toolchain/linux/unbundle:host"'
- 'v8_snapshot_toolchain="//build/toolchain/linux/unbundle:host"'
- "host_pkg_config=\"$(tc-getBUILD_PKG_CONFIG)\""
- "pkg_config=\"$(tc-getPKG_CONFIG)\""
- )
-
- # setup cups-config, build system only uses --libs option
- if use cups; then
- mkdir "${T}/cups-config" || die
- cp "${ESYSROOT}/usr/bin/${CHOST}-cups-config" "${T}/cups-config/cups-config" || die
- export PATH="${PATH}:${T}/cups-config"
- fi
-
- # Don't inherit PKG_CONFIG_PATH from environment
- local -x PKG_CONFIG_PATH=
- fi
-
- fi # !bundled-toolchain
-
- local myarch
- myarch="$(tc-arch)"
- case ${myarch} in
- amd64)
- # Bug 530248, 544702, 546984, 853646.
- use !custom-cflags && filter-flags -mno-mmx -mno-sse2 -mno-ssse3 -mno-sse4.1 \
- -mno-avx -mno-avx2 -mno-fma -mno-fma4 -mno-xop -mno-sse4a
- myconf_gn+=( 'target_cpu="x64"' )
- ;;
- x86)
- # Bug 530248, 544702, 546984, 853646.
- use !custom-cflags && filter-flags -mno-mmx -mno-sse2 -mno-ssse3 -mno-sse4.1 \
- -mno-avx -mno-avx2 -mno-fma -mno-fma4 -mno-xop -mno-sse4a
- myconf_gn+=( 'target_cpu="x86"' )
- ;;
- arm64)
- myconf_gn+=( 'target_cpu="arm64"' )
- ;;
- ppc64)
- myconf_gn+=( 'target_cpu="ppc64"' )
- ;;
- *)
- die "Failed to determine target arch, got '${myarch}'."
- ;;
- esac
-
- # Common options
-
- myconf_gn+=(
- # Disable code formating of generated files
- "blink_enable_generated_code_formatting=false"
- # enable DCHECK with USE=debug only, increases chrome binary size by 30%, bug #811138.
- # DCHECK is fatal by default, make it configurable at runtime, #bug 807881.
- "dcheck_always_on=$(usex debug true false)"
- "dcheck_is_configurable=$(usex debug true false)"
- # Chromium builds provided by Linux distros should disable the testing config
- "disable_fieldtrial_testing_config=true"
- # Custom patch: Enable building Chromium as individual channels (e.g. stable, beta, dev) that
- # use different profile directories, desktop entries, etc. This enables slotting the ebuild.
- "enable_channel_branding=true"
- # 131 began laying the groundwork for replacing freetype with
- # "Rust-based Fontations set of libraries plus Skia path rendering"
- # We now need to opt-in
- "enable_freetype=true"
- "enable_hangout_services_extension=$(usex hangouts true false)"
- # Don't need nocompile checks and GN crashes with our config (verify with modern GN)
- "enable_nocompile_tests=false"
- # pseudolocales are only used for testing
- "enable_pseudolocales=false"
- "enable_widevine=$(usex widevine true false)"
- # Disable fatal linker warnings, bug 506268.
- "fatal_linker_warnings=false"
- # Component build isn't generally intended for use by end users. It's mostly useful
- # for development and debugging.
- "is_component_build=false"
- # GN needs explicit config for Debug/Release as opposed to inferring it from build directory.
- "is_debug=false"
- "is_official_build=$(usex official true false)"
- # Enable ozone wayland and/or headless support
- "ozone_auto_platforms=false"
- "ozone_platform_headless=true"
- # Enables building without non-free unRAR licence
- "safe_browsing_use_unrar=false"
- # "thin_lto_enable_optimizations=${use_lto}"
- "treat_warnings_as_errors=false"
- # Use in-tree libc++ (buildtools/third_party/libc++ and buildtools/third_party/libc++abi)
- # instead of the system C++ library for C++ standard library support.
- # default: true, but let's be explicit (forced since 120 ; USE removed 127).
- "use_custom_libcxx=true"
- # Enable ozone wayland and/or headless support
- "use_ozone=true"
- # The sysroot is the oldest debian image that chromium supports, we don't need it
- "use_sysroot=false"
- # See dependency logic in third_party/BUILD.gn
- "use_system_harfbuzz=$(usex system-harfbuzz true false)"
- # "use_thin_lto=${use_lto}"
- # Only enabled for clang, but gcc has endian macros too
- "v8_use_libm_trig_functions=true"
- )
-
- myconf_gn+=( "enable_iterator_debugging=$(usex debug true false)" )
-
- if use debug; then
- myconf_gn+=(
- "symbol_level=2"
- "blink_symbol_level=2"
- "v8_symbol_level=2"
- )
- else
- myconf_gn+=(
- "symbol_level=0"
- "blink_symbol_level=0"
- "v8_symbol_level=0"
- )
- fi
-
- if use bindist ; then
- myconf_gn+=(
- # If this is set to false Chromium won't be able to load any proprietary codecs
- # even if provided with an ffmpeg capable of h264/aac decoding
- "proprietary_codecs=true"
- 'ffmpeg_branding="Chrome"'
- # build ffmpeg as an external component (libffmpeg.so) that we can remove / substitute
- "is_component_ffmpeg=true"
- )
- else
- myconf_gn+=(
- "proprietary_codecs=$(usex proprietary-codecs true false)"
- "ffmpeg_branding=\"$(usex proprietary-codecs Chrome Chromium)\""
- )
- fi
-
- if use headless; then
- myconf_gn+=(
- "enable_print_preview=false"
- "enable_remoting=false"
- 'ozone_platform="headless"'
- "rtc_use_pipewire=false"
- "use_alsa=false"
- "use_cups=false"
- "use_gio=false"
- "use_glib=false"
- "use_gtk=false"
- "use_kerberos=false"
- "use_libpci=false"
- "use_pangocairo=false"
- "use_pulseaudio=false"
- "use_qt5=false"
- "use_qt6=false"
- "use_udev=false"
- "use_vaapi=false"
- "use_xkbcommon=false"
- )
- else
- myconf_gn+=(
- "gtk_version=$(usex gtk4 4 3)"
- # link pulseaudio directly (DT_NEEDED) instead of using dlopen.
- # helps with automated detection of ABI mismatches and prevents silent errors.
- "link_pulseaudio=$(usex pulseaudio true false)"
- "ozone_platform_wayland=$(usex wayland true false)"
- "ozone_platform_x11=$(usex X true false)"
- "ozone_platform=\"$(usex wayland wayland x11)\""
- "rtc_use_pipewire=$(usex screencast true false)"
- "use_cups=$(usex cups true false)"
- "use_kerberos=$(usex kerberos true false)"
- "use_pulseaudio=$(usex pulseaudio true false)"
- "use_qt5=false"
- "use_system_libffi=$(usex wayland true false)"
- "use_system_minigbm=true"
- "use_vaapi=$(usex vaapi true false)"
- "use_xkbcommon=true"
- )
- if use qt6; then
- local cbuild_libdir
- cbuild_libdir="$(get_libdir)"
- if tc-is-cross-compiler; then
- # Hack to workaround get_libdir not being able to handle CBUILD, bug #794181
- cbuild_libdir="$($(tc-getBUILD_PKG_CONFIG) --keep-system-libs --libs-only-L libxslt)"
- cbuild_libdir="${cbuild_libdir:2}"
- cbuild_libdir="${cbuild_libdir/% }"
- fi
- myconf_gn+=(
- "use_qt6=true"
- "moc_qt6_path=\"${EPREFIX}/usr/${cbuild_libdir}/qt6/libexec\""
- )
- else
- myconf_gn+=( "use_qt6=false" )
- fi
- fi
-
- # Explicitly disable ICU data file support for system-icu/headless builds.
- if use system-icu || use headless; then
- myconf_gn+=( "icu_use_data_file=false" )
- fi
-
- if use official; then
- # Allow building against system libraries in official builds
- sed -i 's/OFFICIAL_BUILD/GOOGLE_CHROME_BUILD/' \
- tools/generate_shim_headers/generate_shim_headers.py || die
- # Don't add symbols to build
- myconf_gn+=( "symbol_level=0" )
- fi
-
- if use pgo; then
- myconf_gn+=(
- "chrome_pgo_phase=2"
- "v8_enable_builtins_optimization=true"
- )
- else
- myconf_gn+=( "chrome_pgo_phase=0" )
- fi
-
- # Odds and ends
-
- # skipping typecheck is only supported on amd64, bug #876157
- if ! use amd64; then
- myconf_gn+=( "devtools_skip_typecheck=false" )
- fi
-
- # Disable external code space for V8 for ppc64. It is disabled for ppc64
- # by default, but cross-compiling on amd64 enables it again.
- if tc-is-cross-compiler && use ppc64; then
- myconf_gn+=( "v8_enable_external_code_space=false" )
- fi
-
- # This determines whether or not GN uses the bundled libcxx
- if use libcxx; then
- myconf_gn+=( "use_custom_libcxx=true" )
- else
- myconf_gn+=(
- "use_custom_libcxx=false"
- "use_llvm_libatomic=false"
- )
- append-cppflags -U_GLIBCXX_ASSERTIONS #See #318
- fi
-
- myconf_gn+=( "use_bluez=$(usex bluetooth true false)" )
-
- myconf_gn+=( "is_cfi=$(usex cfi true false)" )
-
- if use cfi; then
- myconf_gn+=(
- "use_cfi_icall=true"
- "use_cfi_cast=true"
- )
- fi
-
- myconf_gn+=(
- "optimize_webui=$(usex optimize-webui true false)"
- "use_system_freetype=$(usex system-harfbuzz true false)"
- "use_system_libopenjpeg2=$(usex system-openjpeg true false)"
- "enable_pdf=true"
- "use_system_lcms2=true"
- "enable_print_preview=true"
- "use_thin_lto=$(usex thinlto true false)"
- "thin_lto_enable_optimizations=$(usex optimize-thinlto true false)"
-
- # Ungoogled flags
- "build_with_tflite_lib=false"
- "enable_mdns=false"
- "enable_mse_mpeg2ts_stream_parser=$(usex proprietary-codecs true false)"
- "enable_remoting=false"
- "enable_reporting=false"
- "enable_service_discovery=false"
- "exclude_unwind_tables=true"
- "google_api_key=\"\""
- "google_default_client_id=\"\""
- "google_default_client_secret=\"\""
- "safe_browsing_mode=0"
- "use_official_google_api_keys=false"
- "use_unofficial_version_number=false"
-
- # "enable_swiftshader=false"
-
- # Additional flags
- # "perfetto_use_system_zlib=true"
- # "use_system_zlib=true"
- # "use_system_libjpeg=true"
- # "rtc_build_examples=false"
- # "enable_chromium_prelude=false"
- # "enable_updater=false"
- # "enable_update_notifications=false"
- # "enable_constraints=false"
- # "rtc_rusty_base64=false"
- # "v8_enable_temporal_support=false"
- # "media_use_symphonia=false"
- # "pdf_enable_rust_png=false"
- # "skia_use_libpng_encode=true"
- # "skia_use_libpng_decode=true"
- # "skia_use_rust_png_decode=false"
- # "skia_use_rust_png_encode=false"
- # "enable_jxl_decoder=false"
- )
-
- if use amd64 || use arm64; then
- myconf_gn+=(
- "v8_drumbrake_bounds_checks=true"
- # "v8_enable_drumbrake=true"
- )
- fi
-
- if use thinlto; then
- # We need to change the default value of import-instr-limit in
- # LLVM to limit the text size increase. The default value is
- # 100, and we change it to 30 to reduce the text size increase
- # from 25% to 10%. The performance number of page_cycler is the
- # same on two of the thinLTO configurations, we got 1% slowdown
- # on speedometer when changing import-instr-limit from 100 to 30.
- # append-ldflags "-Wl,-plugin-opt,-import-instr-limit=30"
- sed -i '/import_instr_limit = 5/{s++import_instr_limit = 30+;h};${x;/./{x;q0};x;q1}' \
- build/config/compiler/BUILD.gn || die
-
- append-ldflags "-Wl,--thinlto-jobs=$(makeopts_jobs)"
- fi
-
- # Facilitate deterministic builds (taken from build/config/compiler/BUILD.gn)
- append-cflags -Wno-builtin-macro-redefined
- append-cxxflags -Wno-builtin-macro-redefined
- append-cppflags "-D__DATE__= -D__TIME__= -D__TIMESTAMP__="
-
- local flags
- einfo "Building with the following compiler settings:"
- for flags in C{C,XX} AR NM RANLIB {C,CXX,CPP,LD}FLAGS \
- EXTRA_GN UGC_{SKIP_{PATCHES,SUBSTITUTION},KEEP_BINARIES} ; do
- einfo " ${flags} = \"${!flags}\""
- done
-
- # Since we build from tarballs, we need to set the channel here so that it can be used in the build.
- export CHROME_VERSION_EXTRA="${SLOT}"
-
- einfo "Configuring Chromium ..."
- set -- gn gen --args="${myconf_gn[*]}${EXTRA_GN:+ ${EXTRA_GN}}" out/Release
- echo "$@"
- "$@" || die "Failed to configure Chromium"
-
- # The "if" below should not be executed unless testing
- if [ ! -z "${NODIE}" ]; then
- # List all args
- # gn args --list out/Release
-
- # Quick compiler check
- eninja -C out/Release protoc torque
- fi
-}
-
-src_compile() {
- # Final link uses lots of file descriptors.
- ulimit -n 2048
-
- # Calling this here supports resumption via FEATURES=keepwork
- python_setup
-
- # I hate doing this but upstream Rust have yet to come up with a better solution for
- # us poor packagers. Required for Split LTO units, which are required for CFI.
- export RUSTC_BOOTSTRAP=1
-
- # Don't inherit PYTHONPATH from environment, bug #789021, #812689
- local -x PYTHONPATH=
-
- # Build mksnapshot and pax-mark it.
- if use pax-kernel; then
- local x
- for x in mksnapshot v8_context_snapshot_generator code_cache_generator; do
- if tc-is-cross-compiler; then
- eninja -C out/Release "host/${x}"
- pax-mark m "out/Release/host/${x}"
- else
- eninja -C out/Release "${x}"
- pax-mark m "out/Release/${x}"
- fi
- done
- fi
-
- # Even though ninja autodetects number of CPUs, we respect
- # user's options, for debugging with -j 1 or any other reason.
- eninja -C out/Release chrome chrome_sandbox $(use test && echo "base_unittests")
-
- pax-mark m out/Release/chrome
-
- # This codepath does minimal patching, so we're at the mercy of upstream
- # CFLAGS. This is fine - we're not intending to force this on users
- # and we do a lot of flag 'management' anyway.
- if use bundled-toolchain; then
- QA_FLAGS_IGNORED="
- usr/lib64/chromium-browser/chrome
- usr/lib64/chromium-browser/chrome-sandbox
- usr/lib64/chromium-browser/chromedriver
- usr/lib64/chromium-browser/chrome_crashpad_handler
- usr/lib64/chromium-browser/libEGL.so
- usr/lib64/chromium-browser/libGLESv2.so
- usr/lib64/chromium-browser/libVkICD_mock_icd.so
- usr/lib64/chromium-browser/libVkLayer_khronos_validation.so
- usr/lib64/chromium-browser/libqt6_shim.so
- usr/lib64/chromium-browser/libvk_swiftshader.so
- usr/lib64/chromium-browser/libvulkan.so.1
- "
- fi
-
- use convert-dict && eninja -C out/Release convert_dict
-
- use enable-driver && eninja -C out/Release chromedriver
- #use suid && eninja -C out/Release chrome_sandbox
-
- use enable-driver && mv out/Release/chromedriver{.unstripped,}
-
- rm -f out/Release/locales/*.pak.info || die
-
- # Generate support files (desktop file, manpage, etc.) See: #684550 #706786 #968958
- ${EPYTHON} "${FILESDIR}/generate-support-files.py" \
- --installdir "/usr/$(get_libdir)/ungoogled-chromium-browser" \
- --channel "${SLOT}" ||
- die "Failed to generate support files"
-}
-
-src_test() {
- # Tests may be flaky with usersandbox, and the test runner executes significantly faster without.
- # If you seem to be excluding too many tests for a particular milestone: comment them out, reboot, and
- # run the tests again. If that doesn't help, try FEATURES="-usersandbox" and send it because obviously the
- # chromium gods are not smiling upon you today. Do some runtime testing, obvs.
- local skip_tests=(
- # Wildcard exclusions (if all tests in a test suite are broken)
- 'AlternateTestParams/PartitionAllocDeathTest.RepeatedAllocReturnNullDirect/*'
- 'AlternateTestParams/PartitionAllocDeathTest.RepeatedReallocReturnNullDirect/*'
- 'AlternateTestParams/PartitionAllocTest.*' # 200+ tests, >= 1 crashes entire test runner with usersandbox.
- 'CheckExitCodeAfterSignalHandlerDeathTest.*'
- 'CriticalProcessAndThreadSpotChecks/HangWatcherAnyCriticalThreadTests.*'
- 'LazyThreadPoolTaskRunnerEnvironmentTest.*' # M142
- 'ToolsSanityTest.BadVirtualCall*'
- # requires en-us locale
- SysStrings.SysNativeMBAndWide
- SysStrings.SysNativeMBToWide
- SysStrings.SysWideToNativeMB
- # Specific test cases
- CancelableEventTest.BothCancelFailureAndSucceedOccurUnderContention
- FilePathTest.FromUTF8Unsafe_And_AsUTF8Unsafe
- HistogramTesterTest.PumaTestUniqueSample
- PathServiceTest.CheckedGetFailure
- PlatformThreadTest.CanChangeThreadType
- RawPtrTest.SetLookupUsesGetForComparison # M146 ; also broken for alpine in M144.
- RustLogIntegrationTest.CheckAllSeverity
- StackCanary.ChangingStackCanaryCrashesOnReturn
- StackTraceDeathTest.StackDumpSignalHandlerIsMallocFree
- TestLauncherTools.TruncateSnippetFocusedMatchesFatalMessagesTest
- ThreadPoolEnvironmentConfig.CanUseBackgroundPriorityForWorker
- )
- local test_filter="-$(IFS=:; printf '%s' "${skip_tests[*]}")"
- # test-launcher-bot-mode enables parallelism and plain output
- # Check individual tests with --gtest_filter=<test you want> --single-process-tests
- ./out/Release/base_unittests --test-launcher-bot-mode \
- --test-launcher-jobs="$(get_makeopts_jobs)" \
- --gtest_filter="${test_filter}" || die "Tests failed!"
-}
-
-src_install() {
- local browser_suffix
- if [[ "${SLOT}" != "stable" ]]; then
- browser_suffix="-${SLOT}"
- else
- browser_suffix=""
- fi
- local CHROMIUM_HOME="/usr/$(get_libdir)/ungoogled-chromium-browser${browser_suffix}"
- exeinto "${CHROMIUM_HOME}"
- doexe out/Release/chrome
-
- #newexe out/Release/chrome_sandbox chrome-sandbox
- #fperms 4755 "${CHROMIUM_HOME}/chrome-sandbox"
-
- use enable-driver && doexe out/Release/chromedriver
-
- #* https://github.com/ungoogled-software/ungoogled-chromium/pull/3563
- doexe out/Release/chrome_crashpad_handler
-
- if use convert-dict; then
- newexe "${FILESDIR}/update-dicts.sh" update-dicts.sh
- doexe out/Release/convert_dict
- fi
-
- ozone_auto_session () {
- use X && use wayland && ! use headless && echo true || echo false
- }
-
- cat <<- EOF > "${D}${CHROMIUM_HOME}/chromium-launcher.sh" || die
- #!/bin/bash
- # Wrapper to launch slotted Chromium via the chromium-common launcher script.
- export CHROME_DESKTOP="ungoogled-chromium-browser${browser_suffix}.desktop"
- export CHROME_EXEC_NAME="ungoogled-chromium-browser${browser_suffix}"
- export CHROME_VERSION_EXTRA="${SLOT}"
- export CHROME_WRAPPER="\$(readlink -f "\$0")"
- export OZONE_AUTO_SESSION=$(ozone_auto_session)
-
- exec /usr/libexec/chromium/chromium-launcher.sh "\$@"
- EOF
-
- chmod 755 "${D}${CHROMIUM_HOME}/chromium-launcher.sh" || die
-
- # It is important that we name the target "chromium-browser",
- # xdg-utils expect it; bug #355517.
- dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/ungoogled-chromium-browser${browser_suffix}
- # keep the old symlink around for consistency
- dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/ungoogled-chromium${browser_suffix}
-
- use enable-driver && dosym "${CHROMIUM_HOME}/chromedriver" /usr/bin/ungoogled-chromedriver${browser_suffix}
-
- pushd out/Release/locales > /dev/null || die
- chromium_remove_language_paks
- popd > /dev/null || die
-
- insinto "${CHROMIUM_HOME}"
- doins out/Release/*.bin
- doins out/Release/*.pak
- doins -r out/Release/hyphen-data
-
- if use bindist; then
- # We built libffmpeg as a component library, but we can't distribute it
- # with proprietary codec support. Remove it and make a symlink to the requested
- # system library.
- rm -f out/Release/libffmpeg.so \
- || die "Failed to remove bundled libffmpeg.so (with proprietary codecs)"
- # symlink the libffmpeg.so from either ffmpeg-chromium or ffmpeg[chromium].
- einfo "Creating symlink to libffmpeg.so from $(usex ffmpeg-chromium ffmpeg-chromium ffmpeg[chromium])..."
- dosym ../chromium/libffmpeg.so$(usex ffmpeg-chromium .${PV%%\.*} "") \
- /usr/$(get_libdir)/ungoogled-chromium-browser/libffmpeg.so
- fi
-
- (
- shopt -s nullglob
- local files=(out/Release/*.so out/Release/*.so.[0-9])
- [[ ${#files[@]} -gt 0 ]] && doins "${files[@]}"
- )
-
- if ! use system-icu && ! use headless; then
- doins out/Release/icudtl.dat
- fi
-
- doins -r out/Release/locales
- #doins -r out/Release/MEIPreload
-
- # Install vk_swiftshader_icd.json; bug #827861
- doins out/Release/vk_swiftshader_icd.json
-
- if [[ -d out/Release/swiftshader ]]; then
- insinto "${CHROMIUM_HOME}/swiftshader"
- doins out/Release/swiftshader/*.so
- fi
-
- use widevine && dosym WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so "${CHROMIUM_HOME}/libwidevinecdm.so"
-
- # Install icons
- local branding size
- for size in 16 24 32 48 64 128 256 ; do
- case ${size} in
- 16|32) branding="chrome/app/theme/default_100_percent/chromium" ;;
- *) branding="chrome/app/theme/chromium" ;;
- esac
- newicon -s ${size} "${branding}/product_logo_${size}.png" \
- ungoogled-chromium-browser${browser_suffix}.png
- done
-
- # Install desktop entry
- domenu out/Release/ungoogled-chromium-browser${browser_suffix}.desktop
-
- # Install GNOME default application entry (bug #303100).
- insinto /usr/share/gnome-control-center/default-apps
- doins out/Release/ungoogled-chromium-browser${browser_suffix}.xml
-
- # Install AppStream metadata
- insinto /usr/share/appdata
- doins out/Release/ungoogled-chromium-browser${browser_suffix}.appdata.xml
-
- # Install manpage; bug #684550
- doman out/Release/ungoogled-chromium-browser${browser_suffix}.1
- dosym ungoogled-chromium-browser${browser_suffix}.1 /usr/share/man/man1/ungoogled-chromium${browser_suffix}.1
-
- readme.gentoo_create_doc
-}
-
-pkg_postrm() {
- xdg_icon_cache_update
- xdg_desktop_database_update
-}
-
-pkg_postinst() {
- xdg_icon_cache_update
- xdg_desktop_database_update
- readme.gentoo_print_elog
-
- if use !headless && [[ -z "${REPLACING_VERSIONS}" ]]; then
- if use vaapi; then
- elog "Hardware-accelerated video decoding configuration:"
- elog
- elog "Chromium supports multiple backends for hardware acceleration. To enable one,"
- elog " Add to CHROMIUM_FLAGS in /etc/chromium/default:"
- elog
- elog "1. VA-API with OpenGL (recommended for most users):"
- elog " --enable-features=AcceleratedVideoDecodeLinuxGL"
- elog " VaapiVideoDecoder may need to be added as well, but try without first."
- elog
- if use wayland; then
- elog "2. Enhanced Wayland/EGL performance:"
- elog " --enable-features=AcceleratedVideoDecodeLinuxGL,AcceleratedVideoDecodeLinuxZeroCopyGL"
- elog
- fi
- if use X; then
- elog "$(usex wayland "3" "2"). VA-API with Vulkan:"
- elog " --enable-features=VaapiVideoDecoder,VaapiIgnoreDriverChecks,Vulkan,DefaultANGLEVulkan,VulkanFromANGLE"
- elog
- if use wayland; then
- elog " NOTE: Vulkan acceleration requires X11 and will not work under Wayland sessions."
- elog " Use OpenGL-based acceleration instead when running under Wayland."
- elog
- fi
- fi
- elog "Additional options:"
- elog " To enable hardware-accelerated encoding (if supported)"
- elog " add 'AcceleratedVideoEncoder' to your feature list"
- elog " VaapiIgnoreDriverChecks bypasses driver compatibility checks"
- elog " (may be needed for newer/unsupported hardware)"
- elog
- else
- elog "This Chromium build was compiled without VA-API support, which provides"
- elog "hardware-accelerated video decoding."
- fi
- if use screencast; then
- elog "Screencast is disabled by default at runtime. Either enable it"
- elog "by navigating to chrome://flags/#enable-webrtc-pipewire-capturer"
- elog "inside Chromium or add --enable-features=WebRTCPipeWireCapturer"
- elog "to CHROMIUM_FLAGS in /etc/chromium/default."
- elog
- elog "Additional setup may be required for screencasting to work."
- elog "See issue: https://github.com/PF4Public/gentoo-overlay/issues/314"
- fi
- if use gtk4; then
- elog "Chromium prefers GTK3 over GTK4 at runtime. To override this"
- elog "behaviour you need to pass --gtk-version=4, e.g. by adding it"
- elog "to CHROMIUM_FLAGS in /etc/chromium/default."
- fi
- if use widevine; then
- elog "widevine requires binary plugins, which are distributed separately"
- elog "Make sure you have www-plugins/chrome-binary-plugins installed"
- fi
- fi
-
- if systemd_is_booted && ! [[ -f "/etc/machine-id" ]]; then
- ewarn "The lack of an '/etc/machine-id' file on this system booted with systemd"
- ewarn "indicates that the Gentoo handbook was not followed to completion."
- ewarn ""
- ewarn "Chromium is known to behave unpredictably with this system configuration;"
- ewarn "please complete the configuration of this system before logging any bugs."
- fi
-
- # Stable slot doesn't change profile directory, and it's vanishingly unlikely that users will downgrade from dev.
- if [[ -n "${REPLACING_VERSIONS}" ]]; then
- local replacing_non_slotted=false
- # there could be more than one PVR
- for version in ${REPLACING_VERSIONS}; do
- if ver_test "${version}" -le "145.0.7632.116"; then
- replacing_non_slotted=true
- break
- fi
- done
- if ${replacing_non_slotted}; then
- ewarn "This version of Chromium has replaced a non-slotted ebuild."
- if [[ ${SLOT} != "stable" ]]; then
- ewarn "This channel has its own profile directory, so your existing profile will not be used."
- ewarn "To use your existing profile, either copy or move it to the new location."
- ewarn "See https://wiki.gentoo.org/wiki/Chromium#Profile_Directories for more information."
- ewarn ""
- fi
- ewarn "Any existing Progressive Web Apps (PWAs) will need to be reinstalled,"
- ewarn "or have the path in the desktop files updated to point to the new wrapper script."
- fi
- fi
-}
-
-eapply_wrapper () {
- if [ ! -z "${NODIE}" ]; then
- nonfatal eapply "$@"
- else
- eapply "$@"
- fi
-}
-
-git_wrapper () {
- if [ ! -z "${NODIE}" ]; then
- git "$@"
- else
- git "$@" || die
- fi
-}
-
-filter_wrapper () {
- einfo "Applying ${i##*/}"
- #? fuzz factor of 3 is OK?
- if [ ! -z "${NODIE}" ]; then
- filterdiff -p1 "${@:2}" < "$1" | patch -F 3 -p1
- else
- filterdiff -p1 "${@:2}" < "$1" | patch -F 3 -p1 || die
- fi
-}
diff --git a/www-client/ungoogled-chromium/ungoogled-chromium-149.0.7827.196_p1.ebuild b/www-client/ungoogled-chromium/ungoogled-chromium-149.0.7827.196_p1.ebuild
deleted file mode 100644
index 176352631410..000000000000
--- a/www-client/ungoogled-chromium/ungoogled-chromium-149.0.7827.196_p1.ebuild
+++ /dev/null
@@ -1,2512 +0,0 @@
-# Copyright 2009-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-# Use following environment variables to customise the build
-# EXTRA_GN — pass extra options to gn
-# NINJAOPTS="-k0 -j8" useful to populate ccache even if ebuild is still failing
-# UGC_SKIP_PATCHES — space-separated list of patches to skip
-# UGC_KEEP_BINARIES — space-separated list of binaries to keep
-# UGC_SKIP_SUBSTITUTION — space-separated list of files to skip domain substitution
-
-# USE=bundled-toolchain is intended for users who want to use the same toolchain
-# as the upstream releases. It's also a good fallback in case we fall behind
-# and need to get a release out quickly (less likely with `dev` in-tree).
-# We can't rely on it as a default since the toolchain is only shipped for x86-64;
-# other architectures will need to use system toolchain.
-
-# Since m133 we are using CI-generated tarballs from
-# https://github.com/chromium-linux-tarballs/chromium-tarballs/
-
-# These are bit-for-bit identical to the official releases, but are built
-# using an external CI system that we have some control over, in case
-# issues pop up again with official tarball generation.
-
-GN_MIN_VER=0.2374
-# chromium-tools/get-chromium-toolchain-strings.py (or just use Chromicler)
-# Node for M145+ should be 24.12.0 but that's not packaged in Gentoo yet. See #969145
-TEST_FONT="9c07d19d9c5ee1ff94f717e6fb17e0c8c354e6f9"
-BUNDLED_CLANG_VER="llvmorg-23-init-10931-g20b6ec66-8"
-BUNDLED_RUST_VER="4c4205163abcbd08948b3efab796c543ba1ea687-2"
-RUST_SHORT_HASH=${BUNDLED_RUST_VER:0:10}-${BUNDLED_RUST_VER##*-}
-NODE_VER="24.12.0"
-ESBUILD_VER="0.25.1"
-ROLLUP_VER="4.57.1" # currently manual.
-
-CHROMIUM_LANGS="af am ar as az be bg bn bs ca cs cy da de el en-GB es es-419 et eu fa fi fil
- fr fr-CA gl gu he hi hr hu hy id is it ja ka kk km kn ko ky lo lt lv mk ml mn mr ms my
- nb ne nl or pa pl pt-BR pt-PT ro ru si sk sl sq sr sr-Latn sv sw ta te th tr uk ur uz
- vi zh-CN zh-HK zh-TW zu"
-
-#UGC_COMMIT_ID="3c92902a6cb95e7384ec6b4b6e123142e87242c6"
-# UGC_PR_COMMITS=(
-# c917e096342e5b90eeea91ab1f8516447c8756cf
-# 5794e9d12bf82620d5f24505798fecb45ca5a22d
-# )
-
-CROMITE_COMMIT_ID="cb3baf14f52eb4365d017f640f85310735c19b79"
-
-#declare -A CHROMIUM_COMMITS=(
-# ["fcfb1a42813f1e9d8babedc7bb2e0f06101a3151"]="." #148+
-# ["-acb47d9a6b56c4889a2ed4216e9968cfc740086c"]="."
-# # ["-37c28a19804e47a68eabf3cf882a310689fc325b"]="." #disable style check for cromite
-# # ["cd5a0df905a28faa89ff2a4ab44f893f84dc4487"]="net/third_party/quiche/src"
-#)
-
-LLVM_COMPAT=( 21 22 23 )
-PYTHON_COMPAT=( python3_{13..14} )
-PYTHON_REQ_USE="xml(+)"
-RUST_MIN_VER=1.91.0
-RUST_NEEDS_LLVM="yes please"
-RUST_OPTIONAL="yes" # Not actually optional, but we don't need system Rust (or LLVM) with USE=bundled-toolchain
-RUST_REQ_USE="rustfmt" # Upstream run rustfmt on bindgen output, so we need it to be available.
-
-inherit check-reqs chromium-2 desktop flag-o-matic llvm-r1 multiprocessing ninja-utils pax-utils
-inherit python-any-r1 readme.gentoo-r1 rust systemd toolchain-funcs xdg-utils
-
-DESCRIPTION="Modifications to Chromium for removing Google integration and enhancing privacy"
-HOMEPAGE="https://github.com/ungoogled-software/ungoogled-chromium"
-PPC64_HASH="a85b64f07b489b8c6fdb13ecf79c16c56c560fc6"
-PATCH_V="${PV%%\.*}-2"
-COPIUM_COMMIT="b00f26bb5e0781020da5f830981472a142c6baf1"
-SRC_URI="https://github.com/chromium-linux-tarballs/chromium-tarballs/releases/download/${PV/_*}/chromium-${PV/_*}-linux.tar.xz
- https://deps.gentoo.zip/www-client/chromium/rollup-wasm-node-${ROLLUP_VER}.tgz
- https://gitlab.com/Matt.Jolly/chromium-patches/-/archive/${PATCH_V}/chromium-patches-${PATCH_V}.tar.bz2
- !bundled-toolchain? (
- https://codeberg.org/selfisekai/copium/archive/${COPIUM_COMMIT}.tar.gz
- -> chromium-patches-copium-${COPIUM_COMMIT:0:10}.tar.gz
- )
- bundled-toolchain? (
- https://commondatastorage.googleapis.com/chromium-browser-clang/Linux_x64/clang-${BUNDLED_CLANG_VER}.tar.xz
- -> chromium-clang-${BUNDLED_CLANG_VER}.tar.xz
- https://commondatastorage.googleapis.com/chromium-browser-clang/Linux_x64/rust-toolchain-${BUNDLED_RUST_VER}-${BUNDLED_CLANG_VER%-*}.tar.xz
- -> chromium-rust-toolchain-${RUST_SHORT_HASH}-${BUNDLED_CLANG_VER%-*}.tar.xz
- )
- test? (
- https://chromium-fonts.storage.googleapis.com/${TEST_FONT} -> chromium-testfonts-${TEST_FONT:0:10}.tar.gz
- )
- ppc64? (
- https://gitlab.raptorengineering.com/raptor-engineering-public/chromium/openpower-patches/-/archive/${PPC64_HASH}/openpower-patches-${PPC64_HASH}.tar.bz2 -> chromium-openpower-${PPC64_HASH:0:10}.tar.bz2
- )
-"
-
-# Gentoo tarball:
-# https://chromium-tarballs.distfiles.gentoo.org/chromium-${PV/_*}.tar.xz -> chromium-${PV/_*}-gentoo.tar.xz
-
-# chromium-linux-tarballs
-# https://github.com/chromium-linux-tarballs/chromium-tarballs/releases/download/${PV/_*}/chromium-${PV/_*}-linux.tar.xz
-
-# Official tarball:
-# https://commondatastorage.googleapis.com/chromium-browser-official/chromium-${PV/_*}${LITE_TARBALL:+-lite}.tar.xz
-
-# https://gitweb.gentoo.org/proj/chromium-tools.git/tree/get-chromium-licences.py @ 145.0.7632.76
-LICENSE="Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD BSD-2 Base64 Boost-1.0 CC-BY-3.0 CC-BY-4.0 Clear-BSD FFT2D FTL"
-LICENSE+=" IJG ISC LGPL-2 LGPL-2.1 MIT MPL-1.1 MPL-2.0 Ms-PL PSF-2 SGI-B-2.0 SSLeay SunSoft Unicode-3.0"
-LICENSE+=" Unicode-DFS-2015 Unlicense UoI-NCSA ZLIB libtiff openssl"
-LICENSE+=" cromite? ( GPL-3 )"
-
-SLOT="stable"
-KEYWORDS="amd64 ~arm64 ~ppc64 ~x86"
-
-IUSE_SYSTEM_LIBS="abseil-cpp av1 brotli crc32c double-conversion ffmpeg +harfbuzz icu jsoncpp +libusb libvpx +openh264 openjpeg re2 snappy woff2 +zstd"
-IUSE="+X bindist bluetooth bundled-toolchain cfi convert-dict cups custom-cflags debug ffmpeg-chromium enable-driver gtk4 hangouts headless kerberos +libcxx nvidia +official optimize-thinlto optimize-webui override-data-dir pax-kernel pgo"
-IUSE+=" +proprietary-codecs pulseaudio qt6 screencast selinux test thinlto cromite vaapi wayland widevine cpu_flags_ppc_vsx3"
-RESTRICT="
- !bindist? ( bindist )
- !test? ( test )
- arm64? ( test )
- !system-ffmpeg? ( proprietary-codecs? ( bindist ) )
- !system-openh264? ( bindist )
- cromite? ( bindist )"
-
-REQUIRED_USE="
- !headless? ( || ( X wayland ) )
- screencast? ( wayland )
- ffmpeg-chromium? ( bindist proprietary-codecs )
- optimize-thinlto? ( thinlto )
- cfi? ( thinlto )
- x86? ( !thinlto !widevine )
- debug? ( !official )
- vaapi? ( !system-av1 !system-libvpx )
-"
-
-UGC_PV="${PV/_p/-}"
-UGC_PF="${PN}-${UGC_PV}"
-UGC_URL="https://github.com/ungoogled-software/${PN}/archive/"
-
-if [ -z "$UGC_COMMIT_ID" ]; then
- UGC_URL="${UGC_URL}${UGC_PV}.tar.gz -> ${UGC_PF}.tar.gz"
- UGC_WD="${WORKDIR}/${UGC_PF}"
-else
- UGC_URL="${UGC_URL}${UGC_COMMIT_ID}.tar.gz -> ${PN}-${UGC_COMMIT_ID}.tar.gz"
- UGC_WD="${WORKDIR}/ungoogled-chromium-${UGC_COMMIT_ID}"
-fi
-
-SRC_URI+="${UGC_URL}
-"
-
-if [ ! -z "${UGC_PR_COMMITS[*]}" ]; then
- for i in "${UGC_PR_COMMITS[@]}"; do
- SRC_URI+="https://github.com/ungoogled-software/${PN}/commit/$i.patch?full_index=true -> ${PN}-$i.patch
- "
- done
-fi
-
-if [ ! -z "${CHROMIUM_COMMITS[*]}" ]; then
- # for i in "${CHROMIUM_COMMITS[@]}"; do
- for i in "${!CHROMIUM_COMMITS[@]}"; do
- if [[ ${CHROMIUM_COMMITS[$i]} =~ webrtc ]]; then
- #TODO: is it safe to use this mirror?
- SRC_URI+="https://github.com/webrtc-mirror/webrtc/commit/${i/-}.patch?full_index=true -> webrtc-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ angle ]]; then
- SRC_URI+="https://github.com/google/angle/commit/${i/-}.patch?full_index=true -> angle-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ quiche ]]; then
- SRC_URI+="https://github.com/google/quiche/commit/${i/-}.patch?full_index=true -> quiche-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ dawn ]]; then
- SRC_URI+="https://github.com/google/dawn/commit/${i/-}.patch?full_index=true -> dawn-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ perfetto ]]; then
- SRC_URI+="https://github.com/google/perfetto/commit/${i/-}.patch?full_index=true -> perfetto-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ink ]]; then
- SRC_URI+="https://github.com/google/ink/commit/${i/-}.patch?full_index=true -> ink-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ vulkan-utility-libraries ]]; then
- SRC_URI+="https://github.com/KhronosGroup/Vulkan-Utility-Libraries/commit/${i/-}.patch?full_index=true -> vulkan-utility-libraries-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ruy ]]; then
- SRC_URI+="https://github.com/google/ruy/commit/${i/-}.patch?full_index=true -> ruy-${i/-}.patch
- "
- else
- SRC_URI+="https://github.com/chromium/chromium/commit/${i/-}.patch?full_index=true -> chromium-${i/-}.patch
- "
- fi
- done
-fi
-
-SRC_URI+="cromite? ( https://github.com/uazo/cromite/archive/${CROMITE_COMMIT_ID}.tar.gz -> cromite-${CROMITE_COMMIT_ID}.tar.gz )
-"
-
-for i in ${IUSE_SYSTEM_LIBS}; do
- [[ $i =~ ^(\+)?(.*)$ ]]
- IUSE+=" ${BASH_REMATCH[1]}system-${BASH_REMATCH[2]}"
-done
-
-COMMON_X_DEPEND="
- x11-libs/libXcomposite:=
- x11-libs/libXcursor:=
- x11-libs/libXdamage:=
- x11-libs/libXfixes:=
- >=x11-libs/libXi-1.6.0:=
- x11-libs/libXrandr:=
- x11-libs/libXrender:=
- x11-libs/libXtst:=
- x11-libs/libxshmfence:=
-"
-
-# sys-libs/zlib: https://bugs.gentoo.org/930365; -ng is not compatible.
-# We _could_ use the bundled minizip, but that's against policy.
-COMMON_SNAPSHOT_DEPEND="
- system-icu? ( >=dev-libs/icu-78:= )
- system-abseil-cpp? ( >=dev-cpp/abseil-cpp-20260107.0 )
- system-brotli? ( >=app-arch/brotli-9999 )
- system-crc32c? ( dev-libs/crc32c )
- system-double-conversion? ( dev-libs/double-conversion )
- system-woff2? ( media-libs/woff2 )
- system-snappy? ( app-arch/snappy )
- system-jsoncpp? ( dev-libs/jsoncpp )
- system-openjpeg? ( media-libs/openjpeg:2= )
- system-re2? ( >=dev-libs/re2-0.2019.08.01:= )
- system-libvpx? ( >=media-libs/libvpx-1.13.0:=[postproc] )
- system-libusb? ( virtual/libusb:1 )
- cromite? ( dev-util/patchutils )
- >=dev-libs/libxml2-2.12.4:=[icu]
- dev-libs/nspr:=
- >=dev-libs/nss-3.26:=
- dev-libs/libxslt:=
- media-libs/fontconfig:=
- >=media-libs/freetype-2.11.0-r1:=
- system-harfbuzz? ( >=media-libs/harfbuzz-3:0=[icu(-)] )
- media-libs/libjpeg-turbo:=
- media-libs/libpng:=
- system-zstd? ( >=app-arch/zstd-1.5.5:= )
- >=media-libs/libwebp-0.4.0:=
- media-libs/mesa:=[gbm(+)]
- >=media-libs/openh264-2.6.0:=
- system-av1? (
- >=media-libs/dav1d-1.0.0:=
- >=media-libs/libaom-3.7.0:=
- )
- sys-libs/zlib:=
- !headless? (
- dev-libs/glib:2
- >=media-libs/alsa-lib-1.0.19:=
- pulseaudio? (
- || (
- media-libs/libpulse
- >=media-sound/apulse-0.1.9
- )
- )
- sys-apps/pciutils:=
- kerberos? ( virtual/krb5 )
- vaapi? ( >=media-libs/libva-2.7:=[X?,wayland?] )
- X? (
- x11-base/xorg-proto:=
- x11-libs/libX11:=
- x11-libs/libxcb:=
- x11-libs/libXext:=
- )
- x11-libs/libxkbcommon:=
- wayland? (
- dev-libs/libffi:=
- dev-libs/wayland:=
- screencast? (
- media-video/pipewire:=
- || (
- sys-apps/xdg-desktop-portal-gnome
- sys-apps/xdg-desktop-portal-gtk
- kde-plasma/xdg-desktop-portal-kde
- gui-libs/xdg-desktop-portal-lxqt
- gui-libs/xdg-desktop-portal-wlr
- )
- )
- )
- )
-"
-
-COMMON_DEPEND="
- ${COMMON_SNAPSHOT_DEPEND}
- app-arch/bzip2:=
- dev-libs/expat:=
- system-ffmpeg? (
- >=media-video/ffmpeg-6.1:=
- >=media-libs/opus-1.3.1:=
- )
- net-misc/curl[ssl]
- sys-apps/dbus:=
- media-libs/flac:=
- sys-libs/zlib:=[minizip]
- !headless? (
- >=app-accessibility/at-spi2-core-2.46.0:2
- media-libs/mesa:=[X?,wayland?]
- virtual/udev
- x11-libs/cairo:=
- x11-libs/gdk-pixbuf:2
- x11-libs/pango:=
- cups? ( >=net-print/cups-1.3.11:= )
- qt6? ( dev-qt/qtbase:6[gui,widgets] )
- X? ( ${COMMON_X_DEPEND} )
- )
-"
-RDEPEND="${COMMON_DEPEND}
- !www-client/ungoogled-chromium:0
- >=www-client/chromium-common-2
- !headless? (
- || (
- x11-libs/gtk+:3[X?,wayland?]
- gui-libs/gtk:4[X?,wayland?]
- )
- qt6? ( dev-qt/qtbase:6[X?,wayland?] )
- )
- virtual/ttf-fonts
- selinux? ( sec-policy/selinux-chromium )
- bindist? (
- ffmpeg-chromium? ( media-video/ffmpeg-chromium:${PV%%\.*} )
- )
- !override-data-dir? (
- !www-client/chromium:${SLOT}
- !www-client/cromite:${SLOT}[-override-data-dir]
- )
-"
-
-DEPEND="${COMMON_DEPEND}
- !headless? (
- gtk4? ( gui-libs/gtk:4[X?,wayland?] )
- !gtk4? ( x11-libs/gtk+:3[X?,wayland?] )
- )
-"
-
- # pgo? ( >=llvm-core/clang-22.0.0_pre20260106 >=llvm-core/lld-22.0.0_pre20260106 )
-BDEPEND="
- ${COMMON_SNAPSHOT_DEPEND}
- ${PYTHON_DEPS}
- $(python_gen_any_dep '
- dev-python/setuptools[${PYTHON_USEDEP}]
- ')
- >=app-arch/gzip-1.7
- !headless? (
- qt6? ( dev-qt/qtbase:6 )
- )
- !bundled-toolchain? ( $(llvm_gen_dep '
- llvm-core/clang:${LLVM_SLOT}
- llvm-core/llvm:${LLVM_SLOT}
- llvm-core/lld:${LLVM_SLOT}
- cfi? ( llvm-runtimes/clang-runtime:${LLVM_SLOT}[sanitize] )
- official? (
- !ppc64? ( llvm-runtimes/compiler-rt-sanitizers:${LLVM_SLOT}[cfi] )
- ) ')
- ${RUST_DEPEND}
- )
- >=dev-util/bindgen-0.72.1
- >=dev-build/gn-${GN_MIN_VER}
- app-alternatives/ninja
- dev-lang/perl
- >=dev-util/gperf-3.2
- dev-util/esbuild:${ESBUILD_VER}
- dev-vcs/git
- >=net-libs/nodejs-${NODE_VER}[inspector]
- sys-apps/hwdata
- >=sys-devel/bison-2.4.3
- sys-devel/flex
- virtual/pkgconfig
- x11-misc/xdg-utils
-"
-
-if ! has chromium_pkg_die ${EBUILD_DEATH_HOOKS}; then
- EBUILD_DEATH_HOOKS+=" chromium_pkg_die";
-fi
-
-DISABLE_AUTOFORMATTING="yes"
-DOC_CONTENTS="
-Some web pages may require additional fonts to display properly.
-Try installing some of the following packages if some characters
-are not displayed properly:
-- media-fonts/arphicfonts
-- media-fonts/droid
-- media-fonts/ipamonafont
-- media-fonts/noto
-- media-fonts/ja-ipafonts
-- media-fonts/takao-fonts
-- media-fonts/wqy-microhei
-- media-fonts/wqy-zenhei
-
-To fix broken icons on the Downloads page, you should install an icon
-theme that covers the appropriate MIME types, and configure this as your
-GTK+ icon theme.
-
-For native file dialogs in KDE, install kde-apps/kdialog.
-
-To make password storage work with your desktop environment you may
-have install one of the supported credentials management applications:
-- app-crypt/libsecret (GNOME)
-- kde-frameworks/kwallet (KDE)
-If you have one of above packages installed, but don't want to use
-them in Chromium, then add --password-store=basic to CHROMIUM_FLAGS
-in /etc/chromium/default.
-"
-
-S="${WORKDIR}/chromium-${PV/_*}"
-
-python_check_deps() {
- python_has_version "dev-python/setuptools[${PYTHON_USEDEP}]"
-}
-
-pre_build_checks() {
- # Check build requirements: bugs #471810, #541816, #914220
- # We're going to start doing maths here on the size of an unpacked source tarball,
- # this should make updates easier as chromium continues to balloon in size.
- # xz -l /var/cache/distfiles/chromium-${PV}*.tar.xz
- local base_disk=9 # Round up
- use test && base_disk=$((base_disk + 5))
- local extra_disk=1 # Always include a little extra space
- local memory=4
- tc-is-cross-compiler && extra_disk=$((extra_disk * 2))
- if tc-is-lto || use pgo; then
- memory=$((memory * 2 + 1))
- tc-is-cross-compiler && extra_disk=$((extra_disk * 2)) # Double the requirements
- use pgo && extra_disk=$((extra_disk + 4))
- fi
- if is-flagq '-g?(gdb)?([1-9])'; then
- if use custom-cflags; then
- extra_disk=$((extra_disk + 5))
- fi
- memory=$((memory * 2))
- fi
- local CHECKREQS_MEMORY="${memory}G"
- local CHECKREQS_DISK_BUILD="$((base_disk + extra_disk))G"
- check-reqs_${EBUILD_PHASE_FUNC}
-}
-
-pkg_pretend() {
- if [[ ${MERGE_TYPE} != binary ]]; then
- # The pre_build_checks are all about compilation resources, no need to run it for a binpkg
- pre_build_checks
- fi
-
- if use headless; then
- local headless_unused_flags=("cups" "kerberos" "pulseaudio" "qt6" "vaapi" "wayland")
- for myiuse in ${headless_unused_flags[@]}; do
- use ${myiuse} && ewarn "Ignoring USE=${myiuse}, USE=headless is set."
- done
- fi
-
- if ! use bindist && use ffmpeg-chromium; then
- ewarn "Ignoring USE=ffmpeg-chromium, USE=bindist is not set."
- fi
- if use libcxx; then
- ewarn
- ewarn "Building with libcxx, please be aware that system-*"
- ewarn "and some other c++ dependencies need to be compiled"
- ewarn "with the same c++ library as ungoogled-chromium itself"
- ewarn "dev-libs/jsoncpp is most problematic, see #58 #49 #119 for details"
- ewarn "Simplest solution would be to disable corresponding system-* flags"
- ewarn
- fi
- if use cfi; then
- ewarn
- ewarn "Building with cfi is only possible if building with -stdlib=libc++"
- ewarn "Make sure all dependencies are also built this way, see #40"
- ewarn
- fi
- if use cromite; then
- ewarn
- ewarn "Cromite patches are very experimental and unstable"
- ewarn "Please consider testing them and giving feedback upstream:"
- ewarn "https://github.com/uazo/cromite/issues"
- ewarn "Not all patches are applied, let me know if others should be considered too"
- ewarn
- fi
-}
-
-pkg_setup() {
- if [[ ${MERGE_TYPE} != binary ]]; then
- # The pre_build_checks are all about compilation resources, no need to run it for a binpkg
- pre_build_checks
-
- # We haven't massaged any CFLAGS yet, so we want to do this before we force CC/CXX to prevent warnings.
- local want_lto="false"
- tc-is-lto && want_lto="true"
-
- # The linux:unbundle toolchain in GN grabs CC, CXX, CPP (etc) from the environment
- # We'll set these to clang here then use llvm-utils functions to very explicitly set these
- # to a sane value.
- # This is effectively the 'force-clang' path if GCC support is re-added.
- if use !bundled-toolchain; then
- llvm-r1_pkg_setup
- rust_pkg_setup
-
- # Forcing clang; respect llvm_slot_x to enable selection of impl via LLVM_COMPAT
- AR=llvm-ar
- CPP="${CHOST}-clang++-${LLVM_SLOT} -E"
- NM=llvm-nm
- CC="${CHOST}-clang-${LLVM_SLOT}"
- CXX="${CHOST}-clang++-${LLVM_SLOT}"
- fi
-
- use_lto="false"
- local lto_usable="true"
- if [[ "$want_lto" == "true" ]]; then
- if use arm64 && [[ "${LLVM_SLOT}" -lt 22 ]]; then
- einfo "LTO is broken with LLVM 21 on arm64, ignoring CFLAGS."
- lto_usable="false"
- else
- use_lto="true"
- fi
- # We can rely on GN to do this for us; without this builds
- # take significantly longer with LTO enabled.
- filter-lto
- fi
-
- if [[ "$use_lto" == "false" ]] && use official && [[ "$lto_usable" == "true" ]]; then
- einfo "USE=official selected and LTO not detected."
- einfo "It is _highly_ recommended that LTO be enabled for performance reasons"
- einfo "and to be consistent with the upstream \"official\" build optimisations."
- fi
-
- if [[ "$use_lto" == "false" ]] && use test; then
- die "Tests require CFI which requires LTO"
- fi
-
- export use_lto
-
- # 936858
- if tc-ld-is-mold; then
- eerror "Your toolchain is using the mold linker."
- eerror "This is not supported by Chromium."
- die "Please switch to a different linker."
- fi
-
- if tc-is-cross-compiler; then
- use pgo && die "The pgo USE flag cannot be used when cross-compiling"
- CPP="${CBUILD}-clang++-${LLVM_SLOT} -E"
- fi
-
- # Sanity checks for development convenience
- if ver_test $(gn --version || die) -lt ${GN_MIN_VER}; then
- die "dev-build/gn >= ${GN_MIN_VER} is required to build this Chromium"
- fi
-
- # Sometimes, when adding a new LLVM slot, devs (me) forget to install an appropriate lld.
- local lld_ver=$(ld.lld --version | awk '{split($2,a,"."); print a[1]}' || die "Failed to check lld version")
- if [[ ${lld_ver} -lt ${LLVM_SLOT} ]]; then
- die "Your lld version (${lld_ver}) is too old for the selected LLVM slot (${LLVM_SLOT}). Please install a newer lld or select an older LLVM slot."
- fi
- fi
-
- chromium_suid_sandbox_check_kernel_config
-}
-
-src_unpack() {
- # # Here be dragons!
- # local XCLD="--exclude=chromium-${PV/_*}/third_party/instrumented_libs \
- # --exclude=chromium-${PV/_*}/third_party/llvm \
- # --exclude=chromium-${PV/_*}/third_party/llvm-build \
- # --exclude=chromium-${PV/_*}/third_party/node/linux \
- # --exclude=chromium-${PV/_*}/third_party/rust-src \
- # --exclude=chromium-${PV/_*}/third_party/rust-toolchain \
- # --exclude=chromium-${PV/_*}/build/linux/debian_bullseye_i386-sysroot \
- # --exclude=chromium-${PV/_*}/build/linux/debian_bullseye_amd64-sysroot \
- # --exclude=chromium-${PV/_*}/third_party/angle/third_party/VK-GL-CTS \
- # "
-
- # if ! use libcxx ; then
- # XCLD+=" --exclude=chromium-${PV/_*}/third_party/libc++"
- # fi
-
- # if ! use pgo ; then
- # XCLD+=" --exclude=chromium-${PV/_*}/chrome/build/pgo_profiles"
- # fi
-
- # einfo "Unpacking chromium-${PV/_*}.tar.xz to ${WORKDIR}"
- # # Gentoo tarball:
- # # tar ${XCLD} -xf "${DISTDIR}/chromium-${PV/_*}-gentoo.tar.xz" -C "${WORKDIR}" || die
- # tar ${XCLD} -xf "${DISTDIR}/chromium-${PV/_*}${LITE_TARBALL:+-lite}.tar.xz" -C "${WORKDIR}" || die
-
- # unpack ${UGC_URL#*->}
- # # unpack chromium-patches-${PATCH_V}.tar.bz2
- # # Warned you!
-
- unpack chromium-${PV/_*}-linux.tar.xz
- unpack chromium-patches-${PATCH_V}.tar.bz2
- # These should only be required when we're not using the official toolchain
- if use !bundled-toolchain; then
- unpack chromium-patches-copium-${COPIUM_COMMIT:0:10}.tar.gz
- fi
-
- if use test; then
- # This just contains a bunch of font files that need to be unpacked (or moved) to the correct location.
- local testfonts_dir="${WORKDIR}/chromium-${PV/_*}/third_party/test_fonts/test_fonts"
- local testfonts_tar="${DISTDIR}/chromium-testfonts-${TEST_FONT:0:10}.tar.gz"
- einfo "Unpacking test fonts ..."
- tar xf "${testfonts_tar}" -C "${testfonts_dir}" || die "Failed to unpack testfonts"
- fi
-
- # We need to manually unpack this since M126 else we'd unpack one toolchain over the other.
- # Since we're doing that anyway let's unpack to sensible locations to make symlink creation easier.
- if use bundled-toolchain; then
- einfo "Unpacking bundled Clang ..."
- mkdir -p "${WORKDIR}"/clang || die "Failed to create clang directory"
- tar xf "${DISTDIR}/chromium-clang-${BUNDLED_CLANG_VER}.tar.xz" -C "${WORKDIR}/clang" || die "Failed to unpack Clang"
- einfo "Unpacking bundled Rust ..."
- local rust_dir="${WORKDIR}/rust-toolchain"
- mkdir -p "${rust_dir}" || die "Failed to create rust toolchain directory"
- tar xf "${DISTDIR}/chromium-rust-toolchain-${RUST_SHORT_HASH}-${BUNDLED_CLANG_VER%-*}.tar.xz" -C "${rust_dir}" ||
- die "Failed to unpack Rust"
- fi
-
- if use ppc64; then
- unpack chromium-openpower-${PPC64_HASH:0:10}.tar.bz2
- fi
-
- # This is a dirty hack, but we need rollup to build successfully and it's proving to be challenging
- # to build locally due to deps
- unpack rollup-wasm-node-${ROLLUP_VER}.tgz
-
- if use cromite; then
- unpack cromite-${CROMITE_COMMIT_ID}.tar.gz
- fi
-
- unpack ${UGC_URL#*->}
-}
-
-remove_compiler_builtins() {
- # We can't use the bundled compiler builtins with the system toolchain
- # We used to `grep` then `sed`, but it was indirect. Combining the two into a single
- # `awk` command is more efficient and lets us document the logic more clearly.
-
- local pattern=' configs += [ "//build/config/clang:compiler_builtins" ]'
- local target='build/config/compiler/BUILD.gn'
-
- local tmpfile
- tmpfile=$(mktemp) || die "Failed to create temporary file."
-
- if awk -v pat="${pattern}" '
- BEGIN {
- match_found = 0
- }
-
- # If the delete countdown is active, decrement it and skip to the next line.
- d > 0 { d--; next }
-
- # If the current line matches the pattern...
- $0 == pat {
- match_found = 1 # ...set our flag to true.
- d = 2 # Set delete counter for this line and the next two.
- prev = "" # Clear the buffered previous line so it is not printed.
- next
- }
-
- # For any other line, print the buffered previous line.
- NR > 1 { print prev }
-
- # Buffer the current line to be printed on the next cycle.
- { prev = $0 }
-
- END {
- # Print the last line if it was not part of a deleted block.
- if (d == 0) { print prev }
-
- # If the pattern was never found, exit with a failure code.
- if (match_found == 0) {
- exit 1
- }
- }
- ' "${target}" > "${tmpfile}"; then
- # AWK SUCCEEDED (exit code 0): The pattern was found and edited.
- # This is to avoid gawk's `-i inplace` option which users complain about.
- mv "${tmpfile}" "${target}"
- else
- # AWK FAILED (exit code 1): The pattern was not found.
- rm -f "${tmpfile}"
- die "Awk patch failed: Pattern not found in ${target}."
- fi
-}
-
-src_prepare() {
- # Calling this here supports resumption via FEATURES=keepwork
- python_setup
-
- # We'll fill this in as we go. Patches go in chromium-patches.
- local PATCHES=()
-
- rm "${WORKDIR}/chromium-patches-${PATCH_V}/common/cr131-unbundle-icu-target.patch"
- if use pgo; then
- rm "${WORKDIR}/chromium-patches-${PATCH_V}/rust/cr146-fix-botched-bytemuck-roll.patch"
- sed -i '/SupportedLaneCount/d' third_party/rust/chromium_crates_io/vendor/bytemuck-v1/src/zeroable.rs || die
- sed -i '/SupportedLaneCount/d' third_party/rust/chromium_crates_io/vendor/bytemuck-v1/src/pod.rs || die
- fi
-
- #cp -f ${WORKDIR}/chromium-patches-${PATCH_V}/*-compiler.patch "${T}/compiler.patch"
- ##cp -f ${FILESDIR}/chromium-147-compiler.patch "${T}/compiler.patch"
- #if ! use custom-cflags; then #See #25 #92
- # sed -i '/default_stack_frames/Q' "${T}/compiler.patch" || die
- #fi
-
- PATCHES+=( "${WORKDIR}/chromium-patches-${PATCH_V}/common/" )
- PATCHES+=( "${FILESDIR}/restore-x86-r3.patch" )
-
- # https://issues.chromium.org/issues/442698344
- # Unreleased fontconfig changed magic numbers and google have rolled to this version
- if has_version "<=media-libs/fontconfig-2.17.1"; then
- PATCHES+=( "${FILESDIR}/chromium-142-work-with-old-fontconfig.patch" )
- fi
-
- if use bundled-toolchain; then
- # We need to symlink the toolchain into the expected location
- einfo "Symlinking Clang toolchain to expected location ..."
- mkdir -p third_party/llvm-build/ || die "Failed to create llvm-build directory"
- # the 'Chromium Linux Tarballs' seem to already have 'Release+Asserts/{lib,bin}'; not sure if this is an
- # upstream change - we're using the same scripts to build, theoretically. We'll still attempt to create
- # llvm-build, but we'll rm Release+Asserts and symlink directly.
- if [[ -d third_party/llvm-build/Release+Asserts ]]; then
- rm -r third_party/llvm-build/Release+Asserts || die "Failed to remove third_party/llvm-build/Release+Asserts"
- fi
- ln -s "${WORKDIR}"/clang third_party/llvm-build/Release+Asserts || die "Failed to bundle Clang"
- einfo "Symlinking Rust toolchain to expected location ..."
- # As above, so below
- if [[ -d third_party/rust-toolchain ]]; then
- rm -r third_party/rust-toolchain || die "Failed to remove third_party/rust-toolchain"
- fi
- ln -s "${WORKDIR}"/rust-toolchain third_party/rust-toolchain || die "Failed to bundle rust"
- cp "${WORKDIR}"/rust-toolchain/VERSION \
- "${WORKDIR}"/rust-toolchain/INSTALLED_VERSION || die "Failed to set rust version"
- else
- # We don't need our toolchain patches if we're using the official toolchain
-
- # Copium patches go here.
- PATCHES+=(
- "${WORKDIR}/copium/cr143-libsync-__BEGIN_DECLS.patch"
- "${WORKDIR}/copium/cr149-unbundle-minizip-undo-unicode.patch"
- )
-
- # Automate conditional application of chromium-patches
- # The directory structure is expected to be something like:
- # chromium-patches-145/
- # ├── toolchain/
- # │ ├── cr123-foo.patch
- # │ └── cr135-bar.patch
- # ├── llvm/
- # │ ├── cr144-baz.patch
- # │ └── lt-23/
- # │ └── cr145-bleeding-edge-llvm-feature.patch
- # Where `lt-23` means "apply this patch if the LLVM version is less than 23".
- # Only categories in `slot_map` will be checked for version constraints.
- shopt -s nullglob
- local -A slot_map=( [llvm]="${LLVM_SLOT}" [rust]="${RUST_SLOT}" )
-
- for category in "${WORKDIR}/chromium-patches-${PATCH_V}"/*/; do
- local category_name="${category%/}"
- category_name="${category_name##*/}"
-
- # Skip arch-specific categories
- if [[ "${category_name}" == "ppc64le" ]]; then
- use ppc64 || continue
- fi
-
- # We applied common patches above, no need to apply them again here
- [[ "${category_name}" == "common" ]] && continue
-
- # Unconditional patches for this category
- local category_patches=( "${category}"*.patch )
- [[ ${#category_patches[@]} -gt 0 ]] && PATCHES+=( "${category}" )
-
- # Version-constrained subdirectories (e.g., llvm/lt-23/)
- for constraint_dir in "${category}"*/; do
- local dir_name="${constraint_dir%/}"
- dir_name="${dir_name##*/}"
- if [[ "${dir_name}" =~ ^lt-(.*)$ && -v slot_map[${category_name}] ]]; then
- ver_test "${slot_map[${category_name}]}" -lt "${BASH_REMATCH[1]}" &&
- PATCHES+=( "${constraint_dir}" )
- fi
- done
- done
-
- shopt -u nullglob
-
- # Strictly speaking this doesn't need to be gated (no bundled toolchain for ppc64); it keeps the logic together
- if use ppc64; then
- local patchset_dir="${WORKDIR}/openpower-patches-${PPC64_HASH}/patches"
- # patch causes build errors on 4K page systems (https://bugs.gentoo.org/show_bug.cgi?id=940304)
- local page_size_patch="ppc64le/third_party/use-sysconf-page-size-on-ppc64.patch"
- local isa_3_patch="ppc64le/core/baseline-isa-3-0.patch"
- # Apply the OpenPOWER patches (check for page size and isa 3.0)
- openpower_patches=( $(grep -E "^ppc64le|^upstream" "${patchset_dir}/series" | grep -v "${page_size_patch}" |
- grep -v "${isa_3_patch}" || die) )
- for patch in "${openpower_patches[@]}"; do
- PATCHES+=( "${patchset_dir}/${patch}" )
- done
- if [[ $(getconf PAGESIZE) == 65536 ]]; then
- PATCHES+=( "${patchset_dir}/${page_size_patch}" )
- fi
- # We use vsx3 as a proxy for 'want isa3.0' (POWER9)
- if use cpu_flags_ppc_vsx3 ; then
- PATCHES+=( "${patchset_dir}/${isa_3_patch}" )
- fi
- fi
-
- remove_compiler_builtins
-
- # We can't rely on the eselect'd Rust to actually include rustfmt, so we'll point to the selected slot specifically.
- local suffix=""
- if [[ "${RUST_TYPE}" == "binary" ]]; then
- suffix="-bin-${RUST_SLOT}"
- else
- suffix="-${RUST_SLOT}"
- fi
- sed -i "s|/bin/rustfmt|/bin/rustfmt${suffix}|g" build/rust/rust_bindgen_generator.gni ||
- die "Failed to update rustfmt path"
-
- fi
-
- # Do this before we apply patches since (e.g.) ppc64 needs to patch rollup and it's easier in ${S}
- einfo "Moving rollup wasm-node package into place ..."
- mkdir -p third_party/devtools-frontend/src/node_modules/@rollup/wasm-node ||
- die "Failed to create node_modules/@rollup/wasm-node"
- mv "${WORKDIR}"/package/* third_party/devtools-frontend/src/node_modules/@rollup/wasm-node ||
- die "Failed to move rollup package"
-
- if [ ! -z "${CHROMIUM_COMMITS[*]}" ]; then
- # for i in "${CHROMIUM_COMMITS[@]}"; do
- for i in "${!CHROMIUM_COMMITS[@]}"; do
- if [[ ${CHROMIUM_COMMITS[$i]} =~ webrtc ]]; then
- patch_prefix="webrtc"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ angle ]]; then
- patch_prefix="angle"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ quiche ]]; then
- patch_prefix="quiche"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ dawn ]]; then
- patch_prefix="dawn"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ perfetto ]]; then
- patch_prefix="perfetto"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ink ]]; then
- patch_prefix="ink"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ vulkan-utility-libraries ]]; then
- patch_prefix="vulkan-utility-libraries"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ruy ]]; then
- patch_prefix="ruy"
- else
- patch_prefix="chromium"
- fi
- pushd "${CHROMIUM_COMMITS[$i]}" > /dev/null || die
- if [[ $i = -* ]]; then
- einfo "Reverting ${patch_prefix}-${i/-}.patch"
- git_wrapper apply -R --exclude="*unittest.cc" --exclude="DEPS" \
- -p1 < "${DISTDIR}/${patch_prefix}-${i/-}.patch"
- else
- einfo "Applying ${patch_prefix}-${i/-}.patch"
- git_wrapper apply --exclude="*unittest.cc" --exclude="DEPS" \
- -p1 < "${DISTDIR}/${patch_prefix}-${i/-}.patch"
- fi
- popd > /dev/null || die
- done
- fi
-
- if ! use bluetooth ; then
- PATCHES+=(
- "${FILESDIR}/disable-bluez-r7.patch"
- )
- fi
-
- if use convert-dict ; then
- PATCHES+=(
- "${FILESDIR}/chromium-ucf-dict-utility-r3.patch"
- )
- fi
-
- if ! use libcxx ; then
- PATCHES+=(
- "${FILESDIR}/fix-wayland-oncecallback-copy.patch"
- )
- fi
-
- if use system-ffmpeg; then
- PATCHES+=(
- "${FILESDIR}/chromium-141-opus-mp3.patch"
- "${FILESDIR}/chromium-135-hevc.patch"
- )
- sed -i "\!AVFMT_FLAG_NOH264PARSE!d" media/filters/ffmpeg_glue.cc || die
- ewarn "You need to expose \"av_stream_get_first_dts\" in ffmpeg via user patch"
- fi
-
- if use system-av1; then
- PATCHES+=(
- "${FILESDIR}/chromium-system-av1.patch"
- )
- fi
-
- if use system-libvpx; then
- PATCHES+=(
- "${FILESDIR}/chromium-system-libvpx.patch"
- )
- fi
-
- if use system-openjpeg ; then
- PATCHES+=(
- "${FILESDIR}/chromium-system-openjpeg-r4.patch"
- )
- fi
-
- if use x86 ; then
- #* Fixes a segfault in transport_security_state_generator
- PATCHES+=(
- "${FILESDIR}/fix-segfault-x86.patch"
- )
- fi
-
- # Testing all patches when NODIE is defined
- if [ ! -z "${NODIE}" ]; then
- for i in "${PATCHES[@]}"; do
- eapply_wrapper "$i"
- done
- nonfatal eapply_user
- else
- default
- fi
-
- if use cromite ; then
- BR_PA_PATH="${WORKDIR}/cromite-${CROMITE_COMMIT_ID}/build/patches"
-
- sed -i '/b\/components\/components_strings\.grd/,+10d' "${BR_PA_PATH}/Add-cromite-flags-support.patch" || die
- sed -i '/b\/chrome\/android\/java\/res\/xml\/privacy_preferences\.xml/,+13d' "${BR_PA_PATH}/Add-cromite-flags-support.patch" || die
- sed -i '/b\/android_webview\/support_library\/java\/src\/org\/chromium\/support_lib_glue/,+11d' "${BR_PA_PATH}/Client-hints-overrides.patch" || die
- sed -i '/webapps_strings.grdp" \/>/{s++webapps_strings.grdp" /><part file="cromite_components_strings_grd/placeholder.txt"/>+;h};${x;/./{x;q0};x;q1}' \
- components/components_strings.grd || die
-
- sed -i 's/absl::/std::/' "${BR_PA_PATH}/Add-a-proxy-configuration-page.patch" || die
-
- filterdiff -p1 "${BR_PA_PATH}/JIT-site-settings.patch" --exclude="content/browser/renderer_host/render_process_host_impl.cc" \
- > "${BR_PA_PATH}/JIT-site-settings.patch1"
- mv -f "${BR_PA_PATH}/JIT-site-settings.patch1" "${BR_PA_PATH}/JIT-site-settings.patch"
-
- BROMITE_PATCHES=(
- "${BR_PA_PATH}/bromite-build-utils.patch"
- "${BR_PA_PATH}/Battery-API-return-nothing.patch"
- "${BR_PA_PATH}/Multiple-fingerprinting-mitigations.patch"
- "${BR_PA_PATH}/Add-flag-to-configure-maximum-connections-per-host.patch"
- "${BR_PA_PATH}/Add-a-proxy-configuration-page.patch"
- "${BR_PA_PATH}/Enable-StrictOriginIsolation-and-SitePerProcess.patch"
- "${BR_PA_PATH}/Disable-requests-for-single-word-Omnibar-searches.patch"
- "${BR_PA_PATH}/Reduce-HTTP-headers-in-DoH-requests-to-bare-minimum.patch"
- "${BR_PA_PATH}/Client-hints-overrides.patch"
- "${BR_PA_PATH}/Disable-idle-detection.patch"
- "${BR_PA_PATH}/Disable-TLS-resumption.patch"
- "${BR_PA_PATH}/Remove-navigator.connection-info.patch"
-
- "${BR_PA_PATH}/AudioBuffer-AnalyserNode-fp-mitigations.patch"
- "${BR_PA_PATH}/Fonts-fingerprinting-mitigation.patch"
- "${BR_PA_PATH}/Content-settings-infrastructure.patch"
- "${BR_PA_PATH}/Add-autoplay-site-setting.patch"
- "${BR_PA_PATH}/Site-setting-for-images.patch"
- "${BR_PA_PATH}/JIT-site-settings.patch"
- "${BR_PA_PATH}/Add-webGL-site-setting.patch"
- "${BR_PA_PATH}/Add-webRTC-site-settings.patch"
- "${BR_PA_PATH}/Show-site-settings-for-cookies-javascript-and-ads.patch"
- "${BR_PA_PATH}/Viewport-Protection-flag.patch"
- "${BR_PA_PATH}/Revert-remove-allowscript-content-setting-secondary-url.patch"
- "${BR_PA_PATH}/Timezone-customization.patch"
- "${BR_PA_PATH}/Disable-speechSynthesis-getVoices-API.patch"
- "${BR_PA_PATH}/Remove-support-for-device-memory-and-cpu-recovery.patch"
- "${BR_PA_PATH}/Disable-Feeback-Collector.patch"
- "${BR_PA_PATH}/Disable-remote-altsvc-for-h3-connections.patch"
- "${BR_PA_PATH}/Add-cromite-flags-support.patch"
- "${BR_PA_PATH}/Enables-deactivation-of-the-js-debugger-statement.patch"
- )
- for i in "${BROMITE_PATCHES[@]}"; do
- if [[ "$i" =~ "Add-autoplay-site-setting.patch" ]] ||
- [[ "$i" =~ "JIT-site-settings.patch" ]] ||
- [[ "$i" =~ "Site-setting-for-images.patch" ]]; then
- einfo "Git binary patch: ${i##*/}"
- git_wrapper apply -p1 < "$i"
- else
- filter_wrapper "$i" --exclude="chrome/android/*"
- fi
- done
-
- #! conflicting patches
- sed -i '/browser_features.cc/,+17d' \
- "${UGC_WD}/patches/extra/ungoogled-chromium/add-flag-to-clear-data-on-exit.patch" || die
- sed -i 's$} // namespace features$BASE_FEATURE(kClearDataOnExit, "ClearDataOnExit", base::FEATURE_DISABLED_BY_DEFAULT);}$' \
- chrome/browser/browser_features.cc || die
- sed -i 's$} // namespace features$BASE_DECLARE_FEATURE(kClearDataOnExit);}$' \
- chrome/browser/browser_features.h || die
- sed -i 's$kChromeUIAboutHost,$kChromeUIAboutHost,"ungoogled-first-run",$' \
- chrome/common/webui_url_constants.cc || die
- sed -i '/chrome\/common\/webui_url_constants.cc/Q' \
- "${UGC_WD}/patches/extra/ungoogled-chromium/first-run-page.patch" || die
-
- #! normalise paths in py
- sed -i 's$os.path.dirname(include_file)$os.path.abspath(os.path.dirname(include_file))$' \
- build/bromite/gyp/cpp_bromite_include.py || die
- fi
-
- # if [[ ${LLVM_SLOT} == "19" ]]; then
- # # Upstream now hard depend on a feature that was added in LLVM 20.1, but we don't want to stabilise that yet.
- # # Do the temp file shuffle in case someone is using something other than `gawk`
- # {
- # awk '/config\("clang_warning_suppression"\) \{/ { print $0 " }"; sub(/clang/, "xclang"); print; next }
- # { print }' build/config/compiler/BUILD.gn > "${T}/build.gn" && \
- # mv "${T}/build.gn" build/config/compiler/BUILD.gn
- # } || die "Unable to disable warning suppression"
- # fi
-
- ## Not included in -lite tarballs, but we should check for it anyway.
- #if [[ -f third_party/node/linux/node-linux-x64/bin/node ]]; then
- # rm third_party/node/linux/node-linux-x64/bin/node || die
- #else
- # mkdir -p third_party/node/linux/node-linux-x64/bin || die
- #fi
- #ln -s "${EPREFIX}"/usr/bin/node third_party/node/linux/node-linux-x64/bin/node || die
-
- cp "${FILESDIR}/libusb.gn" build/linux/unbundle || die
- sed -i '/^REPLACEMENTS.*$/{s++REPLACEMENTS = {"libusb":"third_party/libusb/BUILD.gn",+;h};${x;/./{x;q0};x;q1}' \
- build/linux/unbundle/replace_gn_files.py || die
- sed -i '/^.*deps.*third_party\/jsoncpp.*$/{s++public_deps \+= [ "//third_party/jsoncpp" ]+;h};${x;/./{x;q0};x;q1}' \
- third_party/webrtc/rtc_base/BUILD.gn || die
-
- if use override-data-dir; then
- sed -i '/"chromium";/{s++"ungoogled-chromium";+;h};${x;/./{x;q0};x;q1}' \
- chrome/common/chrome_paths_linux.cc || die
- fi
-
- if use system-abseil-cpp; then
- eapply_wrapper "${FILESDIR}/chromium-147-system-abseil.patch"
-
- #! SFINAE mangling incompatibility between clang and gcc:
- #! https://github.com/llvm/llvm-project/issues/85656
- #! gcc: _ZN4absl12lts_202601074CordC1INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELi0EEEOT_
- #! clang: _ZN4absl12lts_202601074CordC1INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEETnNSt9enable_ifIXsr3std7is_sameIT_S8_EE5valueEiE4typeELi0EEEOSA_
- #! So, either this:
- eapply_wrapper "${FILESDIR}/chromium-141-system-abseil-cord.patch"
- #! or build with -fclang-abi-compat=17
-
- # cp -f /usr/include/absl/base/options.h third_party/abseil-cpp/absl/base/options.h
- # sed -i '/^#define ABSL_OPTION_USE_STD_ORDERING.*$/{s++#define ABSL_OPTION_USE_STD_ORDERING 1+;h};${x;/./{x;q0};x;q1}' \
- # third_party/abseil-cpp/absl/base/options.h || die
- fi
-
- #* Applying UGC PRs here
- if [ ! -z "${UGC_PR_COMMITS[*]}" ]; then
- pushd "${UGC_WD}" >/dev/null
- for i in "${UGC_PR_COMMITS[@]}"; do
- eapply_wrapper "${DISTDIR}/${PN}-$i.patch"
- done
- popd >/dev/null
- fi
-
- # From here we adapt ungoogled-chromium's patches to our needs
- local ugc_pruning_list="${UGC_WD}/pruning.list"
- local ugc_patch_series="${UGC_WD}/patches/series"
- local ugc_substitution_list="${UGC_WD}/domain_substitution.list"
-
- local ugc_unneeded=(
- # GN bootstrap
- extra/debian/gn/parallel
- # following Gentoo's Chromium
- core/ungoogled-chromium/build-with-wasm-rollup
- )
-
- if use cromite ; then
- einfo "Using fingerprinting patches from Cromite instead"
- ugc_unneeded+=(
- extra/bromite/fingerprinting-flags-client-rects-and-measuretext
- extra/bromite/flag-max-connections-per-host
- extra/bromite/flag-fingerprinting-canvas-image-data-noise
- extra/ungoogled-chromium/add-components-ungoogled
- extra/ungoogled-chromium/remove-pac-size-limit
- )
- fi
-
- # #* Temporary fix
- # sed -i "\!ios/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/icu/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/libjpeg_turbo/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/snappy/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/closure_compiler/!d" "${ugc_pruning_list}" || die
-
- # #* Didn't unpack them at the first place
- # sed -i "\!build/linux/debian_bullseye_i386-sysroot!d" "${ugc_pruning_list}" || die
- # sed -i "\!build/linux/debian_bullseye_amd64-sysroot!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/llvm-build!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/node/linux!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/rust-src!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/rust-toolchain!d" "${ugc_pruning_list}" || die
- # if ! use libcxx ; then
- # sed -i "\!third_party/libc!d" "${ugc_pruning_list}" || die
- # fi
- sed -i "s|debug('files|error('files|" \
- "${UGC_WD}/utils/prune_binaries.py" || die
- sed -i "\!third_party/node/linux!d" \
- "${UGC_WD}/utils/prune_binaries.py" || die
-
- local ugc_p ugc_dir
- for p in "${ugc_unneeded[@]}"; do
- einfo "Removing ${p}.patch"
- sed -i "\!${p}.patch!d" "${ugc_patch_series}" || die
- done
-
- if [ ! -z "${UGC_SKIP_PATCHES}" ]; then
- for p in ${UGC_SKIP_PATCHES}; do
- ewarn "Removing ${p}"
- sed -i "\!${p}!d" "${ugc_patch_series}" || die
- done
- fi
-
- if [ ! -z "${UGC_KEEP_BINARIES}" ]; then
- for p in ${UGC_KEEP_BINARIES}; do
- ewarn "Keeping binary ${p}"
- sed -i "\!${p}!d" "${ugc_pruning_list}" || die
- done
- fi
-
- if [ ! -z "${UGC_SKIP_SUBSTITUTION}" ]; then
- for p in ${UGC_SKIP_SUBSTITUTION}; do
- ewarn "No substitutions in ${p}"
- sed -i "\!${p}!d" "${ugc_substitution_list}" || die
- done
- fi
-
- ebegin "Pruning binaries"
- "${UGC_WD}/utils/prune_binaries.py" -q . "${UGC_WD}/pruning.list"
- eend $? || die
-
- ebegin "Applying ungoogled-chromium patches"
- "${UGC_WD}/utils/patches.py" -q apply . "${UGC_WD}/patches"
- eend $? || die
-
- ebegin "Applying domain substitution"
- "${UGC_WD}/utils/domain_substitution.py" -q apply -r "${UGC_WD}/domain_regex.list" -f "${UGC_WD}/domain_substitution.list" .
- eend $? || die
-
- # Sanity check esbuild version before we start removing files.
- # We _could_ patch the version check out - in theory esbuild upstream are being super conservative after
- # arch(AUR) packaged an `esbuild` binary and set ESBUILD_BINARY_PATH=/usr/bin/esbuild, causing much breakage,
- # but this is fine too and exactly matches what upstream are expecting.
- # https://github.com/evanw/esbuild/issues/2894
- local esbuild_js="${S}/third_party/devtools-frontend/src/node_modules/esbuild/lib/main.js"
- local found
- found=$(awk -F'"' '/if \(binaryVersion !==/ {print $2}' "${esbuild_js}")
- if [[ "${found}" != "${ESBUILD_VER}" ]]; then
- die "esbuild version mismatch: expected ${ESBUILD_VER}, found ${found}"
- fi
-
- elog "Removing bundled binaries from source tree ..."
- # Purge bundled ELF files: These are non-portable and will cause issues if used instead of system versions.
- # Use `--wasm` to also remove WebAssembly binaries, if desired - they're portable so shouldn't break builds.
- ${EPYTHON} "${FILESDIR}/bin-finder.py" --elf "${S}" | awk '{print $1}' | xargs rm -f ||
- die "Failed to remove bundled binaries"
-
- # And now we restore any that we actually need, from the host system
- local esbuild_path="${S}/third_party/devtools-frontend/src/third_party/esbuild"
- local -A restore_list=(
- ["/usr/bin/esbuild-${ESBUILD_VER}"]="${esbuild_path}/esbuild"
- ["/usr/bin/gperf"]="${S}/third_party/gperf/cipd/bin/gperf"
- ["/usr/bin/node"]="${S}/third_party/node/linux/node-linux-x64/bin/node"
- )
-
- for src in "${!restore_list[@]}"; do
- dst="${restore_list[${src}]}"
- if [[ -f "${src}" ]]; then
- einfo "Symlinking ${src} ..."
- # Make sure the parent dir exists; some tarballs don't include (e.g.) node's bindir
- mkdir -p "$(dirname "${dst}")" || die "Failed to create directory for ${dst}"
- ln -s "${src}" "${dst}" || die "Failed to symlink ${dst} from ${src}"
- if [[ ! -L "${dst}" || "$(readlink -f "${dst}")" != "${src}" ]]; then
- die "Symlink verification failed for ${dst} -> ${src}"
- fi
- else
- die "Expected to find ${src} to restore ${dst}, but it does not exist."
- fi
- done
-
- # adjust python interpreter version
- sed -i -e "s|\(^script_executable = \).*|\1\"${EPYTHON}\"|g" .gn || die
-
- # Use the system copy of hwdata's usb.ids; upstream is woefully out of date (2015!)
- sed 's|//third_party/usb_ids/usb.ids|/usr/share/hwdata/usb.ids|g' \
- -i services/device/public/cpp/usb/BUILD.gn || die "Failed to set system usb.ids path"
-
- # remove_bundled_libraries.py walks the source tree and looks for paths containing the substring 'third_party'
- # whitelist matches use the right-most matching path component, so we need to whitelist from that point down.
- local keeplibs=(
- base/third_party/cityhash
- )
- use system-double-conversion || keeplibs+=(
- base/third_party/double_conversion
- )
- keeplibs+=(
- base/third_party/icu
- base/third_party/nspr
- base/third_party/superfasthash
- base/third_party/symbolize
- base/third_party/xdg_user_dirs
- buildtools/third_party/libc++
- buildtools/third_party/libc++abi
- )
- use cromite && keeplibs+=(
- cromite_flags/third_party
- )
- keeplibs+=(
- net/third_party/mozilla_security_manager
- net/third_party/quic
- net/third_party/uri_template
- )
- use system-abseil-cpp || keeplibs+=(
- third_party/abseil-cpp
- )
- keeplibs+=(
- third_party/angle
- third_party/angle/src/common/third_party/xxhash
- third_party/angle/src/third_party/ceval
- )
- use nvidia || keeplibs+=(
- third_party/angle/src/third_party/libXNVCtrl
- )
- keeplibs+=(
- third_party/angle/src/third_party/volk
- third_party/anonymous_tokens
- third_party/apple_apsl
- third_party/axe-core
- third_party/bidimapper
- third_party/blink
- third_party/boringssl
- third_party/boringssl/src/third_party/fiat
- third_party/breakpad
- third_party/breakpad/breakpad/src/third_party/curl
- )
- use system-brotli || keeplibs+=(
- third_party/brotli
- )
- keeplibs+=(
- third_party/catapult
- third_party/catapult/common/py_vulcanize/third_party/rcssmin
- third_party/catapult/common/py_vulcanize/third_party/rjsmin
- third_party/catapult/third_party/beautifulsoup4-4.9.3
- third_party/catapult/third_party/html5lib-1.1
- third_party/catapult/third_party/polymer
- third_party/catapult/third_party/six
- third_party/catapult/third_party/typ
- third_party/catapult/tracing/third_party/d3
- third_party/catapult/tracing/third_party/gl-matrix
- third_party/catapult/tracing/third_party/jpeg-js
- third_party/catapult/tracing/third_party/jszip
- third_party/catapult/tracing/third_party/mannwhitneyu
- third_party/catapult/tracing/third_party/oboe
- third_party/catapult/tracing/third_party/pako
- third_party/ced
- third_party/cld_3
- third_party/closure_compiler
- )
- use libcxx && keeplibs+=(
- third_party/compiler-rt
- )
- keeplibs+=(
- third_party/content_analysis_sdk
- third_party/cpuinfo
- third_party/crabbyavif
- third_party/crashpad
- third_party/crashpad/crashpad/third_party/lss
- third_party/crashpad/crashpad/third_party/zlib
- )
- use system-crc32c || keeplibs+=(
- third_party/crc32c
- )
- keeplibs+=(
- third_party/cros_system_api
- third_party/d3
- third_party/dawn
- third_party/dawn/third_party/gn/webgpu-cts
- third_party/dawn/third_party/OpenGL-Registry
- third_party/dawn/third_party/renderdoc
- third_party/dawn/third_party/webgpu-headers
- third_party/depot_tools
- third_party/devscripts
- third_party/devtools-frontend
- third_party/devtools-frontend/src/front_end/third_party/acorn
- third_party/devtools-frontend/src/front_end/third_party/additional_readme_paths.json
- third_party/devtools-frontend/src/front_end/third_party/axe-core
- third_party/devtools-frontend/src/front_end/third_party/chromium
- third_party/devtools-frontend/src/front_end/third_party/codemirror
- third_party/devtools-frontend/src/front_end/third_party/csp_evaluator
- third_party/devtools-frontend/src/front_end/third_party/diff
- third_party/devtools-frontend/src/front_end/third_party/i18n
- third_party/devtools-frontend/src/front_end/third_party/intl-messageformat
- third_party/devtools-frontend/src/front_end/third_party/json5
- third_party/devtools-frontend/src/front_end/third_party/legacy-javascript
- third_party/devtools-frontend/src/front_end/third_party/lighthouse
- third_party/devtools-frontend/src/front_end/third_party/lit
- third_party/devtools-frontend/src/front_end/third_party/marked
- third_party/devtools-frontend/src/front_end/third_party/puppeteer
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/esm/third_party/mitt
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/esm/third_party/parsel-js
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/esm/third_party/rxjs
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/esm/third_party/urlpattern-polyfill
- third_party/devtools-frontend/src/front_end/third_party/source-map-scopes-codec
- third_party/devtools-frontend/src/front_end/third_party/third-party-web
- third_party/devtools-frontend/src/front_end/third_party/vscode.web-custom-data
- third_party/devtools-frontend/src/front_end/third_party/wasmparser
- third_party/devtools-frontend/src/front_end/third_party/web-vitals
- third_party/devtools-frontend/src/third_party
- third_party/dom_distiller_js
- third_party/dragonbox
- third_party/eigen3
- third_party/emoji-segmenter
- third_party/farmhash
- third_party/fast_float
- third_party/fdlibm
- third_party/federated_compute/chromium/fcp/confidentialcompute
- third_party/federated_compute/src/fcp/base
- third_party/federated_compute/src/fcp/confidentialcompute
- third_party/federated_compute/src/fcp/protos/confidentialcompute
- third_party/federated_compute/src/fcp/protos/federatedcompute
- third_party/fft2d
- third_party/flatbuffers
- third_party/fp16
- third_party/freetype
- third_party/fusejs
- third_party/fxdiv
- third_party/gemmlowp
- third_party/google_input_tools
- third_party/google_input_tools/third_party/closure_library
- third_party/google_input_tools/third_party/closure_library/third_party/closure
- third_party/googletest
- third_party/gperf # We symlink system gperf, but this will purge the symlink since we tidy up afterwards.
- third_party/highway
- third_party/hunspell
- third_party/hyphenation-patterns
- third_party/ink/src/ink/brush
- third_party/ink/src/ink/color
- third_party/ink/src/ink/geometry
- third_party/ink/src/ink/rendering
- third_party/ink/src/ink/rendering/skia/common_internal
- third_party/ink/src/ink/rendering/skia/native
- third_party/ink/src/ink/rendering/skia/native/internal
- third_party/ink/src/ink/strokes
- third_party/ink/src/ink/types
- third_party/inspector_protocol
- third_party/ipcz
- third_party/jinja2
- )
- use system-jsoncpp || keeplibs+=(
- third_party/jsoncpp
- )
- keeplibs+=(
- third_party/khronos
- third_party/lens_server_proto
- third_party/leveldatabase
- third_party/libaddressinput
- )
- use libcxx && keeplibs+=(
- third_party/libc++
- )
- keeplibs+=(
- third_party/libdrm
- third_party/libgav1
- third_party/libjingle
- third_party/libpfm4
- third_party/libphonenumber
- third_party/libpng
- third_party/libsecret
- third_party/libsrtp
- third_party/libsync
- third_party/libtess2/libtess2
- third_party/libtess2/src/Include
- third_party/libtess2/src/Source
- third_party/liburlpattern
- )
- use system-libusb || keeplibs+=(
- third_party/libusb
- )
- keeplibs+=(
- third_party/libva_protected_content
- )
- use system-libvpx || keeplibs+=(
- third_party/libvpx
- third_party/libvpx/source/libvpx/third_party/x86inc
- )
- keeplibs+=(
- third_party/libwebm
- third_party/libx11
- third_party/libxcb-keysyms
- third_party/libxml/chromium
- third_party/libyuv
- third_party/libzip
- third_party/lit
- )
- use libcxx && keeplibs+=(
- third_party/llvm-libc
- third_party/llvm-libc/src/shared/
- )
- keeplibs+=(
- third_party/lottie
- third_party/lss
- third_party/lzma_sdk
- third_party/mako
- third_party/markupsafe
- third_party/material_color_utilities
- third_party/metrics_proto
- third_party/minigbm
- third_party/ml_dtypes
- third_party/modp_b64
- third_party/nasm
- third_party/nearby
- third_party/neon_2_sse
- third_party/node
- third_party/oak/chromium/proto
- third_party/oak/chromium/proto/attestation
- third_party/omnibox_proto
- third_party/one_euro_filter
- third_party/openscreen
- third_party/openscreen/src/third_party/
- third_party/openscreen/src/third_party/tinycbor/src/src
- third_party/ots
- third_party/pdfium
- third_party/pdfium/third_party/agg23
- third_party/pdfium/third_party/bigint
- third_party/pdfium/third_party/freetype
- third_party/pdfium/third_party/lcms
- )
- use system-openjpeg || keeplibs+=(
- third_party/pdfium/third_party/libopenjpeg
- )
- keeplibs+=(
- third_party/pdfium/third_party/libtiff
- third_party/perfetto
- third_party/perfetto/protos/third_party/chromium
- third_party/perfetto/protos/third_party/pprof
- third_party/perfetto/protos/third_party/primes
- third_party/perfetto/protos/third_party/simpleperf
- third_party/pffft
- third_party/ply
- third_party/polymer
- third_party/private_membership
- third_party/private-join-and-compute
- third_party/protobuf
- third_party/protobuf/third_party/utf8_range
- third_party/pthreadpool
- third_party/puffin
- third_party/pyjson5
- third_party/pyyaml
- third_party/rapidhash
- third_party/readability
- third_party/rnnoise
- third_party/rust
- third_party/ruy
- third_party/s2cellid
- third_party/search_engines_data
- third_party/securemessage
- third_party/selenium-atoms
- third_party/sentencepiece
- third_party/sentencepiece/src/third_party/darts_clone
- third_party/shell-encryption
- third_party/simdutf
- third_party/simplejson
- third_party/six
- third_party/skia
- third_party/skia/include/third_party/vulkan
- third_party/smhasher
- )
- use system-snappy || keeplibs+=(
- third_party/snappy
- )
- keeplibs+=(
- third_party/spirv-headers
- third_party/spirv-tools
- third_party/sqlite
- third_party/swiftshader
- third_party/swiftshader/third_party/astc-encoder
- third_party/swiftshader/third_party/llvm-subzero
- third_party/swiftshader/third_party/marl
- third_party/swiftshader/third_party/SPIRV-Headers/include/spirv
- third_party/swiftshader/third_party/SPIRV-Tools
- third_party/swiftshader/third_party/subzero
- third_party/tensorflow_models
- third_party/tensorflow-text
- third_party/tflite
- third_party/tflite/src/third_party/fft2d
- third_party/tflite/src/third_party/xla/third_party/tsl
- third_party/tflite/src/third_party/xla/xla/tsl/framework
- third_party/tflite/src/third_party/xla/xla/tsl/lib/random
- third_party/tflite/src/third_party/xla/xla/tsl/platform
- third_party/tflite/src/third_party/xla/xla/tsl/protobuf
- third_party/tflite/src/third_party/xla/xla/tsl/util
- third_party/ukey2
- third_party/utf
- third_party/vulkan
- third_party/wayland
- third_party/webdriver
- third_party/webgpu-cts
- third_party/webrtc
- third_party/webrtc/common_audio/third_party/ooura
- third_party/webrtc/common_audio/third_party/spl_sqrt_floor
- third_party/webrtc/modules/third_party/fft
- third_party/webrtc/modules/third_party/g711
- third_party/webrtc/modules/third_party/g722
- third_party/widevine
- )
- use system-woff2 || keeplibs+=(
- third_party/woff2
- )
- keeplibs+=(
- third_party/wuffs
- third_party/x11proto
- third_party/xcbproto
- third_party/xnnpack
- third_party/zlib/google
- third_party/zxcvbn-cpp
- url/third_party/mozilla
- v8/third_party/glibc
- v8/third_party/inspector_protocol
- v8/third_party/rapidhash-v8
- v8/third_party/siphash
- v8/third_party/utf8-decoder
- v8/third_party/v8
- v8/third_party/valgrind
-
- # gyp -> gn leftovers
- third_party/speech-dispatcher
- third_party/usb_ids
- )
-
- if use test; then
- keeplibs+=(
- third_party/breakpad/breakpad/src/processor
- third_party/fuzztest
- third_party/google_benchmark/src/include/benchmark
- third_party/google_benchmark/src/src
- third_party/test_fonts
- third_party/test_fonts/fontconfig
- third_party/test_fonts/test_fonts
- )
- fi
-
- # USE=system-*
- if ! use system-harfbuzz; then
- keeplibs+=( third_party/harfbuzz )
- fi
-
- if ! use system-ffmpeg; then
- keeplibs+=( third_party/ffmpeg third_party/opus )
- fi
-
- if ! use system-icu; then
- keeplibs+=( third_party/icu )
- fi
-
- if ! use system-zstd; then
- keeplibs+=( third_party/zstd )
- fi
-
- if ! use system-av1; then
- keeplibs+=(
- third_party/dav1d
- third_party/libaom
- third_party/libaom/source/libaom/third_party/fastfeat
- third_party/libaom/source/libaom/third_party/vector
- third_party/libaom/source/libaom/third_party/x86inc
- )
- fi
-
- if use libcxx; then
- keeplibs+=(
- third_party/libc++
- third_party/llvm-libc
- )
- fi
-
- if ! use system-openh264; then
- keeplibs+=( third_party/openh264 )
- fi
-
- if ! use system-re2; then
- keeplibs+=( third_party/re2 )
- fi
-
- # Arch-specific
- if use arm64 || use ppc64 ; then
- keeplibs+=( third_party/swiftshader/third_party/llvm-10.0 )
- fi
- # we need to generate ppc64 stuff because upstream does not ship it yet
- # it has to be done before unbundling.
- if use ppc64; then
- pushd third_party/libvpx >/dev/null || die
- mkdir -p source/config/linux/ppc64 || die
- # requires git and clang, bug #832803
- # Revert https://chromium.googlesource.com/chromium/src/+/b463d0f40b08b4e896e7f458d89ae58ce2a27165%5E%21/third_party/libvpx/generate_gni.sh
- # and https://chromium.googlesource.com/chromium/src/+/71ebcbce867dd31da5f8b405a28fcb0de0657d91%5E%21/third_party/libvpx/generate_gni.sh
- # since we're not in a git repo
- sed -i -e "s|^update_readme||g; s|clang-format|${EPREFIX}/bin/true|g; /^git -C/d; /git cl/d; /cd \$BASE_DIR\/\$LIBVPX_SRC_DIR/ign format --in-place \$BASE_DIR\/BUILD.gn\ngn format --in-place \$BASE_DIR\/libvpx_srcs.gni" \
- generate_gni.sh || die
- ./generate_gni.sh || die
- popd >/dev/null || die
-
- pushd third_party/ffmpeg >/dev/null || die
- cp libavcodec/ppc/h264dsp.c libavcodec/ppc/h264dsp_ppc.c || die
- cp libavcodec/ppc/h264qpel.c libavcodec/ppc/h264qpel_ppc.c || die
- popd >/dev/null || die
- fi
-
- # Sanity check keeplibs, on major version bumps it is often necessary to update this list
- # and this enables us to hit them all at once.
- # There are some entries that need to be whitelisted (TODO: Why? The file is understandable, the rest seem odd)
- whitelist_libs=(
- net/third_party/quic
- third_party/devtools-frontend/src/front_end/third_party/additional_readme_paths.json
- third_party/libjingle
- third_party/mesa
- third_party/skia/third_party/vulkan
- third_party/vulkan
- )
- local not_found_libs=()
- for lib in "${keeplibs[@]}"; do
- if [[ ! -d "${lib}" ]] && ! has "${lib}" "${whitelist_libs[@]}"; then
- not_found_libs+=( "${lib}" )
- fi
- done
-
- if [[ ${#not_found_libs[@]} -gt 0 ]]; then
- ewarn "The following \`keeplibs\` directories were not found in the source tree:"
- for lib in "${not_found_libs[@]}"; do
- ewarn " ${lib}"
- done
- fi
-
- keeplibs+=( third_party/ungoogled )
-
- # Remove most bundled libraries. Some are still needed.
- einfo "Unbundling third-party libraries ..."
- build/linux/unbundle/remove_bundled_libraries.py "${keeplibs[@]}" --do-remove || die
-
- # Interferes with our bundled clang path; we don't want stripped binaries anyway.
- sed -i -e 's|${clang_base_path}/bin/llvm-strip|/bin/true|g' \
- -e 's|${clang_base_path}/bin/llvm-objcopy|/bin/true|g' \
- build/linux/strip_binary.gni || die
-}
-
-src_configure() {
- # Calling this here supports resumption via FEATURES=keepwork
- python_setup
-
- # Bug 491582.
- export TMPDIR="${WORKDIR}/temp"
- mkdir -p -m 755 "${TMPDIR}" || die
-
- # https://bugs.gentoo.org/654216
- addpredict /dev/dri/ #nowarn
-
- # Use system-provided libraries.
- # TODO: freetype -- remove sources (https://bugs.chromium.org/p/pdfium/issues/detail?id=733).
- # TODO: use_system_hunspell (upstream changes needed).
- # TODO: use_system_protobuf (bug #525560).
- # TODO: use_system_sqlite (http://crbug.com/22208).
-
- # libevent: https://bugs.gentoo.org/593458
- local gn_system_libraries=(
- flac
- fontconfig
- freetype
- libjpeg
- libwebp
- libxml
- libxslt
- zlib
- )
- if use system-abseil-cpp; then
- gn_system_libraries+=(
- absl_algorithm
- absl_base
- absl_cleanup
- absl_container
- absl_crc
- absl_debugging
- absl_flags
- absl_functional
- absl_hash
- absl_log
- absl_log_internal
- absl_memory
- absl_meta
- absl_numeric
- absl_random
- absl_status
- absl_strings
- absl_synchronization
- absl_time
- absl_types
- absl_utility
- )
- fi
- if use system-brotli; then
- gn_system_libraries+=( brotli )
- fi
- if use system-crc32c; then
- gn_system_libraries+=( crc32c )
- fi
- if use system-double-conversion; then
- gn_system_libraries+=( double-conversion )
- fi
- if use system-woff2; then
- gn_system_libraries+=( woff2 )
- fi
- if use nvidia; then
- gn_system_libraries+=( libXNVCtrl )
- fi
- if use system-ffmpeg; then
- gn_system_libraries+=( ffmpeg opus )
- fi
- if use system-jsoncpp; then
- gn_system_libraries+=( jsoncpp )
- fi
- if use system-icu; then
- gn_system_libraries+=( icu )
- fi
- if use system-zstd; then
- gn_system_libraries+=( zstd )
- fi
- if use system-av1; then
- gn_system_libraries+=( dav1d libaom )
- fi
- if use system-libusb; then
- gn_system_libraries+=( libusb )
- fi
- if use system-libvpx; then
- gn_system_libraries+=( libvpx )
- fi
- use system-openh264 && gn_system_libraries+=(
- openh264
- )
- use system-re2 && gn_system_libraries+=(
- re2
- )
- use system-snappy && gn_system_libraries+=(
- snappy
- )
-
- build/linux/unbundle/replace_gn_files.py --system-libraries "${gn_system_libraries[@]}" ||
- die "Failed to replace GN files for system libraries"
-
- # TODO 131: The above call clobbers `enable_freetype = true` in the freetype gni file
- # drop the last line, then append the freetype line and a new curly brace to end the block
- local freetype_gni="build/config/freetype/freetype.gni"
- sed -i -e '$d' ${freetype_gni} || die
- echo " enable_freetype = true" >> ${freetype_gni} || die
- echo "}" >> ${freetype_gni} || die
-
- if use !custom-cflags; then
- replace-flags "-Os" "-O2"
- strip-flags
- # Debug info section overflows without component build
- # Prevent linker from running out of address space, bug #471810 .
- filter-flags "-g*"
- # 949123: Several multimedia components explicitly build with specific CFLAGS and
- # use runtime detection to enable optimisations; unfortunately any of our CFLAGS are suffixed
- # to the end of the command line, which causes build failures.
- use arm64 && filter-flags "-march*" "-mtune*" "-mcpu*"
- fi
-
- # We don't use the same clang version as upstream, and with -Werror
- # we need to make sure that we don't get superfluous warnings.
- append-flags -Wno-unknown-warning-option
- if tc-is-cross-compiler; then # can you cross-compile with the bundled toolchain?
- export BUILD_CXXFLAGS+=" -Wno-unknown-warning-option"
- export BUILD_CFLAGS+=" -Wno-unknown-warning-option"
- fi
-
- # Start building our GN options
- local myconf_gn=() # Tip: strings must be quoted, bools or numbers are fine
-
- if use !bundled-toolchain; then
- # We already forced the "correct" clang via pkg_setup
-
- if tc-is-cross-compiler; then
- CC="${CC} -target ${CHOST} --sysroot ${ESYSROOT}"
- CXX="${CXX} -target ${CHOST} --sysroot ${ESYSROOT}"
- BUILD_AR=${AR}
- BUILD_CC=${CC}
- BUILD_CXX=${CXX}
- BUILD_NM=${NM}
- fi
-
- # Make sure the build system will use the right tools, bug #340795.
- tc-export AR CC CXX NM
-
- strip-unsupported-flags
- append-ldflags -Wl,--undefined-version # https://bugs.gentoo.org/918897#c32
-
- myconf_gn+=(
- "is_clang=true"
- "clang_use_chrome_plugins=false"
- "use_clang_modules=false" # M141 enables this for the linux platform by default.
- "use_lld=true"
- 'custom_toolchain="//build/toolchain/linux/unbundle:default"'
- # From M127 we need to provide a location for libclang and the clang resource dir so that bindgen can find them
- "bindgen_libclang_path=\"$(get_llvm_prefix)/$(get_libdir)\""
- "bindgen_clang_resource_dir=\"${EPREFIX}/usr/lib/clang/${LLVM_SLOT}/include\""
- "bindgen_extra_clang_args=[\"-I${EPREFIX}/usr/lib/clang/${LLVM_SLOT}/include\"]"
- "clang_base_path=\"${EPREFIX}/usr/lib/clang/${LLVM_SLOT}/\""
- "rust_bindgen_root=\"${EPREFIX}/usr/\""
- "rust_sysroot_absolute=\"$(get_rust_prefix)\""
- "rustc_version=\"${RUST_SLOT}\""
- )
-
- if [[ ${LLVM_SLOT} -lt 23 ]]; then
- # Workaround for -fsanitize-ignore-for-ubsan-feature (added in LLVM 23)
- myconf_gn+=( 'clang_has_ubsan_feature_ignore=false' )
- fi
-
- if ! tc-is-cross-compiler; then
- myconf_gn+=( 'host_toolchain="//build/toolchain/linux/unbundle:default"' )
- else
- tc-export BUILD_{AR,CC,CXX,NM}
- myconf_gn+=(
- 'host_toolchain="//build/toolchain/linux/unbundle:host"'
- 'v8_snapshot_toolchain="//build/toolchain/linux/unbundle:host"'
- "host_pkg_config=\"$(tc-getBUILD_PKG_CONFIG)\""
- "pkg_config=\"$(tc-getPKG_CONFIG)\""
- )
-
- # setup cups-config, build system only uses --libs option
- if use cups; then
- mkdir "${T}/cups-config" || die
- cp "${ESYSROOT}/usr/bin/${CHOST}-cups-config" "${T}/cups-config/cups-config" || die
- export PATH="${PATH}:${T}/cups-config"
- fi
-
- # Don't inherit PKG_CONFIG_PATH from environment
- local -x PKG_CONFIG_PATH=
- fi
-
- fi # !bundled-toolchain
-
- local myarch
- myarch="$(tc-arch)"
- case ${myarch} in
- amd64)
- # Bug 530248, 544702, 546984, 853646.
- use !custom-cflags && filter-flags -mno-mmx -mno-sse2 -mno-ssse3 -mno-sse4.1 \
- -mno-avx -mno-avx2 -mno-fma -mno-fma4 -mno-xop -mno-sse4a
- myconf_gn+=( 'target_cpu="x64"' )
- ;;
- x86)
- # Bug 530248, 544702, 546984, 853646.
- use !custom-cflags && filter-flags -mno-mmx -mno-sse2 -mno-ssse3 -mno-sse4.1 \
- -mno-avx -mno-avx2 -mno-fma -mno-fma4 -mno-xop -mno-sse4a
- myconf_gn+=( 'target_cpu="x86"' )
- ;;
- arm64)
- myconf_gn+=( 'target_cpu="arm64"' )
- ;;
- ppc64)
- myconf_gn+=( 'target_cpu="ppc64"' )
- ;;
- *)
- die "Failed to determine target arch, got '${myarch}'."
- ;;
- esac
-
- # Common options
-
- myconf_gn+=(
- # Disable code formating of generated files
- "blink_enable_generated_code_formatting=false"
- # enable DCHECK with USE=debug only, increases chrome binary size by 30%, bug #811138.
- # DCHECK is fatal by default, make it configurable at runtime, #bug 807881.
- "dcheck_always_on=$(usex debug true false)"
- "dcheck_is_configurable=$(usex debug true false)"
- # Chromium builds provided by Linux distros should disable the testing config
- "disable_fieldtrial_testing_config=true"
- # Custom patch: Enable building Chromium as individual channels (e.g. stable, beta, dev) that
- # use different profile directories, desktop entries, etc. This enables slotting the ebuild.
- "enable_channel_branding=true"
- # 131 began laying the groundwork for replacing freetype with
- # "Rust-based Fontations set of libraries plus Skia path rendering"
- # We now need to opt-in
- "enable_freetype=true"
- "enable_hangout_services_extension=$(usex hangouts true false)"
- # Don't need nocompile checks and GN crashes with our config (verify with modern GN)
- "enable_nocompile_tests=false"
- # pseudolocales are only used for testing
- "enable_pseudolocales=false"
- "enable_widevine=$(usex widevine true false)"
- # Disable fatal linker warnings, bug 506268.
- "fatal_linker_warnings=false"
- # Component build isn't generally intended for use by end users. It's mostly useful
- # for development and debugging.
- "is_component_build=false"
- # GN needs explicit config for Debug/Release as opposed to inferring it from build directory.
- "is_debug=false"
- "is_official_build=$(usex official true false)"
- # Enable ozone wayland and/or headless support
- "ozone_auto_platforms=false"
- "ozone_platform_headless=true"
- # Enables building without non-free unRAR licence
- "safe_browsing_use_unrar=false"
- # "thin_lto_enable_optimizations=${use_lto}"
- "treat_warnings_as_errors=false"
- # Use in-tree libc++ (buildtools/third_party/libc++ and buildtools/third_party/libc++abi)
- # instead of the system C++ library for C++ standard library support.
- # default: true, but let's be explicit (forced since 120 ; USE removed 127).
- "use_custom_libcxx=true"
- # Enable ozone wayland and/or headless support
- "use_ozone=true"
- # The sysroot is the oldest debian image that chromium supports, we don't need it
- "use_sysroot=false"
- # See dependency logic in third_party/BUILD.gn
- "use_system_harfbuzz=$(usex system-harfbuzz true false)"
- # "use_thin_lto=${use_lto}"
- # Only enabled for clang, but gcc has endian macros too
- "v8_use_libm_trig_functions=true"
- )
-
- myconf_gn+=( "enable_iterator_debugging=$(usex debug true false)" )
-
- if use debug; then
- myconf_gn+=(
- "symbol_level=2"
- "blink_symbol_level=2"
- "v8_symbol_level=2"
- )
- else
- myconf_gn+=(
- "symbol_level=0"
- "blink_symbol_level=0"
- "v8_symbol_level=0"
- )
- fi
-
- if use bindist ; then
- myconf_gn+=(
- # If this is set to false Chromium won't be able to load any proprietary codecs
- # even if provided with an ffmpeg capable of h264/aac decoding
- "proprietary_codecs=true"
- 'ffmpeg_branding="Chrome"'
- # build ffmpeg as an external component (libffmpeg.so) that we can remove / substitute
- "is_component_ffmpeg=true"
- )
- else
- myconf_gn+=(
- "proprietary_codecs=$(usex proprietary-codecs true false)"
- "ffmpeg_branding=\"$(usex proprietary-codecs Chrome Chromium)\""
- )
- fi
-
- if use headless; then
- myconf_gn+=(
- "enable_print_preview=false"
- "enable_remoting=false"
- 'ozone_platform="headless"'
- "rtc_use_pipewire=false"
- "use_alsa=false"
- "use_cups=false"
- "use_gio=false"
- "use_glib=false"
- "use_gtk=false"
- "use_kerberos=false"
- "use_libpci=false"
- "use_pangocairo=false"
- "use_pulseaudio=false"
- "use_qt5=false"
- "use_qt6=false"
- "use_udev=false"
- "use_vaapi=false"
- "use_xkbcommon=false"
- )
- else
- myconf_gn+=(
- "gtk_version=$(usex gtk4 4 3)"
- # link pulseaudio directly (DT_NEEDED) instead of using dlopen.
- # helps with automated detection of ABI mismatches and prevents silent errors.
- "link_pulseaudio=$(usex pulseaudio true false)"
- "ozone_platform_wayland=$(usex wayland true false)"
- "ozone_platform_x11=$(usex X true false)"
- "ozone_platform=\"$(usex wayland wayland x11)\""
- "rtc_use_pipewire=$(usex screencast true false)"
- "use_cups=$(usex cups true false)"
- "use_kerberos=$(usex kerberos true false)"
- "use_pulseaudio=$(usex pulseaudio true false)"
- "use_qt5=false"
- "use_system_libffi=$(usex wayland true false)"
- "use_system_minigbm=true"
- "use_vaapi=$(usex vaapi true false)"
- "use_xkbcommon=true"
- )
- if use qt6; then
- local cbuild_libdir
- cbuild_libdir="$(get_libdir)"
- if tc-is-cross-compiler; then
- # Hack to workaround get_libdir not being able to handle CBUILD, bug #794181
- cbuild_libdir="$($(tc-getBUILD_PKG_CONFIG) --keep-system-libs --libs-only-L libxslt)"
- cbuild_libdir="${cbuild_libdir:2}"
- cbuild_libdir="${cbuild_libdir/% }"
- fi
- myconf_gn+=(
- "use_qt6=true"
- "moc_qt6_path=\"${EPREFIX}/usr/${cbuild_libdir}/qt6/libexec\""
- )
- else
- myconf_gn+=( "use_qt6=false" )
- fi
- fi
-
- # Explicitly disable ICU data file support for system-icu/headless builds.
- if use system-icu || use headless; then
- myconf_gn+=( "icu_use_data_file=false" )
- fi
-
- if use official; then
- # Allow building against system libraries in official builds
- sed -i 's/OFFICIAL_BUILD/GOOGLE_CHROME_BUILD/' \
- tools/generate_shim_headers/generate_shim_headers.py || die
- # Don't add symbols to build
- myconf_gn+=( "symbol_level=0" )
- fi
-
- if use pgo; then
- myconf_gn+=(
- "chrome_pgo_phase=2"
- "v8_enable_builtins_optimization=true"
- )
- else
- myconf_gn+=( "chrome_pgo_phase=0" )
- fi
-
- # Odds and ends
-
- # skipping typecheck is only supported on amd64, bug #876157
- if ! use amd64; then
- myconf_gn+=( "devtools_skip_typecheck=false" )
- fi
-
- # Disable external code space for V8 for ppc64. It is disabled for ppc64
- # by default, but cross-compiling on amd64 enables it again.
- if tc-is-cross-compiler && use ppc64; then
- myconf_gn+=( "v8_enable_external_code_space=false" )
- fi
-
- # This determines whether or not GN uses the bundled libcxx
- if use libcxx; then
- myconf_gn+=( "use_custom_libcxx=true" )
- else
- myconf_gn+=(
- "use_custom_libcxx=false"
- "use_llvm_libatomic=false"
- )
- append-cppflags -U_GLIBCXX_ASSERTIONS #See #318
- fi
-
- myconf_gn+=( "use_bluez=$(usex bluetooth true false)" )
-
- myconf_gn+=( "is_cfi=$(usex cfi true false)" )
-
- if use cfi; then
- myconf_gn+=(
- "use_cfi_icall=true"
- "use_cfi_cast=true"
- )
- fi
-
- myconf_gn+=(
- "optimize_webui=$(usex optimize-webui true false)"
- "use_system_freetype=$(usex system-harfbuzz true false)"
- "use_system_libopenjpeg2=$(usex system-openjpeg true false)"
- "enable_pdf=true"
- "use_system_lcms2=true"
- "enable_print_preview=true"
- "use_thin_lto=$(usex thinlto true false)"
- "thin_lto_enable_optimizations=$(usex optimize-thinlto true false)"
-
- # Ungoogled flags
- "build_with_tflite_lib=false"
- "enable_mdns=false"
- "enable_mse_mpeg2ts_stream_parser=$(usex proprietary-codecs true false)"
- "enable_remoting=false"
- "enable_reporting=false"
- "enable_service_discovery=false"
- "exclude_unwind_tables=true"
- "google_api_key=\"\""
- "google_default_client_id=\"\""
- "google_default_client_secret=\"\""
- "safe_browsing_mode=0"
- "use_official_google_api_keys=false"
- "use_unofficial_version_number=false"
-
- # "enable_swiftshader=false"
-
- # Additional flags
- # "perfetto_use_system_zlib=true"
- # "use_system_zlib=true"
- # "use_system_libjpeg=true"
- # "rtc_build_examples=false"
- # "enable_chromium_prelude=false"
- # "enable_updater=false"
- # "enable_update_notifications=false"
- # "enable_constraints=false"
- # "rtc_rusty_base64=false"
- # "v8_enable_temporal_support=false"
- # "media_use_symphonia=false"
- # "pdf_enable_rust_png=false"
- # "skia_use_libpng_encode=true"
- # "skia_use_libpng_decode=true"
- # "skia_use_rust_png_decode=false"
- # "skia_use_rust_png_encode=false"
- # "enable_jxl_decoder=false"
- )
-
- if use amd64 || use arm64; then
- myconf_gn+=(
- "v8_drumbrake_bounds_checks=true"
- # "v8_enable_drumbrake=true"
- )
- fi
-
- if use thinlto; then
- # We need to change the default value of import-instr-limit in
- # LLVM to limit the text size increase. The default value is
- # 100, and we change it to 30 to reduce the text size increase
- # from 25% to 10%. The performance number of page_cycler is the
- # same on two of the thinLTO configurations, we got 1% slowdown
- # on speedometer when changing import-instr-limit from 100 to 30.
- # append-ldflags "-Wl,-plugin-opt,-import-instr-limit=30"
- sed -i '/import_instr_limit = 5/{s++import_instr_limit = 30+;h};${x;/./{x;q0};x;q1}' \
- build/config/compiler/BUILD.gn || die
-
- append-ldflags "-Wl,--thinlto-jobs=$(makeopts_jobs)"
- fi
-
- # Facilitate deterministic builds (taken from build/config/compiler/BUILD.gn)
- append-cflags -Wno-builtin-macro-redefined
- append-cxxflags -Wno-builtin-macro-redefined
- append-cppflags "-D__DATE__= -D__TIME__= -D__TIMESTAMP__="
-
- local flags
- einfo "Building with the following compiler settings:"
- for flags in C{C,XX} AR NM RANLIB {C,CXX,CPP,LD}FLAGS \
- EXTRA_GN UGC_{SKIP_{PATCHES,SUBSTITUTION},KEEP_BINARIES} ; do
- einfo " ${flags} = \"${!flags}\""
- done
-
- # Since we build from tarballs, we need to set the channel here so that it can be used in the build.
- export CHROME_VERSION_EXTRA="${SLOT}"
-
- einfo "Configuring Chromium ..."
- set -- gn gen --args="${myconf_gn[*]}${EXTRA_GN:+ ${EXTRA_GN}}" out/Release
- echo "$@"
- "$@" || die "Failed to configure Chromium"
-
- # The "if" below should not be executed unless testing
- if [ ! -z "${NODIE}" ]; then
- # List all args
- # gn args --list out/Release
-
- # Quick compiler check
- eninja -C out/Release protoc torque
- fi
-}
-
-src_compile() {
- # Final link uses lots of file descriptors.
- ulimit -n 2048
-
- # Calling this here supports resumption via FEATURES=keepwork
- python_setup
-
- # I hate doing this but upstream Rust have yet to come up with a better solution for
- # us poor packagers. Required for Split LTO units, which are required for CFI.
- export RUSTC_BOOTSTRAP=1
-
- # Don't inherit PYTHONPATH from environment, bug #789021, #812689
- local -x PYTHONPATH=
-
- # Build mksnapshot and pax-mark it.
- if use pax-kernel; then
- local x
- for x in mksnapshot v8_context_snapshot_generator code_cache_generator; do
- if tc-is-cross-compiler; then
- eninja -C out/Release "host/${x}"
- pax-mark m "out/Release/host/${x}"
- else
- eninja -C out/Release "${x}"
- pax-mark m "out/Release/${x}"
- fi
- done
- fi
-
- # Even though ninja autodetects number of CPUs, we respect
- # user's options, for debugging with -j 1 or any other reason.
- eninja -C out/Release chrome chrome_sandbox $(use test && echo "base_unittests")
-
- pax-mark m out/Release/chrome
-
- # This codepath does minimal patching, so we're at the mercy of upstream
- # CFLAGS. This is fine - we're not intending to force this on users
- # and we do a lot of flag 'management' anyway.
- if use bundled-toolchain; then
- QA_FLAGS_IGNORED="
- usr/lib64/chromium-browser/chrome
- usr/lib64/chromium-browser/chrome-sandbox
- usr/lib64/chromium-browser/chromedriver
- usr/lib64/chromium-browser/chrome_crashpad_handler
- usr/lib64/chromium-browser/libEGL.so
- usr/lib64/chromium-browser/libGLESv2.so
- usr/lib64/chromium-browser/libVkICD_mock_icd.so
- usr/lib64/chromium-browser/libVkLayer_khronos_validation.so
- usr/lib64/chromium-browser/libqt6_shim.so
- usr/lib64/chromium-browser/libvk_swiftshader.so
- usr/lib64/chromium-browser/libvulkan.so.1
- "
- fi
-
- use convert-dict && eninja -C out/Release convert_dict
-
- use enable-driver && eninja -C out/Release chromedriver
- #use suid && eninja -C out/Release chrome_sandbox
-
- use enable-driver && mv out/Release/chromedriver{.unstripped,}
-
- rm -f out/Release/locales/*.pak.info || die
-
- # Generate support files (desktop file, manpage, etc.) See: #684550 #706786 #968958
- ${EPYTHON} "${FILESDIR}/generate-support-files.py" \
- --installdir "/usr/$(get_libdir)/ungoogled-chromium-browser" \
- --channel "${SLOT}" ||
- die "Failed to generate support files"
-}
-
-src_test() {
- # Tests may be flaky with usersandbox, and the test runner executes significantly faster without.
- # If you seem to be excluding too many tests for a particular milestone: comment them out, reboot, and
- # run the tests again. If that doesn't help, try FEATURES="-usersandbox" and send it because obviously the
- # chromium gods are not smiling upon you today. Do some runtime testing, obvs.
- local skip_tests=(
- # Wildcard exclusions (if all tests in a test suite are broken)
- 'AlternateTestParams/PartitionAllocDeathTest.RepeatedAllocReturnNullDirect/*'
- 'AlternateTestParams/PartitionAllocDeathTest.RepeatedReallocReturnNullDirect/*'
- 'AlternateTestParams/PartitionAllocTest.*' # 200+ tests, >= 1 crashes entire test runner with usersandbox.
- 'CheckExitCodeAfterSignalHandlerDeathTest.*'
- 'CriticalProcessAndThreadSpotChecks/HangWatcherAnyCriticalThreadTests.*'
- 'LazyThreadPoolTaskRunnerEnvironmentTest.*' # M142
- 'ToolsSanityTest.BadVirtualCall*'
- # requires en-us locale
- SysStrings.SysNativeMBAndWide
- SysStrings.SysNativeMBToWide
- SysStrings.SysWideToNativeMB
- # Specific test cases
- CancelableEventTest.BothCancelFailureAndSucceedOccurUnderContention
- FilePathTest.FromUTF8Unsafe_And_AsUTF8Unsafe
- HistogramTesterTest.PumaTestUniqueSample
- PathServiceTest.CheckedGetFailure
- PlatformThreadTest.CanChangeThreadType
- RawPtrTest.SetLookupUsesGetForComparison # M146 ; also broken for alpine in M144.
- RustLogIntegrationTest.CheckAllSeverity
- StackCanary.ChangingStackCanaryCrashesOnReturn
- StackTraceDeathTest.StackDumpSignalHandlerIsMallocFree
- TestLauncherTools.TruncateSnippetFocusedMatchesFatalMessagesTest
- ThreadPoolEnvironmentConfig.CanUseBackgroundPriorityForWorker
- )
- local test_filter="-$(IFS=:; printf '%s' "${skip_tests[*]}")"
- # test-launcher-bot-mode enables parallelism and plain output
- # Check individual tests with --gtest_filter=<test you want> --single-process-tests
- ./out/Release/base_unittests --test-launcher-bot-mode \
- --test-launcher-jobs="$(get_makeopts_jobs)" \
- --gtest_filter="${test_filter}" || die "Tests failed!"
-}
-
-src_install() {
- local browser_suffix
- if [[ "${SLOT}" != "stable" ]]; then
- browser_suffix="-${SLOT}"
- else
- browser_suffix=""
- fi
- local CHROMIUM_HOME="/usr/$(get_libdir)/ungoogled-chromium-browser${browser_suffix}"
- exeinto "${CHROMIUM_HOME}"
- doexe out/Release/chrome
-
- #newexe out/Release/chrome_sandbox chrome-sandbox
- #fperms 4755 "${CHROMIUM_HOME}/chrome-sandbox"
-
- use enable-driver && doexe out/Release/chromedriver
-
- #* https://github.com/ungoogled-software/ungoogled-chromium/pull/3563
- doexe out/Release/chrome_crashpad_handler
-
- if use convert-dict; then
- newexe "${FILESDIR}/update-dicts.sh" update-dicts.sh
- doexe out/Release/convert_dict
- fi
-
- ozone_auto_session () {
- use X && use wayland && ! use headless && echo true || echo false
- }
-
- cat <<- EOF > "${D}${CHROMIUM_HOME}/chromium-launcher.sh" || die
- #!/bin/bash
- # Wrapper to launch slotted Chromium via the chromium-common launcher script.
- export CHROME_DESKTOP="ungoogled-chromium-browser${browser_suffix}.desktop"
- export CHROME_EXEC_NAME="ungoogled-chromium-browser${browser_suffix}"
- export CHROME_VERSION_EXTRA="${SLOT}"
- export CHROME_WRAPPER="\$(readlink -f "\$0")"
- export OZONE_AUTO_SESSION=$(ozone_auto_session)
-
- exec /usr/libexec/chromium/chromium-launcher.sh "\$@"
- EOF
-
- chmod 755 "${D}${CHROMIUM_HOME}/chromium-launcher.sh" || die
-
- # It is important that we name the target "chromium-browser",
- # xdg-utils expect it; bug #355517.
- dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/ungoogled-chromium-browser${browser_suffix}
- # keep the old symlink around for consistency
- dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/ungoogled-chromium${browser_suffix}
-
- use enable-driver && dosym "${CHROMIUM_HOME}/chromedriver" /usr/bin/ungoogled-chromedriver${browser_suffix}
-
- pushd out/Release/locales > /dev/null || die
- chromium_remove_language_paks
- popd > /dev/null || die
-
- insinto "${CHROMIUM_HOME}"
- doins out/Release/*.bin
- doins out/Release/*.pak
- doins -r out/Release/hyphen-data
-
- if use bindist; then
- # We built libffmpeg as a component library, but we can't distribute it
- # with proprietary codec support. Remove it and make a symlink to the requested
- # system library.
- rm -f out/Release/libffmpeg.so \
- || die "Failed to remove bundled libffmpeg.so (with proprietary codecs)"
- # symlink the libffmpeg.so from either ffmpeg-chromium or ffmpeg[chromium].
- einfo "Creating symlink to libffmpeg.so from $(usex ffmpeg-chromium ffmpeg-chromium ffmpeg[chromium])..."
- dosym ../chromium/libffmpeg.so$(usex ffmpeg-chromium .${PV%%\.*} "") \
- /usr/$(get_libdir)/ungoogled-chromium-browser/libffmpeg.so
- fi
-
- (
- shopt -s nullglob
- local files=(out/Release/*.so out/Release/*.so.[0-9])
- [[ ${#files[@]} -gt 0 ]] && doins "${files[@]}"
- )
-
- if ! use system-icu && ! use headless; then
- doins out/Release/icudtl.dat
- fi
-
- doins -r out/Release/locales
- #doins -r out/Release/MEIPreload
-
- # Install vk_swiftshader_icd.json; bug #827861
- doins out/Release/vk_swiftshader_icd.json
-
- if [[ -d out/Release/swiftshader ]]; then
- insinto "${CHROMIUM_HOME}/swiftshader"
- doins out/Release/swiftshader/*.so
- fi
-
- use widevine && dosym WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so "${CHROMIUM_HOME}/libwidevinecdm.so"
-
- # Install icons
- local branding size
- for size in 16 24 32 48 64 128 256 ; do
- case ${size} in
- 16|32) branding="chrome/app/theme/default_100_percent/chromium" ;;
- *) branding="chrome/app/theme/chromium" ;;
- esac
- newicon -s ${size} "${branding}/product_logo_${size}.png" \
- ungoogled-chromium-browser${browser_suffix}.png
- done
-
- # Install desktop entry
- domenu out/Release/ungoogled-chromium-browser${browser_suffix}.desktop
-
- # Install GNOME default application entry (bug #303100).
- insinto /usr/share/gnome-control-center/default-apps
- doins out/Release/ungoogled-chromium-browser${browser_suffix}.xml
-
- # Install AppStream metadata
- insinto /usr/share/appdata
- doins out/Release/ungoogled-chromium-browser${browser_suffix}.appdata.xml
-
- # Install manpage; bug #684550
- doman out/Release/ungoogled-chromium-browser${browser_suffix}.1
- dosym ungoogled-chromium-browser${browser_suffix}.1 /usr/share/man/man1/ungoogled-chromium${browser_suffix}.1
-
- readme.gentoo_create_doc
-}
-
-pkg_postrm() {
- xdg_icon_cache_update
- xdg_desktop_database_update
-}
-
-pkg_postinst() {
- xdg_icon_cache_update
- xdg_desktop_database_update
- readme.gentoo_print_elog
-
- if use !headless && [[ -z "${REPLACING_VERSIONS}" ]]; then
- if use vaapi; then
- elog "Hardware-accelerated video decoding configuration:"
- elog
- elog "Chromium supports multiple backends for hardware acceleration. To enable one,"
- elog " Add to CHROMIUM_FLAGS in /etc/chromium/default:"
- elog
- elog "1. VA-API with OpenGL (recommended for most users):"
- elog " --enable-features=AcceleratedVideoDecodeLinuxGL"
- elog " VaapiVideoDecoder may need to be added as well, but try without first."
- elog
- if use wayland; then
- elog "2. Enhanced Wayland/EGL performance:"
- elog " --enable-features=AcceleratedVideoDecodeLinuxGL,AcceleratedVideoDecodeLinuxZeroCopyGL"
- elog
- fi
- if use X; then
- elog "$(usex wayland "3" "2"). VA-API with Vulkan:"
- elog " --enable-features=VaapiVideoDecoder,VaapiIgnoreDriverChecks,Vulkan,DefaultANGLEVulkan,VulkanFromANGLE"
- elog
- if use wayland; then
- elog " NOTE: Vulkan acceleration requires X11 and will not work under Wayland sessions."
- elog " Use OpenGL-based acceleration instead when running under Wayland."
- elog
- fi
- fi
- elog "Additional options:"
- elog " To enable hardware-accelerated encoding (if supported)"
- elog " add 'AcceleratedVideoEncoder' to your feature list"
- elog " VaapiIgnoreDriverChecks bypasses driver compatibility checks"
- elog " (may be needed for newer/unsupported hardware)"
- elog
- else
- elog "This Chromium build was compiled without VA-API support, which provides"
- elog "hardware-accelerated video decoding."
- fi
- if use screencast; then
- elog "Screencast is disabled by default at runtime. Either enable it"
- elog "by navigating to chrome://flags/#enable-webrtc-pipewire-capturer"
- elog "inside Chromium or add --enable-features=WebRTCPipeWireCapturer"
- elog "to CHROMIUM_FLAGS in /etc/chromium/default."
- elog
- elog "Additional setup may be required for screencasting to work."
- elog "See issue: https://github.com/PF4Public/gentoo-overlay/issues/314"
- fi
- if use gtk4; then
- elog "Chromium prefers GTK3 over GTK4 at runtime. To override this"
- elog "behaviour you need to pass --gtk-version=4, e.g. by adding it"
- elog "to CHROMIUM_FLAGS in /etc/chromium/default."
- fi
- if use widevine; then
- elog "widevine requires binary plugins, which are distributed separately"
- elog "Make sure you have www-plugins/chrome-binary-plugins installed"
- fi
- fi
-
- if systemd_is_booted && ! [[ -f "/etc/machine-id" ]]; then
- ewarn "The lack of an '/etc/machine-id' file on this system booted with systemd"
- ewarn "indicates that the Gentoo handbook was not followed to completion."
- ewarn ""
- ewarn "Chromium is known to behave unpredictably with this system configuration;"
- ewarn "please complete the configuration of this system before logging any bugs."
- fi
-
- # Stable slot doesn't change profile directory, and it's vanishingly unlikely that users will downgrade from dev.
- if [[ -n "${REPLACING_VERSIONS}" ]]; then
- local replacing_non_slotted=false
- # there could be more than one PVR
- for version in ${REPLACING_VERSIONS}; do
- if ver_test "${version}" -le "145.0.7632.116"; then
- replacing_non_slotted=true
- break
- fi
- done
- if ${replacing_non_slotted}; then
- ewarn "This version of Chromium has replaced a non-slotted ebuild."
- if [[ ${SLOT} != "stable" ]]; then
- ewarn "This channel has its own profile directory, so your existing profile will not be used."
- ewarn "To use your existing profile, either copy or move it to the new location."
- ewarn "See https://wiki.gentoo.org/wiki/Chromium#Profile_Directories for more information."
- ewarn ""
- fi
- ewarn "Any existing Progressive Web Apps (PWAs) will need to be reinstalled,"
- ewarn "or have the path in the desktop files updated to point to the new wrapper script."
- fi
- fi
-}
-
-eapply_wrapper () {
- if [ ! -z "${NODIE}" ]; then
- nonfatal eapply "$@"
- else
- eapply "$@"
- fi
-}
-
-git_wrapper () {
- if [ ! -z "${NODIE}" ]; then
- git "$@"
- else
- git "$@" || die
- fi
-}
-
-filter_wrapper () {
- einfo "Applying ${i##*/}"
- #? fuzz factor of 3 is OK?
- if [ ! -z "${NODIE}" ]; then
- filterdiff -p1 "${@:2}" < "$1" | patch -F 3 -p1
- else
- filterdiff -p1 "${@:2}" < "$1" | patch -F 3 -p1 || die
- fi
-}
diff --git a/www-client/ungoogled-chromium/ungoogled-chromium-149.0.7827.200_p1.ebuild b/www-client/ungoogled-chromium/ungoogled-chromium-149.0.7827.200_p1.ebuild
deleted file mode 100644
index 81ae6541a5ce..000000000000
--- a/www-client/ungoogled-chromium/ungoogled-chromium-149.0.7827.200_p1.ebuild
+++ /dev/null
@@ -1,2512 +0,0 @@
-# Copyright 2009-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-# Use following environment variables to customise the build
-# EXTRA_GN — pass extra options to gn
-# NINJAOPTS="-k0 -j8" useful to populate ccache even if ebuild is still failing
-# UGC_SKIP_PATCHES — space-separated list of patches to skip
-# UGC_KEEP_BINARIES — space-separated list of binaries to keep
-# UGC_SKIP_SUBSTITUTION — space-separated list of files to skip domain substitution
-
-# USE=bundled-toolchain is intended for users who want to use the same toolchain
-# as the upstream releases. It's also a good fallback in case we fall behind
-# and need to get a release out quickly (less likely with `dev` in-tree).
-# We can't rely on it as a default since the toolchain is only shipped for x86-64;
-# other architectures will need to use system toolchain.
-
-# Since m133 we are using CI-generated tarballs from
-# https://github.com/chromium-linux-tarballs/chromium-tarballs/
-
-# These are bit-for-bit identical to the official releases, but are built
-# using an external CI system that we have some control over, in case
-# issues pop up again with official tarball generation.
-
-GN_MIN_VER=0.2374
-# chromium-tools/get-chromium-toolchain-strings.py (or just use Chromicler)
-# Node for M145+ should be 24.12.0 but that's not packaged in Gentoo yet. See #969145
-TEST_FONT="9c07d19d9c5ee1ff94f717e6fb17e0c8c354e6f9"
-BUNDLED_CLANG_VER="llvmorg-23-init-10931-g20b6ec66-8"
-BUNDLED_RUST_VER="4c4205163abcbd08948b3efab796c543ba1ea687-2"
-RUST_SHORT_HASH=${BUNDLED_RUST_VER:0:10}-${BUNDLED_RUST_VER##*-}
-NODE_VER="24.12.0"
-ESBUILD_VER="0.25.1"
-ROLLUP_VER="4.57.1" # currently manual.
-
-CHROMIUM_LANGS="af am ar as az be bg bn bs ca cs cy da de el en-GB es es-419 et eu fa fi fil
- fr fr-CA gl gu he hi hr hu hy id is it ja ka kk km kn ko ky lo lt lv mk ml mn mr ms my
- nb ne nl or pa pl pt-BR pt-PT ro ru si sk sl sq sr sr-Latn sv sw ta te th tr uk ur uz
- vi zh-CN zh-HK zh-TW zu"
-
-#UGC_COMMIT_ID="8f30897faa373a0bdb533c67fc017b68ad388900"
-# UGC_PR_COMMITS=(
-# c917e096342e5b90eeea91ab1f8516447c8756cf
-# 5794e9d12bf82620d5f24505798fecb45ca5a22d
-# )
-
-CROMITE_COMMIT_ID="cb3baf14f52eb4365d017f640f85310735c19b79"
-
-#declare -A CHROMIUM_COMMITS=(
-# ["fcfb1a42813f1e9d8babedc7bb2e0f06101a3151"]="." #148+
-# ["-acb47d9a6b56c4889a2ed4216e9968cfc740086c"]="."
-# # ["-37c28a19804e47a68eabf3cf882a310689fc325b"]="." #disable style check for cromite
-# # ["cd5a0df905a28faa89ff2a4ab44f893f84dc4487"]="net/third_party/quiche/src"
-#)
-
-LLVM_COMPAT=( 21 22 23 )
-PYTHON_COMPAT=( python3_{13..14} )
-PYTHON_REQ_USE="xml(+)"
-RUST_MIN_VER=1.91.0
-RUST_NEEDS_LLVM="yes please"
-RUST_OPTIONAL="yes" # Not actually optional, but we don't need system Rust (or LLVM) with USE=bundled-toolchain
-RUST_REQ_USE="rustfmt" # Upstream run rustfmt on bindgen output, so we need it to be available.
-
-inherit check-reqs chromium-2 desktop flag-o-matic llvm-r1 multiprocessing ninja-utils pax-utils
-inherit python-any-r1 readme.gentoo-r1 rust systemd toolchain-funcs xdg-utils
-
-DESCRIPTION="Modifications to Chromium for removing Google integration and enhancing privacy"
-HOMEPAGE="https://github.com/ungoogled-software/ungoogled-chromium"
-PPC64_HASH="a85b64f07b489b8c6fdb13ecf79c16c56c560fc6"
-PATCH_V="${PV%%\.*}-2"
-COPIUM_COMMIT="b00f26bb5e0781020da5f830981472a142c6baf1"
-SRC_URI="https://github.com/chromium-linux-tarballs/chromium-tarballs/releases/download/${PV/_*}/chromium-${PV/_*}-linux.tar.xz
- https://deps.gentoo.zip/www-client/chromium/rollup-wasm-node-${ROLLUP_VER}.tgz
- https://gitlab.com/Matt.Jolly/chromium-patches/-/archive/${PATCH_V}/chromium-patches-${PATCH_V}.tar.bz2
- !bundled-toolchain? (
- https://codeberg.org/selfisekai/copium/archive/${COPIUM_COMMIT}.tar.gz
- -> chromium-patches-copium-${COPIUM_COMMIT:0:10}.tar.gz
- )
- bundled-toolchain? (
- https://commondatastorage.googleapis.com/chromium-browser-clang/Linux_x64/clang-${BUNDLED_CLANG_VER}.tar.xz
- -> chromium-clang-${BUNDLED_CLANG_VER}.tar.xz
- https://commondatastorage.googleapis.com/chromium-browser-clang/Linux_x64/rust-toolchain-${BUNDLED_RUST_VER}-${BUNDLED_CLANG_VER%-*}.tar.xz
- -> chromium-rust-toolchain-${RUST_SHORT_HASH}-${BUNDLED_CLANG_VER%-*}.tar.xz
- )
- test? (
- https://chromium-fonts.storage.googleapis.com/${TEST_FONT} -> chromium-testfonts-${TEST_FONT:0:10}.tar.gz
- )
- ppc64? (
- https://gitlab.raptorengineering.com/raptor-engineering-public/chromium/openpower-patches/-/archive/${PPC64_HASH}/openpower-patches-${PPC64_HASH}.tar.bz2 -> chromium-openpower-${PPC64_HASH:0:10}.tar.bz2
- )
-"
-
-# Gentoo tarball:
-# https://chromium-tarballs.distfiles.gentoo.org/chromium-${PV/_*}.tar.xz -> chromium-${PV/_*}-gentoo.tar.xz
-
-# chromium-linux-tarballs
-# https://github.com/chromium-linux-tarballs/chromium-tarballs/releases/download/${PV/_*}/chromium-${PV/_*}-linux.tar.xz
-
-# Official tarball:
-# https://commondatastorage.googleapis.com/chromium-browser-official/chromium-${PV/_*}${LITE_TARBALL:+-lite}.tar.xz
-
-# https://gitweb.gentoo.org/proj/chromium-tools.git/tree/get-chromium-licences.py @ 145.0.7632.76
-LICENSE="Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD BSD-2 Base64 Boost-1.0 CC-BY-3.0 CC-BY-4.0 Clear-BSD FFT2D FTL"
-LICENSE+=" IJG ISC LGPL-2 LGPL-2.1 MIT MPL-1.1 MPL-2.0 Ms-PL PSF-2 SGI-B-2.0 SSLeay SunSoft Unicode-3.0"
-LICENSE+=" Unicode-DFS-2015 Unlicense UoI-NCSA ZLIB libtiff openssl"
-LICENSE+=" cromite? ( GPL-3 )"
-
-SLOT="stable"
-KEYWORDS="amd64 ~arm64 ~ppc64 ~x86"
-
-IUSE_SYSTEM_LIBS="abseil-cpp av1 brotli crc32c double-conversion ffmpeg +harfbuzz icu jsoncpp +libusb libvpx +openh264 openjpeg re2 snappy woff2 +zstd"
-IUSE="+X bindist bluetooth bundled-toolchain cfi convert-dict cups custom-cflags debug ffmpeg-chromium enable-driver gtk4 hangouts headless kerberos +libcxx nvidia +official optimize-thinlto optimize-webui override-data-dir pax-kernel pgo"
-IUSE+=" +proprietary-codecs pulseaudio qt6 screencast selinux test thinlto cromite vaapi wayland widevine cpu_flags_ppc_vsx3"
-RESTRICT="
- !bindist? ( bindist )
- !test? ( test )
- arm64? ( test )
- !system-ffmpeg? ( proprietary-codecs? ( bindist ) )
- !system-openh264? ( bindist )
- cromite? ( bindist )"
-
-REQUIRED_USE="
- !headless? ( || ( X wayland ) )
- screencast? ( wayland )
- ffmpeg-chromium? ( bindist proprietary-codecs )
- optimize-thinlto? ( thinlto )
- cfi? ( thinlto )
- x86? ( !thinlto !widevine )
- debug? ( !official )
- vaapi? ( !system-av1 !system-libvpx )
-"
-
-UGC_PV="${PV/_p/-}"
-UGC_PF="${PN}-${UGC_PV}"
-UGC_URL="https://github.com/ungoogled-software/${PN}/archive/"
-
-if [ -z "$UGC_COMMIT_ID" ]; then
- UGC_URL="${UGC_URL}${UGC_PV}.tar.gz -> ${UGC_PF}.tar.gz"
- UGC_WD="${WORKDIR}/${UGC_PF}"
-else
- UGC_URL="${UGC_URL}${UGC_COMMIT_ID}.tar.gz -> ${PN}-${UGC_COMMIT_ID}.tar.gz"
- UGC_WD="${WORKDIR}/ungoogled-chromium-${UGC_COMMIT_ID}"
-fi
-
-SRC_URI+="${UGC_URL}
-"
-
-if [ ! -z "${UGC_PR_COMMITS[*]}" ]; then
- for i in "${UGC_PR_COMMITS[@]}"; do
- SRC_URI+="https://github.com/ungoogled-software/${PN}/commit/$i.patch?full_index=true -> ${PN}-$i.patch
- "
- done
-fi
-
-if [ ! -z "${CHROMIUM_COMMITS[*]}" ]; then
- # for i in "${CHROMIUM_COMMITS[@]}"; do
- for i in "${!CHROMIUM_COMMITS[@]}"; do
- if [[ ${CHROMIUM_COMMITS[$i]} =~ webrtc ]]; then
- #TODO: is it safe to use this mirror?
- SRC_URI+="https://github.com/webrtc-mirror/webrtc/commit/${i/-}.patch?full_index=true -> webrtc-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ angle ]]; then
- SRC_URI+="https://github.com/google/angle/commit/${i/-}.patch?full_index=true -> angle-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ quiche ]]; then
- SRC_URI+="https://github.com/google/quiche/commit/${i/-}.patch?full_index=true -> quiche-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ dawn ]]; then
- SRC_URI+="https://github.com/google/dawn/commit/${i/-}.patch?full_index=true -> dawn-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ perfetto ]]; then
- SRC_URI+="https://github.com/google/perfetto/commit/${i/-}.patch?full_index=true -> perfetto-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ink ]]; then
- SRC_URI+="https://github.com/google/ink/commit/${i/-}.patch?full_index=true -> ink-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ vulkan-utility-libraries ]]; then
- SRC_URI+="https://github.com/KhronosGroup/Vulkan-Utility-Libraries/commit/${i/-}.patch?full_index=true -> vulkan-utility-libraries-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ruy ]]; then
- SRC_URI+="https://github.com/google/ruy/commit/${i/-}.patch?full_index=true -> ruy-${i/-}.patch
- "
- else
- SRC_URI+="https://github.com/chromium/chromium/commit/${i/-}.patch?full_index=true -> chromium-${i/-}.patch
- "
- fi
- done
-fi
-
-SRC_URI+="cromite? ( https://github.com/uazo/cromite/archive/${CROMITE_COMMIT_ID}.tar.gz -> cromite-${CROMITE_COMMIT_ID}.tar.gz )
-"
-
-for i in ${IUSE_SYSTEM_LIBS}; do
- [[ $i =~ ^(\+)?(.*)$ ]]
- IUSE+=" ${BASH_REMATCH[1]}system-${BASH_REMATCH[2]}"
-done
-
-COMMON_X_DEPEND="
- x11-libs/libXcomposite:=
- x11-libs/libXcursor:=
- x11-libs/libXdamage:=
- x11-libs/libXfixes:=
- >=x11-libs/libXi-1.6.0:=
- x11-libs/libXrandr:=
- x11-libs/libXrender:=
- x11-libs/libXtst:=
- x11-libs/libxshmfence:=
-"
-
-# sys-libs/zlib: https://bugs.gentoo.org/930365; -ng is not compatible.
-# We _could_ use the bundled minizip, but that's against policy.
-COMMON_SNAPSHOT_DEPEND="
- system-icu? ( >=dev-libs/icu-78:= )
- system-abseil-cpp? ( >=dev-cpp/abseil-cpp-20260107.0 )
- system-brotli? ( >=app-arch/brotli-9999 )
- system-crc32c? ( dev-libs/crc32c )
- system-double-conversion? ( dev-libs/double-conversion )
- system-woff2? ( media-libs/woff2 )
- system-snappy? ( app-arch/snappy )
- system-jsoncpp? ( dev-libs/jsoncpp )
- system-openjpeg? ( media-libs/openjpeg:2= )
- system-re2? ( >=dev-libs/re2-0.2019.08.01:= )
- system-libvpx? ( >=media-libs/libvpx-1.13.0:=[postproc] )
- system-libusb? ( virtual/libusb:1 )
- cromite? ( dev-util/patchutils )
- >=dev-libs/libxml2-2.12.4:=[icu]
- dev-libs/nspr:=
- >=dev-libs/nss-3.26:=
- dev-libs/libxslt:=
- media-libs/fontconfig:=
- >=media-libs/freetype-2.11.0-r1:=
- system-harfbuzz? ( >=media-libs/harfbuzz-3:0=[icu(-)] )
- media-libs/libjpeg-turbo:=
- media-libs/libpng:=
- system-zstd? ( >=app-arch/zstd-1.5.5:= )
- >=media-libs/libwebp-0.4.0:=
- media-libs/mesa:=[gbm(+)]
- >=media-libs/openh264-2.6.0:=
- system-av1? (
- >=media-libs/dav1d-1.0.0:=
- >=media-libs/libaom-3.7.0:=
- )
- sys-libs/zlib:=
- !headless? (
- dev-libs/glib:2
- >=media-libs/alsa-lib-1.0.19:=
- pulseaudio? (
- || (
- media-libs/libpulse
- >=media-sound/apulse-0.1.9
- )
- )
- sys-apps/pciutils:=
- kerberos? ( virtual/krb5 )
- vaapi? ( >=media-libs/libva-2.7:=[X?,wayland?] )
- X? (
- x11-base/xorg-proto:=
- x11-libs/libX11:=
- x11-libs/libxcb:=
- x11-libs/libXext:=
- )
- x11-libs/libxkbcommon:=
- wayland? (
- dev-libs/libffi:=
- dev-libs/wayland:=
- screencast? (
- media-video/pipewire:=
- || (
- sys-apps/xdg-desktop-portal-gnome
- sys-apps/xdg-desktop-portal-gtk
- kde-plasma/xdg-desktop-portal-kde
- gui-libs/xdg-desktop-portal-lxqt
- gui-libs/xdg-desktop-portal-wlr
- )
- )
- )
- )
-"
-
-COMMON_DEPEND="
- ${COMMON_SNAPSHOT_DEPEND}
- app-arch/bzip2:=
- dev-libs/expat:=
- system-ffmpeg? (
- >=media-video/ffmpeg-6.1:=
- >=media-libs/opus-1.3.1:=
- )
- net-misc/curl[ssl]
- sys-apps/dbus:=
- media-libs/flac:=
- sys-libs/zlib:=[minizip]
- !headless? (
- >=app-accessibility/at-spi2-core-2.46.0:2
- media-libs/mesa:=[X?,wayland?]
- virtual/udev
- x11-libs/cairo:=
- x11-libs/gdk-pixbuf:2
- x11-libs/pango:=
- cups? ( >=net-print/cups-1.3.11:= )
- qt6? ( dev-qt/qtbase:6[gui,widgets] )
- X? ( ${COMMON_X_DEPEND} )
- )
-"
-RDEPEND="${COMMON_DEPEND}
- !www-client/ungoogled-chromium:0
- >=www-client/chromium-common-2
- !headless? (
- || (
- x11-libs/gtk+:3[X?,wayland?]
- gui-libs/gtk:4[X?,wayland?]
- )
- qt6? ( dev-qt/qtbase:6[X?,wayland?] )
- )
- virtual/ttf-fonts
- selinux? ( sec-policy/selinux-chromium )
- bindist? (
- ffmpeg-chromium? ( media-video/ffmpeg-chromium:${PV%%\.*} )
- )
- !override-data-dir? (
- !www-client/chromium:${SLOT}
- !www-client/cromite:${SLOT}[-override-data-dir]
- )
-"
-
-DEPEND="${COMMON_DEPEND}
- !headless? (
- gtk4? ( gui-libs/gtk:4[X?,wayland?] )
- !gtk4? ( x11-libs/gtk+:3[X?,wayland?] )
- )
-"
-
- # pgo? ( >=llvm-core/clang-22.0.0_pre20260106 >=llvm-core/lld-22.0.0_pre20260106 )
-BDEPEND="
- ${COMMON_SNAPSHOT_DEPEND}
- ${PYTHON_DEPS}
- $(python_gen_any_dep '
- dev-python/setuptools[${PYTHON_USEDEP}]
- ')
- >=app-arch/gzip-1.7
- !headless? (
- qt6? ( dev-qt/qtbase:6 )
- )
- !bundled-toolchain? ( $(llvm_gen_dep '
- llvm-core/clang:${LLVM_SLOT}
- llvm-core/llvm:${LLVM_SLOT}
- llvm-core/lld:${LLVM_SLOT}
- cfi? ( llvm-runtimes/clang-runtime:${LLVM_SLOT}[sanitize] )
- official? (
- !ppc64? ( llvm-runtimes/compiler-rt-sanitizers:${LLVM_SLOT}[cfi] )
- ) ')
- ${RUST_DEPEND}
- )
- >=dev-util/bindgen-0.72.1
- >=dev-build/gn-${GN_MIN_VER}
- app-alternatives/ninja
- dev-lang/perl
- >=dev-util/gperf-3.2
- dev-util/esbuild:${ESBUILD_VER}
- dev-vcs/git
- >=net-libs/nodejs-${NODE_VER}[inspector]
- sys-apps/hwdata
- >=sys-devel/bison-2.4.3
- sys-devel/flex
- virtual/pkgconfig
- x11-misc/xdg-utils
-"
-
-if ! has chromium_pkg_die ${EBUILD_DEATH_HOOKS}; then
- EBUILD_DEATH_HOOKS+=" chromium_pkg_die";
-fi
-
-DISABLE_AUTOFORMATTING="yes"
-DOC_CONTENTS="
-Some web pages may require additional fonts to display properly.
-Try installing some of the following packages if some characters
-are not displayed properly:
-- media-fonts/arphicfonts
-- media-fonts/droid
-- media-fonts/ipamonafont
-- media-fonts/noto
-- media-fonts/ja-ipafonts
-- media-fonts/takao-fonts
-- media-fonts/wqy-microhei
-- media-fonts/wqy-zenhei
-
-To fix broken icons on the Downloads page, you should install an icon
-theme that covers the appropriate MIME types, and configure this as your
-GTK+ icon theme.
-
-For native file dialogs in KDE, install kde-apps/kdialog.
-
-To make password storage work with your desktop environment you may
-have install one of the supported credentials management applications:
-- app-crypt/libsecret (GNOME)
-- kde-frameworks/kwallet (KDE)
-If you have one of above packages installed, but don't want to use
-them in Chromium, then add --password-store=basic to CHROMIUM_FLAGS
-in /etc/chromium/default.
-"
-
-S="${WORKDIR}/chromium-${PV/_*}"
-
-python_check_deps() {
- python_has_version "dev-python/setuptools[${PYTHON_USEDEP}]"
-}
-
-pre_build_checks() {
- # Check build requirements: bugs #471810, #541816, #914220
- # We're going to start doing maths here on the size of an unpacked source tarball,
- # this should make updates easier as chromium continues to balloon in size.
- # xz -l /var/cache/distfiles/chromium-${PV}*.tar.xz
- local base_disk=9 # Round up
- use test && base_disk=$((base_disk + 5))
- local extra_disk=1 # Always include a little extra space
- local memory=4
- tc-is-cross-compiler && extra_disk=$((extra_disk * 2))
- if tc-is-lto || use pgo; then
- memory=$((memory * 2 + 1))
- tc-is-cross-compiler && extra_disk=$((extra_disk * 2)) # Double the requirements
- use pgo && extra_disk=$((extra_disk + 4))
- fi
- if is-flagq '-g?(gdb)?([1-9])'; then
- if use custom-cflags; then
- extra_disk=$((extra_disk + 5))
- fi
- memory=$((memory * 2))
- fi
- local CHECKREQS_MEMORY="${memory}G"
- local CHECKREQS_DISK_BUILD="$((base_disk + extra_disk))G"
- check-reqs_${EBUILD_PHASE_FUNC}
-}
-
-pkg_pretend() {
- if [[ ${MERGE_TYPE} != binary ]]; then
- # The pre_build_checks are all about compilation resources, no need to run it for a binpkg
- pre_build_checks
- fi
-
- if use headless; then
- local headless_unused_flags=("cups" "kerberos" "pulseaudio" "qt6" "vaapi" "wayland")
- for myiuse in ${headless_unused_flags[@]}; do
- use ${myiuse} && ewarn "Ignoring USE=${myiuse}, USE=headless is set."
- done
- fi
-
- if ! use bindist && use ffmpeg-chromium; then
- ewarn "Ignoring USE=ffmpeg-chromium, USE=bindist is not set."
- fi
- if use libcxx; then
- ewarn
- ewarn "Building with libcxx, please be aware that system-*"
- ewarn "and some other c++ dependencies need to be compiled"
- ewarn "with the same c++ library as ungoogled-chromium itself"
- ewarn "dev-libs/jsoncpp is most problematic, see #58 #49 #119 for details"
- ewarn "Simplest solution would be to disable corresponding system-* flags"
- ewarn
- fi
- if use cfi; then
- ewarn
- ewarn "Building with cfi is only possible if building with -stdlib=libc++"
- ewarn "Make sure all dependencies are also built this way, see #40"
- ewarn
- fi
- if use cromite; then
- ewarn
- ewarn "Cromite patches are very experimental and unstable"
- ewarn "Please consider testing them and giving feedback upstream:"
- ewarn "https://github.com/uazo/cromite/issues"
- ewarn "Not all patches are applied, let me know if others should be considered too"
- ewarn
- fi
-}
-
-pkg_setup() {
- if [[ ${MERGE_TYPE} != binary ]]; then
- # The pre_build_checks are all about compilation resources, no need to run it for a binpkg
- pre_build_checks
-
- # We haven't massaged any CFLAGS yet, so we want to do this before we force CC/CXX to prevent warnings.
- local want_lto="false"
- tc-is-lto && want_lto="true"
-
- # The linux:unbundle toolchain in GN grabs CC, CXX, CPP (etc) from the environment
- # We'll set these to clang here then use llvm-utils functions to very explicitly set these
- # to a sane value.
- # This is effectively the 'force-clang' path if GCC support is re-added.
- if use !bundled-toolchain; then
- llvm-r1_pkg_setup
- rust_pkg_setup
-
- # Forcing clang; respect llvm_slot_x to enable selection of impl via LLVM_COMPAT
- AR=llvm-ar
- CPP="${CHOST}-clang++-${LLVM_SLOT} -E"
- NM=llvm-nm
- CC="${CHOST}-clang-${LLVM_SLOT}"
- CXX="${CHOST}-clang++-${LLVM_SLOT}"
- fi
-
- use_lto="false"
- local lto_usable="true"
- if [[ "$want_lto" == "true" ]]; then
- if use arm64 && [[ "${LLVM_SLOT}" -lt 22 ]]; then
- einfo "LTO is broken with LLVM 21 on arm64, ignoring CFLAGS."
- lto_usable="false"
- else
- use_lto="true"
- fi
- # We can rely on GN to do this for us; without this builds
- # take significantly longer with LTO enabled.
- filter-lto
- fi
-
- if [[ "$use_lto" == "false" ]] && use official && [[ "$lto_usable" == "true" ]]; then
- einfo "USE=official selected and LTO not detected."
- einfo "It is _highly_ recommended that LTO be enabled for performance reasons"
- einfo "and to be consistent with the upstream \"official\" build optimisations."
- fi
-
- if [[ "$use_lto" == "false" ]] && use test; then
- die "Tests require CFI which requires LTO"
- fi
-
- export use_lto
-
- # 936858
- if tc-ld-is-mold; then
- eerror "Your toolchain is using the mold linker."
- eerror "This is not supported by Chromium."
- die "Please switch to a different linker."
- fi
-
- if tc-is-cross-compiler; then
- use pgo && die "The pgo USE flag cannot be used when cross-compiling"
- CPP="${CBUILD}-clang++-${LLVM_SLOT} -E"
- fi
-
- # Sanity checks for development convenience
- if ver_test $(gn --version || die) -lt ${GN_MIN_VER}; then
- die "dev-build/gn >= ${GN_MIN_VER} is required to build this Chromium"
- fi
-
- # Sometimes, when adding a new LLVM slot, devs (me) forget to install an appropriate lld.
- local lld_ver=$(ld.lld --version | awk '{split($2,a,"."); print a[1]}' || die "Failed to check lld version")
- if [[ ${lld_ver} -lt ${LLVM_SLOT} ]]; then
- die "Your lld version (${lld_ver}) is too old for the selected LLVM slot (${LLVM_SLOT}). Please install a newer lld or select an older LLVM slot."
- fi
- fi
-
- chromium_suid_sandbox_check_kernel_config
-}
-
-src_unpack() {
- # # Here be dragons!
- # local XCLD="--exclude=chromium-${PV/_*}/third_party/instrumented_libs \
- # --exclude=chromium-${PV/_*}/third_party/llvm \
- # --exclude=chromium-${PV/_*}/third_party/llvm-build \
- # --exclude=chromium-${PV/_*}/third_party/node/linux \
- # --exclude=chromium-${PV/_*}/third_party/rust-src \
- # --exclude=chromium-${PV/_*}/third_party/rust-toolchain \
- # --exclude=chromium-${PV/_*}/build/linux/debian_bullseye_i386-sysroot \
- # --exclude=chromium-${PV/_*}/build/linux/debian_bullseye_amd64-sysroot \
- # --exclude=chromium-${PV/_*}/third_party/angle/third_party/VK-GL-CTS \
- # "
-
- # if ! use libcxx ; then
- # XCLD+=" --exclude=chromium-${PV/_*}/third_party/libc++"
- # fi
-
- # if ! use pgo ; then
- # XCLD+=" --exclude=chromium-${PV/_*}/chrome/build/pgo_profiles"
- # fi
-
- # einfo "Unpacking chromium-${PV/_*}.tar.xz to ${WORKDIR}"
- # # Gentoo tarball:
- # # tar ${XCLD} -xf "${DISTDIR}/chromium-${PV/_*}-gentoo.tar.xz" -C "${WORKDIR}" || die
- # tar ${XCLD} -xf "${DISTDIR}/chromium-${PV/_*}${LITE_TARBALL:+-lite}.tar.xz" -C "${WORKDIR}" || die
-
- # unpack ${UGC_URL#*->}
- # # unpack chromium-patches-${PATCH_V}.tar.bz2
- # # Warned you!
-
- unpack chromium-${PV/_*}-linux.tar.xz
- unpack chromium-patches-${PATCH_V}.tar.bz2
- # These should only be required when we're not using the official toolchain
- if use !bundled-toolchain; then
- unpack chromium-patches-copium-${COPIUM_COMMIT:0:10}.tar.gz
- fi
-
- if use test; then
- # This just contains a bunch of font files that need to be unpacked (or moved) to the correct location.
- local testfonts_dir="${WORKDIR}/chromium-${PV/_*}/third_party/test_fonts/test_fonts"
- local testfonts_tar="${DISTDIR}/chromium-testfonts-${TEST_FONT:0:10}.tar.gz"
- einfo "Unpacking test fonts ..."
- tar xf "${testfonts_tar}" -C "${testfonts_dir}" || die "Failed to unpack testfonts"
- fi
-
- # We need to manually unpack this since M126 else we'd unpack one toolchain over the other.
- # Since we're doing that anyway let's unpack to sensible locations to make symlink creation easier.
- if use bundled-toolchain; then
- einfo "Unpacking bundled Clang ..."
- mkdir -p "${WORKDIR}"/clang || die "Failed to create clang directory"
- tar xf "${DISTDIR}/chromium-clang-${BUNDLED_CLANG_VER}.tar.xz" -C "${WORKDIR}/clang" || die "Failed to unpack Clang"
- einfo "Unpacking bundled Rust ..."
- local rust_dir="${WORKDIR}/rust-toolchain"
- mkdir -p "${rust_dir}" || die "Failed to create rust toolchain directory"
- tar xf "${DISTDIR}/chromium-rust-toolchain-${RUST_SHORT_HASH}-${BUNDLED_CLANG_VER%-*}.tar.xz" -C "${rust_dir}" ||
- die "Failed to unpack Rust"
- fi
-
- if use ppc64; then
- unpack chromium-openpower-${PPC64_HASH:0:10}.tar.bz2
- fi
-
- # This is a dirty hack, but we need rollup to build successfully and it's proving to be challenging
- # to build locally due to deps
- unpack rollup-wasm-node-${ROLLUP_VER}.tgz
-
- if use cromite; then
- unpack cromite-${CROMITE_COMMIT_ID}.tar.gz
- fi
-
- unpack ${UGC_URL#*->}
-}
-
-remove_compiler_builtins() {
- # We can't use the bundled compiler builtins with the system toolchain
- # We used to `grep` then `sed`, but it was indirect. Combining the two into a single
- # `awk` command is more efficient and lets us document the logic more clearly.
-
- local pattern=' configs += [ "//build/config/clang:compiler_builtins" ]'
- local target='build/config/compiler/BUILD.gn'
-
- local tmpfile
- tmpfile=$(mktemp) || die "Failed to create temporary file."
-
- if awk -v pat="${pattern}" '
- BEGIN {
- match_found = 0
- }
-
- # If the delete countdown is active, decrement it and skip to the next line.
- d > 0 { d--; next }
-
- # If the current line matches the pattern...
- $0 == pat {
- match_found = 1 # ...set our flag to true.
- d = 2 # Set delete counter for this line and the next two.
- prev = "" # Clear the buffered previous line so it is not printed.
- next
- }
-
- # For any other line, print the buffered previous line.
- NR > 1 { print prev }
-
- # Buffer the current line to be printed on the next cycle.
- { prev = $0 }
-
- END {
- # Print the last line if it was not part of a deleted block.
- if (d == 0) { print prev }
-
- # If the pattern was never found, exit with a failure code.
- if (match_found == 0) {
- exit 1
- }
- }
- ' "${target}" > "${tmpfile}"; then
- # AWK SUCCEEDED (exit code 0): The pattern was found and edited.
- # This is to avoid gawk's `-i inplace` option which users complain about.
- mv "${tmpfile}" "${target}"
- else
- # AWK FAILED (exit code 1): The pattern was not found.
- rm -f "${tmpfile}"
- die "Awk patch failed: Pattern not found in ${target}."
- fi
-}
-
-src_prepare() {
- # Calling this here supports resumption via FEATURES=keepwork
- python_setup
-
- # We'll fill this in as we go. Patches go in chromium-patches.
- local PATCHES=()
-
- rm "${WORKDIR}/chromium-patches-${PATCH_V}/common/cr131-unbundle-icu-target.patch"
- if ver_test "${RUST_SLOT}" -ge "1.95.0"; then
- rm "${WORKDIR}/chromium-patches-${PATCH_V}/rust/cr146-fix-botched-bytemuck-roll.patch"
- sed -i '/SupportedLaneCount/d' third_party/rust/chromium_crates_io/vendor/bytemuck-v1/src/zeroable.rs || die
- sed -i '/SupportedLaneCount/d' third_party/rust/chromium_crates_io/vendor/bytemuck-v1/src/pod.rs || die
- fi
-
- #cp -f ${WORKDIR}/chromium-patches-${PATCH_V}/*-compiler.patch "${T}/compiler.patch"
- ##cp -f ${FILESDIR}/chromium-147-compiler.patch "${T}/compiler.patch"
- #if ! use custom-cflags; then #See #25 #92
- # sed -i '/default_stack_frames/Q' "${T}/compiler.patch" || die
- #fi
-
- PATCHES+=( "${WORKDIR}/chromium-patches-${PATCH_V}/common/" )
- PATCHES+=( "${FILESDIR}/restore-x86-r3.patch" )
-
- # https://issues.chromium.org/issues/442698344
- # Unreleased fontconfig changed magic numbers and google have rolled to this version
- if has_version "<=media-libs/fontconfig-2.17.1"; then
- PATCHES+=( "${FILESDIR}/chromium-142-work-with-old-fontconfig.patch" )
- fi
-
- if use bundled-toolchain; then
- # We need to symlink the toolchain into the expected location
- einfo "Symlinking Clang toolchain to expected location ..."
- mkdir -p third_party/llvm-build/ || die "Failed to create llvm-build directory"
- # the 'Chromium Linux Tarballs' seem to already have 'Release+Asserts/{lib,bin}'; not sure if this is an
- # upstream change - we're using the same scripts to build, theoretically. We'll still attempt to create
- # llvm-build, but we'll rm Release+Asserts and symlink directly.
- if [[ -d third_party/llvm-build/Release+Asserts ]]; then
- rm -r third_party/llvm-build/Release+Asserts || die "Failed to remove third_party/llvm-build/Release+Asserts"
- fi
- ln -s "${WORKDIR}"/clang third_party/llvm-build/Release+Asserts || die "Failed to bundle Clang"
- einfo "Symlinking Rust toolchain to expected location ..."
- # As above, so below
- if [[ -d third_party/rust-toolchain ]]; then
- rm -r third_party/rust-toolchain || die "Failed to remove third_party/rust-toolchain"
- fi
- ln -s "${WORKDIR}"/rust-toolchain third_party/rust-toolchain || die "Failed to bundle rust"
- cp "${WORKDIR}"/rust-toolchain/VERSION \
- "${WORKDIR}"/rust-toolchain/INSTALLED_VERSION || die "Failed to set rust version"
- else
- # We don't need our toolchain patches if we're using the official toolchain
-
- # Copium patches go here.
- PATCHES+=(
- "${WORKDIR}/copium/cr143-libsync-__BEGIN_DECLS.patch"
- "${WORKDIR}/copium/cr149-unbundle-minizip-undo-unicode.patch"
- )
-
- # Automate conditional application of chromium-patches
- # The directory structure is expected to be something like:
- # chromium-patches-145/
- # ├── toolchain/
- # │ ├── cr123-foo.patch
- # │ └── cr135-bar.patch
- # ├── llvm/
- # │ ├── cr144-baz.patch
- # │ └── lt-23/
- # │ └── cr145-bleeding-edge-llvm-feature.patch
- # Where `lt-23` means "apply this patch if the LLVM version is less than 23".
- # Only categories in `slot_map` will be checked for version constraints.
- shopt -s nullglob
- local -A slot_map=( [llvm]="${LLVM_SLOT}" [rust]="${RUST_SLOT}" )
-
- for category in "${WORKDIR}/chromium-patches-${PATCH_V}"/*/; do
- local category_name="${category%/}"
- category_name="${category_name##*/}"
-
- # Skip arch-specific categories
- if [[ "${category_name}" == "ppc64le" ]]; then
- use ppc64 || continue
- fi
-
- # We applied common patches above, no need to apply them again here
- [[ "${category_name}" == "common" ]] && continue
-
- # Unconditional patches for this category
- local category_patches=( "${category}"*.patch )
- [[ ${#category_patches[@]} -gt 0 ]] && PATCHES+=( "${category}" )
-
- # Version-constrained subdirectories (e.g., llvm/lt-23/)
- for constraint_dir in "${category}"*/; do
- local dir_name="${constraint_dir%/}"
- dir_name="${dir_name##*/}"
- if [[ "${dir_name}" =~ ^lt-(.*)$ && -v slot_map[${category_name}] ]]; then
- ver_test "${slot_map[${category_name}]}" -lt "${BASH_REMATCH[1]}" &&
- PATCHES+=( "${constraint_dir}" )
- fi
- done
- done
-
- shopt -u nullglob
-
- # Strictly speaking this doesn't need to be gated (no bundled toolchain for ppc64); it keeps the logic together
- if use ppc64; then
- local patchset_dir="${WORKDIR}/openpower-patches-${PPC64_HASH}/patches"
- # patch causes build errors on 4K page systems (https://bugs.gentoo.org/show_bug.cgi?id=940304)
- local page_size_patch="ppc64le/third_party/use-sysconf-page-size-on-ppc64.patch"
- local isa_3_patch="ppc64le/core/baseline-isa-3-0.patch"
- # Apply the OpenPOWER patches (check for page size and isa 3.0)
- openpower_patches=( $(grep -E "^ppc64le|^upstream" "${patchset_dir}/series" | grep -v "${page_size_patch}" |
- grep -v "${isa_3_patch}" || die) )
- for patch in "${openpower_patches[@]}"; do
- PATCHES+=( "${patchset_dir}/${patch}" )
- done
- if [[ $(getconf PAGESIZE) == 65536 ]]; then
- PATCHES+=( "${patchset_dir}/${page_size_patch}" )
- fi
- # We use vsx3 as a proxy for 'want isa3.0' (POWER9)
- if use cpu_flags_ppc_vsx3 ; then
- PATCHES+=( "${patchset_dir}/${isa_3_patch}" )
- fi
- fi
-
- remove_compiler_builtins
-
- # We can't rely on the eselect'd Rust to actually include rustfmt, so we'll point to the selected slot specifically.
- local suffix=""
- if [[ "${RUST_TYPE}" == "binary" ]]; then
- suffix="-bin-${RUST_SLOT}"
- else
- suffix="-${RUST_SLOT}"
- fi
- sed -i "s|/bin/rustfmt|/bin/rustfmt${suffix}|g" build/rust/rust_bindgen_generator.gni ||
- die "Failed to update rustfmt path"
-
- fi
-
- # Do this before we apply patches since (e.g.) ppc64 needs to patch rollup and it's easier in ${S}
- einfo "Moving rollup wasm-node package into place ..."
- mkdir -p third_party/devtools-frontend/src/node_modules/@rollup/wasm-node ||
- die "Failed to create node_modules/@rollup/wasm-node"
- mv "${WORKDIR}"/package/* third_party/devtools-frontend/src/node_modules/@rollup/wasm-node ||
- die "Failed to move rollup package"
-
- if [ ! -z "${CHROMIUM_COMMITS[*]}" ]; then
- # for i in "${CHROMIUM_COMMITS[@]}"; do
- for i in "${!CHROMIUM_COMMITS[@]}"; do
- if [[ ${CHROMIUM_COMMITS[$i]} =~ webrtc ]]; then
- patch_prefix="webrtc"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ angle ]]; then
- patch_prefix="angle"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ quiche ]]; then
- patch_prefix="quiche"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ dawn ]]; then
- patch_prefix="dawn"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ perfetto ]]; then
- patch_prefix="perfetto"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ink ]]; then
- patch_prefix="ink"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ vulkan-utility-libraries ]]; then
- patch_prefix="vulkan-utility-libraries"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ruy ]]; then
- patch_prefix="ruy"
- else
- patch_prefix="chromium"
- fi
- pushd "${CHROMIUM_COMMITS[$i]}" > /dev/null || die
- if [[ $i = -* ]]; then
- einfo "Reverting ${patch_prefix}-${i/-}.patch"
- git_wrapper apply -R --exclude="*unittest.cc" --exclude="DEPS" \
- -p1 < "${DISTDIR}/${patch_prefix}-${i/-}.patch"
- else
- einfo "Applying ${patch_prefix}-${i/-}.patch"
- git_wrapper apply --exclude="*unittest.cc" --exclude="DEPS" \
- -p1 < "${DISTDIR}/${patch_prefix}-${i/-}.patch"
- fi
- popd > /dev/null || die
- done
- fi
-
- if ! use bluetooth ; then
- PATCHES+=(
- "${FILESDIR}/disable-bluez-r7.patch"
- )
- fi
-
- if use convert-dict ; then
- PATCHES+=(
- "${FILESDIR}/chromium-ucf-dict-utility-r3.patch"
- )
- fi
-
- if ! use libcxx ; then
- PATCHES+=(
- "${FILESDIR}/fix-wayland-oncecallback-copy.patch"
- )
- fi
-
- if use system-ffmpeg; then
- PATCHES+=(
- "${FILESDIR}/chromium-141-opus-mp3.patch"
- "${FILESDIR}/chromium-135-hevc.patch"
- )
- sed -i "\!AVFMT_FLAG_NOH264PARSE!d" media/filters/ffmpeg_glue.cc || die
- ewarn "You need to expose \"av_stream_get_first_dts\" in ffmpeg via user patch"
- fi
-
- if use system-av1; then
- PATCHES+=(
- "${FILESDIR}/chromium-system-av1.patch"
- )
- fi
-
- if use system-libvpx; then
- PATCHES+=(
- "${FILESDIR}/chromium-system-libvpx.patch"
- )
- fi
-
- if use system-openjpeg ; then
- PATCHES+=(
- "${FILESDIR}/chromium-system-openjpeg-r4.patch"
- )
- fi
-
- if use x86 ; then
- #* Fixes a segfault in transport_security_state_generator
- PATCHES+=(
- "${FILESDIR}/fix-segfault-x86.patch"
- )
- fi
-
- # Testing all patches when NODIE is defined
- if [ ! -z "${NODIE}" ]; then
- for i in "${PATCHES[@]}"; do
- eapply_wrapper "$i"
- done
- nonfatal eapply_user
- else
- default
- fi
-
- if use cromite ; then
- BR_PA_PATH="${WORKDIR}/cromite-${CROMITE_COMMIT_ID}/build/patches"
-
- sed -i '/b\/components\/components_strings\.grd/,+10d' "${BR_PA_PATH}/Add-cromite-flags-support.patch" || die
- sed -i '/b\/chrome\/android\/java\/res\/xml\/privacy_preferences\.xml/,+13d' "${BR_PA_PATH}/Add-cromite-flags-support.patch" || die
- sed -i '/b\/android_webview\/support_library\/java\/src\/org\/chromium\/support_lib_glue/,+11d' "${BR_PA_PATH}/Client-hints-overrides.patch" || die
- sed -i '/webapps_strings.grdp" \/>/{s++webapps_strings.grdp" /><part file="cromite_components_strings_grd/placeholder.txt"/>+;h};${x;/./{x;q0};x;q1}' \
- components/components_strings.grd || die
-
- sed -i 's/absl::/std::/' "${BR_PA_PATH}/Add-a-proxy-configuration-page.patch" || die
-
- filterdiff -p1 "${BR_PA_PATH}/JIT-site-settings.patch" --exclude="content/browser/renderer_host/render_process_host_impl.cc" \
- > "${BR_PA_PATH}/JIT-site-settings.patch1"
- mv -f "${BR_PA_PATH}/JIT-site-settings.patch1" "${BR_PA_PATH}/JIT-site-settings.patch"
-
- BROMITE_PATCHES=(
- "${BR_PA_PATH}/bromite-build-utils.patch"
- "${BR_PA_PATH}/Battery-API-return-nothing.patch"
- "${BR_PA_PATH}/Multiple-fingerprinting-mitigations.patch"
- "${BR_PA_PATH}/Add-flag-to-configure-maximum-connections-per-host.patch"
- "${BR_PA_PATH}/Add-a-proxy-configuration-page.patch"
- "${BR_PA_PATH}/Enable-StrictOriginIsolation-and-SitePerProcess.patch"
- "${BR_PA_PATH}/Disable-requests-for-single-word-Omnibar-searches.patch"
- "${BR_PA_PATH}/Reduce-HTTP-headers-in-DoH-requests-to-bare-minimum.patch"
- "${BR_PA_PATH}/Client-hints-overrides.patch"
- "${BR_PA_PATH}/Disable-idle-detection.patch"
- "${BR_PA_PATH}/Disable-TLS-resumption.patch"
- "${BR_PA_PATH}/Remove-navigator.connection-info.patch"
-
- "${BR_PA_PATH}/AudioBuffer-AnalyserNode-fp-mitigations.patch"
- "${BR_PA_PATH}/Fonts-fingerprinting-mitigation.patch"
- "${BR_PA_PATH}/Content-settings-infrastructure.patch"
- "${BR_PA_PATH}/Add-autoplay-site-setting.patch"
- "${BR_PA_PATH}/Site-setting-for-images.patch"
- "${BR_PA_PATH}/JIT-site-settings.patch"
- "${BR_PA_PATH}/Add-webGL-site-setting.patch"
- "${BR_PA_PATH}/Add-webRTC-site-settings.patch"
- "${BR_PA_PATH}/Show-site-settings-for-cookies-javascript-and-ads.patch"
- "${BR_PA_PATH}/Viewport-Protection-flag.patch"
- "${BR_PA_PATH}/Revert-remove-allowscript-content-setting-secondary-url.patch"
- "${BR_PA_PATH}/Timezone-customization.patch"
- "${BR_PA_PATH}/Disable-speechSynthesis-getVoices-API.patch"
- "${BR_PA_PATH}/Remove-support-for-device-memory-and-cpu-recovery.patch"
- "${BR_PA_PATH}/Disable-Feeback-Collector.patch"
- "${BR_PA_PATH}/Disable-remote-altsvc-for-h3-connections.patch"
- "${BR_PA_PATH}/Add-cromite-flags-support.patch"
- "${BR_PA_PATH}/Enables-deactivation-of-the-js-debugger-statement.patch"
- )
- for i in "${BROMITE_PATCHES[@]}"; do
- if [[ "$i" =~ "Add-autoplay-site-setting.patch" ]] ||
- [[ "$i" =~ "JIT-site-settings.patch" ]] ||
- [[ "$i" =~ "Site-setting-for-images.patch" ]]; then
- einfo "Git binary patch: ${i##*/}"
- git_wrapper apply -p1 < "$i"
- else
- filter_wrapper "$i" --exclude="chrome/android/*"
- fi
- done
-
- #! conflicting patches
- sed -i '/browser_features.cc/,+17d' \
- "${UGC_WD}/patches/extra/ungoogled-chromium/add-flag-to-clear-data-on-exit.patch" || die
- sed -i 's$} // namespace features$BASE_FEATURE(kClearDataOnExit, "ClearDataOnExit", base::FEATURE_DISABLED_BY_DEFAULT);}$' \
- chrome/browser/browser_features.cc || die
- sed -i 's$} // namespace features$BASE_DECLARE_FEATURE(kClearDataOnExit);}$' \
- chrome/browser/browser_features.h || die
- sed -i 's$kChromeUIAboutHost,$kChromeUIAboutHost,"ungoogled-first-run",$' \
- chrome/common/webui_url_constants.cc || die
- sed -i '/chrome\/common\/webui_url_constants.cc/Q' \
- "${UGC_WD}/patches/extra/ungoogled-chromium/first-run-page.patch" || die
-
- #! normalise paths in py
- sed -i 's$os.path.dirname(include_file)$os.path.abspath(os.path.dirname(include_file))$' \
- build/bromite/gyp/cpp_bromite_include.py || die
- fi
-
- # if [[ ${LLVM_SLOT} == "19" ]]; then
- # # Upstream now hard depend on a feature that was added in LLVM 20.1, but we don't want to stabilise that yet.
- # # Do the temp file shuffle in case someone is using something other than `gawk`
- # {
- # awk '/config\("clang_warning_suppression"\) \{/ { print $0 " }"; sub(/clang/, "xclang"); print; next }
- # { print }' build/config/compiler/BUILD.gn > "${T}/build.gn" && \
- # mv "${T}/build.gn" build/config/compiler/BUILD.gn
- # } || die "Unable to disable warning suppression"
- # fi
-
- ## Not included in -lite tarballs, but we should check for it anyway.
- #if [[ -f third_party/node/linux/node-linux-x64/bin/node ]]; then
- # rm third_party/node/linux/node-linux-x64/bin/node || die
- #else
- # mkdir -p third_party/node/linux/node-linux-x64/bin || die
- #fi
- #ln -s "${EPREFIX}"/usr/bin/node third_party/node/linux/node-linux-x64/bin/node || die
-
- cp "${FILESDIR}/libusb.gn" build/linux/unbundle || die
- sed -i '/^REPLACEMENTS.*$/{s++REPLACEMENTS = {"libusb":"third_party/libusb/BUILD.gn",+;h};${x;/./{x;q0};x;q1}' \
- build/linux/unbundle/replace_gn_files.py || die
- sed -i '/^.*deps.*third_party\/jsoncpp.*$/{s++public_deps \+= [ "//third_party/jsoncpp" ]+;h};${x;/./{x;q0};x;q1}' \
- third_party/webrtc/rtc_base/BUILD.gn || die
-
- if use override-data-dir; then
- sed -i '/"chromium";/{s++"ungoogled-chromium";+;h};${x;/./{x;q0};x;q1}' \
- chrome/common/chrome_paths_linux.cc || die
- fi
-
- if use system-abseil-cpp; then
- eapply_wrapper "${FILESDIR}/chromium-147-system-abseil.patch"
-
- #! SFINAE mangling incompatibility between clang and gcc:
- #! https://github.com/llvm/llvm-project/issues/85656
- #! gcc: _ZN4absl12lts_202601074CordC1INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELi0EEEOT_
- #! clang: _ZN4absl12lts_202601074CordC1INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEETnNSt9enable_ifIXsr3std7is_sameIT_S8_EE5valueEiE4typeELi0EEEOSA_
- #! So, either this:
- eapply_wrapper "${FILESDIR}/chromium-141-system-abseil-cord.patch"
- #! or build with -fclang-abi-compat=17
-
- # cp -f /usr/include/absl/base/options.h third_party/abseil-cpp/absl/base/options.h
- # sed -i '/^#define ABSL_OPTION_USE_STD_ORDERING.*$/{s++#define ABSL_OPTION_USE_STD_ORDERING 1+;h};${x;/./{x;q0};x;q1}' \
- # third_party/abseil-cpp/absl/base/options.h || die
- fi
-
- #* Applying UGC PRs here
- if [ ! -z "${UGC_PR_COMMITS[*]}" ]; then
- pushd "${UGC_WD}" >/dev/null
- for i in "${UGC_PR_COMMITS[@]}"; do
- eapply_wrapper "${DISTDIR}/${PN}-$i.patch"
- done
- popd >/dev/null
- fi
-
- # From here we adapt ungoogled-chromium's patches to our needs
- local ugc_pruning_list="${UGC_WD}/pruning.list"
- local ugc_patch_series="${UGC_WD}/patches/series"
- local ugc_substitution_list="${UGC_WD}/domain_substitution.list"
-
- local ugc_unneeded=(
- # GN bootstrap
- extra/debian/gn/parallel
- # following Gentoo's Chromium
- core/ungoogled-chromium/build-with-wasm-rollup
- )
-
- if use cromite ; then
- einfo "Using fingerprinting patches from Cromite instead"
- ugc_unneeded+=(
- extra/bromite/fingerprinting-flags-client-rects-and-measuretext
- extra/bromite/flag-max-connections-per-host
- extra/bromite/flag-fingerprinting-canvas-image-data-noise
- extra/ungoogled-chromium/add-components-ungoogled
- extra/ungoogled-chromium/remove-pac-size-limit
- )
- fi
-
- # #* Temporary fix
- # sed -i "\!ios/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/icu/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/libjpeg_turbo/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/snappy/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/closure_compiler/!d" "${ugc_pruning_list}" || die
-
- # #* Didn't unpack them at the first place
- # sed -i "\!build/linux/debian_bullseye_i386-sysroot!d" "${ugc_pruning_list}" || die
- # sed -i "\!build/linux/debian_bullseye_amd64-sysroot!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/llvm-build!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/node/linux!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/rust-src!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/rust-toolchain!d" "${ugc_pruning_list}" || die
- # if ! use libcxx ; then
- # sed -i "\!third_party/libc!d" "${ugc_pruning_list}" || die
- # fi
- sed -i "s|debug('files|error('files|" \
- "${UGC_WD}/utils/prune_binaries.py" || die
- sed -i "\!third_party/node/linux!d" \
- "${UGC_WD}/utils/prune_binaries.py" || die
-
- local ugc_p ugc_dir
- for p in "${ugc_unneeded[@]}"; do
- einfo "Removing ${p}.patch"
- sed -i "\!${p}.patch!d" "${ugc_patch_series}" || die
- done
-
- if [ ! -z "${UGC_SKIP_PATCHES}" ]; then
- for p in ${UGC_SKIP_PATCHES}; do
- ewarn "Removing ${p}"
- sed -i "\!${p}!d" "${ugc_patch_series}" || die
- done
- fi
-
- if [ ! -z "${UGC_KEEP_BINARIES}" ]; then
- for p in ${UGC_KEEP_BINARIES}; do
- ewarn "Keeping binary ${p}"
- sed -i "\!${p}!d" "${ugc_pruning_list}" || die
- done
- fi
-
- if [ ! -z "${UGC_SKIP_SUBSTITUTION}" ]; then
- for p in ${UGC_SKIP_SUBSTITUTION}; do
- ewarn "No substitutions in ${p}"
- sed -i "\!${p}!d" "${ugc_substitution_list}" || die
- done
- fi
-
- ebegin "Pruning binaries"
- "${UGC_WD}/utils/prune_binaries.py" -q . "${UGC_WD}/pruning.list"
- eend $? || die
-
- ebegin "Applying ungoogled-chromium patches"
- "${UGC_WD}/utils/patches.py" -q apply . "${UGC_WD}/patches"
- eend $? || die
-
- ebegin "Applying domain substitution"
- "${UGC_WD}/utils/domain_substitution.py" -q apply -r "${UGC_WD}/domain_regex.list" -f "${UGC_WD}/domain_substitution.list" .
- eend $? || die
-
- # Sanity check esbuild version before we start removing files.
- # We _could_ patch the version check out - in theory esbuild upstream are being super conservative after
- # arch(AUR) packaged an `esbuild` binary and set ESBUILD_BINARY_PATH=/usr/bin/esbuild, causing much breakage,
- # but this is fine too and exactly matches what upstream are expecting.
- # https://github.com/evanw/esbuild/issues/2894
- local esbuild_js="${S}/third_party/devtools-frontend/src/node_modules/esbuild/lib/main.js"
- local found
- found=$(awk -F'"' '/if \(binaryVersion !==/ {print $2}' "${esbuild_js}")
- if [[ "${found}" != "${ESBUILD_VER}" ]]; then
- die "esbuild version mismatch: expected ${ESBUILD_VER}, found ${found}"
- fi
-
- elog "Removing bundled binaries from source tree ..."
- # Purge bundled ELF files: These are non-portable and will cause issues if used instead of system versions.
- # Use `--wasm` to also remove WebAssembly binaries, if desired - they're portable so shouldn't break builds.
- ${EPYTHON} "${FILESDIR}/bin-finder.py" --elf "${S}" | awk '{print $1}' | xargs rm -f ||
- die "Failed to remove bundled binaries"
-
- # And now we restore any that we actually need, from the host system
- local esbuild_path="${S}/third_party/devtools-frontend/src/third_party/esbuild"
- local -A restore_list=(
- ["/usr/bin/esbuild-${ESBUILD_VER}"]="${esbuild_path}/esbuild"
- ["/usr/bin/gperf"]="${S}/third_party/gperf/cipd/bin/gperf"
- ["/usr/bin/node"]="${S}/third_party/node/linux/node-linux-x64/bin/node"
- )
-
- for src in "${!restore_list[@]}"; do
- dst="${restore_list[${src}]}"
- if [[ -f "${src}" ]]; then
- einfo "Symlinking ${src} ..."
- # Make sure the parent dir exists; some tarballs don't include (e.g.) node's bindir
- mkdir -p "$(dirname "${dst}")" || die "Failed to create directory for ${dst}"
- ln -s "${src}" "${dst}" || die "Failed to symlink ${dst} from ${src}"
- if [[ ! -L "${dst}" || "$(readlink -f "${dst}")" != "${src}" ]]; then
- die "Symlink verification failed for ${dst} -> ${src}"
- fi
- else
- die "Expected to find ${src} to restore ${dst}, but it does not exist."
- fi
- done
-
- # adjust python interpreter version
- sed -i -e "s|\(^script_executable = \).*|\1\"${EPYTHON}\"|g" .gn || die
-
- # Use the system copy of hwdata's usb.ids; upstream is woefully out of date (2015!)
- sed 's|//third_party/usb_ids/usb.ids|/usr/share/hwdata/usb.ids|g' \
- -i services/device/public/cpp/usb/BUILD.gn || die "Failed to set system usb.ids path"
-
- # remove_bundled_libraries.py walks the source tree and looks for paths containing the substring 'third_party'
- # whitelist matches use the right-most matching path component, so we need to whitelist from that point down.
- local keeplibs=(
- base/third_party/cityhash
- )
- use system-double-conversion || keeplibs+=(
- base/third_party/double_conversion
- )
- keeplibs+=(
- base/third_party/icu
- base/third_party/nspr
- base/third_party/superfasthash
- base/third_party/symbolize
- base/third_party/xdg_user_dirs
- buildtools/third_party/libc++
- buildtools/third_party/libc++abi
- )
- use cromite && keeplibs+=(
- cromite_flags/third_party
- )
- keeplibs+=(
- net/third_party/mozilla_security_manager
- net/third_party/quic
- net/third_party/uri_template
- )
- use system-abseil-cpp || keeplibs+=(
- third_party/abseil-cpp
- )
- keeplibs+=(
- third_party/angle
- third_party/angle/src/common/third_party/xxhash
- third_party/angle/src/third_party/ceval
- )
- use nvidia || keeplibs+=(
- third_party/angle/src/third_party/libXNVCtrl
- )
- keeplibs+=(
- third_party/angle/src/third_party/volk
- third_party/anonymous_tokens
- third_party/apple_apsl
- third_party/axe-core
- third_party/bidimapper
- third_party/blink
- third_party/boringssl
- third_party/boringssl/src/third_party/fiat
- third_party/breakpad
- third_party/breakpad/breakpad/src/third_party/curl
- )
- use system-brotli || keeplibs+=(
- third_party/brotli
- )
- keeplibs+=(
- third_party/catapult
- third_party/catapult/common/py_vulcanize/third_party/rcssmin
- third_party/catapult/common/py_vulcanize/third_party/rjsmin
- third_party/catapult/third_party/beautifulsoup4-4.9.3
- third_party/catapult/third_party/html5lib-1.1
- third_party/catapult/third_party/polymer
- third_party/catapult/third_party/six
- third_party/catapult/third_party/typ
- third_party/catapult/tracing/third_party/d3
- third_party/catapult/tracing/third_party/gl-matrix
- third_party/catapult/tracing/third_party/jpeg-js
- third_party/catapult/tracing/third_party/jszip
- third_party/catapult/tracing/third_party/mannwhitneyu
- third_party/catapult/tracing/third_party/oboe
- third_party/catapult/tracing/third_party/pako
- third_party/ced
- third_party/cld_3
- third_party/closure_compiler
- )
- use libcxx && keeplibs+=(
- third_party/compiler-rt
- )
- keeplibs+=(
- third_party/content_analysis_sdk
- third_party/cpuinfo
- third_party/crabbyavif
- third_party/crashpad
- third_party/crashpad/crashpad/third_party/lss
- third_party/crashpad/crashpad/third_party/zlib
- )
- use system-crc32c || keeplibs+=(
- third_party/crc32c
- )
- keeplibs+=(
- third_party/cros_system_api
- third_party/d3
- third_party/dawn
- third_party/dawn/third_party/gn/webgpu-cts
- third_party/dawn/third_party/OpenGL-Registry
- third_party/dawn/third_party/renderdoc
- third_party/dawn/third_party/webgpu-headers
- third_party/depot_tools
- third_party/devscripts
- third_party/devtools-frontend
- third_party/devtools-frontend/src/front_end/third_party/acorn
- third_party/devtools-frontend/src/front_end/third_party/additional_readme_paths.json
- third_party/devtools-frontend/src/front_end/third_party/axe-core
- third_party/devtools-frontend/src/front_end/third_party/chromium
- third_party/devtools-frontend/src/front_end/third_party/codemirror
- third_party/devtools-frontend/src/front_end/third_party/csp_evaluator
- third_party/devtools-frontend/src/front_end/third_party/diff
- third_party/devtools-frontend/src/front_end/third_party/i18n
- third_party/devtools-frontend/src/front_end/third_party/intl-messageformat
- third_party/devtools-frontend/src/front_end/third_party/json5
- third_party/devtools-frontend/src/front_end/third_party/legacy-javascript
- third_party/devtools-frontend/src/front_end/third_party/lighthouse
- third_party/devtools-frontend/src/front_end/third_party/lit
- third_party/devtools-frontend/src/front_end/third_party/marked
- third_party/devtools-frontend/src/front_end/third_party/puppeteer
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/esm/third_party/mitt
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/esm/third_party/parsel-js
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/esm/third_party/rxjs
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/esm/third_party/urlpattern-polyfill
- third_party/devtools-frontend/src/front_end/third_party/source-map-scopes-codec
- third_party/devtools-frontend/src/front_end/third_party/third-party-web
- third_party/devtools-frontend/src/front_end/third_party/vscode.web-custom-data
- third_party/devtools-frontend/src/front_end/third_party/wasmparser
- third_party/devtools-frontend/src/front_end/third_party/web-vitals
- third_party/devtools-frontend/src/third_party
- third_party/dom_distiller_js
- third_party/dragonbox
- third_party/eigen3
- third_party/emoji-segmenter
- third_party/farmhash
- third_party/fast_float
- third_party/fdlibm
- third_party/federated_compute/chromium/fcp/confidentialcompute
- third_party/federated_compute/src/fcp/base
- third_party/federated_compute/src/fcp/confidentialcompute
- third_party/federated_compute/src/fcp/protos/confidentialcompute
- third_party/federated_compute/src/fcp/protos/federatedcompute
- third_party/fft2d
- third_party/flatbuffers
- third_party/fp16
- third_party/freetype
- third_party/fusejs
- third_party/fxdiv
- third_party/gemmlowp
- third_party/google_input_tools
- third_party/google_input_tools/third_party/closure_library
- third_party/google_input_tools/third_party/closure_library/third_party/closure
- third_party/googletest
- third_party/gperf # We symlink system gperf, but this will purge the symlink since we tidy up afterwards.
- third_party/highway
- third_party/hunspell
- third_party/hyphenation-patterns
- third_party/ink/src/ink/brush
- third_party/ink/src/ink/color
- third_party/ink/src/ink/geometry
- third_party/ink/src/ink/rendering
- third_party/ink/src/ink/rendering/skia/common_internal
- third_party/ink/src/ink/rendering/skia/native
- third_party/ink/src/ink/rendering/skia/native/internal
- third_party/ink/src/ink/strokes
- third_party/ink/src/ink/types
- third_party/inspector_protocol
- third_party/ipcz
- third_party/jinja2
- )
- use system-jsoncpp || keeplibs+=(
- third_party/jsoncpp
- )
- keeplibs+=(
- third_party/khronos
- third_party/lens_server_proto
- third_party/leveldatabase
- third_party/libaddressinput
- )
- use libcxx && keeplibs+=(
- third_party/libc++
- )
- keeplibs+=(
- third_party/libdrm
- third_party/libgav1
- third_party/libjingle
- third_party/libpfm4
- third_party/libphonenumber
- third_party/libpng
- third_party/libsecret
- third_party/libsrtp
- third_party/libsync
- third_party/libtess2/libtess2
- third_party/libtess2/src/Include
- third_party/libtess2/src/Source
- third_party/liburlpattern
- )
- use system-libusb || keeplibs+=(
- third_party/libusb
- )
- keeplibs+=(
- third_party/libva_protected_content
- )
- use system-libvpx || keeplibs+=(
- third_party/libvpx
- third_party/libvpx/source/libvpx/third_party/x86inc
- )
- keeplibs+=(
- third_party/libwebm
- third_party/libx11
- third_party/libxcb-keysyms
- third_party/libxml/chromium
- third_party/libyuv
- third_party/libzip
- third_party/lit
- )
- use libcxx && keeplibs+=(
- third_party/llvm-libc
- third_party/llvm-libc/src/shared/
- )
- keeplibs+=(
- third_party/lottie
- third_party/lss
- third_party/lzma_sdk
- third_party/mako
- third_party/markupsafe
- third_party/material_color_utilities
- third_party/metrics_proto
- third_party/minigbm
- third_party/ml_dtypes
- third_party/modp_b64
- third_party/nasm
- third_party/nearby
- third_party/neon_2_sse
- third_party/node
- third_party/oak/chromium/proto
- third_party/oak/chromium/proto/attestation
- third_party/omnibox_proto
- third_party/one_euro_filter
- third_party/openscreen
- third_party/openscreen/src/third_party/
- third_party/openscreen/src/third_party/tinycbor/src/src
- third_party/ots
- third_party/pdfium
- third_party/pdfium/third_party/agg23
- third_party/pdfium/third_party/bigint
- third_party/pdfium/third_party/freetype
- third_party/pdfium/third_party/lcms
- )
- use system-openjpeg || keeplibs+=(
- third_party/pdfium/third_party/libopenjpeg
- )
- keeplibs+=(
- third_party/pdfium/third_party/libtiff
- third_party/perfetto
- third_party/perfetto/protos/third_party/chromium
- third_party/perfetto/protos/third_party/pprof
- third_party/perfetto/protos/third_party/primes
- third_party/perfetto/protos/third_party/simpleperf
- third_party/pffft
- third_party/ply
- third_party/polymer
- third_party/private_membership
- third_party/private-join-and-compute
- third_party/protobuf
- third_party/protobuf/third_party/utf8_range
- third_party/pthreadpool
- third_party/puffin
- third_party/pyjson5
- third_party/pyyaml
- third_party/rapidhash
- third_party/readability
- third_party/rnnoise
- third_party/rust
- third_party/ruy
- third_party/s2cellid
- third_party/search_engines_data
- third_party/securemessage
- third_party/selenium-atoms
- third_party/sentencepiece
- third_party/sentencepiece/src/third_party/darts_clone
- third_party/shell-encryption
- third_party/simdutf
- third_party/simplejson
- third_party/six
- third_party/skia
- third_party/skia/include/third_party/vulkan
- third_party/smhasher
- )
- use system-snappy || keeplibs+=(
- third_party/snappy
- )
- keeplibs+=(
- third_party/spirv-headers
- third_party/spirv-tools
- third_party/sqlite
- third_party/swiftshader
- third_party/swiftshader/third_party/astc-encoder
- third_party/swiftshader/third_party/llvm-subzero
- third_party/swiftshader/third_party/marl
- third_party/swiftshader/third_party/SPIRV-Headers/include/spirv
- third_party/swiftshader/third_party/SPIRV-Tools
- third_party/swiftshader/third_party/subzero
- third_party/tensorflow_models
- third_party/tensorflow-text
- third_party/tflite
- third_party/tflite/src/third_party/fft2d
- third_party/tflite/src/third_party/xla/third_party/tsl
- third_party/tflite/src/third_party/xla/xla/tsl/framework
- third_party/tflite/src/third_party/xla/xla/tsl/lib/random
- third_party/tflite/src/third_party/xla/xla/tsl/platform
- third_party/tflite/src/third_party/xla/xla/tsl/protobuf
- third_party/tflite/src/third_party/xla/xla/tsl/util
- third_party/ukey2
- third_party/utf
- third_party/vulkan
- third_party/wayland
- third_party/webdriver
- third_party/webgpu-cts
- third_party/webrtc
- third_party/webrtc/common_audio/third_party/ooura
- third_party/webrtc/common_audio/third_party/spl_sqrt_floor
- third_party/webrtc/modules/third_party/fft
- third_party/webrtc/modules/third_party/g711
- third_party/webrtc/modules/third_party/g722
- third_party/widevine
- )
- use system-woff2 || keeplibs+=(
- third_party/woff2
- )
- keeplibs+=(
- third_party/wuffs
- third_party/x11proto
- third_party/xcbproto
- third_party/xnnpack
- third_party/zlib/google
- third_party/zxcvbn-cpp
- url/third_party/mozilla
- v8/third_party/glibc
- v8/third_party/inspector_protocol
- v8/third_party/rapidhash-v8
- v8/third_party/siphash
- v8/third_party/utf8-decoder
- v8/third_party/v8
- v8/third_party/valgrind
-
- # gyp -> gn leftovers
- third_party/speech-dispatcher
- third_party/usb_ids
- )
-
- if use test; then
- keeplibs+=(
- third_party/breakpad/breakpad/src/processor
- third_party/fuzztest
- third_party/google_benchmark/src/include/benchmark
- third_party/google_benchmark/src/src
- third_party/test_fonts
- third_party/test_fonts/fontconfig
- third_party/test_fonts/test_fonts
- )
- fi
-
- # USE=system-*
- if ! use system-harfbuzz; then
- keeplibs+=( third_party/harfbuzz )
- fi
-
- if ! use system-ffmpeg; then
- keeplibs+=( third_party/ffmpeg third_party/opus )
- fi
-
- if ! use system-icu; then
- keeplibs+=( third_party/icu )
- fi
-
- if ! use system-zstd; then
- keeplibs+=( third_party/zstd )
- fi
-
- if ! use system-av1; then
- keeplibs+=(
- third_party/dav1d
- third_party/libaom
- third_party/libaom/source/libaom/third_party/fastfeat
- third_party/libaom/source/libaom/third_party/vector
- third_party/libaom/source/libaom/third_party/x86inc
- )
- fi
-
- if use libcxx; then
- keeplibs+=(
- third_party/libc++
- third_party/llvm-libc
- )
- fi
-
- if ! use system-openh264; then
- keeplibs+=( third_party/openh264 )
- fi
-
- if ! use system-re2; then
- keeplibs+=( third_party/re2 )
- fi
-
- # Arch-specific
- if use arm64 || use ppc64 ; then
- keeplibs+=( third_party/swiftshader/third_party/llvm-10.0 )
- fi
- # we need to generate ppc64 stuff because upstream does not ship it yet
- # it has to be done before unbundling.
- if use ppc64; then
- pushd third_party/libvpx >/dev/null || die
- mkdir -p source/config/linux/ppc64 || die
- # requires git and clang, bug #832803
- # Revert https://chromium.googlesource.com/chromium/src/+/b463d0f40b08b4e896e7f458d89ae58ce2a27165%5E%21/third_party/libvpx/generate_gni.sh
- # and https://chromium.googlesource.com/chromium/src/+/71ebcbce867dd31da5f8b405a28fcb0de0657d91%5E%21/third_party/libvpx/generate_gni.sh
- # since we're not in a git repo
- sed -i -e "s|^update_readme||g; s|clang-format|${EPREFIX}/bin/true|g; /^git -C/d; /git cl/d; /cd \$BASE_DIR\/\$LIBVPX_SRC_DIR/ign format --in-place \$BASE_DIR\/BUILD.gn\ngn format --in-place \$BASE_DIR\/libvpx_srcs.gni" \
- generate_gni.sh || die
- ./generate_gni.sh || die
- popd >/dev/null || die
-
- pushd third_party/ffmpeg >/dev/null || die
- cp libavcodec/ppc/h264dsp.c libavcodec/ppc/h264dsp_ppc.c || die
- cp libavcodec/ppc/h264qpel.c libavcodec/ppc/h264qpel_ppc.c || die
- popd >/dev/null || die
- fi
-
- # Sanity check keeplibs, on major version bumps it is often necessary to update this list
- # and this enables us to hit them all at once.
- # There are some entries that need to be whitelisted (TODO: Why? The file is understandable, the rest seem odd)
- whitelist_libs=(
- net/third_party/quic
- third_party/devtools-frontend/src/front_end/third_party/additional_readme_paths.json
- third_party/libjingle
- third_party/mesa
- third_party/skia/third_party/vulkan
- third_party/vulkan
- )
- local not_found_libs=()
- for lib in "${keeplibs[@]}"; do
- if [[ ! -d "${lib}" ]] && ! has "${lib}" "${whitelist_libs[@]}"; then
- not_found_libs+=( "${lib}" )
- fi
- done
-
- if [[ ${#not_found_libs[@]} -gt 0 ]]; then
- ewarn "The following \`keeplibs\` directories were not found in the source tree:"
- for lib in "${not_found_libs[@]}"; do
- ewarn " ${lib}"
- done
- fi
-
- keeplibs+=( third_party/ungoogled )
-
- # Remove most bundled libraries. Some are still needed.
- einfo "Unbundling third-party libraries ..."
- build/linux/unbundle/remove_bundled_libraries.py "${keeplibs[@]}" --do-remove || die
-
- # Interferes with our bundled clang path; we don't want stripped binaries anyway.
- sed -i -e 's|${clang_base_path}/bin/llvm-strip|/bin/true|g' \
- -e 's|${clang_base_path}/bin/llvm-objcopy|/bin/true|g' \
- build/linux/strip_binary.gni || die
-}
-
-src_configure() {
- # Calling this here supports resumption via FEATURES=keepwork
- python_setup
-
- # Bug 491582.
- export TMPDIR="${WORKDIR}/temp"
- mkdir -p -m 755 "${TMPDIR}" || die
-
- # https://bugs.gentoo.org/654216
- addpredict /dev/dri/ #nowarn
-
- # Use system-provided libraries.
- # TODO: freetype -- remove sources (https://bugs.chromium.org/p/pdfium/issues/detail?id=733).
- # TODO: use_system_hunspell (upstream changes needed).
- # TODO: use_system_protobuf (bug #525560).
- # TODO: use_system_sqlite (http://crbug.com/22208).
-
- # libevent: https://bugs.gentoo.org/593458
- local gn_system_libraries=(
- flac
- fontconfig
- freetype
- libjpeg
- libwebp
- libxml
- libxslt
- zlib
- )
- if use system-abseil-cpp; then
- gn_system_libraries+=(
- absl_algorithm
- absl_base
- absl_cleanup
- absl_container
- absl_crc
- absl_debugging
- absl_flags
- absl_functional
- absl_hash
- absl_log
- absl_log_internal
- absl_memory
- absl_meta
- absl_numeric
- absl_random
- absl_status
- absl_strings
- absl_synchronization
- absl_time
- absl_types
- absl_utility
- )
- fi
- if use system-brotli; then
- gn_system_libraries+=( brotli )
- fi
- if use system-crc32c; then
- gn_system_libraries+=( crc32c )
- fi
- if use system-double-conversion; then
- gn_system_libraries+=( double-conversion )
- fi
- if use system-woff2; then
- gn_system_libraries+=( woff2 )
- fi
- if use nvidia; then
- gn_system_libraries+=( libXNVCtrl )
- fi
- if use system-ffmpeg; then
- gn_system_libraries+=( ffmpeg opus )
- fi
- if use system-jsoncpp; then
- gn_system_libraries+=( jsoncpp )
- fi
- if use system-icu; then
- gn_system_libraries+=( icu )
- fi
- if use system-zstd; then
- gn_system_libraries+=( zstd )
- fi
- if use system-av1; then
- gn_system_libraries+=( dav1d libaom )
- fi
- if use system-libusb; then
- gn_system_libraries+=( libusb )
- fi
- if use system-libvpx; then
- gn_system_libraries+=( libvpx )
- fi
- use system-openh264 && gn_system_libraries+=(
- openh264
- )
- use system-re2 && gn_system_libraries+=(
- re2
- )
- use system-snappy && gn_system_libraries+=(
- snappy
- )
-
- build/linux/unbundle/replace_gn_files.py --system-libraries "${gn_system_libraries[@]}" ||
- die "Failed to replace GN files for system libraries"
-
- # TODO 131: The above call clobbers `enable_freetype = true` in the freetype gni file
- # drop the last line, then append the freetype line and a new curly brace to end the block
- local freetype_gni="build/config/freetype/freetype.gni"
- sed -i -e '$d' ${freetype_gni} || die
- echo " enable_freetype = true" >> ${freetype_gni} || die
- echo "}" >> ${freetype_gni} || die
-
- if use !custom-cflags; then
- replace-flags "-Os" "-O2"
- strip-flags
- # Debug info section overflows without component build
- # Prevent linker from running out of address space, bug #471810 .
- filter-flags "-g*"
- # 949123: Several multimedia components explicitly build with specific CFLAGS and
- # use runtime detection to enable optimisations; unfortunately any of our CFLAGS are suffixed
- # to the end of the command line, which causes build failures.
- use arm64 && filter-flags "-march*" "-mtune*" "-mcpu*"
- fi
-
- # We don't use the same clang version as upstream, and with -Werror
- # we need to make sure that we don't get superfluous warnings.
- append-flags -Wno-unknown-warning-option
- if tc-is-cross-compiler; then # can you cross-compile with the bundled toolchain?
- export BUILD_CXXFLAGS+=" -Wno-unknown-warning-option"
- export BUILD_CFLAGS+=" -Wno-unknown-warning-option"
- fi
-
- # Start building our GN options
- local myconf_gn=() # Tip: strings must be quoted, bools or numbers are fine
-
- if use !bundled-toolchain; then
- # We already forced the "correct" clang via pkg_setup
-
- if tc-is-cross-compiler; then
- CC="${CC} -target ${CHOST} --sysroot ${ESYSROOT}"
- CXX="${CXX} -target ${CHOST} --sysroot ${ESYSROOT}"
- BUILD_AR=${AR}
- BUILD_CC=${CC}
- BUILD_CXX=${CXX}
- BUILD_NM=${NM}
- fi
-
- # Make sure the build system will use the right tools, bug #340795.
- tc-export AR CC CXX NM
-
- strip-unsupported-flags
- append-ldflags -Wl,--undefined-version # https://bugs.gentoo.org/918897#c32
-
- myconf_gn+=(
- "is_clang=true"
- "clang_use_chrome_plugins=false"
- "use_clang_modules=false" # M141 enables this for the linux platform by default.
- "use_lld=true"
- 'custom_toolchain="//build/toolchain/linux/unbundle:default"'
- # From M127 we need to provide a location for libclang and the clang resource dir so that bindgen can find them
- "bindgen_libclang_path=\"$(get_llvm_prefix)/$(get_libdir)\""
- "bindgen_clang_resource_dir=\"${EPREFIX}/usr/lib/clang/${LLVM_SLOT}/include\""
- "bindgen_extra_clang_args=[\"-I${EPREFIX}/usr/lib/clang/${LLVM_SLOT}/include\"]"
- "clang_base_path=\"${EPREFIX}/usr/lib/clang/${LLVM_SLOT}/\""
- "rust_bindgen_root=\"${EPREFIX}/usr/\""
- "rust_sysroot_absolute=\"$(get_rust_prefix)\""
- "rustc_version=\"${RUST_SLOT}\""
- )
-
- if [[ ${LLVM_SLOT} -lt 23 ]]; then
- # Workaround for -fsanitize-ignore-for-ubsan-feature (added in LLVM 23)
- myconf_gn+=( 'clang_has_ubsan_feature_ignore=false' )
- fi
-
- if ! tc-is-cross-compiler; then
- myconf_gn+=( 'host_toolchain="//build/toolchain/linux/unbundle:default"' )
- else
- tc-export BUILD_{AR,CC,CXX,NM}
- myconf_gn+=(
- 'host_toolchain="//build/toolchain/linux/unbundle:host"'
- 'v8_snapshot_toolchain="//build/toolchain/linux/unbundle:host"'
- "host_pkg_config=\"$(tc-getBUILD_PKG_CONFIG)\""
- "pkg_config=\"$(tc-getPKG_CONFIG)\""
- )
-
- # setup cups-config, build system only uses --libs option
- if use cups; then
- mkdir "${T}/cups-config" || die
- cp "${ESYSROOT}/usr/bin/${CHOST}-cups-config" "${T}/cups-config/cups-config" || die
- export PATH="${PATH}:${T}/cups-config"
- fi
-
- # Don't inherit PKG_CONFIG_PATH from environment
- local -x PKG_CONFIG_PATH=
- fi
-
- fi # !bundled-toolchain
-
- local myarch
- myarch="$(tc-arch)"
- case ${myarch} in
- amd64)
- # Bug 530248, 544702, 546984, 853646.
- use !custom-cflags && filter-flags -mno-mmx -mno-sse2 -mno-ssse3 -mno-sse4.1 \
- -mno-avx -mno-avx2 -mno-fma -mno-fma4 -mno-xop -mno-sse4a
- myconf_gn+=( 'target_cpu="x64"' )
- ;;
- x86)
- # Bug 530248, 544702, 546984, 853646.
- use !custom-cflags && filter-flags -mno-mmx -mno-sse2 -mno-ssse3 -mno-sse4.1 \
- -mno-avx -mno-avx2 -mno-fma -mno-fma4 -mno-xop -mno-sse4a
- myconf_gn+=( 'target_cpu="x86"' )
- ;;
- arm64)
- myconf_gn+=( 'target_cpu="arm64"' )
- ;;
- ppc64)
- myconf_gn+=( 'target_cpu="ppc64"' )
- ;;
- *)
- die "Failed to determine target arch, got '${myarch}'."
- ;;
- esac
-
- # Common options
-
- myconf_gn+=(
- # Disable code formating of generated files
- "blink_enable_generated_code_formatting=false"
- # enable DCHECK with USE=debug only, increases chrome binary size by 30%, bug #811138.
- # DCHECK is fatal by default, make it configurable at runtime, #bug 807881.
- "dcheck_always_on=$(usex debug true false)"
- "dcheck_is_configurable=$(usex debug true false)"
- # Chromium builds provided by Linux distros should disable the testing config
- "disable_fieldtrial_testing_config=true"
- # Custom patch: Enable building Chromium as individual channels (e.g. stable, beta, dev) that
- # use different profile directories, desktop entries, etc. This enables slotting the ebuild.
- "enable_channel_branding=true"
- # 131 began laying the groundwork for replacing freetype with
- # "Rust-based Fontations set of libraries plus Skia path rendering"
- # We now need to opt-in
- "enable_freetype=true"
- "enable_hangout_services_extension=$(usex hangouts true false)"
- # Don't need nocompile checks and GN crashes with our config (verify with modern GN)
- "enable_nocompile_tests=false"
- # pseudolocales are only used for testing
- "enable_pseudolocales=false"
- "enable_widevine=$(usex widevine true false)"
- # Disable fatal linker warnings, bug 506268.
- "fatal_linker_warnings=false"
- # Component build isn't generally intended for use by end users. It's mostly useful
- # for development and debugging.
- "is_component_build=false"
- # GN needs explicit config for Debug/Release as opposed to inferring it from build directory.
- "is_debug=false"
- "is_official_build=$(usex official true false)"
- # Enable ozone wayland and/or headless support
- "ozone_auto_platforms=false"
- "ozone_platform_headless=true"
- # Enables building without non-free unRAR licence
- "safe_browsing_use_unrar=false"
- # "thin_lto_enable_optimizations=${use_lto}"
- "treat_warnings_as_errors=false"
- # Use in-tree libc++ (buildtools/third_party/libc++ and buildtools/third_party/libc++abi)
- # instead of the system C++ library for C++ standard library support.
- # default: true, but let's be explicit (forced since 120 ; USE removed 127).
- "use_custom_libcxx=true"
- # Enable ozone wayland and/or headless support
- "use_ozone=true"
- # The sysroot is the oldest debian image that chromium supports, we don't need it
- "use_sysroot=false"
- # See dependency logic in third_party/BUILD.gn
- "use_system_harfbuzz=$(usex system-harfbuzz true false)"
- # "use_thin_lto=${use_lto}"
- # Only enabled for clang, but gcc has endian macros too
- "v8_use_libm_trig_functions=true"
- )
-
- myconf_gn+=( "enable_iterator_debugging=$(usex debug true false)" )
-
- if use debug; then
- myconf_gn+=(
- "symbol_level=2"
- "blink_symbol_level=2"
- "v8_symbol_level=2"
- )
- else
- myconf_gn+=(
- "symbol_level=0"
- "blink_symbol_level=0"
- "v8_symbol_level=0"
- )
- fi
-
- if use bindist ; then
- myconf_gn+=(
- # If this is set to false Chromium won't be able to load any proprietary codecs
- # even if provided with an ffmpeg capable of h264/aac decoding
- "proprietary_codecs=true"
- 'ffmpeg_branding="Chrome"'
- # build ffmpeg as an external component (libffmpeg.so) that we can remove / substitute
- "is_component_ffmpeg=true"
- )
- else
- myconf_gn+=(
- "proprietary_codecs=$(usex proprietary-codecs true false)"
- "ffmpeg_branding=\"$(usex proprietary-codecs Chrome Chromium)\""
- )
- fi
-
- if use headless; then
- myconf_gn+=(
- "enable_print_preview=false"
- "enable_remoting=false"
- 'ozone_platform="headless"'
- "rtc_use_pipewire=false"
- "use_alsa=false"
- "use_cups=false"
- "use_gio=false"
- "use_glib=false"
- "use_gtk=false"
- "use_kerberos=false"
- "use_libpci=false"
- "use_pangocairo=false"
- "use_pulseaudio=false"
- "use_qt5=false"
- "use_qt6=false"
- "use_udev=false"
- "use_vaapi=false"
- "use_xkbcommon=false"
- )
- else
- myconf_gn+=(
- "gtk_version=$(usex gtk4 4 3)"
- # link pulseaudio directly (DT_NEEDED) instead of using dlopen.
- # helps with automated detection of ABI mismatches and prevents silent errors.
- "link_pulseaudio=$(usex pulseaudio true false)"
- "ozone_platform_wayland=$(usex wayland true false)"
- "ozone_platform_x11=$(usex X true false)"
- "ozone_platform=\"$(usex wayland wayland x11)\""
- "rtc_use_pipewire=$(usex screencast true false)"
- "use_cups=$(usex cups true false)"
- "use_kerberos=$(usex kerberos true false)"
- "use_pulseaudio=$(usex pulseaudio true false)"
- "use_qt5=false"
- "use_system_libffi=$(usex wayland true false)"
- "use_system_minigbm=true"
- "use_vaapi=$(usex vaapi true false)"
- "use_xkbcommon=true"
- )
- if use qt6; then
- local cbuild_libdir
- cbuild_libdir="$(get_libdir)"
- if tc-is-cross-compiler; then
- # Hack to workaround get_libdir not being able to handle CBUILD, bug #794181
- cbuild_libdir="$($(tc-getBUILD_PKG_CONFIG) --keep-system-libs --libs-only-L libxslt)"
- cbuild_libdir="${cbuild_libdir:2}"
- cbuild_libdir="${cbuild_libdir/% }"
- fi
- myconf_gn+=(
- "use_qt6=true"
- "moc_qt6_path=\"${EPREFIX}/usr/${cbuild_libdir}/qt6/libexec\""
- )
- else
- myconf_gn+=( "use_qt6=false" )
- fi
- fi
-
- # Explicitly disable ICU data file support for system-icu/headless builds.
- if use system-icu || use headless; then
- myconf_gn+=( "icu_use_data_file=false" )
- fi
-
- if use official; then
- # Allow building against system libraries in official builds
- sed -i 's/OFFICIAL_BUILD/GOOGLE_CHROME_BUILD/' \
- tools/generate_shim_headers/generate_shim_headers.py || die
- # Don't add symbols to build
- myconf_gn+=( "symbol_level=0" )
- fi
-
- if use pgo; then
- myconf_gn+=(
- "chrome_pgo_phase=2"
- "v8_enable_builtins_optimization=true"
- )
- else
- myconf_gn+=( "chrome_pgo_phase=0" )
- fi
-
- # Odds and ends
-
- # skipping typecheck is only supported on amd64, bug #876157
- if ! use amd64; then
- myconf_gn+=( "devtools_skip_typecheck=false" )
- fi
-
- # Disable external code space for V8 for ppc64. It is disabled for ppc64
- # by default, but cross-compiling on amd64 enables it again.
- if tc-is-cross-compiler && use ppc64; then
- myconf_gn+=( "v8_enable_external_code_space=false" )
- fi
-
- # This determines whether or not GN uses the bundled libcxx
- if use libcxx; then
- myconf_gn+=( "use_custom_libcxx=true" )
- else
- myconf_gn+=(
- "use_custom_libcxx=false"
- "use_llvm_libatomic=false"
- )
- append-cppflags -U_GLIBCXX_ASSERTIONS #See #318
- fi
-
- myconf_gn+=( "use_bluez=$(usex bluetooth true false)" )
-
- myconf_gn+=( "is_cfi=$(usex cfi true false)" )
-
- if use cfi; then
- myconf_gn+=(
- "use_cfi_icall=true"
- "use_cfi_cast=true"
- )
- fi
-
- myconf_gn+=(
- "optimize_webui=$(usex optimize-webui true false)"
- "use_system_freetype=$(usex system-harfbuzz true false)"
- "use_system_libopenjpeg2=$(usex system-openjpeg true false)"
- "enable_pdf=true"
- "use_system_lcms2=true"
- "enable_print_preview=true"
- "use_thin_lto=$(usex thinlto true false)"
- "thin_lto_enable_optimizations=$(usex optimize-thinlto true false)"
-
- # Ungoogled flags
- "build_with_tflite_lib=false"
- "enable_mdns=false"
- "enable_mse_mpeg2ts_stream_parser=$(usex proprietary-codecs true false)"
- "enable_remoting=false"
- "enable_reporting=false"
- "enable_service_discovery=false"
- "exclude_unwind_tables=true"
- "google_api_key=\"\""
- "google_default_client_id=\"\""
- "google_default_client_secret=\"\""
- "safe_browsing_mode=0"
- "use_official_google_api_keys=false"
- "use_unofficial_version_number=false"
-
- # "enable_swiftshader=false"
-
- # Additional flags
- # "perfetto_use_system_zlib=true"
- # "use_system_zlib=true"
- # "use_system_libjpeg=true"
- # "rtc_build_examples=false"
- # "enable_chromium_prelude=false"
- # "enable_updater=false"
- # "enable_update_notifications=false"
- # "enable_constraints=false"
- # "rtc_rusty_base64=false"
- # "v8_enable_temporal_support=false"
- # "media_use_symphonia=false"
- # "pdf_enable_rust_png=false"
- # "skia_use_libpng_encode=true"
- # "skia_use_libpng_decode=true"
- # "skia_use_rust_png_decode=false"
- # "skia_use_rust_png_encode=false"
- # "enable_jxl_decoder=false"
- )
-
- if use amd64 || use arm64; then
- myconf_gn+=(
- "v8_drumbrake_bounds_checks=true"
- # "v8_enable_drumbrake=true"
- )
- fi
-
- if use thinlto; then
- # We need to change the default value of import-instr-limit in
- # LLVM to limit the text size increase. The default value is
- # 100, and we change it to 30 to reduce the text size increase
- # from 25% to 10%. The performance number of page_cycler is the
- # same on two of the thinLTO configurations, we got 1% slowdown
- # on speedometer when changing import-instr-limit from 100 to 30.
- # append-ldflags "-Wl,-plugin-opt,-import-instr-limit=30"
- sed -i '/import_instr_limit = 5/{s++import_instr_limit = 30+;h};${x;/./{x;q0};x;q1}' \
- build/config/compiler/BUILD.gn || die
-
- append-ldflags "-Wl,--thinlto-jobs=$(makeopts_jobs)"
- fi
-
- # Facilitate deterministic builds (taken from build/config/compiler/BUILD.gn)
- append-cflags -Wno-builtin-macro-redefined
- append-cxxflags -Wno-builtin-macro-redefined
- append-cppflags "-D__DATE__= -D__TIME__= -D__TIMESTAMP__="
-
- local flags
- einfo "Building with the following compiler settings:"
- for flags in C{C,XX} AR NM RANLIB {C,CXX,CPP,LD}FLAGS \
- EXTRA_GN UGC_{SKIP_{PATCHES,SUBSTITUTION},KEEP_BINARIES} ; do
- einfo " ${flags} = \"${!flags}\""
- done
-
- # Since we build from tarballs, we need to set the channel here so that it can be used in the build.
- export CHROME_VERSION_EXTRA="${SLOT}"
-
- einfo "Configuring Chromium ..."
- set -- gn gen --args="${myconf_gn[*]}${EXTRA_GN:+ ${EXTRA_GN}}" out/Release
- echo "$@"
- "$@" || die "Failed to configure Chromium"
-
- # The "if" below should not be executed unless testing
- if [ ! -z "${NODIE}" ]; then
- # List all args
- # gn args --list out/Release
-
- # Quick compiler check
- eninja -C out/Release protoc torque
- fi
-}
-
-src_compile() {
- # Final link uses lots of file descriptors.
- ulimit -n 2048
-
- # Calling this here supports resumption via FEATURES=keepwork
- python_setup
-
- # I hate doing this but upstream Rust have yet to come up with a better solution for
- # us poor packagers. Required for Split LTO units, which are required for CFI.
- export RUSTC_BOOTSTRAP=1
-
- # Don't inherit PYTHONPATH from environment, bug #789021, #812689
- local -x PYTHONPATH=
-
- # Build mksnapshot and pax-mark it.
- if use pax-kernel; then
- local x
- for x in mksnapshot v8_context_snapshot_generator code_cache_generator; do
- if tc-is-cross-compiler; then
- eninja -C out/Release "host/${x}"
- pax-mark m "out/Release/host/${x}"
- else
- eninja -C out/Release "${x}"
- pax-mark m "out/Release/${x}"
- fi
- done
- fi
-
- # Even though ninja autodetects number of CPUs, we respect
- # user's options, for debugging with -j 1 or any other reason.
- eninja -C out/Release chrome chrome_sandbox $(use test && echo "base_unittests")
-
- pax-mark m out/Release/chrome
-
- # This codepath does minimal patching, so we're at the mercy of upstream
- # CFLAGS. This is fine - we're not intending to force this on users
- # and we do a lot of flag 'management' anyway.
- if use bundled-toolchain; then
- QA_FLAGS_IGNORED="
- usr/lib64/chromium-browser/chrome
- usr/lib64/chromium-browser/chrome-sandbox
- usr/lib64/chromium-browser/chromedriver
- usr/lib64/chromium-browser/chrome_crashpad_handler
- usr/lib64/chromium-browser/libEGL.so
- usr/lib64/chromium-browser/libGLESv2.so
- usr/lib64/chromium-browser/libVkICD_mock_icd.so
- usr/lib64/chromium-browser/libVkLayer_khronos_validation.so
- usr/lib64/chromium-browser/libqt6_shim.so
- usr/lib64/chromium-browser/libvk_swiftshader.so
- usr/lib64/chromium-browser/libvulkan.so.1
- "
- fi
-
- use convert-dict && eninja -C out/Release convert_dict
-
- use enable-driver && eninja -C out/Release chromedriver
- #use suid && eninja -C out/Release chrome_sandbox
-
- use enable-driver && mv out/Release/chromedriver{.unstripped,}
-
- rm -f out/Release/locales/*.pak.info || die
-
- # Generate support files (desktop file, manpage, etc.) See: #684550 #706786 #968958
- ${EPYTHON} "${FILESDIR}/generate-support-files.py" \
- --installdir "/usr/$(get_libdir)/ungoogled-chromium-browser" \
- --channel "${SLOT}" ||
- die "Failed to generate support files"
-}
-
-src_test() {
- # Tests may be flaky with usersandbox, and the test runner executes significantly faster without.
- # If you seem to be excluding too many tests for a particular milestone: comment them out, reboot, and
- # run the tests again. If that doesn't help, try FEATURES="-usersandbox" and send it because obviously the
- # chromium gods are not smiling upon you today. Do some runtime testing, obvs.
- local skip_tests=(
- # Wildcard exclusions (if all tests in a test suite are broken)
- 'AlternateTestParams/PartitionAllocDeathTest.RepeatedAllocReturnNullDirect/*'
- 'AlternateTestParams/PartitionAllocDeathTest.RepeatedReallocReturnNullDirect/*'
- 'AlternateTestParams/PartitionAllocTest.*' # 200+ tests, >= 1 crashes entire test runner with usersandbox.
- 'CheckExitCodeAfterSignalHandlerDeathTest.*'
- 'CriticalProcessAndThreadSpotChecks/HangWatcherAnyCriticalThreadTests.*'
- 'LazyThreadPoolTaskRunnerEnvironmentTest.*' # M142
- 'ToolsSanityTest.BadVirtualCall*'
- # requires en-us locale
- SysStrings.SysNativeMBAndWide
- SysStrings.SysNativeMBToWide
- SysStrings.SysWideToNativeMB
- # Specific test cases
- CancelableEventTest.BothCancelFailureAndSucceedOccurUnderContention
- FilePathTest.FromUTF8Unsafe_And_AsUTF8Unsafe
- HistogramTesterTest.PumaTestUniqueSample
- PathServiceTest.CheckedGetFailure
- PlatformThreadTest.CanChangeThreadType
- RawPtrTest.SetLookupUsesGetForComparison # M146 ; also broken for alpine in M144.
- RustLogIntegrationTest.CheckAllSeverity
- StackCanary.ChangingStackCanaryCrashesOnReturn
- StackTraceDeathTest.StackDumpSignalHandlerIsMallocFree
- TestLauncherTools.TruncateSnippetFocusedMatchesFatalMessagesTest
- ThreadPoolEnvironmentConfig.CanUseBackgroundPriorityForWorker
- )
- local test_filter="-$(IFS=:; printf '%s' "${skip_tests[*]}")"
- # test-launcher-bot-mode enables parallelism and plain output
- # Check individual tests with --gtest_filter=<test you want> --single-process-tests
- ./out/Release/base_unittests --test-launcher-bot-mode \
- --test-launcher-jobs="$(get_makeopts_jobs)" \
- --gtest_filter="${test_filter}" || die "Tests failed!"
-}
-
-src_install() {
- local browser_suffix
- if [[ "${SLOT}" != "stable" ]]; then
- browser_suffix="-${SLOT}"
- else
- browser_suffix=""
- fi
- local CHROMIUM_HOME="/usr/$(get_libdir)/ungoogled-chromium-browser${browser_suffix}"
- exeinto "${CHROMIUM_HOME}"
- doexe out/Release/chrome
-
- #newexe out/Release/chrome_sandbox chrome-sandbox
- #fperms 4755 "${CHROMIUM_HOME}/chrome-sandbox"
-
- use enable-driver && doexe out/Release/chromedriver
-
- #* https://github.com/ungoogled-software/ungoogled-chromium/pull/3563
- doexe out/Release/chrome_crashpad_handler
-
- if use convert-dict; then
- newexe "${FILESDIR}/update-dicts.sh" update-dicts.sh
- doexe out/Release/convert_dict
- fi
-
- ozone_auto_session () {
- use X && use wayland && ! use headless && echo true || echo false
- }
-
- cat <<- EOF > "${D}${CHROMIUM_HOME}/chromium-launcher.sh" || die
- #!/bin/bash
- # Wrapper to launch slotted Chromium via the chromium-common launcher script.
- export CHROME_DESKTOP="ungoogled-chromium-browser${browser_suffix}.desktop"
- export CHROME_EXEC_NAME="ungoogled-chromium-browser${browser_suffix}"
- export CHROME_VERSION_EXTRA="${SLOT}"
- export CHROME_WRAPPER="\$(readlink -f "\$0")"
- export OZONE_AUTO_SESSION=$(ozone_auto_session)
-
- exec /usr/libexec/chromium/chromium-launcher.sh "\$@"
- EOF
-
- chmod 755 "${D}${CHROMIUM_HOME}/chromium-launcher.sh" || die
-
- # It is important that we name the target "chromium-browser",
- # xdg-utils expect it; bug #355517.
- dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/ungoogled-chromium-browser${browser_suffix}
- # keep the old symlink around for consistency
- dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/ungoogled-chromium${browser_suffix}
-
- use enable-driver && dosym "${CHROMIUM_HOME}/chromedriver" /usr/bin/ungoogled-chromedriver${browser_suffix}
-
- pushd out/Release/locales > /dev/null || die
- chromium_remove_language_paks
- popd > /dev/null || die
-
- insinto "${CHROMIUM_HOME}"
- doins out/Release/*.bin
- doins out/Release/*.pak
- doins -r out/Release/hyphen-data
-
- if use bindist; then
- # We built libffmpeg as a component library, but we can't distribute it
- # with proprietary codec support. Remove it and make a symlink to the requested
- # system library.
- rm -f out/Release/libffmpeg.so \
- || die "Failed to remove bundled libffmpeg.so (with proprietary codecs)"
- # symlink the libffmpeg.so from either ffmpeg-chromium or ffmpeg[chromium].
- einfo "Creating symlink to libffmpeg.so from $(usex ffmpeg-chromium ffmpeg-chromium ffmpeg[chromium])..."
- dosym ../chromium/libffmpeg.so$(usex ffmpeg-chromium .${PV%%\.*} "") \
- /usr/$(get_libdir)/ungoogled-chromium-browser/libffmpeg.so
- fi
-
- (
- shopt -s nullglob
- local files=(out/Release/*.so out/Release/*.so.[0-9])
- [[ ${#files[@]} -gt 0 ]] && doins "${files[@]}"
- )
-
- if ! use system-icu && ! use headless; then
- doins out/Release/icudtl.dat
- fi
-
- doins -r out/Release/locales
- #doins -r out/Release/MEIPreload
-
- # Install vk_swiftshader_icd.json; bug #827861
- doins out/Release/vk_swiftshader_icd.json
-
- if [[ -d out/Release/swiftshader ]]; then
- insinto "${CHROMIUM_HOME}/swiftshader"
- doins out/Release/swiftshader/*.so
- fi
-
- use widevine && dosym WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so "${CHROMIUM_HOME}/libwidevinecdm.so"
-
- # Install icons
- local branding size
- for size in 16 24 32 48 64 128 256 ; do
- case ${size} in
- 16|32) branding="chrome/app/theme/default_100_percent/chromium" ;;
- *) branding="chrome/app/theme/chromium" ;;
- esac
- newicon -s ${size} "${branding}/product_logo_${size}.png" \
- ungoogled-chromium-browser${browser_suffix}.png
- done
-
- # Install desktop entry
- domenu out/Release/ungoogled-chromium-browser${browser_suffix}.desktop
-
- # Install GNOME default application entry (bug #303100).
- insinto /usr/share/gnome-control-center/default-apps
- doins out/Release/ungoogled-chromium-browser${browser_suffix}.xml
-
- # Install AppStream metadata
- insinto /usr/share/appdata
- doins out/Release/ungoogled-chromium-browser${browser_suffix}.appdata.xml
-
- # Install manpage; bug #684550
- doman out/Release/ungoogled-chromium-browser${browser_suffix}.1
- dosym ungoogled-chromium-browser${browser_suffix}.1 /usr/share/man/man1/ungoogled-chromium${browser_suffix}.1
-
- readme.gentoo_create_doc
-}
-
-pkg_postrm() {
- xdg_icon_cache_update
- xdg_desktop_database_update
-}
-
-pkg_postinst() {
- xdg_icon_cache_update
- xdg_desktop_database_update
- readme.gentoo_print_elog
-
- if use !headless && [[ -z "${REPLACING_VERSIONS}" ]]; then
- if use vaapi; then
- elog "Hardware-accelerated video decoding configuration:"
- elog
- elog "Chromium supports multiple backends for hardware acceleration. To enable one,"
- elog " Add to CHROMIUM_FLAGS in /etc/chromium/default:"
- elog
- elog "1. VA-API with OpenGL (recommended for most users):"
- elog " --enable-features=AcceleratedVideoDecodeLinuxGL"
- elog " VaapiVideoDecoder may need to be added as well, but try without first."
- elog
- if use wayland; then
- elog "2. Enhanced Wayland/EGL performance:"
- elog " --enable-features=AcceleratedVideoDecodeLinuxGL,AcceleratedVideoDecodeLinuxZeroCopyGL"
- elog
- fi
- if use X; then
- elog "$(usex wayland "3" "2"). VA-API with Vulkan:"
- elog " --enable-features=VaapiVideoDecoder,VaapiIgnoreDriverChecks,Vulkan,DefaultANGLEVulkan,VulkanFromANGLE"
- elog
- if use wayland; then
- elog " NOTE: Vulkan acceleration requires X11 and will not work under Wayland sessions."
- elog " Use OpenGL-based acceleration instead when running under Wayland."
- elog
- fi
- fi
- elog "Additional options:"
- elog " To enable hardware-accelerated encoding (if supported)"
- elog " add 'AcceleratedVideoEncoder' to your feature list"
- elog " VaapiIgnoreDriverChecks bypasses driver compatibility checks"
- elog " (may be needed for newer/unsupported hardware)"
- elog
- else
- elog "This Chromium build was compiled without VA-API support, which provides"
- elog "hardware-accelerated video decoding."
- fi
- if use screencast; then
- elog "Screencast is disabled by default at runtime. Either enable it"
- elog "by navigating to chrome://flags/#enable-webrtc-pipewire-capturer"
- elog "inside Chromium or add --enable-features=WebRTCPipeWireCapturer"
- elog "to CHROMIUM_FLAGS in /etc/chromium/default."
- elog
- elog "Additional setup may be required for screencasting to work."
- elog "See issue: https://github.com/PF4Public/gentoo-overlay/issues/314"
- fi
- if use gtk4; then
- elog "Chromium prefers GTK3 over GTK4 at runtime. To override this"
- elog "behaviour you need to pass --gtk-version=4, e.g. by adding it"
- elog "to CHROMIUM_FLAGS in /etc/chromium/default."
- fi
- if use widevine; then
- elog "widevine requires binary plugins, which are distributed separately"
- elog "Make sure you have www-plugins/chrome-binary-plugins installed"
- fi
- fi
-
- if systemd_is_booted && ! [[ -f "/etc/machine-id" ]]; then
- ewarn "The lack of an '/etc/machine-id' file on this system booted with systemd"
- ewarn "indicates that the Gentoo handbook was not followed to completion."
- ewarn ""
- ewarn "Chromium is known to behave unpredictably with this system configuration;"
- ewarn "please complete the configuration of this system before logging any bugs."
- fi
-
- # Stable slot doesn't change profile directory, and it's vanishingly unlikely that users will downgrade from dev.
- if [[ -n "${REPLACING_VERSIONS}" ]]; then
- local replacing_non_slotted=false
- # there could be more than one PVR
- for version in ${REPLACING_VERSIONS}; do
- if ver_test "${version}" -le "145.0.7632.116"; then
- replacing_non_slotted=true
- break
- fi
- done
- if ${replacing_non_slotted}; then
- ewarn "This version of Chromium has replaced a non-slotted ebuild."
- if [[ ${SLOT} != "stable" ]]; then
- ewarn "This channel has its own profile directory, so your existing profile will not be used."
- ewarn "To use your existing profile, either copy or move it to the new location."
- ewarn "See https://wiki.gentoo.org/wiki/Chromium#Profile_Directories for more information."
- ewarn ""
- fi
- ewarn "Any existing Progressive Web Apps (PWAs) will need to be reinstalled,"
- ewarn "or have the path in the desktop files updated to point to the new wrapper script."
- fi
- fi
-}
-
-eapply_wrapper () {
- if [ ! -z "${NODIE}" ]; then
- nonfatal eapply "$@"
- else
- eapply "$@"
- fi
-}
-
-git_wrapper () {
- if [ ! -z "${NODIE}" ]; then
- git "$@"
- else
- git "$@" || die
- fi
-}
-
-filter_wrapper () {
- einfo "Applying ${i##*/}"
- #? fuzz factor of 3 is OK?
- if [ ! -z "${NODIE}" ]; then
- filterdiff -p1 "${@:2}" < "$1" | patch -F 3 -p1
- else
- filterdiff -p1 "${@:2}" < "$1" | patch -F 3 -p1 || die
- fi
-}
diff --git a/www-client/ungoogled-chromium/ungoogled-chromium-149.0.7827.53_p1.ebuild b/www-client/ungoogled-chromium/ungoogled-chromium-149.0.7827.53_p1.ebuild
deleted file mode 100644
index f85169ab016a..000000000000
--- a/www-client/ungoogled-chromium/ungoogled-chromium-149.0.7827.53_p1.ebuild
+++ /dev/null
@@ -1,2512 +0,0 @@
-# Copyright 2009-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-# Use following environment variables to customise the build
-# EXTRA_GN — pass extra options to gn
-# NINJAOPTS="-k0 -j8" useful to populate ccache even if ebuild is still failing
-# UGC_SKIP_PATCHES — space-separated list of patches to skip
-# UGC_KEEP_BINARIES — space-separated list of binaries to keep
-# UGC_SKIP_SUBSTITUTION — space-separated list of files to skip domain substitution
-
-# USE=bundled-toolchain is intended for users who want to use the same toolchain
-# as the upstream releases. It's also a good fallback in case we fall behind
-# and need to get a release out quickly (less likely with `dev` in-tree).
-# We can't rely on it as a default since the toolchain is only shipped for x86-64;
-# other architectures will need to use system toolchain.
-
-# Since m133 we are using CI-generated tarballs from
-# https://github.com/chromium-linux-tarballs/chromium-tarballs/
-
-# These are bit-for-bit identical to the official releases, but are built
-# using an external CI system that we have some control over, in case
-# issues pop up again with official tarball generation.
-
-GN_MIN_VER=0.2374
-# chromium-tools/get-chromium-toolchain-strings.py (or just use Chromicler)
-# Node for M145+ should be 24.12.0 but that's not packaged in Gentoo yet. See #969145
-TEST_FONT="9c07d19d9c5ee1ff94f717e6fb17e0c8c354e6f9"
-BUNDLED_CLANG_VER="llvmorg-23-init-10931-g20b6ec66-8"
-BUNDLED_RUST_VER="4c4205163abcbd08948b3efab796c543ba1ea687-2"
-RUST_SHORT_HASH=${BUNDLED_RUST_VER:0:10}-${BUNDLED_RUST_VER##*-}
-NODE_VER="24.12.0"
-ESBUILD_VER="0.25.1"
-ROLLUP_VER="4.57.1" # currently manual.
-
-CHROMIUM_LANGS="af am ar as az be bg bn bs ca cs cy da de el en-GB es es-419 et eu fa fi fil
- fr fr-CA gl gu he hi hr hu hy id is it ja ka kk km kn ko ky lo lt lv mk ml mn mr ms my
- nb ne nl or pa pl pt-BR pt-PT ro ru si sk sl sq sr sr-Latn sv sw ta te th tr uk ur uz
- vi zh-CN zh-HK zh-TW zu"
-
-#UGC_COMMIT_ID="4a7dad94814d52c463602516d1371587631a3bed"
-# UGC_PR_COMMITS=(
-# c917e096342e5b90eeea91ab1f8516447c8756cf
-# 5794e9d12bf82620d5f24505798fecb45ca5a22d
-# )
-
-CROMITE_COMMIT_ID="cb3baf14f52eb4365d017f640f85310735c19b79"
-
-#declare -A CHROMIUM_COMMITS=(
-# ["fcfb1a42813f1e9d8babedc7bb2e0f06101a3151"]="." #148+
-# ["-acb47d9a6b56c4889a2ed4216e9968cfc740086c"]="."
-# # ["-37c28a19804e47a68eabf3cf882a310689fc325b"]="." #disable style check for cromite
-# # ["cd5a0df905a28faa89ff2a4ab44f893f84dc4487"]="net/third_party/quiche/src"
-#)
-
-LLVM_COMPAT=( 21 22 23 )
-PYTHON_COMPAT=( python3_{13..14} )
-PYTHON_REQ_USE="xml(+)"
-RUST_MIN_VER=1.91.0
-RUST_NEEDS_LLVM="yes please"
-RUST_OPTIONAL="yes" # Not actually optional, but we don't need system Rust (or LLVM) with USE=bundled-toolchain
-RUST_REQ_USE="rustfmt" # Upstream run rustfmt on bindgen output, so we need it to be available.
-
-inherit check-reqs chromium-2 desktop flag-o-matic llvm-r1 multiprocessing ninja-utils pax-utils
-inherit python-any-r1 readme.gentoo-r1 rust systemd toolchain-funcs xdg-utils
-
-DESCRIPTION="Modifications to Chromium for removing Google integration and enhancing privacy"
-HOMEPAGE="https://github.com/ungoogled-software/ungoogled-chromium"
-PPC64_HASH="a85b64f07b489b8c6fdb13ecf79c16c56c560fc6"
-PATCH_V="${PV%%\.*}-2"
-COPIUM_COMMIT="b00f26bb5e0781020da5f830981472a142c6baf1"
-SRC_URI="https://github.com/chromium-linux-tarballs/chromium-tarballs/releases/download/${PV/_*}/chromium-${PV/_*}-linux.tar.xz
- https://deps.gentoo.zip/www-client/chromium/rollup-wasm-node-${ROLLUP_VER}.tgz
- https://gitlab.com/Matt.Jolly/chromium-patches/-/archive/${PATCH_V}/chromium-patches-${PATCH_V}.tar.bz2
- !bundled-toolchain? (
- https://codeberg.org/selfisekai/copium/archive/${COPIUM_COMMIT}.tar.gz
- -> chromium-patches-copium-${COPIUM_COMMIT:0:10}.tar.gz
- )
- bundled-toolchain? (
- https://commondatastorage.googleapis.com/chromium-browser-clang/Linux_x64/clang-${BUNDLED_CLANG_VER}.tar.xz
- -> chromium-clang-${BUNDLED_CLANG_VER}.tar.xz
- https://commondatastorage.googleapis.com/chromium-browser-clang/Linux_x64/rust-toolchain-${BUNDLED_RUST_VER}-${BUNDLED_CLANG_VER%-*}.tar.xz
- -> chromium-rust-toolchain-${RUST_SHORT_HASH}-${BUNDLED_CLANG_VER%-*}.tar.xz
- )
- test? (
- https://chromium-fonts.storage.googleapis.com/${TEST_FONT} -> chromium-testfonts-${TEST_FONT:0:10}.tar.gz
- )
- ppc64? (
- https://gitlab.raptorengineering.com/raptor-engineering-public/chromium/openpower-patches/-/archive/${PPC64_HASH}/openpower-patches-${PPC64_HASH}.tar.bz2 -> chromium-openpower-${PPC64_HASH:0:10}.tar.bz2
- )
-"
-
-# Gentoo tarball:
-# https://chromium-tarballs.distfiles.gentoo.org/chromium-${PV/_*}.tar.xz -> chromium-${PV/_*}-gentoo.tar.xz
-
-# chromium-linux-tarballs
-# https://github.com/chromium-linux-tarballs/chromium-tarballs/releases/download/${PV/_*}/chromium-${PV/_*}-linux.tar.xz
-
-# Official tarball:
-# https://commondatastorage.googleapis.com/chromium-browser-official/chromium-${PV/_*}${LITE_TARBALL:+-lite}.tar.xz
-
-# https://gitweb.gentoo.org/proj/chromium-tools.git/tree/get-chromium-licences.py @ 145.0.7632.76
-LICENSE="Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD BSD-2 Base64 Boost-1.0 CC-BY-3.0 CC-BY-4.0 Clear-BSD FFT2D FTL"
-LICENSE+=" IJG ISC LGPL-2 LGPL-2.1 MIT MPL-1.1 MPL-2.0 Ms-PL PSF-2 SGI-B-2.0 SSLeay SunSoft Unicode-3.0"
-LICENSE+=" Unicode-DFS-2015 Unlicense UoI-NCSA ZLIB libtiff openssl"
-LICENSE+=" cromite? ( GPL-3 )"
-
-SLOT="stable"
-KEYWORDS="amd64 ~arm64 ~ppc64 ~x86"
-
-IUSE_SYSTEM_LIBS="abseil-cpp av1 brotli crc32c double-conversion ffmpeg +harfbuzz icu jsoncpp +libusb libvpx +openh264 openjpeg re2 snappy woff2 +zstd"
-IUSE="+X bindist bluetooth bundled-toolchain cfi convert-dict cups custom-cflags debug ffmpeg-chromium enable-driver gtk4 hangouts headless kerberos +libcxx nvidia +official optimize-thinlto optimize-webui override-data-dir pax-kernel pgo"
-IUSE+=" +proprietary-codecs pulseaudio qt6 screencast selinux test thinlto cromite vaapi wayland widevine cpu_flags_ppc_vsx3"
-RESTRICT="
- !bindist? ( bindist )
- !test? ( test )
- arm64? ( test )
- !system-ffmpeg? ( proprietary-codecs? ( bindist ) )
- !system-openh264? ( bindist )
- cromite? ( bindist )"
-
-REQUIRED_USE="
- !headless? ( || ( X wayland ) )
- screencast? ( wayland )
- ffmpeg-chromium? ( bindist proprietary-codecs )
- optimize-thinlto? ( thinlto )
- cfi? ( thinlto )
- x86? ( !thinlto !widevine )
- debug? ( !official )
- vaapi? ( !system-av1 !system-libvpx )
-"
-
-UGC_PV="${PV/_p/-}"
-UGC_PF="${PN}-${UGC_PV}"
-UGC_URL="https://github.com/ungoogled-software/${PN}/archive/"
-
-if [ -z "$UGC_COMMIT_ID" ]; then
- UGC_URL="${UGC_URL}${UGC_PV}.tar.gz -> ${UGC_PF}.tar.gz"
- UGC_WD="${WORKDIR}/${UGC_PF}"
-else
- UGC_URL="${UGC_URL}${UGC_COMMIT_ID}.tar.gz -> ${PN}-${UGC_COMMIT_ID}.tar.gz"
- UGC_WD="${WORKDIR}/ungoogled-chromium-${UGC_COMMIT_ID}"
-fi
-
-SRC_URI+="${UGC_URL}
-"
-
-if [ ! -z "${UGC_PR_COMMITS[*]}" ]; then
- for i in "${UGC_PR_COMMITS[@]}"; do
- SRC_URI+="https://github.com/ungoogled-software/${PN}/commit/$i.patch?full_index=true -> ${PN}-$i.patch
- "
- done
-fi
-
-if [ ! -z "${CHROMIUM_COMMITS[*]}" ]; then
- # for i in "${CHROMIUM_COMMITS[@]}"; do
- for i in "${!CHROMIUM_COMMITS[@]}"; do
- if [[ ${CHROMIUM_COMMITS[$i]} =~ webrtc ]]; then
- #TODO: is it safe to use this mirror?
- SRC_URI+="https://github.com/webrtc-mirror/webrtc/commit/${i/-}.patch?full_index=true -> webrtc-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ angle ]]; then
- SRC_URI+="https://github.com/google/angle/commit/${i/-}.patch?full_index=true -> angle-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ quiche ]]; then
- SRC_URI+="https://github.com/google/quiche/commit/${i/-}.patch?full_index=true -> quiche-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ dawn ]]; then
- SRC_URI+="https://github.com/google/dawn/commit/${i/-}.patch?full_index=true -> dawn-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ perfetto ]]; then
- SRC_URI+="https://github.com/google/perfetto/commit/${i/-}.patch?full_index=true -> perfetto-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ink ]]; then
- SRC_URI+="https://github.com/google/ink/commit/${i/-}.patch?full_index=true -> ink-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ vulkan-utility-libraries ]]; then
- SRC_URI+="https://github.com/KhronosGroup/Vulkan-Utility-Libraries/commit/${i/-}.patch?full_index=true -> vulkan-utility-libraries-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ruy ]]; then
- SRC_URI+="https://github.com/google/ruy/commit/${i/-}.patch?full_index=true -> ruy-${i/-}.patch
- "
- else
- SRC_URI+="https://github.com/chromium/chromium/commit/${i/-}.patch?full_index=true -> chromium-${i/-}.patch
- "
- fi
- done
-fi
-
-SRC_URI+="cromite? ( https://github.com/uazo/cromite/archive/${CROMITE_COMMIT_ID}.tar.gz -> cromite-${CROMITE_COMMIT_ID}.tar.gz )
-"
-
-for i in ${IUSE_SYSTEM_LIBS}; do
- [[ $i =~ ^(\+)?(.*)$ ]]
- IUSE+=" ${BASH_REMATCH[1]}system-${BASH_REMATCH[2]}"
-done
-
-COMMON_X_DEPEND="
- x11-libs/libXcomposite:=
- x11-libs/libXcursor:=
- x11-libs/libXdamage:=
- x11-libs/libXfixes:=
- >=x11-libs/libXi-1.6.0:=
- x11-libs/libXrandr:=
- x11-libs/libXrender:=
- x11-libs/libXtst:=
- x11-libs/libxshmfence:=
-"
-
-# sys-libs/zlib: https://bugs.gentoo.org/930365; -ng is not compatible.
-# We _could_ use the bundled minizip, but that's against policy.
-COMMON_SNAPSHOT_DEPEND="
- system-icu? ( >=dev-libs/icu-78:= )
- system-abseil-cpp? ( >=dev-cpp/abseil-cpp-20260107.0 )
- system-brotli? ( >=app-arch/brotli-9999 )
- system-crc32c? ( dev-libs/crc32c )
- system-double-conversion? ( dev-libs/double-conversion )
- system-woff2? ( media-libs/woff2 )
- system-snappy? ( app-arch/snappy )
- system-jsoncpp? ( dev-libs/jsoncpp )
- system-openjpeg? ( media-libs/openjpeg:2= )
- system-re2? ( >=dev-libs/re2-0.2019.08.01:= )
- system-libvpx? ( >=media-libs/libvpx-1.13.0:=[postproc] )
- system-libusb? ( virtual/libusb:1 )
- cromite? ( dev-util/patchutils )
- >=dev-libs/libxml2-2.12.4:=[icu]
- dev-libs/nspr:=
- >=dev-libs/nss-3.26:=
- dev-libs/libxslt:=
- media-libs/fontconfig:=
- >=media-libs/freetype-2.11.0-r1:=
- system-harfbuzz? ( >=media-libs/harfbuzz-3:0=[icu(-)] )
- media-libs/libjpeg-turbo:=
- media-libs/libpng:=
- system-zstd? ( >=app-arch/zstd-1.5.5:= )
- >=media-libs/libwebp-0.4.0:=
- media-libs/mesa:=[gbm(+)]
- >=media-libs/openh264-2.6.0:=
- system-av1? (
- >=media-libs/dav1d-1.0.0:=
- >=media-libs/libaom-3.7.0:=
- )
- sys-libs/zlib:=
- !headless? (
- dev-libs/glib:2
- >=media-libs/alsa-lib-1.0.19:=
- pulseaudio? (
- || (
- media-libs/libpulse
- >=media-sound/apulse-0.1.9
- )
- )
- sys-apps/pciutils:=
- kerberos? ( virtual/krb5 )
- vaapi? ( >=media-libs/libva-2.7:=[X?,wayland?] )
- X? (
- x11-base/xorg-proto:=
- x11-libs/libX11:=
- x11-libs/libxcb:=
- x11-libs/libXext:=
- )
- x11-libs/libxkbcommon:=
- wayland? (
- dev-libs/libffi:=
- dev-libs/wayland:=
- screencast? (
- media-video/pipewire:=
- || (
- sys-apps/xdg-desktop-portal-gnome
- sys-apps/xdg-desktop-portal-gtk
- kde-plasma/xdg-desktop-portal-kde
- gui-libs/xdg-desktop-portal-lxqt
- gui-libs/xdg-desktop-portal-wlr
- )
- )
- )
- )
-"
-
-COMMON_DEPEND="
- ${COMMON_SNAPSHOT_DEPEND}
- app-arch/bzip2:=
- dev-libs/expat:=
- system-ffmpeg? (
- >=media-video/ffmpeg-6.1:=
- >=media-libs/opus-1.3.1:=
- )
- net-misc/curl[ssl]
- sys-apps/dbus:=
- media-libs/flac:=
- sys-libs/zlib:=[minizip]
- !headless? (
- >=app-accessibility/at-spi2-core-2.46.0:2
- media-libs/mesa:=[X?,wayland?]
- virtual/udev
- x11-libs/cairo:=
- x11-libs/gdk-pixbuf:2
- x11-libs/pango:=
- cups? ( >=net-print/cups-1.3.11:= )
- qt6? ( dev-qt/qtbase:6[gui,widgets] )
- X? ( ${COMMON_X_DEPEND} )
- )
-"
-RDEPEND="${COMMON_DEPEND}
- !www-client/ungoogled-chromium:0
- >=www-client/chromium-common-2
- !headless? (
- || (
- x11-libs/gtk+:3[X?,wayland?]
- gui-libs/gtk:4[X?,wayland?]
- )
- qt6? ( dev-qt/qtbase:6[X?,wayland?] )
- )
- virtual/ttf-fonts
- selinux? ( sec-policy/selinux-chromium )
- bindist? (
- ffmpeg-chromium? ( media-video/ffmpeg-chromium:${PV%%\.*} )
- )
- !override-data-dir? (
- !www-client/chromium:${SLOT}
- !www-client/cromite:${SLOT}[-override-data-dir]
- )
-"
-
-DEPEND="${COMMON_DEPEND}
- !headless? (
- gtk4? ( gui-libs/gtk:4[X?,wayland?] )
- !gtk4? ( x11-libs/gtk+:3[X?,wayland?] )
- )
-"
-
- # pgo? ( >=llvm-core/clang-22.0.0_pre20260106 >=llvm-core/lld-22.0.0_pre20260106 )
-BDEPEND="
- ${COMMON_SNAPSHOT_DEPEND}
- ${PYTHON_DEPS}
- $(python_gen_any_dep '
- dev-python/setuptools[${PYTHON_USEDEP}]
- ')
- >=app-arch/gzip-1.7
- !headless? (
- qt6? ( dev-qt/qtbase:6 )
- )
- !bundled-toolchain? ( $(llvm_gen_dep '
- llvm-core/clang:${LLVM_SLOT}
- llvm-core/llvm:${LLVM_SLOT}
- llvm-core/lld:${LLVM_SLOT}
- cfi? ( llvm-runtimes/clang-runtime:${LLVM_SLOT}[sanitize] )
- official? (
- !ppc64? ( llvm-runtimes/compiler-rt-sanitizers:${LLVM_SLOT}[cfi] )
- ) ')
- ${RUST_DEPEND}
- )
- >=dev-util/bindgen-0.72.1
- >=dev-build/gn-${GN_MIN_VER}
- app-alternatives/ninja
- dev-lang/perl
- >=dev-util/gperf-3.2
- dev-util/esbuild:${ESBUILD_VER}
- dev-vcs/git
- >=net-libs/nodejs-${NODE_VER}[inspector]
- sys-apps/hwdata
- >=sys-devel/bison-2.4.3
- sys-devel/flex
- virtual/pkgconfig
- x11-misc/xdg-utils
-"
-
-if ! has chromium_pkg_die ${EBUILD_DEATH_HOOKS}; then
- EBUILD_DEATH_HOOKS+=" chromium_pkg_die";
-fi
-
-DISABLE_AUTOFORMATTING="yes"
-DOC_CONTENTS="
-Some web pages may require additional fonts to display properly.
-Try installing some of the following packages if some characters
-are not displayed properly:
-- media-fonts/arphicfonts
-- media-fonts/droid
-- media-fonts/ipamonafont
-- media-fonts/noto
-- media-fonts/ja-ipafonts
-- media-fonts/takao-fonts
-- media-fonts/wqy-microhei
-- media-fonts/wqy-zenhei
-
-To fix broken icons on the Downloads page, you should install an icon
-theme that covers the appropriate MIME types, and configure this as your
-GTK+ icon theme.
-
-For native file dialogs in KDE, install kde-apps/kdialog.
-
-To make password storage work with your desktop environment you may
-have install one of the supported credentials management applications:
-- app-crypt/libsecret (GNOME)
-- kde-frameworks/kwallet (KDE)
-If you have one of above packages installed, but don't want to use
-them in Chromium, then add --password-store=basic to CHROMIUM_FLAGS
-in /etc/chromium/default.
-"
-
-S="${WORKDIR}/chromium-${PV/_*}"
-
-python_check_deps() {
- python_has_version "dev-python/setuptools[${PYTHON_USEDEP}]"
-}
-
-pre_build_checks() {
- # Check build requirements: bugs #471810, #541816, #914220
- # We're going to start doing maths here on the size of an unpacked source tarball,
- # this should make updates easier as chromium continues to balloon in size.
- # xz -l /var/cache/distfiles/chromium-${PV}*.tar.xz
- local base_disk=9 # Round up
- use test && base_disk=$((base_disk + 5))
- local extra_disk=1 # Always include a little extra space
- local memory=4
- tc-is-cross-compiler && extra_disk=$((extra_disk * 2))
- if tc-is-lto || use pgo; then
- memory=$((memory * 2 + 1))
- tc-is-cross-compiler && extra_disk=$((extra_disk * 2)) # Double the requirements
- use pgo && extra_disk=$((extra_disk + 4))
- fi
- if is-flagq '-g?(gdb)?([1-9])'; then
- if use custom-cflags; then
- extra_disk=$((extra_disk + 5))
- fi
- memory=$((memory * 2))
- fi
- local CHECKREQS_MEMORY="${memory}G"
- local CHECKREQS_DISK_BUILD="$((base_disk + extra_disk))G"
- check-reqs_${EBUILD_PHASE_FUNC}
-}
-
-pkg_pretend() {
- if [[ ${MERGE_TYPE} != binary ]]; then
- # The pre_build_checks are all about compilation resources, no need to run it for a binpkg
- pre_build_checks
- fi
-
- if use headless; then
- local headless_unused_flags=("cups" "kerberos" "pulseaudio" "qt6" "vaapi" "wayland")
- for myiuse in ${headless_unused_flags[@]}; do
- use ${myiuse} && ewarn "Ignoring USE=${myiuse}, USE=headless is set."
- done
- fi
-
- if ! use bindist && use ffmpeg-chromium; then
- ewarn "Ignoring USE=ffmpeg-chromium, USE=bindist is not set."
- fi
- if use libcxx; then
- ewarn
- ewarn "Building with libcxx, please be aware that system-*"
- ewarn "and some other c++ dependencies need to be compiled"
- ewarn "with the same c++ library as ungoogled-chromium itself"
- ewarn "dev-libs/jsoncpp is most problematic, see #58 #49 #119 for details"
- ewarn "Simplest solution would be to disable corresponding system-* flags"
- ewarn
- fi
- if use cfi; then
- ewarn
- ewarn "Building with cfi is only possible if building with -stdlib=libc++"
- ewarn "Make sure all dependencies are also built this way, see #40"
- ewarn
- fi
- if use cromite; then
- ewarn
- ewarn "Cromite patches are very experimental and unstable"
- ewarn "Please consider testing them and giving feedback upstream:"
- ewarn "https://github.com/uazo/cromite/issues"
- ewarn "Not all patches are applied, let me know if others should be considered too"
- ewarn
- fi
-}
-
-pkg_setup() {
- if [[ ${MERGE_TYPE} != binary ]]; then
- # The pre_build_checks are all about compilation resources, no need to run it for a binpkg
- pre_build_checks
-
- # We haven't massaged any CFLAGS yet, so we want to do this before we force CC/CXX to prevent warnings.
- local want_lto="false"
- tc-is-lto && want_lto="true"
-
- # The linux:unbundle toolchain in GN grabs CC, CXX, CPP (etc) from the environment
- # We'll set these to clang here then use llvm-utils functions to very explicitly set these
- # to a sane value.
- # This is effectively the 'force-clang' path if GCC support is re-added.
- if use !bundled-toolchain; then
- llvm-r1_pkg_setup
- rust_pkg_setup
-
- # Forcing clang; respect llvm_slot_x to enable selection of impl via LLVM_COMPAT
- AR=llvm-ar
- CPP="${CHOST}-clang++-${LLVM_SLOT} -E"
- NM=llvm-nm
- CC="${CHOST}-clang-${LLVM_SLOT}"
- CXX="${CHOST}-clang++-${LLVM_SLOT}"
- fi
-
- use_lto="false"
- local lto_usable="true"
- if [[ "$want_lto" == "true" ]]; then
- if use arm64 && [[ "${LLVM_SLOT}" -lt 22 ]]; then
- einfo "LTO is broken with LLVM 21 on arm64, ignoring CFLAGS."
- lto_usable="false"
- else
- use_lto="true"
- fi
- # We can rely on GN to do this for us; without this builds
- # take significantly longer with LTO enabled.
- filter-lto
- fi
-
- if [[ "$use_lto" == "false" ]] && use official && [[ "$lto_usable" == "true" ]]; then
- einfo "USE=official selected and LTO not detected."
- einfo "It is _highly_ recommended that LTO be enabled for performance reasons"
- einfo "and to be consistent with the upstream \"official\" build optimisations."
- fi
-
- if [[ "$use_lto" == "false" ]] && use test; then
- die "Tests require CFI which requires LTO"
- fi
-
- export use_lto
-
- # 936858
- if tc-ld-is-mold; then
- eerror "Your toolchain is using the mold linker."
- eerror "This is not supported by Chromium."
- die "Please switch to a different linker."
- fi
-
- if tc-is-cross-compiler; then
- use pgo && die "The pgo USE flag cannot be used when cross-compiling"
- CPP="${CBUILD}-clang++-${LLVM_SLOT} -E"
- fi
-
- # Sanity checks for development convenience
- if ver_test $(gn --version || die) -lt ${GN_MIN_VER}; then
- die "dev-build/gn >= ${GN_MIN_VER} is required to build this Chromium"
- fi
-
- # Sometimes, when adding a new LLVM slot, devs (me) forget to install an appropriate lld.
- local lld_ver=$(ld.lld --version | awk '{split($2,a,"."); print a[1]}' || die "Failed to check lld version")
- if [[ ${lld_ver} -lt ${LLVM_SLOT} ]]; then
- die "Your lld version (${lld_ver}) is too old for the selected LLVM slot (${LLVM_SLOT}). Please install a newer lld or select an older LLVM slot."
- fi
- fi
-
- chromium_suid_sandbox_check_kernel_config
-}
-
-src_unpack() {
- # # Here be dragons!
- # local XCLD="--exclude=chromium-${PV/_*}/third_party/instrumented_libs \
- # --exclude=chromium-${PV/_*}/third_party/llvm \
- # --exclude=chromium-${PV/_*}/third_party/llvm-build \
- # --exclude=chromium-${PV/_*}/third_party/node/linux \
- # --exclude=chromium-${PV/_*}/third_party/rust-src \
- # --exclude=chromium-${PV/_*}/third_party/rust-toolchain \
- # --exclude=chromium-${PV/_*}/build/linux/debian_bullseye_i386-sysroot \
- # --exclude=chromium-${PV/_*}/build/linux/debian_bullseye_amd64-sysroot \
- # --exclude=chromium-${PV/_*}/third_party/angle/third_party/VK-GL-CTS \
- # "
-
- # if ! use libcxx ; then
- # XCLD+=" --exclude=chromium-${PV/_*}/third_party/libc++"
- # fi
-
- # if ! use pgo ; then
- # XCLD+=" --exclude=chromium-${PV/_*}/chrome/build/pgo_profiles"
- # fi
-
- # einfo "Unpacking chromium-${PV/_*}.tar.xz to ${WORKDIR}"
- # # Gentoo tarball:
- # # tar ${XCLD} -xf "${DISTDIR}/chromium-${PV/_*}-gentoo.tar.xz" -C "${WORKDIR}" || die
- # tar ${XCLD} -xf "${DISTDIR}/chromium-${PV/_*}${LITE_TARBALL:+-lite}.tar.xz" -C "${WORKDIR}" || die
-
- # unpack ${UGC_URL#*->}
- # # unpack chromium-patches-${PATCH_V}.tar.bz2
- # # Warned you!
-
- unpack chromium-${PV/_*}-linux.tar.xz
- unpack chromium-patches-${PATCH_V}.tar.bz2
- # These should only be required when we're not using the official toolchain
- if use !bundled-toolchain; then
- unpack chromium-patches-copium-${COPIUM_COMMIT:0:10}.tar.gz
- fi
-
- if use test; then
- # This just contains a bunch of font files that need to be unpacked (or moved) to the correct location.
- local testfonts_dir="${WORKDIR}/chromium-${PV/_*}/third_party/test_fonts/test_fonts"
- local testfonts_tar="${DISTDIR}/chromium-testfonts-${TEST_FONT:0:10}.tar.gz"
- einfo "Unpacking test fonts ..."
- tar xf "${testfonts_tar}" -C "${testfonts_dir}" || die "Failed to unpack testfonts"
- fi
-
- # We need to manually unpack this since M126 else we'd unpack one toolchain over the other.
- # Since we're doing that anyway let's unpack to sensible locations to make symlink creation easier.
- if use bundled-toolchain; then
- einfo "Unpacking bundled Clang ..."
- mkdir -p "${WORKDIR}"/clang || die "Failed to create clang directory"
- tar xf "${DISTDIR}/chromium-clang-${BUNDLED_CLANG_VER}.tar.xz" -C "${WORKDIR}/clang" || die "Failed to unpack Clang"
- einfo "Unpacking bundled Rust ..."
- local rust_dir="${WORKDIR}/rust-toolchain"
- mkdir -p "${rust_dir}" || die "Failed to create rust toolchain directory"
- tar xf "${DISTDIR}/chromium-rust-toolchain-${RUST_SHORT_HASH}-${BUNDLED_CLANG_VER%-*}.tar.xz" -C "${rust_dir}" ||
- die "Failed to unpack Rust"
- fi
-
- if use ppc64; then
- unpack chromium-openpower-${PPC64_HASH:0:10}.tar.bz2
- fi
-
- # This is a dirty hack, but we need rollup to build successfully and it's proving to be challenging
- # to build locally due to deps
- unpack rollup-wasm-node-${ROLLUP_VER}.tgz
-
- if use cromite; then
- unpack cromite-${CROMITE_COMMIT_ID}.tar.gz
- fi
-
- unpack ${UGC_URL#*->}
-}
-
-remove_compiler_builtins() {
- # We can't use the bundled compiler builtins with the system toolchain
- # We used to `grep` then `sed`, but it was indirect. Combining the two into a single
- # `awk` command is more efficient and lets us document the logic more clearly.
-
- local pattern=' configs += [ "//build/config/clang:compiler_builtins" ]'
- local target='build/config/compiler/BUILD.gn'
-
- local tmpfile
- tmpfile=$(mktemp) || die "Failed to create temporary file."
-
- if awk -v pat="${pattern}" '
- BEGIN {
- match_found = 0
- }
-
- # If the delete countdown is active, decrement it and skip to the next line.
- d > 0 { d--; next }
-
- # If the current line matches the pattern...
- $0 == pat {
- match_found = 1 # ...set our flag to true.
- d = 2 # Set delete counter for this line and the next two.
- prev = "" # Clear the buffered previous line so it is not printed.
- next
- }
-
- # For any other line, print the buffered previous line.
- NR > 1 { print prev }
-
- # Buffer the current line to be printed on the next cycle.
- { prev = $0 }
-
- END {
- # Print the last line if it was not part of a deleted block.
- if (d == 0) { print prev }
-
- # If the pattern was never found, exit with a failure code.
- if (match_found == 0) {
- exit 1
- }
- }
- ' "${target}" > "${tmpfile}"; then
- # AWK SUCCEEDED (exit code 0): The pattern was found and edited.
- # This is to avoid gawk's `-i inplace` option which users complain about.
- mv "${tmpfile}" "${target}"
- else
- # AWK FAILED (exit code 1): The pattern was not found.
- rm -f "${tmpfile}"
- die "Awk patch failed: Pattern not found in ${target}."
- fi
-}
-
-src_prepare() {
- # Calling this here supports resumption via FEATURES=keepwork
- python_setup
-
- # We'll fill this in as we go. Patches go in chromium-patches.
- local PATCHES=()
-
- rm "${WORKDIR}/chromium-patches-${PATCH_V}/common/cr131-unbundle-icu-target.patch"
- if use pgo; then
- rm "${WORKDIR}/chromium-patches-${PATCH_V}/rust/cr146-fix-botched-bytemuck-roll.patch"
- sed -i '/SupportedLaneCount/d' third_party/rust/chromium_crates_io/vendor/bytemuck-v1/src/zeroable.rs || die
- sed -i '/SupportedLaneCount/d' third_party/rust/chromium_crates_io/vendor/bytemuck-v1/src/pod.rs || die
- fi
-
- #cp -f ${WORKDIR}/chromium-patches-${PATCH_V}/*-compiler.patch "${T}/compiler.patch"
- ##cp -f ${FILESDIR}/chromium-147-compiler.patch "${T}/compiler.patch"
- #if ! use custom-cflags; then #See #25 #92
- # sed -i '/default_stack_frames/Q' "${T}/compiler.patch" || die
- #fi
-
- PATCHES+=( "${WORKDIR}/chromium-patches-${PATCH_V}/common/" )
- PATCHES+=( "${FILESDIR}/restore-x86-r3.patch" )
-
- # https://issues.chromium.org/issues/442698344
- # Unreleased fontconfig changed magic numbers and google have rolled to this version
- if has_version "<=media-libs/fontconfig-2.17.1"; then
- PATCHES+=( "${FILESDIR}/chromium-142-work-with-old-fontconfig.patch" )
- fi
-
- if use bundled-toolchain; then
- # We need to symlink the toolchain into the expected location
- einfo "Symlinking Clang toolchain to expected location ..."
- mkdir -p third_party/llvm-build/ || die "Failed to create llvm-build directory"
- # the 'Chromium Linux Tarballs' seem to already have 'Release+Asserts/{lib,bin}'; not sure if this is an
- # upstream change - we're using the same scripts to build, theoretically. We'll still attempt to create
- # llvm-build, but we'll rm Release+Asserts and symlink directly.
- if [[ -d third_party/llvm-build/Release+Asserts ]]; then
- rm -r third_party/llvm-build/Release+Asserts || die "Failed to remove third_party/llvm-build/Release+Asserts"
- fi
- ln -s "${WORKDIR}"/clang third_party/llvm-build/Release+Asserts || die "Failed to bundle Clang"
- einfo "Symlinking Rust toolchain to expected location ..."
- # As above, so below
- if [[ -d third_party/rust-toolchain ]]; then
- rm -r third_party/rust-toolchain || die "Failed to remove third_party/rust-toolchain"
- fi
- ln -s "${WORKDIR}"/rust-toolchain third_party/rust-toolchain || die "Failed to bundle rust"
- cp "${WORKDIR}"/rust-toolchain/VERSION \
- "${WORKDIR}"/rust-toolchain/INSTALLED_VERSION || die "Failed to set rust version"
- else
- # We don't need our toolchain patches if we're using the official toolchain
-
- # Copium patches go here.
- PATCHES+=(
- "${WORKDIR}/copium/cr143-libsync-__BEGIN_DECLS.patch"
- "${WORKDIR}/copium/cr149-unbundle-minizip-undo-unicode.patch"
- )
-
- # Automate conditional application of chromium-patches
- # The directory structure is expected to be something like:
- # chromium-patches-145/
- # ├── toolchain/
- # │ ├── cr123-foo.patch
- # │ └── cr135-bar.patch
- # ├── llvm/
- # │ ├── cr144-baz.patch
- # │ └── lt-23/
- # │ └── cr145-bleeding-edge-llvm-feature.patch
- # Where `lt-23` means "apply this patch if the LLVM version is less than 23".
- # Only categories in `slot_map` will be checked for version constraints.
- shopt -s nullglob
- local -A slot_map=( [llvm]="${LLVM_SLOT}" [rust]="${RUST_SLOT}" )
-
- for category in "${WORKDIR}/chromium-patches-${PATCH_V}"/*/; do
- local category_name="${category%/}"
- category_name="${category_name##*/}"
-
- # Skip arch-specific categories
- if [[ "${category_name}" == "ppc64le" ]]; then
- use ppc64 || continue
- fi
-
- # We applied common patches above, no need to apply them again here
- [[ "${category_name}" == "common" ]] && continue
-
- # Unconditional patches for this category
- local category_patches=( "${category}"*.patch )
- [[ ${#category_patches[@]} -gt 0 ]] && PATCHES+=( "${category}" )
-
- # Version-constrained subdirectories (e.g., llvm/lt-23/)
- for constraint_dir in "${category}"*/; do
- local dir_name="${constraint_dir%/}"
- dir_name="${dir_name##*/}"
- if [[ "${dir_name}" =~ ^lt-(.*)$ && -v slot_map[${category_name}] ]]; then
- ver_test "${slot_map[${category_name}]}" -lt "${BASH_REMATCH[1]}" &&
- PATCHES+=( "${constraint_dir}" )
- fi
- done
- done
-
- shopt -u nullglob
-
- # Strictly speaking this doesn't need to be gated (no bundled toolchain for ppc64); it keeps the logic together
- if use ppc64; then
- local patchset_dir="${WORKDIR}/openpower-patches-${PPC64_HASH}/patches"
- # patch causes build errors on 4K page systems (https://bugs.gentoo.org/show_bug.cgi?id=940304)
- local page_size_patch="ppc64le/third_party/use-sysconf-page-size-on-ppc64.patch"
- local isa_3_patch="ppc64le/core/baseline-isa-3-0.patch"
- # Apply the OpenPOWER patches (check for page size and isa 3.0)
- openpower_patches=( $(grep -E "^ppc64le|^upstream" "${patchset_dir}/series" | grep -v "${page_size_patch}" |
- grep -v "${isa_3_patch}" || die) )
- for patch in "${openpower_patches[@]}"; do
- PATCHES+=( "${patchset_dir}/${patch}" )
- done
- if [[ $(getconf PAGESIZE) == 65536 ]]; then
- PATCHES+=( "${patchset_dir}/${page_size_patch}" )
- fi
- # We use vsx3 as a proxy for 'want isa3.0' (POWER9)
- if use cpu_flags_ppc_vsx3 ; then
- PATCHES+=( "${patchset_dir}/${isa_3_patch}" )
- fi
- fi
-
- remove_compiler_builtins
-
- # We can't rely on the eselect'd Rust to actually include rustfmt, so we'll point to the selected slot specifically.
- local suffix=""
- if [[ "${RUST_TYPE}" == "binary" ]]; then
- suffix="-bin-${RUST_SLOT}"
- else
- suffix="-${RUST_SLOT}"
- fi
- sed -i "s|/bin/rustfmt|/bin/rustfmt${suffix}|g" build/rust/rust_bindgen_generator.gni ||
- die "Failed to update rustfmt path"
-
- fi
-
- # Do this before we apply patches since (e.g.) ppc64 needs to patch rollup and it's easier in ${S}
- einfo "Moving rollup wasm-node package into place ..."
- mkdir -p third_party/devtools-frontend/src/node_modules/@rollup/wasm-node ||
- die "Failed to create node_modules/@rollup/wasm-node"
- mv "${WORKDIR}"/package/* third_party/devtools-frontend/src/node_modules/@rollup/wasm-node ||
- die "Failed to move rollup package"
-
- if [ ! -z "${CHROMIUM_COMMITS[*]}" ]; then
- # for i in "${CHROMIUM_COMMITS[@]}"; do
- for i in "${!CHROMIUM_COMMITS[@]}"; do
- if [[ ${CHROMIUM_COMMITS[$i]} =~ webrtc ]]; then
- patch_prefix="webrtc"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ angle ]]; then
- patch_prefix="angle"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ quiche ]]; then
- patch_prefix="quiche"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ dawn ]]; then
- patch_prefix="dawn"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ perfetto ]]; then
- patch_prefix="perfetto"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ink ]]; then
- patch_prefix="ink"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ vulkan-utility-libraries ]]; then
- patch_prefix="vulkan-utility-libraries"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ruy ]]; then
- patch_prefix="ruy"
- else
- patch_prefix="chromium"
- fi
- pushd "${CHROMIUM_COMMITS[$i]}" > /dev/null || die
- if [[ $i = -* ]]; then
- einfo "Reverting ${patch_prefix}-${i/-}.patch"
- git_wrapper apply -R --exclude="*unittest.cc" --exclude="DEPS" \
- -p1 < "${DISTDIR}/${patch_prefix}-${i/-}.patch"
- else
- einfo "Applying ${patch_prefix}-${i/-}.patch"
- git_wrapper apply --exclude="*unittest.cc" --exclude="DEPS" \
- -p1 < "${DISTDIR}/${patch_prefix}-${i/-}.patch"
- fi
- popd > /dev/null || die
- done
- fi
-
- if ! use bluetooth ; then
- PATCHES+=(
- "${FILESDIR}/disable-bluez-r7.patch"
- )
- fi
-
- if use convert-dict ; then
- PATCHES+=(
- "${FILESDIR}/chromium-ucf-dict-utility-r3.patch"
- )
- fi
-
- if ! use libcxx ; then
- PATCHES+=(
- "${FILESDIR}/fix-wayland-oncecallback-copy.patch"
- )
- fi
-
- if use system-ffmpeg; then
- PATCHES+=(
- "${FILESDIR}/chromium-141-opus-mp3.patch"
- "${FILESDIR}/chromium-135-hevc.patch"
- )
- sed -i "\!AVFMT_FLAG_NOH264PARSE!d" media/filters/ffmpeg_glue.cc || die
- ewarn "You need to expose \"av_stream_get_first_dts\" in ffmpeg via user patch"
- fi
-
- if use system-av1; then
- PATCHES+=(
- "${FILESDIR}/chromium-system-av1.patch"
- )
- fi
-
- if use system-libvpx; then
- PATCHES+=(
- "${FILESDIR}/chromium-system-libvpx.patch"
- )
- fi
-
- if use system-openjpeg ; then
- PATCHES+=(
- "${FILESDIR}/chromium-system-openjpeg-r4.patch"
- )
- fi
-
- if use x86 ; then
- #* Fixes a segfault in transport_security_state_generator
- PATCHES+=(
- "${FILESDIR}/fix-segfault-x86.patch"
- )
- fi
-
- # Testing all patches when NODIE is defined
- if [ ! -z "${NODIE}" ]; then
- for i in "${PATCHES[@]}"; do
- eapply_wrapper "$i"
- done
- nonfatal eapply_user
- else
- default
- fi
-
- if use cromite ; then
- BR_PA_PATH="${WORKDIR}/cromite-${CROMITE_COMMIT_ID}/build/patches"
-
- sed -i '/b\/components\/components_strings\.grd/,+10d' "${BR_PA_PATH}/Add-cromite-flags-support.patch" || die
- sed -i '/b\/chrome\/android\/java\/res\/xml\/privacy_preferences\.xml/,+13d' "${BR_PA_PATH}/Add-cromite-flags-support.patch" || die
- sed -i '/b\/android_webview\/support_library\/java\/src\/org\/chromium\/support_lib_glue/,+11d' "${BR_PA_PATH}/Client-hints-overrides.patch" || die
- sed -i '/webapps_strings.grdp" \/>/{s++webapps_strings.grdp" /><part file="cromite_components_strings_grd/placeholder.txt"/>+;h};${x;/./{x;q0};x;q1}' \
- components/components_strings.grd || die
-
- sed -i 's/absl::/std::/' "${BR_PA_PATH}/Add-a-proxy-configuration-page.patch" || die
-
- filterdiff -p1 "${BR_PA_PATH}/JIT-site-settings.patch" --exclude="content/browser/renderer_host/render_process_host_impl.cc" \
- > "${BR_PA_PATH}/JIT-site-settings.patch1"
- mv -f "${BR_PA_PATH}/JIT-site-settings.patch1" "${BR_PA_PATH}/JIT-site-settings.patch"
-
- BROMITE_PATCHES=(
- "${BR_PA_PATH}/bromite-build-utils.patch"
- "${BR_PA_PATH}/Battery-API-return-nothing.patch"
- "${BR_PA_PATH}/Multiple-fingerprinting-mitigations.patch"
- "${BR_PA_PATH}/Add-flag-to-configure-maximum-connections-per-host.patch"
- "${BR_PA_PATH}/Add-a-proxy-configuration-page.patch"
- "${BR_PA_PATH}/Enable-StrictOriginIsolation-and-SitePerProcess.patch"
- "${BR_PA_PATH}/Disable-requests-for-single-word-Omnibar-searches.patch"
- "${BR_PA_PATH}/Reduce-HTTP-headers-in-DoH-requests-to-bare-minimum.patch"
- "${BR_PA_PATH}/Client-hints-overrides.patch"
- "${BR_PA_PATH}/Disable-idle-detection.patch"
- "${BR_PA_PATH}/Disable-TLS-resumption.patch"
- "${BR_PA_PATH}/Remove-navigator.connection-info.patch"
-
- "${BR_PA_PATH}/AudioBuffer-AnalyserNode-fp-mitigations.patch"
- "${BR_PA_PATH}/Fonts-fingerprinting-mitigation.patch"
- "${BR_PA_PATH}/Content-settings-infrastructure.patch"
- "${BR_PA_PATH}/Add-autoplay-site-setting.patch"
- "${BR_PA_PATH}/Site-setting-for-images.patch"
- "${BR_PA_PATH}/JIT-site-settings.patch"
- "${BR_PA_PATH}/Add-webGL-site-setting.patch"
- "${BR_PA_PATH}/Add-webRTC-site-settings.patch"
- "${BR_PA_PATH}/Show-site-settings-for-cookies-javascript-and-ads.patch"
- "${BR_PA_PATH}/Viewport-Protection-flag.patch"
- "${BR_PA_PATH}/Revert-remove-allowscript-content-setting-secondary-url.patch"
- "${BR_PA_PATH}/Timezone-customization.patch"
- "${BR_PA_PATH}/Disable-speechSynthesis-getVoices-API.patch"
- "${BR_PA_PATH}/Remove-support-for-device-memory-and-cpu-recovery.patch"
- "${BR_PA_PATH}/Disable-Feeback-Collector.patch"
- "${BR_PA_PATH}/Disable-remote-altsvc-for-h3-connections.patch"
- "${BR_PA_PATH}/Add-cromite-flags-support.patch"
- "${BR_PA_PATH}/Enables-deactivation-of-the-js-debugger-statement.patch"
- )
- for i in "${BROMITE_PATCHES[@]}"; do
- if [[ "$i" =~ "Add-autoplay-site-setting.patch" ]] ||
- [[ "$i" =~ "JIT-site-settings.patch" ]] ||
- [[ "$i" =~ "Site-setting-for-images.patch" ]]; then
- einfo "Git binary patch: ${i##*/}"
- git_wrapper apply -p1 < "$i"
- else
- filter_wrapper "$i" --exclude="chrome/android/*"
- fi
- done
-
- #! conflicting patches
- sed -i '/browser_features.cc/,+17d' \
- "${UGC_WD}/patches/extra/ungoogled-chromium/add-flag-to-clear-data-on-exit.patch" || die
- sed -i 's$} // namespace features$BASE_FEATURE(kClearDataOnExit, "ClearDataOnExit", base::FEATURE_DISABLED_BY_DEFAULT);}$' \
- chrome/browser/browser_features.cc || die
- sed -i 's$} // namespace features$BASE_DECLARE_FEATURE(kClearDataOnExit);}$' \
- chrome/browser/browser_features.h || die
- sed -i 's$kChromeUIAboutHost,$kChromeUIAboutHost,"ungoogled-first-run",$' \
- chrome/common/webui_url_constants.cc || die
- sed -i '/chrome\/common\/webui_url_constants.cc/Q' \
- "${UGC_WD}/patches/extra/ungoogled-chromium/first-run-page.patch" || die
-
- #! normalise paths in py
- sed -i 's$os.path.dirname(include_file)$os.path.abspath(os.path.dirname(include_file))$' \
- build/bromite/gyp/cpp_bromite_include.py || die
- fi
-
- # if [[ ${LLVM_SLOT} == "19" ]]; then
- # # Upstream now hard depend on a feature that was added in LLVM 20.1, but we don't want to stabilise that yet.
- # # Do the temp file shuffle in case someone is using something other than `gawk`
- # {
- # awk '/config\("clang_warning_suppression"\) \{/ { print $0 " }"; sub(/clang/, "xclang"); print; next }
- # { print }' build/config/compiler/BUILD.gn > "${T}/build.gn" && \
- # mv "${T}/build.gn" build/config/compiler/BUILD.gn
- # } || die "Unable to disable warning suppression"
- # fi
-
- ## Not included in -lite tarballs, but we should check for it anyway.
- #if [[ -f third_party/node/linux/node-linux-x64/bin/node ]]; then
- # rm third_party/node/linux/node-linux-x64/bin/node || die
- #else
- # mkdir -p third_party/node/linux/node-linux-x64/bin || die
- #fi
- #ln -s "${EPREFIX}"/usr/bin/node third_party/node/linux/node-linux-x64/bin/node || die
-
- cp "${FILESDIR}/libusb.gn" build/linux/unbundle || die
- sed -i '/^REPLACEMENTS.*$/{s++REPLACEMENTS = {"libusb":"third_party/libusb/BUILD.gn",+;h};${x;/./{x;q0};x;q1}' \
- build/linux/unbundle/replace_gn_files.py || die
- sed -i '/^.*deps.*third_party\/jsoncpp.*$/{s++public_deps \+= [ "//third_party/jsoncpp" ]+;h};${x;/./{x;q0};x;q1}' \
- third_party/webrtc/rtc_base/BUILD.gn || die
-
- if use override-data-dir; then
- sed -i '/"chromium";/{s++"ungoogled-chromium";+;h};${x;/./{x;q0};x;q1}' \
- chrome/common/chrome_paths_linux.cc || die
- fi
-
- if use system-abseil-cpp; then
- eapply_wrapper "${FILESDIR}/chromium-147-system-abseil.patch"
-
- #! SFINAE mangling incompatibility between clang and gcc:
- #! https://github.com/llvm/llvm-project/issues/85656
- #! gcc: _ZN4absl12lts_202601074CordC1INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELi0EEEOT_
- #! clang: _ZN4absl12lts_202601074CordC1INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEETnNSt9enable_ifIXsr3std7is_sameIT_S8_EE5valueEiE4typeELi0EEEOSA_
- #! So, either this:
- eapply_wrapper "${FILESDIR}/chromium-141-system-abseil-cord.patch"
- #! or build with -fclang-abi-compat=17
-
- # cp -f /usr/include/absl/base/options.h third_party/abseil-cpp/absl/base/options.h
- # sed -i '/^#define ABSL_OPTION_USE_STD_ORDERING.*$/{s++#define ABSL_OPTION_USE_STD_ORDERING 1+;h};${x;/./{x;q0};x;q1}' \
- # third_party/abseil-cpp/absl/base/options.h || die
- fi
-
- #* Applying UGC PRs here
- if [ ! -z "${UGC_PR_COMMITS[*]}" ]; then
- pushd "${UGC_WD}" >/dev/null
- for i in "${UGC_PR_COMMITS[@]}"; do
- eapply_wrapper "${DISTDIR}/${PN}-$i.patch"
- done
- popd >/dev/null
- fi
-
- # From here we adapt ungoogled-chromium's patches to our needs
- local ugc_pruning_list="${UGC_WD}/pruning.list"
- local ugc_patch_series="${UGC_WD}/patches/series"
- local ugc_substitution_list="${UGC_WD}/domain_substitution.list"
-
- local ugc_unneeded=(
- # GN bootstrap
- extra/debian/gn/parallel
- # following Gentoo's Chromium
- core/ungoogled-chromium/build-with-wasm-rollup
- )
-
- if use cromite ; then
- einfo "Using fingerprinting patches from Cromite instead"
- ugc_unneeded+=(
- extra/bromite/fingerprinting-flags-client-rects-and-measuretext
- extra/bromite/flag-max-connections-per-host
- extra/bromite/flag-fingerprinting-canvas-image-data-noise
- extra/ungoogled-chromium/add-components-ungoogled
- extra/ungoogled-chromium/remove-pac-size-limit
- )
- fi
-
- # #* Temporary fix
- # sed -i "\!ios/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/icu/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/libjpeg_turbo/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/snappy/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/closure_compiler/!d" "${ugc_pruning_list}" || die
-
- # #* Didn't unpack them at the first place
- # sed -i "\!build/linux/debian_bullseye_i386-sysroot!d" "${ugc_pruning_list}" || die
- # sed -i "\!build/linux/debian_bullseye_amd64-sysroot!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/llvm-build!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/node/linux!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/rust-src!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/rust-toolchain!d" "${ugc_pruning_list}" || die
- # if ! use libcxx ; then
- # sed -i "\!third_party/libc!d" "${ugc_pruning_list}" || die
- # fi
- sed -i "s|debug('files|error('files|" \
- "${UGC_WD}/utils/prune_binaries.py" || die
- sed -i "\!third_party/node/linux!d" \
- "${UGC_WD}/utils/prune_binaries.py" || die
-
- local ugc_p ugc_dir
- for p in "${ugc_unneeded[@]}"; do
- einfo "Removing ${p}.patch"
- sed -i "\!${p}.patch!d" "${ugc_patch_series}" || die
- done
-
- if [ ! -z "${UGC_SKIP_PATCHES}" ]; then
- for p in ${UGC_SKIP_PATCHES}; do
- ewarn "Removing ${p}"
- sed -i "\!${p}!d" "${ugc_patch_series}" || die
- done
- fi
-
- if [ ! -z "${UGC_KEEP_BINARIES}" ]; then
- for p in ${UGC_KEEP_BINARIES}; do
- ewarn "Keeping binary ${p}"
- sed -i "\!${p}!d" "${ugc_pruning_list}" || die
- done
- fi
-
- if [ ! -z "${UGC_SKIP_SUBSTITUTION}" ]; then
- for p in ${UGC_SKIP_SUBSTITUTION}; do
- ewarn "No substitutions in ${p}"
- sed -i "\!${p}!d" "${ugc_substitution_list}" || die
- done
- fi
-
- ebegin "Pruning binaries"
- "${UGC_WD}/utils/prune_binaries.py" -q . "${UGC_WD}/pruning.list"
- eend $? || die
-
- ebegin "Applying ungoogled-chromium patches"
- "${UGC_WD}/utils/patches.py" -q apply . "${UGC_WD}/patches"
- eend $? || die
-
- ebegin "Applying domain substitution"
- "${UGC_WD}/utils/domain_substitution.py" -q apply -r "${UGC_WD}/domain_regex.list" -f "${UGC_WD}/domain_substitution.list" .
- eend $? || die
-
- # Sanity check esbuild version before we start removing files.
- # We _could_ patch the version check out - in theory esbuild upstream are being super conservative after
- # arch(AUR) packaged an `esbuild` binary and set ESBUILD_BINARY_PATH=/usr/bin/esbuild, causing much breakage,
- # but this is fine too and exactly matches what upstream are expecting.
- # https://github.com/evanw/esbuild/issues/2894
- local esbuild_js="${S}/third_party/devtools-frontend/src/node_modules/esbuild/lib/main.js"
- local found
- found=$(awk -F'"' '/if \(binaryVersion !==/ {print $2}' "${esbuild_js}")
- if [[ "${found}" != "${ESBUILD_VER}" ]]; then
- die "esbuild version mismatch: expected ${ESBUILD_VER}, found ${found}"
- fi
-
- elog "Removing bundled binaries from source tree ..."
- # Purge bundled ELF files: These are non-portable and will cause issues if used instead of system versions.
- # Use `--wasm` to also remove WebAssembly binaries, if desired - they're portable so shouldn't break builds.
- ${EPYTHON} "${FILESDIR}/bin-finder.py" --elf "${S}" | awk '{print $1}' | xargs rm -f ||
- die "Failed to remove bundled binaries"
-
- # And now we restore any that we actually need, from the host system
- local esbuild_path="${S}/third_party/devtools-frontend/src/third_party/esbuild"
- local -A restore_list=(
- ["/usr/bin/esbuild-${ESBUILD_VER}"]="${esbuild_path}/esbuild"
- ["/usr/bin/gperf"]="${S}/third_party/gperf/cipd/bin/gperf"
- ["/usr/bin/node"]="${S}/third_party/node/linux/node-linux-x64/bin/node"
- )
-
- for src in "${!restore_list[@]}"; do
- dst="${restore_list[${src}]}"
- if [[ -f "${src}" ]]; then
- einfo "Symlinking ${src} ..."
- # Make sure the parent dir exists; some tarballs don't include (e.g.) node's bindir
- mkdir -p "$(dirname "${dst}")" || die "Failed to create directory for ${dst}"
- ln -s "${src}" "${dst}" || die "Failed to symlink ${dst} from ${src}"
- if [[ ! -L "${dst}" || "$(readlink -f "${dst}")" != "${src}" ]]; then
- die "Symlink verification failed for ${dst} -> ${src}"
- fi
- else
- die "Expected to find ${src} to restore ${dst}, but it does not exist."
- fi
- done
-
- # adjust python interpreter version
- sed -i -e "s|\(^script_executable = \).*|\1\"${EPYTHON}\"|g" .gn || die
-
- # Use the system copy of hwdata's usb.ids; upstream is woefully out of date (2015!)
- sed 's|//third_party/usb_ids/usb.ids|/usr/share/hwdata/usb.ids|g' \
- -i services/device/public/cpp/usb/BUILD.gn || die "Failed to set system usb.ids path"
-
- # remove_bundled_libraries.py walks the source tree and looks for paths containing the substring 'third_party'
- # whitelist matches use the right-most matching path component, so we need to whitelist from that point down.
- local keeplibs=(
- base/third_party/cityhash
- )
- use system-double-conversion || keeplibs+=(
- base/third_party/double_conversion
- )
- keeplibs+=(
- base/third_party/icu
- base/third_party/nspr
- base/third_party/superfasthash
- base/third_party/symbolize
- base/third_party/xdg_user_dirs
- buildtools/third_party/libc++
- buildtools/third_party/libc++abi
- )
- use cromite && keeplibs+=(
- cromite_flags/third_party
- )
- keeplibs+=(
- net/third_party/mozilla_security_manager
- net/third_party/quic
- net/third_party/uri_template
- )
- use system-abseil-cpp || keeplibs+=(
- third_party/abseil-cpp
- )
- keeplibs+=(
- third_party/angle
- third_party/angle/src/common/third_party/xxhash
- third_party/angle/src/third_party/ceval
- )
- use nvidia || keeplibs+=(
- third_party/angle/src/third_party/libXNVCtrl
- )
- keeplibs+=(
- third_party/angle/src/third_party/volk
- third_party/anonymous_tokens
- third_party/apple_apsl
- third_party/axe-core
- third_party/bidimapper
- third_party/blink
- third_party/boringssl
- third_party/boringssl/src/third_party/fiat
- third_party/breakpad
- third_party/breakpad/breakpad/src/third_party/curl
- )
- use system-brotli || keeplibs+=(
- third_party/brotli
- )
- keeplibs+=(
- third_party/catapult
- third_party/catapult/common/py_vulcanize/third_party/rcssmin
- third_party/catapult/common/py_vulcanize/third_party/rjsmin
- third_party/catapult/third_party/beautifulsoup4-4.9.3
- third_party/catapult/third_party/html5lib-1.1
- third_party/catapult/third_party/polymer
- third_party/catapult/third_party/six
- third_party/catapult/third_party/typ
- third_party/catapult/tracing/third_party/d3
- third_party/catapult/tracing/third_party/gl-matrix
- third_party/catapult/tracing/third_party/jpeg-js
- third_party/catapult/tracing/third_party/jszip
- third_party/catapult/tracing/third_party/mannwhitneyu
- third_party/catapult/tracing/third_party/oboe
- third_party/catapult/tracing/third_party/pako
- third_party/ced
- third_party/cld_3
- third_party/closure_compiler
- )
- use libcxx && keeplibs+=(
- third_party/compiler-rt
- )
- keeplibs+=(
- third_party/content_analysis_sdk
- third_party/cpuinfo
- third_party/crabbyavif
- third_party/crashpad
- third_party/crashpad/crashpad/third_party/lss
- third_party/crashpad/crashpad/third_party/zlib
- )
- use system-crc32c || keeplibs+=(
- third_party/crc32c
- )
- keeplibs+=(
- third_party/cros_system_api
- third_party/d3
- third_party/dawn
- third_party/dawn/third_party/gn/webgpu-cts
- third_party/dawn/third_party/OpenGL-Registry
- third_party/dawn/third_party/renderdoc
- third_party/dawn/third_party/webgpu-headers
- third_party/depot_tools
- third_party/devscripts
- third_party/devtools-frontend
- third_party/devtools-frontend/src/front_end/third_party/acorn
- third_party/devtools-frontend/src/front_end/third_party/additional_readme_paths.json
- third_party/devtools-frontend/src/front_end/third_party/axe-core
- third_party/devtools-frontend/src/front_end/third_party/chromium
- third_party/devtools-frontend/src/front_end/third_party/codemirror
- third_party/devtools-frontend/src/front_end/third_party/csp_evaluator
- third_party/devtools-frontend/src/front_end/third_party/diff
- third_party/devtools-frontend/src/front_end/third_party/i18n
- third_party/devtools-frontend/src/front_end/third_party/intl-messageformat
- third_party/devtools-frontend/src/front_end/third_party/json5
- third_party/devtools-frontend/src/front_end/third_party/legacy-javascript
- third_party/devtools-frontend/src/front_end/third_party/lighthouse
- third_party/devtools-frontend/src/front_end/third_party/lit
- third_party/devtools-frontend/src/front_end/third_party/marked
- third_party/devtools-frontend/src/front_end/third_party/puppeteer
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/esm/third_party/mitt
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/esm/third_party/parsel-js
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/esm/third_party/rxjs
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/esm/third_party/urlpattern-polyfill
- third_party/devtools-frontend/src/front_end/third_party/source-map-scopes-codec
- third_party/devtools-frontend/src/front_end/third_party/third-party-web
- third_party/devtools-frontend/src/front_end/third_party/vscode.web-custom-data
- third_party/devtools-frontend/src/front_end/third_party/wasmparser
- third_party/devtools-frontend/src/front_end/third_party/web-vitals
- third_party/devtools-frontend/src/third_party
- third_party/dom_distiller_js
- third_party/dragonbox
- third_party/eigen3
- third_party/emoji-segmenter
- third_party/farmhash
- third_party/fast_float
- third_party/fdlibm
- third_party/federated_compute/chromium/fcp/confidentialcompute
- third_party/federated_compute/src/fcp/base
- third_party/federated_compute/src/fcp/confidentialcompute
- third_party/federated_compute/src/fcp/protos/confidentialcompute
- third_party/federated_compute/src/fcp/protos/federatedcompute
- third_party/fft2d
- third_party/flatbuffers
- third_party/fp16
- third_party/freetype
- third_party/fusejs
- third_party/fxdiv
- third_party/gemmlowp
- third_party/google_input_tools
- third_party/google_input_tools/third_party/closure_library
- third_party/google_input_tools/third_party/closure_library/third_party/closure
- third_party/googletest
- third_party/gperf # We symlink system gperf, but this will purge the symlink since we tidy up afterwards.
- third_party/highway
- third_party/hunspell
- third_party/hyphenation-patterns
- third_party/ink/src/ink/brush
- third_party/ink/src/ink/color
- third_party/ink/src/ink/geometry
- third_party/ink/src/ink/rendering
- third_party/ink/src/ink/rendering/skia/common_internal
- third_party/ink/src/ink/rendering/skia/native
- third_party/ink/src/ink/rendering/skia/native/internal
- third_party/ink/src/ink/strokes
- third_party/ink/src/ink/types
- third_party/inspector_protocol
- third_party/ipcz
- third_party/jinja2
- )
- use system-jsoncpp || keeplibs+=(
- third_party/jsoncpp
- )
- keeplibs+=(
- third_party/khronos
- third_party/lens_server_proto
- third_party/leveldatabase
- third_party/libaddressinput
- )
- use libcxx && keeplibs+=(
- third_party/libc++
- )
- keeplibs+=(
- third_party/libdrm
- third_party/libgav1
- third_party/libjingle
- third_party/libpfm4
- third_party/libphonenumber
- third_party/libpng
- third_party/libsecret
- third_party/libsrtp
- third_party/libsync
- third_party/libtess2/libtess2
- third_party/libtess2/src/Include
- third_party/libtess2/src/Source
- third_party/liburlpattern
- )
- use system-libusb || keeplibs+=(
- third_party/libusb
- )
- keeplibs+=(
- third_party/libva_protected_content
- )
- use system-libvpx || keeplibs+=(
- third_party/libvpx
- third_party/libvpx/source/libvpx/third_party/x86inc
- )
- keeplibs+=(
- third_party/libwebm
- third_party/libx11
- third_party/libxcb-keysyms
- third_party/libxml/chromium
- third_party/libyuv
- third_party/libzip
- third_party/lit
- )
- use libcxx && keeplibs+=(
- third_party/llvm-libc
- third_party/llvm-libc/src/shared/
- )
- keeplibs+=(
- third_party/lottie
- third_party/lss
- third_party/lzma_sdk
- third_party/mako
- third_party/markupsafe
- third_party/material_color_utilities
- third_party/metrics_proto
- third_party/minigbm
- third_party/ml_dtypes
- third_party/modp_b64
- third_party/nasm
- third_party/nearby
- third_party/neon_2_sse
- third_party/node
- third_party/oak/chromium/proto
- third_party/oak/chromium/proto/attestation
- third_party/omnibox_proto
- third_party/one_euro_filter
- third_party/openscreen
- third_party/openscreen/src/third_party/
- third_party/openscreen/src/third_party/tinycbor/src/src
- third_party/ots
- third_party/pdfium
- third_party/pdfium/third_party/agg23
- third_party/pdfium/third_party/bigint
- third_party/pdfium/third_party/freetype
- third_party/pdfium/third_party/lcms
- )
- use system-openjpeg || keeplibs+=(
- third_party/pdfium/third_party/libopenjpeg
- )
- keeplibs+=(
- third_party/pdfium/third_party/libtiff
- third_party/perfetto
- third_party/perfetto/protos/third_party/chromium
- third_party/perfetto/protos/third_party/pprof
- third_party/perfetto/protos/third_party/primes
- third_party/perfetto/protos/third_party/simpleperf
- third_party/pffft
- third_party/ply
- third_party/polymer
- third_party/private_membership
- third_party/private-join-and-compute
- third_party/protobuf
- third_party/protobuf/third_party/utf8_range
- third_party/pthreadpool
- third_party/puffin
- third_party/pyjson5
- third_party/pyyaml
- third_party/rapidhash
- third_party/readability
- third_party/rnnoise
- third_party/rust
- third_party/ruy
- third_party/s2cellid
- third_party/search_engines_data
- third_party/securemessage
- third_party/selenium-atoms
- third_party/sentencepiece
- third_party/sentencepiece/src/third_party/darts_clone
- third_party/shell-encryption
- third_party/simdutf
- third_party/simplejson
- third_party/six
- third_party/skia
- third_party/skia/include/third_party/vulkan
- third_party/smhasher
- )
- use system-snappy || keeplibs+=(
- third_party/snappy
- )
- keeplibs+=(
- third_party/spirv-headers
- third_party/spirv-tools
- third_party/sqlite
- third_party/swiftshader
- third_party/swiftshader/third_party/astc-encoder
- third_party/swiftshader/third_party/llvm-subzero
- third_party/swiftshader/third_party/marl
- third_party/swiftshader/third_party/SPIRV-Headers/include/spirv
- third_party/swiftshader/third_party/SPIRV-Tools
- third_party/swiftshader/third_party/subzero
- third_party/tensorflow_models
- third_party/tensorflow-text
- third_party/tflite
- third_party/tflite/src/third_party/fft2d
- third_party/tflite/src/third_party/xla/third_party/tsl
- third_party/tflite/src/third_party/xla/xla/tsl/framework
- third_party/tflite/src/third_party/xla/xla/tsl/lib/random
- third_party/tflite/src/third_party/xla/xla/tsl/platform
- third_party/tflite/src/third_party/xla/xla/tsl/protobuf
- third_party/tflite/src/third_party/xla/xla/tsl/util
- third_party/ukey2
- third_party/utf
- third_party/vulkan
- third_party/wayland
- third_party/webdriver
- third_party/webgpu-cts
- third_party/webrtc
- third_party/webrtc/common_audio/third_party/ooura
- third_party/webrtc/common_audio/third_party/spl_sqrt_floor
- third_party/webrtc/modules/third_party/fft
- third_party/webrtc/modules/third_party/g711
- third_party/webrtc/modules/third_party/g722
- third_party/widevine
- )
- use system-woff2 || keeplibs+=(
- third_party/woff2
- )
- keeplibs+=(
- third_party/wuffs
- third_party/x11proto
- third_party/xcbproto
- third_party/xnnpack
- third_party/zlib/google
- third_party/zxcvbn-cpp
- url/third_party/mozilla
- v8/third_party/glibc
- v8/third_party/inspector_protocol
- v8/third_party/rapidhash-v8
- v8/third_party/siphash
- v8/third_party/utf8-decoder
- v8/third_party/v8
- v8/third_party/valgrind
-
- # gyp -> gn leftovers
- third_party/speech-dispatcher
- third_party/usb_ids
- )
-
- if use test; then
- keeplibs+=(
- third_party/breakpad/breakpad/src/processor
- third_party/fuzztest
- third_party/google_benchmark/src/include/benchmark
- third_party/google_benchmark/src/src
- third_party/test_fonts
- third_party/test_fonts/fontconfig
- third_party/test_fonts/test_fonts
- )
- fi
-
- # USE=system-*
- if ! use system-harfbuzz; then
- keeplibs+=( third_party/harfbuzz )
- fi
-
- if ! use system-ffmpeg; then
- keeplibs+=( third_party/ffmpeg third_party/opus )
- fi
-
- if ! use system-icu; then
- keeplibs+=( third_party/icu )
- fi
-
- if ! use system-zstd; then
- keeplibs+=( third_party/zstd )
- fi
-
- if ! use system-av1; then
- keeplibs+=(
- third_party/dav1d
- third_party/libaom
- third_party/libaom/source/libaom/third_party/fastfeat
- third_party/libaom/source/libaom/third_party/vector
- third_party/libaom/source/libaom/third_party/x86inc
- )
- fi
-
- if use libcxx; then
- keeplibs+=(
- third_party/libc++
- third_party/llvm-libc
- )
- fi
-
- if ! use system-openh264; then
- keeplibs+=( third_party/openh264 )
- fi
-
- if ! use system-re2; then
- keeplibs+=( third_party/re2 )
- fi
-
- # Arch-specific
- if use arm64 || use ppc64 ; then
- keeplibs+=( third_party/swiftshader/third_party/llvm-10.0 )
- fi
- # we need to generate ppc64 stuff because upstream does not ship it yet
- # it has to be done before unbundling.
- if use ppc64; then
- pushd third_party/libvpx >/dev/null || die
- mkdir -p source/config/linux/ppc64 || die
- # requires git and clang, bug #832803
- # Revert https://chromium.googlesource.com/chromium/src/+/b463d0f40b08b4e896e7f458d89ae58ce2a27165%5E%21/third_party/libvpx/generate_gni.sh
- # and https://chromium.googlesource.com/chromium/src/+/71ebcbce867dd31da5f8b405a28fcb0de0657d91%5E%21/third_party/libvpx/generate_gni.sh
- # since we're not in a git repo
- sed -i -e "s|^update_readme||g; s|clang-format|${EPREFIX}/bin/true|g; /^git -C/d; /git cl/d; /cd \$BASE_DIR\/\$LIBVPX_SRC_DIR/ign format --in-place \$BASE_DIR\/BUILD.gn\ngn format --in-place \$BASE_DIR\/libvpx_srcs.gni" \
- generate_gni.sh || die
- ./generate_gni.sh || die
- popd >/dev/null || die
-
- pushd third_party/ffmpeg >/dev/null || die
- cp libavcodec/ppc/h264dsp.c libavcodec/ppc/h264dsp_ppc.c || die
- cp libavcodec/ppc/h264qpel.c libavcodec/ppc/h264qpel_ppc.c || die
- popd >/dev/null || die
- fi
-
- # Sanity check keeplibs, on major version bumps it is often necessary to update this list
- # and this enables us to hit them all at once.
- # There are some entries that need to be whitelisted (TODO: Why? The file is understandable, the rest seem odd)
- whitelist_libs=(
- net/third_party/quic
- third_party/devtools-frontend/src/front_end/third_party/additional_readme_paths.json
- third_party/libjingle
- third_party/mesa
- third_party/skia/third_party/vulkan
- third_party/vulkan
- )
- local not_found_libs=()
- for lib in "${keeplibs[@]}"; do
- if [[ ! -d "${lib}" ]] && ! has "${lib}" "${whitelist_libs[@]}"; then
- not_found_libs+=( "${lib}" )
- fi
- done
-
- if [[ ${#not_found_libs[@]} -gt 0 ]]; then
- ewarn "The following \`keeplibs\` directories were not found in the source tree:"
- for lib in "${not_found_libs[@]}"; do
- ewarn " ${lib}"
- done
- fi
-
- keeplibs+=( third_party/ungoogled )
-
- # Remove most bundled libraries. Some are still needed.
- einfo "Unbundling third-party libraries ..."
- build/linux/unbundle/remove_bundled_libraries.py "${keeplibs[@]}" --do-remove || die
-
- # Interferes with our bundled clang path; we don't want stripped binaries anyway.
- sed -i -e 's|${clang_base_path}/bin/llvm-strip|/bin/true|g' \
- -e 's|${clang_base_path}/bin/llvm-objcopy|/bin/true|g' \
- build/linux/strip_binary.gni || die
-}
-
-src_configure() {
- # Calling this here supports resumption via FEATURES=keepwork
- python_setup
-
- # Bug 491582.
- export TMPDIR="${WORKDIR}/temp"
- mkdir -p -m 755 "${TMPDIR}" || die
-
- # https://bugs.gentoo.org/654216
- addpredict /dev/dri/ #nowarn
-
- # Use system-provided libraries.
- # TODO: freetype -- remove sources (https://bugs.chromium.org/p/pdfium/issues/detail?id=733).
- # TODO: use_system_hunspell (upstream changes needed).
- # TODO: use_system_protobuf (bug #525560).
- # TODO: use_system_sqlite (http://crbug.com/22208).
-
- # libevent: https://bugs.gentoo.org/593458
- local gn_system_libraries=(
- flac
- fontconfig
- freetype
- libjpeg
- libwebp
- libxml
- libxslt
- zlib
- )
- if use system-abseil-cpp; then
- gn_system_libraries+=(
- absl_algorithm
- absl_base
- absl_cleanup
- absl_container
- absl_crc
- absl_debugging
- absl_flags
- absl_functional
- absl_hash
- absl_log
- absl_log_internal
- absl_memory
- absl_meta
- absl_numeric
- absl_random
- absl_status
- absl_strings
- absl_synchronization
- absl_time
- absl_types
- absl_utility
- )
- fi
- if use system-brotli; then
- gn_system_libraries+=( brotli )
- fi
- if use system-crc32c; then
- gn_system_libraries+=( crc32c )
- fi
- if use system-double-conversion; then
- gn_system_libraries+=( double-conversion )
- fi
- if use system-woff2; then
- gn_system_libraries+=( woff2 )
- fi
- if use nvidia; then
- gn_system_libraries+=( libXNVCtrl )
- fi
- if use system-ffmpeg; then
- gn_system_libraries+=( ffmpeg opus )
- fi
- if use system-jsoncpp; then
- gn_system_libraries+=( jsoncpp )
- fi
- if use system-icu; then
- gn_system_libraries+=( icu )
- fi
- if use system-zstd; then
- gn_system_libraries+=( zstd )
- fi
- if use system-av1; then
- gn_system_libraries+=( dav1d libaom )
- fi
- if use system-libusb; then
- gn_system_libraries+=( libusb )
- fi
- if use system-libvpx; then
- gn_system_libraries+=( libvpx )
- fi
- use system-openh264 && gn_system_libraries+=(
- openh264
- )
- use system-re2 && gn_system_libraries+=(
- re2
- )
- use system-snappy && gn_system_libraries+=(
- snappy
- )
-
- build/linux/unbundle/replace_gn_files.py --system-libraries "${gn_system_libraries[@]}" ||
- die "Failed to replace GN files for system libraries"
-
- # TODO 131: The above call clobbers `enable_freetype = true` in the freetype gni file
- # drop the last line, then append the freetype line and a new curly brace to end the block
- local freetype_gni="build/config/freetype/freetype.gni"
- sed -i -e '$d' ${freetype_gni} || die
- echo " enable_freetype = true" >> ${freetype_gni} || die
- echo "}" >> ${freetype_gni} || die
-
- if use !custom-cflags; then
- replace-flags "-Os" "-O2"
- strip-flags
- # Debug info section overflows without component build
- # Prevent linker from running out of address space, bug #471810 .
- filter-flags "-g*"
- # 949123: Several multimedia components explicitly build with specific CFLAGS and
- # use runtime detection to enable optimisations; unfortunately any of our CFLAGS are suffixed
- # to the end of the command line, which causes build failures.
- use arm64 && filter-flags "-march*" "-mtune*" "-mcpu*"
- fi
-
- # We don't use the same clang version as upstream, and with -Werror
- # we need to make sure that we don't get superfluous warnings.
- append-flags -Wno-unknown-warning-option
- if tc-is-cross-compiler; then # can you cross-compile with the bundled toolchain?
- export BUILD_CXXFLAGS+=" -Wno-unknown-warning-option"
- export BUILD_CFLAGS+=" -Wno-unknown-warning-option"
- fi
-
- # Start building our GN options
- local myconf_gn=() # Tip: strings must be quoted, bools or numbers are fine
-
- if use !bundled-toolchain; then
- # We already forced the "correct" clang via pkg_setup
-
- if tc-is-cross-compiler; then
- CC="${CC} -target ${CHOST} --sysroot ${ESYSROOT}"
- CXX="${CXX} -target ${CHOST} --sysroot ${ESYSROOT}"
- BUILD_AR=${AR}
- BUILD_CC=${CC}
- BUILD_CXX=${CXX}
- BUILD_NM=${NM}
- fi
-
- # Make sure the build system will use the right tools, bug #340795.
- tc-export AR CC CXX NM
-
- strip-unsupported-flags
- append-ldflags -Wl,--undefined-version # https://bugs.gentoo.org/918897#c32
-
- myconf_gn+=(
- "is_clang=true"
- "clang_use_chrome_plugins=false"
- "use_clang_modules=false" # M141 enables this for the linux platform by default.
- "use_lld=true"
- 'custom_toolchain="//build/toolchain/linux/unbundle:default"'
- # From M127 we need to provide a location for libclang and the clang resource dir so that bindgen can find them
- "bindgen_libclang_path=\"$(get_llvm_prefix)/$(get_libdir)\""
- "bindgen_clang_resource_dir=\"${EPREFIX}/usr/lib/clang/${LLVM_SLOT}/include\""
- "bindgen_extra_clang_args=[\"-I${EPREFIX}/usr/lib/clang/${LLVM_SLOT}/include\"]"
- "clang_base_path=\"${EPREFIX}/usr/lib/clang/${LLVM_SLOT}/\""
- "rust_bindgen_root=\"${EPREFIX}/usr/\""
- "rust_sysroot_absolute=\"$(get_rust_prefix)\""
- "rustc_version=\"${RUST_SLOT}\""
- )
-
- if [[ ${LLVM_SLOT} -lt 23 ]]; then
- # Workaround for -fsanitize-ignore-for-ubsan-feature (added in LLVM 23)
- myconf_gn+=( 'clang_has_ubsan_feature_ignore=false' )
- fi
-
- if ! tc-is-cross-compiler; then
- myconf_gn+=( 'host_toolchain="//build/toolchain/linux/unbundle:default"' )
- else
- tc-export BUILD_{AR,CC,CXX,NM}
- myconf_gn+=(
- 'host_toolchain="//build/toolchain/linux/unbundle:host"'
- 'v8_snapshot_toolchain="//build/toolchain/linux/unbundle:host"'
- "host_pkg_config=\"$(tc-getBUILD_PKG_CONFIG)\""
- "pkg_config=\"$(tc-getPKG_CONFIG)\""
- )
-
- # setup cups-config, build system only uses --libs option
- if use cups; then
- mkdir "${T}/cups-config" || die
- cp "${ESYSROOT}/usr/bin/${CHOST}-cups-config" "${T}/cups-config/cups-config" || die
- export PATH="${PATH}:${T}/cups-config"
- fi
-
- # Don't inherit PKG_CONFIG_PATH from environment
- local -x PKG_CONFIG_PATH=
- fi
-
- fi # !bundled-toolchain
-
- local myarch
- myarch="$(tc-arch)"
- case ${myarch} in
- amd64)
- # Bug 530248, 544702, 546984, 853646.
- use !custom-cflags && filter-flags -mno-mmx -mno-sse2 -mno-ssse3 -mno-sse4.1 \
- -mno-avx -mno-avx2 -mno-fma -mno-fma4 -mno-xop -mno-sse4a
- myconf_gn+=( 'target_cpu="x64"' )
- ;;
- x86)
- # Bug 530248, 544702, 546984, 853646.
- use !custom-cflags && filter-flags -mno-mmx -mno-sse2 -mno-ssse3 -mno-sse4.1 \
- -mno-avx -mno-avx2 -mno-fma -mno-fma4 -mno-xop -mno-sse4a
- myconf_gn+=( 'target_cpu="x86"' )
- ;;
- arm64)
- myconf_gn+=( 'target_cpu="arm64"' )
- ;;
- ppc64)
- myconf_gn+=( 'target_cpu="ppc64"' )
- ;;
- *)
- die "Failed to determine target arch, got '${myarch}'."
- ;;
- esac
-
- # Common options
-
- myconf_gn+=(
- # Disable code formating of generated files
- "blink_enable_generated_code_formatting=false"
- # enable DCHECK with USE=debug only, increases chrome binary size by 30%, bug #811138.
- # DCHECK is fatal by default, make it configurable at runtime, #bug 807881.
- "dcheck_always_on=$(usex debug true false)"
- "dcheck_is_configurable=$(usex debug true false)"
- # Chromium builds provided by Linux distros should disable the testing config
- "disable_fieldtrial_testing_config=true"
- # Custom patch: Enable building Chromium as individual channels (e.g. stable, beta, dev) that
- # use different profile directories, desktop entries, etc. This enables slotting the ebuild.
- "enable_channel_branding=true"
- # 131 began laying the groundwork for replacing freetype with
- # "Rust-based Fontations set of libraries plus Skia path rendering"
- # We now need to opt-in
- "enable_freetype=true"
- "enable_hangout_services_extension=$(usex hangouts true false)"
- # Don't need nocompile checks and GN crashes with our config (verify with modern GN)
- "enable_nocompile_tests=false"
- # pseudolocales are only used for testing
- "enable_pseudolocales=false"
- "enable_widevine=$(usex widevine true false)"
- # Disable fatal linker warnings, bug 506268.
- "fatal_linker_warnings=false"
- # Component build isn't generally intended for use by end users. It's mostly useful
- # for development and debugging.
- "is_component_build=false"
- # GN needs explicit config for Debug/Release as opposed to inferring it from build directory.
- "is_debug=false"
- "is_official_build=$(usex official true false)"
- # Enable ozone wayland and/or headless support
- "ozone_auto_platforms=false"
- "ozone_platform_headless=true"
- # Enables building without non-free unRAR licence
- "safe_browsing_use_unrar=false"
- # "thin_lto_enable_optimizations=${use_lto}"
- "treat_warnings_as_errors=false"
- # Use in-tree libc++ (buildtools/third_party/libc++ and buildtools/third_party/libc++abi)
- # instead of the system C++ library for C++ standard library support.
- # default: true, but let's be explicit (forced since 120 ; USE removed 127).
- "use_custom_libcxx=true"
- # Enable ozone wayland and/or headless support
- "use_ozone=true"
- # The sysroot is the oldest debian image that chromium supports, we don't need it
- "use_sysroot=false"
- # See dependency logic in third_party/BUILD.gn
- "use_system_harfbuzz=$(usex system-harfbuzz true false)"
- # "use_thin_lto=${use_lto}"
- # Only enabled for clang, but gcc has endian macros too
- "v8_use_libm_trig_functions=true"
- )
-
- myconf_gn+=( "enable_iterator_debugging=$(usex debug true false)" )
-
- if use debug; then
- myconf_gn+=(
- "symbol_level=2"
- "blink_symbol_level=2"
- "v8_symbol_level=2"
- )
- else
- myconf_gn+=(
- "symbol_level=0"
- "blink_symbol_level=0"
- "v8_symbol_level=0"
- )
- fi
-
- if use bindist ; then
- myconf_gn+=(
- # If this is set to false Chromium won't be able to load any proprietary codecs
- # even if provided with an ffmpeg capable of h264/aac decoding
- "proprietary_codecs=true"
- 'ffmpeg_branding="Chrome"'
- # build ffmpeg as an external component (libffmpeg.so) that we can remove / substitute
- "is_component_ffmpeg=true"
- )
- else
- myconf_gn+=(
- "proprietary_codecs=$(usex proprietary-codecs true false)"
- "ffmpeg_branding=\"$(usex proprietary-codecs Chrome Chromium)\""
- )
- fi
-
- if use headless; then
- myconf_gn+=(
- "enable_print_preview=false"
- "enable_remoting=false"
- 'ozone_platform="headless"'
- "rtc_use_pipewire=false"
- "use_alsa=false"
- "use_cups=false"
- "use_gio=false"
- "use_glib=false"
- "use_gtk=false"
- "use_kerberos=false"
- "use_libpci=false"
- "use_pangocairo=false"
- "use_pulseaudio=false"
- "use_qt5=false"
- "use_qt6=false"
- "use_udev=false"
- "use_vaapi=false"
- "use_xkbcommon=false"
- )
- else
- myconf_gn+=(
- "gtk_version=$(usex gtk4 4 3)"
- # link pulseaudio directly (DT_NEEDED) instead of using dlopen.
- # helps with automated detection of ABI mismatches and prevents silent errors.
- "link_pulseaudio=$(usex pulseaudio true false)"
- "ozone_platform_wayland=$(usex wayland true false)"
- "ozone_platform_x11=$(usex X true false)"
- "ozone_platform=\"$(usex wayland wayland x11)\""
- "rtc_use_pipewire=$(usex screencast true false)"
- "use_cups=$(usex cups true false)"
- "use_kerberos=$(usex kerberos true false)"
- "use_pulseaudio=$(usex pulseaudio true false)"
- "use_qt5=false"
- "use_system_libffi=$(usex wayland true false)"
- "use_system_minigbm=true"
- "use_vaapi=$(usex vaapi true false)"
- "use_xkbcommon=true"
- )
- if use qt6; then
- local cbuild_libdir
- cbuild_libdir="$(get_libdir)"
- if tc-is-cross-compiler; then
- # Hack to workaround get_libdir not being able to handle CBUILD, bug #794181
- cbuild_libdir="$($(tc-getBUILD_PKG_CONFIG) --keep-system-libs --libs-only-L libxslt)"
- cbuild_libdir="${cbuild_libdir:2}"
- cbuild_libdir="${cbuild_libdir/% }"
- fi
- myconf_gn+=(
- "use_qt6=true"
- "moc_qt6_path=\"${EPREFIX}/usr/${cbuild_libdir}/qt6/libexec\""
- )
- else
- myconf_gn+=( "use_qt6=false" )
- fi
- fi
-
- # Explicitly disable ICU data file support for system-icu/headless builds.
- if use system-icu || use headless; then
- myconf_gn+=( "icu_use_data_file=false" )
- fi
-
- if use official; then
- # Allow building against system libraries in official builds
- sed -i 's/OFFICIAL_BUILD/GOOGLE_CHROME_BUILD/' \
- tools/generate_shim_headers/generate_shim_headers.py || die
- # Don't add symbols to build
- myconf_gn+=( "symbol_level=0" )
- fi
-
- if use pgo; then
- myconf_gn+=(
- "chrome_pgo_phase=2"
- "v8_enable_builtins_optimization=true"
- )
- else
- myconf_gn+=( "chrome_pgo_phase=0" )
- fi
-
- # Odds and ends
-
- # skipping typecheck is only supported on amd64, bug #876157
- if ! use amd64; then
- myconf_gn+=( "devtools_skip_typecheck=false" )
- fi
-
- # Disable external code space for V8 for ppc64. It is disabled for ppc64
- # by default, but cross-compiling on amd64 enables it again.
- if tc-is-cross-compiler && use ppc64; then
- myconf_gn+=( "v8_enable_external_code_space=false" )
- fi
-
- # This determines whether or not GN uses the bundled libcxx
- if use libcxx; then
- myconf_gn+=( "use_custom_libcxx=true" )
- else
- myconf_gn+=(
- "use_custom_libcxx=false"
- "use_llvm_libatomic=false"
- )
- append-cppflags -U_GLIBCXX_ASSERTIONS #See #318
- fi
-
- myconf_gn+=( "use_bluez=$(usex bluetooth true false)" )
-
- myconf_gn+=( "is_cfi=$(usex cfi true false)" )
-
- if use cfi; then
- myconf_gn+=(
- "use_cfi_icall=true"
- "use_cfi_cast=true"
- )
- fi
-
- myconf_gn+=(
- "optimize_webui=$(usex optimize-webui true false)"
- "use_system_freetype=$(usex system-harfbuzz true false)"
- "use_system_libopenjpeg2=$(usex system-openjpeg true false)"
- "enable_pdf=true"
- "use_system_lcms2=true"
- "enable_print_preview=true"
- "use_thin_lto=$(usex thinlto true false)"
- "thin_lto_enable_optimizations=$(usex optimize-thinlto true false)"
-
- # Ungoogled flags
- "build_with_tflite_lib=false"
- "enable_mdns=false"
- "enable_mse_mpeg2ts_stream_parser=$(usex proprietary-codecs true false)"
- "enable_remoting=false"
- "enable_reporting=false"
- "enable_service_discovery=false"
- "exclude_unwind_tables=true"
- "google_api_key=\"\""
- "google_default_client_id=\"\""
- "google_default_client_secret=\"\""
- "safe_browsing_mode=0"
- "use_official_google_api_keys=false"
- "use_unofficial_version_number=false"
-
- # "enable_swiftshader=false"
-
- # Additional flags
- # "perfetto_use_system_zlib=true"
- # "use_system_zlib=true"
- # "use_system_libjpeg=true"
- # "rtc_build_examples=false"
- # "enable_chromium_prelude=false"
- # "enable_updater=false"
- # "enable_update_notifications=false"
- # "enable_constraints=false"
- # "rtc_rusty_base64=false"
- # "v8_enable_temporal_support=false"
- # "media_use_symphonia=false"
- # "pdf_enable_rust_png=false"
- # "skia_use_libpng_encode=true"
- # "skia_use_libpng_decode=true"
- # "skia_use_rust_png_decode=false"
- # "skia_use_rust_png_encode=false"
- # "enable_jxl_decoder=false"
- )
-
- if use amd64 || use arm64; then
- myconf_gn+=(
- "v8_drumbrake_bounds_checks=true"
- "v8_enable_drumbrake=true"
- )
- fi
-
- if use thinlto; then
- # We need to change the default value of import-instr-limit in
- # LLVM to limit the text size increase. The default value is
- # 100, and we change it to 30 to reduce the text size increase
- # from 25% to 10%. The performance number of page_cycler is the
- # same on two of the thinLTO configurations, we got 1% slowdown
- # on speedometer when changing import-instr-limit from 100 to 30.
- # append-ldflags "-Wl,-plugin-opt,-import-instr-limit=30"
- sed -i '/import_instr_limit = 5/{s++import_instr_limit = 30+;h};${x;/./{x;q0};x;q1}' \
- build/config/compiler/BUILD.gn || die
-
- append-ldflags "-Wl,--thinlto-jobs=$(makeopts_jobs)"
- fi
-
- # Facilitate deterministic builds (taken from build/config/compiler/BUILD.gn)
- append-cflags -Wno-builtin-macro-redefined
- append-cxxflags -Wno-builtin-macro-redefined
- append-cppflags "-D__DATE__= -D__TIME__= -D__TIMESTAMP__="
-
- local flags
- einfo "Building with the following compiler settings:"
- for flags in C{C,XX} AR NM RANLIB {C,CXX,CPP,LD}FLAGS \
- EXTRA_GN UGC_{SKIP_{PATCHES,SUBSTITUTION},KEEP_BINARIES} ; do
- einfo " ${flags} = \"${!flags}\""
- done
-
- # Since we build from tarballs, we need to set the channel here so that it can be used in the build.
- export CHROME_VERSION_EXTRA="${SLOT}"
-
- einfo "Configuring Chromium ..."
- set -- gn gen --args="${myconf_gn[*]}${EXTRA_GN:+ ${EXTRA_GN}}" out/Release
- echo "$@"
- "$@" || die "Failed to configure Chromium"
-
- # The "if" below should not be executed unless testing
- if [ ! -z "${NODIE}" ]; then
- # List all args
- # gn args --list out/Release
-
- # Quick compiler check
- eninja -C out/Release protoc torque
- fi
-}
-
-src_compile() {
- # Final link uses lots of file descriptors.
- ulimit -n 2048
-
- # Calling this here supports resumption via FEATURES=keepwork
- python_setup
-
- # I hate doing this but upstream Rust have yet to come up with a better solution for
- # us poor packagers. Required for Split LTO units, which are required for CFI.
- export RUSTC_BOOTSTRAP=1
-
- # Don't inherit PYTHONPATH from environment, bug #789021, #812689
- local -x PYTHONPATH=
-
- # Build mksnapshot and pax-mark it.
- if use pax-kernel; then
- local x
- for x in mksnapshot v8_context_snapshot_generator code_cache_generator; do
- if tc-is-cross-compiler; then
- eninja -C out/Release "host/${x}"
- pax-mark m "out/Release/host/${x}"
- else
- eninja -C out/Release "${x}"
- pax-mark m "out/Release/${x}"
- fi
- done
- fi
-
- # Even though ninja autodetects number of CPUs, we respect
- # user's options, for debugging with -j 1 or any other reason.
- eninja -C out/Release chrome chrome_sandbox $(use test && echo "base_unittests")
-
- pax-mark m out/Release/chrome
-
- # This codepath does minimal patching, so we're at the mercy of upstream
- # CFLAGS. This is fine - we're not intending to force this on users
- # and we do a lot of flag 'management' anyway.
- if use bundled-toolchain; then
- QA_FLAGS_IGNORED="
- usr/lib64/chromium-browser/chrome
- usr/lib64/chromium-browser/chrome-sandbox
- usr/lib64/chromium-browser/chromedriver
- usr/lib64/chromium-browser/chrome_crashpad_handler
- usr/lib64/chromium-browser/libEGL.so
- usr/lib64/chromium-browser/libGLESv2.so
- usr/lib64/chromium-browser/libVkICD_mock_icd.so
- usr/lib64/chromium-browser/libVkLayer_khronos_validation.so
- usr/lib64/chromium-browser/libqt6_shim.so
- usr/lib64/chromium-browser/libvk_swiftshader.so
- usr/lib64/chromium-browser/libvulkan.so.1
- "
- fi
-
- use convert-dict && eninja -C out/Release convert_dict
-
- use enable-driver && eninja -C out/Release chromedriver
- #use suid && eninja -C out/Release chrome_sandbox
-
- use enable-driver && mv out/Release/chromedriver{.unstripped,}
-
- rm -f out/Release/locales/*.pak.info || die
-
- # Generate support files (desktop file, manpage, etc.) See: #684550 #706786 #968958
- ${EPYTHON} "${FILESDIR}/generate-support-files.py" \
- --installdir "/usr/$(get_libdir)/ungoogled-chromium-browser" \
- --channel "${SLOT}" ||
- die "Failed to generate support files"
-}
-
-src_test() {
- # Tests may be flaky with usersandbox, and the test runner executes significantly faster without.
- # If you seem to be excluding too many tests for a particular milestone: comment them out, reboot, and
- # run the tests again. If that doesn't help, try FEATURES="-usersandbox" and send it because obviously the
- # chromium gods are not smiling upon you today. Do some runtime testing, obvs.
- local skip_tests=(
- # Wildcard exclusions (if all tests in a test suite are broken)
- 'AlternateTestParams/PartitionAllocDeathTest.RepeatedAllocReturnNullDirect/*'
- 'AlternateTestParams/PartitionAllocDeathTest.RepeatedReallocReturnNullDirect/*'
- 'AlternateTestParams/PartitionAllocTest.*' # 200+ tests, >= 1 crashes entire test runner with usersandbox.
- 'CheckExitCodeAfterSignalHandlerDeathTest.*'
- 'CriticalProcessAndThreadSpotChecks/HangWatcherAnyCriticalThreadTests.*'
- 'LazyThreadPoolTaskRunnerEnvironmentTest.*' # M142
- 'ToolsSanityTest.BadVirtualCall*'
- # requires en-us locale
- SysStrings.SysNativeMBAndWide
- SysStrings.SysNativeMBToWide
- SysStrings.SysWideToNativeMB
- # Specific test cases
- CancelableEventTest.BothCancelFailureAndSucceedOccurUnderContention
- FilePathTest.FromUTF8Unsafe_And_AsUTF8Unsafe
- HistogramTesterTest.PumaTestUniqueSample
- PathServiceTest.CheckedGetFailure
- PlatformThreadTest.CanChangeThreadType
- RawPtrTest.SetLookupUsesGetForComparison # M146 ; also broken for alpine in M144.
- RustLogIntegrationTest.CheckAllSeverity
- StackCanary.ChangingStackCanaryCrashesOnReturn
- StackTraceDeathTest.StackDumpSignalHandlerIsMallocFree
- TestLauncherTools.TruncateSnippetFocusedMatchesFatalMessagesTest
- ThreadPoolEnvironmentConfig.CanUseBackgroundPriorityForWorker
- )
- local test_filter="-$(IFS=:; printf '%s' "${skip_tests[*]}")"
- # test-launcher-bot-mode enables parallelism and plain output
- # Check individual tests with --gtest_filter=<test you want> --single-process-tests
- ./out/Release/base_unittests --test-launcher-bot-mode \
- --test-launcher-jobs="$(get_makeopts_jobs)" \
- --gtest_filter="${test_filter}" || die "Tests failed!"
-}
-
-src_install() {
- local browser_suffix
- if [[ "${SLOT}" != "stable" ]]; then
- browser_suffix="-${SLOT}"
- else
- browser_suffix=""
- fi
- local CHROMIUM_HOME="/usr/$(get_libdir)/ungoogled-chromium-browser${browser_suffix}"
- exeinto "${CHROMIUM_HOME}"
- doexe out/Release/chrome
-
- #newexe out/Release/chrome_sandbox chrome-sandbox
- #fperms 4755 "${CHROMIUM_HOME}/chrome-sandbox"
-
- use enable-driver && doexe out/Release/chromedriver
-
- #* https://github.com/ungoogled-software/ungoogled-chromium/pull/3563
- doexe out/Release/chrome_crashpad_handler
-
- if use convert-dict; then
- newexe "${FILESDIR}/update-dicts.sh" update-dicts.sh
- doexe out/Release/convert_dict
- fi
-
- ozone_auto_session () {
- use X && use wayland && ! use headless && echo true || echo false
- }
-
- cat <<- EOF > "${D}${CHROMIUM_HOME}/chromium-launcher.sh" || die
- #!/bin/bash
- # Wrapper to launch slotted Chromium via the chromium-common launcher script.
- export CHROME_DESKTOP="ungoogled-chromium-browser${browser_suffix}.desktop"
- export CHROME_EXEC_NAME="ungoogled-chromium-browser${browser_suffix}"
- export CHROME_VERSION_EXTRA="${SLOT}"
- export CHROME_WRAPPER="\$(readlink -f "\$0")"
- export OZONE_AUTO_SESSION=$(ozone_auto_session)
-
- exec /usr/libexec/chromium/chromium-launcher.sh "\$@"
- EOF
-
- chmod 755 "${D}${CHROMIUM_HOME}/chromium-launcher.sh" || die
-
- # It is important that we name the target "chromium-browser",
- # xdg-utils expect it; bug #355517.
- dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/ungoogled-chromium-browser${browser_suffix}
- # keep the old symlink around for consistency
- dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/ungoogled-chromium${browser_suffix}
-
- use enable-driver && dosym "${CHROMIUM_HOME}/chromedriver" /usr/bin/ungoogled-chromedriver${browser_suffix}
-
- pushd out/Release/locales > /dev/null || die
- chromium_remove_language_paks
- popd > /dev/null || die
-
- insinto "${CHROMIUM_HOME}"
- doins out/Release/*.bin
- doins out/Release/*.pak
- doins -r out/Release/hyphen-data
-
- if use bindist; then
- # We built libffmpeg as a component library, but we can't distribute it
- # with proprietary codec support. Remove it and make a symlink to the requested
- # system library.
- rm -f out/Release/libffmpeg.so \
- || die "Failed to remove bundled libffmpeg.so (with proprietary codecs)"
- # symlink the libffmpeg.so from either ffmpeg-chromium or ffmpeg[chromium].
- einfo "Creating symlink to libffmpeg.so from $(usex ffmpeg-chromium ffmpeg-chromium ffmpeg[chromium])..."
- dosym ../chromium/libffmpeg.so$(usex ffmpeg-chromium .${PV%%\.*} "") \
- /usr/$(get_libdir)/ungoogled-chromium-browser/libffmpeg.so
- fi
-
- (
- shopt -s nullglob
- local files=(out/Release/*.so out/Release/*.so.[0-9])
- [[ ${#files[@]} -gt 0 ]] && doins "${files[@]}"
- )
-
- if ! use system-icu && ! use headless; then
- doins out/Release/icudtl.dat
- fi
-
- doins -r out/Release/locales
- #doins -r out/Release/MEIPreload
-
- # Install vk_swiftshader_icd.json; bug #827861
- doins out/Release/vk_swiftshader_icd.json
-
- if [[ -d out/Release/swiftshader ]]; then
- insinto "${CHROMIUM_HOME}/swiftshader"
- doins out/Release/swiftshader/*.so
- fi
-
- use widevine && dosym WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so "${CHROMIUM_HOME}/libwidevinecdm.so"
-
- # Install icons
- local branding size
- for size in 16 24 32 48 64 128 256 ; do
- case ${size} in
- 16|32) branding="chrome/app/theme/default_100_percent/chromium" ;;
- *) branding="chrome/app/theme/chromium" ;;
- esac
- newicon -s ${size} "${branding}/product_logo_${size}.png" \
- ungoogled-chromium-browser${browser_suffix}.png
- done
-
- # Install desktop entry
- domenu out/Release/ungoogled-chromium-browser${browser_suffix}.desktop
-
- # Install GNOME default application entry (bug #303100).
- insinto /usr/share/gnome-control-center/default-apps
- doins out/Release/ungoogled-chromium-browser${browser_suffix}.xml
-
- # Install AppStream metadata
- insinto /usr/share/appdata
- doins out/Release/ungoogled-chromium-browser${browser_suffix}.appdata.xml
-
- # Install manpage; bug #684550
- doman out/Release/ungoogled-chromium-browser${browser_suffix}.1
- dosym ungoogled-chromium-browser${browser_suffix}.1 /usr/share/man/man1/ungoogled-chromium${browser_suffix}.1
-
- readme.gentoo_create_doc
-}
-
-pkg_postrm() {
- xdg_icon_cache_update
- xdg_desktop_database_update
-}
-
-pkg_postinst() {
- xdg_icon_cache_update
- xdg_desktop_database_update
- readme.gentoo_print_elog
-
- if use !headless && [[ -z "${REPLACING_VERSIONS}" ]]; then
- if use vaapi; then
- elog "Hardware-accelerated video decoding configuration:"
- elog
- elog "Chromium supports multiple backends for hardware acceleration. To enable one,"
- elog " Add to CHROMIUM_FLAGS in /etc/chromium/default:"
- elog
- elog "1. VA-API with OpenGL (recommended for most users):"
- elog " --enable-features=AcceleratedVideoDecodeLinuxGL"
- elog " VaapiVideoDecoder may need to be added as well, but try without first."
- elog
- if use wayland; then
- elog "2. Enhanced Wayland/EGL performance:"
- elog " --enable-features=AcceleratedVideoDecodeLinuxGL,AcceleratedVideoDecodeLinuxZeroCopyGL"
- elog
- fi
- if use X; then
- elog "$(usex wayland "3" "2"). VA-API with Vulkan:"
- elog " --enable-features=VaapiVideoDecoder,VaapiIgnoreDriverChecks,Vulkan,DefaultANGLEVulkan,VulkanFromANGLE"
- elog
- if use wayland; then
- elog " NOTE: Vulkan acceleration requires X11 and will not work under Wayland sessions."
- elog " Use OpenGL-based acceleration instead when running under Wayland."
- elog
- fi
- fi
- elog "Additional options:"
- elog " To enable hardware-accelerated encoding (if supported)"
- elog " add 'AcceleratedVideoEncoder' to your feature list"
- elog " VaapiIgnoreDriverChecks bypasses driver compatibility checks"
- elog " (may be needed for newer/unsupported hardware)"
- elog
- else
- elog "This Chromium build was compiled without VA-API support, which provides"
- elog "hardware-accelerated video decoding."
- fi
- if use screencast; then
- elog "Screencast is disabled by default at runtime. Either enable it"
- elog "by navigating to chrome://flags/#enable-webrtc-pipewire-capturer"
- elog "inside Chromium or add --enable-features=WebRTCPipeWireCapturer"
- elog "to CHROMIUM_FLAGS in /etc/chromium/default."
- elog
- elog "Additional setup may be required for screencasting to work."
- elog "See issue: https://github.com/PF4Public/gentoo-overlay/issues/314"
- fi
- if use gtk4; then
- elog "Chromium prefers GTK3 over GTK4 at runtime. To override this"
- elog "behaviour you need to pass --gtk-version=4, e.g. by adding it"
- elog "to CHROMIUM_FLAGS in /etc/chromium/default."
- fi
- if use widevine; then
- elog "widevine requires binary plugins, which are distributed separately"
- elog "Make sure you have www-plugins/chrome-binary-plugins installed"
- fi
- fi
-
- if systemd_is_booted && ! [[ -f "/etc/machine-id" ]]; then
- ewarn "The lack of an '/etc/machine-id' file on this system booted with systemd"
- ewarn "indicates that the Gentoo handbook was not followed to completion."
- ewarn ""
- ewarn "Chromium is known to behave unpredictably with this system configuration;"
- ewarn "please complete the configuration of this system before logging any bugs."
- fi
-
- # Stable slot doesn't change profile directory, and it's vanishingly unlikely that users will downgrade from dev.
- if [[ -n "${REPLACING_VERSIONS}" ]]; then
- local replacing_non_slotted=false
- # there could be more than one PVR
- for version in ${REPLACING_VERSIONS}; do
- if ver_test "${version}" -le "145.0.7632.116"; then
- replacing_non_slotted=true
- break
- fi
- done
- if ${replacing_non_slotted}; then
- ewarn "This version of Chromium has replaced a non-slotted ebuild."
- if [[ ${SLOT} != "stable" ]]; then
- ewarn "This channel has its own profile directory, so your existing profile will not be used."
- ewarn "To use your existing profile, either copy or move it to the new location."
- ewarn "See https://wiki.gentoo.org/wiki/Chromium#Profile_Directories for more information."
- ewarn ""
- fi
- ewarn "Any existing Progressive Web Apps (PWAs) will need to be reinstalled,"
- ewarn "or have the path in the desktop files updated to point to the new wrapper script."
- fi
- fi
-}
-
-eapply_wrapper () {
- if [ ! -z "${NODIE}" ]; then
- nonfatal eapply "$@"
- else
- eapply "$@"
- fi
-}
-
-git_wrapper () {
- if [ ! -z "${NODIE}" ]; then
- git "$@"
- else
- git "$@" || die
- fi
-}
-
-filter_wrapper () {
- einfo "Applying ${i##*/}"
- #? fuzz factor of 3 is OK?
- if [ ! -z "${NODIE}" ]; then
- filterdiff -p1 "${@:2}" < "$1" | patch -F 3 -p1
- else
- filterdiff -p1 "${@:2}" < "$1" | patch -F 3 -p1 || die
- fi
-}
diff --git a/www-client/ungoogled-chromium/ungoogled-chromium-150.0.7871.114_p1.ebuild b/www-client/ungoogled-chromium/ungoogled-chromium-150.0.7871.114_p1.ebuild
deleted file mode 100644
index 73ffdb5ec6bc..000000000000
--- a/www-client/ungoogled-chromium/ungoogled-chromium-150.0.7871.114_p1.ebuild
+++ /dev/null
@@ -1,2528 +0,0 @@
-# Copyright 2009-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-# Use following environment variables to customise the build
-# EXTRA_GN — pass extra options to gn
-# NINJAOPTS="-k0 -j8" useful to populate ccache even if ebuild is still failing
-# UGC_SKIP_PATCHES — space-separated list of patches to skip
-# UGC_KEEP_BINARIES — space-separated list of binaries to keep
-# UGC_SKIP_SUBSTITUTION — space-separated list of files to skip domain substitution
-
-# USE=bundled-toolchain is intended for users who want to use the same toolchain
-# as the upstream releases. It's also a good fallback in case we fall behind
-# and need to get a release out quickly (less likely with `dev` in-tree).
-# We can't rely on it as a default since the toolchain is only shipped for x86-64;
-# other architectures will need to use system toolchain.
-
-# Since m133 we are using CI-generated tarballs from
-# https://github.com/chromium-linux-tarballs/chromium-tarballs/
-
-# These are bit-for-bit identical to the official releases, but are built
-# using an external CI system that we have some control over, in case
-# issues pop up again with official tarball generation.
-
-GN_MIN_VER=0.2374
-# chromium-tools/get-chromium-toolchain-strings.py (or just use Chromicler)
-# Node for M145+ should be 24.12.0 but that's not packaged in Gentoo yet. See #969145
-TEST_FONT="9c07d19d9c5ee1ff94f717e6fb17e0c8c354e6f9"
-BUNDLED_CLANG_VER="llvmorg-23-init-10931-g20b6ec66-11"
-BUNDLED_RUST_VER="4c4205163abcbd08948b3efab796c543ba1ea687-5"
-RUST_SHORT_HASH=${BUNDLED_RUST_VER:0:10}-${BUNDLED_RUST_VER##*-}
-NODE_VER="24.16.0-r1"
-ESBUILD_VER="0.25.1"
-ROLLUP_VER="4.57.1" # currently manual.
-
-CHROMIUM_LANGS="af am ar as az be bg bn bs ca cs cy da de el en-GB es es-419 et eu fa fi fil
- fr fr-CA gl gu he hi hr hu hy id is it ja ka kk km kn ko ky lo lt lv mk ml mn mr ms my
- nb ne nl or pa pl pt-BR pt-PT ro ru si sk sl sq sr sr-Latn sv sw ta te th tr uk ur uz
- vi zh-CN zh-HK zh-TW zu"
-
-#UGC_COMMIT_ID="2d89b04e1b68385c9086efab0df1e3679b35246e"
-# UGC_PR_COMMITS=(
-# c917e096342e5b90eeea91ab1f8516447c8756cf
-# 5794e9d12bf82620d5f24505798fecb45ca5a22d
-# )
-
-CROMITE_COMMIT_ID="cb3baf14f52eb4365d017f640f85310735c19b79"
-
-declare -A CHROMIUM_COMMITS=(
-# ["fcfb1a42813f1e9d8babedc7bb2e0f06101a3151"]="." #148+
- ["-cf94ed446320d35c8613ed9b3ffb6e6a61bfcb5f"]="."
-# # ["-37c28a19804e47a68eabf3cf882a310689fc325b"]="." #disable style check for cromite
-# # ["cd5a0df905a28faa89ff2a4ab44f893f84dc4487"]="net/third_party/quiche/src"
-)
-
-LLVM_COMPAT=( 21 22 23 )
-PYTHON_COMPAT=( python3_{13..14} )
-PYTHON_REQ_USE="xml(+)"
-RUST_MIN_VER=1.91.0
-RUST_NEEDS_LLVM="yes please"
-RUST_OPTIONAL="yes" # Not actually optional, but we don't need system Rust (or LLVM) with USE=bundled-toolchain
-RUST_REQ_USE="rustfmt" # Upstream run rustfmt on bindgen output, so we need it to be available.
-
-inherit check-reqs chromium-2 desktop flag-o-matic llvm-r1 multiprocessing ninja-utils pax-utils
-inherit python-any-r1 readme.gentoo-r1 rust systemd toolchain-funcs xdg-utils
-
-DESCRIPTION="Modifications to Chromium for removing Google integration and enhancing privacy"
-HOMEPAGE="https://github.com/ungoogled-software/ungoogled-chromium"
-PPC64_HASH="a85b64f07b489b8c6fdb13ecf79c16c56c560fc6"
-PATCH_V="${PV%%\.*}-1"
-COPIUM_COMMIT="b00f26bb5e0781020da5f830981472a142c6baf1"
-SRC_URI="https://github.com/chromium-linux-tarballs/chromium-tarballs/releases/download/${PV/_*}/chromium-${PV/_*}-linux.tar.xz
- https://deps.gentoo.zip/www-client/chromium/rollup-wasm-node-${ROLLUP_VER}.tgz
- https://gitlab.com/Matt.Jolly/chromium-patches/-/archive/${PATCH_V}/chromium-patches-${PATCH_V}.tar.bz2
- !bundled-toolchain? (
- https://codeberg.org/selfisekai/copium/archive/${COPIUM_COMMIT}.tar.gz
- -> chromium-patches-copium-${COPIUM_COMMIT:0:10}.tar.gz
- )
- bundled-toolchain? (
- https://commondatastorage.googleapis.com/chromium-browser-clang/Linux_x64/clang-${BUNDLED_CLANG_VER}.tar.xz
- -> chromium-clang-${BUNDLED_CLANG_VER}.tar.xz
- https://commondatastorage.googleapis.com/chromium-browser-clang/Linux_x64/rust-toolchain-${BUNDLED_RUST_VER}-${BUNDLED_CLANG_VER%-*}.tar.xz
- -> chromium-rust-toolchain-${RUST_SHORT_HASH}-${BUNDLED_CLANG_VER%-*}.tar.xz
- )
- test? (
- https://chromium-fonts.storage.googleapis.com/${TEST_FONT} -> chromium-testfonts-${TEST_FONT:0:10}.tar.gz
- )
- ppc64? (
- https://gitlab.raptorengineering.com/raptor-engineering-public/chromium/openpower-patches/-/archive/${PPC64_HASH}/openpower-patches-${PPC64_HASH}.tar.bz2 -> chromium-openpower-${PPC64_HASH:0:10}.tar.bz2
- )
-"
-
-# Gentoo tarball:
-# https://chromium-tarballs.distfiles.gentoo.org/chromium-${PV/_*}.tar.xz -> chromium-${PV/_*}-gentoo.tar.xz
-
-# chromium-linux-tarballs
-# https://github.com/chromium-linux-tarballs/chromium-tarballs/releases/download/${PV/_*}/chromium-${PV/_*}-linux.tar.xz
-
-# Official tarball:
-# https://commondatastorage.googleapis.com/chromium-browser-official/chromium-${PV/_*}${LITE_TARBALL:+-lite}.tar.xz
-
-# https://gitweb.gentoo.org/proj/chromium-tools.git/tree/get-chromium-licences.py @ 145.0.7632.76
-LICENSE="Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD BSD-2 Base64 Boost-1.0 CC-BY-3.0 CC-BY-4.0 Clear-BSD FFT2D FTL"
-LICENSE+=" IJG ISC LGPL-2 LGPL-2.1 MIT MPL-1.1 MPL-2.0 Ms-PL PSF-2 SGI-B-2.0 SSLeay SunSoft Unicode-3.0"
-LICENSE+=" Unicode-DFS-2015 Unlicense UoI-NCSA ZLIB libtiff openssl"
-LICENSE+=" cromite? ( GPL-3 )"
-
-SLOT="stable"
-KEYWORDS="amd64 ~arm64 ~ppc64 ~x86"
-
-IUSE_SYSTEM_LIBS="abseil-cpp av1 brotli crc32c double-conversion ffmpeg +harfbuzz icu jsoncpp +libusb libvpx +openh264 openjpeg re2 snappy woff2 +zstd"
-IUSE="+X bindist bluetooth bundled-toolchain cfi convert-dict cups custom-cflags debug ffmpeg-chromium enable-driver gtk4 hangouts headless kerberos +libcxx nvidia +official optimize-thinlto optimize-webui override-data-dir pax-kernel pgo"
-IUSE+=" +proprietary-codecs pulseaudio qt6 screencast selinux test thinlto cromite vaapi wayland widevine cpu_flags_ppc_vsx3"
-RESTRICT="
- !bindist? ( bindist )
- !test? ( test )
- arm64? ( test )
- !system-ffmpeg? ( proprietary-codecs? ( bindist ) )
- !system-openh264? ( bindist )
- cromite? ( bindist )"
-
-REQUIRED_USE="
- !headless? ( || ( X wayland ) )
- screencast? ( wayland )
- ffmpeg-chromium? ( bindist proprietary-codecs )
- optimize-thinlto? ( thinlto )
- cfi? ( thinlto )
- x86? ( !thinlto !widevine )
- debug? ( !official )
- vaapi? ( !system-av1 !system-libvpx )
-"
-
-UGC_PV="${PV/_p/-}"
-UGC_PF="${PN}-${UGC_PV}"
-UGC_URL="https://github.com/ungoogled-software/${PN}/archive/"
-
-if [ -z "$UGC_COMMIT_ID" ]; then
- UGC_URL="${UGC_URL}${UGC_PV}.tar.gz -> ${UGC_PF}.tar.gz"
- UGC_WD="${WORKDIR}/${UGC_PF}"
-else
- UGC_URL="${UGC_URL}${UGC_COMMIT_ID}.tar.gz -> ${PN}-${UGC_COMMIT_ID}.tar.gz"
- UGC_WD="${WORKDIR}/ungoogled-chromium-${UGC_COMMIT_ID}"
-fi
-
-SRC_URI+="${UGC_URL}
-"
-
-if [ ! -z "${UGC_PR_COMMITS[*]}" ]; then
- for i in "${UGC_PR_COMMITS[@]}"; do
- SRC_URI+="https://github.com/ungoogled-software/${PN}/commit/$i.patch?full_index=true -> ${PN}-$i.patch
- "
- done
-fi
-
-if [ ! -z "${CHROMIUM_COMMITS[*]}" ]; then
- # for i in "${CHROMIUM_COMMITS[@]}"; do
- for i in "${!CHROMIUM_COMMITS[@]}"; do
- if [[ ${CHROMIUM_COMMITS[$i]} =~ webrtc ]]; then
- #TODO: is it safe to use this mirror?
- SRC_URI+="https://github.com/webrtc-mirror/webrtc/commit/${i/-}.patch?full_index=true -> webrtc-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ angle ]]; then
- SRC_URI+="https://github.com/google/angle/commit/${i/-}.patch?full_index=true -> angle-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ quiche ]]; then
- SRC_URI+="https://github.com/google/quiche/commit/${i/-}.patch?full_index=true -> quiche-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ dawn ]]; then
- SRC_URI+="https://github.com/google/dawn/commit/${i/-}.patch?full_index=true -> dawn-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ perfetto ]]; then
- SRC_URI+="https://github.com/google/perfetto/commit/${i/-}.patch?full_index=true -> perfetto-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ink ]]; then
- SRC_URI+="https://github.com/google/ink/commit/${i/-}.patch?full_index=true -> ink-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ vulkan-utility-libraries ]]; then
- SRC_URI+="https://github.com/KhronosGroup/Vulkan-Utility-Libraries/commit/${i/-}.patch?full_index=true -> vulkan-utility-libraries-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ruy ]]; then
- SRC_URI+="https://github.com/google/ruy/commit/${i/-}.patch?full_index=true -> ruy-${i/-}.patch
- "
- else
- SRC_URI+="https://github.com/chromium/chromium/commit/${i/-}.patch?full_index=true -> chromium-${i/-}.patch
- "
- fi
- done
-fi
-
-SRC_URI+="cromite? ( https://github.com/uazo/cromite/archive/${CROMITE_COMMIT_ID}.tar.gz -> cromite-${CROMITE_COMMIT_ID}.tar.gz )
-"
-
-for i in ${IUSE_SYSTEM_LIBS}; do
- [[ $i =~ ^(\+)?(.*)$ ]]
- IUSE+=" ${BASH_REMATCH[1]}system-${BASH_REMATCH[2]}"
-done
-
-COMMON_X_DEPEND="
- x11-libs/libXcomposite:=
- x11-libs/libXcursor:=
- x11-libs/libXdamage:=
- x11-libs/libXfixes:=
- >=x11-libs/libXi-1.6.0:=
- x11-libs/libXrandr:=
- x11-libs/libXrender:=
- x11-libs/libXtst:=
- x11-libs/libxshmfence:=
-"
-
-# sys-libs/zlib: https://bugs.gentoo.org/930365; -ng is not compatible.
-# We _could_ use the bundled minizip, but that's against policy.
-COMMON_SNAPSHOT_DEPEND="
- system-icu? ( >=dev-libs/icu-78:= )
- system-abseil-cpp? ( >=dev-cpp/abseil-cpp-20260107.0 )
- system-brotli? ( >=app-arch/brotli-9999 )
- system-crc32c? ( dev-libs/crc32c )
- system-double-conversion? ( dev-libs/double-conversion )
- system-woff2? ( media-libs/woff2 )
- system-snappy? ( app-arch/snappy )
- system-jsoncpp? ( dev-libs/jsoncpp )
- system-openjpeg? ( media-libs/openjpeg:2= )
- system-re2? ( >=dev-libs/re2-0.2019.08.01:= )
- system-libvpx? ( >=media-libs/libvpx-1.13.0:=[postproc] )
- system-libusb? ( virtual/libusb:1 )
- cromite? ( dev-util/patchutils )
- >=dev-libs/libxml2-2.12.4:=[icu]
- dev-libs/nspr:=
- >=dev-libs/nss-3.26:=
- dev-libs/libxslt:=
- media-libs/fontconfig:=
- >=media-libs/freetype-2.11.0-r1:=
- system-harfbuzz? ( >=media-libs/harfbuzz-3:0=[icu(-)] )
- media-libs/libjpeg-turbo:=
- media-libs/libpng:=
- system-zstd? ( >=app-arch/zstd-1.5.5:= )
- >=media-libs/libwebp-0.4.0:=
- media-libs/mesa:=[gbm(+)]
- >=media-libs/openh264-2.6.0:=
- system-av1? (
- >=media-libs/dav1d-1.0.0:=
- >=media-libs/libaom-3.7.0:=
- )
- sys-libs/zlib:=
- !headless? (
- dev-libs/glib:2
- >=media-libs/alsa-lib-1.0.19:=
- media-video/pipewire:=
- pulseaudio? (
- || (
- media-libs/libpulse
- >=media-sound/apulse-0.1.9
- )
- )
- sys-apps/pciutils:=
- kerberos? ( virtual/krb5 )
- vaapi? ( >=media-libs/libva-2.7:=[X?,wayland?] )
- X? (
- x11-base/xorg-proto:=
- x11-libs/libX11:=
- x11-libs/libxcb:=
- x11-libs/libXext:=
- )
- x11-libs/libxkbcommon:=
- wayland? (
- screencast? ( media-video/pipewire:= )
- dev-libs/libffi:=
- dev-libs/wayland:=
- screencast? (
- media-video/pipewire:=
- || (
- sys-apps/xdg-desktop-portal-gnome
- sys-apps/xdg-desktop-portal-gtk
- kde-plasma/xdg-desktop-portal-kde
- gui-libs/xdg-desktop-portal-lxqt
- gui-libs/xdg-desktop-portal-wlr
- )
- )
- )
- )
-"
-
-COMMON_DEPEND="
- ${COMMON_SNAPSHOT_DEPEND}
- app-arch/bzip2:=
- dev-libs/expat:=
- system-ffmpeg? (
- >=media-video/ffmpeg-6.1:=
- >=media-libs/opus-1.3.1:=
- )
- net-misc/curl[ssl]
- sys-apps/dbus:=
- media-libs/flac:=
- sys-libs/zlib:=[minizip]
- !headless? (
- >=app-accessibility/at-spi2-core-2.46.0:2
- media-libs/mesa:=[X?,wayland?]
- virtual/udev
- x11-libs/cairo:=
- x11-libs/gdk-pixbuf:2
- x11-libs/pango:=
- cups? ( >=net-print/cups-1.3.11:= )
- qt6? ( dev-qt/qtbase:6[gui,widgets] )
- X? ( ${COMMON_X_DEPEND} )
- )
-"
-RDEPEND="${COMMON_DEPEND}
- !www-client/ungoogled-chromium:0
- >=www-client/chromium-common-2
- !headless? (
- || (
- x11-libs/gtk+:3[X?,wayland?]
- gui-libs/gtk:4[X?,wayland?]
- )
- qt6? ( dev-qt/qtbase:6[X?,wayland?] )
- )
- virtual/ttf-fonts
- selinux? ( sec-policy/selinux-chromium )
- bindist? (
- ffmpeg-chromium? ( media-video/ffmpeg-chromium:${PV%%\.*} )
- )
- !override-data-dir? (
- !www-client/chromium:${SLOT}
- !www-client/cromite:${SLOT}[-override-data-dir]
- )
-"
-# For M149+ pipewire is a mandatory build-time dependency, but it's optional at runtime for most configurations.
-DEPEND="${COMMON_DEPEND}
- !headless? (
- media-video/pipewire
- gtk4? ( gui-libs/gtk:4[X?,wayland?] )
- !gtk4? ( x11-libs/gtk+:3[X?,wayland?] )
- )
-"
-
- # pgo? ( >=llvm-core/clang-22.0.0_pre20260106 >=llvm-core/lld-22.0.0_pre20260106 )
-BDEPEND="
- ${COMMON_SNAPSHOT_DEPEND}
- ${PYTHON_DEPS}
- $(python_gen_any_dep '
- dev-python/setuptools[${PYTHON_USEDEP}]
- ')
- >=app-arch/gzip-1.7
- !headless? (
- qt6? ( dev-qt/qtbase:6 )
- )
- !bundled-toolchain? ( $(llvm_gen_dep '
- llvm-core/clang:${LLVM_SLOT}
- llvm-core/llvm:${LLVM_SLOT}
- cfi? ( llvm-runtimes/clang-runtime:${LLVM_SLOT}[sanitize] )
- official? (
- !ppc64? ( llvm-runtimes/compiler-rt-sanitizers:${LLVM_SLOT}[cfi] )
- ) ')
- || (
- $(llvm_gen_dep 'llvm-core/lld:${LLVM_SLOT}')
- >=sys-devel/mold-2.41.0
- )
- ${RUST_DEPEND}
- )
- >=dev-util/bindgen-0.72.1
- >=dev-build/gn-${GN_MIN_VER}
- app-alternatives/ninja
- dev-lang/perl
- >=dev-util/gperf-3.2
- dev-util/esbuild:${ESBUILD_VER}
- dev-vcs/git
- >=net-libs/nodejs-${NODE_VER}[inspector]
- sys-apps/hwdata
- >=sys-devel/bison-2.4.3
- sys-devel/flex
- virtual/pkgconfig
- x11-misc/xdg-utils
-"
-
-if ! has chromium_pkg_die ${EBUILD_DEATH_HOOKS}; then
- EBUILD_DEATH_HOOKS+=" chromium_pkg_die";
-fi
-
-DISABLE_AUTOFORMATTING="yes"
-DOC_CONTENTS="
-Some web pages may require additional fonts to display properly.
-Try installing some of the following packages if some characters
-are not displayed properly:
-- media-fonts/arphicfonts
-- media-fonts/droid
-- media-fonts/ipamonafont
-- media-fonts/noto
-- media-fonts/ja-ipafonts
-- media-fonts/takao-fonts
-- media-fonts/wqy-microhei
-- media-fonts/wqy-zenhei
-
-To fix broken icons on the Downloads page, you should install an icon
-theme that covers the appropriate MIME types, and configure this as your
-GTK+ icon theme.
-
-For native file dialogs in KDE, install kde-apps/kdialog.
-
-To make password storage work with your desktop environment you may
-have install one of the supported credentials management applications:
-- app-crypt/libsecret (GNOME)
-- kde-frameworks/kwallet (KDE)
-If you have one of above packages installed, but don't want to use
-them in Chromium, then add --password-store=basic to CHROMIUM_FLAGS
-in /etc/chromium/default.
-"
-
-S="${WORKDIR}/chromium-${PV/_*}"
-
-python_check_deps() {
- python_has_version "dev-python/setuptools[${PYTHON_USEDEP}]"
-}
-
-pre_build_checks() {
- # Check build requirements: bugs #471810, #541816, #914220
- # We're going to start doing maths here on the size of an unpacked source tarball,
- # this should make updates easier as chromium continues to balloon in size.
- # xz -l /var/cache/distfiles/chromium-${PV}*.tar.xz
- local base_disk=9 # Round up
- use test && base_disk=$((base_disk + 5))
- local extra_disk=1 # Always include a little extra space
- local memory=4
- tc-is-cross-compiler && extra_disk=$((extra_disk * 2))
- if tc-is-lto || use pgo; then
- memory=$((memory * 2 + 1))
- tc-is-cross-compiler && extra_disk=$((extra_disk * 2)) # Double the requirements
- use pgo && extra_disk=$((extra_disk + 4))
- fi
- if is-flagq '-g?(gdb)?([1-9])'; then
- if use custom-cflags; then
- extra_disk=$((extra_disk + 5))
- fi
- memory=$((memory * 2))
- fi
- local CHECKREQS_MEMORY="${memory}G"
- local CHECKREQS_DISK_BUILD="$((base_disk + extra_disk))G"
- check-reqs_${EBUILD_PHASE_FUNC}
-}
-
-pkg_pretend() {
- if [[ ${MERGE_TYPE} != binary ]]; then
- # The pre_build_checks are all about compilation resources, no need to run it for a binpkg
- pre_build_checks
- fi
-
- if use headless; then
- local headless_unused_flags=("cups" "kerberos" "pulseaudio" "qt6" "vaapi" "wayland")
- for myiuse in ${headless_unused_flags[@]}; do
- use ${myiuse} && ewarn "Ignoring USE=${myiuse}, USE=headless is set."
- done
- fi
-
- if ! use bindist && use ffmpeg-chromium; then
- ewarn "Ignoring USE=ffmpeg-chromium, USE=bindist is not set."
- fi
- if use libcxx; then
- ewarn
- ewarn "Building with libcxx, please be aware that system-*"
- ewarn "and some other c++ dependencies need to be compiled"
- ewarn "with the same c++ library as ungoogled-chromium itself"
- ewarn "dev-libs/jsoncpp is most problematic, see #58 #49 #119 for details"
- ewarn "Simplest solution would be to disable corresponding system-* flags"
- ewarn
- fi
- if use cfi; then
- ewarn
- ewarn "Building with cfi is only possible if building with -stdlib=libc++"
- ewarn "Make sure all dependencies are also built this way, see #40"
- ewarn
- fi
- if use cromite; then
- ewarn
- ewarn "Cromite patches are very experimental and unstable"
- ewarn "Please consider testing them and giving feedback upstream:"
- ewarn "https://github.com/uazo/cromite/issues"
- ewarn "Not all patches are applied, let me know if others should be considered too"
- ewarn
- fi
-}
-
-pkg_setup() {
- if [[ ${MERGE_TYPE} != binary ]]; then
- # The pre_build_checks are all about compilation resources, no need to run it for a binpkg
- pre_build_checks
-
- # We haven't massaged any CFLAGS yet, so we want to do this before we force CC/CXX to prevent warnings.
- local want_lto="false"
- tc-is-lto && want_lto="true"
-
- # The linux:unbundle toolchain in GN grabs CC, CXX, CPP (etc) from the environment
- # We'll set these to clang here then use llvm-utils functions to very explicitly set these
- # to a sane value.
- # This is effectively the 'force-clang' path if GCC support is re-added.
- if use !bundled-toolchain; then
- llvm-r1_pkg_setup
- rust_pkg_setup
-
- # Forcing clang; respect llvm_slot_x to enable selection of impl via LLVM_COMPAT
- AR=llvm-ar
- CPP="${CHOST}-clang++-${LLVM_SLOT} -E"
- NM=llvm-nm
- CC="${CHOST}-clang-${LLVM_SLOT}"
- CXX="${CHOST}-clang++-${LLVM_SLOT}"
- fi
-
- # LTO in Chromium means LLVM ThinLTO, if GCC support is re-added
- # We'll need to handle that here too.
- use_lto="false"
- local lto_usable="true"
- if [[ "$want_lto" == "true" ]]; then
- if use arm64 && [[ "${LLVM_SLOT}" -lt 22 ]]; then
- einfo "LTO is broken with LLVM 21 on arm64, ignoring CFLAGS."
- lto_usable="false"
- else
- use_lto="true"
- fi
- # We can rely on GN to do this for us; without this builds
- # take significantly longer with LTO enabled.
- filter-lto
- fi
-
- if [[ "$use_lto" == "false" ]] && use official && [[ "$lto_usable" == "true" ]]; then
- einfo "USE=official selected and LTO not detected."
- einfo "It is _highly_ recommended that LTO be enabled for performance reasons"
- einfo "and to be consistent with the upstream \"official\" build optimisations."
- fi
-
- if [[ "$use_lto" == "false" ]] && use test; then
- die "Tests require CFI which requires LTO"
- fi
-
- export use_lto
-
- if tc-is-cross-compiler; then
- use pgo && die "The pgo USE flag cannot be used when cross-compiling"
- CPP="${CBUILD}-clang++-${LLVM_SLOT} -E"
- fi
-
- # Sanity checks for development convenience
- if ver_test $(gn --version || die) -lt ${GN_MIN_VER}; then
- die "dev-build/gn >= ${GN_MIN_VER} is required to build this Chromium"
- fi
-
- # Sometimes, when adding a new LLVM slot, devs (me) forget to install an appropriate lld.
- if tc-ld-is-lld; then
- local lld_ver=$(ld.lld --version | awk '{split($2,a,"."); print a[1]}' || die "Failed to check lld version")
- if [[ ${lld_ver} -lt ${LLVM_SLOT} ]]; then
- die "Your lld version (${lld_ver}) is too old for the selected LLVM slot (${LLVM_SLOT}). Please install a newer lld or select an older LLVM slot."
- fi
- fi
- fi
-
- chromium_suid_sandbox_check_kernel_config
-}
-
-src_unpack() {
- # # Here be dragons!
- # local XCLD="--exclude=chromium-${PV/_*}/third_party/instrumented_libs \
- # --exclude=chromium-${PV/_*}/third_party/llvm \
- # --exclude=chromium-${PV/_*}/third_party/llvm-build \
- # --exclude=chromium-${PV/_*}/third_party/node/linux \
- # --exclude=chromium-${PV/_*}/third_party/rust-src \
- # --exclude=chromium-${PV/_*}/third_party/rust-toolchain \
- # --exclude=chromium-${PV/_*}/build/linux/debian_bullseye_i386-sysroot \
- # --exclude=chromium-${PV/_*}/build/linux/debian_bullseye_amd64-sysroot \
- # --exclude=chromium-${PV/_*}/third_party/angle/third_party/VK-GL-CTS \
- # "
-
- # if ! use libcxx ; then
- # XCLD+=" --exclude=chromium-${PV/_*}/third_party/libc++"
- # fi
-
- # if ! use pgo ; then
- # XCLD+=" --exclude=chromium-${PV/_*}/chrome/build/pgo_profiles"
- # fi
-
- # einfo "Unpacking chromium-${PV/_*}.tar.xz to ${WORKDIR}"
- # # Gentoo tarball:
- # # tar ${XCLD} -xf "${DISTDIR}/chromium-${PV/_*}-gentoo.tar.xz" -C "${WORKDIR}" || die
- # tar ${XCLD} -xf "${DISTDIR}/chromium-${PV/_*}${LITE_TARBALL:+-lite}.tar.xz" -C "${WORKDIR}" || die
-
- # unpack ${UGC_URL#*->}
- # # unpack chromium-patches-${PATCH_V}.tar.bz2
- # # Warned you!
-
- unpack chromium-${PV/_*}-linux.tar.xz
- unpack chromium-patches-${PATCH_V}.tar.bz2
- # These should only be required when we're not using the official toolchain
- if use !bundled-toolchain; then
- unpack chromium-patches-copium-${COPIUM_COMMIT:0:10}.tar.gz
- fi
-
- if use test; then
- # This just contains a bunch of font files that need to be unpacked (or moved) to the correct location.
- local testfonts_dir="${WORKDIR}/chromium-${PV/_*}/third_party/test_fonts/test_fonts"
- local testfonts_tar="${DISTDIR}/chromium-testfonts-${TEST_FONT:0:10}.tar.gz"
- einfo "Unpacking test fonts ..."
- tar xf "${testfonts_tar}" -C "${testfonts_dir}" || die "Failed to unpack testfonts"
- fi
-
- # We need to manually unpack this since M126 else we'd unpack one toolchain over the other.
- # Since we're doing that anyway let's unpack to sensible locations to make symlink creation easier.
- if use bundled-toolchain; then
- einfo "Unpacking bundled Clang ..."
- mkdir -p "${WORKDIR}"/clang || die "Failed to create clang directory"
- tar xf "${DISTDIR}/chromium-clang-${BUNDLED_CLANG_VER}.tar.xz" -C "${WORKDIR}/clang" || die "Failed to unpack Clang"
- einfo "Unpacking bundled Rust ..."
- local rust_dir="${WORKDIR}/rust-toolchain"
- mkdir -p "${rust_dir}" || die "Failed to create rust toolchain directory"
- tar xf "${DISTDIR}/chromium-rust-toolchain-${RUST_SHORT_HASH}-${BUNDLED_CLANG_VER%-*}.tar.xz" -C "${rust_dir}" ||
- die "Failed to unpack Rust"
- fi
-
- if use ppc64; then
- unpack chromium-openpower-${PPC64_HASH:0:10}.tar.bz2
- fi
-
- # This is a dirty hack, but we need rollup to build successfully and it's proving to be challenging
- # to build locally due to deps
- unpack rollup-wasm-node-${ROLLUP_VER}.tgz
-
- if use cromite; then
- unpack cromite-${CROMITE_COMMIT_ID}.tar.gz
- fi
-
- unpack ${UGC_URL#*->}
-}
-
-remove_compiler_builtins() {
- # We can't use the bundled compiler builtins with the system toolchain
- # We used to `grep` then `sed`, but it was indirect. Combining the two into a single
- # `awk` command is more efficient and lets us document the logic more clearly.
-
- local pattern=' configs += [ "//build/config/clang:compiler_builtins" ]'
- local target='build/config/compiler/BUILD.gn'
-
- local tmpfile
- tmpfile=$(mktemp) || die "Failed to create temporary file."
-
- if awk -v pat="${pattern}" '
- BEGIN {
- match_found = 0
- }
-
- # If the delete countdown is active, decrement it and skip to the next line.
- d > 0 { d--; next }
-
- # If the current line matches the pattern...
- $0 == pat {
- match_found = 1 # ...set our flag to true.
- d = 2 # Set delete counter for this line and the next two.
- prev = "" # Clear the buffered previous line so it is not printed.
- next
- }
-
- # For any other line, print the buffered previous line.
- NR > 1 { print prev }
-
- # Buffer the current line to be printed on the next cycle.
- { prev = $0 }
-
- END {
- # Print the last line if it was not part of a deleted block.
- if (d == 0) { print prev }
-
- # If the pattern was never found, exit with a failure code.
- if (match_found == 0) {
- exit 1
- }
- }
- ' "${target}" > "${tmpfile}"; then
- # AWK SUCCEEDED (exit code 0): The pattern was found and edited.
- # This is to avoid gawk's `-i inplace` option which users complain about.
- mv "${tmpfile}" "${target}"
- else
- # AWK FAILED (exit code 1): The pattern was not found.
- rm -f "${tmpfile}"
- die "Awk patch failed: Pattern not found in ${target}."
- fi
-}
-
-src_prepare() {
- # Calling this here supports resumption via FEATURES=keepwork
- python_setup
-
- # We'll fill this in as we go. Patches go in chromium-patches.
- local PATCHES=()
-
- rm "${WORKDIR}/chromium-patches-${PATCH_V}/common/cr131-unbundle-icu-target.patch"
- if ver_test "${RUST_SLOT}" -ge "1.95.0"; then
- rm "${WORKDIR}/chromium-patches-${PATCH_V}/rust/cr146-fix-botched-bytemuck-roll.patch"
- sed -i '/SupportedLaneCount/d' third_party/rust/chromium_crates_io/vendor/bytemuck-v1/src/zeroable.rs || die
- sed -i '/SupportedLaneCount/d' third_party/rust/chromium_crates_io/vendor/bytemuck-v1/src/pod.rs || die
- fi
-
- #cp -f ${WORKDIR}/chromium-patches-${PATCH_V}/*-compiler.patch "${T}/compiler.patch"
- ##cp -f ${FILESDIR}/chromium-147-compiler.patch "${T}/compiler.patch"
- #if ! use custom-cflags; then #See #25 #92
- # sed -i '/default_stack_frames/Q' "${T}/compiler.patch" || die
- #fi
-
- PATCHES+=( "${WORKDIR}/chromium-patches-${PATCH_V}/common/" )
- PATCHES+=( "${FILESDIR}/restore-x86-r4.patch" )
-
- # https://issues.chromium.org/issues/442698344
- # Unreleased fontconfig changed magic numbers and google have rolled to this version
- if has_version "<=media-libs/fontconfig-2.17.1"; then
- PATCHES+=( "${FILESDIR}/chromium-142-work-with-old-fontconfig.patch" )
- fi
-
- if use bundled-toolchain; then
- # We need to symlink the toolchain into the expected location
- einfo "Symlinking Clang toolchain to expected location ..."
- mkdir -p third_party/llvm-build/ || die "Failed to create llvm-build directory"
- # the 'Chromium Linux Tarballs' seem to already have 'Release+Asserts/{lib,bin}'; not sure if this is an
- # upstream change - we're using the same scripts to build, theoretically. We'll still attempt to create
- # llvm-build, but we'll rm Release+Asserts and symlink directly.
- if [[ -d third_party/llvm-build/Release+Asserts ]]; then
- rm -r third_party/llvm-build/Release+Asserts || die "Failed to remove third_party/llvm-build/Release+Asserts"
- fi
- ln -s "${WORKDIR}"/clang third_party/llvm-build/Release+Asserts || die "Failed to bundle Clang"
- einfo "Symlinking Rust toolchain to expected location ..."
- # As above, so below
- if [[ -d third_party/rust-toolchain ]]; then
- rm -r third_party/rust-toolchain || die "Failed to remove third_party/rust-toolchain"
- fi
- ln -s "${WORKDIR}"/rust-toolchain third_party/rust-toolchain || die "Failed to bundle rust"
- cp "${WORKDIR}"/rust-toolchain/VERSION \
- "${WORKDIR}"/rust-toolchain/INSTALLED_VERSION || die "Failed to set rust version"
- else
- # We don't need our toolchain patches if we're using the official toolchain
-
- # Copium patches go here.
- PATCHES+=(
- "${WORKDIR}/copium/cr143-libsync-__BEGIN_DECLS.patch"
- "${WORKDIR}/copium/cr149-unbundle-minizip-undo-unicode.patch"
- )
-
- # Automate conditional application of chromium-patches
- # The directory structure is expected to be something like:
- # chromium-patches-145/
- # ├── toolchain/
- # │ ├── cr123-foo.patch
- # │ └── cr135-bar.patch
- # ├── llvm/
- # │ ├── cr144-baz.patch
- # │ └── lt-23/
- # │ └── cr145-bleeding-edge-llvm-feature.patch
- # Where `lt-23` means "apply this patch if the LLVM version is less than 23".
- # Only categories in `slot_map` will be checked for version constraints.
- shopt -s nullglob
- local -A slot_map=( [llvm]="${LLVM_SLOT}" [rust]="${RUST_SLOT}" )
-
- for category in "${WORKDIR}/chromium-patches-${PATCH_V}"/*/; do
- local category_name="${category%/}"
- category_name="${category_name##*/}"
-
- # Skip arch-specific categories
- if [[ "${category_name}" == "ppc64le" ]]; then
- use ppc64 || continue
- fi
-
- # We applied common patches above, no need to apply them again here
- [[ "${category_name}" == "common" ]] && continue
-
- # Unconditional patches for this category
- local category_patches=( "${category}"*.patch )
- [[ ${#category_patches[@]} -gt 0 ]] && PATCHES+=( "${category}" )
-
- # Version-constrained subdirectories (e.g., llvm/lt-23/)
- for constraint_dir in "${category}"*/; do
- local dir_name="${constraint_dir%/}"
- dir_name="${dir_name##*/}"
- if [[ "${dir_name}" =~ ^lt-(.*)$ && -v slot_map[${category_name}] ]]; then
- ver_test "${slot_map[${category_name}]}" -lt "${BASH_REMATCH[1]}" &&
- PATCHES+=( "${constraint_dir}" )
- fi
- done
- done
-
- shopt -u nullglob
-
- # Strictly speaking this doesn't need to be gated (no bundled toolchain for ppc64); it keeps the logic together
- if use ppc64; then
- local patchset_dir="${WORKDIR}/openpower-patches-${PPC64_HASH}/patches"
- # patch causes build errors on 4K page systems (https://bugs.gentoo.org/show_bug.cgi?id=940304)
- local page_size_patch="ppc64le/third_party/use-sysconf-page-size-on-ppc64.patch"
- local isa_3_patch="ppc64le/core/baseline-isa-3-0.patch"
- # Apply the OpenPOWER patches (check for page size and isa 3.0)
- openpower_patches=( $(grep -E "^ppc64le|^upstream" "${patchset_dir}/series" | grep -v "${page_size_patch}" |
- grep -v "${isa_3_patch}" || die) )
- for patch in "${openpower_patches[@]}"; do
- PATCHES+=( "${patchset_dir}/${patch}" )
- done
- if [[ $(getconf PAGESIZE) == 65536 ]]; then
- PATCHES+=( "${patchset_dir}/${page_size_patch}" )
- fi
- # We use vsx3 as a proxy for 'want isa3.0' (POWER9)
- if use cpu_flags_ppc_vsx3 ; then
- PATCHES+=( "${patchset_dir}/${isa_3_patch}" )
- fi
- fi
-
- remove_compiler_builtins
-
- # We can't rely on the eselect'd Rust to actually include rustfmt, so we'll point to the selected slot specifically.
- local suffix=""
- if [[ "${RUST_TYPE}" == "binary" ]]; then
- suffix="-bin-${RUST_SLOT}"
- else
- suffix="-${RUST_SLOT}"
- fi
- sed -i "s|/bin/rustfmt|/bin/rustfmt${suffix}|g" build/rust/rust_bindgen_generator.gni ||
- die "Failed to update rustfmt path"
-
- fi
-
- # Do this before we apply patches since (e.g.) ppc64 needs to patch rollup and it's easier in ${S}
- einfo "Moving rollup wasm-node package into place ..."
- mkdir -p third_party/devtools-frontend/src/node_modules/@rollup/wasm-node ||
- die "Failed to create node_modules/@rollup/wasm-node"
- mv "${WORKDIR}"/package/* third_party/devtools-frontend/src/node_modules/@rollup/wasm-node ||
- die "Failed to move rollup package"
-
- if [ ! -z "${CHROMIUM_COMMITS[*]}" ]; then
- # for i in "${CHROMIUM_COMMITS[@]}"; do
- for i in "${!CHROMIUM_COMMITS[@]}"; do
- if [[ ${CHROMIUM_COMMITS[$i]} =~ webrtc ]]; then
- patch_prefix="webrtc"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ angle ]]; then
- patch_prefix="angle"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ quiche ]]; then
- patch_prefix="quiche"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ dawn ]]; then
- patch_prefix="dawn"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ perfetto ]]; then
- patch_prefix="perfetto"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ink ]]; then
- patch_prefix="ink"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ vulkan-utility-libraries ]]; then
- patch_prefix="vulkan-utility-libraries"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ruy ]]; then
- patch_prefix="ruy"
- else
- patch_prefix="chromium"
- fi
- pushd "${CHROMIUM_COMMITS[$i]}" > /dev/null || die
- if [[ $i = -* ]]; then
- einfo "Reverting ${patch_prefix}-${i/-}.patch"
- git_wrapper apply -R --exclude="*unittest.cc" --exclude="DEPS" \
- -p1 < "${DISTDIR}/${patch_prefix}-${i/-}.patch"
- else
- einfo "Applying ${patch_prefix}-${i/-}.patch"
- git_wrapper apply --exclude="*unittest.cc" --exclude="DEPS" \
- -p1 < "${DISTDIR}/${patch_prefix}-${i/-}.patch"
- fi
- popd > /dev/null || die
- done
- fi
-
- if ! use bluetooth ; then
- PATCHES+=(
- "${FILESDIR}/disable-bluez-r7.patch"
- )
- fi
-
- if use convert-dict ; then
- PATCHES+=(
- "${FILESDIR}/chromium-ucf-dict-utility-r3.patch"
- )
- fi
-
- if ! use libcxx ; then
- PATCHES+=(
- "${FILESDIR}/fix-wayland-oncecallback-copy.patch"
- )
- fi
-
- if use system-ffmpeg; then
- PATCHES+=(
- "${FILESDIR}/chromium-141-opus-mp3.patch"
- "${FILESDIR}/chromium-135-hevc.patch"
- )
- sed -i "\!AVFMT_FLAG_NOH264PARSE!d" media/filters/ffmpeg_glue.cc || die
- ewarn "You need to expose \"av_stream_get_first_dts\" in ffmpeg via user patch"
- fi
-
- if use system-av1; then
- PATCHES+=(
- "${FILESDIR}/chromium-system-av1.patch"
- )
- fi
-
- if use system-libvpx; then
- PATCHES+=(
- "${FILESDIR}/chromium-system-libvpx.patch"
- )
- fi
-
- if use system-openjpeg ; then
- PATCHES+=(
- "${FILESDIR}/chromium-system-openjpeg-r4.patch"
- )
- fi
-
- # if use x86 ; then
- # #* Fixes a segfault in transport_security_state_generator
- # PATCHES+=(
- # "${FILESDIR}/fix-segfault-x86.patch"
- # )
- # fi
-
- # Testing all patches when NODIE is defined
- if [ ! -z "${NODIE}" ]; then
- for i in "${PATCHES[@]}"; do
- eapply_wrapper "$i"
- done
- nonfatal eapply_user
- else
- default
- fi
-
- if use cromite ; then
- BR_PA_PATH="${WORKDIR}/cromite-${CROMITE_COMMIT_ID}/build/patches"
-
- sed -i '/b\/components\/components_strings\.grd/,+10d' "${BR_PA_PATH}/Add-cromite-flags-support.patch" || die
- sed -i '/b\/chrome\/android\/java\/res\/xml\/privacy_preferences\.xml/,+13d' "${BR_PA_PATH}/Add-cromite-flags-support.patch" || die
- sed -i '/b\/android_webview\/support_library\/java\/src\/org\/chromium\/support_lib_glue/,+11d' "${BR_PA_PATH}/Client-hints-overrides.patch" || die
- sed -i '/webapps_strings.grdp" \/>/{s++webapps_strings.grdp" /><part file="cromite_components_strings_grd/placeholder.txt"/>+;h};${x;/./{x;q0};x;q1}' \
- components/components_strings.grd || die
-
- sed -i 's/absl::/std::/' "${BR_PA_PATH}/Add-a-proxy-configuration-page.patch" || die
-
- filterdiff -p1 "${BR_PA_PATH}/JIT-site-settings.patch" --exclude="content/browser/renderer_host/render_process_host_impl.cc" \
- > "${BR_PA_PATH}/JIT-site-settings.patch1"
- mv -f "${BR_PA_PATH}/JIT-site-settings.patch1" "${BR_PA_PATH}/JIT-site-settings.patch"
-
- BROMITE_PATCHES=(
- "${BR_PA_PATH}/bromite-build-utils.patch"
- "${BR_PA_PATH}/Battery-API-return-nothing.patch"
- "${BR_PA_PATH}/Multiple-fingerprinting-mitigations.patch"
- "${BR_PA_PATH}/Add-flag-to-configure-maximum-connections-per-host.patch"
- "${BR_PA_PATH}/Add-a-proxy-configuration-page.patch"
- "${BR_PA_PATH}/Enable-StrictOriginIsolation-and-SitePerProcess.patch"
- "${BR_PA_PATH}/Disable-requests-for-single-word-Omnibar-searches.patch"
- "${BR_PA_PATH}/Reduce-HTTP-headers-in-DoH-requests-to-bare-minimum.patch"
- "${BR_PA_PATH}/Client-hints-overrides.patch"
- "${BR_PA_PATH}/Disable-idle-detection.patch"
- "${BR_PA_PATH}/Disable-TLS-resumption.patch"
- "${BR_PA_PATH}/Remove-navigator.connection-info.patch"
-
- "${BR_PA_PATH}/AudioBuffer-AnalyserNode-fp-mitigations.patch"
- "${BR_PA_PATH}/Fonts-fingerprinting-mitigation.patch"
- "${BR_PA_PATH}/Content-settings-infrastructure.patch"
- "${BR_PA_PATH}/Add-autoplay-site-setting.patch"
- "${BR_PA_PATH}/Site-setting-for-images.patch"
- "${BR_PA_PATH}/JIT-site-settings.patch"
- "${BR_PA_PATH}/Add-webGL-site-setting.patch"
- "${BR_PA_PATH}/Add-webRTC-site-settings.patch"
- "${BR_PA_PATH}/Show-site-settings-for-cookies-javascript-and-ads.patch"
- "${BR_PA_PATH}/Viewport-Protection-flag.patch"
- "${BR_PA_PATH}/Revert-remove-allowscript-content-setting-secondary-url.patch"
- "${BR_PA_PATH}/Timezone-customization.patch"
- "${BR_PA_PATH}/Disable-speechSynthesis-getVoices-API.patch"
- "${BR_PA_PATH}/Remove-support-for-device-memory-and-cpu-recovery.patch"
- "${BR_PA_PATH}/Disable-Feeback-Collector.patch"
- "${BR_PA_PATH}/Disable-remote-altsvc-for-h3-connections.patch"
- "${BR_PA_PATH}/Add-cromite-flags-support.patch"
- "${BR_PA_PATH}/Enables-deactivation-of-the-js-debugger-statement.patch"
- )
- for i in "${BROMITE_PATCHES[@]}"; do
- if [[ "$i" =~ "Add-autoplay-site-setting.patch" ]] ||
- [[ "$i" =~ "JIT-site-settings.patch" ]] ||
- [[ "$i" =~ "Site-setting-for-images.patch" ]]; then
- einfo "Git binary patch: ${i##*/}"
- git_wrapper apply -p1 < "$i"
- else
- filter_wrapper "$i" --exclude="chrome/android/*"
- fi
- done
-
- #! conflicting patches
- sed -i '/browser_features.cc/,+17d' \
- "${UGC_WD}/patches/extra/ungoogled-chromium/add-flag-to-clear-data-on-exit.patch" || die
- sed -i 's$} // namespace features$BASE_FEATURE(kClearDataOnExit, "ClearDataOnExit", base::FEATURE_DISABLED_BY_DEFAULT);}$' \
- chrome/browser/browser_features.cc || die
- sed -i 's$} // namespace features$BASE_DECLARE_FEATURE(kClearDataOnExit);}$' \
- chrome/browser/browser_features.h || die
- sed -i 's$kChromeUIAboutHost,$kChromeUIAboutHost,"ungoogled-first-run",$' \
- chrome/common/webui_url_constants.cc || die
- sed -i '/chrome\/common\/webui_url_constants.cc/Q' \
- "${UGC_WD}/patches/extra/ungoogled-chromium/first-run-page.patch" || die
-
- #! normalise paths in py
- sed -i 's$os.path.dirname(include_file)$os.path.abspath(os.path.dirname(include_file))$' \
- build/bromite/gyp/cpp_bromite_include.py || die
- fi
-
- # if [[ ${LLVM_SLOT} == "19" ]]; then
- # # Upstream now hard depend on a feature that was added in LLVM 20.1, but we don't want to stabilise that yet.
- # # Do the temp file shuffle in case someone is using something other than `gawk`
- # {
- # awk '/config\("clang_warning_suppression"\) \{/ { print $0 " }"; sub(/clang/, "xclang"); print; next }
- # { print }' build/config/compiler/BUILD.gn > "${T}/build.gn" && \
- # mv "${T}/build.gn" build/config/compiler/BUILD.gn
- # } || die "Unable to disable warning suppression"
- # fi
-
- ## Not included in -lite tarballs, but we should check for it anyway.
- #if [[ -f third_party/node/linux/node-linux-x64/bin/node ]]; then
- # rm third_party/node/linux/node-linux-x64/bin/node || die
- #else
- # mkdir -p third_party/node/linux/node-linux-x64/bin || die
- #fi
- #ln -s "${EPREFIX}"/usr/bin/node third_party/node/linux/node-linux-x64/bin/node || die
-
- cp "${FILESDIR}/libusb.gn" build/linux/unbundle || die
- sed -i '/^REPLACEMENTS.*$/{s++REPLACEMENTS = {"libusb":"third_party/libusb/BUILD.gn",+;h};${x;/./{x;q0};x;q1}' \
- build/linux/unbundle/replace_gn_files.py || die
- sed -i '/^.*deps.*third_party\/jsoncpp.*$/{s++public_deps \+= [ "//third_party/jsoncpp" ]+;h};${x;/./{x;q0};x;q1}' \
- third_party/webrtc/rtc_base/BUILD.gn || die
-
- if use override-data-dir; then
- sed -i '/"chromium";/{s++"ungoogled-chromium";+;h};${x;/./{x;q0};x;q1}' \
- chrome/common/chrome_paths_linux.cc || die
- fi
-
- if use system-abseil-cpp; then
- eapply_wrapper "${FILESDIR}/chromium-147-system-abseil.patch"
-
- #! SFINAE mangling incompatibility between clang and gcc:
- #! https://github.com/llvm/llvm-project/issues/85656
- #! gcc: _ZN4absl12lts_202601074CordC1INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELi0EEEOT_
- #! clang: _ZN4absl12lts_202601074CordC1INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEETnNSt9enable_ifIXsr3std7is_sameIT_S8_EE5valueEiE4typeELi0EEEOSA_
- #! So, either this:
- eapply_wrapper "${FILESDIR}/chromium-141-system-abseil-cord.patch"
- #! or build with -fclang-abi-compat=17
-
- # cp -f /usr/include/absl/base/options.h third_party/abseil-cpp/absl/base/options.h
- # sed -i '/^#define ABSL_OPTION_USE_STD_ORDERING.*$/{s++#define ABSL_OPTION_USE_STD_ORDERING 1+;h};${x;/./{x;q0};x;q1}' \
- # third_party/abseil-cpp/absl/base/options.h || die
- fi
-
- #* Applying UGC PRs here
- if [ ! -z "${UGC_PR_COMMITS[*]}" ]; then
- pushd "${UGC_WD}" >/dev/null
- for i in "${UGC_PR_COMMITS[@]}"; do
- eapply_wrapper "${DISTDIR}/${PN}-$i.patch"
- done
- popd >/dev/null
- fi
-
- # From here we adapt ungoogled-chromium's patches to our needs
- local ugc_pruning_list="${UGC_WD}/pruning.list"
- local ugc_patch_series="${UGC_WD}/patches/series"
- local ugc_substitution_list="${UGC_WD}/domain_substitution.list"
-
- local ugc_unneeded=(
- # GN bootstrap
- extra/debian/gn/parallel
- # following Gentoo's Chromium
- core/ungoogled-chromium/build-with-wasm-rollup
- )
-
- if use cromite ; then
- einfo "Using fingerprinting patches from Cromite instead"
- ugc_unneeded+=(
- extra/bromite/fingerprinting-flags-client-rects-and-measuretext
- extra/bromite/flag-max-connections-per-host
- extra/bromite/flag-fingerprinting-canvas-image-data-noise
- extra/ungoogled-chromium/add-components-ungoogled
- extra/ungoogled-chromium/remove-pac-size-limit
- )
- fi
-
- # #* Temporary fix
- # sed -i "\!ios/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/icu/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/libjpeg_turbo/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/snappy/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/closure_compiler/!d" "${ugc_pruning_list}" || die
-
- # #* Didn't unpack them at the first place
- # sed -i "\!build/linux/debian_bullseye_i386-sysroot!d" "${ugc_pruning_list}" || die
- # sed -i "\!build/linux/debian_bullseye_amd64-sysroot!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/llvm-build!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/node/linux!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/rust-src!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/rust-toolchain!d" "${ugc_pruning_list}" || die
- # if ! use libcxx ; then
- # sed -i "\!third_party/libc!d" "${ugc_pruning_list}" || die
- # fi
- sed -i "s|debug('files|error('files|" \
- "${UGC_WD}/utils/prune_binaries.py" || die
- sed -i "\!third_party/node/linux!d" \
- "${UGC_WD}/utils/prune_binaries.py" || die
-
- local ugc_p ugc_dir
- for p in "${ugc_unneeded[@]}"; do
- einfo "Removing ${p}.patch"
- sed -i "\!${p}.patch!d" "${ugc_patch_series}" || die
- done
-
- if [ ! -z "${UGC_SKIP_PATCHES}" ]; then
- for p in ${UGC_SKIP_PATCHES}; do
- ewarn "Removing ${p}"
- sed -i "\!${p}!d" "${ugc_patch_series}" || die
- done
- fi
-
- if [ ! -z "${UGC_KEEP_BINARIES}" ]; then
- for p in ${UGC_KEEP_BINARIES}; do
- ewarn "Keeping binary ${p}"
- sed -i "\!${p}!d" "${ugc_pruning_list}" || die
- done
- fi
-
- if [ ! -z "${UGC_SKIP_SUBSTITUTION}" ]; then
- for p in ${UGC_SKIP_SUBSTITUTION}; do
- ewarn "No substitutions in ${p}"
- sed -i "\!${p}!d" "${ugc_substitution_list}" || die
- done
- fi
-
- ebegin "Pruning binaries"
- "${UGC_WD}/utils/prune_binaries.py" -q . "${UGC_WD}/pruning.list"
- eend $? || die
-
- ebegin "Applying ungoogled-chromium patches"
- "${UGC_WD}/utils/patches.py" -q apply . "${UGC_WD}/patches"
- eend $? || die
-
- ebegin "Applying domain substitution"
- "${UGC_WD}/utils/domain_substitution.py" -q apply -r "${UGC_WD}/domain_regex.list" -f "${UGC_WD}/domain_substitution.list" .
- eend $? || die
-
- # Sanity check esbuild version before we start removing files.
- # We _could_ patch the version check out - in theory esbuild upstream are being super conservative after
- # arch(AUR) packaged an `esbuild` binary and set ESBUILD_BINARY_PATH=/usr/bin/esbuild, causing much breakage,
- # but this is fine too and exactly matches what upstream are expecting.
- # https://github.com/evanw/esbuild/issues/2894
- local esbuild_js="${S}/third_party/devtools-frontend/src/node_modules/esbuild/lib/main.js"
- local found
- found=$(awk -F'"' '/if \(binaryVersion !==/ {print $2}' "${esbuild_js}")
- if [[ "${found}" != "${ESBUILD_VER}" ]]; then
- die "esbuild version mismatch: expected ${ESBUILD_VER}, found ${found}"
- fi
-
- elog "Removing bundled binaries from source tree ..."
- # Purge bundled ELF files: These are non-portable and will cause issues if used instead of system versions.
- # Use `--wasm` to also remove WebAssembly binaries, if desired - they're portable so shouldn't break builds.
- ${EPYTHON} "${FILESDIR}/bin-finder.py" --elf "${S}" | awk '{print $1}' | xargs rm -f ||
- die "Failed to remove bundled binaries"
-
- # And now we restore any that we actually need, from the host system
- local esbuild_path="${S}/third_party/devtools-frontend/src/third_party/esbuild"
- local -A restore_list=(
- ["/usr/bin/esbuild-${ESBUILD_VER}"]="${esbuild_path}/esbuild"
- ["/usr/bin/gperf"]="${S}/third_party/gperf/cipd/bin/gperf"
- ["/usr/bin/node"]="${S}/third_party/node/linux/node-linux-x64/bin/node"
- )
-
- for src in "${!restore_list[@]}"; do
- dst="${restore_list[${src}]}"
- if [[ -f "${src}" ]]; then
- einfo "Symlinking ${src} ..."
- # Make sure the parent dir exists; some tarballs don't include (e.g.) node's bindir
- mkdir -p "$(dirname "${dst}")" || die "Failed to create directory for ${dst}"
- ln -s "${src}" "${dst}" || die "Failed to symlink ${dst} from ${src}"
- if [[ ! -L "${dst}" || "$(readlink -f "${dst}")" != "${src}" ]]; then
- die "Symlink verification failed for ${dst} -> ${src}"
- fi
- else
- die "Expected to find ${src} to restore ${dst}, but it does not exist."
- fi
- done
-
- # adjust python interpreter version
- sed -i -e "s|\(^script_executable = \).*|\1\"${EPYTHON}\"|g" .gn || die
-
- # Use the system copy of hwdata's usb.ids; upstream is woefully out of date (2015!)
- sed 's|//third_party/usb_ids/usb.ids|/usr/share/hwdata/usb.ids|g' \
- -i services/device/public/cpp/usb/BUILD.gn || die "Failed to set system usb.ids path"
-
- # remove_bundled_libraries.py walks the source tree and looks for paths containing the substring 'third_party'
- # whitelist matches use the right-most matching path component, so we need to whitelist from that point down.
- local keeplibs=(
- base/third_party/cityhash
- )
- use system-double-conversion || keeplibs+=(
- base/third_party/double_conversion
- )
- keeplibs+=(
- base/third_party/icu
- base/third_party/nspr
- base/third_party/superfasthash
- base/third_party/symbolize
- base/third_party/xdg_user_dirs
- buildtools/third_party/libc++
- buildtools/third_party/libc++abi
- )
- use cromite && keeplibs+=(
- cromite_flags/third_party
- )
- keeplibs+=(
- net/third_party/mozilla_security_manager
- net/third_party/quic
- net/third_party/uri_template
- )
- use system-abseil-cpp || keeplibs+=(
- third_party/abseil-cpp
- )
- keeplibs+=(
- third_party/angle
- third_party/angle/src/common/third_party/xxhash
- third_party/angle/src/third_party/ceval
- )
- use nvidia || keeplibs+=(
- third_party/angle/src/third_party/libXNVCtrl
- )
- keeplibs+=(
- third_party/angle/src/third_party/volk
- third_party/anonymous_tokens
- third_party/apple_apsl
- third_party/axe-core
- third_party/bidimapper
- third_party/blink
- third_party/boringssl
- third_party/boringssl/src/third_party/fiat
- third_party/breakpad
- third_party/breakpad/breakpad/src/third_party/curl
- )
- use system-brotli || keeplibs+=(
- third_party/brotli
- )
- keeplibs+=(
- third_party/catapult
- third_party/catapult/common/py_vulcanize/third_party/rcssmin
- third_party/catapult/common/py_vulcanize/third_party/rjsmin
- third_party/catapult/third_party/beautifulsoup4-4.9.3
- third_party/catapult/third_party/html5lib-1.1
- third_party/catapult/third_party/polymer
- third_party/catapult/third_party/six
- third_party/catapult/third_party/typ
- third_party/catapult/tracing/third_party/d3
- third_party/catapult/tracing/third_party/gl-matrix
- third_party/catapult/tracing/third_party/jpeg-js
- third_party/catapult/tracing/third_party/jszip
- third_party/catapult/tracing/third_party/mannwhitneyu
- third_party/catapult/tracing/third_party/oboe
- third_party/catapult/tracing/third_party/pako
- third_party/ced
- third_party/cld_3
- third_party/closure_compiler
- )
- use libcxx && keeplibs+=(
- third_party/compiler-rt
- )
- keeplibs+=(
- third_party/content_analysis_sdk
- third_party/cpuinfo
- third_party/crabbyavif
- third_party/crashpad
- third_party/crashpad/crashpad/third_party/lss
- third_party/crashpad/crashpad/third_party/zlib
- )
- use system-crc32c || keeplibs+=(
- third_party/crc32c
- )
- keeplibs+=(
- third_party/cros_system_api
- third_party/d3
- third_party/dawn
- third_party/dawn/third_party/gn/webgpu-cts
- third_party/dawn/third_party/OpenGL-Registry
- third_party/dawn/third_party/renderdoc
- third_party/dawn/third_party/webgpu-headers
- third_party/depot_tools
- third_party/devscripts
- third_party/devtools-frontend
- third_party/devtools-frontend/src/front_end/third_party/acorn
- third_party/devtools-frontend/src/front_end/third_party/additional_readme_paths.json
- third_party/devtools-frontend/src/front_end/third_party/axe-core
- third_party/devtools-frontend/src/front_end/third_party/chromium
- third_party/devtools-frontend/src/front_end/third_party/codemirror
- third_party/devtools-frontend/src/front_end/third_party/csp_evaluator
- third_party/devtools-frontend/src/front_end/third_party/diff
- third_party/devtools-frontend/src/front_end/third_party/i18n
- third_party/devtools-frontend/src/front_end/third_party/intl-messageformat
- third_party/devtools-frontend/src/front_end/third_party/json5
- third_party/devtools-frontend/src/front_end/third_party/legacy-javascript
- third_party/devtools-frontend/src/front_end/third_party/lighthouse
- third_party/devtools-frontend/src/front_end/third_party/lit
- third_party/devtools-frontend/src/front_end/third_party/marked
- third_party/devtools-frontend/src/front_end/third_party/puppeteer
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/third_party/mitt
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/third_party/parsel-js
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/third_party/rxjs
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/third_party/urlpattern-polyfill
- third_party/devtools-frontend/src/front_end/third_party/source-map-scopes-codec
- third_party/devtools-frontend/src/front_end/third_party/third-party-web
- third_party/devtools-frontend/src/front_end/third_party/vscode.web-custom-data
- third_party/devtools-frontend/src/front_end/third_party/wasmparser
- third_party/devtools-frontend/src/front_end/third_party/web-vitals
- third_party/devtools-frontend/src/third_party
- third_party/dom_distiller_js
- third_party/dragonbox
- third_party/eigen3
- third_party/emoji-segmenter
- third_party/farmhash
- third_party/fast_float
- third_party/fdlibm
- third_party/federated_compute/chromium/fcp/confidentialcompute
- third_party/federated_compute/src/fcp/base
- third_party/federated_compute/src/fcp/confidentialcompute
- third_party/federated_compute/src/fcp/protos/confidentialcompute
- third_party/federated_compute/src/fcp/protos/federatedcompute
- third_party/fft2d
- third_party/flatbuffers
- third_party/fp16
- third_party/freetype
- third_party/fusejs
- third_party/fxdiv
- third_party/gemmlowp
- third_party/google_input_tools
- third_party/google_input_tools/third_party/closure_library
- third_party/google_input_tools/third_party/closure_library/third_party/closure
- third_party/googletest
- third_party/gperf # We symlink system gperf, but this will purge the symlink since we tidy up afterwards.
- third_party/highway
- third_party/hunspell
- third_party/hyphenation-patterns
- third_party/ink/src/ink/brush
- third_party/ink/src/ink/color
- third_party/ink/src/ink/geometry
- third_party/ink/src/ink/rendering
- third_party/ink/src/ink/rendering/skia/common_internal
- third_party/ink/src/ink/rendering/skia/native
- third_party/ink/src/ink/rendering/skia/native/internal
- third_party/ink/src/ink/strokes
- third_party/ink/src/ink/types
- third_party/inspector_protocol
- third_party/ipcz
- third_party/jinja2
- )
- use system-jsoncpp || keeplibs+=(
- third_party/jsoncpp
- )
- keeplibs+=(
- third_party/khronos
- third_party/lens_server_proto
- third_party/leveldatabase
- third_party/libaddressinput
- )
- use libcxx && keeplibs+=(
- third_party/libc++
- )
- keeplibs+=(
- third_party/libdrm
- third_party/libgav1
- third_party/libjingle
- third_party/libpfm4
- third_party/libphonenumber
- third_party/libpng
- third_party/libsecret
- third_party/libsrtp
- third_party/libsync
- third_party/libtess2/libtess2
- third_party/libtess2/src/Include
- third_party/libtess2/src/Source
- third_party/liburlpattern
- )
- use system-libusb || keeplibs+=(
- third_party/libusb
- )
- keeplibs+=(
- third_party/libva_protected_content
- )
- use system-libvpx || keeplibs+=(
- third_party/libvpx
- third_party/libvpx/source/libvpx/third_party/x86inc
- )
- keeplibs+=(
- third_party/libwebm
- third_party/libx11
- third_party/libxcb-keysyms
- third_party/libxml/chromium
- third_party/libyuv
- third_party/libzip
- third_party/lit
- )
- use libcxx && keeplibs+=(
- third_party/llvm-libc
- third_party/llvm-libc/src/shared/
- )
- keeplibs+=(
- third_party/lottie
- third_party/lss
- third_party/lzma_sdk
- third_party/mako
- third_party/markupsafe
- third_party/material_color_utilities
- third_party/metrics_proto
- third_party/minigbm
- third_party/ml_dtypes
- third_party/modp_b64
- third_party/nasm
- third_party/nearby
- third_party/neon_2_sse
- third_party/node
- third_party/oak/chromium/proto
- third_party/oak/chromium/proto/attestation
- third_party/omnibox_proto
- third_party/one_euro_filter
- third_party/openscreen
- third_party/openscreen/src/third_party/
- third_party/openscreen/src/third_party/tinycbor/src/src
- third_party/ots
- third_party/pdfium
- third_party/pdfium/third_party/agg23
- third_party/pdfium/third_party/bigint
- third_party/pdfium/third_party/freetype
- third_party/pdfium/third_party/lcms
- )
- use system-openjpeg || keeplibs+=(
- third_party/pdfium/third_party/libopenjpeg
- )
- keeplibs+=(
- third_party/pdfium/third_party/libtiff
- third_party/perfetto
- third_party/perfetto/protos/third_party/android
- third_party/perfetto/protos/third_party/chromium
- third_party/perfetto/protos/third_party/pprof
- third_party/perfetto/protos/third_party/primes
- third_party/perfetto/protos/third_party/simpleperf
- third_party/pffft
- third_party/ply
- third_party/polymer
- third_party/private_membership
- third_party/private-join-and-compute
- third_party/protobuf
- third_party/protobuf/third_party/utf8_range
- third_party/pthreadpool
- third_party/puffin
- third_party/pyjson5
- third_party/pyyaml
- third_party/rapidhash
- third_party/readability
- third_party/rnnoise
- third_party/rust
- third_party/ruy
- third_party/s2cellid
- third_party/search_engines_data
- third_party/securemessage
- third_party/selenium-atoms
- third_party/sentencepiece
- third_party/sentencepiece/src/third_party/darts_clone
- third_party/shell-encryption
- third_party/simdutf
- third_party/simplejson
- third_party/six
- third_party/skia
- third_party/skia/include/third_party/vulkan
- third_party/smhasher
- )
- use system-snappy || keeplibs+=(
- third_party/snappy
- )
- keeplibs+=(
- third_party/spirv-headers
- third_party/spirv-tools
- third_party/sqlite
- third_party/swiftshader
- third_party/swiftshader/third_party/astc-encoder
- third_party/swiftshader/third_party/llvm-subzero
- third_party/swiftshader/third_party/marl
- third_party/swiftshader/third_party/SPIRV-Headers/include/spirv
- third_party/swiftshader/third_party/SPIRV-Tools
- third_party/swiftshader/third_party/subzero
- third_party/tensorflow_models
- third_party/tensorflow-text
- third_party/tflite
- third_party/tflite/src/third_party/fft2d
- third_party/tflite/src/third_party/xla/third_party/tsl
- third_party/tflite/src/third_party/xla/xla/tsl/framework
- third_party/tflite/src/third_party/xla/xla/tsl/lib/random
- third_party/tflite/src/third_party/xla/xla/tsl/platform
- third_party/tflite/src/third_party/xla/xla/tsl/protobuf
- third_party/tflite/src/third_party/xla/xla/tsl/util
- third_party/ukey2
- third_party/utf
- third_party/vulkan
- third_party/wayland
- third_party/webdriver
- third_party/webgpu-cts
- third_party/webrtc
- third_party/webrtc/common_audio/third_party/ooura
- third_party/webrtc/common_audio/third_party/spl_sqrt_floor
- third_party/webrtc/modules/third_party/fft
- third_party/webrtc/modules/third_party/g711
- third_party/webrtc/modules/third_party/g722
- third_party/widevine
- )
- use system-woff2 || keeplibs+=(
- third_party/woff2
- )
- keeplibs+=(
- third_party/wuffs
- third_party/x11proto
- third_party/xcbproto
- third_party/xnnpack
- third_party/zlib/google
- third_party/zxcvbn-cpp
- url/third_party/mozilla
- v8/third_party/glibc
- v8/third_party/inspector_protocol
- v8/third_party/rapidhash-v8
- v8/third_party/siphash
- v8/third_party/utf8-decoder
- v8/third_party/v8
- v8/third_party/valgrind
-
- # gyp -> gn leftovers
- third_party/speech-dispatcher
- third_party/usb_ids
- )
-
- if use test; then
- keeplibs+=(
- third_party/breakpad/breakpad/src/processor
- third_party/fuzztest
- third_party/google_benchmark/src/include/benchmark
- third_party/google_benchmark/src/src
- third_party/test_fonts
- third_party/test_fonts/fontconfig
- third_party/test_fonts/test_fonts
- )
- fi
-
- # USE=system-*
- if ! use system-harfbuzz; then
- keeplibs+=( third_party/harfbuzz )
- fi
-
- if ! use system-ffmpeg; then
- keeplibs+=( third_party/ffmpeg third_party/opus )
- fi
-
- if ! use system-icu; then
- keeplibs+=( third_party/icu )
- fi
-
- if ! use system-zstd; then
- keeplibs+=( third_party/zstd )
- fi
-
- if ! use system-av1; then
- keeplibs+=(
- third_party/dav1d
- third_party/libaom
- third_party/libaom/source/libaom/third_party/fastfeat
- third_party/libaom/source/libaom/third_party/vector
- third_party/libaom/source/libaom/third_party/x86inc
- )
- fi
-
- if use libcxx; then
- keeplibs+=(
- third_party/libc++
- third_party/llvm-libc
- )
- fi
-
- if ! use system-openh264; then
- keeplibs+=( third_party/openh264 )
- fi
-
- if ! use system-re2; then
- keeplibs+=( third_party/re2 )
- fi
-
- # Arch-specific
- if use arm64 || use ppc64 ; then
- keeplibs+=( third_party/swiftshader/third_party/llvm-10.0 )
- fi
- # we need to generate ppc64 stuff because upstream does not ship it yet
- # it has to be done before unbundling.
- if use ppc64; then
- pushd third_party/libvpx >/dev/null || die
- mkdir -p source/config/linux/ppc64 || die
- # requires git and clang, bug #832803
- # Revert https://chromium.googlesource.com/chromium/src/+/b463d0f40b08b4e896e7f458d89ae58ce2a27165%5E%21/third_party/libvpx/generate_gni.sh
- # and https://chromium.googlesource.com/chromium/src/+/71ebcbce867dd31da5f8b405a28fcb0de0657d91%5E%21/third_party/libvpx/generate_gni.sh
- # since we're not in a git repo
- sed -i -e "s|^update_readme||g; s|clang-format|${EPREFIX}/bin/true|g; /^git -C/d; /git cl/d; /cd \$BASE_DIR\/\$LIBVPX_SRC_DIR/ign format --in-place \$BASE_DIR\/BUILD.gn\ngn format --in-place \$BASE_DIR\/libvpx_srcs.gni" \
- generate_gni.sh || die
- ./generate_gni.sh || die
- popd >/dev/null || die
-
- pushd third_party/ffmpeg >/dev/null || die
- cp libavcodec/ppc/h264dsp.c libavcodec/ppc/h264dsp_ppc.c || die
- cp libavcodec/ppc/h264qpel.c libavcodec/ppc/h264qpel_ppc.c || die
- popd >/dev/null || die
- fi
-
- # Sanity check keeplibs, on major version bumps it is often necessary to update this list
- # and this enables us to hit them all at once.
- # There are some entries that need to be whitelisted (TODO: Why? The file is understandable, the rest seem odd)
- whitelist_libs=(
- net/third_party/quic
- third_party/devtools-frontend/src/front_end/third_party/additional_readme_paths.json
- third_party/libjingle
- third_party/mesa
- third_party/skia/third_party/vulkan
- third_party/vulkan
- )
- local not_found_libs=()
- for lib in "${keeplibs[@]}"; do
- if [[ ! -d "${lib}" ]] && ! has "${lib}" "${whitelist_libs[@]}"; then
- not_found_libs+=( "${lib}" )
- fi
- done
-
- if [[ ${#not_found_libs[@]} -gt 0 ]]; then
- ewarn "The following \`keeplibs\` directories were not found in the source tree:"
- for lib in "${not_found_libs[@]}"; do
- ewarn " ${lib}"
- done
- fi
-
- keeplibs+=( third_party/ungoogled )
-
- # Remove most bundled libraries. Some are still needed.
- einfo "Unbundling third-party libraries ..."
- build/linux/unbundle/remove_bundled_libraries.py "${keeplibs[@]}" --do-remove || die
-
- # Interferes with our bundled clang path; we don't want stripped binaries anyway.
- sed -i -e 's|${clang_base_path}/bin/llvm-strip|/bin/true|g' \
- -e 's|${clang_base_path}/bin/llvm-objcopy|/bin/true|g' \
- build/linux/strip_binary.gni || die
-}
-
-src_configure() {
- # Calling this here supports resumption via FEATURES=keepwork
- python_setup
-
- # Bug 491582.
- export TMPDIR="${WORKDIR}/temp"
- mkdir -p -m 755 "${TMPDIR}" || die
-
- # https://bugs.gentoo.org/654216
- addpredict /dev/dri/ #nowarn
-
- # Use system-provided libraries.
- # TODO: freetype -- remove sources (https://bugs.chromium.org/p/pdfium/issues/detail?id=733).
- # TODO: use_system_hunspell (upstream changes needed).
- # TODO: use_system_protobuf (bug #525560).
- # TODO: use_system_sqlite (http://crbug.com/22208).
-
- # libevent: https://bugs.gentoo.org/593458
- local gn_system_libraries=(
- flac
- fontconfig
- freetype
- libjpeg
- libwebp
- libxml
- libxslt
- zlib
- )
- if use system-abseil-cpp; then
- gn_system_libraries+=(
- absl_algorithm
- absl_base
- absl_cleanup
- absl_container
- absl_crc
- absl_debugging
- absl_flags
- absl_functional
- absl_hash
- absl_log
- absl_log_internal
- absl_memory
- absl_meta
- absl_numeric
- absl_random
- absl_status
- absl_strings
- absl_synchronization
- absl_time
- absl_types
- absl_utility
- )
- fi
- if use system-brotli; then
- gn_system_libraries+=( brotli )
- fi
- if use system-crc32c; then
- gn_system_libraries+=( crc32c )
- fi
- if use system-double-conversion; then
- gn_system_libraries+=( double-conversion )
- fi
- if use system-woff2; then
- gn_system_libraries+=( woff2 )
- fi
- if use nvidia; then
- gn_system_libraries+=( libXNVCtrl )
- fi
- if use system-ffmpeg; then
- gn_system_libraries+=( ffmpeg opus )
- fi
- if use system-jsoncpp; then
- gn_system_libraries+=( jsoncpp )
- fi
- if use system-icu; then
- gn_system_libraries+=( icu )
- fi
- if use system-zstd; then
- gn_system_libraries+=( zstd )
- fi
- if use system-av1; then
- gn_system_libraries+=( dav1d libaom )
- fi
- if use system-libusb; then
- gn_system_libraries+=( libusb )
- fi
- if use system-libvpx; then
- gn_system_libraries+=( libvpx )
- fi
- use system-openh264 && gn_system_libraries+=(
- openh264
- )
- use system-re2 && gn_system_libraries+=(
- re2
- )
- use system-snappy && gn_system_libraries+=(
- snappy
- )
-
- build/linux/unbundle/replace_gn_files.py --system-libraries "${gn_system_libraries[@]}" ||
- die "Failed to replace GN files for system libraries"
-
- # TODO 131: The above call clobbers `enable_freetype = true` in the freetype gni file
- # drop the last line, then append the freetype line and a new curly brace to end the block
- local freetype_gni="build/config/freetype/freetype.gni"
- sed -i -e '$d' ${freetype_gni} || die
- echo " enable_freetype = true" >> ${freetype_gni} || die
- echo "}" >> ${freetype_gni} || die
-
- if use !custom-cflags; then
- replace-flags "-Os" "-O2"
- strip-flags
- # Debug info section overflows without component build
- # Prevent linker from running out of address space, bug #471810 .
- filter-flags "-g*"
- # 949123: Several multimedia components explicitly build with specific CFLAGS and
- # use runtime detection to enable optimisations; unfortunately any of our CFLAGS are suffixed
- # to the end of the command line, which causes build failures.
- fi
- # Since M150 `skia` will begin breaking for x86_64 due to compilation of `avx512` code paths;
- # we need to filter these for all arches.
- filter-flags "-march*" "-mtune*" "-mcpu*"
-
- # We don't use the same clang version as upstream, and with -Werror
- # we need to make sure that we don't get superfluous warnings.
- append-flags -Wno-unknown-warning-option
- if tc-is-cross-compiler; then # can you cross-compile with the bundled toolchain?
- export BUILD_CXXFLAGS+=" -Wno-unknown-warning-option"
- export BUILD_CFLAGS+=" -Wno-unknown-warning-option"
- fi
-
- # Start building our GN options
- local myconf_gn=() # Tip: strings must be quoted, bools or numbers are fine
-
- if use !bundled-toolchain; then
- # We already forced the "correct" clang via pkg_setup
-
- if tc-is-cross-compiler; then
- CC="${CC} -target ${CHOST} --sysroot ${ESYSROOT}"
- CXX="${CXX} -target ${CHOST} --sysroot ${ESYSROOT}"
- BUILD_AR=${AR}
- BUILD_CC=${CC}
- BUILD_CXX=${CXX}
- BUILD_NM=${NM}
- fi
-
- # Make sure the build system will use the right tools, bug #340795.
- tc-export AR CC CXX NM
-
- strip-unsupported-flags
- append-ldflags -Wl,--undefined-version # https://bugs.gentoo.org/918897#c32
-
- myconf_gn+=(
- "is_clang=true"
- "clang_use_chrome_plugins=false"
- "use_clang_modules=false" # M141 enables this for the linux platform by default.
- 'custom_toolchain="//build/toolchain/linux/unbundle:default"'
- # From M127 we need to provide a location for libclang and the clang resource dir so that bindgen can find them
- "bindgen_libclang_path=\"$(get_llvm_prefix)/$(get_libdir)\""
- "bindgen_clang_resource_dir=\"${EPREFIX}/usr/lib/clang/${LLVM_SLOT}/include\""
- "bindgen_extra_clang_args=[\"-I${EPREFIX}/usr/lib/clang/${LLVM_SLOT}/include\"]"
- "clang_base_path=\"${EPREFIX}/usr/lib/clang/${LLVM_SLOT}/\""
- "rust_bindgen_root=\"${EPREFIX}/usr/\""
- "rust_sysroot_absolute=\"$(get_rust_prefix)\""
- "rustc_version=\"${RUST_SLOT}\""
- )
-
- if tc-ld-is-mold; then
- myconf_gn+=(
- "use_mold=true"
- "use_lld=false"
- "linker_path=\"${EPREFIX}/usr/bin/mold\""
- )
- else
- myconf_gn+=( "use_lld=true" )
- fi
-
- if [[ ${LLVM_SLOT} -lt 23 ]]; then
- # Workaround for -fsanitize-ignore-for-ubsan-feature (added in LLVM 23)
- myconf_gn+=( 'clang_has_ubsan_feature_ignore=false' )
- fi
-
- if ! tc-is-cross-compiler; then
- myconf_gn+=( 'host_toolchain="//build/toolchain/linux/unbundle:default"' )
- else
- tc-export BUILD_{AR,CC,CXX,NM}
- myconf_gn+=(
- 'host_toolchain="//build/toolchain/linux/unbundle:host"'
- 'v8_snapshot_toolchain="//build/toolchain/linux/unbundle:host"'
- "host_pkg_config=\"$(tc-getBUILD_PKG_CONFIG)\""
- "pkg_config=\"$(tc-getPKG_CONFIG)\""
- )
-
- # setup cups-config, build system only uses --libs option
- if use cups; then
- mkdir "${T}/cups-config" || die
- cp "${ESYSROOT}/usr/bin/${CHOST}-cups-config" "${T}/cups-config/cups-config" || die
- export PATH="${PATH}:${T}/cups-config"
- fi
-
- # Don't inherit PKG_CONFIG_PATH from environment
- local -x PKG_CONFIG_PATH=
- fi
-
- fi # !bundled-toolchain
-
- local myarch
- myarch="$(tc-arch)"
- case ${myarch} in
- amd64)
- # Bug 530248, 544702, 546984, 853646.
- use !custom-cflags && filter-flags -mno-mmx -mno-sse2 -mno-ssse3 -mno-sse4.1 \
- -mno-avx -mno-avx2 -mno-fma -mno-fma4 -mno-xop -mno-sse4a
- myconf_gn+=( 'target_cpu="x64"' )
- ;;
- x86)
- # Bug 530248, 544702, 546984, 853646.
- use !custom-cflags && filter-flags -mno-mmx -mno-sse2 -mno-ssse3 -mno-sse4.1 \
- -mno-avx -mno-avx2 -mno-fma -mno-fma4 -mno-xop -mno-sse4a
- myconf_gn+=( 'target_cpu="x86"' )
- ;;
- arm64)
- myconf_gn+=( 'target_cpu="arm64"' )
- ;;
- ppc64)
- myconf_gn+=( 'target_cpu="ppc64"' )
- ;;
- *)
- die "Failed to determine target arch, got '${myarch}'."
- ;;
- esac
-
- # Common options
-
- myconf_gn+=(
- # Disable code formating of generated files
- "blink_enable_generated_code_formatting=false"
- # enable DCHECK with USE=debug only, increases chrome binary size by 30%, bug #811138.
- # DCHECK is fatal by default, make it configurable at runtime, #bug 807881.
- "dcheck_always_on=$(usex debug true false)"
- "dcheck_is_configurable=$(usex debug true false)"
- # Chromium builds provided by Linux distros should disable the testing config
- "disable_fieldtrial_testing_config=true"
- # Custom patch: Enable building Chromium as individual channels (e.g. stable, beta, dev) that
- # use different profile directories, desktop entries, etc. This enables slotting the ebuild.
- "enable_channel_branding=true"
- # 131 began laying the groundwork for replacing freetype with
- # "Rust-based Fontations set of libraries plus Skia path rendering"
- # We now need to opt-in
- "enable_freetype=true"
- "enable_hangout_services_extension=$(usex hangouts true false)"
- # Don't need nocompile checks and GN crashes with our config (verify with modern GN)
- "enable_nocompile_tests=false"
- # pseudolocales are only used for testing
- "enable_pseudolocales=false"
- "enable_widevine=$(usex widevine true false)"
- # Disable fatal linker warnings, bug 506268.
- "fatal_linker_warnings=false"
- # Component build isn't generally intended for use by end users. It's mostly useful
- # for development and debugging.
- "is_component_build=false"
- # GN needs explicit config for Debug/Release as opposed to inferring it from build directory.
- "is_debug=false"
- "is_official_build=$(usex official true false)"
- # Enable ozone wayland and/or headless support
- "ozone_auto_platforms=false"
- "ozone_platform_headless=true"
- # Enables building without non-free unRAR licence
- "safe_browsing_use_unrar=false"
- # "thin_lto_enable_optimizations=${use_lto}"
- "treat_warnings_as_errors=false"
- # Use in-tree libc++ (buildtools/third_party/libc++ and buildtools/third_party/libc++abi)
- # instead of the system C++ library for C++ standard library support.
- # default: true, but let's be explicit (forced since 120 ; USE removed 127).
- "use_custom_libcxx=true"
- # Enable ozone wayland and/or headless support
- "use_ozone=true"
- # The sysroot is the oldest debian image that chromium supports, we don't need it
- "use_sysroot=false"
- # See dependency logic in third_party/BUILD.gn
- "use_system_harfbuzz=$(usex system-harfbuzz true false)"
- # "use_thin_lto=${use_lto}"
- # Only enabled for clang, but gcc has endian macros too
- "v8_use_libm_trig_functions=true"
- )
-
- myconf_gn+=( "enable_iterator_debugging=$(usex debug true false)" )
-
- if use debug; then
- myconf_gn+=(
- "symbol_level=2"
- "blink_symbol_level=2"
- "v8_symbol_level=2"
- )
- else
- myconf_gn+=(
- "symbol_level=0"
- "blink_symbol_level=0"
- "v8_symbol_level=0"
- )
- fi
-
- if use bindist ; then
- myconf_gn+=(
- # If this is set to false Chromium won't be able to load any proprietary codecs
- # even if provided with an ffmpeg capable of h264/aac decoding
- "proprietary_codecs=true"
- 'ffmpeg_branding="Chrome"'
- # build ffmpeg as an external component (libffmpeg.so) that we can remove / substitute
- "is_component_ffmpeg=true"
- )
- else
- myconf_gn+=(
- "proprietary_codecs=$(usex proprietary-codecs true false)"
- "ffmpeg_branding=\"$(usex proprietary-codecs Chrome Chromium)\""
- )
- fi
-
- if use headless; then
- myconf_gn+=(
- "enable_print_preview=false"
- "enable_remoting=false"
- 'ozone_platform="headless"'
- "rtc_use_pipewire=false"
- "use_alsa=false"
- "use_cups=false"
- "use_gio=false"
- "use_glib=false"
- "use_gtk=false"
- "use_kerberos=false"
- "use_libpci=false"
- "use_pangocairo=false"
- "use_pulseaudio=false"
- "use_qt5=false"
- "use_qt6=false"
- "use_udev=false"
- "use_vaapi=false"
- "use_xkbcommon=false"
- )
- else
- myconf_gn+=(
- "gtk_version=$(usex gtk4 4 3)"
- # link pulseaudio directly (DT_NEEDED) instead of using dlopen.
- # helps with automated detection of ABI mismatches and prevents silent errors.
- "link_pulseaudio=$(usex pulseaudio true false)"
- "ozone_platform_wayland=$(usex wayland true false)"
- "ozone_platform_x11=$(usex X true false)"
- "ozone_platform=\"$(usex wayland wayland x11)\""
- "rtc_use_pipewire=$(usex screencast true false)"
- "use_cups=$(usex cups true false)"
- "use_kerberos=$(usex kerberos true false)"
- "use_pulseaudio=$(usex pulseaudio true false)"
- "use_qt5=false"
- "use_system_libffi=$(usex wayland true false)"
- "use_system_minigbm=true"
- "use_vaapi=$(usex vaapi true false)"
- "use_xkbcommon=true"
- )
- if use qt6; then
- local cbuild_libdir
- cbuild_libdir="$(get_libdir)"
- if tc-is-cross-compiler; then
- # Hack to workaround get_libdir not being able to handle CBUILD, bug #794181
- cbuild_libdir="$($(tc-getBUILD_PKG_CONFIG) --keep-system-libs --libs-only-L libxslt)"
- cbuild_libdir="${cbuild_libdir:2}"
- cbuild_libdir="${cbuild_libdir/% }"
- fi
- myconf_gn+=(
- "use_qt6=true"
- "moc_qt6_path=\"${EPREFIX}/usr/${cbuild_libdir}/qt6/libexec\""
- )
- else
- myconf_gn+=( "use_qt6=false" )
- fi
- fi
-
- # Explicitly disable ICU data file support for system-icu/headless builds.
- if use system-icu || use headless; then
- myconf_gn+=( "icu_use_data_file=false" )
- fi
-
- if use official; then
- # Allow building against system libraries in official builds
- sed -i 's/OFFICIAL_BUILD/GOOGLE_CHROME_BUILD/' \
- tools/generate_shim_headers/generate_shim_headers.py || die
- # Don't add symbols to build
- myconf_gn+=( "symbol_level=0" )
- fi
-
- if use pgo; then
- myconf_gn+=(
- "chrome_pgo_phase=2"
- "v8_enable_builtins_optimization=true"
- )
- else
- myconf_gn+=( "chrome_pgo_phase=0" )
- fi
-
- # Odds and ends
-
- # skipping typecheck is only supported on amd64, bug #876157
- if ! use amd64; then
- myconf_gn+=( "devtools_skip_typecheck=false" )
- fi
-
- # Disable external code space for V8 for ppc64. It is disabled for ppc64
- # by default, but cross-compiling on amd64 enables it again.
- if tc-is-cross-compiler && use ppc64; then
- myconf_gn+=( "v8_enable_external_code_space=false" )
- fi
-
- # This determines whether or not GN uses the bundled libcxx
- if use libcxx; then
- myconf_gn+=( "use_custom_libcxx=true" )
- else
- myconf_gn+=(
- "use_custom_libcxx=false"
- "use_llvm_libatomic=false"
- )
- append-cppflags -U_GLIBCXX_ASSERTIONS #See #318
- fi
-
- myconf_gn+=( "use_bluez=$(usex bluetooth true false)" )
-
- myconf_gn+=( "is_cfi=$(usex cfi true false)" )
-
- if use cfi; then
- myconf_gn+=(
- "use_cfi_icall=true"
- "use_cfi_cast=true"
- )
- fi
-
- myconf_gn+=(
- "optimize_webui=$(usex optimize-webui true false)"
- "use_system_freetype=$(usex system-harfbuzz true false)"
- "use_system_libopenjpeg2=$(usex system-openjpeg true false)"
- "enable_pdf=true"
- "use_system_lcms2=true"
- "enable_print_preview=true"
- "use_thin_lto=$(usex thinlto true false)"
- "thin_lto_enable_optimizations=$(usex optimize-thinlto true false)"
-
- # Ungoogled flags
- "build_with_tflite_lib=false"
- "enable_mdns=false"
- "enable_mse_mpeg2ts_stream_parser=$(usex proprietary-codecs true false)"
- "enable_remoting=false"
- "enable_reporting=false"
- "enable_service_discovery=false"
- "exclude_unwind_tables=true"
- "google_api_key=\"\""
- "google_default_client_id=\"\""
- "google_default_client_secret=\"\""
- "safe_browsing_mode=0"
- "use_official_google_api_keys=false"
- "use_unofficial_version_number=false"
-
- # "enable_swiftshader=false"
-
- # Additional flags
- # "perfetto_use_system_zlib=true"
- # "use_system_zlib=true"
- # "use_system_libjpeg=true"
- # "rtc_build_examples=false"
- # "enable_chromium_prelude=false"
- # "enable_updater=false"
- # "enable_update_notifications=false"
- # "enable_constraints=false"
- # "rtc_rusty_base64=false"
- # "v8_enable_temporal_support=false"
- # "media_use_symphonia=false"
- # "pdf_enable_rust_png=false"
- # "skia_use_libpng_encode=true"
- # "skia_use_libpng_decode=true"
- # "skia_use_rust_png_decode=false"
- # "skia_use_rust_png_encode=false"
- # "enable_jxl_decoder=false"
- )
-
- if use amd64 || use arm64; then
- myconf_gn+=(
- "v8_drumbrake_bounds_checks=true"
- # "v8_enable_drumbrake=true"
- )
- fi
-
- if use thinlto; then
- # We need to change the default value of import-instr-limit in
- # LLVM to limit the text size increase. The default value is
- # 100, and we change it to 30 to reduce the text size increase
- # from 25% to 10%. The performance number of page_cycler is the
- # same on two of the thinLTO configurations, we got 1% slowdown
- # on speedometer when changing import-instr-limit from 100 to 30.
- # append-ldflags "-Wl,-plugin-opt,-import-instr-limit=30"
- sed -i '/import_instr_limit = 5/{s++import_instr_limit = 30+;h};${x;/./{x;q0};x;q1}' \
- build/config/compiler/BUILD.gn || die
-
- append-ldflags "-Wl,--thinlto-jobs=$(makeopts_jobs)"
- fi
-
- # Facilitate deterministic builds (taken from build/config/compiler/BUILD.gn)
- append-cflags -Wno-builtin-macro-redefined
- append-cxxflags -Wno-builtin-macro-redefined
- append-cppflags "-D__DATE__= -D__TIME__= -D__TIMESTAMP__="
-
- local flags
- einfo "Building with the following compiler settings:"
- for flags in C{C,XX} AR NM RANLIB {C,CXX,CPP,LD}FLAGS \
- EXTRA_GN UGC_{SKIP_{PATCHES,SUBSTITUTION},KEEP_BINARIES} ; do
- einfo " ${flags} = \"${!flags}\""
- done
-
- # Since we build from tarballs, we need to set the channel here so that it can be used in the build.
- export CHROME_VERSION_EXTRA="${SLOT}"
-
- einfo "Configuring Chromium ..."
- set -- gn gen --args="${myconf_gn[*]}${EXTRA_GN:+ ${EXTRA_GN}}" out/Release
- echo "$@"
- "$@" || die "Failed to configure Chromium"
-
- # The "if" below should not be executed unless testing
- if [ ! -z "${NODIE}" ]; then
- # List all args
- # gn args --list out/Release
-
- # Quick compiler check
- eninja -C out/Release protoc torque
- fi
-}
-
-src_compile() {
- # Final link uses lots of file descriptors.
- ulimit -n 2048
-
- # Calling this here supports resumption via FEATURES=keepwork
- python_setup
-
- # I hate doing this but upstream Rust have yet to come up with a better solution for
- # us poor packagers. Required for Split LTO units, which are required for CFI.
- export RUSTC_BOOTSTRAP=1
-
- # Don't inherit PYTHONPATH from environment, bug #789021, #812689
- local -x PYTHONPATH=
-
- # Build mksnapshot and pax-mark it.
- if use pax-kernel; then
- local x
- for x in mksnapshot v8_context_snapshot_generator code_cache_generator; do
- if tc-is-cross-compiler; then
- eninja -C out/Release "host/${x}"
- pax-mark m "out/Release/host/${x}"
- else
- eninja -C out/Release "${x}"
- pax-mark m "out/Release/${x}"
- fi
- done
- fi
-
- # Even though ninja autodetects number of CPUs, we respect
- # user's options, for debugging with -j 1 or any other reason.
- eninja -C out/Release chrome chrome_sandbox $(use test && echo "base_unittests")
-
- pax-mark m out/Release/chrome
-
- # This codepath does minimal patching, so we're at the mercy of upstream
- # CFLAGS. This is fine - we're not intending to force this on users
- # and we do a lot of flag 'management' anyway.
- if use bundled-toolchain; then
- QA_FLAGS_IGNORED="
- usr/lib64/chromium-browser/chrome
- usr/lib64/chromium-browser/chrome-sandbox
- usr/lib64/chromium-browser/chromedriver
- usr/lib64/chromium-browser/chrome_crashpad_handler
- usr/lib64/chromium-browser/libEGL.so
- usr/lib64/chromium-browser/libGLESv2.so
- usr/lib64/chromium-browser/libVkICD_mock_icd.so
- usr/lib64/chromium-browser/libVkLayer_khronos_validation.so
- usr/lib64/chromium-browser/libqt6_shim.so
- usr/lib64/chromium-browser/libvk_swiftshader.so
- usr/lib64/chromium-browser/libvulkan.so.1
- "
- fi
-
- use convert-dict && eninja -C out/Release convert_dict
-
- use enable-driver && eninja -C out/Release chromedriver
- #use suid && eninja -C out/Release chrome_sandbox
-
- use enable-driver && mv out/Release/chromedriver{.unstripped,}
-
- rm -f out/Release/locales/*.pak.info || die
-
- # Generate support files (desktop file, manpage, etc.) See: #684550 #706786 #968958
- ${EPYTHON} "${FILESDIR}/generate-support-files.py" \
- --installdir "/usr/$(get_libdir)/ungoogled-chromium-browser" \
- --channel "${SLOT}" ||
- die "Failed to generate support files"
-}
-
-src_test() {
- # Tests may be flaky with usersandbox, and the test runner executes significantly faster without.
- # If you seem to be excluding too many tests for a particular milestone: comment them out, reboot, and
- # run the tests again. If that doesn't help, try FEATURES="-usersandbox" and send it because obviously the
- # chromium gods are not smiling upon you today. Do some runtime testing, obvs.
- local skip_tests=(
- # Wildcard exclusions (if all tests in a test suite are broken)
- 'AlternateTestParams/PartitionAllocDeathTest.RepeatedAllocReturnNullDirect/*'
- 'AlternateTestParams/PartitionAllocDeathTest.RepeatedReallocReturnNullDirect/*'
- 'AlternateTestParams/PartitionAllocTest.*' # 200+ tests, >= 1 crashes entire test runner with usersandbox.
- 'CheckExitCodeAfterSignalHandlerDeathTest.*'
- 'CriticalProcessAndThreadSpotChecks/HangWatcherAnyCriticalThreadTests.*'
- 'LazyThreadPoolTaskRunnerEnvironmentTest.*' # M142
- 'ToolsSanityTest.BadVirtualCall*'
- # requires en-us locale
- SysStrings.SysNativeMBAndWide
- SysStrings.SysNativeMBToWide
- SysStrings.SysWideToNativeMB
- # Specific test cases
- CancelableEventTest.BothCancelFailureAndSucceedOccurUnderContention
- FilePathTest.FromUTF8Unsafe_And_AsUTF8Unsafe
- HistogramTesterTest.PumaTestUniqueSample
- ImmediateCrashTest.ExpectedOpcodeSequence # M150
- PathServiceTest.CheckedGetFailure
- PlatformThreadTest.CanChangeThreadType
- RawPtrTest.SetLookupUsesGetForComparison # M146 ; also broken for alpine in M144.
- RustLogIntegrationTest.CheckAllSeverity
- StackCanary.ChangingStackCanaryCrashesOnReturn
- StackTraceDeathTest.StackDumpSignalHandlerIsMallocFree
- TestLauncherTools.TruncateSnippetFocusedMatchesFatalMessagesTest
- ThreadPoolEnvironmentConfig.CanUseBackgroundPriorityForWorker
- )
- local test_filter="-$(IFS=:; printf '%s' "${skip_tests[*]}")"
- # test-launcher-bot-mode enables parallelism and plain output
- # Check individual tests with --gtest_filter=<test you want> --single-process-tests
- ./out/Release/base_unittests --test-launcher-bot-mode \
- --test-launcher-jobs="$(get_makeopts_jobs)" \
- --gtest_filter="${test_filter}" || die "Tests failed!"
-}
-
-src_install() {
- local browser_suffix
- if [[ "${SLOT}" != "stable" ]]; then
- browser_suffix="-${SLOT}"
- else
- browser_suffix=""
- fi
- local CHROMIUM_HOME="/usr/$(get_libdir)/ungoogled-chromium-browser${browser_suffix}"
- exeinto "${CHROMIUM_HOME}"
- doexe out/Release/chrome
-
- #newexe out/Release/chrome_sandbox chrome-sandbox
- #fperms 4755 "${CHROMIUM_HOME}/chrome-sandbox"
-
- use enable-driver && doexe out/Release/chromedriver
-
- #* https://github.com/ungoogled-software/ungoogled-chromium/pull/3563
- doexe out/Release/chrome_crashpad_handler
-
- if use convert-dict; then
- newexe "${FILESDIR}/update-dicts.sh" update-dicts.sh
- doexe out/Release/convert_dict
- fi
-
- ozone_auto_session () {
- use X && use wayland && ! use headless && echo true || echo false
- }
-
- cat <<- EOF > "${D}${CHROMIUM_HOME}/chromium-launcher.sh" || die
- #!/bin/bash
- # Wrapper to launch slotted Chromium via the chromium-common launcher script.
- export CHROME_DESKTOP="ungoogled-chromium-browser${browser_suffix}.desktop"
- export CHROME_EXEC_NAME="ungoogled-chromium-browser${browser_suffix}"
- export CHROME_VERSION_EXTRA="${SLOT}"
- export CHROME_WRAPPER="\$(readlink -f "\$0")"
- export OZONE_AUTO_SESSION=$(ozone_auto_session)
-
- exec /usr/libexec/chromium/chromium-launcher.sh "\$@"
- EOF
-
- chmod 755 "${D}${CHROMIUM_HOME}/chromium-launcher.sh" || die
-
- # It is important that we name the target "chromium-browser",
- # xdg-utils expect it; bug #355517.
- dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/ungoogled-chromium-browser${browser_suffix}
- # keep the old symlink around for consistency
- dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/ungoogled-chromium${browser_suffix}
-
- use enable-driver && dosym "${CHROMIUM_HOME}/chromedriver" /usr/bin/ungoogled-chromedriver${browser_suffix}
-
- pushd out/Release/locales > /dev/null || die
- chromium_remove_language_paks
- popd > /dev/null || die
-
- insinto "${CHROMIUM_HOME}"
- doins out/Release/*.bin
- doins out/Release/*.pak
- doins -r out/Release/hyphen-data
-
- if use bindist; then
- # We built libffmpeg as a component library, but we can't distribute it
- # with proprietary codec support. Remove it and make a symlink to the requested
- # system library.
- rm -f out/Release/libffmpeg.so \
- || die "Failed to remove bundled libffmpeg.so (with proprietary codecs)"
- # symlink the libffmpeg.so from either ffmpeg-chromium or ffmpeg[chromium].
- einfo "Creating symlink to libffmpeg.so from $(usex ffmpeg-chromium ffmpeg-chromium ffmpeg[chromium])..."
- dosym ../chromium/libffmpeg.so$(usex ffmpeg-chromium .${PV%%\.*} "") \
- /usr/$(get_libdir)/ungoogled-chromium-browser/libffmpeg.so
- fi
-
- (
- shopt -s nullglob
- local files=(out/Release/*.so out/Release/*.so.[0-9])
- [[ ${#files[@]} -gt 0 ]] && doins "${files[@]}"
- )
-
- if ! use system-icu && ! use headless; then
- doins out/Release/icudtl.dat
- fi
-
- doins -r out/Release/locales
- #doins -r out/Release/MEIPreload
-
- # Install vk_swiftshader_icd.json; bug #827861
- doins out/Release/vk_swiftshader_icd.json
-
- if [[ -d out/Release/swiftshader ]]; then
- insinto "${CHROMIUM_HOME}/swiftshader"
- doins out/Release/swiftshader/*.so
- fi
-
- use widevine && dosym WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so "${CHROMIUM_HOME}/libwidevinecdm.so"
-
- # Install icons
- local branding size
- for size in 16 24 32 48 64 128 256 ; do
- case ${size} in
- 16|32) branding="chrome/app/theme/default_100_percent/chromium" ;;
- *) branding="chrome/app/theme/chromium" ;;
- esac
- newicon -s ${size} "${branding}/product_logo_${size}.png" \
- ungoogled-chromium-browser${browser_suffix}.png
- done
-
- # Install desktop entry
- domenu out/Release/ungoogled-chromium-browser${browser_suffix}.desktop
-
- # Install GNOME default application entry (bug #303100).
- insinto /usr/share/gnome-control-center/default-apps
- doins out/Release/ungoogled-chromium-browser${browser_suffix}.xml
-
- # Install AppStream metadata
- insinto /usr/share/appdata
- doins out/Release/ungoogled-chromium-browser${browser_suffix}.appdata.xml
-
- # Install manpage; bug #684550
- doman out/Release/ungoogled-chromium-browser${browser_suffix}.1
- dosym ungoogled-chromium-browser${browser_suffix}.1 /usr/share/man/man1/ungoogled-chromium${browser_suffix}.1
-
- readme.gentoo_create_doc
-}
-
-pkg_postrm() {
- xdg_icon_cache_update
- xdg_desktop_database_update
-}
-
-pkg_postinst() {
- xdg_icon_cache_update
- xdg_desktop_database_update
- readme.gentoo_print_elog
-
- if use !headless && [[ -z "${REPLACING_VERSIONS}" ]]; then
- if use vaapi; then
- elog "Hardware-accelerated video decoding configuration:"
- elog
- elog "Chromium supports multiple backends for hardware acceleration. To enable one,"
- elog " Add to CHROMIUM_FLAGS in /etc/chromium/default:"
- elog
- elog "1. VA-API with OpenGL (recommended for most users):"
- elog " --enable-features=AcceleratedVideoDecodeLinuxGL"
- elog " VaapiVideoDecoder may need to be added as well, but try without first."
- elog
- if use wayland; then
- elog "2. Enhanced Wayland/EGL performance:"
- elog " --enable-features=AcceleratedVideoDecodeLinuxGL,AcceleratedVideoDecodeLinuxZeroCopyGL"
- elog
- fi
- if use X; then
- elog "$(usex wayland "3" "2"). VA-API with Vulkan:"
- elog " --enable-features=VaapiVideoDecoder,VaapiIgnoreDriverChecks,Vulkan,DefaultANGLEVulkan,VulkanFromANGLE"
- elog
- if use wayland; then
- elog " NOTE: Vulkan acceleration requires X11 and will not work under Wayland sessions."
- elog " Use OpenGL-based acceleration instead when running under Wayland."
- elog
- fi
- fi
- elog "Additional options:"
- elog " To enable hardware-accelerated encoding (if supported)"
- elog " add 'AcceleratedVideoEncoder' to your feature list"
- elog " VaapiIgnoreDriverChecks bypasses driver compatibility checks"
- elog " (may be needed for newer/unsupported hardware)"
- elog
- else
- elog "This Chromium build was compiled without VA-API support, which provides"
- elog "hardware-accelerated video decoding."
- fi
- if use screencast; then
- elog "Screencast is disabled by default at runtime. Either enable it"
- elog "by navigating to chrome://flags/#enable-webrtc-pipewire-capturer"
- elog "inside Chromium or add --enable-features=WebRTCPipeWireCapturer"
- elog "to CHROMIUM_FLAGS in /etc/chromium/default."
- elog
- elog "Additional setup may be required for screencasting to work."
- elog "See issue: https://github.com/PF4Public/gentoo-overlay/issues/314"
- fi
- if use gtk4; then
- elog "Chromium prefers GTK3 over GTK4 at runtime. To override this"
- elog "behaviour you need to pass --gtk-version=4, e.g. by adding it"
- elog "to CHROMIUM_FLAGS in /etc/chromium/default."
- fi
- if use widevine; then
- elog "widevine requires binary plugins, which are distributed separately"
- elog "Make sure you have www-plugins/chrome-binary-plugins installed"
- fi
- fi
-
- if systemd_is_booted && ! [[ -f "/etc/machine-id" ]]; then
- ewarn "The lack of an '/etc/machine-id' file on this system booted with systemd"
- ewarn "indicates that the Gentoo handbook was not followed to completion."
- ewarn ""
- ewarn "Chromium is known to behave unpredictably with this system configuration;"
- ewarn "please complete the configuration of this system before logging any bugs."
- fi
-
- # Stable slot doesn't change profile directory, and it's vanishingly unlikely that users will downgrade from dev.
- if [[ -n "${REPLACING_VERSIONS}" ]]; then
- local replacing_non_slotted=false
- # there could be more than one PVR
- for version in ${REPLACING_VERSIONS}; do
- if ver_test "${version}" -le "145.0.7632.116"; then
- replacing_non_slotted=true
- break
- fi
- done
- if ${replacing_non_slotted}; then
- ewarn "This version of Chromium has replaced a non-slotted ebuild."
- if [[ ${SLOT} != "stable" ]]; then
- ewarn "This channel has its own profile directory, so your existing profile will not be used."
- ewarn "To use your existing profile, either copy or move it to the new location."
- ewarn "See https://wiki.gentoo.org/wiki/Chromium#Profile_Directories for more information."
- ewarn ""
- fi
- ewarn "Any existing Progressive Web Apps (PWAs) will need to be reinstalled,"
- ewarn "or have the path in the desktop files updated to point to the new wrapper script."
- fi
- fi
-}
-
-eapply_wrapper () {
- if [ ! -z "${NODIE}" ]; then
- nonfatal eapply "$@"
- else
- eapply "$@"
- fi
-}
-
-git_wrapper () {
- if [ ! -z "${NODIE}" ]; then
- git "$@"
- else
- git "$@" || die
- fi
-}
-
-filter_wrapper () {
- einfo "Applying ${i##*/}"
- #? fuzz factor of 3 is OK?
- if [ ! -z "${NODIE}" ]; then
- filterdiff -p1 "${@:2}" < "$1" | patch -F 3 -p1
- else
- filterdiff -p1 "${@:2}" < "$1" | patch -F 3 -p1 || die
- fi
-}
diff --git a/www-client/ungoogled-chromium/ungoogled-chromium-150.0.7871.124_p1.ebuild b/www-client/ungoogled-chromium/ungoogled-chromium-150.0.7871.124_p1.ebuild
deleted file mode 100644
index c2e8105041be..000000000000
--- a/www-client/ungoogled-chromium/ungoogled-chromium-150.0.7871.124_p1.ebuild
+++ /dev/null
@@ -1,2528 +0,0 @@
-# Copyright 2009-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-# Use following environment variables to customise the build
-# EXTRA_GN — pass extra options to gn
-# NINJAOPTS="-k0 -j8" useful to populate ccache even if ebuild is still failing
-# UGC_SKIP_PATCHES — space-separated list of patches to skip
-# UGC_KEEP_BINARIES — space-separated list of binaries to keep
-# UGC_SKIP_SUBSTITUTION — space-separated list of files to skip domain substitution
-
-# USE=bundled-toolchain is intended for users who want to use the same toolchain
-# as the upstream releases. It's also a good fallback in case we fall behind
-# and need to get a release out quickly (less likely with `dev` in-tree).
-# We can't rely on it as a default since the toolchain is only shipped for x86-64;
-# other architectures will need to use system toolchain.
-
-# Since m133 we are using CI-generated tarballs from
-# https://github.com/chromium-linux-tarballs/chromium-tarballs/
-
-# These are bit-for-bit identical to the official releases, but are built
-# using an external CI system that we have some control over, in case
-# issues pop up again with official tarball generation.
-
-GN_MIN_VER=0.2374
-# chromium-tools/get-chromium-toolchain-strings.py (or just use Chromicler)
-# Node for M145+ should be 24.12.0 but that's not packaged in Gentoo yet. See #969145
-TEST_FONT="9c07d19d9c5ee1ff94f717e6fb17e0c8c354e6f9"
-BUNDLED_CLANG_VER="llvmorg-23-init-10931-g20b6ec66-11"
-BUNDLED_RUST_VER="4c4205163abcbd08948b3efab796c543ba1ea687-5"
-RUST_SHORT_HASH=${BUNDLED_RUST_VER:0:10}-${BUNDLED_RUST_VER##*-}
-NODE_VER="24.16.0-r1"
-ESBUILD_VER="0.25.1"
-ROLLUP_VER="4.57.1" # currently manual.
-
-CHROMIUM_LANGS="af am ar as az be bg bn bs ca cs cy da de el en-GB es es-419 et eu fa fi fil
- fr fr-CA gl gu he hi hr hu hy id is it ja ka kk km kn ko ky lo lt lv mk ml mn mr ms my
- nb ne nl or pa pl pt-BR pt-PT ro ru si sk sl sq sr sr-Latn sv sw ta te th tr uk ur uz
- vi zh-CN zh-HK zh-TW zu"
-
-#UGC_COMMIT_ID="3a1e4997f632b1e32552adb39f0e2007bd78b3a3"
-# UGC_PR_COMMITS=(
-# c917e096342e5b90eeea91ab1f8516447c8756cf
-# 5794e9d12bf82620d5f24505798fecb45ca5a22d
-# )
-
-CROMITE_COMMIT_ID="cb3baf14f52eb4365d017f640f85310735c19b79"
-
-declare -A CHROMIUM_COMMITS=(
-# ["fcfb1a42813f1e9d8babedc7bb2e0f06101a3151"]="." #148+
- ["-cf94ed446320d35c8613ed9b3ffb6e6a61bfcb5f"]="."
-# # ["-37c28a19804e47a68eabf3cf882a310689fc325b"]="." #disable style check for cromite
-# # ["cd5a0df905a28faa89ff2a4ab44f893f84dc4487"]="net/third_party/quiche/src"
-)
-
-LLVM_COMPAT=( 21 22 23 )
-PYTHON_COMPAT=( python3_{13..14} )
-PYTHON_REQ_USE="xml(+)"
-RUST_MIN_VER=1.91.0
-RUST_NEEDS_LLVM="yes please"
-RUST_OPTIONAL="yes" # Not actually optional, but we don't need system Rust (or LLVM) with USE=bundled-toolchain
-RUST_REQ_USE="rustfmt" # Upstream run rustfmt on bindgen output, so we need it to be available.
-
-inherit check-reqs chromium-2 desktop flag-o-matic llvm-r1 multiprocessing ninja-utils pax-utils
-inherit python-any-r1 readme.gentoo-r1 rust systemd toolchain-funcs xdg-utils
-
-DESCRIPTION="Modifications to Chromium for removing Google integration and enhancing privacy"
-HOMEPAGE="https://github.com/ungoogled-software/ungoogled-chromium"
-PPC64_HASH="a85b64f07b489b8c6fdb13ecf79c16c56c560fc6"
-PATCH_V="${PV%%\.*}-1"
-COPIUM_COMMIT="b00f26bb5e0781020da5f830981472a142c6baf1"
-SRC_URI="https://github.com/chromium-linux-tarballs/chromium-tarballs/releases/download/${PV/_*}/chromium-${PV/_*}-linux.tar.xz
- https://deps.gentoo.zip/www-client/chromium/rollup-wasm-node-${ROLLUP_VER}.tgz
- https://gitlab.com/Matt.Jolly/chromium-patches/-/archive/${PATCH_V}/chromium-patches-${PATCH_V}.tar.bz2
- !bundled-toolchain? (
- https://codeberg.org/selfisekai/copium/archive/${COPIUM_COMMIT}.tar.gz
- -> chromium-patches-copium-${COPIUM_COMMIT:0:10}.tar.gz
- )
- bundled-toolchain? (
- https://commondatastorage.googleapis.com/chromium-browser-clang/Linux_x64/clang-${BUNDLED_CLANG_VER}.tar.xz
- -> chromium-clang-${BUNDLED_CLANG_VER}.tar.xz
- https://commondatastorage.googleapis.com/chromium-browser-clang/Linux_x64/rust-toolchain-${BUNDLED_RUST_VER}-${BUNDLED_CLANG_VER%-*}.tar.xz
- -> chromium-rust-toolchain-${RUST_SHORT_HASH}-${BUNDLED_CLANG_VER%-*}.tar.xz
- )
- test? (
- https://chromium-fonts.storage.googleapis.com/${TEST_FONT} -> chromium-testfonts-${TEST_FONT:0:10}.tar.gz
- )
- ppc64? (
- https://gitlab.raptorengineering.com/raptor-engineering-public/chromium/openpower-patches/-/archive/${PPC64_HASH}/openpower-patches-${PPC64_HASH}.tar.bz2 -> chromium-openpower-${PPC64_HASH:0:10}.tar.bz2
- )
-"
-
-# Gentoo tarball:
-# https://chromium-tarballs.distfiles.gentoo.org/chromium-${PV/_*}.tar.xz -> chromium-${PV/_*}-gentoo.tar.xz
-
-# chromium-linux-tarballs
-# https://github.com/chromium-linux-tarballs/chromium-tarballs/releases/download/${PV/_*}/chromium-${PV/_*}-linux.tar.xz
-
-# Official tarball:
-# https://commondatastorage.googleapis.com/chromium-browser-official/chromium-${PV/_*}${LITE_TARBALL:+-lite}.tar.xz
-
-# https://gitweb.gentoo.org/proj/chromium-tools.git/tree/get-chromium-licences.py @ 145.0.7632.76
-LICENSE="Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD BSD-2 Base64 Boost-1.0 CC-BY-3.0 CC-BY-4.0 Clear-BSD FFT2D FTL"
-LICENSE+=" IJG ISC LGPL-2 LGPL-2.1 MIT MPL-1.1 MPL-2.0 Ms-PL PSF-2 SGI-B-2.0 SSLeay SunSoft Unicode-3.0"
-LICENSE+=" Unicode-DFS-2015 Unlicense UoI-NCSA ZLIB libtiff openssl"
-LICENSE+=" cromite? ( GPL-3 )"
-
-SLOT="stable"
-KEYWORDS="amd64 ~arm64 ~ppc64 ~x86"
-
-IUSE_SYSTEM_LIBS="abseil-cpp av1 brotli crc32c double-conversion ffmpeg +harfbuzz icu jsoncpp +libusb libvpx +openh264 openjpeg re2 snappy woff2 +zstd"
-IUSE="+X bindist bluetooth bundled-toolchain cfi convert-dict cups custom-cflags debug ffmpeg-chromium enable-driver gtk4 hangouts headless kerberos +libcxx nvidia +official optimize-thinlto optimize-webui override-data-dir pax-kernel pgo"
-IUSE+=" +proprietary-codecs pulseaudio qt6 screencast selinux test thinlto cromite vaapi wayland widevine cpu_flags_ppc_vsx3"
-RESTRICT="
- !bindist? ( bindist )
- !test? ( test )
- arm64? ( test )
- !system-ffmpeg? ( proprietary-codecs? ( bindist ) )
- !system-openh264? ( bindist )
- cromite? ( bindist )"
-
-REQUIRED_USE="
- !headless? ( || ( X wayland ) )
- screencast? ( wayland )
- ffmpeg-chromium? ( bindist proprietary-codecs )
- optimize-thinlto? ( thinlto )
- cfi? ( thinlto )
- x86? ( !thinlto !widevine )
- debug? ( !official )
- vaapi? ( !system-av1 !system-libvpx )
-"
-
-UGC_PV="${PV/_p/-}"
-UGC_PF="${PN}-${UGC_PV}"
-UGC_URL="https://github.com/ungoogled-software/${PN}/archive/"
-
-if [ -z "$UGC_COMMIT_ID" ]; then
- UGC_URL="${UGC_URL}${UGC_PV}.tar.gz -> ${UGC_PF}.tar.gz"
- UGC_WD="${WORKDIR}/${UGC_PF}"
-else
- UGC_URL="${UGC_URL}${UGC_COMMIT_ID}.tar.gz -> ${PN}-${UGC_COMMIT_ID}.tar.gz"
- UGC_WD="${WORKDIR}/ungoogled-chromium-${UGC_COMMIT_ID}"
-fi
-
-SRC_URI+="${UGC_URL}
-"
-
-if [ ! -z "${UGC_PR_COMMITS[*]}" ]; then
- for i in "${UGC_PR_COMMITS[@]}"; do
- SRC_URI+="https://github.com/ungoogled-software/${PN}/commit/$i.patch?full_index=true -> ${PN}-$i.patch
- "
- done
-fi
-
-if [ ! -z "${CHROMIUM_COMMITS[*]}" ]; then
- # for i in "${CHROMIUM_COMMITS[@]}"; do
- for i in "${!CHROMIUM_COMMITS[@]}"; do
- if [[ ${CHROMIUM_COMMITS[$i]} =~ webrtc ]]; then
- #TODO: is it safe to use this mirror?
- SRC_URI+="https://github.com/webrtc-mirror/webrtc/commit/${i/-}.patch?full_index=true -> webrtc-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ angle ]]; then
- SRC_URI+="https://github.com/google/angle/commit/${i/-}.patch?full_index=true -> angle-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ quiche ]]; then
- SRC_URI+="https://github.com/google/quiche/commit/${i/-}.patch?full_index=true -> quiche-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ dawn ]]; then
- SRC_URI+="https://github.com/google/dawn/commit/${i/-}.patch?full_index=true -> dawn-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ perfetto ]]; then
- SRC_URI+="https://github.com/google/perfetto/commit/${i/-}.patch?full_index=true -> perfetto-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ink ]]; then
- SRC_URI+="https://github.com/google/ink/commit/${i/-}.patch?full_index=true -> ink-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ vulkan-utility-libraries ]]; then
- SRC_URI+="https://github.com/KhronosGroup/Vulkan-Utility-Libraries/commit/${i/-}.patch?full_index=true -> vulkan-utility-libraries-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ruy ]]; then
- SRC_URI+="https://github.com/google/ruy/commit/${i/-}.patch?full_index=true -> ruy-${i/-}.patch
- "
- else
- SRC_URI+="https://github.com/chromium/chromium/commit/${i/-}.patch?full_index=true -> chromium-${i/-}.patch
- "
- fi
- done
-fi
-
-SRC_URI+="cromite? ( https://github.com/uazo/cromite/archive/${CROMITE_COMMIT_ID}.tar.gz -> cromite-${CROMITE_COMMIT_ID}.tar.gz )
-"
-
-for i in ${IUSE_SYSTEM_LIBS}; do
- [[ $i =~ ^(\+)?(.*)$ ]]
- IUSE+=" ${BASH_REMATCH[1]}system-${BASH_REMATCH[2]}"
-done
-
-COMMON_X_DEPEND="
- x11-libs/libXcomposite:=
- x11-libs/libXcursor:=
- x11-libs/libXdamage:=
- x11-libs/libXfixes:=
- >=x11-libs/libXi-1.6.0:=
- x11-libs/libXrandr:=
- x11-libs/libXrender:=
- x11-libs/libXtst:=
- x11-libs/libxshmfence:=
-"
-
-# sys-libs/zlib: https://bugs.gentoo.org/930365; -ng is not compatible.
-# We _could_ use the bundled minizip, but that's against policy.
-COMMON_SNAPSHOT_DEPEND="
- system-icu? ( >=dev-libs/icu-78:= )
- system-abseil-cpp? ( >=dev-cpp/abseil-cpp-20260107.0 )
- system-brotli? ( >=app-arch/brotli-9999 )
- system-crc32c? ( dev-libs/crc32c )
- system-double-conversion? ( dev-libs/double-conversion )
- system-woff2? ( media-libs/woff2 )
- system-snappy? ( app-arch/snappy )
- system-jsoncpp? ( dev-libs/jsoncpp )
- system-openjpeg? ( media-libs/openjpeg:2= )
- system-re2? ( >=dev-libs/re2-0.2019.08.01:= )
- system-libvpx? ( >=media-libs/libvpx-1.13.0:=[postproc] )
- system-libusb? ( virtual/libusb:1 )
- cromite? ( dev-util/patchutils )
- >=dev-libs/libxml2-2.12.4:=[icu]
- dev-libs/nspr:=
- >=dev-libs/nss-3.26:=
- dev-libs/libxslt:=
- media-libs/fontconfig:=
- >=media-libs/freetype-2.11.0-r1:=
- system-harfbuzz? ( >=media-libs/harfbuzz-3:0=[icu(-)] )
- media-libs/libjpeg-turbo:=
- media-libs/libpng:=
- system-zstd? ( >=app-arch/zstd-1.5.5:= )
- >=media-libs/libwebp-0.4.0:=
- media-libs/mesa:=[gbm(+)]
- >=media-libs/openh264-2.6.0:=
- system-av1? (
- >=media-libs/dav1d-1.0.0:=
- >=media-libs/libaom-3.7.0:=
- )
- sys-libs/zlib:=
- !headless? (
- dev-libs/glib:2
- >=media-libs/alsa-lib-1.0.19:=
- media-video/pipewire:=
- pulseaudio? (
- || (
- media-libs/libpulse
- >=media-sound/apulse-0.1.9
- )
- )
- sys-apps/pciutils:=
- kerberos? ( virtual/krb5 )
- vaapi? ( >=media-libs/libva-2.7:=[X?,wayland?] )
- X? (
- x11-base/xorg-proto:=
- x11-libs/libX11:=
- x11-libs/libxcb:=
- x11-libs/libXext:=
- )
- x11-libs/libxkbcommon:=
- wayland? (
- screencast? ( media-video/pipewire:= )
- dev-libs/libffi:=
- dev-libs/wayland:=
- screencast? (
- media-video/pipewire:=
- || (
- sys-apps/xdg-desktop-portal-gnome
- sys-apps/xdg-desktop-portal-gtk
- kde-plasma/xdg-desktop-portal-kde
- gui-libs/xdg-desktop-portal-lxqt
- gui-libs/xdg-desktop-portal-wlr
- )
- )
- )
- )
-"
-
-COMMON_DEPEND="
- ${COMMON_SNAPSHOT_DEPEND}
- app-arch/bzip2:=
- dev-libs/expat:=
- system-ffmpeg? (
- >=media-video/ffmpeg-6.1:=
- >=media-libs/opus-1.3.1:=
- )
- net-misc/curl[ssl]
- sys-apps/dbus:=
- media-libs/flac:=
- sys-libs/zlib:=[minizip]
- !headless? (
- >=app-accessibility/at-spi2-core-2.46.0:2
- media-libs/mesa:=[X?,wayland?]
- virtual/udev
- x11-libs/cairo:=
- x11-libs/gdk-pixbuf:2
- x11-libs/pango:=
- cups? ( >=net-print/cups-1.3.11:= )
- qt6? ( dev-qt/qtbase:6[gui,widgets] )
- X? ( ${COMMON_X_DEPEND} )
- )
-"
-RDEPEND="${COMMON_DEPEND}
- !www-client/ungoogled-chromium:0
- >=www-client/chromium-common-2
- !headless? (
- || (
- x11-libs/gtk+:3[X?,wayland?]
- gui-libs/gtk:4[X?,wayland?]
- )
- qt6? ( dev-qt/qtbase:6[X?,wayland?] )
- )
- virtual/ttf-fonts
- selinux? ( sec-policy/selinux-chromium )
- bindist? (
- ffmpeg-chromium? ( media-video/ffmpeg-chromium:${PV%%\.*} )
- )
- !override-data-dir? (
- !www-client/chromium:${SLOT}
- !www-client/cromite:${SLOT}[-override-data-dir]
- )
-"
-# For M149+ pipewire is a mandatory build-time dependency, but it's optional at runtime for most configurations.
-DEPEND="${COMMON_DEPEND}
- !headless? (
- media-video/pipewire
- gtk4? ( gui-libs/gtk:4[X?,wayland?] )
- !gtk4? ( x11-libs/gtk+:3[X?,wayland?] )
- )
-"
-
- # pgo? ( >=llvm-core/clang-22.0.0_pre20260106 >=llvm-core/lld-22.0.0_pre20260106 )
-BDEPEND="
- ${COMMON_SNAPSHOT_DEPEND}
- ${PYTHON_DEPS}
- $(python_gen_any_dep '
- dev-python/setuptools[${PYTHON_USEDEP}]
- ')
- >=app-arch/gzip-1.7
- !headless? (
- qt6? ( dev-qt/qtbase:6 )
- )
- !bundled-toolchain? ( $(llvm_gen_dep '
- llvm-core/clang:${LLVM_SLOT}
- llvm-core/llvm:${LLVM_SLOT}
- cfi? ( llvm-runtimes/clang-runtime:${LLVM_SLOT}[sanitize] )
- official? (
- !ppc64? ( llvm-runtimes/compiler-rt-sanitizers:${LLVM_SLOT}[cfi] )
- ) ')
- || (
- $(llvm_gen_dep 'llvm-core/lld:${LLVM_SLOT}')
- >=sys-devel/mold-2.41.0
- )
- ${RUST_DEPEND}
- )
- >=dev-util/bindgen-0.72.1
- >=dev-build/gn-${GN_MIN_VER}
- app-alternatives/ninja
- dev-lang/perl
- >=dev-util/gperf-3.2
- dev-util/esbuild:${ESBUILD_VER}
- dev-vcs/git
- >=net-libs/nodejs-${NODE_VER}[inspector]
- sys-apps/hwdata
- >=sys-devel/bison-2.4.3
- sys-devel/flex
- virtual/pkgconfig
- x11-misc/xdg-utils
-"
-
-if ! has chromium_pkg_die ${EBUILD_DEATH_HOOKS}; then
- EBUILD_DEATH_HOOKS+=" chromium_pkg_die";
-fi
-
-DISABLE_AUTOFORMATTING="yes"
-DOC_CONTENTS="
-Some web pages may require additional fonts to display properly.
-Try installing some of the following packages if some characters
-are not displayed properly:
-- media-fonts/arphicfonts
-- media-fonts/droid
-- media-fonts/ipamonafont
-- media-fonts/noto
-- media-fonts/ja-ipafonts
-- media-fonts/takao-fonts
-- media-fonts/wqy-microhei
-- media-fonts/wqy-zenhei
-
-To fix broken icons on the Downloads page, you should install an icon
-theme that covers the appropriate MIME types, and configure this as your
-GTK+ icon theme.
-
-For native file dialogs in KDE, install kde-apps/kdialog.
-
-To make password storage work with your desktop environment you may
-have install one of the supported credentials management applications:
-- app-crypt/libsecret (GNOME)
-- kde-frameworks/kwallet (KDE)
-If you have one of above packages installed, but don't want to use
-them in Chromium, then add --password-store=basic to CHROMIUM_FLAGS
-in /etc/chromium/default.
-"
-
-S="${WORKDIR}/chromium-${PV/_*}"
-
-python_check_deps() {
- python_has_version "dev-python/setuptools[${PYTHON_USEDEP}]"
-}
-
-pre_build_checks() {
- # Check build requirements: bugs #471810, #541816, #914220
- # We're going to start doing maths here on the size of an unpacked source tarball,
- # this should make updates easier as chromium continues to balloon in size.
- # xz -l /var/cache/distfiles/chromium-${PV}*.tar.xz
- local base_disk=9 # Round up
- use test && base_disk=$((base_disk + 5))
- local extra_disk=1 # Always include a little extra space
- local memory=4
- tc-is-cross-compiler && extra_disk=$((extra_disk * 2))
- if tc-is-lto || use pgo; then
- memory=$((memory * 2 + 1))
- tc-is-cross-compiler && extra_disk=$((extra_disk * 2)) # Double the requirements
- use pgo && extra_disk=$((extra_disk + 4))
- fi
- if is-flagq '-g?(gdb)?([1-9])'; then
- if use custom-cflags; then
- extra_disk=$((extra_disk + 5))
- fi
- memory=$((memory * 2))
- fi
- local CHECKREQS_MEMORY="${memory}G"
- local CHECKREQS_DISK_BUILD="$((base_disk + extra_disk))G"
- check-reqs_${EBUILD_PHASE_FUNC}
-}
-
-pkg_pretend() {
- if [[ ${MERGE_TYPE} != binary ]]; then
- # The pre_build_checks are all about compilation resources, no need to run it for a binpkg
- pre_build_checks
- fi
-
- if use headless; then
- local headless_unused_flags=("cups" "kerberos" "pulseaudio" "qt6" "vaapi" "wayland")
- for myiuse in ${headless_unused_flags[@]}; do
- use ${myiuse} && ewarn "Ignoring USE=${myiuse}, USE=headless is set."
- done
- fi
-
- if ! use bindist && use ffmpeg-chromium; then
- ewarn "Ignoring USE=ffmpeg-chromium, USE=bindist is not set."
- fi
- if use libcxx; then
- ewarn
- ewarn "Building with libcxx, please be aware that system-*"
- ewarn "and some other c++ dependencies need to be compiled"
- ewarn "with the same c++ library as ungoogled-chromium itself"
- ewarn "dev-libs/jsoncpp is most problematic, see #58 #49 #119 for details"
- ewarn "Simplest solution would be to disable corresponding system-* flags"
- ewarn
- fi
- if use cfi; then
- ewarn
- ewarn "Building with cfi is only possible if building with -stdlib=libc++"
- ewarn "Make sure all dependencies are also built this way, see #40"
- ewarn
- fi
- if use cromite; then
- ewarn
- ewarn "Cromite patches are very experimental and unstable"
- ewarn "Please consider testing them and giving feedback upstream:"
- ewarn "https://github.com/uazo/cromite/issues"
- ewarn "Not all patches are applied, let me know if others should be considered too"
- ewarn
- fi
-}
-
-pkg_setup() {
- if [[ ${MERGE_TYPE} != binary ]]; then
- # The pre_build_checks are all about compilation resources, no need to run it for a binpkg
- pre_build_checks
-
- # We haven't massaged any CFLAGS yet, so we want to do this before we force CC/CXX to prevent warnings.
- local want_lto="false"
- tc-is-lto && want_lto="true"
-
- # The linux:unbundle toolchain in GN grabs CC, CXX, CPP (etc) from the environment
- # We'll set these to clang here then use llvm-utils functions to very explicitly set these
- # to a sane value.
- # This is effectively the 'force-clang' path if GCC support is re-added.
- if use !bundled-toolchain; then
- llvm-r1_pkg_setup
- rust_pkg_setup
-
- # Forcing clang; respect llvm_slot_x to enable selection of impl via LLVM_COMPAT
- AR=llvm-ar
- CPP="${CHOST}-clang++-${LLVM_SLOT} -E"
- NM=llvm-nm
- CC="${CHOST}-clang-${LLVM_SLOT}"
- CXX="${CHOST}-clang++-${LLVM_SLOT}"
- fi
-
- # LTO in Chromium means LLVM ThinLTO, if GCC support is re-added
- # We'll need to handle that here too.
- use_lto="false"
- local lto_usable="true"
- if [[ "$want_lto" == "true" ]]; then
- if use arm64 && [[ "${LLVM_SLOT}" -lt 22 ]]; then
- einfo "LTO is broken with LLVM 21 on arm64, ignoring CFLAGS."
- lto_usable="false"
- else
- use_lto="true"
- fi
- # We can rely on GN to do this for us; without this builds
- # take significantly longer with LTO enabled.
- filter-lto
- fi
-
- if [[ "$use_lto" == "false" ]] && use official && [[ "$lto_usable" == "true" ]]; then
- einfo "USE=official selected and LTO not detected."
- einfo "It is _highly_ recommended that LTO be enabled for performance reasons"
- einfo "and to be consistent with the upstream \"official\" build optimisations."
- fi
-
- if [[ "$use_lto" == "false" ]] && use test; then
- die "Tests require CFI which requires LTO"
- fi
-
- export use_lto
-
- if tc-is-cross-compiler; then
- use pgo && die "The pgo USE flag cannot be used when cross-compiling"
- CPP="${CBUILD}-clang++-${LLVM_SLOT} -E"
- fi
-
- # Sanity checks for development convenience
- if ver_test $(gn --version || die) -lt ${GN_MIN_VER}; then
- die "dev-build/gn >= ${GN_MIN_VER} is required to build this Chromium"
- fi
-
- # Sometimes, when adding a new LLVM slot, devs (me) forget to install an appropriate lld.
- if tc-ld-is-lld; then
- local lld_ver=$(ld.lld --version | awk '{split($2,a,"."); print a[1]}' || die "Failed to check lld version")
- if [[ ${lld_ver} -lt ${LLVM_SLOT} ]]; then
- die "Your lld version (${lld_ver}) is too old for the selected LLVM slot (${LLVM_SLOT}). Please install a newer lld or select an older LLVM slot."
- fi
- fi
- fi
-
- chromium_suid_sandbox_check_kernel_config
-}
-
-src_unpack() {
- # # Here be dragons!
- # local XCLD="--exclude=chromium-${PV/_*}/third_party/instrumented_libs \
- # --exclude=chromium-${PV/_*}/third_party/llvm \
- # --exclude=chromium-${PV/_*}/third_party/llvm-build \
- # --exclude=chromium-${PV/_*}/third_party/node/linux \
- # --exclude=chromium-${PV/_*}/third_party/rust-src \
- # --exclude=chromium-${PV/_*}/third_party/rust-toolchain \
- # --exclude=chromium-${PV/_*}/build/linux/debian_bullseye_i386-sysroot \
- # --exclude=chromium-${PV/_*}/build/linux/debian_bullseye_amd64-sysroot \
- # --exclude=chromium-${PV/_*}/third_party/angle/third_party/VK-GL-CTS \
- # "
-
- # if ! use libcxx ; then
- # XCLD+=" --exclude=chromium-${PV/_*}/third_party/libc++"
- # fi
-
- # if ! use pgo ; then
- # XCLD+=" --exclude=chromium-${PV/_*}/chrome/build/pgo_profiles"
- # fi
-
- # einfo "Unpacking chromium-${PV/_*}.tar.xz to ${WORKDIR}"
- # # Gentoo tarball:
- # # tar ${XCLD} -xf "${DISTDIR}/chromium-${PV/_*}-gentoo.tar.xz" -C "${WORKDIR}" || die
- # tar ${XCLD} -xf "${DISTDIR}/chromium-${PV/_*}${LITE_TARBALL:+-lite}.tar.xz" -C "${WORKDIR}" || die
-
- # unpack ${UGC_URL#*->}
- # # unpack chromium-patches-${PATCH_V}.tar.bz2
- # # Warned you!
-
- unpack chromium-${PV/_*}-linux.tar.xz
- unpack chromium-patches-${PATCH_V}.tar.bz2
- # These should only be required when we're not using the official toolchain
- if use !bundled-toolchain; then
- unpack chromium-patches-copium-${COPIUM_COMMIT:0:10}.tar.gz
- fi
-
- if use test; then
- # This just contains a bunch of font files that need to be unpacked (or moved) to the correct location.
- local testfonts_dir="${WORKDIR}/chromium-${PV/_*}/third_party/test_fonts/test_fonts"
- local testfonts_tar="${DISTDIR}/chromium-testfonts-${TEST_FONT:0:10}.tar.gz"
- einfo "Unpacking test fonts ..."
- tar xf "${testfonts_tar}" -C "${testfonts_dir}" || die "Failed to unpack testfonts"
- fi
-
- # We need to manually unpack this since M126 else we'd unpack one toolchain over the other.
- # Since we're doing that anyway let's unpack to sensible locations to make symlink creation easier.
- if use bundled-toolchain; then
- einfo "Unpacking bundled Clang ..."
- mkdir -p "${WORKDIR}"/clang || die "Failed to create clang directory"
- tar xf "${DISTDIR}/chromium-clang-${BUNDLED_CLANG_VER}.tar.xz" -C "${WORKDIR}/clang" || die "Failed to unpack Clang"
- einfo "Unpacking bundled Rust ..."
- local rust_dir="${WORKDIR}/rust-toolchain"
- mkdir -p "${rust_dir}" || die "Failed to create rust toolchain directory"
- tar xf "${DISTDIR}/chromium-rust-toolchain-${RUST_SHORT_HASH}-${BUNDLED_CLANG_VER%-*}.tar.xz" -C "${rust_dir}" ||
- die "Failed to unpack Rust"
- fi
-
- if use ppc64; then
- unpack chromium-openpower-${PPC64_HASH:0:10}.tar.bz2
- fi
-
- # This is a dirty hack, but we need rollup to build successfully and it's proving to be challenging
- # to build locally due to deps
- unpack rollup-wasm-node-${ROLLUP_VER}.tgz
-
- if use cromite; then
- unpack cromite-${CROMITE_COMMIT_ID}.tar.gz
- fi
-
- unpack ${UGC_URL#*->}
-}
-
-remove_compiler_builtins() {
- # We can't use the bundled compiler builtins with the system toolchain
- # We used to `grep` then `sed`, but it was indirect. Combining the two into a single
- # `awk` command is more efficient and lets us document the logic more clearly.
-
- local pattern=' configs += [ "//build/config/clang:compiler_builtins" ]'
- local target='build/config/compiler/BUILD.gn'
-
- local tmpfile
- tmpfile=$(mktemp) || die "Failed to create temporary file."
-
- if awk -v pat="${pattern}" '
- BEGIN {
- match_found = 0
- }
-
- # If the delete countdown is active, decrement it and skip to the next line.
- d > 0 { d--; next }
-
- # If the current line matches the pattern...
- $0 == pat {
- match_found = 1 # ...set our flag to true.
- d = 2 # Set delete counter for this line and the next two.
- prev = "" # Clear the buffered previous line so it is not printed.
- next
- }
-
- # For any other line, print the buffered previous line.
- NR > 1 { print prev }
-
- # Buffer the current line to be printed on the next cycle.
- { prev = $0 }
-
- END {
- # Print the last line if it was not part of a deleted block.
- if (d == 0) { print prev }
-
- # If the pattern was never found, exit with a failure code.
- if (match_found == 0) {
- exit 1
- }
- }
- ' "${target}" > "${tmpfile}"; then
- # AWK SUCCEEDED (exit code 0): The pattern was found and edited.
- # This is to avoid gawk's `-i inplace` option which users complain about.
- mv "${tmpfile}" "${target}"
- else
- # AWK FAILED (exit code 1): The pattern was not found.
- rm -f "${tmpfile}"
- die "Awk patch failed: Pattern not found in ${target}."
- fi
-}
-
-src_prepare() {
- # Calling this here supports resumption via FEATURES=keepwork
- python_setup
-
- # We'll fill this in as we go. Patches go in chromium-patches.
- local PATCHES=()
-
- rm "${WORKDIR}/chromium-patches-${PATCH_V}/common/cr131-unbundle-icu-target.patch"
- if ver_test "${RUST_SLOT}" -ge "1.95.0"; then
- rm "${WORKDIR}/chromium-patches-${PATCH_V}/rust/cr146-fix-botched-bytemuck-roll.patch"
- sed -i '/SupportedLaneCount/d' third_party/rust/chromium_crates_io/vendor/bytemuck-v1/src/zeroable.rs || die
- sed -i '/SupportedLaneCount/d' third_party/rust/chromium_crates_io/vendor/bytemuck-v1/src/pod.rs || die
- fi
-
- #cp -f ${WORKDIR}/chromium-patches-${PATCH_V}/*-compiler.patch "${T}/compiler.patch"
- ##cp -f ${FILESDIR}/chromium-147-compiler.patch "${T}/compiler.patch"
- #if ! use custom-cflags; then #See #25 #92
- # sed -i '/default_stack_frames/Q' "${T}/compiler.patch" || die
- #fi
-
- PATCHES+=( "${WORKDIR}/chromium-patches-${PATCH_V}/common/" )
- PATCHES+=( "${FILESDIR}/restore-x86-r4.patch" )
-
- # https://issues.chromium.org/issues/442698344
- # Unreleased fontconfig changed magic numbers and google have rolled to this version
- if has_version "<=media-libs/fontconfig-2.17.1"; then
- PATCHES+=( "${FILESDIR}/chromium-142-work-with-old-fontconfig.patch" )
- fi
-
- if use bundled-toolchain; then
- # We need to symlink the toolchain into the expected location
- einfo "Symlinking Clang toolchain to expected location ..."
- mkdir -p third_party/llvm-build/ || die "Failed to create llvm-build directory"
- # the 'Chromium Linux Tarballs' seem to already have 'Release+Asserts/{lib,bin}'; not sure if this is an
- # upstream change - we're using the same scripts to build, theoretically. We'll still attempt to create
- # llvm-build, but we'll rm Release+Asserts and symlink directly.
- if [[ -d third_party/llvm-build/Release+Asserts ]]; then
- rm -r third_party/llvm-build/Release+Asserts || die "Failed to remove third_party/llvm-build/Release+Asserts"
- fi
- ln -s "${WORKDIR}"/clang third_party/llvm-build/Release+Asserts || die "Failed to bundle Clang"
- einfo "Symlinking Rust toolchain to expected location ..."
- # As above, so below
- if [[ -d third_party/rust-toolchain ]]; then
- rm -r third_party/rust-toolchain || die "Failed to remove third_party/rust-toolchain"
- fi
- ln -s "${WORKDIR}"/rust-toolchain third_party/rust-toolchain || die "Failed to bundle rust"
- cp "${WORKDIR}"/rust-toolchain/VERSION \
- "${WORKDIR}"/rust-toolchain/INSTALLED_VERSION || die "Failed to set rust version"
- else
- # We don't need our toolchain patches if we're using the official toolchain
-
- # Copium patches go here.
- PATCHES+=(
- "${WORKDIR}/copium/cr143-libsync-__BEGIN_DECLS.patch"
- "${WORKDIR}/copium/cr149-unbundle-minizip-undo-unicode.patch"
- )
-
- # Automate conditional application of chromium-patches
- # The directory structure is expected to be something like:
- # chromium-patches-145/
- # ├── toolchain/
- # │ ├── cr123-foo.patch
- # │ └── cr135-bar.patch
- # ├── llvm/
- # │ ├── cr144-baz.patch
- # │ └── lt-23/
- # │ └── cr145-bleeding-edge-llvm-feature.patch
- # Where `lt-23` means "apply this patch if the LLVM version is less than 23".
- # Only categories in `slot_map` will be checked for version constraints.
- shopt -s nullglob
- local -A slot_map=( [llvm]="${LLVM_SLOT}" [rust]="${RUST_SLOT}" )
-
- for category in "${WORKDIR}/chromium-patches-${PATCH_V}"/*/; do
- local category_name="${category%/}"
- category_name="${category_name##*/}"
-
- # Skip arch-specific categories
- if [[ "${category_name}" == "ppc64le" ]]; then
- use ppc64 || continue
- fi
-
- # We applied common patches above, no need to apply them again here
- [[ "${category_name}" == "common" ]] && continue
-
- # Unconditional patches for this category
- local category_patches=( "${category}"*.patch )
- [[ ${#category_patches[@]} -gt 0 ]] && PATCHES+=( "${category}" )
-
- # Version-constrained subdirectories (e.g., llvm/lt-23/)
- for constraint_dir in "${category}"*/; do
- local dir_name="${constraint_dir%/}"
- dir_name="${dir_name##*/}"
- if [[ "${dir_name}" =~ ^lt-(.*)$ && -v slot_map[${category_name}] ]]; then
- ver_test "${slot_map[${category_name}]}" -lt "${BASH_REMATCH[1]}" &&
- PATCHES+=( "${constraint_dir}" )
- fi
- done
- done
-
- shopt -u nullglob
-
- # Strictly speaking this doesn't need to be gated (no bundled toolchain for ppc64); it keeps the logic together
- if use ppc64; then
- local patchset_dir="${WORKDIR}/openpower-patches-${PPC64_HASH}/patches"
- # patch causes build errors on 4K page systems (https://bugs.gentoo.org/show_bug.cgi?id=940304)
- local page_size_patch="ppc64le/third_party/use-sysconf-page-size-on-ppc64.patch"
- local isa_3_patch="ppc64le/core/baseline-isa-3-0.patch"
- # Apply the OpenPOWER patches (check for page size and isa 3.0)
- openpower_patches=( $(grep -E "^ppc64le|^upstream" "${patchset_dir}/series" | grep -v "${page_size_patch}" |
- grep -v "${isa_3_patch}" || die) )
- for patch in "${openpower_patches[@]}"; do
- PATCHES+=( "${patchset_dir}/${patch}" )
- done
- if [[ $(getconf PAGESIZE) == 65536 ]]; then
- PATCHES+=( "${patchset_dir}/${page_size_patch}" )
- fi
- # We use vsx3 as a proxy for 'want isa3.0' (POWER9)
- if use cpu_flags_ppc_vsx3 ; then
- PATCHES+=( "${patchset_dir}/${isa_3_patch}" )
- fi
- fi
-
- remove_compiler_builtins
-
- # We can't rely on the eselect'd Rust to actually include rustfmt, so we'll point to the selected slot specifically.
- local suffix=""
- if [[ "${RUST_TYPE}" == "binary" ]]; then
- suffix="-bin-${RUST_SLOT}"
- else
- suffix="-${RUST_SLOT}"
- fi
- sed -i "s|/bin/rustfmt|/bin/rustfmt${suffix}|g" build/rust/rust_bindgen_generator.gni ||
- die "Failed to update rustfmt path"
-
- fi
-
- # Do this before we apply patches since (e.g.) ppc64 needs to patch rollup and it's easier in ${S}
- einfo "Moving rollup wasm-node package into place ..."
- mkdir -p third_party/devtools-frontend/src/node_modules/@rollup/wasm-node ||
- die "Failed to create node_modules/@rollup/wasm-node"
- mv "${WORKDIR}"/package/* third_party/devtools-frontend/src/node_modules/@rollup/wasm-node ||
- die "Failed to move rollup package"
-
- if [ ! -z "${CHROMIUM_COMMITS[*]}" ]; then
- # for i in "${CHROMIUM_COMMITS[@]}"; do
- for i in "${!CHROMIUM_COMMITS[@]}"; do
- if [[ ${CHROMIUM_COMMITS[$i]} =~ webrtc ]]; then
- patch_prefix="webrtc"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ angle ]]; then
- patch_prefix="angle"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ quiche ]]; then
- patch_prefix="quiche"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ dawn ]]; then
- patch_prefix="dawn"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ perfetto ]]; then
- patch_prefix="perfetto"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ink ]]; then
- patch_prefix="ink"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ vulkan-utility-libraries ]]; then
- patch_prefix="vulkan-utility-libraries"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ruy ]]; then
- patch_prefix="ruy"
- else
- patch_prefix="chromium"
- fi
- pushd "${CHROMIUM_COMMITS[$i]}" > /dev/null || die
- if [[ $i = -* ]]; then
- einfo "Reverting ${patch_prefix}-${i/-}.patch"
- git_wrapper apply -R --exclude="*unittest.cc" --exclude="DEPS" \
- -p1 < "${DISTDIR}/${patch_prefix}-${i/-}.patch"
- else
- einfo "Applying ${patch_prefix}-${i/-}.patch"
- git_wrapper apply --exclude="*unittest.cc" --exclude="DEPS" \
- -p1 < "${DISTDIR}/${patch_prefix}-${i/-}.patch"
- fi
- popd > /dev/null || die
- done
- fi
-
- if ! use bluetooth ; then
- PATCHES+=(
- "${FILESDIR}/disable-bluez-r7.patch"
- )
- fi
-
- if use convert-dict ; then
- PATCHES+=(
- "${FILESDIR}/chromium-ucf-dict-utility-r3.patch"
- )
- fi
-
- if ! use libcxx ; then
- PATCHES+=(
- "${FILESDIR}/fix-wayland-oncecallback-copy.patch"
- )
- fi
-
- if use system-ffmpeg; then
- PATCHES+=(
- "${FILESDIR}/chromium-141-opus-mp3.patch"
- "${FILESDIR}/chromium-135-hevc.patch"
- )
- sed -i "\!AVFMT_FLAG_NOH264PARSE!d" media/filters/ffmpeg_glue.cc || die
- ewarn "You need to expose \"av_stream_get_first_dts\" in ffmpeg via user patch"
- fi
-
- if use system-av1; then
- PATCHES+=(
- "${FILESDIR}/chromium-system-av1.patch"
- )
- fi
-
- if use system-libvpx; then
- PATCHES+=(
- "${FILESDIR}/chromium-system-libvpx.patch"
- )
- fi
-
- if use system-openjpeg ; then
- PATCHES+=(
- "${FILESDIR}/chromium-system-openjpeg-r4.patch"
- )
- fi
-
- # if use x86 ; then
- # #* Fixes a segfault in transport_security_state_generator
- # PATCHES+=(
- # "${FILESDIR}/fix-segfault-x86.patch"
- # )
- # fi
-
- # Testing all patches when NODIE is defined
- if [ ! -z "${NODIE}" ]; then
- for i in "${PATCHES[@]}"; do
- eapply_wrapper "$i"
- done
- nonfatal eapply_user
- else
- default
- fi
-
- if use cromite ; then
- BR_PA_PATH="${WORKDIR}/cromite-${CROMITE_COMMIT_ID}/build/patches"
-
- sed -i '/b\/components\/components_strings\.grd/,+10d' "${BR_PA_PATH}/Add-cromite-flags-support.patch" || die
- sed -i '/b\/chrome\/android\/java\/res\/xml\/privacy_preferences\.xml/,+13d' "${BR_PA_PATH}/Add-cromite-flags-support.patch" || die
- sed -i '/b\/android_webview\/support_library\/java\/src\/org\/chromium\/support_lib_glue/,+11d' "${BR_PA_PATH}/Client-hints-overrides.patch" || die
- sed -i '/webapps_strings.grdp" \/>/{s++webapps_strings.grdp" /><part file="cromite_components_strings_grd/placeholder.txt"/>+;h};${x;/./{x;q0};x;q1}' \
- components/components_strings.grd || die
-
- sed -i 's/absl::/std::/' "${BR_PA_PATH}/Add-a-proxy-configuration-page.patch" || die
-
- filterdiff -p1 "${BR_PA_PATH}/JIT-site-settings.patch" --exclude="content/browser/renderer_host/render_process_host_impl.cc" \
- > "${BR_PA_PATH}/JIT-site-settings.patch1"
- mv -f "${BR_PA_PATH}/JIT-site-settings.patch1" "${BR_PA_PATH}/JIT-site-settings.patch"
-
- BROMITE_PATCHES=(
- "${BR_PA_PATH}/bromite-build-utils.patch"
- "${BR_PA_PATH}/Battery-API-return-nothing.patch"
- "${BR_PA_PATH}/Multiple-fingerprinting-mitigations.patch"
- "${BR_PA_PATH}/Add-flag-to-configure-maximum-connections-per-host.patch"
- "${BR_PA_PATH}/Add-a-proxy-configuration-page.patch"
- "${BR_PA_PATH}/Enable-StrictOriginIsolation-and-SitePerProcess.patch"
- "${BR_PA_PATH}/Disable-requests-for-single-word-Omnibar-searches.patch"
- "${BR_PA_PATH}/Reduce-HTTP-headers-in-DoH-requests-to-bare-minimum.patch"
- "${BR_PA_PATH}/Client-hints-overrides.patch"
- "${BR_PA_PATH}/Disable-idle-detection.patch"
- "${BR_PA_PATH}/Disable-TLS-resumption.patch"
- "${BR_PA_PATH}/Remove-navigator.connection-info.patch"
-
- "${BR_PA_PATH}/AudioBuffer-AnalyserNode-fp-mitigations.patch"
- "${BR_PA_PATH}/Fonts-fingerprinting-mitigation.patch"
- "${BR_PA_PATH}/Content-settings-infrastructure.patch"
- "${BR_PA_PATH}/Add-autoplay-site-setting.patch"
- "${BR_PA_PATH}/Site-setting-for-images.patch"
- "${BR_PA_PATH}/JIT-site-settings.patch"
- "${BR_PA_PATH}/Add-webGL-site-setting.patch"
- "${BR_PA_PATH}/Add-webRTC-site-settings.patch"
- "${BR_PA_PATH}/Show-site-settings-for-cookies-javascript-and-ads.patch"
- "${BR_PA_PATH}/Viewport-Protection-flag.patch"
- "${BR_PA_PATH}/Revert-remove-allowscript-content-setting-secondary-url.patch"
- "${BR_PA_PATH}/Timezone-customization.patch"
- "${BR_PA_PATH}/Disable-speechSynthesis-getVoices-API.patch"
- "${BR_PA_PATH}/Remove-support-for-device-memory-and-cpu-recovery.patch"
- "${BR_PA_PATH}/Disable-Feeback-Collector.patch"
- "${BR_PA_PATH}/Disable-remote-altsvc-for-h3-connections.patch"
- "${BR_PA_PATH}/Add-cromite-flags-support.patch"
- "${BR_PA_PATH}/Enables-deactivation-of-the-js-debugger-statement.patch"
- )
- for i in "${BROMITE_PATCHES[@]}"; do
- if [[ "$i" =~ "Add-autoplay-site-setting.patch" ]] ||
- [[ "$i" =~ "JIT-site-settings.patch" ]] ||
- [[ "$i" =~ "Site-setting-for-images.patch" ]]; then
- einfo "Git binary patch: ${i##*/}"
- git_wrapper apply -p1 < "$i"
- else
- filter_wrapper "$i" --exclude="chrome/android/*"
- fi
- done
-
- #! conflicting patches
- sed -i '/browser_features.cc/,+17d' \
- "${UGC_WD}/patches/extra/ungoogled-chromium/add-flag-to-clear-data-on-exit.patch" || die
- sed -i 's$} // namespace features$BASE_FEATURE(kClearDataOnExit, "ClearDataOnExit", base::FEATURE_DISABLED_BY_DEFAULT);}$' \
- chrome/browser/browser_features.cc || die
- sed -i 's$} // namespace features$BASE_DECLARE_FEATURE(kClearDataOnExit);}$' \
- chrome/browser/browser_features.h || die
- sed -i 's$kChromeUIAboutHost,$kChromeUIAboutHost,"ungoogled-first-run",$' \
- chrome/common/webui_url_constants.cc || die
- sed -i '/chrome\/common\/webui_url_constants.cc/Q' \
- "${UGC_WD}/patches/extra/ungoogled-chromium/first-run-page.patch" || die
-
- #! normalise paths in py
- sed -i 's$os.path.dirname(include_file)$os.path.abspath(os.path.dirname(include_file))$' \
- build/bromite/gyp/cpp_bromite_include.py || die
- fi
-
- # if [[ ${LLVM_SLOT} == "19" ]]; then
- # # Upstream now hard depend on a feature that was added in LLVM 20.1, but we don't want to stabilise that yet.
- # # Do the temp file shuffle in case someone is using something other than `gawk`
- # {
- # awk '/config\("clang_warning_suppression"\) \{/ { print $0 " }"; sub(/clang/, "xclang"); print; next }
- # { print }' build/config/compiler/BUILD.gn > "${T}/build.gn" && \
- # mv "${T}/build.gn" build/config/compiler/BUILD.gn
- # } || die "Unable to disable warning suppression"
- # fi
-
- ## Not included in -lite tarballs, but we should check for it anyway.
- #if [[ -f third_party/node/linux/node-linux-x64/bin/node ]]; then
- # rm third_party/node/linux/node-linux-x64/bin/node || die
- #else
- # mkdir -p third_party/node/linux/node-linux-x64/bin || die
- #fi
- #ln -s "${EPREFIX}"/usr/bin/node third_party/node/linux/node-linux-x64/bin/node || die
-
- cp "${FILESDIR}/libusb.gn" build/linux/unbundle || die
- sed -i '/^REPLACEMENTS.*$/{s++REPLACEMENTS = {"libusb":"third_party/libusb/BUILD.gn",+;h};${x;/./{x;q0};x;q1}' \
- build/linux/unbundle/replace_gn_files.py || die
- sed -i '/^.*deps.*third_party\/jsoncpp.*$/{s++public_deps \+= [ "//third_party/jsoncpp" ]+;h};${x;/./{x;q0};x;q1}' \
- third_party/webrtc/rtc_base/BUILD.gn || die
-
- if use override-data-dir; then
- sed -i '/"chromium";/{s++"ungoogled-chromium";+;h};${x;/./{x;q0};x;q1}' \
- chrome/common/chrome_paths_linux.cc || die
- fi
-
- if use system-abseil-cpp; then
- eapply_wrapper "${FILESDIR}/chromium-147-system-abseil.patch"
-
- #! SFINAE mangling incompatibility between clang and gcc:
- #! https://github.com/llvm/llvm-project/issues/85656
- #! gcc: _ZN4absl12lts_202601074CordC1INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELi0EEEOT_
- #! clang: _ZN4absl12lts_202601074CordC1INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEETnNSt9enable_ifIXsr3std7is_sameIT_S8_EE5valueEiE4typeELi0EEEOSA_
- #! So, either this:
- eapply_wrapper "${FILESDIR}/chromium-141-system-abseil-cord.patch"
- #! or build with -fclang-abi-compat=17
-
- # cp -f /usr/include/absl/base/options.h third_party/abseil-cpp/absl/base/options.h
- # sed -i '/^#define ABSL_OPTION_USE_STD_ORDERING.*$/{s++#define ABSL_OPTION_USE_STD_ORDERING 1+;h};${x;/./{x;q0};x;q1}' \
- # third_party/abseil-cpp/absl/base/options.h || die
- fi
-
- #* Applying UGC PRs here
- if [ ! -z "${UGC_PR_COMMITS[*]}" ]; then
- pushd "${UGC_WD}" >/dev/null
- for i in "${UGC_PR_COMMITS[@]}"; do
- eapply_wrapper "${DISTDIR}/${PN}-$i.patch"
- done
- popd >/dev/null
- fi
-
- # From here we adapt ungoogled-chromium's patches to our needs
- local ugc_pruning_list="${UGC_WD}/pruning.list"
- local ugc_patch_series="${UGC_WD}/patches/series"
- local ugc_substitution_list="${UGC_WD}/domain_substitution.list"
-
- local ugc_unneeded=(
- # GN bootstrap
- extra/debian/gn/parallel
- # following Gentoo's Chromium
- core/ungoogled-chromium/build-with-wasm-rollup
- )
-
- if use cromite ; then
- einfo "Using fingerprinting patches from Cromite instead"
- ugc_unneeded+=(
- extra/bromite/fingerprinting-flags-client-rects-and-measuretext
- extra/bromite/flag-max-connections-per-host
- extra/bromite/flag-fingerprinting-canvas-image-data-noise
- extra/ungoogled-chromium/add-components-ungoogled
- extra/ungoogled-chromium/remove-pac-size-limit
- )
- fi
-
- # #* Temporary fix
- # sed -i "\!ios/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/icu/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/libjpeg_turbo/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/snappy/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/closure_compiler/!d" "${ugc_pruning_list}" || die
-
- # #* Didn't unpack them at the first place
- # sed -i "\!build/linux/debian_bullseye_i386-sysroot!d" "${ugc_pruning_list}" || die
- # sed -i "\!build/linux/debian_bullseye_amd64-sysroot!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/llvm-build!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/node/linux!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/rust-src!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/rust-toolchain!d" "${ugc_pruning_list}" || die
- # if ! use libcxx ; then
- # sed -i "\!third_party/libc!d" "${ugc_pruning_list}" || die
- # fi
- sed -i "s|debug('files|error('files|" \
- "${UGC_WD}/utils/prune_binaries.py" || die
- sed -i "\!third_party/node/linux!d" \
- "${UGC_WD}/utils/prune_binaries.py" || die
-
- local ugc_p ugc_dir
- for p in "${ugc_unneeded[@]}"; do
- einfo "Removing ${p}.patch"
- sed -i "\!${p}.patch!d" "${ugc_patch_series}" || die
- done
-
- if [ ! -z "${UGC_SKIP_PATCHES}" ]; then
- for p in ${UGC_SKIP_PATCHES}; do
- ewarn "Removing ${p}"
- sed -i "\!${p}!d" "${ugc_patch_series}" || die
- done
- fi
-
- if [ ! -z "${UGC_KEEP_BINARIES}" ]; then
- for p in ${UGC_KEEP_BINARIES}; do
- ewarn "Keeping binary ${p}"
- sed -i "\!${p}!d" "${ugc_pruning_list}" || die
- done
- fi
-
- if [ ! -z "${UGC_SKIP_SUBSTITUTION}" ]; then
- for p in ${UGC_SKIP_SUBSTITUTION}; do
- ewarn "No substitutions in ${p}"
- sed -i "\!${p}!d" "${ugc_substitution_list}" || die
- done
- fi
-
- ebegin "Pruning binaries"
- "${UGC_WD}/utils/prune_binaries.py" -q . "${UGC_WD}/pruning.list"
- eend $? || die
-
- ebegin "Applying ungoogled-chromium patches"
- "${UGC_WD}/utils/patches.py" -q apply . "${UGC_WD}/patches"
- eend $? || die
-
- ebegin "Applying domain substitution"
- "${UGC_WD}/utils/domain_substitution.py" -q apply -r "${UGC_WD}/domain_regex.list" -f "${UGC_WD}/domain_substitution.list" .
- eend $? || die
-
- # Sanity check esbuild version before we start removing files.
- # We _could_ patch the version check out - in theory esbuild upstream are being super conservative after
- # arch(AUR) packaged an `esbuild` binary and set ESBUILD_BINARY_PATH=/usr/bin/esbuild, causing much breakage,
- # but this is fine too and exactly matches what upstream are expecting.
- # https://github.com/evanw/esbuild/issues/2894
- local esbuild_js="${S}/third_party/devtools-frontend/src/node_modules/esbuild/lib/main.js"
- local found
- found=$(awk -F'"' '/if \(binaryVersion !==/ {print $2}' "${esbuild_js}")
- if [[ "${found}" != "${ESBUILD_VER}" ]]; then
- die "esbuild version mismatch: expected ${ESBUILD_VER}, found ${found}"
- fi
-
- elog "Removing bundled binaries from source tree ..."
- # Purge bundled ELF files: These are non-portable and will cause issues if used instead of system versions.
- # Use `--wasm` to also remove WebAssembly binaries, if desired - they're portable so shouldn't break builds.
- ${EPYTHON} "${FILESDIR}/bin-finder.py" --elf "${S}" | awk '{print $1}' | xargs rm -f ||
- die "Failed to remove bundled binaries"
-
- # And now we restore any that we actually need, from the host system
- local esbuild_path="${S}/third_party/devtools-frontend/src/third_party/esbuild"
- local -A restore_list=(
- ["/usr/bin/esbuild-${ESBUILD_VER}"]="${esbuild_path}/esbuild"
- ["/usr/bin/gperf"]="${S}/third_party/gperf/cipd/bin/gperf"
- ["/usr/bin/node"]="${S}/third_party/node/linux/node-linux-x64/bin/node"
- )
-
- for src in "${!restore_list[@]}"; do
- dst="${restore_list[${src}]}"
- if [[ -f "${src}" ]]; then
- einfo "Symlinking ${src} ..."
- # Make sure the parent dir exists; some tarballs don't include (e.g.) node's bindir
- mkdir -p "$(dirname "${dst}")" || die "Failed to create directory for ${dst}"
- ln -s "${src}" "${dst}" || die "Failed to symlink ${dst} from ${src}"
- if [[ ! -L "${dst}" || "$(readlink -f "${dst}")" != "${src}" ]]; then
- die "Symlink verification failed for ${dst} -> ${src}"
- fi
- else
- die "Expected to find ${src} to restore ${dst}, but it does not exist."
- fi
- done
-
- # adjust python interpreter version
- sed -i -e "s|\(^script_executable = \).*|\1\"${EPYTHON}\"|g" .gn || die
-
- # Use the system copy of hwdata's usb.ids; upstream is woefully out of date (2015!)
- sed 's|//third_party/usb_ids/usb.ids|/usr/share/hwdata/usb.ids|g' \
- -i services/device/public/cpp/usb/BUILD.gn || die "Failed to set system usb.ids path"
-
- # remove_bundled_libraries.py walks the source tree and looks for paths containing the substring 'third_party'
- # whitelist matches use the right-most matching path component, so we need to whitelist from that point down.
- local keeplibs=(
- base/third_party/cityhash
- )
- use system-double-conversion || keeplibs+=(
- base/third_party/double_conversion
- )
- keeplibs+=(
- base/third_party/icu
- base/third_party/nspr
- base/third_party/superfasthash
- base/third_party/symbolize
- base/third_party/xdg_user_dirs
- buildtools/third_party/libc++
- buildtools/third_party/libc++abi
- )
- use cromite && keeplibs+=(
- cromite_flags/third_party
- )
- keeplibs+=(
- net/third_party/mozilla_security_manager
- net/third_party/quic
- net/third_party/uri_template
- )
- use system-abseil-cpp || keeplibs+=(
- third_party/abseil-cpp
- )
- keeplibs+=(
- third_party/angle
- third_party/angle/src/common/third_party/xxhash
- third_party/angle/src/third_party/ceval
- )
- use nvidia || keeplibs+=(
- third_party/angle/src/third_party/libXNVCtrl
- )
- keeplibs+=(
- third_party/angle/src/third_party/volk
- third_party/anonymous_tokens
- third_party/apple_apsl
- third_party/axe-core
- third_party/bidimapper
- third_party/blink
- third_party/boringssl
- third_party/boringssl/src/third_party/fiat
- third_party/breakpad
- third_party/breakpad/breakpad/src/third_party/curl
- )
- use system-brotli || keeplibs+=(
- third_party/brotli
- )
- keeplibs+=(
- third_party/catapult
- third_party/catapult/common/py_vulcanize/third_party/rcssmin
- third_party/catapult/common/py_vulcanize/third_party/rjsmin
- third_party/catapult/third_party/beautifulsoup4-4.9.3
- third_party/catapult/third_party/html5lib-1.1
- third_party/catapult/third_party/polymer
- third_party/catapult/third_party/six
- third_party/catapult/third_party/typ
- third_party/catapult/tracing/third_party/d3
- third_party/catapult/tracing/third_party/gl-matrix
- third_party/catapult/tracing/third_party/jpeg-js
- third_party/catapult/tracing/third_party/jszip
- third_party/catapult/tracing/third_party/mannwhitneyu
- third_party/catapult/tracing/third_party/oboe
- third_party/catapult/tracing/third_party/pako
- third_party/ced
- third_party/cld_3
- third_party/closure_compiler
- )
- use libcxx && keeplibs+=(
- third_party/compiler-rt
- )
- keeplibs+=(
- third_party/content_analysis_sdk
- third_party/cpuinfo
- third_party/crabbyavif
- third_party/crashpad
- third_party/crashpad/crashpad/third_party/lss
- third_party/crashpad/crashpad/third_party/zlib
- )
- use system-crc32c || keeplibs+=(
- third_party/crc32c
- )
- keeplibs+=(
- third_party/cros_system_api
- third_party/d3
- third_party/dawn
- third_party/dawn/third_party/gn/webgpu-cts
- third_party/dawn/third_party/OpenGL-Registry
- third_party/dawn/third_party/renderdoc
- third_party/dawn/third_party/webgpu-headers
- third_party/depot_tools
- third_party/devscripts
- third_party/devtools-frontend
- third_party/devtools-frontend/src/front_end/third_party/acorn
- third_party/devtools-frontend/src/front_end/third_party/additional_readme_paths.json
- third_party/devtools-frontend/src/front_end/third_party/axe-core
- third_party/devtools-frontend/src/front_end/third_party/chromium
- third_party/devtools-frontend/src/front_end/third_party/codemirror
- third_party/devtools-frontend/src/front_end/third_party/csp_evaluator
- third_party/devtools-frontend/src/front_end/third_party/diff
- third_party/devtools-frontend/src/front_end/third_party/i18n
- third_party/devtools-frontend/src/front_end/third_party/intl-messageformat
- third_party/devtools-frontend/src/front_end/third_party/json5
- third_party/devtools-frontend/src/front_end/third_party/legacy-javascript
- third_party/devtools-frontend/src/front_end/third_party/lighthouse
- third_party/devtools-frontend/src/front_end/third_party/lit
- third_party/devtools-frontend/src/front_end/third_party/marked
- third_party/devtools-frontend/src/front_end/third_party/puppeteer
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/third_party/mitt
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/third_party/parsel-js
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/third_party/rxjs
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/third_party/urlpattern-polyfill
- third_party/devtools-frontend/src/front_end/third_party/source-map-scopes-codec
- third_party/devtools-frontend/src/front_end/third_party/third-party-web
- third_party/devtools-frontend/src/front_end/third_party/vscode.web-custom-data
- third_party/devtools-frontend/src/front_end/third_party/wasmparser
- third_party/devtools-frontend/src/front_end/third_party/web-vitals
- third_party/devtools-frontend/src/third_party
- third_party/dom_distiller_js
- third_party/dragonbox
- third_party/eigen3
- third_party/emoji-segmenter
- third_party/farmhash
- third_party/fast_float
- third_party/fdlibm
- third_party/federated_compute/chromium/fcp/confidentialcompute
- third_party/federated_compute/src/fcp/base
- third_party/federated_compute/src/fcp/confidentialcompute
- third_party/federated_compute/src/fcp/protos/confidentialcompute
- third_party/federated_compute/src/fcp/protos/federatedcompute
- third_party/fft2d
- third_party/flatbuffers
- third_party/fp16
- third_party/freetype
- third_party/fusejs
- third_party/fxdiv
- third_party/gemmlowp
- third_party/google_input_tools
- third_party/google_input_tools/third_party/closure_library
- third_party/google_input_tools/third_party/closure_library/third_party/closure
- third_party/googletest
- third_party/gperf # We symlink system gperf, but this will purge the symlink since we tidy up afterwards.
- third_party/highway
- third_party/hunspell
- third_party/hyphenation-patterns
- third_party/ink/src/ink/brush
- third_party/ink/src/ink/color
- third_party/ink/src/ink/geometry
- third_party/ink/src/ink/rendering
- third_party/ink/src/ink/rendering/skia/common_internal
- third_party/ink/src/ink/rendering/skia/native
- third_party/ink/src/ink/rendering/skia/native/internal
- third_party/ink/src/ink/strokes
- third_party/ink/src/ink/types
- third_party/inspector_protocol
- third_party/ipcz
- third_party/jinja2
- )
- use system-jsoncpp || keeplibs+=(
- third_party/jsoncpp
- )
- keeplibs+=(
- third_party/khronos
- third_party/lens_server_proto
- third_party/leveldatabase
- third_party/libaddressinput
- )
- use libcxx && keeplibs+=(
- third_party/libc++
- )
- keeplibs+=(
- third_party/libdrm
- third_party/libgav1
- third_party/libjingle
- third_party/libpfm4
- third_party/libphonenumber
- third_party/libpng
- third_party/libsecret
- third_party/libsrtp
- third_party/libsync
- third_party/libtess2/libtess2
- third_party/libtess2/src/Include
- third_party/libtess2/src/Source
- third_party/liburlpattern
- )
- use system-libusb || keeplibs+=(
- third_party/libusb
- )
- keeplibs+=(
- third_party/libva_protected_content
- )
- use system-libvpx || keeplibs+=(
- third_party/libvpx
- third_party/libvpx/source/libvpx/third_party/x86inc
- )
- keeplibs+=(
- third_party/libwebm
- third_party/libx11
- third_party/libxcb-keysyms
- third_party/libxml/chromium
- third_party/libyuv
- third_party/libzip
- third_party/lit
- )
- use libcxx && keeplibs+=(
- third_party/llvm-libc
- third_party/llvm-libc/src/shared/
- )
- keeplibs+=(
- third_party/lottie
- third_party/lss
- third_party/lzma_sdk
- third_party/mako
- third_party/markupsafe
- third_party/material_color_utilities
- third_party/metrics_proto
- third_party/minigbm
- third_party/ml_dtypes
- third_party/modp_b64
- third_party/nasm
- third_party/nearby
- third_party/neon_2_sse
- third_party/node
- third_party/oak/chromium/proto
- third_party/oak/chromium/proto/attestation
- third_party/omnibox_proto
- third_party/one_euro_filter
- third_party/openscreen
- third_party/openscreen/src/third_party/
- third_party/openscreen/src/third_party/tinycbor/src/src
- third_party/ots
- third_party/pdfium
- third_party/pdfium/third_party/agg23
- third_party/pdfium/third_party/bigint
- third_party/pdfium/third_party/freetype
- third_party/pdfium/third_party/lcms
- )
- use system-openjpeg || keeplibs+=(
- third_party/pdfium/third_party/libopenjpeg
- )
- keeplibs+=(
- third_party/pdfium/third_party/libtiff
- third_party/perfetto
- third_party/perfetto/protos/third_party/android
- third_party/perfetto/protos/third_party/chromium
- third_party/perfetto/protos/third_party/pprof
- third_party/perfetto/protos/third_party/primes
- third_party/perfetto/protos/third_party/simpleperf
- third_party/pffft
- third_party/ply
- third_party/polymer
- third_party/private_membership
- third_party/private-join-and-compute
- third_party/protobuf
- third_party/protobuf/third_party/utf8_range
- third_party/pthreadpool
- third_party/puffin
- third_party/pyjson5
- third_party/pyyaml
- third_party/rapidhash
- third_party/readability
- third_party/rnnoise
- third_party/rust
- third_party/ruy
- third_party/s2cellid
- third_party/search_engines_data
- third_party/securemessage
- third_party/selenium-atoms
- third_party/sentencepiece
- third_party/sentencepiece/src/third_party/darts_clone
- third_party/shell-encryption
- third_party/simdutf
- third_party/simplejson
- third_party/six
- third_party/skia
- third_party/skia/include/third_party/vulkan
- third_party/smhasher
- )
- use system-snappy || keeplibs+=(
- third_party/snappy
- )
- keeplibs+=(
- third_party/spirv-headers
- third_party/spirv-tools
- third_party/sqlite
- third_party/swiftshader
- third_party/swiftshader/third_party/astc-encoder
- third_party/swiftshader/third_party/llvm-subzero
- third_party/swiftshader/third_party/marl
- third_party/swiftshader/third_party/SPIRV-Headers/include/spirv
- third_party/swiftshader/third_party/SPIRV-Tools
- third_party/swiftshader/third_party/subzero
- third_party/tensorflow_models
- third_party/tensorflow-text
- third_party/tflite
- third_party/tflite/src/third_party/fft2d
- third_party/tflite/src/third_party/xla/third_party/tsl
- third_party/tflite/src/third_party/xla/xla/tsl/framework
- third_party/tflite/src/third_party/xla/xla/tsl/lib/random
- third_party/tflite/src/third_party/xla/xla/tsl/platform
- third_party/tflite/src/third_party/xla/xla/tsl/protobuf
- third_party/tflite/src/third_party/xla/xla/tsl/util
- third_party/ukey2
- third_party/utf
- third_party/vulkan
- third_party/wayland
- third_party/webdriver
- third_party/webgpu-cts
- third_party/webrtc
- third_party/webrtc/common_audio/third_party/ooura
- third_party/webrtc/common_audio/third_party/spl_sqrt_floor
- third_party/webrtc/modules/third_party/fft
- third_party/webrtc/modules/third_party/g711
- third_party/webrtc/modules/third_party/g722
- third_party/widevine
- )
- use system-woff2 || keeplibs+=(
- third_party/woff2
- )
- keeplibs+=(
- third_party/wuffs
- third_party/x11proto
- third_party/xcbproto
- third_party/xnnpack
- third_party/zlib/google
- third_party/zxcvbn-cpp
- url/third_party/mozilla
- v8/third_party/glibc
- v8/third_party/inspector_protocol
- v8/third_party/rapidhash-v8
- v8/third_party/siphash
- v8/third_party/utf8-decoder
- v8/third_party/v8
- v8/third_party/valgrind
-
- # gyp -> gn leftovers
- third_party/speech-dispatcher
- third_party/usb_ids
- )
-
- if use test; then
- keeplibs+=(
- third_party/breakpad/breakpad/src/processor
- third_party/fuzztest
- third_party/google_benchmark/src/include/benchmark
- third_party/google_benchmark/src/src
- third_party/test_fonts
- third_party/test_fonts/fontconfig
- third_party/test_fonts/test_fonts
- )
- fi
-
- # USE=system-*
- if ! use system-harfbuzz; then
- keeplibs+=( third_party/harfbuzz )
- fi
-
- if ! use system-ffmpeg; then
- keeplibs+=( third_party/ffmpeg third_party/opus )
- fi
-
- if ! use system-icu; then
- keeplibs+=( third_party/icu )
- fi
-
- if ! use system-zstd; then
- keeplibs+=( third_party/zstd )
- fi
-
- if ! use system-av1; then
- keeplibs+=(
- third_party/dav1d
- third_party/libaom
- third_party/libaom/source/libaom/third_party/fastfeat
- third_party/libaom/source/libaom/third_party/vector
- third_party/libaom/source/libaom/third_party/x86inc
- )
- fi
-
- if use libcxx; then
- keeplibs+=(
- third_party/libc++
- third_party/llvm-libc
- )
- fi
-
- if ! use system-openh264; then
- keeplibs+=( third_party/openh264 )
- fi
-
- if ! use system-re2; then
- keeplibs+=( third_party/re2 )
- fi
-
- # Arch-specific
- if use arm64 || use ppc64 ; then
- keeplibs+=( third_party/swiftshader/third_party/llvm-10.0 )
- fi
- # we need to generate ppc64 stuff because upstream does not ship it yet
- # it has to be done before unbundling.
- if use ppc64; then
- pushd third_party/libvpx >/dev/null || die
- mkdir -p source/config/linux/ppc64 || die
- # requires git and clang, bug #832803
- # Revert https://chromium.googlesource.com/chromium/src/+/b463d0f40b08b4e896e7f458d89ae58ce2a27165%5E%21/third_party/libvpx/generate_gni.sh
- # and https://chromium.googlesource.com/chromium/src/+/71ebcbce867dd31da5f8b405a28fcb0de0657d91%5E%21/third_party/libvpx/generate_gni.sh
- # since we're not in a git repo
- sed -i -e "s|^update_readme||g; s|clang-format|${EPREFIX}/bin/true|g; /^git -C/d; /git cl/d; /cd \$BASE_DIR\/\$LIBVPX_SRC_DIR/ign format --in-place \$BASE_DIR\/BUILD.gn\ngn format --in-place \$BASE_DIR\/libvpx_srcs.gni" \
- generate_gni.sh || die
- ./generate_gni.sh || die
- popd >/dev/null || die
-
- pushd third_party/ffmpeg >/dev/null || die
- cp libavcodec/ppc/h264dsp.c libavcodec/ppc/h264dsp_ppc.c || die
- cp libavcodec/ppc/h264qpel.c libavcodec/ppc/h264qpel_ppc.c || die
- popd >/dev/null || die
- fi
-
- # Sanity check keeplibs, on major version bumps it is often necessary to update this list
- # and this enables us to hit them all at once.
- # There are some entries that need to be whitelisted (TODO: Why? The file is understandable, the rest seem odd)
- whitelist_libs=(
- net/third_party/quic
- third_party/devtools-frontend/src/front_end/third_party/additional_readme_paths.json
- third_party/libjingle
- third_party/mesa
- third_party/skia/third_party/vulkan
- third_party/vulkan
- )
- local not_found_libs=()
- for lib in "${keeplibs[@]}"; do
- if [[ ! -d "${lib}" ]] && ! has "${lib}" "${whitelist_libs[@]}"; then
- not_found_libs+=( "${lib}" )
- fi
- done
-
- if [[ ${#not_found_libs[@]} -gt 0 ]]; then
- ewarn "The following \`keeplibs\` directories were not found in the source tree:"
- for lib in "${not_found_libs[@]}"; do
- ewarn " ${lib}"
- done
- fi
-
- keeplibs+=( third_party/ungoogled )
-
- # Remove most bundled libraries. Some are still needed.
- einfo "Unbundling third-party libraries ..."
- build/linux/unbundle/remove_bundled_libraries.py "${keeplibs[@]}" --do-remove || die
-
- # Interferes with our bundled clang path; we don't want stripped binaries anyway.
- sed -i -e 's|${clang_base_path}/bin/llvm-strip|/bin/true|g' \
- -e 's|${clang_base_path}/bin/llvm-objcopy|/bin/true|g' \
- build/linux/strip_binary.gni || die
-}
-
-src_configure() {
- # Calling this here supports resumption via FEATURES=keepwork
- python_setup
-
- # Bug 491582.
- export TMPDIR="${WORKDIR}/temp"
- mkdir -p -m 755 "${TMPDIR}" || die
-
- # https://bugs.gentoo.org/654216
- addpredict /dev/dri/ #nowarn
-
- # Use system-provided libraries.
- # TODO: freetype -- remove sources (https://bugs.chromium.org/p/pdfium/issues/detail?id=733).
- # TODO: use_system_hunspell (upstream changes needed).
- # TODO: use_system_protobuf (bug #525560).
- # TODO: use_system_sqlite (http://crbug.com/22208).
-
- # libevent: https://bugs.gentoo.org/593458
- local gn_system_libraries=(
- flac
- fontconfig
- freetype
- libjpeg
- libwebp
- libxml
- libxslt
- zlib
- )
- if use system-abseil-cpp; then
- gn_system_libraries+=(
- absl_algorithm
- absl_base
- absl_cleanup
- absl_container
- absl_crc
- absl_debugging
- absl_flags
- absl_functional
- absl_hash
- absl_log
- absl_log_internal
- absl_memory
- absl_meta
- absl_numeric
- absl_random
- absl_status
- absl_strings
- absl_synchronization
- absl_time
- absl_types
- absl_utility
- )
- fi
- if use system-brotli; then
- gn_system_libraries+=( brotli )
- fi
- if use system-crc32c; then
- gn_system_libraries+=( crc32c )
- fi
- if use system-double-conversion; then
- gn_system_libraries+=( double-conversion )
- fi
- if use system-woff2; then
- gn_system_libraries+=( woff2 )
- fi
- if use nvidia; then
- gn_system_libraries+=( libXNVCtrl )
- fi
- if use system-ffmpeg; then
- gn_system_libraries+=( ffmpeg opus )
- fi
- if use system-jsoncpp; then
- gn_system_libraries+=( jsoncpp )
- fi
- if use system-icu; then
- gn_system_libraries+=( icu )
- fi
- if use system-zstd; then
- gn_system_libraries+=( zstd )
- fi
- if use system-av1; then
- gn_system_libraries+=( dav1d libaom )
- fi
- if use system-libusb; then
- gn_system_libraries+=( libusb )
- fi
- if use system-libvpx; then
- gn_system_libraries+=( libvpx )
- fi
- use system-openh264 && gn_system_libraries+=(
- openh264
- )
- use system-re2 && gn_system_libraries+=(
- re2
- )
- use system-snappy && gn_system_libraries+=(
- snappy
- )
-
- build/linux/unbundle/replace_gn_files.py --system-libraries "${gn_system_libraries[@]}" ||
- die "Failed to replace GN files for system libraries"
-
- # TODO 131: The above call clobbers `enable_freetype = true` in the freetype gni file
- # drop the last line, then append the freetype line and a new curly brace to end the block
- local freetype_gni="build/config/freetype/freetype.gni"
- sed -i -e '$d' ${freetype_gni} || die
- echo " enable_freetype = true" >> ${freetype_gni} || die
- echo "}" >> ${freetype_gni} || die
-
- if use !custom-cflags; then
- replace-flags "-Os" "-O2"
- strip-flags
- # Debug info section overflows without component build
- # Prevent linker from running out of address space, bug #471810 .
- filter-flags "-g*"
- # 949123: Several multimedia components explicitly build with specific CFLAGS and
- # use runtime detection to enable optimisations; unfortunately any of our CFLAGS are suffixed
- # to the end of the command line, which causes build failures.
- fi
- # Since M150 `skia` will begin breaking for x86_64 due to compilation of `avx512` code paths;
- # we need to filter these for all arches.
- filter-flags "-march*" "-mtune*" "-mcpu*"
-
- # We don't use the same clang version as upstream, and with -Werror
- # we need to make sure that we don't get superfluous warnings.
- append-flags -Wno-unknown-warning-option
- if tc-is-cross-compiler; then # can you cross-compile with the bundled toolchain?
- export BUILD_CXXFLAGS+=" -Wno-unknown-warning-option"
- export BUILD_CFLAGS+=" -Wno-unknown-warning-option"
- fi
-
- # Start building our GN options
- local myconf_gn=() # Tip: strings must be quoted, bools or numbers are fine
-
- if use !bundled-toolchain; then
- # We already forced the "correct" clang via pkg_setup
-
- if tc-is-cross-compiler; then
- CC="${CC} -target ${CHOST} --sysroot ${ESYSROOT}"
- CXX="${CXX} -target ${CHOST} --sysroot ${ESYSROOT}"
- BUILD_AR=${AR}
- BUILD_CC=${CC}
- BUILD_CXX=${CXX}
- BUILD_NM=${NM}
- fi
-
- # Make sure the build system will use the right tools, bug #340795.
- tc-export AR CC CXX NM
-
- strip-unsupported-flags
- append-ldflags -Wl,--undefined-version # https://bugs.gentoo.org/918897#c32
-
- myconf_gn+=(
- "is_clang=true"
- "clang_use_chrome_plugins=false"
- "use_clang_modules=false" # M141 enables this for the linux platform by default.
- 'custom_toolchain="//build/toolchain/linux/unbundle:default"'
- # From M127 we need to provide a location for libclang and the clang resource dir so that bindgen can find them
- "bindgen_libclang_path=\"$(get_llvm_prefix)/$(get_libdir)\""
- "bindgen_clang_resource_dir=\"${EPREFIX}/usr/lib/clang/${LLVM_SLOT}/include\""
- "bindgen_extra_clang_args=[\"-I${EPREFIX}/usr/lib/clang/${LLVM_SLOT}/include\"]"
- "clang_base_path=\"${EPREFIX}/usr/lib/clang/${LLVM_SLOT}/\""
- "rust_bindgen_root=\"${EPREFIX}/usr/\""
- "rust_sysroot_absolute=\"$(get_rust_prefix)\""
- "rustc_version=\"${RUST_SLOT}\""
- )
-
- if tc-ld-is-mold; then
- myconf_gn+=(
- "use_mold=true"
- "use_lld=false"
- "linker_path=\"${EPREFIX}/usr/bin/mold\""
- )
- else
- myconf_gn+=( "use_lld=true" )
- fi
-
- if [[ ${LLVM_SLOT} -lt 23 ]]; then
- # Workaround for -fsanitize-ignore-for-ubsan-feature (added in LLVM 23)
- myconf_gn+=( 'clang_has_ubsan_feature_ignore=false' )
- fi
-
- if ! tc-is-cross-compiler; then
- myconf_gn+=( 'host_toolchain="//build/toolchain/linux/unbundle:default"' )
- else
- tc-export BUILD_{AR,CC,CXX,NM}
- myconf_gn+=(
- 'host_toolchain="//build/toolchain/linux/unbundle:host"'
- 'v8_snapshot_toolchain="//build/toolchain/linux/unbundle:host"'
- "host_pkg_config=\"$(tc-getBUILD_PKG_CONFIG)\""
- "pkg_config=\"$(tc-getPKG_CONFIG)\""
- )
-
- # setup cups-config, build system only uses --libs option
- if use cups; then
- mkdir "${T}/cups-config" || die
- cp "${ESYSROOT}/usr/bin/${CHOST}-cups-config" "${T}/cups-config/cups-config" || die
- export PATH="${PATH}:${T}/cups-config"
- fi
-
- # Don't inherit PKG_CONFIG_PATH from environment
- local -x PKG_CONFIG_PATH=
- fi
-
- fi # !bundled-toolchain
-
- local myarch
- myarch="$(tc-arch)"
- case ${myarch} in
- amd64)
- # Bug 530248, 544702, 546984, 853646.
- use !custom-cflags && filter-flags -mno-mmx -mno-sse2 -mno-ssse3 -mno-sse4.1 \
- -mno-avx -mno-avx2 -mno-fma -mno-fma4 -mno-xop -mno-sse4a
- myconf_gn+=( 'target_cpu="x64"' )
- ;;
- x86)
- # Bug 530248, 544702, 546984, 853646.
- use !custom-cflags && filter-flags -mno-mmx -mno-sse2 -mno-ssse3 -mno-sse4.1 \
- -mno-avx -mno-avx2 -mno-fma -mno-fma4 -mno-xop -mno-sse4a
- myconf_gn+=( 'target_cpu="x86"' )
- ;;
- arm64)
- myconf_gn+=( 'target_cpu="arm64"' )
- ;;
- ppc64)
- myconf_gn+=( 'target_cpu="ppc64"' )
- ;;
- *)
- die "Failed to determine target arch, got '${myarch}'."
- ;;
- esac
-
- # Common options
-
- myconf_gn+=(
- # Disable code formating of generated files
- "blink_enable_generated_code_formatting=false"
- # enable DCHECK with USE=debug only, increases chrome binary size by 30%, bug #811138.
- # DCHECK is fatal by default, make it configurable at runtime, #bug 807881.
- "dcheck_always_on=$(usex debug true false)"
- "dcheck_is_configurable=$(usex debug true false)"
- # Chromium builds provided by Linux distros should disable the testing config
- "disable_fieldtrial_testing_config=true"
- # Custom patch: Enable building Chromium as individual channels (e.g. stable, beta, dev) that
- # use different profile directories, desktop entries, etc. This enables slotting the ebuild.
- "enable_channel_branding=true"
- # 131 began laying the groundwork for replacing freetype with
- # "Rust-based Fontations set of libraries plus Skia path rendering"
- # We now need to opt-in
- "enable_freetype=true"
- "enable_hangout_services_extension=$(usex hangouts true false)"
- # Don't need nocompile checks and GN crashes with our config (verify with modern GN)
- "enable_nocompile_tests=false"
- # pseudolocales are only used for testing
- "enable_pseudolocales=false"
- "enable_widevine=$(usex widevine true false)"
- # Disable fatal linker warnings, bug 506268.
- "fatal_linker_warnings=false"
- # Component build isn't generally intended for use by end users. It's mostly useful
- # for development and debugging.
- "is_component_build=false"
- # GN needs explicit config for Debug/Release as opposed to inferring it from build directory.
- "is_debug=false"
- "is_official_build=$(usex official true false)"
- # Enable ozone wayland and/or headless support
- "ozone_auto_platforms=false"
- "ozone_platform_headless=true"
- # Enables building without non-free unRAR licence
- "safe_browsing_use_unrar=false"
- # "thin_lto_enable_optimizations=${use_lto}"
- "treat_warnings_as_errors=false"
- # Use in-tree libc++ (buildtools/third_party/libc++ and buildtools/third_party/libc++abi)
- # instead of the system C++ library for C++ standard library support.
- # default: true, but let's be explicit (forced since 120 ; USE removed 127).
- "use_custom_libcxx=true"
- # Enable ozone wayland and/or headless support
- "use_ozone=true"
- # The sysroot is the oldest debian image that chromium supports, we don't need it
- "use_sysroot=false"
- # See dependency logic in third_party/BUILD.gn
- "use_system_harfbuzz=$(usex system-harfbuzz true false)"
- # "use_thin_lto=${use_lto}"
- # Only enabled for clang, but gcc has endian macros too
- "v8_use_libm_trig_functions=true"
- )
-
- myconf_gn+=( "enable_iterator_debugging=$(usex debug true false)" )
-
- if use debug; then
- myconf_gn+=(
- "symbol_level=2"
- "blink_symbol_level=2"
- "v8_symbol_level=2"
- )
- else
- myconf_gn+=(
- "symbol_level=0"
- "blink_symbol_level=0"
- "v8_symbol_level=0"
- )
- fi
-
- if use bindist ; then
- myconf_gn+=(
- # If this is set to false Chromium won't be able to load any proprietary codecs
- # even if provided with an ffmpeg capable of h264/aac decoding
- "proprietary_codecs=true"
- 'ffmpeg_branding="Chrome"'
- # build ffmpeg as an external component (libffmpeg.so) that we can remove / substitute
- "is_component_ffmpeg=true"
- )
- else
- myconf_gn+=(
- "proprietary_codecs=$(usex proprietary-codecs true false)"
- "ffmpeg_branding=\"$(usex proprietary-codecs Chrome Chromium)\""
- )
- fi
-
- if use headless; then
- myconf_gn+=(
- "enable_print_preview=false"
- "enable_remoting=false"
- 'ozone_platform="headless"'
- "rtc_use_pipewire=false"
- "use_alsa=false"
- "use_cups=false"
- "use_gio=false"
- "use_glib=false"
- "use_gtk=false"
- "use_kerberos=false"
- "use_libpci=false"
- "use_pangocairo=false"
- "use_pulseaudio=false"
- "use_qt5=false"
- "use_qt6=false"
- "use_udev=false"
- "use_vaapi=false"
- "use_xkbcommon=false"
- )
- else
- myconf_gn+=(
- "gtk_version=$(usex gtk4 4 3)"
- # link pulseaudio directly (DT_NEEDED) instead of using dlopen.
- # helps with automated detection of ABI mismatches and prevents silent errors.
- "link_pulseaudio=$(usex pulseaudio true false)"
- "ozone_platform_wayland=$(usex wayland true false)"
- "ozone_platform_x11=$(usex X true false)"
- "ozone_platform=\"$(usex wayland wayland x11)\""
- "rtc_use_pipewire=$(usex screencast true false)"
- "use_cups=$(usex cups true false)"
- "use_kerberos=$(usex kerberos true false)"
- "use_pulseaudio=$(usex pulseaudio true false)"
- "use_qt5=false"
- "use_system_libffi=$(usex wayland true false)"
- "use_system_minigbm=true"
- "use_vaapi=$(usex vaapi true false)"
- "use_xkbcommon=true"
- )
- if use qt6; then
- local cbuild_libdir
- cbuild_libdir="$(get_libdir)"
- if tc-is-cross-compiler; then
- # Hack to workaround get_libdir not being able to handle CBUILD, bug #794181
- cbuild_libdir="$($(tc-getBUILD_PKG_CONFIG) --keep-system-libs --libs-only-L libxslt)"
- cbuild_libdir="${cbuild_libdir:2}"
- cbuild_libdir="${cbuild_libdir/% }"
- fi
- myconf_gn+=(
- "use_qt6=true"
- "moc_qt6_path=\"${EPREFIX}/usr/${cbuild_libdir}/qt6/libexec\""
- )
- else
- myconf_gn+=( "use_qt6=false" )
- fi
- fi
-
- # Explicitly disable ICU data file support for system-icu/headless builds.
- if use system-icu || use headless; then
- myconf_gn+=( "icu_use_data_file=false" )
- fi
-
- if use official; then
- # Allow building against system libraries in official builds
- sed -i 's/OFFICIAL_BUILD/GOOGLE_CHROME_BUILD/' \
- tools/generate_shim_headers/generate_shim_headers.py || die
- # Don't add symbols to build
- myconf_gn+=( "symbol_level=0" )
- fi
-
- if use pgo; then
- myconf_gn+=(
- "chrome_pgo_phase=2"
- "v8_enable_builtins_optimization=true"
- )
- else
- myconf_gn+=( "chrome_pgo_phase=0" )
- fi
-
- # Odds and ends
-
- # skipping typecheck is only supported on amd64, bug #876157
- if ! use amd64; then
- myconf_gn+=( "devtools_skip_typecheck=false" )
- fi
-
- # Disable external code space for V8 for ppc64. It is disabled for ppc64
- # by default, but cross-compiling on amd64 enables it again.
- if tc-is-cross-compiler && use ppc64; then
- myconf_gn+=( "v8_enable_external_code_space=false" )
- fi
-
- # This determines whether or not GN uses the bundled libcxx
- if use libcxx; then
- myconf_gn+=( "use_custom_libcxx=true" )
- else
- myconf_gn+=(
- "use_custom_libcxx=false"
- "use_llvm_libatomic=false"
- )
- append-cppflags -U_GLIBCXX_ASSERTIONS #See #318
- fi
-
- myconf_gn+=( "use_bluez=$(usex bluetooth true false)" )
-
- myconf_gn+=( "is_cfi=$(usex cfi true false)" )
-
- if use cfi; then
- myconf_gn+=(
- "use_cfi_icall=true"
- "use_cfi_cast=true"
- )
- fi
-
- myconf_gn+=(
- "optimize_webui=$(usex optimize-webui true false)"
- "use_system_freetype=$(usex system-harfbuzz true false)"
- "use_system_libopenjpeg2=$(usex system-openjpeg true false)"
- "enable_pdf=true"
- "use_system_lcms2=true"
- "enable_print_preview=true"
- "use_thin_lto=$(usex thinlto true false)"
- "thin_lto_enable_optimizations=$(usex optimize-thinlto true false)"
-
- # Ungoogled flags
- "build_with_tflite_lib=false"
- "enable_mdns=false"
- "enable_mse_mpeg2ts_stream_parser=$(usex proprietary-codecs true false)"
- "enable_remoting=false"
- "enable_reporting=false"
- "enable_service_discovery=false"
- "exclude_unwind_tables=true"
- "google_api_key=\"\""
- "google_default_client_id=\"\""
- "google_default_client_secret=\"\""
- "safe_browsing_mode=0"
- "use_official_google_api_keys=false"
- "use_unofficial_version_number=false"
-
- # "enable_swiftshader=false"
-
- # Additional flags
- # "perfetto_use_system_zlib=true"
- # "use_system_zlib=true"
- # "use_system_libjpeg=true"
- # "rtc_build_examples=false"
- # "enable_chromium_prelude=false"
- # "enable_updater=false"
- # "enable_update_notifications=false"
- # "enable_constraints=false"
- # "rtc_rusty_base64=false"
- # "v8_enable_temporal_support=false"
- # "media_use_symphonia=false"
- # "pdf_enable_rust_png=false"
- # "skia_use_libpng_encode=true"
- # "skia_use_libpng_decode=true"
- # "skia_use_rust_png_decode=false"
- # "skia_use_rust_png_encode=false"
- # "enable_jxl_decoder=false"
- )
-
- if use amd64 || use arm64; then
- myconf_gn+=(
- "v8_drumbrake_bounds_checks=true"
- # "v8_enable_drumbrake=true"
- )
- fi
-
- if use thinlto; then
- # We need to change the default value of import-instr-limit in
- # LLVM to limit the text size increase. The default value is
- # 100, and we change it to 30 to reduce the text size increase
- # from 25% to 10%. The performance number of page_cycler is the
- # same on two of the thinLTO configurations, we got 1% slowdown
- # on speedometer when changing import-instr-limit from 100 to 30.
- # append-ldflags "-Wl,-plugin-opt,-import-instr-limit=30"
- sed -i '/import_instr_limit = 5/{s++import_instr_limit = 30+;h};${x;/./{x;q0};x;q1}' \
- build/config/compiler/BUILD.gn || die
-
- append-ldflags "-Wl,--thinlto-jobs=$(makeopts_jobs)"
- fi
-
- # Facilitate deterministic builds (taken from build/config/compiler/BUILD.gn)
- append-cflags -Wno-builtin-macro-redefined
- append-cxxflags -Wno-builtin-macro-redefined
- append-cppflags "-D__DATE__= -D__TIME__= -D__TIMESTAMP__="
-
- local flags
- einfo "Building with the following compiler settings:"
- for flags in C{C,XX} AR NM RANLIB {C,CXX,CPP,LD}FLAGS \
- EXTRA_GN UGC_{SKIP_{PATCHES,SUBSTITUTION},KEEP_BINARIES} ; do
- einfo " ${flags} = \"${!flags}\""
- done
-
- # Since we build from tarballs, we need to set the channel here so that it can be used in the build.
- export CHROME_VERSION_EXTRA="${SLOT}"
-
- einfo "Configuring Chromium ..."
- set -- gn gen --args="${myconf_gn[*]}${EXTRA_GN:+ ${EXTRA_GN}}" out/Release
- echo "$@"
- "$@" || die "Failed to configure Chromium"
-
- # The "if" below should not be executed unless testing
- if [ ! -z "${NODIE}" ]; then
- # List all args
- # gn args --list out/Release
-
- # Quick compiler check
- eninja -C out/Release protoc torque
- fi
-}
-
-src_compile() {
- # Final link uses lots of file descriptors.
- ulimit -n 2048
-
- # Calling this here supports resumption via FEATURES=keepwork
- python_setup
-
- # I hate doing this but upstream Rust have yet to come up with a better solution for
- # us poor packagers. Required for Split LTO units, which are required for CFI.
- export RUSTC_BOOTSTRAP=1
-
- # Don't inherit PYTHONPATH from environment, bug #789021, #812689
- local -x PYTHONPATH=
-
- # Build mksnapshot and pax-mark it.
- if use pax-kernel; then
- local x
- for x in mksnapshot v8_context_snapshot_generator code_cache_generator; do
- if tc-is-cross-compiler; then
- eninja -C out/Release "host/${x}"
- pax-mark m "out/Release/host/${x}"
- else
- eninja -C out/Release "${x}"
- pax-mark m "out/Release/${x}"
- fi
- done
- fi
-
- # Even though ninja autodetects number of CPUs, we respect
- # user's options, for debugging with -j 1 or any other reason.
- eninja -C out/Release chrome chrome_sandbox $(use test && echo "base_unittests")
-
- pax-mark m out/Release/chrome
-
- # This codepath does minimal patching, so we're at the mercy of upstream
- # CFLAGS. This is fine - we're not intending to force this on users
- # and we do a lot of flag 'management' anyway.
- if use bundled-toolchain; then
- QA_FLAGS_IGNORED="
- usr/lib64/chromium-browser/chrome
- usr/lib64/chromium-browser/chrome-sandbox
- usr/lib64/chromium-browser/chromedriver
- usr/lib64/chromium-browser/chrome_crashpad_handler
- usr/lib64/chromium-browser/libEGL.so
- usr/lib64/chromium-browser/libGLESv2.so
- usr/lib64/chromium-browser/libVkICD_mock_icd.so
- usr/lib64/chromium-browser/libVkLayer_khronos_validation.so
- usr/lib64/chromium-browser/libqt6_shim.so
- usr/lib64/chromium-browser/libvk_swiftshader.so
- usr/lib64/chromium-browser/libvulkan.so.1
- "
- fi
-
- use convert-dict && eninja -C out/Release convert_dict
-
- use enable-driver && eninja -C out/Release chromedriver
- #use suid && eninja -C out/Release chrome_sandbox
-
- use enable-driver && mv out/Release/chromedriver{.unstripped,}
-
- rm -f out/Release/locales/*.pak.info || die
-
- # Generate support files (desktop file, manpage, etc.) See: #684550 #706786 #968958
- ${EPYTHON} "${FILESDIR}/generate-support-files.py" \
- --installdir "/usr/$(get_libdir)/ungoogled-chromium-browser" \
- --channel "${SLOT}" ||
- die "Failed to generate support files"
-}
-
-src_test() {
- # Tests may be flaky with usersandbox, and the test runner executes significantly faster without.
- # If you seem to be excluding too many tests for a particular milestone: comment them out, reboot, and
- # run the tests again. If that doesn't help, try FEATURES="-usersandbox" and send it because obviously the
- # chromium gods are not smiling upon you today. Do some runtime testing, obvs.
- local skip_tests=(
- # Wildcard exclusions (if all tests in a test suite are broken)
- 'AlternateTestParams/PartitionAllocDeathTest.RepeatedAllocReturnNullDirect/*'
- 'AlternateTestParams/PartitionAllocDeathTest.RepeatedReallocReturnNullDirect/*'
- 'AlternateTestParams/PartitionAllocTest.*' # 200+ tests, >= 1 crashes entire test runner with usersandbox.
- 'CheckExitCodeAfterSignalHandlerDeathTest.*'
- 'CriticalProcessAndThreadSpotChecks/HangWatcherAnyCriticalThreadTests.*'
- 'LazyThreadPoolTaskRunnerEnvironmentTest.*' # M142
- 'ToolsSanityTest.BadVirtualCall*'
- # requires en-us locale
- SysStrings.SysNativeMBAndWide
- SysStrings.SysNativeMBToWide
- SysStrings.SysWideToNativeMB
- # Specific test cases
- CancelableEventTest.BothCancelFailureAndSucceedOccurUnderContention
- FilePathTest.FromUTF8Unsafe_And_AsUTF8Unsafe
- HistogramTesterTest.PumaTestUniqueSample
- ImmediateCrashTest.ExpectedOpcodeSequence # M150
- PathServiceTest.CheckedGetFailure
- PlatformThreadTest.CanChangeThreadType
- RawPtrTest.SetLookupUsesGetForComparison # M146 ; also broken for alpine in M144.
- RustLogIntegrationTest.CheckAllSeverity
- StackCanary.ChangingStackCanaryCrashesOnReturn
- StackTraceDeathTest.StackDumpSignalHandlerIsMallocFree
- TestLauncherTools.TruncateSnippetFocusedMatchesFatalMessagesTest
- ThreadPoolEnvironmentConfig.CanUseBackgroundPriorityForWorker
- )
- local test_filter="-$(IFS=:; printf '%s' "${skip_tests[*]}")"
- # test-launcher-bot-mode enables parallelism and plain output
- # Check individual tests with --gtest_filter=<test you want> --single-process-tests
- ./out/Release/base_unittests --test-launcher-bot-mode \
- --test-launcher-jobs="$(get_makeopts_jobs)" \
- --gtest_filter="${test_filter}" || die "Tests failed!"
-}
-
-src_install() {
- local browser_suffix
- if [[ "${SLOT}" != "stable" ]]; then
- browser_suffix="-${SLOT}"
- else
- browser_suffix=""
- fi
- local CHROMIUM_HOME="/usr/$(get_libdir)/ungoogled-chromium-browser${browser_suffix}"
- exeinto "${CHROMIUM_HOME}"
- doexe out/Release/chrome
-
- #newexe out/Release/chrome_sandbox chrome-sandbox
- #fperms 4755 "${CHROMIUM_HOME}/chrome-sandbox"
-
- use enable-driver && doexe out/Release/chromedriver
-
- #* https://github.com/ungoogled-software/ungoogled-chromium/pull/3563
- doexe out/Release/chrome_crashpad_handler
-
- if use convert-dict; then
- newexe "${FILESDIR}/update-dicts.sh" update-dicts.sh
- doexe out/Release/convert_dict
- fi
-
- ozone_auto_session () {
- use X && use wayland && ! use headless && echo true || echo false
- }
-
- cat <<- EOF > "${D}${CHROMIUM_HOME}/chromium-launcher.sh" || die
- #!/bin/bash
- # Wrapper to launch slotted Chromium via the chromium-common launcher script.
- export CHROME_DESKTOP="ungoogled-chromium-browser${browser_suffix}.desktop"
- export CHROME_EXEC_NAME="ungoogled-chromium-browser${browser_suffix}"
- export CHROME_VERSION_EXTRA="${SLOT}"
- export CHROME_WRAPPER="\$(readlink -f "\$0")"
- export OZONE_AUTO_SESSION=$(ozone_auto_session)
-
- exec /usr/libexec/chromium/chromium-launcher.sh "\$@"
- EOF
-
- chmod 755 "${D}${CHROMIUM_HOME}/chromium-launcher.sh" || die
-
- # It is important that we name the target "chromium-browser",
- # xdg-utils expect it; bug #355517.
- dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/ungoogled-chromium-browser${browser_suffix}
- # keep the old symlink around for consistency
- dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/ungoogled-chromium${browser_suffix}
-
- use enable-driver && dosym "${CHROMIUM_HOME}/chromedriver" /usr/bin/ungoogled-chromedriver${browser_suffix}
-
- pushd out/Release/locales > /dev/null || die
- chromium_remove_language_paks
- popd > /dev/null || die
-
- insinto "${CHROMIUM_HOME}"
- doins out/Release/*.bin
- doins out/Release/*.pak
- doins -r out/Release/hyphen-data
-
- if use bindist; then
- # We built libffmpeg as a component library, but we can't distribute it
- # with proprietary codec support. Remove it and make a symlink to the requested
- # system library.
- rm -f out/Release/libffmpeg.so \
- || die "Failed to remove bundled libffmpeg.so (with proprietary codecs)"
- # symlink the libffmpeg.so from either ffmpeg-chromium or ffmpeg[chromium].
- einfo "Creating symlink to libffmpeg.so from $(usex ffmpeg-chromium ffmpeg-chromium ffmpeg[chromium])..."
- dosym ../chromium/libffmpeg.so$(usex ffmpeg-chromium .${PV%%\.*} "") \
- /usr/$(get_libdir)/ungoogled-chromium-browser/libffmpeg.so
- fi
-
- (
- shopt -s nullglob
- local files=(out/Release/*.so out/Release/*.so.[0-9])
- [[ ${#files[@]} -gt 0 ]] && doins "${files[@]}"
- )
-
- if ! use system-icu && ! use headless; then
- doins out/Release/icudtl.dat
- fi
-
- doins -r out/Release/locales
- #doins -r out/Release/MEIPreload
-
- # Install vk_swiftshader_icd.json; bug #827861
- doins out/Release/vk_swiftshader_icd.json
-
- if [[ -d out/Release/swiftshader ]]; then
- insinto "${CHROMIUM_HOME}/swiftshader"
- doins out/Release/swiftshader/*.so
- fi
-
- use widevine && dosym WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so "${CHROMIUM_HOME}/libwidevinecdm.so"
-
- # Install icons
- local branding size
- for size in 16 24 32 48 64 128 256 ; do
- case ${size} in
- 16|32) branding="chrome/app/theme/default_100_percent/chromium" ;;
- *) branding="chrome/app/theme/chromium" ;;
- esac
- newicon -s ${size} "${branding}/product_logo_${size}.png" \
- ungoogled-chromium-browser${browser_suffix}.png
- done
-
- # Install desktop entry
- domenu out/Release/ungoogled-chromium-browser${browser_suffix}.desktop
-
- # Install GNOME default application entry (bug #303100).
- insinto /usr/share/gnome-control-center/default-apps
- doins out/Release/ungoogled-chromium-browser${browser_suffix}.xml
-
- # Install AppStream metadata
- insinto /usr/share/appdata
- doins out/Release/ungoogled-chromium-browser${browser_suffix}.appdata.xml
-
- # Install manpage; bug #684550
- doman out/Release/ungoogled-chromium-browser${browser_suffix}.1
- dosym ungoogled-chromium-browser${browser_suffix}.1 /usr/share/man/man1/ungoogled-chromium${browser_suffix}.1
-
- readme.gentoo_create_doc
-}
-
-pkg_postrm() {
- xdg_icon_cache_update
- xdg_desktop_database_update
-}
-
-pkg_postinst() {
- xdg_icon_cache_update
- xdg_desktop_database_update
- readme.gentoo_print_elog
-
- if use !headless && [[ -z "${REPLACING_VERSIONS}" ]]; then
- if use vaapi; then
- elog "Hardware-accelerated video decoding configuration:"
- elog
- elog "Chromium supports multiple backends for hardware acceleration. To enable one,"
- elog " Add to CHROMIUM_FLAGS in /etc/chromium/default:"
- elog
- elog "1. VA-API with OpenGL (recommended for most users):"
- elog " --enable-features=AcceleratedVideoDecodeLinuxGL"
- elog " VaapiVideoDecoder may need to be added as well, but try without first."
- elog
- if use wayland; then
- elog "2. Enhanced Wayland/EGL performance:"
- elog " --enable-features=AcceleratedVideoDecodeLinuxGL,AcceleratedVideoDecodeLinuxZeroCopyGL"
- elog
- fi
- if use X; then
- elog "$(usex wayland "3" "2"). VA-API with Vulkan:"
- elog " --enable-features=VaapiVideoDecoder,VaapiIgnoreDriverChecks,Vulkan,DefaultANGLEVulkan,VulkanFromANGLE"
- elog
- if use wayland; then
- elog " NOTE: Vulkan acceleration requires X11 and will not work under Wayland sessions."
- elog " Use OpenGL-based acceleration instead when running under Wayland."
- elog
- fi
- fi
- elog "Additional options:"
- elog " To enable hardware-accelerated encoding (if supported)"
- elog " add 'AcceleratedVideoEncoder' to your feature list"
- elog " VaapiIgnoreDriverChecks bypasses driver compatibility checks"
- elog " (may be needed for newer/unsupported hardware)"
- elog
- else
- elog "This Chromium build was compiled without VA-API support, which provides"
- elog "hardware-accelerated video decoding."
- fi
- if use screencast; then
- elog "Screencast is disabled by default at runtime. Either enable it"
- elog "by navigating to chrome://flags/#enable-webrtc-pipewire-capturer"
- elog "inside Chromium or add --enable-features=WebRTCPipeWireCapturer"
- elog "to CHROMIUM_FLAGS in /etc/chromium/default."
- elog
- elog "Additional setup may be required for screencasting to work."
- elog "See issue: https://github.com/PF4Public/gentoo-overlay/issues/314"
- fi
- if use gtk4; then
- elog "Chromium prefers GTK3 over GTK4 at runtime. To override this"
- elog "behaviour you need to pass --gtk-version=4, e.g. by adding it"
- elog "to CHROMIUM_FLAGS in /etc/chromium/default."
- fi
- if use widevine; then
- elog "widevine requires binary plugins, which are distributed separately"
- elog "Make sure you have www-plugins/chrome-binary-plugins installed"
- fi
- fi
-
- if systemd_is_booted && ! [[ -f "/etc/machine-id" ]]; then
- ewarn "The lack of an '/etc/machine-id' file on this system booted with systemd"
- ewarn "indicates that the Gentoo handbook was not followed to completion."
- ewarn ""
- ewarn "Chromium is known to behave unpredictably with this system configuration;"
- ewarn "please complete the configuration of this system before logging any bugs."
- fi
-
- # Stable slot doesn't change profile directory, and it's vanishingly unlikely that users will downgrade from dev.
- if [[ -n "${REPLACING_VERSIONS}" ]]; then
- local replacing_non_slotted=false
- # there could be more than one PVR
- for version in ${REPLACING_VERSIONS}; do
- if ver_test "${version}" -le "145.0.7632.116"; then
- replacing_non_slotted=true
- break
- fi
- done
- if ${replacing_non_slotted}; then
- ewarn "This version of Chromium has replaced a non-slotted ebuild."
- if [[ ${SLOT} != "stable" ]]; then
- ewarn "This channel has its own profile directory, so your existing profile will not be used."
- ewarn "To use your existing profile, either copy or move it to the new location."
- ewarn "See https://wiki.gentoo.org/wiki/Chromium#Profile_Directories for more information."
- ewarn ""
- fi
- ewarn "Any existing Progressive Web Apps (PWAs) will need to be reinstalled,"
- ewarn "or have the path in the desktop files updated to point to the new wrapper script."
- fi
- fi
-}
-
-eapply_wrapper () {
- if [ ! -z "${NODIE}" ]; then
- nonfatal eapply "$@"
- else
- eapply "$@"
- fi
-}
-
-git_wrapper () {
- if [ ! -z "${NODIE}" ]; then
- git "$@"
- else
- git "$@" || die
- fi
-}
-
-filter_wrapper () {
- einfo "Applying ${i##*/}"
- #? fuzz factor of 3 is OK?
- if [ ! -z "${NODIE}" ]; then
- filterdiff -p1 "${@:2}" < "$1" | patch -F 3 -p1
- else
- filterdiff -p1 "${@:2}" < "$1" | patch -F 3 -p1 || die
- fi
-}
diff --git a/www-client/ungoogled-chromium/ungoogled-chromium-150.0.7871.128_p1.ebuild b/www-client/ungoogled-chromium/ungoogled-chromium-150.0.7871.128_p1.ebuild
deleted file mode 100644
index c2e8105041be..000000000000
--- a/www-client/ungoogled-chromium/ungoogled-chromium-150.0.7871.128_p1.ebuild
+++ /dev/null
@@ -1,2528 +0,0 @@
-# Copyright 2009-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-# Use following environment variables to customise the build
-# EXTRA_GN — pass extra options to gn
-# NINJAOPTS="-k0 -j8" useful to populate ccache even if ebuild is still failing
-# UGC_SKIP_PATCHES — space-separated list of patches to skip
-# UGC_KEEP_BINARIES — space-separated list of binaries to keep
-# UGC_SKIP_SUBSTITUTION — space-separated list of files to skip domain substitution
-
-# USE=bundled-toolchain is intended for users who want to use the same toolchain
-# as the upstream releases. It's also a good fallback in case we fall behind
-# and need to get a release out quickly (less likely with `dev` in-tree).
-# We can't rely on it as a default since the toolchain is only shipped for x86-64;
-# other architectures will need to use system toolchain.
-
-# Since m133 we are using CI-generated tarballs from
-# https://github.com/chromium-linux-tarballs/chromium-tarballs/
-
-# These are bit-for-bit identical to the official releases, but are built
-# using an external CI system that we have some control over, in case
-# issues pop up again with official tarball generation.
-
-GN_MIN_VER=0.2374
-# chromium-tools/get-chromium-toolchain-strings.py (or just use Chromicler)
-# Node for M145+ should be 24.12.0 but that's not packaged in Gentoo yet. See #969145
-TEST_FONT="9c07d19d9c5ee1ff94f717e6fb17e0c8c354e6f9"
-BUNDLED_CLANG_VER="llvmorg-23-init-10931-g20b6ec66-11"
-BUNDLED_RUST_VER="4c4205163abcbd08948b3efab796c543ba1ea687-5"
-RUST_SHORT_HASH=${BUNDLED_RUST_VER:0:10}-${BUNDLED_RUST_VER##*-}
-NODE_VER="24.16.0-r1"
-ESBUILD_VER="0.25.1"
-ROLLUP_VER="4.57.1" # currently manual.
-
-CHROMIUM_LANGS="af am ar as az be bg bn bs ca cs cy da de el en-GB es es-419 et eu fa fi fil
- fr fr-CA gl gu he hi hr hu hy id is it ja ka kk km kn ko ky lo lt lv mk ml mn mr ms my
- nb ne nl or pa pl pt-BR pt-PT ro ru si sk sl sq sr sr-Latn sv sw ta te th tr uk ur uz
- vi zh-CN zh-HK zh-TW zu"
-
-#UGC_COMMIT_ID="3a1e4997f632b1e32552adb39f0e2007bd78b3a3"
-# UGC_PR_COMMITS=(
-# c917e096342e5b90eeea91ab1f8516447c8756cf
-# 5794e9d12bf82620d5f24505798fecb45ca5a22d
-# )
-
-CROMITE_COMMIT_ID="cb3baf14f52eb4365d017f640f85310735c19b79"
-
-declare -A CHROMIUM_COMMITS=(
-# ["fcfb1a42813f1e9d8babedc7bb2e0f06101a3151"]="." #148+
- ["-cf94ed446320d35c8613ed9b3ffb6e6a61bfcb5f"]="."
-# # ["-37c28a19804e47a68eabf3cf882a310689fc325b"]="." #disable style check for cromite
-# # ["cd5a0df905a28faa89ff2a4ab44f893f84dc4487"]="net/third_party/quiche/src"
-)
-
-LLVM_COMPAT=( 21 22 23 )
-PYTHON_COMPAT=( python3_{13..14} )
-PYTHON_REQ_USE="xml(+)"
-RUST_MIN_VER=1.91.0
-RUST_NEEDS_LLVM="yes please"
-RUST_OPTIONAL="yes" # Not actually optional, but we don't need system Rust (or LLVM) with USE=bundled-toolchain
-RUST_REQ_USE="rustfmt" # Upstream run rustfmt on bindgen output, so we need it to be available.
-
-inherit check-reqs chromium-2 desktop flag-o-matic llvm-r1 multiprocessing ninja-utils pax-utils
-inherit python-any-r1 readme.gentoo-r1 rust systemd toolchain-funcs xdg-utils
-
-DESCRIPTION="Modifications to Chromium for removing Google integration and enhancing privacy"
-HOMEPAGE="https://github.com/ungoogled-software/ungoogled-chromium"
-PPC64_HASH="a85b64f07b489b8c6fdb13ecf79c16c56c560fc6"
-PATCH_V="${PV%%\.*}-1"
-COPIUM_COMMIT="b00f26bb5e0781020da5f830981472a142c6baf1"
-SRC_URI="https://github.com/chromium-linux-tarballs/chromium-tarballs/releases/download/${PV/_*}/chromium-${PV/_*}-linux.tar.xz
- https://deps.gentoo.zip/www-client/chromium/rollup-wasm-node-${ROLLUP_VER}.tgz
- https://gitlab.com/Matt.Jolly/chromium-patches/-/archive/${PATCH_V}/chromium-patches-${PATCH_V}.tar.bz2
- !bundled-toolchain? (
- https://codeberg.org/selfisekai/copium/archive/${COPIUM_COMMIT}.tar.gz
- -> chromium-patches-copium-${COPIUM_COMMIT:0:10}.tar.gz
- )
- bundled-toolchain? (
- https://commondatastorage.googleapis.com/chromium-browser-clang/Linux_x64/clang-${BUNDLED_CLANG_VER}.tar.xz
- -> chromium-clang-${BUNDLED_CLANG_VER}.tar.xz
- https://commondatastorage.googleapis.com/chromium-browser-clang/Linux_x64/rust-toolchain-${BUNDLED_RUST_VER}-${BUNDLED_CLANG_VER%-*}.tar.xz
- -> chromium-rust-toolchain-${RUST_SHORT_HASH}-${BUNDLED_CLANG_VER%-*}.tar.xz
- )
- test? (
- https://chromium-fonts.storage.googleapis.com/${TEST_FONT} -> chromium-testfonts-${TEST_FONT:0:10}.tar.gz
- )
- ppc64? (
- https://gitlab.raptorengineering.com/raptor-engineering-public/chromium/openpower-patches/-/archive/${PPC64_HASH}/openpower-patches-${PPC64_HASH}.tar.bz2 -> chromium-openpower-${PPC64_HASH:0:10}.tar.bz2
- )
-"
-
-# Gentoo tarball:
-# https://chromium-tarballs.distfiles.gentoo.org/chromium-${PV/_*}.tar.xz -> chromium-${PV/_*}-gentoo.tar.xz
-
-# chromium-linux-tarballs
-# https://github.com/chromium-linux-tarballs/chromium-tarballs/releases/download/${PV/_*}/chromium-${PV/_*}-linux.tar.xz
-
-# Official tarball:
-# https://commondatastorage.googleapis.com/chromium-browser-official/chromium-${PV/_*}${LITE_TARBALL:+-lite}.tar.xz
-
-# https://gitweb.gentoo.org/proj/chromium-tools.git/tree/get-chromium-licences.py @ 145.0.7632.76
-LICENSE="Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD BSD-2 Base64 Boost-1.0 CC-BY-3.0 CC-BY-4.0 Clear-BSD FFT2D FTL"
-LICENSE+=" IJG ISC LGPL-2 LGPL-2.1 MIT MPL-1.1 MPL-2.0 Ms-PL PSF-2 SGI-B-2.0 SSLeay SunSoft Unicode-3.0"
-LICENSE+=" Unicode-DFS-2015 Unlicense UoI-NCSA ZLIB libtiff openssl"
-LICENSE+=" cromite? ( GPL-3 )"
-
-SLOT="stable"
-KEYWORDS="amd64 ~arm64 ~ppc64 ~x86"
-
-IUSE_SYSTEM_LIBS="abseil-cpp av1 brotli crc32c double-conversion ffmpeg +harfbuzz icu jsoncpp +libusb libvpx +openh264 openjpeg re2 snappy woff2 +zstd"
-IUSE="+X bindist bluetooth bundled-toolchain cfi convert-dict cups custom-cflags debug ffmpeg-chromium enable-driver gtk4 hangouts headless kerberos +libcxx nvidia +official optimize-thinlto optimize-webui override-data-dir pax-kernel pgo"
-IUSE+=" +proprietary-codecs pulseaudio qt6 screencast selinux test thinlto cromite vaapi wayland widevine cpu_flags_ppc_vsx3"
-RESTRICT="
- !bindist? ( bindist )
- !test? ( test )
- arm64? ( test )
- !system-ffmpeg? ( proprietary-codecs? ( bindist ) )
- !system-openh264? ( bindist )
- cromite? ( bindist )"
-
-REQUIRED_USE="
- !headless? ( || ( X wayland ) )
- screencast? ( wayland )
- ffmpeg-chromium? ( bindist proprietary-codecs )
- optimize-thinlto? ( thinlto )
- cfi? ( thinlto )
- x86? ( !thinlto !widevine )
- debug? ( !official )
- vaapi? ( !system-av1 !system-libvpx )
-"
-
-UGC_PV="${PV/_p/-}"
-UGC_PF="${PN}-${UGC_PV}"
-UGC_URL="https://github.com/ungoogled-software/${PN}/archive/"
-
-if [ -z "$UGC_COMMIT_ID" ]; then
- UGC_URL="${UGC_URL}${UGC_PV}.tar.gz -> ${UGC_PF}.tar.gz"
- UGC_WD="${WORKDIR}/${UGC_PF}"
-else
- UGC_URL="${UGC_URL}${UGC_COMMIT_ID}.tar.gz -> ${PN}-${UGC_COMMIT_ID}.tar.gz"
- UGC_WD="${WORKDIR}/ungoogled-chromium-${UGC_COMMIT_ID}"
-fi
-
-SRC_URI+="${UGC_URL}
-"
-
-if [ ! -z "${UGC_PR_COMMITS[*]}" ]; then
- for i in "${UGC_PR_COMMITS[@]}"; do
- SRC_URI+="https://github.com/ungoogled-software/${PN}/commit/$i.patch?full_index=true -> ${PN}-$i.patch
- "
- done
-fi
-
-if [ ! -z "${CHROMIUM_COMMITS[*]}" ]; then
- # for i in "${CHROMIUM_COMMITS[@]}"; do
- for i in "${!CHROMIUM_COMMITS[@]}"; do
- if [[ ${CHROMIUM_COMMITS[$i]} =~ webrtc ]]; then
- #TODO: is it safe to use this mirror?
- SRC_URI+="https://github.com/webrtc-mirror/webrtc/commit/${i/-}.patch?full_index=true -> webrtc-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ angle ]]; then
- SRC_URI+="https://github.com/google/angle/commit/${i/-}.patch?full_index=true -> angle-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ quiche ]]; then
- SRC_URI+="https://github.com/google/quiche/commit/${i/-}.patch?full_index=true -> quiche-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ dawn ]]; then
- SRC_URI+="https://github.com/google/dawn/commit/${i/-}.patch?full_index=true -> dawn-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ perfetto ]]; then
- SRC_URI+="https://github.com/google/perfetto/commit/${i/-}.patch?full_index=true -> perfetto-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ink ]]; then
- SRC_URI+="https://github.com/google/ink/commit/${i/-}.patch?full_index=true -> ink-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ vulkan-utility-libraries ]]; then
- SRC_URI+="https://github.com/KhronosGroup/Vulkan-Utility-Libraries/commit/${i/-}.patch?full_index=true -> vulkan-utility-libraries-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ruy ]]; then
- SRC_URI+="https://github.com/google/ruy/commit/${i/-}.patch?full_index=true -> ruy-${i/-}.patch
- "
- else
- SRC_URI+="https://github.com/chromium/chromium/commit/${i/-}.patch?full_index=true -> chromium-${i/-}.patch
- "
- fi
- done
-fi
-
-SRC_URI+="cromite? ( https://github.com/uazo/cromite/archive/${CROMITE_COMMIT_ID}.tar.gz -> cromite-${CROMITE_COMMIT_ID}.tar.gz )
-"
-
-for i in ${IUSE_SYSTEM_LIBS}; do
- [[ $i =~ ^(\+)?(.*)$ ]]
- IUSE+=" ${BASH_REMATCH[1]}system-${BASH_REMATCH[2]}"
-done
-
-COMMON_X_DEPEND="
- x11-libs/libXcomposite:=
- x11-libs/libXcursor:=
- x11-libs/libXdamage:=
- x11-libs/libXfixes:=
- >=x11-libs/libXi-1.6.0:=
- x11-libs/libXrandr:=
- x11-libs/libXrender:=
- x11-libs/libXtst:=
- x11-libs/libxshmfence:=
-"
-
-# sys-libs/zlib: https://bugs.gentoo.org/930365; -ng is not compatible.
-# We _could_ use the bundled minizip, but that's against policy.
-COMMON_SNAPSHOT_DEPEND="
- system-icu? ( >=dev-libs/icu-78:= )
- system-abseil-cpp? ( >=dev-cpp/abseil-cpp-20260107.0 )
- system-brotli? ( >=app-arch/brotli-9999 )
- system-crc32c? ( dev-libs/crc32c )
- system-double-conversion? ( dev-libs/double-conversion )
- system-woff2? ( media-libs/woff2 )
- system-snappy? ( app-arch/snappy )
- system-jsoncpp? ( dev-libs/jsoncpp )
- system-openjpeg? ( media-libs/openjpeg:2= )
- system-re2? ( >=dev-libs/re2-0.2019.08.01:= )
- system-libvpx? ( >=media-libs/libvpx-1.13.0:=[postproc] )
- system-libusb? ( virtual/libusb:1 )
- cromite? ( dev-util/patchutils )
- >=dev-libs/libxml2-2.12.4:=[icu]
- dev-libs/nspr:=
- >=dev-libs/nss-3.26:=
- dev-libs/libxslt:=
- media-libs/fontconfig:=
- >=media-libs/freetype-2.11.0-r1:=
- system-harfbuzz? ( >=media-libs/harfbuzz-3:0=[icu(-)] )
- media-libs/libjpeg-turbo:=
- media-libs/libpng:=
- system-zstd? ( >=app-arch/zstd-1.5.5:= )
- >=media-libs/libwebp-0.4.0:=
- media-libs/mesa:=[gbm(+)]
- >=media-libs/openh264-2.6.0:=
- system-av1? (
- >=media-libs/dav1d-1.0.0:=
- >=media-libs/libaom-3.7.0:=
- )
- sys-libs/zlib:=
- !headless? (
- dev-libs/glib:2
- >=media-libs/alsa-lib-1.0.19:=
- media-video/pipewire:=
- pulseaudio? (
- || (
- media-libs/libpulse
- >=media-sound/apulse-0.1.9
- )
- )
- sys-apps/pciutils:=
- kerberos? ( virtual/krb5 )
- vaapi? ( >=media-libs/libva-2.7:=[X?,wayland?] )
- X? (
- x11-base/xorg-proto:=
- x11-libs/libX11:=
- x11-libs/libxcb:=
- x11-libs/libXext:=
- )
- x11-libs/libxkbcommon:=
- wayland? (
- screencast? ( media-video/pipewire:= )
- dev-libs/libffi:=
- dev-libs/wayland:=
- screencast? (
- media-video/pipewire:=
- || (
- sys-apps/xdg-desktop-portal-gnome
- sys-apps/xdg-desktop-portal-gtk
- kde-plasma/xdg-desktop-portal-kde
- gui-libs/xdg-desktop-portal-lxqt
- gui-libs/xdg-desktop-portal-wlr
- )
- )
- )
- )
-"
-
-COMMON_DEPEND="
- ${COMMON_SNAPSHOT_DEPEND}
- app-arch/bzip2:=
- dev-libs/expat:=
- system-ffmpeg? (
- >=media-video/ffmpeg-6.1:=
- >=media-libs/opus-1.3.1:=
- )
- net-misc/curl[ssl]
- sys-apps/dbus:=
- media-libs/flac:=
- sys-libs/zlib:=[minizip]
- !headless? (
- >=app-accessibility/at-spi2-core-2.46.0:2
- media-libs/mesa:=[X?,wayland?]
- virtual/udev
- x11-libs/cairo:=
- x11-libs/gdk-pixbuf:2
- x11-libs/pango:=
- cups? ( >=net-print/cups-1.3.11:= )
- qt6? ( dev-qt/qtbase:6[gui,widgets] )
- X? ( ${COMMON_X_DEPEND} )
- )
-"
-RDEPEND="${COMMON_DEPEND}
- !www-client/ungoogled-chromium:0
- >=www-client/chromium-common-2
- !headless? (
- || (
- x11-libs/gtk+:3[X?,wayland?]
- gui-libs/gtk:4[X?,wayland?]
- )
- qt6? ( dev-qt/qtbase:6[X?,wayland?] )
- )
- virtual/ttf-fonts
- selinux? ( sec-policy/selinux-chromium )
- bindist? (
- ffmpeg-chromium? ( media-video/ffmpeg-chromium:${PV%%\.*} )
- )
- !override-data-dir? (
- !www-client/chromium:${SLOT}
- !www-client/cromite:${SLOT}[-override-data-dir]
- )
-"
-# For M149+ pipewire is a mandatory build-time dependency, but it's optional at runtime for most configurations.
-DEPEND="${COMMON_DEPEND}
- !headless? (
- media-video/pipewire
- gtk4? ( gui-libs/gtk:4[X?,wayland?] )
- !gtk4? ( x11-libs/gtk+:3[X?,wayland?] )
- )
-"
-
- # pgo? ( >=llvm-core/clang-22.0.0_pre20260106 >=llvm-core/lld-22.0.0_pre20260106 )
-BDEPEND="
- ${COMMON_SNAPSHOT_DEPEND}
- ${PYTHON_DEPS}
- $(python_gen_any_dep '
- dev-python/setuptools[${PYTHON_USEDEP}]
- ')
- >=app-arch/gzip-1.7
- !headless? (
- qt6? ( dev-qt/qtbase:6 )
- )
- !bundled-toolchain? ( $(llvm_gen_dep '
- llvm-core/clang:${LLVM_SLOT}
- llvm-core/llvm:${LLVM_SLOT}
- cfi? ( llvm-runtimes/clang-runtime:${LLVM_SLOT}[sanitize] )
- official? (
- !ppc64? ( llvm-runtimes/compiler-rt-sanitizers:${LLVM_SLOT}[cfi] )
- ) ')
- || (
- $(llvm_gen_dep 'llvm-core/lld:${LLVM_SLOT}')
- >=sys-devel/mold-2.41.0
- )
- ${RUST_DEPEND}
- )
- >=dev-util/bindgen-0.72.1
- >=dev-build/gn-${GN_MIN_VER}
- app-alternatives/ninja
- dev-lang/perl
- >=dev-util/gperf-3.2
- dev-util/esbuild:${ESBUILD_VER}
- dev-vcs/git
- >=net-libs/nodejs-${NODE_VER}[inspector]
- sys-apps/hwdata
- >=sys-devel/bison-2.4.3
- sys-devel/flex
- virtual/pkgconfig
- x11-misc/xdg-utils
-"
-
-if ! has chromium_pkg_die ${EBUILD_DEATH_HOOKS}; then
- EBUILD_DEATH_HOOKS+=" chromium_pkg_die";
-fi
-
-DISABLE_AUTOFORMATTING="yes"
-DOC_CONTENTS="
-Some web pages may require additional fonts to display properly.
-Try installing some of the following packages if some characters
-are not displayed properly:
-- media-fonts/arphicfonts
-- media-fonts/droid
-- media-fonts/ipamonafont
-- media-fonts/noto
-- media-fonts/ja-ipafonts
-- media-fonts/takao-fonts
-- media-fonts/wqy-microhei
-- media-fonts/wqy-zenhei
-
-To fix broken icons on the Downloads page, you should install an icon
-theme that covers the appropriate MIME types, and configure this as your
-GTK+ icon theme.
-
-For native file dialogs in KDE, install kde-apps/kdialog.
-
-To make password storage work with your desktop environment you may
-have install one of the supported credentials management applications:
-- app-crypt/libsecret (GNOME)
-- kde-frameworks/kwallet (KDE)
-If you have one of above packages installed, but don't want to use
-them in Chromium, then add --password-store=basic to CHROMIUM_FLAGS
-in /etc/chromium/default.
-"
-
-S="${WORKDIR}/chromium-${PV/_*}"
-
-python_check_deps() {
- python_has_version "dev-python/setuptools[${PYTHON_USEDEP}]"
-}
-
-pre_build_checks() {
- # Check build requirements: bugs #471810, #541816, #914220
- # We're going to start doing maths here on the size of an unpacked source tarball,
- # this should make updates easier as chromium continues to balloon in size.
- # xz -l /var/cache/distfiles/chromium-${PV}*.tar.xz
- local base_disk=9 # Round up
- use test && base_disk=$((base_disk + 5))
- local extra_disk=1 # Always include a little extra space
- local memory=4
- tc-is-cross-compiler && extra_disk=$((extra_disk * 2))
- if tc-is-lto || use pgo; then
- memory=$((memory * 2 + 1))
- tc-is-cross-compiler && extra_disk=$((extra_disk * 2)) # Double the requirements
- use pgo && extra_disk=$((extra_disk + 4))
- fi
- if is-flagq '-g?(gdb)?([1-9])'; then
- if use custom-cflags; then
- extra_disk=$((extra_disk + 5))
- fi
- memory=$((memory * 2))
- fi
- local CHECKREQS_MEMORY="${memory}G"
- local CHECKREQS_DISK_BUILD="$((base_disk + extra_disk))G"
- check-reqs_${EBUILD_PHASE_FUNC}
-}
-
-pkg_pretend() {
- if [[ ${MERGE_TYPE} != binary ]]; then
- # The pre_build_checks are all about compilation resources, no need to run it for a binpkg
- pre_build_checks
- fi
-
- if use headless; then
- local headless_unused_flags=("cups" "kerberos" "pulseaudio" "qt6" "vaapi" "wayland")
- for myiuse in ${headless_unused_flags[@]}; do
- use ${myiuse} && ewarn "Ignoring USE=${myiuse}, USE=headless is set."
- done
- fi
-
- if ! use bindist && use ffmpeg-chromium; then
- ewarn "Ignoring USE=ffmpeg-chromium, USE=bindist is not set."
- fi
- if use libcxx; then
- ewarn
- ewarn "Building with libcxx, please be aware that system-*"
- ewarn "and some other c++ dependencies need to be compiled"
- ewarn "with the same c++ library as ungoogled-chromium itself"
- ewarn "dev-libs/jsoncpp is most problematic, see #58 #49 #119 for details"
- ewarn "Simplest solution would be to disable corresponding system-* flags"
- ewarn
- fi
- if use cfi; then
- ewarn
- ewarn "Building with cfi is only possible if building with -stdlib=libc++"
- ewarn "Make sure all dependencies are also built this way, see #40"
- ewarn
- fi
- if use cromite; then
- ewarn
- ewarn "Cromite patches are very experimental and unstable"
- ewarn "Please consider testing them and giving feedback upstream:"
- ewarn "https://github.com/uazo/cromite/issues"
- ewarn "Not all patches are applied, let me know if others should be considered too"
- ewarn
- fi
-}
-
-pkg_setup() {
- if [[ ${MERGE_TYPE} != binary ]]; then
- # The pre_build_checks are all about compilation resources, no need to run it for a binpkg
- pre_build_checks
-
- # We haven't massaged any CFLAGS yet, so we want to do this before we force CC/CXX to prevent warnings.
- local want_lto="false"
- tc-is-lto && want_lto="true"
-
- # The linux:unbundle toolchain in GN grabs CC, CXX, CPP (etc) from the environment
- # We'll set these to clang here then use llvm-utils functions to very explicitly set these
- # to a sane value.
- # This is effectively the 'force-clang' path if GCC support is re-added.
- if use !bundled-toolchain; then
- llvm-r1_pkg_setup
- rust_pkg_setup
-
- # Forcing clang; respect llvm_slot_x to enable selection of impl via LLVM_COMPAT
- AR=llvm-ar
- CPP="${CHOST}-clang++-${LLVM_SLOT} -E"
- NM=llvm-nm
- CC="${CHOST}-clang-${LLVM_SLOT}"
- CXX="${CHOST}-clang++-${LLVM_SLOT}"
- fi
-
- # LTO in Chromium means LLVM ThinLTO, if GCC support is re-added
- # We'll need to handle that here too.
- use_lto="false"
- local lto_usable="true"
- if [[ "$want_lto" == "true" ]]; then
- if use arm64 && [[ "${LLVM_SLOT}" -lt 22 ]]; then
- einfo "LTO is broken with LLVM 21 on arm64, ignoring CFLAGS."
- lto_usable="false"
- else
- use_lto="true"
- fi
- # We can rely on GN to do this for us; without this builds
- # take significantly longer with LTO enabled.
- filter-lto
- fi
-
- if [[ "$use_lto" == "false" ]] && use official && [[ "$lto_usable" == "true" ]]; then
- einfo "USE=official selected and LTO not detected."
- einfo "It is _highly_ recommended that LTO be enabled for performance reasons"
- einfo "and to be consistent with the upstream \"official\" build optimisations."
- fi
-
- if [[ "$use_lto" == "false" ]] && use test; then
- die "Tests require CFI which requires LTO"
- fi
-
- export use_lto
-
- if tc-is-cross-compiler; then
- use pgo && die "The pgo USE flag cannot be used when cross-compiling"
- CPP="${CBUILD}-clang++-${LLVM_SLOT} -E"
- fi
-
- # Sanity checks for development convenience
- if ver_test $(gn --version || die) -lt ${GN_MIN_VER}; then
- die "dev-build/gn >= ${GN_MIN_VER} is required to build this Chromium"
- fi
-
- # Sometimes, when adding a new LLVM slot, devs (me) forget to install an appropriate lld.
- if tc-ld-is-lld; then
- local lld_ver=$(ld.lld --version | awk '{split($2,a,"."); print a[1]}' || die "Failed to check lld version")
- if [[ ${lld_ver} -lt ${LLVM_SLOT} ]]; then
- die "Your lld version (${lld_ver}) is too old for the selected LLVM slot (${LLVM_SLOT}). Please install a newer lld or select an older LLVM slot."
- fi
- fi
- fi
-
- chromium_suid_sandbox_check_kernel_config
-}
-
-src_unpack() {
- # # Here be dragons!
- # local XCLD="--exclude=chromium-${PV/_*}/third_party/instrumented_libs \
- # --exclude=chromium-${PV/_*}/third_party/llvm \
- # --exclude=chromium-${PV/_*}/third_party/llvm-build \
- # --exclude=chromium-${PV/_*}/third_party/node/linux \
- # --exclude=chromium-${PV/_*}/third_party/rust-src \
- # --exclude=chromium-${PV/_*}/third_party/rust-toolchain \
- # --exclude=chromium-${PV/_*}/build/linux/debian_bullseye_i386-sysroot \
- # --exclude=chromium-${PV/_*}/build/linux/debian_bullseye_amd64-sysroot \
- # --exclude=chromium-${PV/_*}/third_party/angle/third_party/VK-GL-CTS \
- # "
-
- # if ! use libcxx ; then
- # XCLD+=" --exclude=chromium-${PV/_*}/third_party/libc++"
- # fi
-
- # if ! use pgo ; then
- # XCLD+=" --exclude=chromium-${PV/_*}/chrome/build/pgo_profiles"
- # fi
-
- # einfo "Unpacking chromium-${PV/_*}.tar.xz to ${WORKDIR}"
- # # Gentoo tarball:
- # # tar ${XCLD} -xf "${DISTDIR}/chromium-${PV/_*}-gentoo.tar.xz" -C "${WORKDIR}" || die
- # tar ${XCLD} -xf "${DISTDIR}/chromium-${PV/_*}${LITE_TARBALL:+-lite}.tar.xz" -C "${WORKDIR}" || die
-
- # unpack ${UGC_URL#*->}
- # # unpack chromium-patches-${PATCH_V}.tar.bz2
- # # Warned you!
-
- unpack chromium-${PV/_*}-linux.tar.xz
- unpack chromium-patches-${PATCH_V}.tar.bz2
- # These should only be required when we're not using the official toolchain
- if use !bundled-toolchain; then
- unpack chromium-patches-copium-${COPIUM_COMMIT:0:10}.tar.gz
- fi
-
- if use test; then
- # This just contains a bunch of font files that need to be unpacked (or moved) to the correct location.
- local testfonts_dir="${WORKDIR}/chromium-${PV/_*}/third_party/test_fonts/test_fonts"
- local testfonts_tar="${DISTDIR}/chromium-testfonts-${TEST_FONT:0:10}.tar.gz"
- einfo "Unpacking test fonts ..."
- tar xf "${testfonts_tar}" -C "${testfonts_dir}" || die "Failed to unpack testfonts"
- fi
-
- # We need to manually unpack this since M126 else we'd unpack one toolchain over the other.
- # Since we're doing that anyway let's unpack to sensible locations to make symlink creation easier.
- if use bundled-toolchain; then
- einfo "Unpacking bundled Clang ..."
- mkdir -p "${WORKDIR}"/clang || die "Failed to create clang directory"
- tar xf "${DISTDIR}/chromium-clang-${BUNDLED_CLANG_VER}.tar.xz" -C "${WORKDIR}/clang" || die "Failed to unpack Clang"
- einfo "Unpacking bundled Rust ..."
- local rust_dir="${WORKDIR}/rust-toolchain"
- mkdir -p "${rust_dir}" || die "Failed to create rust toolchain directory"
- tar xf "${DISTDIR}/chromium-rust-toolchain-${RUST_SHORT_HASH}-${BUNDLED_CLANG_VER%-*}.tar.xz" -C "${rust_dir}" ||
- die "Failed to unpack Rust"
- fi
-
- if use ppc64; then
- unpack chromium-openpower-${PPC64_HASH:0:10}.tar.bz2
- fi
-
- # This is a dirty hack, but we need rollup to build successfully and it's proving to be challenging
- # to build locally due to deps
- unpack rollup-wasm-node-${ROLLUP_VER}.tgz
-
- if use cromite; then
- unpack cromite-${CROMITE_COMMIT_ID}.tar.gz
- fi
-
- unpack ${UGC_URL#*->}
-}
-
-remove_compiler_builtins() {
- # We can't use the bundled compiler builtins with the system toolchain
- # We used to `grep` then `sed`, but it was indirect. Combining the two into a single
- # `awk` command is more efficient and lets us document the logic more clearly.
-
- local pattern=' configs += [ "//build/config/clang:compiler_builtins" ]'
- local target='build/config/compiler/BUILD.gn'
-
- local tmpfile
- tmpfile=$(mktemp) || die "Failed to create temporary file."
-
- if awk -v pat="${pattern}" '
- BEGIN {
- match_found = 0
- }
-
- # If the delete countdown is active, decrement it and skip to the next line.
- d > 0 { d--; next }
-
- # If the current line matches the pattern...
- $0 == pat {
- match_found = 1 # ...set our flag to true.
- d = 2 # Set delete counter for this line and the next two.
- prev = "" # Clear the buffered previous line so it is not printed.
- next
- }
-
- # For any other line, print the buffered previous line.
- NR > 1 { print prev }
-
- # Buffer the current line to be printed on the next cycle.
- { prev = $0 }
-
- END {
- # Print the last line if it was not part of a deleted block.
- if (d == 0) { print prev }
-
- # If the pattern was never found, exit with a failure code.
- if (match_found == 0) {
- exit 1
- }
- }
- ' "${target}" > "${tmpfile}"; then
- # AWK SUCCEEDED (exit code 0): The pattern was found and edited.
- # This is to avoid gawk's `-i inplace` option which users complain about.
- mv "${tmpfile}" "${target}"
- else
- # AWK FAILED (exit code 1): The pattern was not found.
- rm -f "${tmpfile}"
- die "Awk patch failed: Pattern not found in ${target}."
- fi
-}
-
-src_prepare() {
- # Calling this here supports resumption via FEATURES=keepwork
- python_setup
-
- # We'll fill this in as we go. Patches go in chromium-patches.
- local PATCHES=()
-
- rm "${WORKDIR}/chromium-patches-${PATCH_V}/common/cr131-unbundle-icu-target.patch"
- if ver_test "${RUST_SLOT}" -ge "1.95.0"; then
- rm "${WORKDIR}/chromium-patches-${PATCH_V}/rust/cr146-fix-botched-bytemuck-roll.patch"
- sed -i '/SupportedLaneCount/d' third_party/rust/chromium_crates_io/vendor/bytemuck-v1/src/zeroable.rs || die
- sed -i '/SupportedLaneCount/d' third_party/rust/chromium_crates_io/vendor/bytemuck-v1/src/pod.rs || die
- fi
-
- #cp -f ${WORKDIR}/chromium-patches-${PATCH_V}/*-compiler.patch "${T}/compiler.patch"
- ##cp -f ${FILESDIR}/chromium-147-compiler.patch "${T}/compiler.patch"
- #if ! use custom-cflags; then #See #25 #92
- # sed -i '/default_stack_frames/Q' "${T}/compiler.patch" || die
- #fi
-
- PATCHES+=( "${WORKDIR}/chromium-patches-${PATCH_V}/common/" )
- PATCHES+=( "${FILESDIR}/restore-x86-r4.patch" )
-
- # https://issues.chromium.org/issues/442698344
- # Unreleased fontconfig changed magic numbers and google have rolled to this version
- if has_version "<=media-libs/fontconfig-2.17.1"; then
- PATCHES+=( "${FILESDIR}/chromium-142-work-with-old-fontconfig.patch" )
- fi
-
- if use bundled-toolchain; then
- # We need to symlink the toolchain into the expected location
- einfo "Symlinking Clang toolchain to expected location ..."
- mkdir -p third_party/llvm-build/ || die "Failed to create llvm-build directory"
- # the 'Chromium Linux Tarballs' seem to already have 'Release+Asserts/{lib,bin}'; not sure if this is an
- # upstream change - we're using the same scripts to build, theoretically. We'll still attempt to create
- # llvm-build, but we'll rm Release+Asserts and symlink directly.
- if [[ -d third_party/llvm-build/Release+Asserts ]]; then
- rm -r third_party/llvm-build/Release+Asserts || die "Failed to remove third_party/llvm-build/Release+Asserts"
- fi
- ln -s "${WORKDIR}"/clang third_party/llvm-build/Release+Asserts || die "Failed to bundle Clang"
- einfo "Symlinking Rust toolchain to expected location ..."
- # As above, so below
- if [[ -d third_party/rust-toolchain ]]; then
- rm -r third_party/rust-toolchain || die "Failed to remove third_party/rust-toolchain"
- fi
- ln -s "${WORKDIR}"/rust-toolchain third_party/rust-toolchain || die "Failed to bundle rust"
- cp "${WORKDIR}"/rust-toolchain/VERSION \
- "${WORKDIR}"/rust-toolchain/INSTALLED_VERSION || die "Failed to set rust version"
- else
- # We don't need our toolchain patches if we're using the official toolchain
-
- # Copium patches go here.
- PATCHES+=(
- "${WORKDIR}/copium/cr143-libsync-__BEGIN_DECLS.patch"
- "${WORKDIR}/copium/cr149-unbundle-minizip-undo-unicode.patch"
- )
-
- # Automate conditional application of chromium-patches
- # The directory structure is expected to be something like:
- # chromium-patches-145/
- # ├── toolchain/
- # │ ├── cr123-foo.patch
- # │ └── cr135-bar.patch
- # ├── llvm/
- # │ ├── cr144-baz.patch
- # │ └── lt-23/
- # │ └── cr145-bleeding-edge-llvm-feature.patch
- # Where `lt-23` means "apply this patch if the LLVM version is less than 23".
- # Only categories in `slot_map` will be checked for version constraints.
- shopt -s nullglob
- local -A slot_map=( [llvm]="${LLVM_SLOT}" [rust]="${RUST_SLOT}" )
-
- for category in "${WORKDIR}/chromium-patches-${PATCH_V}"/*/; do
- local category_name="${category%/}"
- category_name="${category_name##*/}"
-
- # Skip arch-specific categories
- if [[ "${category_name}" == "ppc64le" ]]; then
- use ppc64 || continue
- fi
-
- # We applied common patches above, no need to apply them again here
- [[ "${category_name}" == "common" ]] && continue
-
- # Unconditional patches for this category
- local category_patches=( "${category}"*.patch )
- [[ ${#category_patches[@]} -gt 0 ]] && PATCHES+=( "${category}" )
-
- # Version-constrained subdirectories (e.g., llvm/lt-23/)
- for constraint_dir in "${category}"*/; do
- local dir_name="${constraint_dir%/}"
- dir_name="${dir_name##*/}"
- if [[ "${dir_name}" =~ ^lt-(.*)$ && -v slot_map[${category_name}] ]]; then
- ver_test "${slot_map[${category_name}]}" -lt "${BASH_REMATCH[1]}" &&
- PATCHES+=( "${constraint_dir}" )
- fi
- done
- done
-
- shopt -u nullglob
-
- # Strictly speaking this doesn't need to be gated (no bundled toolchain for ppc64); it keeps the logic together
- if use ppc64; then
- local patchset_dir="${WORKDIR}/openpower-patches-${PPC64_HASH}/patches"
- # patch causes build errors on 4K page systems (https://bugs.gentoo.org/show_bug.cgi?id=940304)
- local page_size_patch="ppc64le/third_party/use-sysconf-page-size-on-ppc64.patch"
- local isa_3_patch="ppc64le/core/baseline-isa-3-0.patch"
- # Apply the OpenPOWER patches (check for page size and isa 3.0)
- openpower_patches=( $(grep -E "^ppc64le|^upstream" "${patchset_dir}/series" | grep -v "${page_size_patch}" |
- grep -v "${isa_3_patch}" || die) )
- for patch in "${openpower_patches[@]}"; do
- PATCHES+=( "${patchset_dir}/${patch}" )
- done
- if [[ $(getconf PAGESIZE) == 65536 ]]; then
- PATCHES+=( "${patchset_dir}/${page_size_patch}" )
- fi
- # We use vsx3 as a proxy for 'want isa3.0' (POWER9)
- if use cpu_flags_ppc_vsx3 ; then
- PATCHES+=( "${patchset_dir}/${isa_3_patch}" )
- fi
- fi
-
- remove_compiler_builtins
-
- # We can't rely on the eselect'd Rust to actually include rustfmt, so we'll point to the selected slot specifically.
- local suffix=""
- if [[ "${RUST_TYPE}" == "binary" ]]; then
- suffix="-bin-${RUST_SLOT}"
- else
- suffix="-${RUST_SLOT}"
- fi
- sed -i "s|/bin/rustfmt|/bin/rustfmt${suffix}|g" build/rust/rust_bindgen_generator.gni ||
- die "Failed to update rustfmt path"
-
- fi
-
- # Do this before we apply patches since (e.g.) ppc64 needs to patch rollup and it's easier in ${S}
- einfo "Moving rollup wasm-node package into place ..."
- mkdir -p third_party/devtools-frontend/src/node_modules/@rollup/wasm-node ||
- die "Failed to create node_modules/@rollup/wasm-node"
- mv "${WORKDIR}"/package/* third_party/devtools-frontend/src/node_modules/@rollup/wasm-node ||
- die "Failed to move rollup package"
-
- if [ ! -z "${CHROMIUM_COMMITS[*]}" ]; then
- # for i in "${CHROMIUM_COMMITS[@]}"; do
- for i in "${!CHROMIUM_COMMITS[@]}"; do
- if [[ ${CHROMIUM_COMMITS[$i]} =~ webrtc ]]; then
- patch_prefix="webrtc"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ angle ]]; then
- patch_prefix="angle"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ quiche ]]; then
- patch_prefix="quiche"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ dawn ]]; then
- patch_prefix="dawn"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ perfetto ]]; then
- patch_prefix="perfetto"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ink ]]; then
- patch_prefix="ink"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ vulkan-utility-libraries ]]; then
- patch_prefix="vulkan-utility-libraries"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ruy ]]; then
- patch_prefix="ruy"
- else
- patch_prefix="chromium"
- fi
- pushd "${CHROMIUM_COMMITS[$i]}" > /dev/null || die
- if [[ $i = -* ]]; then
- einfo "Reverting ${patch_prefix}-${i/-}.patch"
- git_wrapper apply -R --exclude="*unittest.cc" --exclude="DEPS" \
- -p1 < "${DISTDIR}/${patch_prefix}-${i/-}.patch"
- else
- einfo "Applying ${patch_prefix}-${i/-}.patch"
- git_wrapper apply --exclude="*unittest.cc" --exclude="DEPS" \
- -p1 < "${DISTDIR}/${patch_prefix}-${i/-}.patch"
- fi
- popd > /dev/null || die
- done
- fi
-
- if ! use bluetooth ; then
- PATCHES+=(
- "${FILESDIR}/disable-bluez-r7.patch"
- )
- fi
-
- if use convert-dict ; then
- PATCHES+=(
- "${FILESDIR}/chromium-ucf-dict-utility-r3.patch"
- )
- fi
-
- if ! use libcxx ; then
- PATCHES+=(
- "${FILESDIR}/fix-wayland-oncecallback-copy.patch"
- )
- fi
-
- if use system-ffmpeg; then
- PATCHES+=(
- "${FILESDIR}/chromium-141-opus-mp3.patch"
- "${FILESDIR}/chromium-135-hevc.patch"
- )
- sed -i "\!AVFMT_FLAG_NOH264PARSE!d" media/filters/ffmpeg_glue.cc || die
- ewarn "You need to expose \"av_stream_get_first_dts\" in ffmpeg via user patch"
- fi
-
- if use system-av1; then
- PATCHES+=(
- "${FILESDIR}/chromium-system-av1.patch"
- )
- fi
-
- if use system-libvpx; then
- PATCHES+=(
- "${FILESDIR}/chromium-system-libvpx.patch"
- )
- fi
-
- if use system-openjpeg ; then
- PATCHES+=(
- "${FILESDIR}/chromium-system-openjpeg-r4.patch"
- )
- fi
-
- # if use x86 ; then
- # #* Fixes a segfault in transport_security_state_generator
- # PATCHES+=(
- # "${FILESDIR}/fix-segfault-x86.patch"
- # )
- # fi
-
- # Testing all patches when NODIE is defined
- if [ ! -z "${NODIE}" ]; then
- for i in "${PATCHES[@]}"; do
- eapply_wrapper "$i"
- done
- nonfatal eapply_user
- else
- default
- fi
-
- if use cromite ; then
- BR_PA_PATH="${WORKDIR}/cromite-${CROMITE_COMMIT_ID}/build/patches"
-
- sed -i '/b\/components\/components_strings\.grd/,+10d' "${BR_PA_PATH}/Add-cromite-flags-support.patch" || die
- sed -i '/b\/chrome\/android\/java\/res\/xml\/privacy_preferences\.xml/,+13d' "${BR_PA_PATH}/Add-cromite-flags-support.patch" || die
- sed -i '/b\/android_webview\/support_library\/java\/src\/org\/chromium\/support_lib_glue/,+11d' "${BR_PA_PATH}/Client-hints-overrides.patch" || die
- sed -i '/webapps_strings.grdp" \/>/{s++webapps_strings.grdp" /><part file="cromite_components_strings_grd/placeholder.txt"/>+;h};${x;/./{x;q0};x;q1}' \
- components/components_strings.grd || die
-
- sed -i 's/absl::/std::/' "${BR_PA_PATH}/Add-a-proxy-configuration-page.patch" || die
-
- filterdiff -p1 "${BR_PA_PATH}/JIT-site-settings.patch" --exclude="content/browser/renderer_host/render_process_host_impl.cc" \
- > "${BR_PA_PATH}/JIT-site-settings.patch1"
- mv -f "${BR_PA_PATH}/JIT-site-settings.patch1" "${BR_PA_PATH}/JIT-site-settings.patch"
-
- BROMITE_PATCHES=(
- "${BR_PA_PATH}/bromite-build-utils.patch"
- "${BR_PA_PATH}/Battery-API-return-nothing.patch"
- "${BR_PA_PATH}/Multiple-fingerprinting-mitigations.patch"
- "${BR_PA_PATH}/Add-flag-to-configure-maximum-connections-per-host.patch"
- "${BR_PA_PATH}/Add-a-proxy-configuration-page.patch"
- "${BR_PA_PATH}/Enable-StrictOriginIsolation-and-SitePerProcess.patch"
- "${BR_PA_PATH}/Disable-requests-for-single-word-Omnibar-searches.patch"
- "${BR_PA_PATH}/Reduce-HTTP-headers-in-DoH-requests-to-bare-minimum.patch"
- "${BR_PA_PATH}/Client-hints-overrides.patch"
- "${BR_PA_PATH}/Disable-idle-detection.patch"
- "${BR_PA_PATH}/Disable-TLS-resumption.patch"
- "${BR_PA_PATH}/Remove-navigator.connection-info.patch"
-
- "${BR_PA_PATH}/AudioBuffer-AnalyserNode-fp-mitigations.patch"
- "${BR_PA_PATH}/Fonts-fingerprinting-mitigation.patch"
- "${BR_PA_PATH}/Content-settings-infrastructure.patch"
- "${BR_PA_PATH}/Add-autoplay-site-setting.patch"
- "${BR_PA_PATH}/Site-setting-for-images.patch"
- "${BR_PA_PATH}/JIT-site-settings.patch"
- "${BR_PA_PATH}/Add-webGL-site-setting.patch"
- "${BR_PA_PATH}/Add-webRTC-site-settings.patch"
- "${BR_PA_PATH}/Show-site-settings-for-cookies-javascript-and-ads.patch"
- "${BR_PA_PATH}/Viewport-Protection-flag.patch"
- "${BR_PA_PATH}/Revert-remove-allowscript-content-setting-secondary-url.patch"
- "${BR_PA_PATH}/Timezone-customization.patch"
- "${BR_PA_PATH}/Disable-speechSynthesis-getVoices-API.patch"
- "${BR_PA_PATH}/Remove-support-for-device-memory-and-cpu-recovery.patch"
- "${BR_PA_PATH}/Disable-Feeback-Collector.patch"
- "${BR_PA_PATH}/Disable-remote-altsvc-for-h3-connections.patch"
- "${BR_PA_PATH}/Add-cromite-flags-support.patch"
- "${BR_PA_PATH}/Enables-deactivation-of-the-js-debugger-statement.patch"
- )
- for i in "${BROMITE_PATCHES[@]}"; do
- if [[ "$i" =~ "Add-autoplay-site-setting.patch" ]] ||
- [[ "$i" =~ "JIT-site-settings.patch" ]] ||
- [[ "$i" =~ "Site-setting-for-images.patch" ]]; then
- einfo "Git binary patch: ${i##*/}"
- git_wrapper apply -p1 < "$i"
- else
- filter_wrapper "$i" --exclude="chrome/android/*"
- fi
- done
-
- #! conflicting patches
- sed -i '/browser_features.cc/,+17d' \
- "${UGC_WD}/patches/extra/ungoogled-chromium/add-flag-to-clear-data-on-exit.patch" || die
- sed -i 's$} // namespace features$BASE_FEATURE(kClearDataOnExit, "ClearDataOnExit", base::FEATURE_DISABLED_BY_DEFAULT);}$' \
- chrome/browser/browser_features.cc || die
- sed -i 's$} // namespace features$BASE_DECLARE_FEATURE(kClearDataOnExit);}$' \
- chrome/browser/browser_features.h || die
- sed -i 's$kChromeUIAboutHost,$kChromeUIAboutHost,"ungoogled-first-run",$' \
- chrome/common/webui_url_constants.cc || die
- sed -i '/chrome\/common\/webui_url_constants.cc/Q' \
- "${UGC_WD}/patches/extra/ungoogled-chromium/first-run-page.patch" || die
-
- #! normalise paths in py
- sed -i 's$os.path.dirname(include_file)$os.path.abspath(os.path.dirname(include_file))$' \
- build/bromite/gyp/cpp_bromite_include.py || die
- fi
-
- # if [[ ${LLVM_SLOT} == "19" ]]; then
- # # Upstream now hard depend on a feature that was added in LLVM 20.1, but we don't want to stabilise that yet.
- # # Do the temp file shuffle in case someone is using something other than `gawk`
- # {
- # awk '/config\("clang_warning_suppression"\) \{/ { print $0 " }"; sub(/clang/, "xclang"); print; next }
- # { print }' build/config/compiler/BUILD.gn > "${T}/build.gn" && \
- # mv "${T}/build.gn" build/config/compiler/BUILD.gn
- # } || die "Unable to disable warning suppression"
- # fi
-
- ## Not included in -lite tarballs, but we should check for it anyway.
- #if [[ -f third_party/node/linux/node-linux-x64/bin/node ]]; then
- # rm third_party/node/linux/node-linux-x64/bin/node || die
- #else
- # mkdir -p third_party/node/linux/node-linux-x64/bin || die
- #fi
- #ln -s "${EPREFIX}"/usr/bin/node third_party/node/linux/node-linux-x64/bin/node || die
-
- cp "${FILESDIR}/libusb.gn" build/linux/unbundle || die
- sed -i '/^REPLACEMENTS.*$/{s++REPLACEMENTS = {"libusb":"third_party/libusb/BUILD.gn",+;h};${x;/./{x;q0};x;q1}' \
- build/linux/unbundle/replace_gn_files.py || die
- sed -i '/^.*deps.*third_party\/jsoncpp.*$/{s++public_deps \+= [ "//third_party/jsoncpp" ]+;h};${x;/./{x;q0};x;q1}' \
- third_party/webrtc/rtc_base/BUILD.gn || die
-
- if use override-data-dir; then
- sed -i '/"chromium";/{s++"ungoogled-chromium";+;h};${x;/./{x;q0};x;q1}' \
- chrome/common/chrome_paths_linux.cc || die
- fi
-
- if use system-abseil-cpp; then
- eapply_wrapper "${FILESDIR}/chromium-147-system-abseil.patch"
-
- #! SFINAE mangling incompatibility between clang and gcc:
- #! https://github.com/llvm/llvm-project/issues/85656
- #! gcc: _ZN4absl12lts_202601074CordC1INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELi0EEEOT_
- #! clang: _ZN4absl12lts_202601074CordC1INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEETnNSt9enable_ifIXsr3std7is_sameIT_S8_EE5valueEiE4typeELi0EEEOSA_
- #! So, either this:
- eapply_wrapper "${FILESDIR}/chromium-141-system-abseil-cord.patch"
- #! or build with -fclang-abi-compat=17
-
- # cp -f /usr/include/absl/base/options.h third_party/abseil-cpp/absl/base/options.h
- # sed -i '/^#define ABSL_OPTION_USE_STD_ORDERING.*$/{s++#define ABSL_OPTION_USE_STD_ORDERING 1+;h};${x;/./{x;q0};x;q1}' \
- # third_party/abseil-cpp/absl/base/options.h || die
- fi
-
- #* Applying UGC PRs here
- if [ ! -z "${UGC_PR_COMMITS[*]}" ]; then
- pushd "${UGC_WD}" >/dev/null
- for i in "${UGC_PR_COMMITS[@]}"; do
- eapply_wrapper "${DISTDIR}/${PN}-$i.patch"
- done
- popd >/dev/null
- fi
-
- # From here we adapt ungoogled-chromium's patches to our needs
- local ugc_pruning_list="${UGC_WD}/pruning.list"
- local ugc_patch_series="${UGC_WD}/patches/series"
- local ugc_substitution_list="${UGC_WD}/domain_substitution.list"
-
- local ugc_unneeded=(
- # GN bootstrap
- extra/debian/gn/parallel
- # following Gentoo's Chromium
- core/ungoogled-chromium/build-with-wasm-rollup
- )
-
- if use cromite ; then
- einfo "Using fingerprinting patches from Cromite instead"
- ugc_unneeded+=(
- extra/bromite/fingerprinting-flags-client-rects-and-measuretext
- extra/bromite/flag-max-connections-per-host
- extra/bromite/flag-fingerprinting-canvas-image-data-noise
- extra/ungoogled-chromium/add-components-ungoogled
- extra/ungoogled-chromium/remove-pac-size-limit
- )
- fi
-
- # #* Temporary fix
- # sed -i "\!ios/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/icu/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/libjpeg_turbo/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/snappy/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/closure_compiler/!d" "${ugc_pruning_list}" || die
-
- # #* Didn't unpack them at the first place
- # sed -i "\!build/linux/debian_bullseye_i386-sysroot!d" "${ugc_pruning_list}" || die
- # sed -i "\!build/linux/debian_bullseye_amd64-sysroot!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/llvm-build!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/node/linux!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/rust-src!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/rust-toolchain!d" "${ugc_pruning_list}" || die
- # if ! use libcxx ; then
- # sed -i "\!third_party/libc!d" "${ugc_pruning_list}" || die
- # fi
- sed -i "s|debug('files|error('files|" \
- "${UGC_WD}/utils/prune_binaries.py" || die
- sed -i "\!third_party/node/linux!d" \
- "${UGC_WD}/utils/prune_binaries.py" || die
-
- local ugc_p ugc_dir
- for p in "${ugc_unneeded[@]}"; do
- einfo "Removing ${p}.patch"
- sed -i "\!${p}.patch!d" "${ugc_patch_series}" || die
- done
-
- if [ ! -z "${UGC_SKIP_PATCHES}" ]; then
- for p in ${UGC_SKIP_PATCHES}; do
- ewarn "Removing ${p}"
- sed -i "\!${p}!d" "${ugc_patch_series}" || die
- done
- fi
-
- if [ ! -z "${UGC_KEEP_BINARIES}" ]; then
- for p in ${UGC_KEEP_BINARIES}; do
- ewarn "Keeping binary ${p}"
- sed -i "\!${p}!d" "${ugc_pruning_list}" || die
- done
- fi
-
- if [ ! -z "${UGC_SKIP_SUBSTITUTION}" ]; then
- for p in ${UGC_SKIP_SUBSTITUTION}; do
- ewarn "No substitutions in ${p}"
- sed -i "\!${p}!d" "${ugc_substitution_list}" || die
- done
- fi
-
- ebegin "Pruning binaries"
- "${UGC_WD}/utils/prune_binaries.py" -q . "${UGC_WD}/pruning.list"
- eend $? || die
-
- ebegin "Applying ungoogled-chromium patches"
- "${UGC_WD}/utils/patches.py" -q apply . "${UGC_WD}/patches"
- eend $? || die
-
- ebegin "Applying domain substitution"
- "${UGC_WD}/utils/domain_substitution.py" -q apply -r "${UGC_WD}/domain_regex.list" -f "${UGC_WD}/domain_substitution.list" .
- eend $? || die
-
- # Sanity check esbuild version before we start removing files.
- # We _could_ patch the version check out - in theory esbuild upstream are being super conservative after
- # arch(AUR) packaged an `esbuild` binary and set ESBUILD_BINARY_PATH=/usr/bin/esbuild, causing much breakage,
- # but this is fine too and exactly matches what upstream are expecting.
- # https://github.com/evanw/esbuild/issues/2894
- local esbuild_js="${S}/third_party/devtools-frontend/src/node_modules/esbuild/lib/main.js"
- local found
- found=$(awk -F'"' '/if \(binaryVersion !==/ {print $2}' "${esbuild_js}")
- if [[ "${found}" != "${ESBUILD_VER}" ]]; then
- die "esbuild version mismatch: expected ${ESBUILD_VER}, found ${found}"
- fi
-
- elog "Removing bundled binaries from source tree ..."
- # Purge bundled ELF files: These are non-portable and will cause issues if used instead of system versions.
- # Use `--wasm` to also remove WebAssembly binaries, if desired - they're portable so shouldn't break builds.
- ${EPYTHON} "${FILESDIR}/bin-finder.py" --elf "${S}" | awk '{print $1}' | xargs rm -f ||
- die "Failed to remove bundled binaries"
-
- # And now we restore any that we actually need, from the host system
- local esbuild_path="${S}/third_party/devtools-frontend/src/third_party/esbuild"
- local -A restore_list=(
- ["/usr/bin/esbuild-${ESBUILD_VER}"]="${esbuild_path}/esbuild"
- ["/usr/bin/gperf"]="${S}/third_party/gperf/cipd/bin/gperf"
- ["/usr/bin/node"]="${S}/third_party/node/linux/node-linux-x64/bin/node"
- )
-
- for src in "${!restore_list[@]}"; do
- dst="${restore_list[${src}]}"
- if [[ -f "${src}" ]]; then
- einfo "Symlinking ${src} ..."
- # Make sure the parent dir exists; some tarballs don't include (e.g.) node's bindir
- mkdir -p "$(dirname "${dst}")" || die "Failed to create directory for ${dst}"
- ln -s "${src}" "${dst}" || die "Failed to symlink ${dst} from ${src}"
- if [[ ! -L "${dst}" || "$(readlink -f "${dst}")" != "${src}" ]]; then
- die "Symlink verification failed for ${dst} -> ${src}"
- fi
- else
- die "Expected to find ${src} to restore ${dst}, but it does not exist."
- fi
- done
-
- # adjust python interpreter version
- sed -i -e "s|\(^script_executable = \).*|\1\"${EPYTHON}\"|g" .gn || die
-
- # Use the system copy of hwdata's usb.ids; upstream is woefully out of date (2015!)
- sed 's|//third_party/usb_ids/usb.ids|/usr/share/hwdata/usb.ids|g' \
- -i services/device/public/cpp/usb/BUILD.gn || die "Failed to set system usb.ids path"
-
- # remove_bundled_libraries.py walks the source tree and looks for paths containing the substring 'third_party'
- # whitelist matches use the right-most matching path component, so we need to whitelist from that point down.
- local keeplibs=(
- base/third_party/cityhash
- )
- use system-double-conversion || keeplibs+=(
- base/third_party/double_conversion
- )
- keeplibs+=(
- base/third_party/icu
- base/third_party/nspr
- base/third_party/superfasthash
- base/third_party/symbolize
- base/third_party/xdg_user_dirs
- buildtools/third_party/libc++
- buildtools/third_party/libc++abi
- )
- use cromite && keeplibs+=(
- cromite_flags/third_party
- )
- keeplibs+=(
- net/third_party/mozilla_security_manager
- net/third_party/quic
- net/third_party/uri_template
- )
- use system-abseil-cpp || keeplibs+=(
- third_party/abseil-cpp
- )
- keeplibs+=(
- third_party/angle
- third_party/angle/src/common/third_party/xxhash
- third_party/angle/src/third_party/ceval
- )
- use nvidia || keeplibs+=(
- third_party/angle/src/third_party/libXNVCtrl
- )
- keeplibs+=(
- third_party/angle/src/third_party/volk
- third_party/anonymous_tokens
- third_party/apple_apsl
- third_party/axe-core
- third_party/bidimapper
- third_party/blink
- third_party/boringssl
- third_party/boringssl/src/third_party/fiat
- third_party/breakpad
- third_party/breakpad/breakpad/src/third_party/curl
- )
- use system-brotli || keeplibs+=(
- third_party/brotli
- )
- keeplibs+=(
- third_party/catapult
- third_party/catapult/common/py_vulcanize/third_party/rcssmin
- third_party/catapult/common/py_vulcanize/third_party/rjsmin
- third_party/catapult/third_party/beautifulsoup4-4.9.3
- third_party/catapult/third_party/html5lib-1.1
- third_party/catapult/third_party/polymer
- third_party/catapult/third_party/six
- third_party/catapult/third_party/typ
- third_party/catapult/tracing/third_party/d3
- third_party/catapult/tracing/third_party/gl-matrix
- third_party/catapult/tracing/third_party/jpeg-js
- third_party/catapult/tracing/third_party/jszip
- third_party/catapult/tracing/third_party/mannwhitneyu
- third_party/catapult/tracing/third_party/oboe
- third_party/catapult/tracing/third_party/pako
- third_party/ced
- third_party/cld_3
- third_party/closure_compiler
- )
- use libcxx && keeplibs+=(
- third_party/compiler-rt
- )
- keeplibs+=(
- third_party/content_analysis_sdk
- third_party/cpuinfo
- third_party/crabbyavif
- third_party/crashpad
- third_party/crashpad/crashpad/third_party/lss
- third_party/crashpad/crashpad/third_party/zlib
- )
- use system-crc32c || keeplibs+=(
- third_party/crc32c
- )
- keeplibs+=(
- third_party/cros_system_api
- third_party/d3
- third_party/dawn
- third_party/dawn/third_party/gn/webgpu-cts
- third_party/dawn/third_party/OpenGL-Registry
- third_party/dawn/third_party/renderdoc
- third_party/dawn/third_party/webgpu-headers
- third_party/depot_tools
- third_party/devscripts
- third_party/devtools-frontend
- third_party/devtools-frontend/src/front_end/third_party/acorn
- third_party/devtools-frontend/src/front_end/third_party/additional_readme_paths.json
- third_party/devtools-frontend/src/front_end/third_party/axe-core
- third_party/devtools-frontend/src/front_end/third_party/chromium
- third_party/devtools-frontend/src/front_end/third_party/codemirror
- third_party/devtools-frontend/src/front_end/third_party/csp_evaluator
- third_party/devtools-frontend/src/front_end/third_party/diff
- third_party/devtools-frontend/src/front_end/third_party/i18n
- third_party/devtools-frontend/src/front_end/third_party/intl-messageformat
- third_party/devtools-frontend/src/front_end/third_party/json5
- third_party/devtools-frontend/src/front_end/third_party/legacy-javascript
- third_party/devtools-frontend/src/front_end/third_party/lighthouse
- third_party/devtools-frontend/src/front_end/third_party/lit
- third_party/devtools-frontend/src/front_end/third_party/marked
- third_party/devtools-frontend/src/front_end/third_party/puppeteer
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/third_party/mitt
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/third_party/parsel-js
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/third_party/rxjs
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/third_party/urlpattern-polyfill
- third_party/devtools-frontend/src/front_end/third_party/source-map-scopes-codec
- third_party/devtools-frontend/src/front_end/third_party/third-party-web
- third_party/devtools-frontend/src/front_end/third_party/vscode.web-custom-data
- third_party/devtools-frontend/src/front_end/third_party/wasmparser
- third_party/devtools-frontend/src/front_end/third_party/web-vitals
- third_party/devtools-frontend/src/third_party
- third_party/dom_distiller_js
- third_party/dragonbox
- third_party/eigen3
- third_party/emoji-segmenter
- third_party/farmhash
- third_party/fast_float
- third_party/fdlibm
- third_party/federated_compute/chromium/fcp/confidentialcompute
- third_party/federated_compute/src/fcp/base
- third_party/federated_compute/src/fcp/confidentialcompute
- third_party/federated_compute/src/fcp/protos/confidentialcompute
- third_party/federated_compute/src/fcp/protos/federatedcompute
- third_party/fft2d
- third_party/flatbuffers
- third_party/fp16
- third_party/freetype
- third_party/fusejs
- third_party/fxdiv
- third_party/gemmlowp
- third_party/google_input_tools
- third_party/google_input_tools/third_party/closure_library
- third_party/google_input_tools/third_party/closure_library/third_party/closure
- third_party/googletest
- third_party/gperf # We symlink system gperf, but this will purge the symlink since we tidy up afterwards.
- third_party/highway
- third_party/hunspell
- third_party/hyphenation-patterns
- third_party/ink/src/ink/brush
- third_party/ink/src/ink/color
- third_party/ink/src/ink/geometry
- third_party/ink/src/ink/rendering
- third_party/ink/src/ink/rendering/skia/common_internal
- third_party/ink/src/ink/rendering/skia/native
- third_party/ink/src/ink/rendering/skia/native/internal
- third_party/ink/src/ink/strokes
- third_party/ink/src/ink/types
- third_party/inspector_protocol
- third_party/ipcz
- third_party/jinja2
- )
- use system-jsoncpp || keeplibs+=(
- third_party/jsoncpp
- )
- keeplibs+=(
- third_party/khronos
- third_party/lens_server_proto
- third_party/leveldatabase
- third_party/libaddressinput
- )
- use libcxx && keeplibs+=(
- third_party/libc++
- )
- keeplibs+=(
- third_party/libdrm
- third_party/libgav1
- third_party/libjingle
- third_party/libpfm4
- third_party/libphonenumber
- third_party/libpng
- third_party/libsecret
- third_party/libsrtp
- third_party/libsync
- third_party/libtess2/libtess2
- third_party/libtess2/src/Include
- third_party/libtess2/src/Source
- third_party/liburlpattern
- )
- use system-libusb || keeplibs+=(
- third_party/libusb
- )
- keeplibs+=(
- third_party/libva_protected_content
- )
- use system-libvpx || keeplibs+=(
- third_party/libvpx
- third_party/libvpx/source/libvpx/third_party/x86inc
- )
- keeplibs+=(
- third_party/libwebm
- third_party/libx11
- third_party/libxcb-keysyms
- third_party/libxml/chromium
- third_party/libyuv
- third_party/libzip
- third_party/lit
- )
- use libcxx && keeplibs+=(
- third_party/llvm-libc
- third_party/llvm-libc/src/shared/
- )
- keeplibs+=(
- third_party/lottie
- third_party/lss
- third_party/lzma_sdk
- third_party/mako
- third_party/markupsafe
- third_party/material_color_utilities
- third_party/metrics_proto
- third_party/minigbm
- third_party/ml_dtypes
- third_party/modp_b64
- third_party/nasm
- third_party/nearby
- third_party/neon_2_sse
- third_party/node
- third_party/oak/chromium/proto
- third_party/oak/chromium/proto/attestation
- third_party/omnibox_proto
- third_party/one_euro_filter
- third_party/openscreen
- third_party/openscreen/src/third_party/
- third_party/openscreen/src/third_party/tinycbor/src/src
- third_party/ots
- third_party/pdfium
- third_party/pdfium/third_party/agg23
- third_party/pdfium/third_party/bigint
- third_party/pdfium/third_party/freetype
- third_party/pdfium/third_party/lcms
- )
- use system-openjpeg || keeplibs+=(
- third_party/pdfium/third_party/libopenjpeg
- )
- keeplibs+=(
- third_party/pdfium/third_party/libtiff
- third_party/perfetto
- third_party/perfetto/protos/third_party/android
- third_party/perfetto/protos/third_party/chromium
- third_party/perfetto/protos/third_party/pprof
- third_party/perfetto/protos/third_party/primes
- third_party/perfetto/protos/third_party/simpleperf
- third_party/pffft
- third_party/ply
- third_party/polymer
- third_party/private_membership
- third_party/private-join-and-compute
- third_party/protobuf
- third_party/protobuf/third_party/utf8_range
- third_party/pthreadpool
- third_party/puffin
- third_party/pyjson5
- third_party/pyyaml
- third_party/rapidhash
- third_party/readability
- third_party/rnnoise
- third_party/rust
- third_party/ruy
- third_party/s2cellid
- third_party/search_engines_data
- third_party/securemessage
- third_party/selenium-atoms
- third_party/sentencepiece
- third_party/sentencepiece/src/third_party/darts_clone
- third_party/shell-encryption
- third_party/simdutf
- third_party/simplejson
- third_party/six
- third_party/skia
- third_party/skia/include/third_party/vulkan
- third_party/smhasher
- )
- use system-snappy || keeplibs+=(
- third_party/snappy
- )
- keeplibs+=(
- third_party/spirv-headers
- third_party/spirv-tools
- third_party/sqlite
- third_party/swiftshader
- third_party/swiftshader/third_party/astc-encoder
- third_party/swiftshader/third_party/llvm-subzero
- third_party/swiftshader/third_party/marl
- third_party/swiftshader/third_party/SPIRV-Headers/include/spirv
- third_party/swiftshader/third_party/SPIRV-Tools
- third_party/swiftshader/third_party/subzero
- third_party/tensorflow_models
- third_party/tensorflow-text
- third_party/tflite
- third_party/tflite/src/third_party/fft2d
- third_party/tflite/src/third_party/xla/third_party/tsl
- third_party/tflite/src/third_party/xla/xla/tsl/framework
- third_party/tflite/src/third_party/xla/xla/tsl/lib/random
- third_party/tflite/src/third_party/xla/xla/tsl/platform
- third_party/tflite/src/third_party/xla/xla/tsl/protobuf
- third_party/tflite/src/third_party/xla/xla/tsl/util
- third_party/ukey2
- third_party/utf
- third_party/vulkan
- third_party/wayland
- third_party/webdriver
- third_party/webgpu-cts
- third_party/webrtc
- third_party/webrtc/common_audio/third_party/ooura
- third_party/webrtc/common_audio/third_party/spl_sqrt_floor
- third_party/webrtc/modules/third_party/fft
- third_party/webrtc/modules/third_party/g711
- third_party/webrtc/modules/third_party/g722
- third_party/widevine
- )
- use system-woff2 || keeplibs+=(
- third_party/woff2
- )
- keeplibs+=(
- third_party/wuffs
- third_party/x11proto
- third_party/xcbproto
- third_party/xnnpack
- third_party/zlib/google
- third_party/zxcvbn-cpp
- url/third_party/mozilla
- v8/third_party/glibc
- v8/third_party/inspector_protocol
- v8/third_party/rapidhash-v8
- v8/third_party/siphash
- v8/third_party/utf8-decoder
- v8/third_party/v8
- v8/third_party/valgrind
-
- # gyp -> gn leftovers
- third_party/speech-dispatcher
- third_party/usb_ids
- )
-
- if use test; then
- keeplibs+=(
- third_party/breakpad/breakpad/src/processor
- third_party/fuzztest
- third_party/google_benchmark/src/include/benchmark
- third_party/google_benchmark/src/src
- third_party/test_fonts
- third_party/test_fonts/fontconfig
- third_party/test_fonts/test_fonts
- )
- fi
-
- # USE=system-*
- if ! use system-harfbuzz; then
- keeplibs+=( third_party/harfbuzz )
- fi
-
- if ! use system-ffmpeg; then
- keeplibs+=( third_party/ffmpeg third_party/opus )
- fi
-
- if ! use system-icu; then
- keeplibs+=( third_party/icu )
- fi
-
- if ! use system-zstd; then
- keeplibs+=( third_party/zstd )
- fi
-
- if ! use system-av1; then
- keeplibs+=(
- third_party/dav1d
- third_party/libaom
- third_party/libaom/source/libaom/third_party/fastfeat
- third_party/libaom/source/libaom/third_party/vector
- third_party/libaom/source/libaom/third_party/x86inc
- )
- fi
-
- if use libcxx; then
- keeplibs+=(
- third_party/libc++
- third_party/llvm-libc
- )
- fi
-
- if ! use system-openh264; then
- keeplibs+=( third_party/openh264 )
- fi
-
- if ! use system-re2; then
- keeplibs+=( third_party/re2 )
- fi
-
- # Arch-specific
- if use arm64 || use ppc64 ; then
- keeplibs+=( third_party/swiftshader/third_party/llvm-10.0 )
- fi
- # we need to generate ppc64 stuff because upstream does not ship it yet
- # it has to be done before unbundling.
- if use ppc64; then
- pushd third_party/libvpx >/dev/null || die
- mkdir -p source/config/linux/ppc64 || die
- # requires git and clang, bug #832803
- # Revert https://chromium.googlesource.com/chromium/src/+/b463d0f40b08b4e896e7f458d89ae58ce2a27165%5E%21/third_party/libvpx/generate_gni.sh
- # and https://chromium.googlesource.com/chromium/src/+/71ebcbce867dd31da5f8b405a28fcb0de0657d91%5E%21/third_party/libvpx/generate_gni.sh
- # since we're not in a git repo
- sed -i -e "s|^update_readme||g; s|clang-format|${EPREFIX}/bin/true|g; /^git -C/d; /git cl/d; /cd \$BASE_DIR\/\$LIBVPX_SRC_DIR/ign format --in-place \$BASE_DIR\/BUILD.gn\ngn format --in-place \$BASE_DIR\/libvpx_srcs.gni" \
- generate_gni.sh || die
- ./generate_gni.sh || die
- popd >/dev/null || die
-
- pushd third_party/ffmpeg >/dev/null || die
- cp libavcodec/ppc/h264dsp.c libavcodec/ppc/h264dsp_ppc.c || die
- cp libavcodec/ppc/h264qpel.c libavcodec/ppc/h264qpel_ppc.c || die
- popd >/dev/null || die
- fi
-
- # Sanity check keeplibs, on major version bumps it is often necessary to update this list
- # and this enables us to hit them all at once.
- # There are some entries that need to be whitelisted (TODO: Why? The file is understandable, the rest seem odd)
- whitelist_libs=(
- net/third_party/quic
- third_party/devtools-frontend/src/front_end/third_party/additional_readme_paths.json
- third_party/libjingle
- third_party/mesa
- third_party/skia/third_party/vulkan
- third_party/vulkan
- )
- local not_found_libs=()
- for lib in "${keeplibs[@]}"; do
- if [[ ! -d "${lib}" ]] && ! has "${lib}" "${whitelist_libs[@]}"; then
- not_found_libs+=( "${lib}" )
- fi
- done
-
- if [[ ${#not_found_libs[@]} -gt 0 ]]; then
- ewarn "The following \`keeplibs\` directories were not found in the source tree:"
- for lib in "${not_found_libs[@]}"; do
- ewarn " ${lib}"
- done
- fi
-
- keeplibs+=( third_party/ungoogled )
-
- # Remove most bundled libraries. Some are still needed.
- einfo "Unbundling third-party libraries ..."
- build/linux/unbundle/remove_bundled_libraries.py "${keeplibs[@]}" --do-remove || die
-
- # Interferes with our bundled clang path; we don't want stripped binaries anyway.
- sed -i -e 's|${clang_base_path}/bin/llvm-strip|/bin/true|g' \
- -e 's|${clang_base_path}/bin/llvm-objcopy|/bin/true|g' \
- build/linux/strip_binary.gni || die
-}
-
-src_configure() {
- # Calling this here supports resumption via FEATURES=keepwork
- python_setup
-
- # Bug 491582.
- export TMPDIR="${WORKDIR}/temp"
- mkdir -p -m 755 "${TMPDIR}" || die
-
- # https://bugs.gentoo.org/654216
- addpredict /dev/dri/ #nowarn
-
- # Use system-provided libraries.
- # TODO: freetype -- remove sources (https://bugs.chromium.org/p/pdfium/issues/detail?id=733).
- # TODO: use_system_hunspell (upstream changes needed).
- # TODO: use_system_protobuf (bug #525560).
- # TODO: use_system_sqlite (http://crbug.com/22208).
-
- # libevent: https://bugs.gentoo.org/593458
- local gn_system_libraries=(
- flac
- fontconfig
- freetype
- libjpeg
- libwebp
- libxml
- libxslt
- zlib
- )
- if use system-abseil-cpp; then
- gn_system_libraries+=(
- absl_algorithm
- absl_base
- absl_cleanup
- absl_container
- absl_crc
- absl_debugging
- absl_flags
- absl_functional
- absl_hash
- absl_log
- absl_log_internal
- absl_memory
- absl_meta
- absl_numeric
- absl_random
- absl_status
- absl_strings
- absl_synchronization
- absl_time
- absl_types
- absl_utility
- )
- fi
- if use system-brotli; then
- gn_system_libraries+=( brotli )
- fi
- if use system-crc32c; then
- gn_system_libraries+=( crc32c )
- fi
- if use system-double-conversion; then
- gn_system_libraries+=( double-conversion )
- fi
- if use system-woff2; then
- gn_system_libraries+=( woff2 )
- fi
- if use nvidia; then
- gn_system_libraries+=( libXNVCtrl )
- fi
- if use system-ffmpeg; then
- gn_system_libraries+=( ffmpeg opus )
- fi
- if use system-jsoncpp; then
- gn_system_libraries+=( jsoncpp )
- fi
- if use system-icu; then
- gn_system_libraries+=( icu )
- fi
- if use system-zstd; then
- gn_system_libraries+=( zstd )
- fi
- if use system-av1; then
- gn_system_libraries+=( dav1d libaom )
- fi
- if use system-libusb; then
- gn_system_libraries+=( libusb )
- fi
- if use system-libvpx; then
- gn_system_libraries+=( libvpx )
- fi
- use system-openh264 && gn_system_libraries+=(
- openh264
- )
- use system-re2 && gn_system_libraries+=(
- re2
- )
- use system-snappy && gn_system_libraries+=(
- snappy
- )
-
- build/linux/unbundle/replace_gn_files.py --system-libraries "${gn_system_libraries[@]}" ||
- die "Failed to replace GN files for system libraries"
-
- # TODO 131: The above call clobbers `enable_freetype = true` in the freetype gni file
- # drop the last line, then append the freetype line and a new curly brace to end the block
- local freetype_gni="build/config/freetype/freetype.gni"
- sed -i -e '$d' ${freetype_gni} || die
- echo " enable_freetype = true" >> ${freetype_gni} || die
- echo "}" >> ${freetype_gni} || die
-
- if use !custom-cflags; then
- replace-flags "-Os" "-O2"
- strip-flags
- # Debug info section overflows without component build
- # Prevent linker from running out of address space, bug #471810 .
- filter-flags "-g*"
- # 949123: Several multimedia components explicitly build with specific CFLAGS and
- # use runtime detection to enable optimisations; unfortunately any of our CFLAGS are suffixed
- # to the end of the command line, which causes build failures.
- fi
- # Since M150 `skia` will begin breaking for x86_64 due to compilation of `avx512` code paths;
- # we need to filter these for all arches.
- filter-flags "-march*" "-mtune*" "-mcpu*"
-
- # We don't use the same clang version as upstream, and with -Werror
- # we need to make sure that we don't get superfluous warnings.
- append-flags -Wno-unknown-warning-option
- if tc-is-cross-compiler; then # can you cross-compile with the bundled toolchain?
- export BUILD_CXXFLAGS+=" -Wno-unknown-warning-option"
- export BUILD_CFLAGS+=" -Wno-unknown-warning-option"
- fi
-
- # Start building our GN options
- local myconf_gn=() # Tip: strings must be quoted, bools or numbers are fine
-
- if use !bundled-toolchain; then
- # We already forced the "correct" clang via pkg_setup
-
- if tc-is-cross-compiler; then
- CC="${CC} -target ${CHOST} --sysroot ${ESYSROOT}"
- CXX="${CXX} -target ${CHOST} --sysroot ${ESYSROOT}"
- BUILD_AR=${AR}
- BUILD_CC=${CC}
- BUILD_CXX=${CXX}
- BUILD_NM=${NM}
- fi
-
- # Make sure the build system will use the right tools, bug #340795.
- tc-export AR CC CXX NM
-
- strip-unsupported-flags
- append-ldflags -Wl,--undefined-version # https://bugs.gentoo.org/918897#c32
-
- myconf_gn+=(
- "is_clang=true"
- "clang_use_chrome_plugins=false"
- "use_clang_modules=false" # M141 enables this for the linux platform by default.
- 'custom_toolchain="//build/toolchain/linux/unbundle:default"'
- # From M127 we need to provide a location for libclang and the clang resource dir so that bindgen can find them
- "bindgen_libclang_path=\"$(get_llvm_prefix)/$(get_libdir)\""
- "bindgen_clang_resource_dir=\"${EPREFIX}/usr/lib/clang/${LLVM_SLOT}/include\""
- "bindgen_extra_clang_args=[\"-I${EPREFIX}/usr/lib/clang/${LLVM_SLOT}/include\"]"
- "clang_base_path=\"${EPREFIX}/usr/lib/clang/${LLVM_SLOT}/\""
- "rust_bindgen_root=\"${EPREFIX}/usr/\""
- "rust_sysroot_absolute=\"$(get_rust_prefix)\""
- "rustc_version=\"${RUST_SLOT}\""
- )
-
- if tc-ld-is-mold; then
- myconf_gn+=(
- "use_mold=true"
- "use_lld=false"
- "linker_path=\"${EPREFIX}/usr/bin/mold\""
- )
- else
- myconf_gn+=( "use_lld=true" )
- fi
-
- if [[ ${LLVM_SLOT} -lt 23 ]]; then
- # Workaround for -fsanitize-ignore-for-ubsan-feature (added in LLVM 23)
- myconf_gn+=( 'clang_has_ubsan_feature_ignore=false' )
- fi
-
- if ! tc-is-cross-compiler; then
- myconf_gn+=( 'host_toolchain="//build/toolchain/linux/unbundle:default"' )
- else
- tc-export BUILD_{AR,CC,CXX,NM}
- myconf_gn+=(
- 'host_toolchain="//build/toolchain/linux/unbundle:host"'
- 'v8_snapshot_toolchain="//build/toolchain/linux/unbundle:host"'
- "host_pkg_config=\"$(tc-getBUILD_PKG_CONFIG)\""
- "pkg_config=\"$(tc-getPKG_CONFIG)\""
- )
-
- # setup cups-config, build system only uses --libs option
- if use cups; then
- mkdir "${T}/cups-config" || die
- cp "${ESYSROOT}/usr/bin/${CHOST}-cups-config" "${T}/cups-config/cups-config" || die
- export PATH="${PATH}:${T}/cups-config"
- fi
-
- # Don't inherit PKG_CONFIG_PATH from environment
- local -x PKG_CONFIG_PATH=
- fi
-
- fi # !bundled-toolchain
-
- local myarch
- myarch="$(tc-arch)"
- case ${myarch} in
- amd64)
- # Bug 530248, 544702, 546984, 853646.
- use !custom-cflags && filter-flags -mno-mmx -mno-sse2 -mno-ssse3 -mno-sse4.1 \
- -mno-avx -mno-avx2 -mno-fma -mno-fma4 -mno-xop -mno-sse4a
- myconf_gn+=( 'target_cpu="x64"' )
- ;;
- x86)
- # Bug 530248, 544702, 546984, 853646.
- use !custom-cflags && filter-flags -mno-mmx -mno-sse2 -mno-ssse3 -mno-sse4.1 \
- -mno-avx -mno-avx2 -mno-fma -mno-fma4 -mno-xop -mno-sse4a
- myconf_gn+=( 'target_cpu="x86"' )
- ;;
- arm64)
- myconf_gn+=( 'target_cpu="arm64"' )
- ;;
- ppc64)
- myconf_gn+=( 'target_cpu="ppc64"' )
- ;;
- *)
- die "Failed to determine target arch, got '${myarch}'."
- ;;
- esac
-
- # Common options
-
- myconf_gn+=(
- # Disable code formating of generated files
- "blink_enable_generated_code_formatting=false"
- # enable DCHECK with USE=debug only, increases chrome binary size by 30%, bug #811138.
- # DCHECK is fatal by default, make it configurable at runtime, #bug 807881.
- "dcheck_always_on=$(usex debug true false)"
- "dcheck_is_configurable=$(usex debug true false)"
- # Chromium builds provided by Linux distros should disable the testing config
- "disable_fieldtrial_testing_config=true"
- # Custom patch: Enable building Chromium as individual channels (e.g. stable, beta, dev) that
- # use different profile directories, desktop entries, etc. This enables slotting the ebuild.
- "enable_channel_branding=true"
- # 131 began laying the groundwork for replacing freetype with
- # "Rust-based Fontations set of libraries plus Skia path rendering"
- # We now need to opt-in
- "enable_freetype=true"
- "enable_hangout_services_extension=$(usex hangouts true false)"
- # Don't need nocompile checks and GN crashes with our config (verify with modern GN)
- "enable_nocompile_tests=false"
- # pseudolocales are only used for testing
- "enable_pseudolocales=false"
- "enable_widevine=$(usex widevine true false)"
- # Disable fatal linker warnings, bug 506268.
- "fatal_linker_warnings=false"
- # Component build isn't generally intended for use by end users. It's mostly useful
- # for development and debugging.
- "is_component_build=false"
- # GN needs explicit config for Debug/Release as opposed to inferring it from build directory.
- "is_debug=false"
- "is_official_build=$(usex official true false)"
- # Enable ozone wayland and/or headless support
- "ozone_auto_platforms=false"
- "ozone_platform_headless=true"
- # Enables building without non-free unRAR licence
- "safe_browsing_use_unrar=false"
- # "thin_lto_enable_optimizations=${use_lto}"
- "treat_warnings_as_errors=false"
- # Use in-tree libc++ (buildtools/third_party/libc++ and buildtools/third_party/libc++abi)
- # instead of the system C++ library for C++ standard library support.
- # default: true, but let's be explicit (forced since 120 ; USE removed 127).
- "use_custom_libcxx=true"
- # Enable ozone wayland and/or headless support
- "use_ozone=true"
- # The sysroot is the oldest debian image that chromium supports, we don't need it
- "use_sysroot=false"
- # See dependency logic in third_party/BUILD.gn
- "use_system_harfbuzz=$(usex system-harfbuzz true false)"
- # "use_thin_lto=${use_lto}"
- # Only enabled for clang, but gcc has endian macros too
- "v8_use_libm_trig_functions=true"
- )
-
- myconf_gn+=( "enable_iterator_debugging=$(usex debug true false)" )
-
- if use debug; then
- myconf_gn+=(
- "symbol_level=2"
- "blink_symbol_level=2"
- "v8_symbol_level=2"
- )
- else
- myconf_gn+=(
- "symbol_level=0"
- "blink_symbol_level=0"
- "v8_symbol_level=0"
- )
- fi
-
- if use bindist ; then
- myconf_gn+=(
- # If this is set to false Chromium won't be able to load any proprietary codecs
- # even if provided with an ffmpeg capable of h264/aac decoding
- "proprietary_codecs=true"
- 'ffmpeg_branding="Chrome"'
- # build ffmpeg as an external component (libffmpeg.so) that we can remove / substitute
- "is_component_ffmpeg=true"
- )
- else
- myconf_gn+=(
- "proprietary_codecs=$(usex proprietary-codecs true false)"
- "ffmpeg_branding=\"$(usex proprietary-codecs Chrome Chromium)\""
- )
- fi
-
- if use headless; then
- myconf_gn+=(
- "enable_print_preview=false"
- "enable_remoting=false"
- 'ozone_platform="headless"'
- "rtc_use_pipewire=false"
- "use_alsa=false"
- "use_cups=false"
- "use_gio=false"
- "use_glib=false"
- "use_gtk=false"
- "use_kerberos=false"
- "use_libpci=false"
- "use_pangocairo=false"
- "use_pulseaudio=false"
- "use_qt5=false"
- "use_qt6=false"
- "use_udev=false"
- "use_vaapi=false"
- "use_xkbcommon=false"
- )
- else
- myconf_gn+=(
- "gtk_version=$(usex gtk4 4 3)"
- # link pulseaudio directly (DT_NEEDED) instead of using dlopen.
- # helps with automated detection of ABI mismatches and prevents silent errors.
- "link_pulseaudio=$(usex pulseaudio true false)"
- "ozone_platform_wayland=$(usex wayland true false)"
- "ozone_platform_x11=$(usex X true false)"
- "ozone_platform=\"$(usex wayland wayland x11)\""
- "rtc_use_pipewire=$(usex screencast true false)"
- "use_cups=$(usex cups true false)"
- "use_kerberos=$(usex kerberos true false)"
- "use_pulseaudio=$(usex pulseaudio true false)"
- "use_qt5=false"
- "use_system_libffi=$(usex wayland true false)"
- "use_system_minigbm=true"
- "use_vaapi=$(usex vaapi true false)"
- "use_xkbcommon=true"
- )
- if use qt6; then
- local cbuild_libdir
- cbuild_libdir="$(get_libdir)"
- if tc-is-cross-compiler; then
- # Hack to workaround get_libdir not being able to handle CBUILD, bug #794181
- cbuild_libdir="$($(tc-getBUILD_PKG_CONFIG) --keep-system-libs --libs-only-L libxslt)"
- cbuild_libdir="${cbuild_libdir:2}"
- cbuild_libdir="${cbuild_libdir/% }"
- fi
- myconf_gn+=(
- "use_qt6=true"
- "moc_qt6_path=\"${EPREFIX}/usr/${cbuild_libdir}/qt6/libexec\""
- )
- else
- myconf_gn+=( "use_qt6=false" )
- fi
- fi
-
- # Explicitly disable ICU data file support for system-icu/headless builds.
- if use system-icu || use headless; then
- myconf_gn+=( "icu_use_data_file=false" )
- fi
-
- if use official; then
- # Allow building against system libraries in official builds
- sed -i 's/OFFICIAL_BUILD/GOOGLE_CHROME_BUILD/' \
- tools/generate_shim_headers/generate_shim_headers.py || die
- # Don't add symbols to build
- myconf_gn+=( "symbol_level=0" )
- fi
-
- if use pgo; then
- myconf_gn+=(
- "chrome_pgo_phase=2"
- "v8_enable_builtins_optimization=true"
- )
- else
- myconf_gn+=( "chrome_pgo_phase=0" )
- fi
-
- # Odds and ends
-
- # skipping typecheck is only supported on amd64, bug #876157
- if ! use amd64; then
- myconf_gn+=( "devtools_skip_typecheck=false" )
- fi
-
- # Disable external code space for V8 for ppc64. It is disabled for ppc64
- # by default, but cross-compiling on amd64 enables it again.
- if tc-is-cross-compiler && use ppc64; then
- myconf_gn+=( "v8_enable_external_code_space=false" )
- fi
-
- # This determines whether or not GN uses the bundled libcxx
- if use libcxx; then
- myconf_gn+=( "use_custom_libcxx=true" )
- else
- myconf_gn+=(
- "use_custom_libcxx=false"
- "use_llvm_libatomic=false"
- )
- append-cppflags -U_GLIBCXX_ASSERTIONS #See #318
- fi
-
- myconf_gn+=( "use_bluez=$(usex bluetooth true false)" )
-
- myconf_gn+=( "is_cfi=$(usex cfi true false)" )
-
- if use cfi; then
- myconf_gn+=(
- "use_cfi_icall=true"
- "use_cfi_cast=true"
- )
- fi
-
- myconf_gn+=(
- "optimize_webui=$(usex optimize-webui true false)"
- "use_system_freetype=$(usex system-harfbuzz true false)"
- "use_system_libopenjpeg2=$(usex system-openjpeg true false)"
- "enable_pdf=true"
- "use_system_lcms2=true"
- "enable_print_preview=true"
- "use_thin_lto=$(usex thinlto true false)"
- "thin_lto_enable_optimizations=$(usex optimize-thinlto true false)"
-
- # Ungoogled flags
- "build_with_tflite_lib=false"
- "enable_mdns=false"
- "enable_mse_mpeg2ts_stream_parser=$(usex proprietary-codecs true false)"
- "enable_remoting=false"
- "enable_reporting=false"
- "enable_service_discovery=false"
- "exclude_unwind_tables=true"
- "google_api_key=\"\""
- "google_default_client_id=\"\""
- "google_default_client_secret=\"\""
- "safe_browsing_mode=0"
- "use_official_google_api_keys=false"
- "use_unofficial_version_number=false"
-
- # "enable_swiftshader=false"
-
- # Additional flags
- # "perfetto_use_system_zlib=true"
- # "use_system_zlib=true"
- # "use_system_libjpeg=true"
- # "rtc_build_examples=false"
- # "enable_chromium_prelude=false"
- # "enable_updater=false"
- # "enable_update_notifications=false"
- # "enable_constraints=false"
- # "rtc_rusty_base64=false"
- # "v8_enable_temporal_support=false"
- # "media_use_symphonia=false"
- # "pdf_enable_rust_png=false"
- # "skia_use_libpng_encode=true"
- # "skia_use_libpng_decode=true"
- # "skia_use_rust_png_decode=false"
- # "skia_use_rust_png_encode=false"
- # "enable_jxl_decoder=false"
- )
-
- if use amd64 || use arm64; then
- myconf_gn+=(
- "v8_drumbrake_bounds_checks=true"
- # "v8_enable_drumbrake=true"
- )
- fi
-
- if use thinlto; then
- # We need to change the default value of import-instr-limit in
- # LLVM to limit the text size increase. The default value is
- # 100, and we change it to 30 to reduce the text size increase
- # from 25% to 10%. The performance number of page_cycler is the
- # same on two of the thinLTO configurations, we got 1% slowdown
- # on speedometer when changing import-instr-limit from 100 to 30.
- # append-ldflags "-Wl,-plugin-opt,-import-instr-limit=30"
- sed -i '/import_instr_limit = 5/{s++import_instr_limit = 30+;h};${x;/./{x;q0};x;q1}' \
- build/config/compiler/BUILD.gn || die
-
- append-ldflags "-Wl,--thinlto-jobs=$(makeopts_jobs)"
- fi
-
- # Facilitate deterministic builds (taken from build/config/compiler/BUILD.gn)
- append-cflags -Wno-builtin-macro-redefined
- append-cxxflags -Wno-builtin-macro-redefined
- append-cppflags "-D__DATE__= -D__TIME__= -D__TIMESTAMP__="
-
- local flags
- einfo "Building with the following compiler settings:"
- for flags in C{C,XX} AR NM RANLIB {C,CXX,CPP,LD}FLAGS \
- EXTRA_GN UGC_{SKIP_{PATCHES,SUBSTITUTION},KEEP_BINARIES} ; do
- einfo " ${flags} = \"${!flags}\""
- done
-
- # Since we build from tarballs, we need to set the channel here so that it can be used in the build.
- export CHROME_VERSION_EXTRA="${SLOT}"
-
- einfo "Configuring Chromium ..."
- set -- gn gen --args="${myconf_gn[*]}${EXTRA_GN:+ ${EXTRA_GN}}" out/Release
- echo "$@"
- "$@" || die "Failed to configure Chromium"
-
- # The "if" below should not be executed unless testing
- if [ ! -z "${NODIE}" ]; then
- # List all args
- # gn args --list out/Release
-
- # Quick compiler check
- eninja -C out/Release protoc torque
- fi
-}
-
-src_compile() {
- # Final link uses lots of file descriptors.
- ulimit -n 2048
-
- # Calling this here supports resumption via FEATURES=keepwork
- python_setup
-
- # I hate doing this but upstream Rust have yet to come up with a better solution for
- # us poor packagers. Required for Split LTO units, which are required for CFI.
- export RUSTC_BOOTSTRAP=1
-
- # Don't inherit PYTHONPATH from environment, bug #789021, #812689
- local -x PYTHONPATH=
-
- # Build mksnapshot and pax-mark it.
- if use pax-kernel; then
- local x
- for x in mksnapshot v8_context_snapshot_generator code_cache_generator; do
- if tc-is-cross-compiler; then
- eninja -C out/Release "host/${x}"
- pax-mark m "out/Release/host/${x}"
- else
- eninja -C out/Release "${x}"
- pax-mark m "out/Release/${x}"
- fi
- done
- fi
-
- # Even though ninja autodetects number of CPUs, we respect
- # user's options, for debugging with -j 1 or any other reason.
- eninja -C out/Release chrome chrome_sandbox $(use test && echo "base_unittests")
-
- pax-mark m out/Release/chrome
-
- # This codepath does minimal patching, so we're at the mercy of upstream
- # CFLAGS. This is fine - we're not intending to force this on users
- # and we do a lot of flag 'management' anyway.
- if use bundled-toolchain; then
- QA_FLAGS_IGNORED="
- usr/lib64/chromium-browser/chrome
- usr/lib64/chromium-browser/chrome-sandbox
- usr/lib64/chromium-browser/chromedriver
- usr/lib64/chromium-browser/chrome_crashpad_handler
- usr/lib64/chromium-browser/libEGL.so
- usr/lib64/chromium-browser/libGLESv2.so
- usr/lib64/chromium-browser/libVkICD_mock_icd.so
- usr/lib64/chromium-browser/libVkLayer_khronos_validation.so
- usr/lib64/chromium-browser/libqt6_shim.so
- usr/lib64/chromium-browser/libvk_swiftshader.so
- usr/lib64/chromium-browser/libvulkan.so.1
- "
- fi
-
- use convert-dict && eninja -C out/Release convert_dict
-
- use enable-driver && eninja -C out/Release chromedriver
- #use suid && eninja -C out/Release chrome_sandbox
-
- use enable-driver && mv out/Release/chromedriver{.unstripped,}
-
- rm -f out/Release/locales/*.pak.info || die
-
- # Generate support files (desktop file, manpage, etc.) See: #684550 #706786 #968958
- ${EPYTHON} "${FILESDIR}/generate-support-files.py" \
- --installdir "/usr/$(get_libdir)/ungoogled-chromium-browser" \
- --channel "${SLOT}" ||
- die "Failed to generate support files"
-}
-
-src_test() {
- # Tests may be flaky with usersandbox, and the test runner executes significantly faster without.
- # If you seem to be excluding too many tests for a particular milestone: comment them out, reboot, and
- # run the tests again. If that doesn't help, try FEATURES="-usersandbox" and send it because obviously the
- # chromium gods are not smiling upon you today. Do some runtime testing, obvs.
- local skip_tests=(
- # Wildcard exclusions (if all tests in a test suite are broken)
- 'AlternateTestParams/PartitionAllocDeathTest.RepeatedAllocReturnNullDirect/*'
- 'AlternateTestParams/PartitionAllocDeathTest.RepeatedReallocReturnNullDirect/*'
- 'AlternateTestParams/PartitionAllocTest.*' # 200+ tests, >= 1 crashes entire test runner with usersandbox.
- 'CheckExitCodeAfterSignalHandlerDeathTest.*'
- 'CriticalProcessAndThreadSpotChecks/HangWatcherAnyCriticalThreadTests.*'
- 'LazyThreadPoolTaskRunnerEnvironmentTest.*' # M142
- 'ToolsSanityTest.BadVirtualCall*'
- # requires en-us locale
- SysStrings.SysNativeMBAndWide
- SysStrings.SysNativeMBToWide
- SysStrings.SysWideToNativeMB
- # Specific test cases
- CancelableEventTest.BothCancelFailureAndSucceedOccurUnderContention
- FilePathTest.FromUTF8Unsafe_And_AsUTF8Unsafe
- HistogramTesterTest.PumaTestUniqueSample
- ImmediateCrashTest.ExpectedOpcodeSequence # M150
- PathServiceTest.CheckedGetFailure
- PlatformThreadTest.CanChangeThreadType
- RawPtrTest.SetLookupUsesGetForComparison # M146 ; also broken for alpine in M144.
- RustLogIntegrationTest.CheckAllSeverity
- StackCanary.ChangingStackCanaryCrashesOnReturn
- StackTraceDeathTest.StackDumpSignalHandlerIsMallocFree
- TestLauncherTools.TruncateSnippetFocusedMatchesFatalMessagesTest
- ThreadPoolEnvironmentConfig.CanUseBackgroundPriorityForWorker
- )
- local test_filter="-$(IFS=:; printf '%s' "${skip_tests[*]}")"
- # test-launcher-bot-mode enables parallelism and plain output
- # Check individual tests with --gtest_filter=<test you want> --single-process-tests
- ./out/Release/base_unittests --test-launcher-bot-mode \
- --test-launcher-jobs="$(get_makeopts_jobs)" \
- --gtest_filter="${test_filter}" || die "Tests failed!"
-}
-
-src_install() {
- local browser_suffix
- if [[ "${SLOT}" != "stable" ]]; then
- browser_suffix="-${SLOT}"
- else
- browser_suffix=""
- fi
- local CHROMIUM_HOME="/usr/$(get_libdir)/ungoogled-chromium-browser${browser_suffix}"
- exeinto "${CHROMIUM_HOME}"
- doexe out/Release/chrome
-
- #newexe out/Release/chrome_sandbox chrome-sandbox
- #fperms 4755 "${CHROMIUM_HOME}/chrome-sandbox"
-
- use enable-driver && doexe out/Release/chromedriver
-
- #* https://github.com/ungoogled-software/ungoogled-chromium/pull/3563
- doexe out/Release/chrome_crashpad_handler
-
- if use convert-dict; then
- newexe "${FILESDIR}/update-dicts.sh" update-dicts.sh
- doexe out/Release/convert_dict
- fi
-
- ozone_auto_session () {
- use X && use wayland && ! use headless && echo true || echo false
- }
-
- cat <<- EOF > "${D}${CHROMIUM_HOME}/chromium-launcher.sh" || die
- #!/bin/bash
- # Wrapper to launch slotted Chromium via the chromium-common launcher script.
- export CHROME_DESKTOP="ungoogled-chromium-browser${browser_suffix}.desktop"
- export CHROME_EXEC_NAME="ungoogled-chromium-browser${browser_suffix}"
- export CHROME_VERSION_EXTRA="${SLOT}"
- export CHROME_WRAPPER="\$(readlink -f "\$0")"
- export OZONE_AUTO_SESSION=$(ozone_auto_session)
-
- exec /usr/libexec/chromium/chromium-launcher.sh "\$@"
- EOF
-
- chmod 755 "${D}${CHROMIUM_HOME}/chromium-launcher.sh" || die
-
- # It is important that we name the target "chromium-browser",
- # xdg-utils expect it; bug #355517.
- dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/ungoogled-chromium-browser${browser_suffix}
- # keep the old symlink around for consistency
- dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/ungoogled-chromium${browser_suffix}
-
- use enable-driver && dosym "${CHROMIUM_HOME}/chromedriver" /usr/bin/ungoogled-chromedriver${browser_suffix}
-
- pushd out/Release/locales > /dev/null || die
- chromium_remove_language_paks
- popd > /dev/null || die
-
- insinto "${CHROMIUM_HOME}"
- doins out/Release/*.bin
- doins out/Release/*.pak
- doins -r out/Release/hyphen-data
-
- if use bindist; then
- # We built libffmpeg as a component library, but we can't distribute it
- # with proprietary codec support. Remove it and make a symlink to the requested
- # system library.
- rm -f out/Release/libffmpeg.so \
- || die "Failed to remove bundled libffmpeg.so (with proprietary codecs)"
- # symlink the libffmpeg.so from either ffmpeg-chromium or ffmpeg[chromium].
- einfo "Creating symlink to libffmpeg.so from $(usex ffmpeg-chromium ffmpeg-chromium ffmpeg[chromium])..."
- dosym ../chromium/libffmpeg.so$(usex ffmpeg-chromium .${PV%%\.*} "") \
- /usr/$(get_libdir)/ungoogled-chromium-browser/libffmpeg.so
- fi
-
- (
- shopt -s nullglob
- local files=(out/Release/*.so out/Release/*.so.[0-9])
- [[ ${#files[@]} -gt 0 ]] && doins "${files[@]}"
- )
-
- if ! use system-icu && ! use headless; then
- doins out/Release/icudtl.dat
- fi
-
- doins -r out/Release/locales
- #doins -r out/Release/MEIPreload
-
- # Install vk_swiftshader_icd.json; bug #827861
- doins out/Release/vk_swiftshader_icd.json
-
- if [[ -d out/Release/swiftshader ]]; then
- insinto "${CHROMIUM_HOME}/swiftshader"
- doins out/Release/swiftshader/*.so
- fi
-
- use widevine && dosym WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so "${CHROMIUM_HOME}/libwidevinecdm.so"
-
- # Install icons
- local branding size
- for size in 16 24 32 48 64 128 256 ; do
- case ${size} in
- 16|32) branding="chrome/app/theme/default_100_percent/chromium" ;;
- *) branding="chrome/app/theme/chromium" ;;
- esac
- newicon -s ${size} "${branding}/product_logo_${size}.png" \
- ungoogled-chromium-browser${browser_suffix}.png
- done
-
- # Install desktop entry
- domenu out/Release/ungoogled-chromium-browser${browser_suffix}.desktop
-
- # Install GNOME default application entry (bug #303100).
- insinto /usr/share/gnome-control-center/default-apps
- doins out/Release/ungoogled-chromium-browser${browser_suffix}.xml
-
- # Install AppStream metadata
- insinto /usr/share/appdata
- doins out/Release/ungoogled-chromium-browser${browser_suffix}.appdata.xml
-
- # Install manpage; bug #684550
- doman out/Release/ungoogled-chromium-browser${browser_suffix}.1
- dosym ungoogled-chromium-browser${browser_suffix}.1 /usr/share/man/man1/ungoogled-chromium${browser_suffix}.1
-
- readme.gentoo_create_doc
-}
-
-pkg_postrm() {
- xdg_icon_cache_update
- xdg_desktop_database_update
-}
-
-pkg_postinst() {
- xdg_icon_cache_update
- xdg_desktop_database_update
- readme.gentoo_print_elog
-
- if use !headless && [[ -z "${REPLACING_VERSIONS}" ]]; then
- if use vaapi; then
- elog "Hardware-accelerated video decoding configuration:"
- elog
- elog "Chromium supports multiple backends for hardware acceleration. To enable one,"
- elog " Add to CHROMIUM_FLAGS in /etc/chromium/default:"
- elog
- elog "1. VA-API with OpenGL (recommended for most users):"
- elog " --enable-features=AcceleratedVideoDecodeLinuxGL"
- elog " VaapiVideoDecoder may need to be added as well, but try without first."
- elog
- if use wayland; then
- elog "2. Enhanced Wayland/EGL performance:"
- elog " --enable-features=AcceleratedVideoDecodeLinuxGL,AcceleratedVideoDecodeLinuxZeroCopyGL"
- elog
- fi
- if use X; then
- elog "$(usex wayland "3" "2"). VA-API with Vulkan:"
- elog " --enable-features=VaapiVideoDecoder,VaapiIgnoreDriverChecks,Vulkan,DefaultANGLEVulkan,VulkanFromANGLE"
- elog
- if use wayland; then
- elog " NOTE: Vulkan acceleration requires X11 and will not work under Wayland sessions."
- elog " Use OpenGL-based acceleration instead when running under Wayland."
- elog
- fi
- fi
- elog "Additional options:"
- elog " To enable hardware-accelerated encoding (if supported)"
- elog " add 'AcceleratedVideoEncoder' to your feature list"
- elog " VaapiIgnoreDriverChecks bypasses driver compatibility checks"
- elog " (may be needed for newer/unsupported hardware)"
- elog
- else
- elog "This Chromium build was compiled without VA-API support, which provides"
- elog "hardware-accelerated video decoding."
- fi
- if use screencast; then
- elog "Screencast is disabled by default at runtime. Either enable it"
- elog "by navigating to chrome://flags/#enable-webrtc-pipewire-capturer"
- elog "inside Chromium or add --enable-features=WebRTCPipeWireCapturer"
- elog "to CHROMIUM_FLAGS in /etc/chromium/default."
- elog
- elog "Additional setup may be required for screencasting to work."
- elog "See issue: https://github.com/PF4Public/gentoo-overlay/issues/314"
- fi
- if use gtk4; then
- elog "Chromium prefers GTK3 over GTK4 at runtime. To override this"
- elog "behaviour you need to pass --gtk-version=4, e.g. by adding it"
- elog "to CHROMIUM_FLAGS in /etc/chromium/default."
- fi
- if use widevine; then
- elog "widevine requires binary plugins, which are distributed separately"
- elog "Make sure you have www-plugins/chrome-binary-plugins installed"
- fi
- fi
-
- if systemd_is_booted && ! [[ -f "/etc/machine-id" ]]; then
- ewarn "The lack of an '/etc/machine-id' file on this system booted with systemd"
- ewarn "indicates that the Gentoo handbook was not followed to completion."
- ewarn ""
- ewarn "Chromium is known to behave unpredictably with this system configuration;"
- ewarn "please complete the configuration of this system before logging any bugs."
- fi
-
- # Stable slot doesn't change profile directory, and it's vanishingly unlikely that users will downgrade from dev.
- if [[ -n "${REPLACING_VERSIONS}" ]]; then
- local replacing_non_slotted=false
- # there could be more than one PVR
- for version in ${REPLACING_VERSIONS}; do
- if ver_test "${version}" -le "145.0.7632.116"; then
- replacing_non_slotted=true
- break
- fi
- done
- if ${replacing_non_slotted}; then
- ewarn "This version of Chromium has replaced a non-slotted ebuild."
- if [[ ${SLOT} != "stable" ]]; then
- ewarn "This channel has its own profile directory, so your existing profile will not be used."
- ewarn "To use your existing profile, either copy or move it to the new location."
- ewarn "See https://wiki.gentoo.org/wiki/Chromium#Profile_Directories for more information."
- ewarn ""
- fi
- ewarn "Any existing Progressive Web Apps (PWAs) will need to be reinstalled,"
- ewarn "or have the path in the desktop files updated to point to the new wrapper script."
- fi
- fi
-}
-
-eapply_wrapper () {
- if [ ! -z "${NODIE}" ]; then
- nonfatal eapply "$@"
- else
- eapply "$@"
- fi
-}
-
-git_wrapper () {
- if [ ! -z "${NODIE}" ]; then
- git "$@"
- else
- git "$@" || die
- fi
-}
-
-filter_wrapper () {
- einfo "Applying ${i##*/}"
- #? fuzz factor of 3 is OK?
- if [ ! -z "${NODIE}" ]; then
- filterdiff -p1 "${@:2}" < "$1" | patch -F 3 -p1
- else
- filterdiff -p1 "${@:2}" < "$1" | patch -F 3 -p1 || die
- fi
-}
diff --git a/www-client/ungoogled-chromium/ungoogled-chromium-150.0.7871.181_p1.ebuild b/www-client/ungoogled-chromium/ungoogled-chromium-150.0.7871.181_p1.ebuild
deleted file mode 100644
index 1e24eb89848d..000000000000
--- a/www-client/ungoogled-chromium/ungoogled-chromium-150.0.7871.181_p1.ebuild
+++ /dev/null
@@ -1,2528 +0,0 @@
-# Copyright 2009-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-# Use following environment variables to customise the build
-# EXTRA_GN — pass extra options to gn
-# NINJAOPTS="-k0 -j8" useful to populate ccache even if ebuild is still failing
-# UGC_SKIP_PATCHES — space-separated list of patches to skip
-# UGC_KEEP_BINARIES — space-separated list of binaries to keep
-# UGC_SKIP_SUBSTITUTION — space-separated list of files to skip domain substitution
-
-# USE=bundled-toolchain is intended for users who want to use the same toolchain
-# as the upstream releases. It's also a good fallback in case we fall behind
-# and need to get a release out quickly (less likely with `dev` in-tree).
-# We can't rely on it as a default since the toolchain is only shipped for x86-64;
-# other architectures will need to use system toolchain.
-
-# Since m133 we are using CI-generated tarballs from
-# https://github.com/chromium-linux-tarballs/chromium-tarballs/
-
-# These are bit-for-bit identical to the official releases, but are built
-# using an external CI system that we have some control over, in case
-# issues pop up again with official tarball generation.
-
-GN_MIN_VER=0.2374
-# chromium-tools/get-chromium-toolchain-strings.py (or just use Chromicler)
-# Node for M145+ should be 24.12.0 but that's not packaged in Gentoo yet. See #969145
-TEST_FONT="9c07d19d9c5ee1ff94f717e6fb17e0c8c354e6f9"
-BUNDLED_CLANG_VER="llvmorg-23-init-10931-g20b6ec66-11"
-BUNDLED_RUST_VER="4c4205163abcbd089150.0.7871.18148b3efab796c543ba1ea687-5"
-RUST_SHORT_HASH=${BUNDLED_RUST_VER:0:10}-${BUNDLED_RUST_VER##*-}
-NODE_VER="24.16.0-r1"
-ESBUILD_VER="0.25.1"
-ROLLUP_VER="4.57.1" # currently manual.
-
-CHROMIUM_LANGS="af am ar as az be bg bn bs ca cs cy da de el en-GB es es-419 et eu fa fi fil
- fr fr-CA gl gu he hi hr hu hy id is it ja ka kk km kn ko ky lo lt lv mk ml mn mr ms my
- nb ne nl or pa pl pt-BR pt-PT ro ru si sk sl sq sr sr-Latn sv sw ta te th tr uk ur uz
- vi zh-CN zh-HK zh-TW zu"
-
-#UGC_COMMIT_ID="47ee4af0ff5367d1c11ee4d363befdec373340c4"
-# UGC_PR_COMMITS=(
-# c917e096342e5b90eeea91ab1f8516447c8756cf
-# 5794e9d12bf82620d5f24505798fecb45ca5a22d
-# )
-
-CROMITE_COMMIT_ID="cb3baf14f52eb4365d017f640f85310735c19b79"
-
-declare -A CHROMIUM_COMMITS=(
-# ["fcfb1a42813f1e9d8babedc7bb2e0f06101a3151"]="." #148+
- ["-cf94ed446320d35c8613ed9b3ffb6e6a61bfcb5f"]="."
-# # ["-37c28a19804e47a68eabf3cf882a310689fc325b"]="." #disable style check for cromite
-# # ["cd5a0df905a28faa89ff2a4ab44f893f84dc4487"]="net/third_party/quiche/src"
-)
-
-LLVM_COMPAT=( 21 22 23 )
-PYTHON_COMPAT=( python3_{13..14} )
-PYTHON_REQ_USE="xml(+)"
-RUST_MIN_VER=1.91.0
-RUST_NEEDS_LLVM="yes please"
-RUST_OPTIONAL="yes" # Not actually optional, but we don't need system Rust (or LLVM) with USE=bundled-toolchain
-RUST_REQ_USE="rustfmt" # Upstream run rustfmt on bindgen output, so we need it to be available.
-
-inherit check-reqs chromium-2 desktop flag-o-matic llvm-r1 multiprocessing ninja-utils pax-utils
-inherit python-any-r1 readme.gentoo-r1 rust systemd toolchain-funcs xdg-utils
-
-DESCRIPTION="Modifications to Chromium for removing Google integration and enhancing privacy"
-HOMEPAGE="https://github.com/ungoogled-software/ungoogled-chromium"
-PPC64_HASH="a85b64f07b489b8c6fdb13ecf79c16c56c560fc6"
-PATCH_V="${PV%%\.*}-1"
-COPIUM_COMMIT="b00f26bb5e0781020da5f830981472a142c6baf1"
-SRC_URI="https://github.com/chromium-linux-tarballs/chromium-tarballs/releases/download/${PV/_*}/chromium-${PV/_*}-linux.tar.xz
- https://deps.gentoo.zip/www-client/chromium/rollup-wasm-node-${ROLLUP_VER}.tgz
- https://gitlab.com/Matt.Jolly/chromium-patches/-/archive/${PATCH_V}/chromium-patches-${PATCH_V}.tar.bz2
- !bundled-toolchain? (
- https://codeberg.org/selfisekai/copium/archive/${COPIUM_COMMIT}.tar.gz
- -> chromium-patches-copium-${COPIUM_COMMIT:0:10}.tar.gz
- )
- bundled-toolchain? (
- https://commondatastorage.googleapis.com/chromium-browser-clang/Linux_x64/clang-${BUNDLED_CLANG_VER}.tar.xz
- -> chromium-clang-${BUNDLED_CLANG_VER}.tar.xz
- https://commondatastorage.googleapis.com/chromium-browser-clang/Linux_x64/rust-toolchain-${BUNDLED_RUST_VER}-${BUNDLED_CLANG_VER%-*}.tar.xz
- -> chromium-rust-toolchain-${RUST_SHORT_HASH}-${BUNDLED_CLANG_VER%-*}.tar.xz
- )
- test? (
- https://chromium-fonts.storage.googleapis.com/${TEST_FONT} -> chromium-testfonts-${TEST_FONT:0:10}.tar.gz
- )
- ppc64? (
- https://gitlab.raptorengineering.com/raptor-engineering-public/chromium/openpower-patches/-/archive/${PPC64_HASH}/openpower-patches-${PPC64_HASH}.tar.bz2 -> chromium-openpower-${PPC64_HASH:0:10}.tar.bz2
- )
-"
-
-# Gentoo tarball:
-# https://chromium-tarballs.distfiles.gentoo.org/chromium-${PV/_*}.tar.xz -> chromium-${PV/_*}-gentoo.tar.xz
-
-# chromium-linux-tarballs
-# https://github.com/chromium-linux-tarballs/chromium-tarballs/releases/download/${PV/_*}/chromium-${PV/_*}-linux.tar.xz
-
-# Official tarball:
-# https://commondatastorage.googleapis.com/chromium-browser-official/chromium-${PV/_*}${LITE_TARBALL:+-lite}.tar.xz
-
-# https://gitweb.gentoo.org/proj/chromium-tools.git/tree/get-chromium-licences.py @ 145.0.7632.76
-LICENSE="Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD BSD-2 Base64 Boost-1.0 CC-BY-3.0 CC-BY-4.0 Clear-BSD FFT2D FTL"
-LICENSE+=" IJG ISC LGPL-2 LGPL-2.1 MIT MPL-1.1 MPL-2.0 Ms-PL PSF-2 SGI-B-2.0 SSLeay SunSoft Unicode-3.0"
-LICENSE+=" Unicode-DFS-2015 Unlicense UoI-NCSA ZLIB libtiff openssl"
-LICENSE+=" cromite? ( GPL-3 )"
-
-SLOT="stable"
-KEYWORDS="amd64 ~arm64 ~ppc64 ~x86"
-
-IUSE_SYSTEM_LIBS="abseil-cpp av1 brotli crc32c double-conversion ffmpeg +harfbuzz icu jsoncpp +libusb libvpx +openh264 openjpeg re2 snappy woff2 +zstd"
-IUSE="+X bindist bluetooth bundled-toolchain cfi convert-dict cups custom-cflags debug ffmpeg-chromium enable-driver gtk4 hangouts headless kerberos +libcxx nvidia +official optimize-thinlto optimize-webui override-data-dir pax-kernel pgo"
-IUSE+=" +proprietary-codecs pulseaudio qt6 screencast selinux test thinlto cromite vaapi wayland widevine cpu_flags_ppc_vsx3"
-RESTRICT="
- !bindist? ( bindist )
- !test? ( test )
- arm64? ( test )
- !system-ffmpeg? ( proprietary-codecs? ( bindist ) )
- !system-openh264? ( bindist )
- cromite? ( bindist )"
-
-REQUIRED_USE="
- !headless? ( || ( X wayland ) )
- screencast? ( wayland )
- ffmpeg-chromium? ( bindist proprietary-codecs )
- optimize-thinlto? ( thinlto )
- cfi? ( thinlto )
- x86? ( !thinlto !widevine )
- debug? ( !official )
- vaapi? ( !system-av1 !system-libvpx )
-"
-
-UGC_PV="${PV/_p/-}"
-UGC_PF="${PN}-${UGC_PV}"
-UGC_URL="https://github.com/ungoogled-software/${PN}/archive/"
-
-if [ -z "$UGC_COMMIT_ID" ]; then
- UGC_URL="${UGC_URL}${UGC_PV}.tar.gz -> ${UGC_PF}.tar.gz"
- UGC_WD="${WORKDIR}/${UGC_PF}"
-else
- UGC_URL="${UGC_URL}${UGC_COMMIT_ID}.tar.gz -> ${PN}-${UGC_COMMIT_ID}.tar.gz"
- UGC_WD="${WORKDIR}/ungoogled-chromium-${UGC_COMMIT_ID}"
-fi
-
-SRC_URI+="${UGC_URL}
-"
-
-if [ ! -z "${UGC_PR_COMMITS[*]}" ]; then
- for i in "${UGC_PR_COMMITS[@]}"; do
- SRC_URI+="https://github.com/ungoogled-software/${PN}/commit/$i.patch?full_index=true -> ${PN}-$i.patch
- "
- done
-fi
-
-if [ ! -z "${CHROMIUM_COMMITS[*]}" ]; then
- # for i in "${CHROMIUM_COMMITS[@]}"; do
- for i in "${!CHROMIUM_COMMITS[@]}"; do
- if [[ ${CHROMIUM_COMMITS[$i]} =~ webrtc ]]; then
- #TODO: is it safe to use this mirror?
- SRC_URI+="https://github.com/webrtc-mirror/webrtc/commit/${i/-}.patch?full_index=true -> webrtc-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ angle ]]; then
- SRC_URI+="https://github.com/google/angle/commit/${i/-}.patch?full_index=true -> angle-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ quiche ]]; then
- SRC_URI+="https://github.com/google/quiche/commit/${i/-}.patch?full_index=true -> quiche-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ dawn ]]; then
- SRC_URI+="https://github.com/google/dawn/commit/${i/-}.patch?full_index=true -> dawn-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ perfetto ]]; then
- SRC_URI+="https://github.com/google/perfetto/commit/${i/-}.patch?full_index=true -> perfetto-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ink ]]; then
- SRC_URI+="https://github.com/google/ink/commit/${i/-}.patch?full_index=true -> ink-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ vulkan-utility-libraries ]]; then
- SRC_URI+="https://github.com/KhronosGroup/Vulkan-Utility-Libraries/commit/${i/-}.patch?full_index=true -> vulkan-utility-libraries-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ruy ]]; then
- SRC_URI+="https://github.com/google/ruy/commit/${i/-}.patch?full_index=true -> ruy-${i/-}.patch
- "
- else
- SRC_URI+="https://github.com/chromium/chromium/commit/${i/-}.patch?full_index=true -> chromium-${i/-}.patch
- "
- fi
- done
-fi
-
-SRC_URI+="cromite? ( https://github.com/uazo/cromite/archive/${CROMITE_COMMIT_ID}.tar.gz -> cromite-${CROMITE_COMMIT_ID}.tar.gz )
-"
-
-for i in ${IUSE_SYSTEM_LIBS}; do
- [[ $i =~ ^(\+)?(.*)$ ]]
- IUSE+=" ${BASH_REMATCH[1]}system-${BASH_REMATCH[2]}"
-done
-
-COMMON_X_DEPEND="
- x11-libs/libXcomposite:=
- x11-libs/libXcursor:=
- x11-libs/libXdamage:=
- x11-libs/libXfixes:=
- >=x11-libs/libXi-1.6.0:=
- x11-libs/libXrandr:=
- x11-libs/libXrender:=
- x11-libs/libXtst:=
- x11-libs/libxshmfence:=
-"
-
-# sys-libs/zlib: https://bugs.gentoo.org/930365; -ng is not compatible.
-# We _could_ use the bundled minizip, but that's against policy.
-COMMON_SNAPSHOT_DEPEND="
- system-icu? ( >=dev-libs/icu-78:= )
- system-abseil-cpp? ( >=dev-cpp/abseil-cpp-20260107.0 )
- system-brotli? ( >=app-arch/brotli-9999 )
- system-crc32c? ( dev-libs/crc32c )
- system-double-conversion? ( dev-libs/double-conversion )
- system-woff2? ( media-libs/woff2 )
- system-snappy? ( app-arch/snappy )
- system-jsoncpp? ( dev-libs/jsoncpp )
- system-openjpeg? ( media-libs/openjpeg:2= )
- system-re2? ( >=dev-libs/re2-0.2019.08.01:= )
- system-libvpx? ( >=media-libs/libvpx-1.13.0:=[postproc] )
- system-libusb? ( virtual/libusb:1 )
- cromite? ( dev-util/patchutils )
- >=dev-libs/libxml2-2.12.4:=[icu]
- dev-libs/nspr:=
- >=dev-libs/nss-3.26:=
- dev-libs/libxslt:=
- media-libs/fontconfig:=
- >=media-libs/freetype-2.11.0-r1:=
- system-harfbuzz? ( >=media-libs/harfbuzz-3:0=[icu(-)] )
- media-libs/libjpeg-turbo:=
- media-libs/libpng:=
- system-zstd? ( >=app-arch/zstd-1.5.5:= )
- >=media-libs/libwebp-0.4.0:=
- media-libs/mesa:=[gbm(+)]
- >=media-libs/openh264-2.6.0:=
- system-av1? (
- >=media-libs/dav1d-1.0.0:=
- >=media-libs/libaom-3.7.0:=
- )
- sys-libs/zlib:=
- !headless? (
- dev-libs/glib:2
- >=media-libs/alsa-lib-1.0.19:=
- media-video/pipewire:=
- pulseaudio? (
- || (
- media-libs/libpulse
- >=media-sound/apulse-0.1.9
- )
- )
- sys-apps/pciutils:=
- kerberos? ( virtual/krb5 )
- vaapi? ( >=media-libs/libva-2.7:=[X?,wayland?] )
- X? (
- x11-base/xorg-proto:=
- x11-libs/libX11:=
- x11-libs/libxcb:=
- x11-libs/libXext:=
- )
- x11-libs/libxkbcommon:=
- wayland? (
- screencast? ( media-video/pipewire:= )
- dev-libs/libffi:=
- dev-libs/wayland:=
- screencast? (
- media-video/pipewire:=
- || (
- sys-apps/xdg-desktop-portal-gnome
- sys-apps/xdg-desktop-portal-gtk
- kde-plasma/xdg-desktop-portal-kde
- gui-libs/xdg-desktop-portal-lxqt
- gui-libs/xdg-desktop-portal-wlr
- )
- )
- )
- )
-"
-
-COMMON_DEPEND="
- ${COMMON_SNAPSHOT_DEPEND}
- app-arch/bzip2:=
- dev-libs/expat:=
- system-ffmpeg? (
- >=media-video/ffmpeg-6.1:=
- >=media-libs/opus-1.3.1:=
- )
- net-misc/curl[ssl]
- sys-apps/dbus:=
- media-libs/flac:=
- sys-libs/zlib:=[minizip]
- !headless? (
- >=app-accessibility/at-spi2-core-2.46.0:2
- media-libs/mesa:=[X?,wayland?]
- virtual/udev
- x11-libs/cairo:=
- x11-libs/gdk-pixbuf:2
- x11-libs/pango:=
- cups? ( >=net-print/cups-1.3.11:= )
- qt6? ( dev-qt/qtbase:6[gui,widgets] )
- X? ( ${COMMON_X_DEPEND} )
- )
-"
-RDEPEND="${COMMON_DEPEND}
- !www-client/ungoogled-chromium:0
- >=www-client/chromium-common-2
- !headless? (
- || (
- x11-libs/gtk+:3[X?,wayland?]
- gui-libs/gtk:4[X?,wayland?]
- )
- qt6? ( dev-qt/qtbase:6[X?,wayland?] )
- )
- virtual/ttf-fonts
- selinux? ( sec-policy/selinux-chromium )
- bindist? (
- ffmpeg-chromium? ( media-video/ffmpeg-chromium:${PV%%\.*} )
- )
- !override-data-dir? (
- !www-client/chromium:${SLOT}
- !www-client/cromite:${SLOT}[-override-data-dir]
- )
-"
-# For M149+ pipewire is a mandatory build-time dependency, but it's optional at runtime for most configurations.
-DEPEND="${COMMON_DEPEND}
- !headless? (
- media-video/pipewire
- gtk4? ( gui-libs/gtk:4[X?,wayland?] )
- !gtk4? ( x11-libs/gtk+:3[X?,wayland?] )
- )
-"
-
- # pgo? ( >=llvm-core/clang-22.0.0_pre20260106 >=llvm-core/lld-22.0.0_pre20260106 )
-BDEPEND="
- ${COMMON_SNAPSHOT_DEPEND}
- ${PYTHON_DEPS}
- $(python_gen_any_dep '
- dev-python/setuptools[${PYTHON_USEDEP}]
- ')
- >=app-arch/gzip-1.7
- !headless? (
- qt6? ( dev-qt/qtbase:6 )
- )
- !bundled-toolchain? ( $(llvm_gen_dep '
- llvm-core/clang:${LLVM_SLOT}
- llvm-core/llvm:${LLVM_SLOT}
- cfi? ( llvm-runtimes/clang-runtime:${LLVM_SLOT}[sanitize] )
- official? (
- !ppc64? ( llvm-runtimes/compiler-rt-sanitizers:${LLVM_SLOT}[cfi] )
- ) ')
- || (
- $(llvm_gen_dep 'llvm-core/lld:${LLVM_SLOT}')
- >=sys-devel/mold-2.41.0
- )
- ${RUST_DEPEND}
- )
- >=dev-util/bindgen-0.72.1
- >=dev-build/gn-${GN_MIN_VER}
- app-alternatives/ninja
- dev-lang/perl
- >=dev-util/gperf-3.2
- dev-util/esbuild:${ESBUILD_VER}
- dev-vcs/git
- >=net-libs/nodejs-${NODE_VER}[inspector]
- sys-apps/hwdata
- >=sys-devel/bison-2.4.3
- sys-devel/flex
- virtual/pkgconfig
- x11-misc/xdg-utils
-"
-
-if ! has chromium_pkg_die ${EBUILD_DEATH_HOOKS}; then
- EBUILD_DEATH_HOOKS+=" chromium_pkg_die";
-fi
-
-DISABLE_AUTOFORMATTING="yes"
-DOC_CONTENTS="
-Some web pages may require additional fonts to display properly.
-Try installing some of the following packages if some characters
-are not displayed properly:
-- media-fonts/arphicfonts
-- media-fonts/droid
-- media-fonts/ipamonafont
-- media-fonts/noto
-- media-fonts/ja-ipafonts
-- media-fonts/takao-fonts
-- media-fonts/wqy-microhei
-- media-fonts/wqy-zenhei
-
-To fix broken icons on the Downloads page, you should install an icon
-theme that covers the appropriate MIME types, and configure this as your
-GTK+ icon theme.
-
-For native file dialogs in KDE, install kde-apps/kdialog.
-
-To make password storage work with your desktop environment you may
-have install one of the supported credentials management applications:
-- app-crypt/libsecret (GNOME)
-- kde-frameworks/kwallet (KDE)
-If you have one of above packages installed, but don't want to use
-them in Chromium, then add --password-store=basic to CHROMIUM_FLAGS
-in /etc/chromium/default.
-"
-
-S="${WORKDIR}/chromium-${PV/_*}"
-
-python_check_deps() {
- python_has_version "dev-python/setuptools[${PYTHON_USEDEP}]"
-}
-
-pre_build_checks() {
- # Check build requirements: bugs #471810, #541816, #914220
- # We're going to start doing maths here on the size of an unpacked source tarball,
- # this should make updates easier as chromium continues to balloon in size.
- # xz -l /var/cache/distfiles/chromium-${PV}*.tar.xz
- local base_disk=9 # Round up
- use test && base_disk=$((base_disk + 5))
- local extra_disk=1 # Always include a little extra space
- local memory=4
- tc-is-cross-compiler && extra_disk=$((extra_disk * 2))
- if tc-is-lto || use pgo; then
- memory=$((memory * 2 + 1))
- tc-is-cross-compiler && extra_disk=$((extra_disk * 2)) # Double the requirements
- use pgo && extra_disk=$((extra_disk + 4))
- fi
- if is-flagq '-g?(gdb)?([1-9])'; then
- if use custom-cflags; then
- extra_disk=$((extra_disk + 5))
- fi
- memory=$((memory * 2))
- fi
- local CHECKREQS_MEMORY="${memory}G"
- local CHECKREQS_DISK_BUILD="$((base_disk + extra_disk))G"
- check-reqs_${EBUILD_PHASE_FUNC}
-}
-
-pkg_pretend() {
- if [[ ${MERGE_TYPE} != binary ]]; then
- # The pre_build_checks are all about compilation resources, no need to run it for a binpkg
- pre_build_checks
- fi
-
- if use headless; then
- local headless_unused_flags=("cups" "kerberos" "pulseaudio" "qt6" "vaapi" "wayland")
- for myiuse in ${headless_unused_flags[@]}; do
- use ${myiuse} && ewarn "Ignoring USE=${myiuse}, USE=headless is set."
- done
- fi
-
- if ! use bindist && use ffmpeg-chromium; then
- ewarn "Ignoring USE=ffmpeg-chromium, USE=bindist is not set."
- fi
- if use libcxx; then
- ewarn
- ewarn "Building with libcxx, please be aware that system-*"
- ewarn "and some other c++ dependencies need to be compiled"
- ewarn "with the same c++ library as ungoogled-chromium itself"
- ewarn "dev-libs/jsoncpp is most problematic, see #58 #49 #119 for details"
- ewarn "Simplest solution would be to disable corresponding system-* flags"
- ewarn
- fi
- if use cfi; then
- ewarn
- ewarn "Building with cfi is only possible if building with -stdlib=libc++"
- ewarn "Make sure all dependencies are also built this way, see #40"
- ewarn
- fi
- if use cromite; then
- ewarn
- ewarn "Cromite patches are very experimental and unstable"
- ewarn "Please consider testing them and giving feedback upstream:"
- ewarn "https://github.com/uazo/cromite/issues"
- ewarn "Not all patches are applied, let me know if others should be considered too"
- ewarn
- fi
-}
-
-pkg_setup() {
- if [[ ${MERGE_TYPE} != binary ]]; then
- # The pre_build_checks are all about compilation resources, no need to run it for a binpkg
- pre_build_checks
-
- # We haven't massaged any CFLAGS yet, so we want to do this before we force CC/CXX to prevent warnings.
- local want_lto="false"
- tc-is-lto && want_lto="true"
-
- # The linux:unbundle toolchain in GN grabs CC, CXX, CPP (etc) from the environment
- # We'll set these to clang here then use llvm-utils functions to very explicitly set these
- # to a sane value.
- # This is effectively the 'force-clang' path if GCC support is re-added.
- if use !bundled-toolchain; then
- llvm-r1_pkg_setup
- rust_pkg_setup
-
- # Forcing clang; respect llvm_slot_x to enable selection of impl via LLVM_COMPAT
- AR=llvm-ar
- CPP="${CHOST}-clang++-${LLVM_SLOT} -E"
- NM=llvm-nm
- CC="${CHOST}-clang-${LLVM_SLOT}"
- CXX="${CHOST}-clang++-${LLVM_SLOT}"
- fi
-
- # LTO in Chromium means LLVM ThinLTO, if GCC support is re-added
- # We'll need to handle that here too.
- use_lto="false"
- local lto_usable="true"
- if [[ "$want_lto" == "true" ]]; then
- if use arm64 && [[ "${LLVM_SLOT}" -lt 22 ]]; then
- einfo "LTO is broken with LLVM 21 on arm64, ignoring CFLAGS."
- lto_usable="false"
- else
- use_lto="true"
- fi
- # We can rely on GN to do this for us; without this builds
- # take significantly longer with LTO enabled.
- filter-lto
- fi
-
- if [[ "$use_lto" == "false" ]] && use official && [[ "$lto_usable" == "true" ]]; then
- einfo "USE=official selected and LTO not detected."
- einfo "It is _highly_ recommended that LTO be enabled for performance reasons"
- einfo "and to be consistent with the upstream \"official\" build optimisations."
- fi
-
- if [[ "$use_lto" == "false" ]] && use test; then
- die "Tests require CFI which requires LTO"
- fi
-
- export use_lto
-
- if tc-is-cross-compiler; then
- use pgo && die "The pgo USE flag cannot be used when cross-compiling"
- CPP="${CBUILD}-clang++-${LLVM_SLOT} -E"
- fi
-
- # Sanity checks for development convenience
- if ver_test $(gn --version || die) -lt ${GN_MIN_VER}; then
- die "dev-build/gn >= ${GN_MIN_VER} is required to build this Chromium"
- fi
-
- # Sometimes, when adding a new LLVM slot, devs (me) forget to install an appropriate lld.
- if tc-ld-is-lld; then
- local lld_ver=$(ld.lld --version | awk '{split($2,a,"."); print a[1]}' || die "Failed to check lld version")
- if [[ ${lld_ver} -lt ${LLVM_SLOT} ]]; then
- die "Your lld version (${lld_ver}) is too old for the selected LLVM slot (${LLVM_SLOT}). Please install a newer lld or select an older LLVM slot."
- fi
- fi
- fi
-
- chromium_suid_sandbox_check_kernel_config
-}
-
-src_unpack() {
- # # Here be dragons!
- # local XCLD="--exclude=chromium-${PV/_*}/third_party/instrumented_libs \
- # --exclude=chromium-${PV/_*}/third_party/llvm \
- # --exclude=chromium-${PV/_*}/third_party/llvm-build \
- # --exclude=chromium-${PV/_*}/third_party/node/linux \
- # --exclude=chromium-${PV/_*}/third_party/rust-src \
- # --exclude=chromium-${PV/_*}/third_party/rust-toolchain \
- # --exclude=chromium-${PV/_*}/build/linux/debian_bullseye_i386-sysroot \
- # --exclude=chromium-${PV/_*}/build/linux/debian_bullseye_amd64-sysroot \
- # --exclude=chromium-${PV/_*}/third_party/angle/third_party/VK-GL-CTS \
- # "
-
- # if ! use libcxx ; then
- # XCLD+=" --exclude=chromium-${PV/_*}/third_party/libc++"
- # fi
-
- # if ! use pgo ; then
- # XCLD+=" --exclude=chromium-${PV/_*}/chrome/build/pgo_profiles"
- # fi
-
- # einfo "Unpacking chromium-${PV/_*}.tar.xz to ${WORKDIR}"
- # # Gentoo tarball:
- # # tar ${XCLD} -xf "${DISTDIR}/chromium-${PV/_*}-gentoo.tar.xz" -C "${WORKDIR}" || die
- # tar ${XCLD} -xf "${DISTDIR}/chromium-${PV/_*}${LITE_TARBALL:+-lite}.tar.xz" -C "${WORKDIR}" || die
-
- # unpack ${UGC_URL#*->}
- # # unpack chromium-patches-${PATCH_V}.tar.bz2
- # # Warned you!
-
- unpack chromium-${PV/_*}-linux.tar.xz
- unpack chromium-patches-${PATCH_V}.tar.bz2
- # These should only be required when we're not using the official toolchain
- if use !bundled-toolchain; then
- unpack chromium-patches-copium-${COPIUM_COMMIT:0:10}.tar.gz
- fi
-
- if use test; then
- # This just contains a bunch of font files that need to be unpacked (or moved) to the correct location.
- local testfonts_dir="${WORKDIR}/chromium-${PV/_*}/third_party/test_fonts/test_fonts"
- local testfonts_tar="${DISTDIR}/chromium-testfonts-${TEST_FONT:0:10}.tar.gz"
- einfo "Unpacking test fonts ..."
- tar xf "${testfonts_tar}" -C "${testfonts_dir}" || die "Failed to unpack testfonts"
- fi
-
- # We need to manually unpack this since M126 else we'd unpack one toolchain over the other.
- # Since we're doing that anyway let's unpack to sensible locations to make symlink creation easier.
- if use bundled-toolchain; then
- einfo "Unpacking bundled Clang ..."
- mkdir -p "${WORKDIR}"/clang || die "Failed to create clang directory"
- tar xf "${DISTDIR}/chromium-clang-${BUNDLED_CLANG_VER}.tar.xz" -C "${WORKDIR}/clang" || die "Failed to unpack Clang"
- einfo "Unpacking bundled Rust ..."
- local rust_dir="${WORKDIR}/rust-toolchain"
- mkdir -p "${rust_dir}" || die "Failed to create rust toolchain directory"
- tar xf "${DISTDIR}/chromium-rust-toolchain-${RUST_SHORT_HASH}-${BUNDLED_CLANG_VER%-*}.tar.xz" -C "${rust_dir}" ||
- die "Failed to unpack Rust"
- fi
-
- if use ppc64; then
- unpack chromium-openpower-${PPC64_HASH:0:10}.tar.bz2
- fi
-
- # This is a dirty hack, but we need rollup to build successfully and it's proving to be challenging
- # to build locally due to deps
- unpack rollup-wasm-node-${ROLLUP_VER}.tgz
-
- if use cromite; then
- unpack cromite-${CROMITE_COMMIT_ID}.tar.gz
- fi
-
- unpack ${UGC_URL#*->}
-}
-
-remove_compiler_builtins() {
- # We can't use the bundled compiler builtins with the system toolchain
- # We used to `grep` then `sed`, but it was indirect. Combining the two into a single
- # `awk` command is more efficient and lets us document the logic more clearly.
-
- local pattern=' configs += [ "//build/config/clang:compiler_builtins" ]'
- local target='build/config/compiler/BUILD.gn'
-
- local tmpfile
- tmpfile=$(mktemp) || die "Failed to create temporary file."
-
- if awk -v pat="${pattern}" '
- BEGIN {
- match_found = 0
- }
-
- # If the delete countdown is active, decrement it and skip to the next line.
- d > 0 { d--; next }
-
- # If the current line matches the pattern...
- $0 == pat {
- match_found = 1 # ...set our flag to true.
- d = 2 # Set delete counter for this line and the next two.
- prev = "" # Clear the buffered previous line so it is not printed.
- next
- }
-
- # For any other line, print the buffered previous line.
- NR > 1 { print prev }
-
- # Buffer the current line to be printed on the next cycle.
- { prev = $0 }
-
- END {
- # Print the last line if it was not part of a deleted block.
- if (d == 0) { print prev }
-
- # If the pattern was never found, exit with a failure code.
- if (match_found == 0) {
- exit 1
- }
- }
- ' "${target}" > "${tmpfile}"; then
- # AWK SUCCEEDED (exit code 0): The pattern was found and edited.
- # This is to avoid gawk's `-i inplace` option which users complain about.
- mv "${tmpfile}" "${target}"
- else
- # AWK FAILED (exit code 1): The pattern was not found.
- rm -f "${tmpfile}"
- die "Awk patch failed: Pattern not found in ${target}."
- fi
-}
-
-src_prepare() {
- # Calling this here supports resumption via FEATURES=keepwork
- python_setup
-
- # We'll fill this in as we go. Patches go in chromium-patches.
- local PATCHES=()
-
- rm "${WORKDIR}/chromium-patches-${PATCH_V}/common/cr131-unbundle-icu-target.patch"
- if ver_test "${RUST_SLOT}" -ge "1.95.0"; then
- rm "${WORKDIR}/chromium-patches-${PATCH_V}/rust/cr146-fix-botched-bytemuck-roll.patch"
- sed -i '/SupportedLaneCount/d' third_party/rust/chromium_crates_io/vendor/bytemuck-v1/src/zeroable.rs || die
- sed -i '/SupportedLaneCount/d' third_party/rust/chromium_crates_io/vendor/bytemuck-v1/src/pod.rs || die
- fi
-
- #cp -f ${WORKDIR}/chromium-patches-${PATCH_V}/*-compiler.patch "${T}/compiler.patch"
- ##cp -f ${FILESDIR}/chromium-147-compiler.patch "${T}/compiler.patch"
- #if ! use custom-cflags; then #See #25 #92
- # sed -i '/default_stack_frames/Q' "${T}/compiler.patch" || die
- #fi
-
- PATCHES+=( "${WORKDIR}/chromium-patches-${PATCH_V}/common/" )
- PATCHES+=( "${FILESDIR}/restore-x86-r4.patch" )
-
- # https://issues.chromium.org/issues/442698344
- # Unreleased fontconfig changed magic numbers and google have rolled to this version
- if has_version "<=media-libs/fontconfig-2.17.1"; then
- PATCHES+=( "${FILESDIR}/chromium-142-work-with-old-fontconfig.patch" )
- fi
-
- if use bundled-toolchain; then
- # We need to symlink the toolchain into the expected location
- einfo "Symlinking Clang toolchain to expected location ..."
- mkdir -p third_party/llvm-build/ || die "Failed to create llvm-build directory"
- # the 'Chromium Linux Tarballs' seem to already have 'Release+Asserts/{lib,bin}'; not sure if this is an
- # upstream change - we're using the same scripts to build, theoretically. We'll still attempt to create
- # llvm-build, but we'll rm Release+Asserts and symlink directly.
- if [[ -d third_party/llvm-build/Release+Asserts ]]; then
- rm -r third_party/llvm-build/Release+Asserts || die "Failed to remove third_party/llvm-build/Release+Asserts"
- fi
- ln -s "${WORKDIR}"/clang third_party/llvm-build/Release+Asserts || die "Failed to bundle Clang"
- einfo "Symlinking Rust toolchain to expected location ..."
- # As above, so below
- if [[ -d third_party/rust-toolchain ]]; then
- rm -r third_party/rust-toolchain || die "Failed to remove third_party/rust-toolchain"
- fi
- ln -s "${WORKDIR}"/rust-toolchain third_party/rust-toolchain || die "Failed to bundle rust"
- cp "${WORKDIR}"/rust-toolchain/VERSION \
- "${WORKDIR}"/rust-toolchain/INSTALLED_VERSION || die "Failed to set rust version"
- else
- # We don't need our toolchain patches if we're using the official toolchain
-
- # Copium patches go here.
- PATCHES+=(
- "${WORKDIR}/copium/cr143-libsync-__BEGIN_DECLS.patch"
- "${WORKDIR}/copium/cr149-unbundle-minizip-undo-unicode.patch"
- )
-
- # Automate conditional application of chromium-patches
- # The directory structure is expected to be something like:
- # chromium-patches-145/
- # ├── toolchain/
- # │ ├── cr123-foo.patch
- # │ └── cr135-bar.patch
- # ├── llvm/
- # │ ├── cr144-baz.patch
- # │ └── lt-23/
- # │ └── cr145-bleeding-edge-llvm-feature.patch
- # Where `lt-23` means "apply this patch if the LLVM version is less than 23".
- # Only categories in `slot_map` will be checked for version constraints.
- shopt -s nullglob
- local -A slot_map=( [llvm]="${LLVM_SLOT}" [rust]="${RUST_SLOT}" )
-
- for category in "${WORKDIR}/chromium-patches-${PATCH_V}"/*/; do
- local category_name="${category%/}"
- category_name="${category_name##*/}"
-
- # Skip arch-specific categories
- if [[ "${category_name}" == "ppc64le" ]]; then
- use ppc64 || continue
- fi
-
- # We applied common patches above, no need to apply them again here
- [[ "${category_name}" == "common" ]] && continue
-
- # Unconditional patches for this category
- local category_patches=( "${category}"*.patch )
- [[ ${#category_patches[@]} -gt 0 ]] && PATCHES+=( "${category}" )
-
- # Version-constrained subdirectories (e.g., llvm/lt-23/)
- for constraint_dir in "${category}"*/; do
- local dir_name="${constraint_dir%/}"
- dir_name="${dir_name##*/}"
- if [[ "${dir_name}" =~ ^lt-(.*)$ && -v slot_map[${category_name}] ]]; then
- ver_test "${slot_map[${category_name}]}" -lt "${BASH_REMATCH[1]}" &&
- PATCHES+=( "${constraint_dir}" )
- fi
- done
- done
-
- shopt -u nullglob
-
- # Strictly speaking this doesn't need to be gated (no bundled toolchain for ppc64); it keeps the logic together
- if use ppc64; then
- local patchset_dir="${WORKDIR}/openpower-patches-${PPC64_HASH}/patches"
- # patch causes build errors on 4K page systems (https://bugs.gentoo.org/show_bug.cgi?id=940304)
- local page_size_patch="ppc64le/third_party/use-sysconf-page-size-on-ppc64.patch"
- local isa_3_patch="ppc64le/core/baseline-isa-3-0.patch"
- # Apply the OpenPOWER patches (check for page size and isa 3.0)
- openpower_patches=( $(grep -E "^ppc64le|^upstream" "${patchset_dir}/series" | grep -v "${page_size_patch}" |
- grep -v "${isa_3_patch}" || die) )
- for patch in "${openpower_patches[@]}"; do
- PATCHES+=( "${patchset_dir}/${patch}" )
- done
- if [[ $(getconf PAGESIZE) == 65536 ]]; then
- PATCHES+=( "${patchset_dir}/${page_size_patch}" )
- fi
- # We use vsx3 as a proxy for 'want isa3.0' (POWER9)
- if use cpu_flags_ppc_vsx3 ; then
- PATCHES+=( "${patchset_dir}/${isa_3_patch}" )
- fi
- fi
-
- remove_compiler_builtins
-
- # We can't rely on the eselect'd Rust to actually include rustfmt, so we'll point to the selected slot specifically.
- local suffix=""
- if [[ "${RUST_TYPE}" == "binary" ]]; then
- suffix="-bin-${RUST_SLOT}"
- else
- suffix="-${RUST_SLOT}"
- fi
- sed -i "s|/bin/rustfmt|/bin/rustfmt${suffix}|g" build/rust/rust_bindgen_generator.gni ||
- die "Failed to update rustfmt path"
-
- fi
-
- # Do this before we apply patches since (e.g.) ppc64 needs to patch rollup and it's easier in ${S}
- einfo "Moving rollup wasm-node package into place ..."
- mkdir -p third_party/devtools-frontend/src/node_modules/@rollup/wasm-node ||
- die "Failed to create node_modules/@rollup/wasm-node"
- mv "${WORKDIR}"/package/* third_party/devtools-frontend/src/node_modules/@rollup/wasm-node ||
- die "Failed to move rollup package"
-
- if [ ! -z "${CHROMIUM_COMMITS[*]}" ]; then
- # for i in "${CHROMIUM_COMMITS[@]}"; do
- for i in "${!CHROMIUM_COMMITS[@]}"; do
- if [[ ${CHROMIUM_COMMITS[$i]} =~ webrtc ]]; then
- patch_prefix="webrtc"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ angle ]]; then
- patch_prefix="angle"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ quiche ]]; then
- patch_prefix="quiche"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ dawn ]]; then
- patch_prefix="dawn"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ perfetto ]]; then
- patch_prefix="perfetto"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ink ]]; then
- patch_prefix="ink"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ vulkan-utility-libraries ]]; then
- patch_prefix="vulkan-utility-libraries"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ruy ]]; then
- patch_prefix="ruy"
- else
- patch_prefix="chromium"
- fi
- pushd "${CHROMIUM_COMMITS[$i]}" > /dev/null || die
- if [[ $i = -* ]]; then
- einfo "Reverting ${patch_prefix}-${i/-}.patch"
- git_wrapper apply -R --exclude="*unittest.cc" --exclude="DEPS" \
- -p1 < "${DISTDIR}/${patch_prefix}-${i/-}.patch"
- else
- einfo "Applying ${patch_prefix}-${i/-}.patch"
- git_wrapper apply --exclude="*unittest.cc" --exclude="DEPS" \
- -p1 < "${DISTDIR}/${patch_prefix}-${i/-}.patch"
- fi
- popd > /dev/null || die
- done
- fi
-
- if ! use bluetooth ; then
- PATCHES+=(
- "${FILESDIR}/disable-bluez-r7.patch"
- )
- fi
-
- if use convert-dict ; then
- PATCHES+=(
- "${FILESDIR}/chromium-ucf-dict-utility-r3.patch"
- )
- fi
-
- if ! use libcxx ; then
- PATCHES+=(
- "${FILESDIR}/fix-wayland-oncecallback-copy.patch"
- )
- fi
-
- if use system-ffmpeg; then
- PATCHES+=(
- "${FILESDIR}/chromium-141-opus-mp3.patch"
- "${FILESDIR}/chromium-135-hevc.patch"
- )
- sed -i "\!AVFMT_FLAG_NOH264PARSE!d" media/filters/ffmpeg_glue.cc || die
- ewarn "You need to expose \"av_stream_get_first_dts\" in ffmpeg via user patch"
- fi
-
- if use system-av1; then
- PATCHES+=(
- "${FILESDIR}/chromium-system-av1.patch"
- )
- fi
-
- if use system-libvpx; then
- PATCHES+=(
- "${FILESDIR}/chromium-system-libvpx.patch"
- )
- fi
-
- if use system-openjpeg ; then
- PATCHES+=(
- "${FILESDIR}/chromium-system-openjpeg-r4.patch"
- )
- fi
-
- # if use x86 ; then
- # #* Fixes a segfault in transport_security_state_generator
- # PATCHES+=(
- # "${FILESDIR}/fix-segfault-x86.patch"
- # )
- # fi
-
- # Testing all patches when NODIE is defined
- if [ ! -z "${NODIE}" ]; then
- for i in "${PATCHES[@]}"; do
- eapply_wrapper "$i"
- done
- nonfatal eapply_user
- else
- default
- fi
-
- if use cromite ; then
- BR_PA_PATH="${WORKDIR}/cromite-${CROMITE_COMMIT_ID}/build/patches"
-
- sed -i '/b\/components\/components_strings\.grd/,+10d' "${BR_PA_PATH}/Add-cromite-flags-support.patch" || die
- sed -i '/b\/chrome\/android\/java\/res\/xml\/privacy_preferences\.xml/,+13d' "${BR_PA_PATH}/Add-cromite-flags-support.patch" || die
- sed -i '/b\/android_webview\/support_library\/java\/src\/org\/chromium\/support_lib_glue/,+11d' "${BR_PA_PATH}/Client-hints-overrides.patch" || die
- sed -i '/webapps_strings.grdp" \/>/{s++webapps_strings.grdp" /><part file="cromite_components_strings_grd/placeholder.txt"/>+;h};${x;/./{x;q0};x;q1}' \
- components/components_strings.grd || die
-
- sed -i 's/absl::/std::/' "${BR_PA_PATH}/Add-a-proxy-configuration-page.patch" || die
-
- filterdiff -p1 "${BR_PA_PATH}/JIT-site-settings.patch" --exclude="content/browser/renderer_host/render_process_host_impl.cc" \
- > "${BR_PA_PATH}/JIT-site-settings.patch1"
- mv -f "${BR_PA_PATH}/JIT-site-settings.patch1" "${BR_PA_PATH}/JIT-site-settings.patch"
-
- BROMITE_PATCHES=(
- "${BR_PA_PATH}/bromite-build-utils.patch"
- "${BR_PA_PATH}/Battery-API-return-nothing.patch"
- "${BR_PA_PATH}/Multiple-fingerprinting-mitigations.patch"
- "${BR_PA_PATH}/Add-flag-to-configure-maximum-connections-per-host.patch"
- "${BR_PA_PATH}/Add-a-proxy-configuration-page.patch"
- "${BR_PA_PATH}/Enable-StrictOriginIsolation-and-SitePerProcess.patch"
- "${BR_PA_PATH}/Disable-requests-for-single-word-Omnibar-searches.patch"
- "${BR_PA_PATH}/Reduce-HTTP-headers-in-DoH-requests-to-bare-minimum.patch"
- "${BR_PA_PATH}/Client-hints-overrides.patch"
- "${BR_PA_PATH}/Disable-idle-detection.patch"
- "${BR_PA_PATH}/Disable-TLS-resumption.patch"
- "${BR_PA_PATH}/Remove-navigator.connection-info.patch"
-
- "${BR_PA_PATH}/AudioBuffer-AnalyserNode-fp-mitigations.patch"
- "${BR_PA_PATH}/Fonts-fingerprinting-mitigation.patch"
- "${BR_PA_PATH}/Content-settings-infrastructure.patch"
- "${BR_PA_PATH}/Add-autoplay-site-setting.patch"
- "${BR_PA_PATH}/Site-setting-for-images.patch"
- "${BR_PA_PATH}/JIT-site-settings.patch"
- "${BR_PA_PATH}/Add-webGL-site-setting.patch"
- "${BR_PA_PATH}/Add-webRTC-site-settings.patch"
- "${BR_PA_PATH}/Show-site-settings-for-cookies-javascript-and-ads.patch"
- "${BR_PA_PATH}/Viewport-Protection-flag.patch"
- "${BR_PA_PATH}/Revert-remove-allowscript-content-setting-secondary-url.patch"
- "${BR_PA_PATH}/Timezone-customization.patch"
- "${BR_PA_PATH}/Disable-speechSynthesis-getVoices-API.patch"
- "${BR_PA_PATH}/Remove-support-for-device-memory-and-cpu-recovery.patch"
- "${BR_PA_PATH}/Disable-Feeback-Collector.patch"
- "${BR_PA_PATH}/Disable-remote-altsvc-for-h3-connections.patch"
- "${BR_PA_PATH}/Add-cromite-flags-support.patch"
- "${BR_PA_PATH}/Enables-deactivation-of-the-js-debugger-statement.patch"
- )
- for i in "${BROMITE_PATCHES[@]}"; do
- if [[ "$i" =~ "Add-autoplay-site-setting.patch" ]] ||
- [[ "$i" =~ "JIT-site-settings.patch" ]] ||
- [[ "$i" =~ "Site-setting-for-images.patch" ]]; then
- einfo "Git binary patch: ${i##*/}"
- git_wrapper apply -p1 < "$i"
- else
- filter_wrapper "$i" --exclude="chrome/android/*"
- fi
- done
-
- #! conflicting patches
- sed -i '/browser_features.cc/,+17d' \
- "${UGC_WD}/patches/extra/ungoogled-chromium/add-flag-to-clear-data-on-exit.patch" || die
- sed -i 's$} // namespace features$BASE_FEATURE(kClearDataOnExit, "ClearDataOnExit", base::FEATURE_DISABLED_BY_DEFAULT);}$' \
- chrome/browser/browser_features.cc || die
- sed -i 's$} // namespace features$BASE_DECLARE_FEATURE(kClearDataOnExit);}$' \
- chrome/browser/browser_features.h || die
- sed -i 's$kChromeUIAboutHost,$kChromeUIAboutHost,"ungoogled-first-run",$' \
- chrome/common/webui_url_constants.cc || die
- sed -i '/chrome\/common\/webui_url_constants.cc/Q' \
- "${UGC_WD}/patches/extra/ungoogled-chromium/first-run-page.patch" || die
-
- #! normalise paths in py
- sed -i 's$os.path.dirname(include_file)$os.path.abspath(os.path.dirname(include_file))$' \
- build/bromite/gyp/cpp_bromite_include.py || die
- fi
-
- # if [[ ${LLVM_SLOT} == "19" ]]; then
- # # Upstream now hard depend on a feature that was added in LLVM 20.1, but we don't want to stabilise that yet.
- # # Do the temp file shuffle in case someone is using something other than `gawk`
- # {
- # awk '/config\("clang_warning_suppression"\) \{/ { print $0 " }"; sub(/clang/, "xclang"); print; next }
- # { print }' build/config/compiler/BUILD.gn > "${T}/build.gn" && \
- # mv "${T}/build.gn" build/config/compiler/BUILD.gn
- # } || die "Unable to disable warning suppression"
- # fi
-
- ## Not included in -lite tarballs, but we should check for it anyway.
- #if [[ -f third_party/node/linux/node-linux-x64/bin/node ]]; then
- # rm third_party/node/linux/node-linux-x64/bin/node || die
- #else
- # mkdir -p third_party/node/linux/node-linux-x64/bin || die
- #fi
- #ln -s "${EPREFIX}"/usr/bin/node third_party/node/linux/node-linux-x64/bin/node || die
-
- cp "${FILESDIR}/libusb.gn" build/linux/unbundle || die
- sed -i '/^REPLACEMENTS.*$/{s++REPLACEMENTS = {"libusb":"third_party/libusb/BUILD.gn",+;h};${x;/./{x;q0};x;q1}' \
- build/linux/unbundle/replace_gn_files.py || die
- sed -i '/^.*deps.*third_party\/jsoncpp.*$/{s++public_deps \+= [ "//third_party/jsoncpp" ]+;h};${x;/./{x;q0};x;q1}' \
- third_party/webrtc/rtc_base/BUILD.gn || die
-
- if use override-data-dir; then
- sed -i '/"chromium";/{s++"ungoogled-chromium";+;h};${x;/./{x;q0};x;q1}' \
- chrome/common/chrome_paths_linux.cc || die
- fi
-
- if use system-abseil-cpp; then
- eapply_wrapper "${FILESDIR}/chromium-147-system-abseil.patch"
-
- #! SFINAE mangling incompatibility between clang and gcc:
- #! https://github.com/llvm/llvm-project/issues/85656
- #! gcc: _ZN4absl12lts_202601074CordC1INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELi0EEEOT_
- #! clang: _ZN4absl12lts_202601074CordC1INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEETnNSt9enable_ifIXsr3std7is_sameIT_S8_EE5valueEiE4typeELi0EEEOSA_
- #! So, either this:
- eapply_wrapper "${FILESDIR}/chromium-141-system-abseil-cord.patch"
- #! or build with -fclang-abi-compat=17
-
- # cp -f /usr/include/absl/base/options.h third_party/abseil-cpp/absl/base/options.h
- # sed -i '/^#define ABSL_OPTION_USE_STD_ORDERING.*$/{s++#define ABSL_OPTION_USE_STD_ORDERING 1+;h};${x;/./{x;q0};x;q1}' \
- # third_party/abseil-cpp/absl/base/options.h || die
- fi
-
- #* Applying UGC PRs here
- if [ ! -z "${UGC_PR_COMMITS[*]}" ]; then
- pushd "${UGC_WD}" >/dev/null
- for i in "${UGC_PR_COMMITS[@]}"; do
- eapply_wrapper "${DISTDIR}/${PN}-$i.patch"
- done
- popd >/dev/null
- fi
-
- # From here we adapt ungoogled-chromium's patches to our needs
- local ugc_pruning_list="${UGC_WD}/pruning.list"
- local ugc_patch_series="${UGC_WD}/patches/series"
- local ugc_substitution_list="${UGC_WD}/domain_substitution.list"
-
- local ugc_unneeded=(
- # GN bootstrap
- extra/debian/gn/parallel
- # following Gentoo's Chromium
- core/ungoogled-chromium/build-with-wasm-rollup
- )
-
- if use cromite ; then
- einfo "Using fingerprinting patches from Cromite instead"
- ugc_unneeded+=(
- extra/bromite/fingerprinting-flags-client-rects-and-measuretext
- extra/bromite/flag-max-connections-per-host
- extra/bromite/flag-fingerprinting-canvas-image-data-noise
- extra/ungoogled-chromium/add-components-ungoogled
- extra/ungoogled-chromium/remove-pac-size-limit
- )
- fi
-
- # #* Temporary fix
- # sed -i "\!ios/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/icu/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/libjpeg_turbo/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/snappy/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/closure_compiler/!d" "${ugc_pruning_list}" || die
-
- # #* Didn't unpack them at the first place
- # sed -i "\!build/linux/debian_bullseye_i386-sysroot!d" "${ugc_pruning_list}" || die
- # sed -i "\!build/linux/debian_bullseye_amd64-sysroot!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/llvm-build!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/node/linux!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/rust-src!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/rust-toolchain!d" "${ugc_pruning_list}" || die
- # if ! use libcxx ; then
- # sed -i "\!third_party/libc!d" "${ugc_pruning_list}" || die
- # fi
- sed -i "s|debug('files|error('files|" \
- "${UGC_WD}/utils/prune_binaries.py" || die
- sed -i "\!third_party/node/linux!d" \
- "${UGC_WD}/utils/prune_binaries.py" || die
-
- local ugc_p ugc_dir
- for p in "${ugc_unneeded[@]}"; do
- einfo "Removing ${p}.patch"
- sed -i "\!${p}.patch!d" "${ugc_patch_series}" || die
- done
-
- if [ ! -z "${UGC_SKIP_PATCHES}" ]; then
- for p in ${UGC_SKIP_PATCHES}; do
- ewarn "Removing ${p}"
- sed -i "\!${p}!d" "${ugc_patch_series}" || die
- done
- fi
-
- if [ ! -z "${UGC_KEEP_BINARIES}" ]; then
- for p in ${UGC_KEEP_BINARIES}; do
- ewarn "Keeping binary ${p}"
- sed -i "\!${p}!d" "${ugc_pruning_list}" || die
- done
- fi
-
- if [ ! -z "${UGC_SKIP_SUBSTITUTION}" ]; then
- for p in ${UGC_SKIP_SUBSTITUTION}; do
- ewarn "No substitutions in ${p}"
- sed -i "\!${p}!d" "${ugc_substitution_list}" || die
- done
- fi
-
- ebegin "Pruning binaries"
- "${UGC_WD}/utils/prune_binaries.py" -q . "${UGC_WD}/pruning.list"
- eend $? || die
-
- ebegin "Applying ungoogled-chromium patches"
- "${UGC_WD}/utils/patches.py" -q apply . "${UGC_WD}/patches"
- eend $? || die
-
- ebegin "Applying domain substitution"
- "${UGC_WD}/utils/domain_substitution.py" -q apply -r "${UGC_WD}/domain_regex.list" -f "${UGC_WD}/domain_substitution.list" .
- eend $? || die
-
- # Sanity check esbuild version before we start removing files.
- # We _could_ patch the version check out - in theory esbuild upstream are being super conservative after
- # arch(AUR) packaged an `esbuild` binary and set ESBUILD_BINARY_PATH=/usr/bin/esbuild, causing much breakage,
- # but this is fine too and exactly matches what upstream are expecting.
- # https://github.com/evanw/esbuild/issues/2894
- local esbuild_js="${S}/third_party/devtools-frontend/src/node_modules/esbuild/lib/main.js"
- local found
- found=$(awk -F'"' '/if \(binaryVersion !==/ {print $2}' "${esbuild_js}")
- if [[ "${found}" != "${ESBUILD_VER}" ]]; then
- die "esbuild version mismatch: expected ${ESBUILD_VER}, found ${found}"
- fi
-
- elog "Removing bundled binaries from source tree ..."
- # Purge bundled ELF files: These are non-portable and will cause issues if used instead of system versions.
- # Use `--wasm` to also remove WebAssembly binaries, if desired - they're portable so shouldn't break builds.
- ${EPYTHON} "${FILESDIR}/bin-finder.py" --elf "${S}" | awk '{print $1}' | xargs rm -f ||
- die "Failed to remove bundled binaries"
-
- # And now we restore any that we actually need, from the host system
- local esbuild_path="${S}/third_party/devtools-frontend/src/third_party/esbuild"
- local -A restore_list=(
- ["/usr/bin/esbuild-${ESBUILD_VER}"]="${esbuild_path}/esbuild"
- ["/usr/bin/gperf"]="${S}/third_party/gperf/cipd/bin/gperf"
- ["/usr/bin/node"]="${S}/third_party/node/linux/node-linux-x64/bin/node"
- )
-
- for src in "${!restore_list[@]}"; do
- dst="${restore_list[${src}]}"
- if [[ -f "${src}" ]]; then
- einfo "Symlinking ${src} ..."
- # Make sure the parent dir exists; some tarballs don't include (e.g.) node's bindir
- mkdir -p "$(dirname "${dst}")" || die "Failed to create directory for ${dst}"
- ln -s "${src}" "${dst}" || die "Failed to symlink ${dst} from ${src}"
- if [[ ! -L "${dst}" || "$(readlink -f "${dst}")" != "${src}" ]]; then
- die "Symlink verification failed for ${dst} -> ${src}"
- fi
- else
- die "Expected to find ${src} to restore ${dst}, but it does not exist."
- fi
- done
-
- # adjust python interpreter version
- sed -i -e "s|\(^script_executable = \).*|\1\"${EPYTHON}\"|g" .gn || die
-
- # Use the system copy of hwdata's usb.ids; upstream is woefully out of date (2015!)
- sed 's|//third_party/usb_ids/usb.ids|/usr/share/hwdata/usb.ids|g' \
- -i services/device/public/cpp/usb/BUILD.gn || die "Failed to set system usb.ids path"
-
- # remove_bundled_libraries.py walks the source tree and looks for paths containing the substring 'third_party'
- # whitelist matches use the right-most matching path component, so we need to whitelist from that point down.
- local keeplibs=(
- base/third_party/cityhash
- )
- use system-double-conversion || keeplibs+=(
- base/third_party/double_conversion
- )
- keeplibs+=(
- base/third_party/icu
- base/third_party/nspr
- base/third_party/superfasthash
- base/third_party/symbolize
- base/third_party/xdg_user_dirs
- buildtools/third_party/libc++
- buildtools/third_party/libc++abi
- )
- use cromite && keeplibs+=(
- cromite_flags/third_party
- )
- keeplibs+=(
- net/third_party/mozilla_security_manager
- net/third_party/quic
- net/third_party/uri_template
- )
- use system-abseil-cpp || keeplibs+=(
- third_party/abseil-cpp
- )
- keeplibs+=(
- third_party/angle
- third_party/angle/src/common/third_party/xxhash
- third_party/angle/src/third_party/ceval
- )
- use nvidia || keeplibs+=(
- third_party/angle/src/third_party/libXNVCtrl
- )
- keeplibs+=(
- third_party/angle/src/third_party/volk
- third_party/anonymous_tokens
- third_party/apple_apsl
- third_party/axe-core
- third_party/bidimapper
- third_party/blink
- third_party/boringssl
- third_party/boringssl/src/third_party/fiat
- third_party/breakpad
- third_party/breakpad/breakpad/src/third_party/curl
- )
- use system-brotli || keeplibs+=(
- third_party/brotli
- )
- keeplibs+=(
- third_party/catapult
- third_party/catapult/common/py_vulcanize/third_party/rcssmin
- third_party/catapult/common/py_vulcanize/third_party/rjsmin
- third_party/catapult/third_party/beautifulsoup4-4.9.3
- third_party/catapult/third_party/html5lib-1.1
- third_party/catapult/third_party/polymer
- third_party/catapult/third_party/six
- third_party/catapult/third_party/typ
- third_party/catapult/tracing/third_party/d3
- third_party/catapult/tracing/third_party/gl-matrix
- third_party/catapult/tracing/third_party/jpeg-js
- third_party/catapult/tracing/third_party/jszip
- third_party/catapult/tracing/third_party/mannwhitneyu
- third_party/catapult/tracing/third_party/oboe
- third_party/catapult/tracing/third_party/pako
- third_party/ced
- third_party/cld_3
- third_party/closure_compiler
- )
- use libcxx && keeplibs+=(
- third_party/compiler-rt
- )
- keeplibs+=(
- third_party/content_analysis_sdk
- third_party/cpuinfo
- third_party/crabbyavif
- third_party/crashpad
- third_party/crashpad/crashpad/third_party/lss
- third_party/crashpad/crashpad/third_party/zlib
- )
- use system-crc32c || keeplibs+=(
- third_party/crc32c
- )
- keeplibs+=(
- third_party/cros_system_api
- third_party/d3
- third_party/dawn
- third_party/dawn/third_party/gn/webgpu-cts
- third_party/dawn/third_party/OpenGL-Registry
- third_party/dawn/third_party/renderdoc
- third_party/dawn/third_party/webgpu-headers
- third_party/depot_tools
- third_party/devscripts
- third_party/devtools-frontend
- third_party/devtools-frontend/src/front_end/third_party/acorn
- third_party/devtools-frontend/src/front_end/third_party/additional_readme_paths.json
- third_party/devtools-frontend/src/front_end/third_party/axe-core
- third_party/devtools-frontend/src/front_end/third_party/chromium
- third_party/devtools-frontend/src/front_end/third_party/codemirror
- third_party/devtools-frontend/src/front_end/third_party/csp_evaluator
- third_party/devtools-frontend/src/front_end/third_party/diff
- third_party/devtools-frontend/src/front_end/third_party/i18n
- third_party/devtools-frontend/src/front_end/third_party/intl-messageformat
- third_party/devtools-frontend/src/front_end/third_party/json5
- third_party/devtools-frontend/src/front_end/third_party/legacy-javascript
- third_party/devtools-frontend/src/front_end/third_party/lighthouse
- third_party/devtools-frontend/src/front_end/third_party/lit
- third_party/devtools-frontend/src/front_end/third_party/marked
- third_party/devtools-frontend/src/front_end/third_party/puppeteer
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/third_party/mitt
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/third_party/parsel-js
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/third_party/rxjs
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/third_party/urlpattern-polyfill
- third_party/devtools-frontend/src/front_end/third_party/source-map-scopes-codec
- third_party/devtools-frontend/src/front_end/third_party/third-party-web
- third_party/devtools-frontend/src/front_end/third_party/vscode.web-custom-data
- third_party/devtools-frontend/src/front_end/third_party/wasmparser
- third_party/devtools-frontend/src/front_end/third_party/web-vitals
- third_party/devtools-frontend/src/third_party
- third_party/dom_distiller_js
- third_party/dragonbox
- third_party/eigen3
- third_party/emoji-segmenter
- third_party/farmhash
- third_party/fast_float
- third_party/fdlibm
- third_party/federated_compute/chromium/fcp/confidentialcompute
- third_party/federated_compute/src/fcp/base
- third_party/federated_compute/src/fcp/confidentialcompute
- third_party/federated_compute/src/fcp/protos/confidentialcompute
- third_party/federated_compute/src/fcp/protos/federatedcompute
- third_party/fft2d
- third_party/flatbuffers
- third_party/fp16
- third_party/freetype
- third_party/fusejs
- third_party/fxdiv
- third_party/gemmlowp
- third_party/google_input_tools
- third_party/google_input_tools/third_party/closure_library
- third_party/google_input_tools/third_party/closure_library/third_party/closure
- third_party/googletest
- third_party/gperf # We symlink system gperf, but this will purge the symlink since we tidy up afterwards.
- third_party/highway
- third_party/hunspell
- third_party/hyphenation-patterns
- third_party/ink/src/ink/brush
- third_party/ink/src/ink/color
- third_party/ink/src/ink/geometry
- third_party/ink/src/ink/rendering
- third_party/ink/src/ink/rendering/skia/common_internal
- third_party/ink/src/ink/rendering/skia/native
- third_party/ink/src/ink/rendering/skia/native/internal
- third_party/ink/src/ink/strokes
- third_party/ink/src/ink/types
- third_party/inspector_protocol
- third_party/ipcz
- third_party/jinja2
- )
- use system-jsoncpp || keeplibs+=(
- third_party/jsoncpp
- )
- keeplibs+=(
- third_party/khronos
- third_party/lens_server_proto
- third_party/leveldatabase
- third_party/libaddressinput
- )
- use libcxx && keeplibs+=(
- third_party/libc++
- )
- keeplibs+=(
- third_party/libdrm
- third_party/libgav1
- third_party/libjingle
- third_party/libpfm4
- third_party/libphonenumber
- third_party/libpng
- third_party/libsecret
- third_party/libsrtp
- third_party/libsync
- third_party/libtess2/libtess2
- third_party/libtess2/src/Include
- third_party/libtess2/src/Source
- third_party/liburlpattern
- )
- use system-libusb || keeplibs+=(
- third_party/libusb
- )
- keeplibs+=(
- third_party/libva_protected_content
- )
- use system-libvpx || keeplibs+=(
- third_party/libvpx
- third_party/libvpx/source/libvpx/third_party/x86inc
- )
- keeplibs+=(
- third_party/libwebm
- third_party/libx11
- third_party/libxcb-keysyms
- third_party/libxml/chromium
- third_party/libyuv
- third_party/libzip
- third_party/lit
- )
- use libcxx && keeplibs+=(
- third_party/llvm-libc
- third_party/llvm-libc/src/shared/
- )
- keeplibs+=(
- third_party/lottie
- third_party/lss
- third_party/lzma_sdk
- third_party/mako
- third_party/markupsafe
- third_party/material_color_utilities
- third_party/metrics_proto
- third_party/minigbm
- third_party/ml_dtypes
- third_party/modp_b64
- third_party/nasm
- third_party/nearby
- third_party/neon_2_sse
- third_party/node
- third_party/oak/chromium/proto
- third_party/oak/chromium/proto/attestation
- third_party/omnibox_proto
- third_party/one_euro_filter
- third_party/openscreen
- third_party/openscreen/src/third_party/
- third_party/openscreen/src/third_party/tinycbor/src/src
- third_party/ots
- third_party/pdfium
- third_party/pdfium/third_party/agg23
- third_party/pdfium/third_party/bigint
- third_party/pdfium/third_party/freetype
- third_party/pdfium/third_party/lcms
- )
- use system-openjpeg || keeplibs+=(
- third_party/pdfium/third_party/libopenjpeg
- )
- keeplibs+=(
- third_party/pdfium/third_party/libtiff
- third_party/perfetto
- third_party/perfetto/protos/third_party/android
- third_party/perfetto/protos/third_party/chromium
- third_party/perfetto/protos/third_party/pprof
- third_party/perfetto/protos/third_party/primes
- third_party/perfetto/protos/third_party/simpleperf
- third_party/pffft
- third_party/ply
- third_party/polymer
- third_party/private_membership
- third_party/private-join-and-compute
- third_party/protobuf
- third_party/protobuf/third_party/utf8_range
- third_party/pthreadpool
- third_party/puffin
- third_party/pyjson5
- third_party/pyyaml
- third_party/rapidhash
- third_party/readability
- third_party/rnnoise
- third_party/rust
- third_party/ruy
- third_party/s2cellid
- third_party/search_engines_data
- third_party/securemessage
- third_party/selenium-atoms
- third_party/sentencepiece
- third_party/sentencepiece/src/third_party/darts_clone
- third_party/shell-encryption
- third_party/simdutf
- third_party/simplejson
- third_party/six
- third_party/skia
- third_party/skia/include/third_party/vulkan
- third_party/smhasher
- )
- use system-snappy || keeplibs+=(
- third_party/snappy
- )
- keeplibs+=(
- third_party/spirv-headers
- third_party/spirv-tools
- third_party/sqlite
- third_party/swiftshader
- third_party/swiftshader/third_party/astc-encoder
- third_party/swiftshader/third_party/llvm-subzero
- third_party/swiftshader/third_party/marl
- third_party/swiftshader/third_party/SPIRV-Headers/include/spirv
- third_party/swiftshader/third_party/SPIRV-Tools
- third_party/swiftshader/third_party/subzero
- third_party/tensorflow_models
- third_party/tensorflow-text
- third_party/tflite
- third_party/tflite/src/third_party/fft2d
- third_party/tflite/src/third_party/xla/third_party/tsl
- third_party/tflite/src/third_party/xla/xla/tsl/framework
- third_party/tflite/src/third_party/xla/xla/tsl/lib/random
- third_party/tflite/src/third_party/xla/xla/tsl/platform
- third_party/tflite/src/third_party/xla/xla/tsl/protobuf
- third_party/tflite/src/third_party/xla/xla/tsl/util
- third_party/ukey2
- third_party/utf
- third_party/vulkan
- third_party/wayland
- third_party/webdriver
- third_party/webgpu-cts
- third_party/webrtc
- third_party/webrtc/common_audio/third_party/ooura
- third_party/webrtc/common_audio/third_party/spl_sqrt_floor
- third_party/webrtc/modules/third_party/fft
- third_party/webrtc/modules/third_party/g711
- third_party/webrtc/modules/third_party/g722
- third_party/widevine
- )
- use system-woff2 || keeplibs+=(
- third_party/woff2
- )
- keeplibs+=(
- third_party/wuffs
- third_party/x11proto
- third_party/xcbproto
- third_party/xnnpack
- third_party/zlib/google
- third_party/zxcvbn-cpp
- url/third_party/mozilla
- v8/third_party/glibc
- v8/third_party/inspector_protocol
- v8/third_party/rapidhash-v8
- v8/third_party/siphash
- v8/third_party/utf8-decoder
- v8/third_party/v8
- v8/third_party/valgrind
-
- # gyp -> gn leftovers
- third_party/speech-dispatcher
- third_party/usb_ids
- )
-
- if use test; then
- keeplibs+=(
- third_party/breakpad/breakpad/src/processor
- third_party/fuzztest
- third_party/google_benchmark/src/include/benchmark
- third_party/google_benchmark/src/src
- third_party/test_fonts
- third_party/test_fonts/fontconfig
- third_party/test_fonts/test_fonts
- )
- fi
-
- # USE=system-*
- if ! use system-harfbuzz; then
- keeplibs+=( third_party/harfbuzz )
- fi
-
- if ! use system-ffmpeg; then
- keeplibs+=( third_party/ffmpeg third_party/opus )
- fi
-
- if ! use system-icu; then
- keeplibs+=( third_party/icu )
- fi
-
- if ! use system-zstd; then
- keeplibs+=( third_party/zstd )
- fi
-
- if ! use system-av1; then
- keeplibs+=(
- third_party/dav1d
- third_party/libaom
- third_party/libaom/source/libaom/third_party/fastfeat
- third_party/libaom/source/libaom/third_party/vector
- third_party/libaom/source/libaom/third_party/x86inc
- )
- fi
-
- if use libcxx; then
- keeplibs+=(
- third_party/libc++
- third_party/llvm-libc
- )
- fi
-
- if ! use system-openh264; then
- keeplibs+=( third_party/openh264 )
- fi
-
- if ! use system-re2; then
- keeplibs+=( third_party/re2 )
- fi
-
- # Arch-specific
- if use arm64 || use ppc64 ; then
- keeplibs+=( third_party/swiftshader/third_party/llvm-10.0 )
- fi
- # we need to generate ppc64 stuff because upstream does not ship it yet
- # it has to be done before unbundling.
- if use ppc64; then
- pushd third_party/libvpx >/dev/null || die
- mkdir -p source/config/linux/ppc64 || die
- # requires git and clang, bug #832803
- # Revert https://chromium.googlesource.com/chromium/src/+/b463d0f40b08b4e896e7f458d89ae58ce2a27165%5E%21/third_party/libvpx/generate_gni.sh
- # and https://chromium.googlesource.com/chromium/src/+/71ebcbce867dd31da5f8b405a28fcb0de0657d91%5E%21/third_party/libvpx/generate_gni.sh
- # since we're not in a git repo
- sed -i -e "s|^update_readme||g; s|clang-format|${EPREFIX}/bin/true|g; /^git -C/d; /git cl/d; /cd \$BASE_DIR\/\$LIBVPX_SRC_DIR/ign format --in-place \$BASE_DIR\/BUILD.gn\ngn format --in-place \$BASE_DIR\/libvpx_srcs.gni" \
- generate_gni.sh || die
- ./generate_gni.sh || die
- popd >/dev/null || die
-
- pushd third_party/ffmpeg >/dev/null || die
- cp libavcodec/ppc/h264dsp.c libavcodec/ppc/h264dsp_ppc.c || die
- cp libavcodec/ppc/h264qpel.c libavcodec/ppc/h264qpel_ppc.c || die
- popd >/dev/null || die
- fi
-
- # Sanity check keeplibs, on major version bumps it is often necessary to update this list
- # and this enables us to hit them all at once.
- # There are some entries that need to be whitelisted (TODO: Why? The file is understandable, the rest seem odd)
- whitelist_libs=(
- net/third_party/quic
- third_party/devtools-frontend/src/front_end/third_party/additional_readme_paths.json
- third_party/libjingle
- third_party/mesa
- third_party/skia/third_party/vulkan
- third_party/vulkan
- )
- local not_found_libs=()
- for lib in "${keeplibs[@]}"; do
- if [[ ! -d "${lib}" ]] && ! has "${lib}" "${whitelist_libs[@]}"; then
- not_found_libs+=( "${lib}" )
- fi
- done
-
- if [[ ${#not_found_libs[@]} -gt 0 ]]; then
- ewarn "The following \`keeplibs\` directories were not found in the source tree:"
- for lib in "${not_found_libs[@]}"; do
- ewarn " ${lib}"
- done
- fi
-
- keeplibs+=( third_party/ungoogled )
-
- # Remove most bundled libraries. Some are still needed.
- einfo "Unbundling third-party libraries ..."
- build/linux/unbundle/remove_bundled_libraries.py "${keeplibs[@]}" --do-remove || die
-
- # Interferes with our bundled clang path; we don't want stripped binaries anyway.
- sed -i -e 's|${clang_base_path}/bin/llvm-strip|/bin/true|g' \
- -e 's|${clang_base_path}/bin/llvm-objcopy|/bin/true|g' \
- build/linux/strip_binary.gni || die
-}
-
-src_configure() {
- # Calling this here supports resumption via FEATURES=keepwork
- python_setup
-
- # Bug 491582.
- export TMPDIR="${WORKDIR}/temp"
- mkdir -p -m 755 "${TMPDIR}" || die
-
- # https://bugs.gentoo.org/654216
- addpredict /dev/dri/ #nowarn
-
- # Use system-provided libraries.
- # TODO: freetype -- remove sources (https://bugs.chromium.org/p/pdfium/issues/detail?id=733).
- # TODO: use_system_hunspell (upstream changes needed).
- # TODO: use_system_protobuf (bug #525560).
- # TODO: use_system_sqlite (http://crbug.com/22208).
-
- # libevent: https://bugs.gentoo.org/593458
- local gn_system_libraries=(
- flac
- fontconfig
- freetype
- libjpeg
- libwebp
- libxml
- libxslt
- zlib
- )
- if use system-abseil-cpp; then
- gn_system_libraries+=(
- absl_algorithm
- absl_base
- absl_cleanup
- absl_container
- absl_crc
- absl_debugging
- absl_flags
- absl_functional
- absl_hash
- absl_log
- absl_log_internal
- absl_memory
- absl_meta
- absl_numeric
- absl_random
- absl_status
- absl_strings
- absl_synchronization
- absl_time
- absl_types
- absl_utility
- )
- fi
- if use system-brotli; then
- gn_system_libraries+=( brotli )
- fi
- if use system-crc32c; then
- gn_system_libraries+=( crc32c )
- fi
- if use system-double-conversion; then
- gn_system_libraries+=( double-conversion )
- fi
- if use system-woff2; then
- gn_system_libraries+=( woff2 )
- fi
- if use nvidia; then
- gn_system_libraries+=( libXNVCtrl )
- fi
- if use system-ffmpeg; then
- gn_system_libraries+=( ffmpeg opus )
- fi
- if use system-jsoncpp; then
- gn_system_libraries+=( jsoncpp )
- fi
- if use system-icu; then
- gn_system_libraries+=( icu )
- fi
- if use system-zstd; then
- gn_system_libraries+=( zstd )
- fi
- if use system-av1; then
- gn_system_libraries+=( dav1d libaom )
- fi
- if use system-libusb; then
- gn_system_libraries+=( libusb )
- fi
- if use system-libvpx; then
- gn_system_libraries+=( libvpx )
- fi
- use system-openh264 && gn_system_libraries+=(
- openh264
- )
- use system-re2 && gn_system_libraries+=(
- re2
- )
- use system-snappy && gn_system_libraries+=(
- snappy
- )
-
- build/linux/unbundle/replace_gn_files.py --system-libraries "${gn_system_libraries[@]}" ||
- die "Failed to replace GN files for system libraries"
-
- # TODO 131: The above call clobbers `enable_freetype = true` in the freetype gni file
- # drop the last line, then append the freetype line and a new curly brace to end the block
- local freetype_gni="build/config/freetype/freetype.gni"
- sed -i -e '$d' ${freetype_gni} || die
- echo " enable_freetype = true" >> ${freetype_gni} || die
- echo "}" >> ${freetype_gni} || die
-
- if use !custom-cflags; then
- replace-flags "-Os" "-O2"
- strip-flags
- # Debug info section overflows without component build
- # Prevent linker from running out of address space, bug #471810 .
- filter-flags "-g*"
- # 949123: Several multimedia components explicitly build with specific CFLAGS and
- # use runtime detection to enable optimisations; unfortunately any of our CFLAGS are suffixed
- # to the end of the command line, which causes build failures.
- fi
- # Since M150 `skia` will begin breaking for x86_64 due to compilation of `avx512` code paths;
- # we need to filter these for all arches.
- filter-flags "-march*" "-mtune*" "-mcpu*"
-
- # We don't use the same clang version as upstream, and with -Werror
- # we need to make sure that we don't get superfluous warnings.
- append-flags -Wno-unknown-warning-option
- if tc-is-cross-compiler; then # can you cross-compile with the bundled toolchain?
- export BUILD_CXXFLAGS+=" -Wno-unknown-warning-option"
- export BUILD_CFLAGS+=" -Wno-unknown-warning-option"
- fi
-
- # Start building our GN options
- local myconf_gn=() # Tip: strings must be quoted, bools or numbers are fine
-
- if use !bundled-toolchain; then
- # We already forced the "correct" clang via pkg_setup
-
- if tc-is-cross-compiler; then
- CC="${CC} -target ${CHOST} --sysroot ${ESYSROOT}"
- CXX="${CXX} -target ${CHOST} --sysroot ${ESYSROOT}"
- BUILD_AR=${AR}
- BUILD_CC=${CC}
- BUILD_CXX=${CXX}
- BUILD_NM=${NM}
- fi
-
- # Make sure the build system will use the right tools, bug #340795.
- tc-export AR CC CXX NM
-
- strip-unsupported-flags
- append-ldflags -Wl,--undefined-version # https://bugs.gentoo.org/918897#c32
-
- myconf_gn+=(
- "is_clang=true"
- "clang_use_chrome_plugins=false"
- "use_clang_modules=false" # M141 enables this for the linux platform by default.
- 'custom_toolchain="//build/toolchain/linux/unbundle:default"'
- # From M127 we need to provide a location for libclang and the clang resource dir so that bindgen can find them
- "bindgen_libclang_path=\"$(get_llvm_prefix)/$(get_libdir)\""
- "bindgen_clang_resource_dir=\"${EPREFIX}/usr/lib/clang/${LLVM_SLOT}/include\""
- "bindgen_extra_clang_args=[\"-I${EPREFIX}/usr/lib/clang/${LLVM_SLOT}/include\"]"
- "clang_base_path=\"${EPREFIX}/usr/lib/clang/${LLVM_SLOT}/\""
- "rust_bindgen_root=\"${EPREFIX}/usr/\""
- "rust_sysroot_absolute=\"$(get_rust_prefix)\""
- "rustc_version=\"${RUST_SLOT}\""
- )
-
- if tc-ld-is-mold; then
- myconf_gn+=(
- "use_mold=true"
- "use_lld=false"
- "linker_path=\"${EPREFIX}/usr/bin/mold\""
- )
- else
- myconf_gn+=( "use_lld=true" )
- fi
-
- if [[ ${LLVM_SLOT} -lt 23 ]]; then
- # Workaround for -fsanitize-ignore-for-ubsan-feature (added in LLVM 23)
- myconf_gn+=( 'clang_has_ubsan_feature_ignore=false' )
- fi
-
- if ! tc-is-cross-compiler; then
- myconf_gn+=( 'host_toolchain="//build/toolchain/linux/unbundle:default"' )
- else
- tc-export BUILD_{AR,CC,CXX,NM}
- myconf_gn+=(
- 'host_toolchain="//build/toolchain/linux/unbundle:host"'
- 'v8_snapshot_toolchain="//build/toolchain/linux/unbundle:host"'
- "host_pkg_config=\"$(tc-getBUILD_PKG_CONFIG)\""
- "pkg_config=\"$(tc-getPKG_CONFIG)\""
- )
-
- # setup cups-config, build system only uses --libs option
- if use cups; then
- mkdir "${T}/cups-config" || die
- cp "${ESYSROOT}/usr/bin/${CHOST}-cups-config" "${T}/cups-config/cups-config" || die
- export PATH="${PATH}:${T}/cups-config"
- fi
-
- # Don't inherit PKG_CONFIG_PATH from environment
- local -x PKG_CONFIG_PATH=
- fi
-
- fi # !bundled-toolchain
-
- local myarch
- myarch="$(tc-arch)"
- case ${myarch} in
- amd64)
- # Bug 530248, 544702, 546984, 853646.
- use !custom-cflags && filter-flags -mno-mmx -mno-sse2 -mno-ssse3 -mno-sse4.1 \
- -mno-avx -mno-avx2 -mno-fma -mno-fma4 -mno-xop -mno-sse4a
- myconf_gn+=( 'target_cpu="x64"' )
- ;;
- x86)
- # Bug 530248, 544702, 546984, 853646.
- use !custom-cflags && filter-flags -mno-mmx -mno-sse2 -mno-ssse3 -mno-sse4.1 \
- -mno-avx -mno-avx2 -mno-fma -mno-fma4 -mno-xop -mno-sse4a
- myconf_gn+=( 'target_cpu="x86"' )
- ;;
- arm64)
- myconf_gn+=( 'target_cpu="arm64"' )
- ;;
- ppc64)
- myconf_gn+=( 'target_cpu="ppc64"' )
- ;;
- *)
- die "Failed to determine target arch, got '${myarch}'."
- ;;
- esac
-
- # Common options
-
- myconf_gn+=(
- # Disable code formating of generated files
- "blink_enable_generated_code_formatting=false"
- # enable DCHECK with USE=debug only, increases chrome binary size by 30%, bug #811138.
- # DCHECK is fatal by default, make it configurable at runtime, #bug 807881.
- "dcheck_always_on=$(usex debug true false)"
- "dcheck_is_configurable=$(usex debug true false)"
- # Chromium builds provided by Linux distros should disable the testing config
- "disable_fieldtrial_testing_config=true"
- # Custom patch: Enable building Chromium as individual channels (e.g. stable, beta, dev) that
- # use different profile directories, desktop entries, etc. This enables slotting the ebuild.
- "enable_channel_branding=true"
- # 131 began laying the groundwork for replacing freetype with
- # "Rust-based Fontations set of libraries plus Skia path rendering"
- # We now need to opt-in
- "enable_freetype=true"
- "enable_hangout_services_extension=$(usex hangouts true false)"
- # Don't need nocompile checks and GN crashes with our config (verify with modern GN)
- "enable_nocompile_tests=false"
- # pseudolocales are only used for testing
- "enable_pseudolocales=false"
- "enable_widevine=$(usex widevine true false)"
- # Disable fatal linker warnings, bug 506268.
- "fatal_linker_warnings=false"
- # Component build isn't generally intended for use by end users. It's mostly useful
- # for development and debugging.
- "is_component_build=false"
- # GN needs explicit config for Debug/Release as opposed to inferring it from build directory.
- "is_debug=false"
- "is_official_build=$(usex official true false)"
- # Enable ozone wayland and/or headless support
- "ozone_auto_platforms=false"
- "ozone_platform_headless=true"
- # Enables building without non-free unRAR licence
- "safe_browsing_use_unrar=false"
- # "thin_lto_enable_optimizations=${use_lto}"
- "treat_warnings_as_errors=false"
- # Use in-tree libc++ (buildtools/third_party/libc++ and buildtools/third_party/libc++abi)
- # instead of the system C++ library for C++ standard library support.
- # default: true, but let's be explicit (forced since 120 ; USE removed 127).
- "use_custom_libcxx=true"
- # Enable ozone wayland and/or headless support
- "use_ozone=true"
- # The sysroot is the oldest debian image that chromium supports, we don't need it
- "use_sysroot=false"
- # See dependency logic in third_party/BUILD.gn
- "use_system_harfbuzz=$(usex system-harfbuzz true false)"
- # "use_thin_lto=${use_lto}"
- # Only enabled for clang, but gcc has endian macros too
- "v8_use_libm_trig_functions=true"
- )
-
- myconf_gn+=( "enable_iterator_debugging=$(usex debug true false)" )
-
- if use debug; then
- myconf_gn+=(
- "symbol_level=2"
- "blink_symbol_level=2"
- "v8_symbol_level=2"
- )
- else
- myconf_gn+=(
- "symbol_level=0"
- "blink_symbol_level=0"
- "v8_symbol_level=0"
- )
- fi
-
- if use bindist ; then
- myconf_gn+=(
- # If this is set to false Chromium won't be able to load any proprietary codecs
- # even if provided with an ffmpeg capable of h264/aac decoding
- "proprietary_codecs=true"
- 'ffmpeg_branding="Chrome"'
- # build ffmpeg as an external component (libffmpeg.so) that we can remove / substitute
- "is_component_ffmpeg=true"
- )
- else
- myconf_gn+=(
- "proprietary_codecs=$(usex proprietary-codecs true false)"
- "ffmpeg_branding=\"$(usex proprietary-codecs Chrome Chromium)\""
- )
- fi
-
- if use headless; then
- myconf_gn+=(
- "enable_print_preview=false"
- "enable_remoting=false"
- 'ozone_platform="headless"'
- "rtc_use_pipewire=false"
- "use_alsa=false"
- "use_cups=false"
- "use_gio=false"
- "use_glib=false"
- "use_gtk=false"
- "use_kerberos=false"
- "use_libpci=false"
- "use_pangocairo=false"
- "use_pulseaudio=false"
- "use_qt5=false"
- "use_qt6=false"
- "use_udev=false"
- "use_vaapi=false"
- "use_xkbcommon=false"
- )
- else
- myconf_gn+=(
- "gtk_version=$(usex gtk4 4 3)"
- # link pulseaudio directly (DT_NEEDED) instead of using dlopen.
- # helps with automated detection of ABI mismatches and prevents silent errors.
- "link_pulseaudio=$(usex pulseaudio true false)"
- "ozone_platform_wayland=$(usex wayland true false)"
- "ozone_platform_x11=$(usex X true false)"
- "ozone_platform=\"$(usex wayland wayland x11)\""
- "rtc_use_pipewire=$(usex screencast true false)"
- "use_cups=$(usex cups true false)"
- "use_kerberos=$(usex kerberos true false)"
- "use_pulseaudio=$(usex pulseaudio true false)"
- "use_qt5=false"
- "use_system_libffi=$(usex wayland true false)"
- "use_system_minigbm=true"
- "use_vaapi=$(usex vaapi true false)"
- "use_xkbcommon=true"
- )
- if use qt6; then
- local cbuild_libdir
- cbuild_libdir="$(get_libdir)"
- if tc-is-cross-compiler; then
- # Hack to workaround get_libdir not being able to handle CBUILD, bug #794181
- cbuild_libdir="$($(tc-getBUILD_PKG_CONFIG) --keep-system-libs --libs-only-L libxslt)"
- cbuild_libdir="${cbuild_libdir:2}"
- cbuild_libdir="${cbuild_libdir/% }"
- fi
- myconf_gn+=(
- "use_qt6=true"
- "moc_qt6_path=\"${EPREFIX}/usr/${cbuild_libdir}/qt6/libexec\""
- )
- else
- myconf_gn+=( "use_qt6=false" )
- fi
- fi
-
- # Explicitly disable ICU data file support for system-icu/headless builds.
- if use system-icu || use headless; then
- myconf_gn+=( "icu_use_data_file=false" )
- fi
-
- if use official; then
- # Allow building against system libraries in official builds
- sed -i 's/OFFICIAL_BUILD/GOOGLE_CHROME_BUILD/' \
- tools/generate_shim_headers/generate_shim_headers.py || die
- # Don't add symbols to build
- myconf_gn+=( "symbol_level=0" )
- fi
-
- if use pgo; then
- myconf_gn+=(
- "chrome_pgo_phase=2"
- "v8_enable_builtins_optimization=true"
- )
- else
- myconf_gn+=( "chrome_pgo_phase=0" )
- fi
-
- # Odds and ends
-
- # skipping typecheck is only supported on amd64, bug #876157
- if ! use amd64; then
- myconf_gn+=( "devtools_skip_typecheck=false" )
- fi
-
- # Disable external code space for V8 for ppc64. It is disabled for ppc64
- # by default, but cross-compiling on amd64 enables it again.
- if tc-is-cross-compiler && use ppc64; then
- myconf_gn+=( "v8_enable_external_code_space=false" )
- fi
-
- # This determines whether or not GN uses the bundled libcxx
- if use libcxx; then
- myconf_gn+=( "use_custom_libcxx=true" )
- else
- myconf_gn+=(
- "use_custom_libcxx=false"
- "use_llvm_libatomic=false"
- )
- append-cppflags -U_GLIBCXX_ASSERTIONS #See #318
- fi
-
- myconf_gn+=( "use_bluez=$(usex bluetooth true false)" )
-
- myconf_gn+=( "is_cfi=$(usex cfi true false)" )
-
- if use cfi; then
- myconf_gn+=(
- "use_cfi_icall=true"
- "use_cfi_cast=true"
- )
- fi
-
- myconf_gn+=(
- "optimize_webui=$(usex optimize-webui true false)"
- "use_system_freetype=$(usex system-harfbuzz true false)"
- "use_system_libopenjpeg2=$(usex system-openjpeg true false)"
- "enable_pdf=true"
- "use_system_lcms2=true"
- "enable_print_preview=true"
- "use_thin_lto=$(usex thinlto true false)"
- "thin_lto_enable_optimizations=$(usex optimize-thinlto true false)"
-
- # Ungoogled flags
- "build_with_tflite_lib=false"
- "enable_mdns=false"
- "enable_mse_mpeg2ts_stream_parser=$(usex proprietary-codecs true false)"
- "enable_remoting=false"
- "enable_reporting=false"
- "enable_service_discovery=false"
- "exclude_unwind_tables=true"
- "google_api_key=\"\""
- "google_default_client_id=\"\""
- "google_default_client_secret=\"\""
- "safe_browsing_mode=0"
- "use_official_google_api_keys=false"
- "use_unofficial_version_number=false"
-
- # "enable_swiftshader=false"
-
- # Additional flags
- # "perfetto_use_system_zlib=true"
- # "use_system_zlib=true"
- # "use_system_libjpeg=true"
- # "rtc_build_examples=false"
- # "enable_chromium_prelude=false"
- # "enable_updater=false"
- # "enable_update_notifications=false"
- # "enable_constraints=false"
- # "rtc_rusty_base64=false"
- # "v8_enable_temporal_support=false"
- # "media_use_symphonia=false"
- # "pdf_enable_rust_png=false"
- # "skia_use_libpng_encode=true"
- # "skia_use_libpng_decode=true"
- # "skia_use_rust_png_decode=false"
- # "skia_use_rust_png_encode=false"
- # "enable_jxl_decoder=false"
- )
-
- if use amd64 || use arm64; then
- myconf_gn+=(
- "v8_drumbrake_bounds_checks=true"
- # "v8_enable_drumbrake=true"
- )
- fi
-
- if use thinlto; then
- # We need to change the default value of import-instr-limit in
- # LLVM to limit the text size increase. The default value is
- # 100, and we change it to 30 to reduce the text size increase
- # from 25% to 10%. The performance number of page_cycler is the
- # same on two of the thinLTO configurations, we got 1% slowdown
- # on speedometer when changing import-instr-limit from 100 to 30.
- # append-ldflags "-Wl,-plugin-opt,-import-instr-limit=30"
- sed -i '/import_instr_limit = 5/{s++import_instr_limit = 30+;h};${x;/./{x;q0};x;q1}' \
- build/config/compiler/BUILD.gn || die
-
- append-ldflags "-Wl,--thinlto-jobs=$(makeopts_jobs)"
- fi
-
- # Facilitate deterministic builds (taken from build/config/compiler/BUILD.gn)
- append-cflags -Wno-builtin-macro-redefined
- append-cxxflags -Wno-builtin-macro-redefined
- append-cppflags "-D__DATE__= -D__TIME__= -D__TIMESTAMP__="
-
- local flags
- einfo "Building with the following compiler settings:"
- for flags in C{C,XX} AR NM RANLIB {C,CXX,CPP,LD}FLAGS \
- EXTRA_GN UGC_{SKIP_{PATCHES,SUBSTITUTION},KEEP_BINARIES} ; do
- einfo " ${flags} = \"${!flags}\""
- done
-
- # Since we build from tarballs, we need to set the channel here so that it can be used in the build.
- export CHROME_VERSION_EXTRA="${SLOT}"
-
- einfo "Configuring Chromium ..."
- set -- gn gen --args="${myconf_gn[*]}${EXTRA_GN:+ ${EXTRA_GN}}" out/Release
- echo "$@"
- "$@" || die "Failed to configure Chromium"
-
- # The "if" below should not be executed unless testing
- if [ ! -z "${NODIE}" ]; then
- # List all args
- # gn args --list out/Release
-
- # Quick compiler check
- eninja -C out/Release protoc torque
- fi
-}
-
-src_compile() {
- # Final link uses lots of file descriptors.
- ulimit -n 2048
-
- # Calling this here supports resumption via FEATURES=keepwork
- python_setup
-
- # I hate doing this but upstream Rust have yet to come up with a better solution for
- # us poor packagers. Required for Split LTO units, which are required for CFI.
- export RUSTC_BOOTSTRAP=1
-
- # Don't inherit PYTHONPATH from environment, bug #789021, #812689
- local -x PYTHONPATH=
-
- # Build mksnapshot and pax-mark it.
- if use pax-kernel; then
- local x
- for x in mksnapshot v8_context_snapshot_generator code_cache_generator; do
- if tc-is-cross-compiler; then
- eninja -C out/Release "host/${x}"
- pax-mark m "out/Release/host/${x}"
- else
- eninja -C out/Release "${x}"
- pax-mark m "out/Release/${x}"
- fi
- done
- fi
-
- # Even though ninja autodetects number of CPUs, we respect
- # user's options, for debugging with -j 1 or any other reason.
- eninja -C out/Release chrome chrome_sandbox $(use test && echo "base_unittests")
-
- pax-mark m out/Release/chrome
-
- # This codepath does minimal patching, so we're at the mercy of upstream
- # CFLAGS. This is fine - we're not intending to force this on users
- # and we do a lot of flag 'management' anyway.
- if use bundled-toolchain; then
- QA_FLAGS_IGNORED="
- usr/lib64/chromium-browser/chrome
- usr/lib64/chromium-browser/chrome-sandbox
- usr/lib64/chromium-browser/chromedriver
- usr/lib64/chromium-browser/chrome_crashpad_handler
- usr/lib64/chromium-browser/libEGL.so
- usr/lib64/chromium-browser/libGLESv2.so
- usr/lib64/chromium-browser/libVkICD_mock_icd.so
- usr/lib64/chromium-browser/libVkLayer_khronos_validation.so
- usr/lib64/chromium-browser/libqt6_shim.so
- usr/lib64/chromium-browser/libvk_swiftshader.so
- usr/lib64/chromium-browser/libvulkan.so.1
- "
- fi
-
- use convert-dict && eninja -C out/Release convert_dict
-
- use enable-driver && eninja -C out/Release chromedriver
- #use suid && eninja -C out/Release chrome_sandbox
-
- use enable-driver && mv out/Release/chromedriver{.unstripped,}
-
- rm -f out/Release/locales/*.pak.info || die
-
- # Generate support files (desktop file, manpage, etc.) See: #684550 #706786 #968958
- ${EPYTHON} "${FILESDIR}/generate-support-files.py" \
- --installdir "/usr/$(get_libdir)/ungoogled-chromium-browser" \
- --channel "${SLOT}" ||
- die "Failed to generate support files"
-}
-
-src_test() {
- # Tests may be flaky with usersandbox, and the test runner executes significantly faster without.
- # If you seem to be excluding too many tests for a particular milestone: comment them out, reboot, and
- # run the tests again. If that doesn't help, try FEATURES="-usersandbox" and send it because obviously the
- # chromium gods are not smiling upon you today. Do some runtime testing, obvs.
- local skip_tests=(
- # Wildcard exclusions (if all tests in a test suite are broken)
- 'AlternateTestParams/PartitionAllocDeathTest.RepeatedAllocReturnNullDirect/*'
- 'AlternateTestParams/PartitionAllocDeathTest.RepeatedReallocReturnNullDirect/*'
- 'AlternateTestParams/PartitionAllocTest.*' # 200+ tests, >= 1 crashes entire test runner with usersandbox.
- 'CheckExitCodeAfterSignalHandlerDeathTest.*'
- 'CriticalProcessAndThreadSpotChecks/HangWatcherAnyCriticalThreadTests.*'
- 'LazyThreadPoolTaskRunnerEnvironmentTest.*' # M142
- 'ToolsSanityTest.BadVirtualCall*'
- # requires en-us locale
- SysStrings.SysNativeMBAndWide
- SysStrings.SysNativeMBToWide
- SysStrings.SysWideToNativeMB
- # Specific test cases
- CancelableEventTest.BothCancelFailureAndSucceedOccurUnderContention
- FilePathTest.FromUTF8Unsafe_And_AsUTF8Unsafe
- HistogramTesterTest.PumaTestUniqueSample
- ImmediateCrashTest.ExpectedOpcodeSequence # M150
- PathServiceTest.CheckedGetFailure
- PlatformThreadTest.CanChangeThreadType
- RawPtrTest.SetLookupUsesGetForComparison # M146 ; also broken for alpine in M144.
- RustLogIntegrationTest.CheckAllSeverity
- StackCanary.ChangingStackCanaryCrashesOnReturn
- StackTraceDeathTest.StackDumpSignalHandlerIsMallocFree
- TestLauncherTools.TruncateSnippetFocusedMatchesFatalMessagesTest
- ThreadPoolEnvironmentConfig.CanUseBackgroundPriorityForWorker
- )
- local test_filter="-$(IFS=:; printf '%s' "${skip_tests[*]}")"
- # test-launcher-bot-mode enables parallelism and plain output
- # Check individual tests with --gtest_filter=<test you want> --single-process-tests
- ./out/Release/base_unittests --test-launcher-bot-mode \
- --test-launcher-jobs="$(get_makeopts_jobs)" \
- --gtest_filter="${test_filter}" || die "Tests failed!"
-}
-
-src_install() {
- local browser_suffix
- if [[ "${SLOT}" != "stable" ]]; then
- browser_suffix="-${SLOT}"
- else
- browser_suffix=""
- fi
- local CHROMIUM_HOME="/usr/$(get_libdir)/ungoogled-chromium-browser${browser_suffix}"
- exeinto "${CHROMIUM_HOME}"
- doexe out/Release/chrome
-
- #newexe out/Release/chrome_sandbox chrome-sandbox
- #fperms 4755 "${CHROMIUM_HOME}/chrome-sandbox"
-
- use enable-driver && doexe out/Release/chromedriver
-
- #* https://github.com/ungoogled-software/ungoogled-chromium/pull/3563
- doexe out/Release/chrome_crashpad_handler
-
- if use convert-dict; then
- newexe "${FILESDIR}/update-dicts.sh" update-dicts.sh
- doexe out/Release/convert_dict
- fi
-
- ozone_auto_session () {
- use X && use wayland && ! use headless && echo true || echo false
- }
-
- cat <<- EOF > "${D}${CHROMIUM_HOME}/chromium-launcher.sh" || die
- #!/bin/bash
- # Wrapper to launch slotted Chromium via the chromium-common launcher script.
- export CHROME_DESKTOP="ungoogled-chromium-browser${browser_suffix}.desktop"
- export CHROME_EXEC_NAME="ungoogled-chromium-browser${browser_suffix}"
- export CHROME_VERSION_EXTRA="${SLOT}"
- export CHROME_WRAPPER="\$(readlink -f "\$0")"
- export OZONE_AUTO_SESSION=$(ozone_auto_session)
-
- exec /usr/libexec/chromium/chromium-launcher.sh "\$@"
- EOF
-
- chmod 755 "${D}${CHROMIUM_HOME}/chromium-launcher.sh" || die
-
- # It is important that we name the target "chromium-browser",
- # xdg-utils expect it; bug #355517.
- dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/ungoogled-chromium-browser${browser_suffix}
- # keep the old symlink around for consistency
- dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/ungoogled-chromium${browser_suffix}
-
- use enable-driver && dosym "${CHROMIUM_HOME}/chromedriver" /usr/bin/ungoogled-chromedriver${browser_suffix}
-
- pushd out/Release/locales > /dev/null || die
- chromium_remove_language_paks
- popd > /dev/null || die
-
- insinto "${CHROMIUM_HOME}"
- doins out/Release/*.bin
- doins out/Release/*.pak
- doins -r out/Release/hyphen-data
-
- if use bindist; then
- # We built libffmpeg as a component library, but we can't distribute it
- # with proprietary codec support. Remove it and make a symlink to the requested
- # system library.
- rm -f out/Release/libffmpeg.so \
- || die "Failed to remove bundled libffmpeg.so (with proprietary codecs)"
- # symlink the libffmpeg.so from either ffmpeg-chromium or ffmpeg[chromium].
- einfo "Creating symlink to libffmpeg.so from $(usex ffmpeg-chromium ffmpeg-chromium ffmpeg[chromium])..."
- dosym ../chromium/libffmpeg.so$(usex ffmpeg-chromium .${PV%%\.*} "") \
- /usr/$(get_libdir)/ungoogled-chromium-browser/libffmpeg.so
- fi
-
- (
- shopt -s nullglob
- local files=(out/Release/*.so out/Release/*.so.[0-9])
- [[ ${#files[@]} -gt 0 ]] && doins "${files[@]}"
- )
-
- if ! use system-icu && ! use headless; then
- doins out/Release/icudtl.dat
- fi
-
- doins -r out/Release/locales
- #doins -r out/Release/MEIPreload
-
- # Install vk_swiftshader_icd.json; bug #827861
- doins out/Release/vk_swiftshader_icd.json
-
- if [[ -d out/Release/swiftshader ]]; then
- insinto "${CHROMIUM_HOME}/swiftshader"
- doins out/Release/swiftshader/*.so
- fi
-
- use widevine && dosym WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so "${CHROMIUM_HOME}/libwidevinecdm.so"
-
- # Install icons
- local branding size
- for size in 16 24 32 48 64 128 256 ; do
- case ${size} in
- 16|32) branding="chrome/app/theme/default_100_percent/chromium" ;;
- *) branding="chrome/app/theme/chromium" ;;
- esac
- newicon -s ${size} "${branding}/product_logo_${size}.png" \
- ungoogled-chromium-browser${browser_suffix}.png
- done
-
- # Install desktop entry
- domenu out/Release/ungoogled-chromium-browser${browser_suffix}.desktop
-
- # Install GNOME default application entry (bug #303100).
- insinto /usr/share/gnome-control-center/default-apps
- doins out/Release/ungoogled-chromium-browser${browser_suffix}.xml
-
- # Install AppStream metadata
- insinto /usr/share/appdata
- doins out/Release/ungoogled-chromium-browser${browser_suffix}.appdata.xml
-
- # Install manpage; bug #684550
- doman out/Release/ungoogled-chromium-browser${browser_suffix}.1
- dosym ungoogled-chromium-browser${browser_suffix}.1 /usr/share/man/man1/ungoogled-chromium${browser_suffix}.1
-
- readme.gentoo_create_doc
-}
-
-pkg_postrm() {
- xdg_icon_cache_update
- xdg_desktop_database_update
-}
-
-pkg_postinst() {
- xdg_icon_cache_update
- xdg_desktop_database_update
- readme.gentoo_print_elog
-
- if use !headless && [[ -z "${REPLACING_VERSIONS}" ]]; then
- if use vaapi; then
- elog "Hardware-accelerated video decoding configuration:"
- elog
- elog "Chromium supports multiple backends for hardware acceleration. To enable one,"
- elog " Add to CHROMIUM_FLAGS in /etc/chromium/default:"
- elog
- elog "1. VA-API with OpenGL (recommended for most users):"
- elog " --enable-features=AcceleratedVideoDecodeLinuxGL"
- elog " VaapiVideoDecoder may need to be added as well, but try without first."
- elog
- if use wayland; then
- elog "2. Enhanced Wayland/EGL performance:"
- elog " --enable-features=AcceleratedVideoDecodeLinuxGL,AcceleratedVideoDecodeLinuxZeroCopyGL"
- elog
- fi
- if use X; then
- elog "$(usex wayland "3" "2"). VA-API with Vulkan:"
- elog " --enable-features=VaapiVideoDecoder,VaapiIgnoreDriverChecks,Vulkan,DefaultANGLEVulkan,VulkanFromANGLE"
- elog
- if use wayland; then
- elog " NOTE: Vulkan acceleration requires X11 and will not work under Wayland sessions."
- elog " Use OpenGL-based acceleration instead when running under Wayland."
- elog
- fi
- fi
- elog "Additional options:"
- elog " To enable hardware-accelerated encoding (if supported)"
- elog " add 'AcceleratedVideoEncoder' to your feature list"
- elog " VaapiIgnoreDriverChecks bypasses driver compatibility checks"
- elog " (may be needed for newer/unsupported hardware)"
- elog
- else
- elog "This Chromium build was compiled without VA-API support, which provides"
- elog "hardware-accelerated video decoding."
- fi
- if use screencast; then
- elog "Screencast is disabled by default at runtime. Either enable it"
- elog "by navigating to chrome://flags/#enable-webrtc-pipewire-capturer"
- elog "inside Chromium or add --enable-features=WebRTCPipeWireCapturer"
- elog "to CHROMIUM_FLAGS in /etc/chromium/default."
- elog
- elog "Additional setup may be required for screencasting to work."
- elog "See issue: https://github.com/PF4Public/gentoo-overlay/issues/314"
- fi
- if use gtk4; then
- elog "Chromium prefers GTK3 over GTK4 at runtime. To override this"
- elog "behaviour you need to pass --gtk-version=4, e.g. by adding it"
- elog "to CHROMIUM_FLAGS in /etc/chromium/default."
- fi
- if use widevine; then
- elog "widevine requires binary plugins, which are distributed separately"
- elog "Make sure you have www-plugins/chrome-binary-plugins installed"
- fi
- fi
-
- if systemd_is_booted && ! [[ -f "/etc/machine-id" ]]; then
- ewarn "The lack of an '/etc/machine-id' file on this system booted with systemd"
- ewarn "indicates that the Gentoo handbook was not followed to completion."
- ewarn ""
- ewarn "Chromium is known to behave unpredictably with this system configuration;"
- ewarn "please complete the configuration of this system before logging any bugs."
- fi
-
- # Stable slot doesn't change profile directory, and it's vanishingly unlikely that users will downgrade from dev.
- if [[ -n "${REPLACING_VERSIONS}" ]]; then
- local replacing_non_slotted=false
- # there could be more than one PVR
- for version in ${REPLACING_VERSIONS}; do
- if ver_test "${version}" -le "145.0.7632.116"; then
- replacing_non_slotted=true
- break
- fi
- done
- if ${replacing_non_slotted}; then
- ewarn "This version of Chromium has replaced a non-slotted ebuild."
- if [[ ${SLOT} != "stable" ]]; then
- ewarn "This channel has its own profile directory, so your existing profile will not be used."
- ewarn "To use your existing profile, either copy or move it to the new location."
- ewarn "See https://wiki.gentoo.org/wiki/Chromium#Profile_Directories for more information."
- ewarn ""
- fi
- ewarn "Any existing Progressive Web Apps (PWAs) will need to be reinstalled,"
- ewarn "or have the path in the desktop files updated to point to the new wrapper script."
- fi
- fi
-}
-
-eapply_wrapper () {
- if [ ! -z "${NODIE}" ]; then
- nonfatal eapply "$@"
- else
- eapply "$@"
- fi
-}
-
-git_wrapper () {
- if [ ! -z "${NODIE}" ]; then
- git "$@"
- else
- git "$@" || die
- fi
-}
-
-filter_wrapper () {
- einfo "Applying ${i##*/}"
- #? fuzz factor of 3 is OK?
- if [ ! -z "${NODIE}" ]; then
- filterdiff -p1 "${@:2}" < "$1" | patch -F 3 -p1
- else
- filterdiff -p1 "${@:2}" < "$1" | patch -F 3 -p1 || die
- fi
-}
diff --git a/www-client/ungoogled-chromium/ungoogled-chromium-150.0.7871.186_p1.ebuild b/www-client/ungoogled-chromium/ungoogled-chromium-150.0.7871.186_p1.ebuild
deleted file mode 100644
index 541dfd3abb06..000000000000
--- a/www-client/ungoogled-chromium/ungoogled-chromium-150.0.7871.186_p1.ebuild
+++ /dev/null
@@ -1,2528 +0,0 @@
-# Copyright 2009-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-# Use following environment variables to customise the build
-# EXTRA_GN — pass extra options to gn
-# NINJAOPTS="-k0 -j8" useful to populate ccache even if ebuild is still failing
-# UGC_SKIP_PATCHES — space-separated list of patches to skip
-# UGC_KEEP_BINARIES — space-separated list of binaries to keep
-# UGC_SKIP_SUBSTITUTION — space-separated list of files to skip domain substitution
-
-# USE=bundled-toolchain is intended for users who want to use the same toolchain
-# as the upstream releases. It's also a good fallback in case we fall behind
-# and need to get a release out quickly (less likely with `dev` in-tree).
-# We can't rely on it as a default since the toolchain is only shipped for x86-64;
-# other architectures will need to use system toolchain.
-
-# Since m133 we are using CI-generated tarballs from
-# https://github.com/chromium-linux-tarballs/chromium-tarballs/
-
-# These are bit-for-bit identical to the official releases, but are built
-# using an external CI system that we have some control over, in case
-# issues pop up again with official tarball generation.
-
-GN_MIN_VER=0.2374
-# chromium-tools/get-chromium-toolchain-strings.py (or just use Chromicler)
-# Node for M145+ should be 24.12.0 but that's not packaged in Gentoo yet. See #969145
-TEST_FONT="9c07d19d9c5ee1ff94f717e6fb17e0c8c354e6f9"
-BUNDLED_CLANG_VER="llvmorg-23-init-10931-g20b6ec66-11"
-BUNDLED_RUST_VER="4c4205163abcbd089150.0.7871.18148b3efab796c543ba1ea687-5"
-RUST_SHORT_HASH=${BUNDLED_RUST_VER:0:10}-${BUNDLED_RUST_VER##*-}
-NODE_VER="24.16.0-r1"
-ESBUILD_VER="0.25.1"
-ROLLUP_VER="4.57.1" # currently manual.
-
-CHROMIUM_LANGS="af am ar as az be bg bn bs ca cs cy da de el en-GB es es-419 et eu fa fi fil
- fr fr-CA gl gu he hi hr hu hy id is it ja ka kk km kn ko ky lo lt lv mk ml mn mr ms my
- nb ne nl or pa pl pt-BR pt-PT ro ru si sk sl sq sr sr-Latn sv sw ta te th tr uk ur uz
- vi zh-CN zh-HK zh-TW zu"
-
-#UGC_COMMIT_ID="fd0378e4f20fa09e21b09beca71573d435d787cf"
-# UGC_PR_COMMITS=(
-# c917e096342e5b90eeea91ab1f8516447c8756cf
-# 5794e9d12bf82620d5f24505798fecb45ca5a22d
-# )
-
-CROMITE_COMMIT_ID="cb3baf14f52eb4365d017f640f85310735c19b79"
-
-declare -A CHROMIUM_COMMITS=(
-# ["fcfb1a42813f1e9d8babedc7bb2e0f06101a3151"]="." #148+
- ["-cf94ed446320d35c8613ed9b3ffb6e6a61bfcb5f"]="."
-# # ["-37c28a19804e47a68eabf3cf882a310689fc325b"]="." #disable style check for cromite
-# # ["cd5a0df905a28faa89ff2a4ab44f893f84dc4487"]="net/third_party/quiche/src"
-)
-
-LLVM_COMPAT=( 21 22 23 )
-PYTHON_COMPAT=( python3_{13..14} )
-PYTHON_REQ_USE="xml(+)"
-RUST_MIN_VER=1.91.0
-RUST_NEEDS_LLVM="yes please"
-RUST_OPTIONAL="yes" # Not actually optional, but we don't need system Rust (or LLVM) with USE=bundled-toolchain
-RUST_REQ_USE="rustfmt" # Upstream run rustfmt on bindgen output, so we need it to be available.
-
-inherit check-reqs chromium-2 desktop flag-o-matic llvm-r1 multiprocessing ninja-utils pax-utils
-inherit python-any-r1 readme.gentoo-r1 rust systemd toolchain-funcs xdg-utils
-
-DESCRIPTION="Modifications to Chromium for removing Google integration and enhancing privacy"
-HOMEPAGE="https://github.com/ungoogled-software/ungoogled-chromium"
-PPC64_HASH="a85b64f07b489b8c6fdb13ecf79c16c56c560fc6"
-PATCH_V="${PV%%\.*}-1"
-COPIUM_COMMIT="b00f26bb5e0781020da5f830981472a142c6baf1"
-SRC_URI="https://github.com/chromium-linux-tarballs/chromium-tarballs/releases/download/${PV/_*}/chromium-${PV/_*}-linux.tar.xz
- https://deps.gentoo.zip/www-client/chromium/rollup-wasm-node-${ROLLUP_VER}.tgz
- https://gitlab.com/Matt.Jolly/chromium-patches/-/archive/${PATCH_V}/chromium-patches-${PATCH_V}.tar.bz2
- !bundled-toolchain? (
- https://codeberg.org/selfisekai/copium/archive/${COPIUM_COMMIT}.tar.gz
- -> chromium-patches-copium-${COPIUM_COMMIT:0:10}.tar.gz
- )
- bundled-toolchain? (
- https://commondatastorage.googleapis.com/chromium-browser-clang/Linux_x64/clang-${BUNDLED_CLANG_VER}.tar.xz
- -> chromium-clang-${BUNDLED_CLANG_VER}.tar.xz
- https://commondatastorage.googleapis.com/chromium-browser-clang/Linux_x64/rust-toolchain-${BUNDLED_RUST_VER}-${BUNDLED_CLANG_VER%-*}.tar.xz
- -> chromium-rust-toolchain-${RUST_SHORT_HASH}-${BUNDLED_CLANG_VER%-*}.tar.xz
- )
- test? (
- https://chromium-fonts.storage.googleapis.com/${TEST_FONT} -> chromium-testfonts-${TEST_FONT:0:10}.tar.gz
- )
- ppc64? (
- https://gitlab.raptorengineering.com/raptor-engineering-public/chromium/openpower-patches/-/archive/${PPC64_HASH}/openpower-patches-${PPC64_HASH}.tar.bz2 -> chromium-openpower-${PPC64_HASH:0:10}.tar.bz2
- )
-"
-
-# Gentoo tarball:
-# https://chromium-tarballs.distfiles.gentoo.org/chromium-${PV/_*}.tar.xz -> chromium-${PV/_*}-gentoo.tar.xz
-
-# chromium-linux-tarballs
-# https://github.com/chromium-linux-tarballs/chromium-tarballs/releases/download/${PV/_*}/chromium-${PV/_*}-linux.tar.xz
-
-# Official tarball:
-# https://commondatastorage.googleapis.com/chromium-browser-official/chromium-${PV/_*}${LITE_TARBALL:+-lite}.tar.xz
-
-# https://gitweb.gentoo.org/proj/chromium-tools.git/tree/get-chromium-licences.py @ 145.0.7632.76
-LICENSE="Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD BSD-2 Base64 Boost-1.0 CC-BY-3.0 CC-BY-4.0 Clear-BSD FFT2D FTL"
-LICENSE+=" IJG ISC LGPL-2 LGPL-2.1 MIT MPL-1.1 MPL-2.0 Ms-PL PSF-2 SGI-B-2.0 SSLeay SunSoft Unicode-3.0"
-LICENSE+=" Unicode-DFS-2015 Unlicense UoI-NCSA ZLIB libtiff openssl"
-LICENSE+=" cromite? ( GPL-3 )"
-
-SLOT="stable"
-KEYWORDS="amd64 ~arm64 ~ppc64 ~x86"
-
-IUSE_SYSTEM_LIBS="abseil-cpp av1 brotli crc32c double-conversion ffmpeg +harfbuzz icu jsoncpp +libusb libvpx +openh264 openjpeg re2 snappy woff2 +zstd"
-IUSE="+X bindist bluetooth bundled-toolchain cfi convert-dict cups custom-cflags debug ffmpeg-chromium enable-driver gtk4 hangouts headless kerberos +libcxx nvidia +official optimize-thinlto optimize-webui override-data-dir pax-kernel pgo"
-IUSE+=" +proprietary-codecs pulseaudio qt6 screencast selinux test thinlto cromite vaapi wayland widevine cpu_flags_ppc_vsx3"
-RESTRICT="
- !bindist? ( bindist )
- !test? ( test )
- arm64? ( test )
- !system-ffmpeg? ( proprietary-codecs? ( bindist ) )
- !system-openh264? ( bindist )
- cromite? ( bindist )"
-
-REQUIRED_USE="
- !headless? ( || ( X wayland ) )
- screencast? ( wayland )
- ffmpeg-chromium? ( bindist proprietary-codecs )
- optimize-thinlto? ( thinlto )
- cfi? ( thinlto )
- x86? ( !thinlto !widevine )
- debug? ( !official )
- vaapi? ( !system-av1 !system-libvpx )
-"
-
-UGC_PV="${PV/_p/-}"
-UGC_PF="${PN}-${UGC_PV}"
-UGC_URL="https://github.com/ungoogled-software/${PN}/archive/"
-
-if [ -z "$UGC_COMMIT_ID" ]; then
- UGC_URL="${UGC_URL}${UGC_PV}.tar.gz -> ${UGC_PF}.tar.gz"
- UGC_WD="${WORKDIR}/${UGC_PF}"
-else
- UGC_URL="${UGC_URL}${UGC_COMMIT_ID}.tar.gz -> ${PN}-${UGC_COMMIT_ID}.tar.gz"
- UGC_WD="${WORKDIR}/ungoogled-chromium-${UGC_COMMIT_ID}"
-fi
-
-SRC_URI+="${UGC_URL}
-"
-
-if [ ! -z "${UGC_PR_COMMITS[*]}" ]; then
- for i in "${UGC_PR_COMMITS[@]}"; do
- SRC_URI+="https://github.com/ungoogled-software/${PN}/commit/$i.patch?full_index=true -> ${PN}-$i.patch
- "
- done
-fi
-
-if [ ! -z "${CHROMIUM_COMMITS[*]}" ]; then
- # for i in "${CHROMIUM_COMMITS[@]}"; do
- for i in "${!CHROMIUM_COMMITS[@]}"; do
- if [[ ${CHROMIUM_COMMITS[$i]} =~ webrtc ]]; then
- #TODO: is it safe to use this mirror?
- SRC_URI+="https://github.com/webrtc-mirror/webrtc/commit/${i/-}.patch?full_index=true -> webrtc-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ angle ]]; then
- SRC_URI+="https://github.com/google/angle/commit/${i/-}.patch?full_index=true -> angle-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ quiche ]]; then
- SRC_URI+="https://github.com/google/quiche/commit/${i/-}.patch?full_index=true -> quiche-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ dawn ]]; then
- SRC_URI+="https://github.com/google/dawn/commit/${i/-}.patch?full_index=true -> dawn-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ perfetto ]]; then
- SRC_URI+="https://github.com/google/perfetto/commit/${i/-}.patch?full_index=true -> perfetto-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ink ]]; then
- SRC_URI+="https://github.com/google/ink/commit/${i/-}.patch?full_index=true -> ink-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ vulkan-utility-libraries ]]; then
- SRC_URI+="https://github.com/KhronosGroup/Vulkan-Utility-Libraries/commit/${i/-}.patch?full_index=true -> vulkan-utility-libraries-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ruy ]]; then
- SRC_URI+="https://github.com/google/ruy/commit/${i/-}.patch?full_index=true -> ruy-${i/-}.patch
- "
- else
- SRC_URI+="https://github.com/chromium/chromium/commit/${i/-}.patch?full_index=true -> chromium-${i/-}.patch
- "
- fi
- done
-fi
-
-SRC_URI+="cromite? ( https://github.com/uazo/cromite/archive/${CROMITE_COMMIT_ID}.tar.gz -> cromite-${CROMITE_COMMIT_ID}.tar.gz )
-"
-
-for i in ${IUSE_SYSTEM_LIBS}; do
- [[ $i =~ ^(\+)?(.*)$ ]]
- IUSE+=" ${BASH_REMATCH[1]}system-${BASH_REMATCH[2]}"
-done
-
-COMMON_X_DEPEND="
- x11-libs/libXcomposite:=
- x11-libs/libXcursor:=
- x11-libs/libXdamage:=
- x11-libs/libXfixes:=
- >=x11-libs/libXi-1.6.0:=
- x11-libs/libXrandr:=
- x11-libs/libXrender:=
- x11-libs/libXtst:=
- x11-libs/libxshmfence:=
-"
-
-# sys-libs/zlib: https://bugs.gentoo.org/930365; -ng is not compatible.
-# We _could_ use the bundled minizip, but that's against policy.
-COMMON_SNAPSHOT_DEPEND="
- system-icu? ( >=dev-libs/icu-78:= )
- system-abseil-cpp? ( >=dev-cpp/abseil-cpp-20260107.0 )
- system-brotli? ( >=app-arch/brotli-9999 )
- system-crc32c? ( dev-libs/crc32c )
- system-double-conversion? ( dev-libs/double-conversion )
- system-woff2? ( media-libs/woff2 )
- system-snappy? ( app-arch/snappy )
- system-jsoncpp? ( dev-libs/jsoncpp )
- system-openjpeg? ( media-libs/openjpeg:2= )
- system-re2? ( >=dev-libs/re2-0.2019.08.01:= )
- system-libvpx? ( >=media-libs/libvpx-1.13.0:=[postproc] )
- system-libusb? ( virtual/libusb:1 )
- cromite? ( dev-util/patchutils )
- >=dev-libs/libxml2-2.12.4:=[icu]
- dev-libs/nspr:=
- >=dev-libs/nss-3.26:=
- dev-libs/libxslt:=
- media-libs/fontconfig:=
- >=media-libs/freetype-2.11.0-r1:=
- system-harfbuzz? ( >=media-libs/harfbuzz-3:0=[icu(-)] )
- media-libs/libjpeg-turbo:=
- media-libs/libpng:=
- system-zstd? ( >=app-arch/zstd-1.5.5:= )
- >=media-libs/libwebp-0.4.0:=
- media-libs/mesa:=[gbm(+)]
- >=media-libs/openh264-2.6.0:=
- system-av1? (
- >=media-libs/dav1d-1.0.0:=
- >=media-libs/libaom-3.7.0:=
- )
- sys-libs/zlib:=
- !headless? (
- dev-libs/glib:2
- >=media-libs/alsa-lib-1.0.19:=
- media-video/pipewire:=
- pulseaudio? (
- || (
- media-libs/libpulse
- >=media-sound/apulse-0.1.9
- )
- )
- sys-apps/pciutils:=
- kerberos? ( virtual/krb5 )
- vaapi? ( >=media-libs/libva-2.7:=[X?,wayland?] )
- X? (
- x11-base/xorg-proto:=
- x11-libs/libX11:=
- x11-libs/libxcb:=
- x11-libs/libXext:=
- )
- x11-libs/libxkbcommon:=
- wayland? (
- screencast? ( media-video/pipewire:= )
- dev-libs/libffi:=
- dev-libs/wayland:=
- screencast? (
- media-video/pipewire:=
- || (
- sys-apps/xdg-desktop-portal-gnome
- sys-apps/xdg-desktop-portal-gtk
- kde-plasma/xdg-desktop-portal-kde
- gui-libs/xdg-desktop-portal-lxqt
- gui-libs/xdg-desktop-portal-wlr
- )
- )
- )
- )
-"
-
-COMMON_DEPEND="
- ${COMMON_SNAPSHOT_DEPEND}
- app-arch/bzip2:=
- dev-libs/expat:=
- system-ffmpeg? (
- >=media-video/ffmpeg-6.1:=
- >=media-libs/opus-1.3.1:=
- )
- net-misc/curl[ssl]
- sys-apps/dbus:=
- media-libs/flac:=
- sys-libs/zlib:=[minizip]
- !headless? (
- >=app-accessibility/at-spi2-core-2.46.0:2
- media-libs/mesa:=[X?,wayland?]
- virtual/udev
- x11-libs/cairo:=
- x11-libs/gdk-pixbuf:2
- x11-libs/pango:=
- cups? ( >=net-print/cups-1.3.11:= )
- qt6? ( dev-qt/qtbase:6[gui,widgets] )
- X? ( ${COMMON_X_DEPEND} )
- )
-"
-RDEPEND="${COMMON_DEPEND}
- !www-client/ungoogled-chromium:0
- >=www-client/chromium-common-2
- !headless? (
- || (
- x11-libs/gtk+:3[X?,wayland?]
- gui-libs/gtk:4[X?,wayland?]
- )
- qt6? ( dev-qt/qtbase:6[X?,wayland?] )
- )
- virtual/ttf-fonts
- selinux? ( sec-policy/selinux-chromium )
- bindist? (
- ffmpeg-chromium? ( media-video/ffmpeg-chromium:${PV%%\.*} )
- )
- !override-data-dir? (
- !www-client/chromium:${SLOT}
- !www-client/cromite:${SLOT}[-override-data-dir]
- )
-"
-# For M149+ pipewire is a mandatory build-time dependency, but it's optional at runtime for most configurations.
-DEPEND="${COMMON_DEPEND}
- !headless? (
- media-video/pipewire
- gtk4? ( gui-libs/gtk:4[X?,wayland?] )
- !gtk4? ( x11-libs/gtk+:3[X?,wayland?] )
- )
-"
-
- # pgo? ( >=llvm-core/clang-22.0.0_pre20260106 >=llvm-core/lld-22.0.0_pre20260106 )
-BDEPEND="
- ${COMMON_SNAPSHOT_DEPEND}
- ${PYTHON_DEPS}
- $(python_gen_any_dep '
- dev-python/setuptools[${PYTHON_USEDEP}]
- ')
- >=app-arch/gzip-1.7
- !headless? (
- qt6? ( dev-qt/qtbase:6 )
- )
- !bundled-toolchain? ( $(llvm_gen_dep '
- llvm-core/clang:${LLVM_SLOT}
- llvm-core/llvm:${LLVM_SLOT}
- cfi? ( llvm-runtimes/clang-runtime:${LLVM_SLOT}[sanitize] )
- official? (
- !ppc64? ( llvm-runtimes/compiler-rt-sanitizers:${LLVM_SLOT}[cfi] )
- ) ')
- || (
- $(llvm_gen_dep 'llvm-core/lld:${LLVM_SLOT}')
- >=sys-devel/mold-2.41.0
- )
- ${RUST_DEPEND}
- )
- >=dev-util/bindgen-0.72.1
- >=dev-build/gn-${GN_MIN_VER}
- app-alternatives/ninja
- dev-lang/perl
- >=dev-util/gperf-3.2
- dev-util/esbuild:${ESBUILD_VER}
- dev-vcs/git
- >=net-libs/nodejs-${NODE_VER}[inspector]
- sys-apps/hwdata
- >=sys-devel/bison-2.4.3
- sys-devel/flex
- virtual/pkgconfig
- x11-misc/xdg-utils
-"
-
-if ! has chromium_pkg_die ${EBUILD_DEATH_HOOKS}; then
- EBUILD_DEATH_HOOKS+=" chromium_pkg_die";
-fi
-
-DISABLE_AUTOFORMATTING="yes"
-DOC_CONTENTS="
-Some web pages may require additional fonts to display properly.
-Try installing some of the following packages if some characters
-are not displayed properly:
-- media-fonts/arphicfonts
-- media-fonts/droid
-- media-fonts/ipamonafont
-- media-fonts/noto
-- media-fonts/ja-ipafonts
-- media-fonts/takao-fonts
-- media-fonts/wqy-microhei
-- media-fonts/wqy-zenhei
-
-To fix broken icons on the Downloads page, you should install an icon
-theme that covers the appropriate MIME types, and configure this as your
-GTK+ icon theme.
-
-For native file dialogs in KDE, install kde-apps/kdialog.
-
-To make password storage work with your desktop environment you may
-have install one of the supported credentials management applications:
-- app-crypt/libsecret (GNOME)
-- kde-frameworks/kwallet (KDE)
-If you have one of above packages installed, but don't want to use
-them in Chromium, then add --password-store=basic to CHROMIUM_FLAGS
-in /etc/chromium/default.
-"
-
-S="${WORKDIR}/chromium-${PV/_*}"
-
-python_check_deps() {
- python_has_version "dev-python/setuptools[${PYTHON_USEDEP}]"
-}
-
-pre_build_checks() {
- # Check build requirements: bugs #471810, #541816, #914220
- # We're going to start doing maths here on the size of an unpacked source tarball,
- # this should make updates easier as chromium continues to balloon in size.
- # xz -l /var/cache/distfiles/chromium-${PV}*.tar.xz
- local base_disk=9 # Round up
- use test && base_disk=$((base_disk + 5))
- local extra_disk=1 # Always include a little extra space
- local memory=4
- tc-is-cross-compiler && extra_disk=$((extra_disk * 2))
- if tc-is-lto || use pgo; then
- memory=$((memory * 2 + 1))
- tc-is-cross-compiler && extra_disk=$((extra_disk * 2)) # Double the requirements
- use pgo && extra_disk=$((extra_disk + 4))
- fi
- if is-flagq '-g?(gdb)?([1-9])'; then
- if use custom-cflags; then
- extra_disk=$((extra_disk + 5))
- fi
- memory=$((memory * 2))
- fi
- local CHECKREQS_MEMORY="${memory}G"
- local CHECKREQS_DISK_BUILD="$((base_disk + extra_disk))G"
- check-reqs_${EBUILD_PHASE_FUNC}
-}
-
-pkg_pretend() {
- if [[ ${MERGE_TYPE} != binary ]]; then
- # The pre_build_checks are all about compilation resources, no need to run it for a binpkg
- pre_build_checks
- fi
-
- if use headless; then
- local headless_unused_flags=("cups" "kerberos" "pulseaudio" "qt6" "vaapi" "wayland")
- for myiuse in ${headless_unused_flags[@]}; do
- use ${myiuse} && ewarn "Ignoring USE=${myiuse}, USE=headless is set."
- done
- fi
-
- if ! use bindist && use ffmpeg-chromium; then
- ewarn "Ignoring USE=ffmpeg-chromium, USE=bindist is not set."
- fi
- if use libcxx; then
- ewarn
- ewarn "Building with libcxx, please be aware that system-*"
- ewarn "and some other c++ dependencies need to be compiled"
- ewarn "with the same c++ library as ungoogled-chromium itself"
- ewarn "dev-libs/jsoncpp is most problematic, see #58 #49 #119 for details"
- ewarn "Simplest solution would be to disable corresponding system-* flags"
- ewarn
- fi
- if use cfi; then
- ewarn
- ewarn "Building with cfi is only possible if building with -stdlib=libc++"
- ewarn "Make sure all dependencies are also built this way, see #40"
- ewarn
- fi
- if use cromite; then
- ewarn
- ewarn "Cromite patches are very experimental and unstable"
- ewarn "Please consider testing them and giving feedback upstream:"
- ewarn "https://github.com/uazo/cromite/issues"
- ewarn "Not all patches are applied, let me know if others should be considered too"
- ewarn
- fi
-}
-
-pkg_setup() {
- if [[ ${MERGE_TYPE} != binary ]]; then
- # The pre_build_checks are all about compilation resources, no need to run it for a binpkg
- pre_build_checks
-
- # We haven't massaged any CFLAGS yet, so we want to do this before we force CC/CXX to prevent warnings.
- local want_lto="false"
- tc-is-lto && want_lto="true"
-
- # The linux:unbundle toolchain in GN grabs CC, CXX, CPP (etc) from the environment
- # We'll set these to clang here then use llvm-utils functions to very explicitly set these
- # to a sane value.
- # This is effectively the 'force-clang' path if GCC support is re-added.
- if use !bundled-toolchain; then
- llvm-r1_pkg_setup
- rust_pkg_setup
-
- # Forcing clang; respect llvm_slot_x to enable selection of impl via LLVM_COMPAT
- AR=llvm-ar
- CPP="${CHOST}-clang++-${LLVM_SLOT} -E"
- NM=llvm-nm
- CC="${CHOST}-clang-${LLVM_SLOT}"
- CXX="${CHOST}-clang++-${LLVM_SLOT}"
- fi
-
- # LTO in Chromium means LLVM ThinLTO, if GCC support is re-added
- # We'll need to handle that here too.
- use_lto="false"
- local lto_usable="true"
- if [[ "$want_lto" == "true" ]]; then
- if use arm64 && [[ "${LLVM_SLOT}" -lt 22 ]]; then
- einfo "LTO is broken with LLVM 21 on arm64, ignoring CFLAGS."
- lto_usable="false"
- else
- use_lto="true"
- fi
- # We can rely on GN to do this for us; without this builds
- # take significantly longer with LTO enabled.
- filter-lto
- fi
-
- if [[ "$use_lto" == "false" ]] && use official && [[ "$lto_usable" == "true" ]]; then
- einfo "USE=official selected and LTO not detected."
- einfo "It is _highly_ recommended that LTO be enabled for performance reasons"
- einfo "and to be consistent with the upstream \"official\" build optimisations."
- fi
-
- if [[ "$use_lto" == "false" ]] && use test; then
- die "Tests require CFI which requires LTO"
- fi
-
- export use_lto
-
- if tc-is-cross-compiler; then
- use pgo && die "The pgo USE flag cannot be used when cross-compiling"
- CPP="${CBUILD}-clang++-${LLVM_SLOT} -E"
- fi
-
- # Sanity checks for development convenience
- if ver_test $(gn --version || die) -lt ${GN_MIN_VER}; then
- die "dev-build/gn >= ${GN_MIN_VER} is required to build this Chromium"
- fi
-
- # Sometimes, when adding a new LLVM slot, devs (me) forget to install an appropriate lld.
- if tc-ld-is-lld; then
- local lld_ver=$(ld.lld --version | awk '{split($2,a,"."); print a[1]}' || die "Failed to check lld version")
- if [[ ${lld_ver} -lt ${LLVM_SLOT} ]]; then
- die "Your lld version (${lld_ver}) is too old for the selected LLVM slot (${LLVM_SLOT}). Please install a newer lld or select an older LLVM slot."
- fi
- fi
- fi
-
- chromium_suid_sandbox_check_kernel_config
-}
-
-src_unpack() {
- # # Here be dragons!
- # local XCLD="--exclude=chromium-${PV/_*}/third_party/instrumented_libs \
- # --exclude=chromium-${PV/_*}/third_party/llvm \
- # --exclude=chromium-${PV/_*}/third_party/llvm-build \
- # --exclude=chromium-${PV/_*}/third_party/node/linux \
- # --exclude=chromium-${PV/_*}/third_party/rust-src \
- # --exclude=chromium-${PV/_*}/third_party/rust-toolchain \
- # --exclude=chromium-${PV/_*}/build/linux/debian_bullseye_i386-sysroot \
- # --exclude=chromium-${PV/_*}/build/linux/debian_bullseye_amd64-sysroot \
- # --exclude=chromium-${PV/_*}/third_party/angle/third_party/VK-GL-CTS \
- # "
-
- # if ! use libcxx ; then
- # XCLD+=" --exclude=chromium-${PV/_*}/third_party/libc++"
- # fi
-
- # if ! use pgo ; then
- # XCLD+=" --exclude=chromium-${PV/_*}/chrome/build/pgo_profiles"
- # fi
-
- # einfo "Unpacking chromium-${PV/_*}.tar.xz to ${WORKDIR}"
- # # Gentoo tarball:
- # # tar ${XCLD} -xf "${DISTDIR}/chromium-${PV/_*}-gentoo.tar.xz" -C "${WORKDIR}" || die
- # tar ${XCLD} -xf "${DISTDIR}/chromium-${PV/_*}${LITE_TARBALL:+-lite}.tar.xz" -C "${WORKDIR}" || die
-
- # unpack ${UGC_URL#*->}
- # # unpack chromium-patches-${PATCH_V}.tar.bz2
- # # Warned you!
-
- unpack chromium-${PV/_*}-linux.tar.xz
- unpack chromium-patches-${PATCH_V}.tar.bz2
- # These should only be required when we're not using the official toolchain
- if use !bundled-toolchain; then
- unpack chromium-patches-copium-${COPIUM_COMMIT:0:10}.tar.gz
- fi
-
- if use test; then
- # This just contains a bunch of font files that need to be unpacked (or moved) to the correct location.
- local testfonts_dir="${WORKDIR}/chromium-${PV/_*}/third_party/test_fonts/test_fonts"
- local testfonts_tar="${DISTDIR}/chromium-testfonts-${TEST_FONT:0:10}.tar.gz"
- einfo "Unpacking test fonts ..."
- tar xf "${testfonts_tar}" -C "${testfonts_dir}" || die "Failed to unpack testfonts"
- fi
-
- # We need to manually unpack this since M126 else we'd unpack one toolchain over the other.
- # Since we're doing that anyway let's unpack to sensible locations to make symlink creation easier.
- if use bundled-toolchain; then
- einfo "Unpacking bundled Clang ..."
- mkdir -p "${WORKDIR}"/clang || die "Failed to create clang directory"
- tar xf "${DISTDIR}/chromium-clang-${BUNDLED_CLANG_VER}.tar.xz" -C "${WORKDIR}/clang" || die "Failed to unpack Clang"
- einfo "Unpacking bundled Rust ..."
- local rust_dir="${WORKDIR}/rust-toolchain"
- mkdir -p "${rust_dir}" || die "Failed to create rust toolchain directory"
- tar xf "${DISTDIR}/chromium-rust-toolchain-${RUST_SHORT_HASH}-${BUNDLED_CLANG_VER%-*}.tar.xz" -C "${rust_dir}" ||
- die "Failed to unpack Rust"
- fi
-
- if use ppc64; then
- unpack chromium-openpower-${PPC64_HASH:0:10}.tar.bz2
- fi
-
- # This is a dirty hack, but we need rollup to build successfully and it's proving to be challenging
- # to build locally due to deps
- unpack rollup-wasm-node-${ROLLUP_VER}.tgz
-
- if use cromite; then
- unpack cromite-${CROMITE_COMMIT_ID}.tar.gz
- fi
-
- unpack ${UGC_URL#*->}
-}
-
-remove_compiler_builtins() {
- # We can't use the bundled compiler builtins with the system toolchain
- # We used to `grep` then `sed`, but it was indirect. Combining the two into a single
- # `awk` command is more efficient and lets us document the logic more clearly.
-
- local pattern=' configs += [ "//build/config/clang:compiler_builtins" ]'
- local target='build/config/compiler/BUILD.gn'
-
- local tmpfile
- tmpfile=$(mktemp) || die "Failed to create temporary file."
-
- if awk -v pat="${pattern}" '
- BEGIN {
- match_found = 0
- }
-
- # If the delete countdown is active, decrement it and skip to the next line.
- d > 0 { d--; next }
-
- # If the current line matches the pattern...
- $0 == pat {
- match_found = 1 # ...set our flag to true.
- d = 2 # Set delete counter for this line and the next two.
- prev = "" # Clear the buffered previous line so it is not printed.
- next
- }
-
- # For any other line, print the buffered previous line.
- NR > 1 { print prev }
-
- # Buffer the current line to be printed on the next cycle.
- { prev = $0 }
-
- END {
- # Print the last line if it was not part of a deleted block.
- if (d == 0) { print prev }
-
- # If the pattern was never found, exit with a failure code.
- if (match_found == 0) {
- exit 1
- }
- }
- ' "${target}" > "${tmpfile}"; then
- # AWK SUCCEEDED (exit code 0): The pattern was found and edited.
- # This is to avoid gawk's `-i inplace` option which users complain about.
- mv "${tmpfile}" "${target}"
- else
- # AWK FAILED (exit code 1): The pattern was not found.
- rm -f "${tmpfile}"
- die "Awk patch failed: Pattern not found in ${target}."
- fi
-}
-
-src_prepare() {
- # Calling this here supports resumption via FEATURES=keepwork
- python_setup
-
- # We'll fill this in as we go. Patches go in chromium-patches.
- local PATCHES=()
-
- rm "${WORKDIR}/chromium-patches-${PATCH_V}/common/cr131-unbundle-icu-target.patch"
- if ver_test "${RUST_SLOT}" -ge "1.95.0"; then
- rm "${WORKDIR}/chromium-patches-${PATCH_V}/rust/cr146-fix-botched-bytemuck-roll.patch"
- sed -i '/SupportedLaneCount/d' third_party/rust/chromium_crates_io/vendor/bytemuck-v1/src/zeroable.rs || die
- sed -i '/SupportedLaneCount/d' third_party/rust/chromium_crates_io/vendor/bytemuck-v1/src/pod.rs || die
- fi
-
- #cp -f ${WORKDIR}/chromium-patches-${PATCH_V}/*-compiler.patch "${T}/compiler.patch"
- ##cp -f ${FILESDIR}/chromium-147-compiler.patch "${T}/compiler.patch"
- #if ! use custom-cflags; then #See #25 #92
- # sed -i '/default_stack_frames/Q' "${T}/compiler.patch" || die
- #fi
-
- PATCHES+=( "${WORKDIR}/chromium-patches-${PATCH_V}/common/" )
- PATCHES+=( "${FILESDIR}/restore-x86-r4.patch" )
-
- # https://issues.chromium.org/issues/442698344
- # Unreleased fontconfig changed magic numbers and google have rolled to this version
- if has_version "<=media-libs/fontconfig-2.17.1"; then
- PATCHES+=( "${FILESDIR}/chromium-142-work-with-old-fontconfig.patch" )
- fi
-
- if use bundled-toolchain; then
- # We need to symlink the toolchain into the expected location
- einfo "Symlinking Clang toolchain to expected location ..."
- mkdir -p third_party/llvm-build/ || die "Failed to create llvm-build directory"
- # the 'Chromium Linux Tarballs' seem to already have 'Release+Asserts/{lib,bin}'; not sure if this is an
- # upstream change - we're using the same scripts to build, theoretically. We'll still attempt to create
- # llvm-build, but we'll rm Release+Asserts and symlink directly.
- if [[ -d third_party/llvm-build/Release+Asserts ]]; then
- rm -r third_party/llvm-build/Release+Asserts || die "Failed to remove third_party/llvm-build/Release+Asserts"
- fi
- ln -s "${WORKDIR}"/clang third_party/llvm-build/Release+Asserts || die "Failed to bundle Clang"
- einfo "Symlinking Rust toolchain to expected location ..."
- # As above, so below
- if [[ -d third_party/rust-toolchain ]]; then
- rm -r third_party/rust-toolchain || die "Failed to remove third_party/rust-toolchain"
- fi
- ln -s "${WORKDIR}"/rust-toolchain third_party/rust-toolchain || die "Failed to bundle rust"
- cp "${WORKDIR}"/rust-toolchain/VERSION \
- "${WORKDIR}"/rust-toolchain/INSTALLED_VERSION || die "Failed to set rust version"
- else
- # We don't need our toolchain patches if we're using the official toolchain
-
- # Copium patches go here.
- PATCHES+=(
- "${WORKDIR}/copium/cr143-libsync-__BEGIN_DECLS.patch"
- "${WORKDIR}/copium/cr149-unbundle-minizip-undo-unicode.patch"
- )
-
- # Automate conditional application of chromium-patches
- # The directory structure is expected to be something like:
- # chromium-patches-145/
- # ├── toolchain/
- # │ ├── cr123-foo.patch
- # │ └── cr135-bar.patch
- # ├── llvm/
- # │ ├── cr144-baz.patch
- # │ └── lt-23/
- # │ └── cr145-bleeding-edge-llvm-feature.patch
- # Where `lt-23` means "apply this patch if the LLVM version is less than 23".
- # Only categories in `slot_map` will be checked for version constraints.
- shopt -s nullglob
- local -A slot_map=( [llvm]="${LLVM_SLOT}" [rust]="${RUST_SLOT}" )
-
- for category in "${WORKDIR}/chromium-patches-${PATCH_V}"/*/; do
- local category_name="${category%/}"
- category_name="${category_name##*/}"
-
- # Skip arch-specific categories
- if [[ "${category_name}" == "ppc64le" ]]; then
- use ppc64 || continue
- fi
-
- # We applied common patches above, no need to apply them again here
- [[ "${category_name}" == "common" ]] && continue
-
- # Unconditional patches for this category
- local category_patches=( "${category}"*.patch )
- [[ ${#category_patches[@]} -gt 0 ]] && PATCHES+=( "${category}" )
-
- # Version-constrained subdirectories (e.g., llvm/lt-23/)
- for constraint_dir in "${category}"*/; do
- local dir_name="${constraint_dir%/}"
- dir_name="${dir_name##*/}"
- if [[ "${dir_name}" =~ ^lt-(.*)$ && -v slot_map[${category_name}] ]]; then
- ver_test "${slot_map[${category_name}]}" -lt "${BASH_REMATCH[1]}" &&
- PATCHES+=( "${constraint_dir}" )
- fi
- done
- done
-
- shopt -u nullglob
-
- # Strictly speaking this doesn't need to be gated (no bundled toolchain for ppc64); it keeps the logic together
- if use ppc64; then
- local patchset_dir="${WORKDIR}/openpower-patches-${PPC64_HASH}/patches"
- # patch causes build errors on 4K page systems (https://bugs.gentoo.org/show_bug.cgi?id=940304)
- local page_size_patch="ppc64le/third_party/use-sysconf-page-size-on-ppc64.patch"
- local isa_3_patch="ppc64le/core/baseline-isa-3-0.patch"
- # Apply the OpenPOWER patches (check for page size and isa 3.0)
- openpower_patches=( $(grep -E "^ppc64le|^upstream" "${patchset_dir}/series" | grep -v "${page_size_patch}" |
- grep -v "${isa_3_patch}" || die) )
- for patch in "${openpower_patches[@]}"; do
- PATCHES+=( "${patchset_dir}/${patch}" )
- done
- if [[ $(getconf PAGESIZE) == 65536 ]]; then
- PATCHES+=( "${patchset_dir}/${page_size_patch}" )
- fi
- # We use vsx3 as a proxy for 'want isa3.0' (POWER9)
- if use cpu_flags_ppc_vsx3 ; then
- PATCHES+=( "${patchset_dir}/${isa_3_patch}" )
- fi
- fi
-
- remove_compiler_builtins
-
- # We can't rely on the eselect'd Rust to actually include rustfmt, so we'll point to the selected slot specifically.
- local suffix=""
- if [[ "${RUST_TYPE}" == "binary" ]]; then
- suffix="-bin-${RUST_SLOT}"
- else
- suffix="-${RUST_SLOT}"
- fi
- sed -i "s|/bin/rustfmt|/bin/rustfmt${suffix}|g" build/rust/rust_bindgen_generator.gni ||
- die "Failed to update rustfmt path"
-
- fi
-
- # Do this before we apply patches since (e.g.) ppc64 needs to patch rollup and it's easier in ${S}
- einfo "Moving rollup wasm-node package into place ..."
- mkdir -p third_party/devtools-frontend/src/node_modules/@rollup/wasm-node ||
- die "Failed to create node_modules/@rollup/wasm-node"
- mv "${WORKDIR}"/package/* third_party/devtools-frontend/src/node_modules/@rollup/wasm-node ||
- die "Failed to move rollup package"
-
- if [ ! -z "${CHROMIUM_COMMITS[*]}" ]; then
- # for i in "${CHROMIUM_COMMITS[@]}"; do
- for i in "${!CHROMIUM_COMMITS[@]}"; do
- if [[ ${CHROMIUM_COMMITS[$i]} =~ webrtc ]]; then
- patch_prefix="webrtc"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ angle ]]; then
- patch_prefix="angle"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ quiche ]]; then
- patch_prefix="quiche"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ dawn ]]; then
- patch_prefix="dawn"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ perfetto ]]; then
- patch_prefix="perfetto"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ink ]]; then
- patch_prefix="ink"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ vulkan-utility-libraries ]]; then
- patch_prefix="vulkan-utility-libraries"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ruy ]]; then
- patch_prefix="ruy"
- else
- patch_prefix="chromium"
- fi
- pushd "${CHROMIUM_COMMITS[$i]}" > /dev/null || die
- if [[ $i = -* ]]; then
- einfo "Reverting ${patch_prefix}-${i/-}.patch"
- git_wrapper apply -R --exclude="*unittest.cc" --exclude="DEPS" \
- -p1 < "${DISTDIR}/${patch_prefix}-${i/-}.patch"
- else
- einfo "Applying ${patch_prefix}-${i/-}.patch"
- git_wrapper apply --exclude="*unittest.cc" --exclude="DEPS" \
- -p1 < "${DISTDIR}/${patch_prefix}-${i/-}.patch"
- fi
- popd > /dev/null || die
- done
- fi
-
- if ! use bluetooth ; then
- PATCHES+=(
- "${FILESDIR}/disable-bluez-r7.patch"
- )
- fi
-
- if use convert-dict ; then
- PATCHES+=(
- "${FILESDIR}/chromium-ucf-dict-utility-r3.patch"
- )
- fi
-
- if ! use libcxx ; then
- PATCHES+=(
- "${FILESDIR}/fix-wayland-oncecallback-copy.patch"
- )
- fi
-
- if use system-ffmpeg; then
- PATCHES+=(
- "${FILESDIR}/chromium-141-opus-mp3.patch"
- "${FILESDIR}/chromium-135-hevc.patch"
- )
- sed -i "\!AVFMT_FLAG_NOH264PARSE!d" media/filters/ffmpeg_glue.cc || die
- ewarn "You need to expose \"av_stream_get_first_dts\" in ffmpeg via user patch"
- fi
-
- if use system-av1; then
- PATCHES+=(
- "${FILESDIR}/chromium-system-av1.patch"
- )
- fi
-
- if use system-libvpx; then
- PATCHES+=(
- "${FILESDIR}/chromium-system-libvpx.patch"
- )
- fi
-
- if use system-openjpeg ; then
- PATCHES+=(
- "${FILESDIR}/chromium-system-openjpeg-r4.patch"
- )
- fi
-
- # if use x86 ; then
- # #* Fixes a segfault in transport_security_state_generator
- # PATCHES+=(
- # "${FILESDIR}/fix-segfault-x86.patch"
- # )
- # fi
-
- # Testing all patches when NODIE is defined
- if [ ! -z "${NODIE}" ]; then
- for i in "${PATCHES[@]}"; do
- eapply_wrapper "$i"
- done
- nonfatal eapply_user
- else
- default
- fi
-
- if use cromite ; then
- BR_PA_PATH="${WORKDIR}/cromite-${CROMITE_COMMIT_ID}/build/patches"
-
- sed -i '/b\/components\/components_strings\.grd/,+10d' "${BR_PA_PATH}/Add-cromite-flags-support.patch" || die
- sed -i '/b\/chrome\/android\/java\/res\/xml\/privacy_preferences\.xml/,+13d' "${BR_PA_PATH}/Add-cromite-flags-support.patch" || die
- sed -i '/b\/android_webview\/support_library\/java\/src\/org\/chromium\/support_lib_glue/,+11d' "${BR_PA_PATH}/Client-hints-overrides.patch" || die
- sed -i '/webapps_strings.grdp" \/>/{s++webapps_strings.grdp" /><part file="cromite_components_strings_grd/placeholder.txt"/>+;h};${x;/./{x;q0};x;q1}' \
- components/components_strings.grd || die
-
- sed -i 's/absl::/std::/' "${BR_PA_PATH}/Add-a-proxy-configuration-page.patch" || die
-
- filterdiff -p1 "${BR_PA_PATH}/JIT-site-settings.patch" --exclude="content/browser/renderer_host/render_process_host_impl.cc" \
- > "${BR_PA_PATH}/JIT-site-settings.patch1"
- mv -f "${BR_PA_PATH}/JIT-site-settings.patch1" "${BR_PA_PATH}/JIT-site-settings.patch"
-
- BROMITE_PATCHES=(
- "${BR_PA_PATH}/bromite-build-utils.patch"
- "${BR_PA_PATH}/Battery-API-return-nothing.patch"
- "${BR_PA_PATH}/Multiple-fingerprinting-mitigations.patch"
- "${BR_PA_PATH}/Add-flag-to-configure-maximum-connections-per-host.patch"
- "${BR_PA_PATH}/Add-a-proxy-configuration-page.patch"
- "${BR_PA_PATH}/Enable-StrictOriginIsolation-and-SitePerProcess.patch"
- "${BR_PA_PATH}/Disable-requests-for-single-word-Omnibar-searches.patch"
- "${BR_PA_PATH}/Reduce-HTTP-headers-in-DoH-requests-to-bare-minimum.patch"
- "${BR_PA_PATH}/Client-hints-overrides.patch"
- "${BR_PA_PATH}/Disable-idle-detection.patch"
- "${BR_PA_PATH}/Disable-TLS-resumption.patch"
- "${BR_PA_PATH}/Remove-navigator.connection-info.patch"
-
- "${BR_PA_PATH}/AudioBuffer-AnalyserNode-fp-mitigations.patch"
- "${BR_PA_PATH}/Fonts-fingerprinting-mitigation.patch"
- "${BR_PA_PATH}/Content-settings-infrastructure.patch"
- "${BR_PA_PATH}/Add-autoplay-site-setting.patch"
- "${BR_PA_PATH}/Site-setting-for-images.patch"
- "${BR_PA_PATH}/JIT-site-settings.patch"
- "${BR_PA_PATH}/Add-webGL-site-setting.patch"
- "${BR_PA_PATH}/Add-webRTC-site-settings.patch"
- "${BR_PA_PATH}/Show-site-settings-for-cookies-javascript-and-ads.patch"
- "${BR_PA_PATH}/Viewport-Protection-flag.patch"
- "${BR_PA_PATH}/Revert-remove-allowscript-content-setting-secondary-url.patch"
- "${BR_PA_PATH}/Timezone-customization.patch"
- "${BR_PA_PATH}/Disable-speechSynthesis-getVoices-API.patch"
- "${BR_PA_PATH}/Remove-support-for-device-memory-and-cpu-recovery.patch"
- "${BR_PA_PATH}/Disable-Feeback-Collector.patch"
- "${BR_PA_PATH}/Disable-remote-altsvc-for-h3-connections.patch"
- "${BR_PA_PATH}/Add-cromite-flags-support.patch"
- "${BR_PA_PATH}/Enables-deactivation-of-the-js-debugger-statement.patch"
- )
- for i in "${BROMITE_PATCHES[@]}"; do
- if [[ "$i" =~ "Add-autoplay-site-setting.patch" ]] ||
- [[ "$i" =~ "JIT-site-settings.patch" ]] ||
- [[ "$i" =~ "Site-setting-for-images.patch" ]]; then
- einfo "Git binary patch: ${i##*/}"
- git_wrapper apply -p1 < "$i"
- else
- filter_wrapper "$i" --exclude="chrome/android/*"
- fi
- done
-
- #! conflicting patches
- sed -i '/browser_features.cc/,+17d' \
- "${UGC_WD}/patches/extra/ungoogled-chromium/add-flag-to-clear-data-on-exit.patch" || die
- sed -i 's$} // namespace features$BASE_FEATURE(kClearDataOnExit, "ClearDataOnExit", base::FEATURE_DISABLED_BY_DEFAULT);}$' \
- chrome/browser/browser_features.cc || die
- sed -i 's$} // namespace features$BASE_DECLARE_FEATURE(kClearDataOnExit);}$' \
- chrome/browser/browser_features.h || die
- sed -i 's$kChromeUIAboutHost,$kChromeUIAboutHost,"ungoogled-first-run",$' \
- chrome/common/webui_url_constants.cc || die
- sed -i '/chrome\/common\/webui_url_constants.cc/Q' \
- "${UGC_WD}/patches/extra/ungoogled-chromium/first-run-page.patch" || die
-
- #! normalise paths in py
- sed -i 's$os.path.dirname(include_file)$os.path.abspath(os.path.dirname(include_file))$' \
- build/bromite/gyp/cpp_bromite_include.py || die
- fi
-
- # if [[ ${LLVM_SLOT} == "19" ]]; then
- # # Upstream now hard depend on a feature that was added in LLVM 20.1, but we don't want to stabilise that yet.
- # # Do the temp file shuffle in case someone is using something other than `gawk`
- # {
- # awk '/config\("clang_warning_suppression"\) \{/ { print $0 " }"; sub(/clang/, "xclang"); print; next }
- # { print }' build/config/compiler/BUILD.gn > "${T}/build.gn" && \
- # mv "${T}/build.gn" build/config/compiler/BUILD.gn
- # } || die "Unable to disable warning suppression"
- # fi
-
- ## Not included in -lite tarballs, but we should check for it anyway.
- #if [[ -f third_party/node/linux/node-linux-x64/bin/node ]]; then
- # rm third_party/node/linux/node-linux-x64/bin/node || die
- #else
- # mkdir -p third_party/node/linux/node-linux-x64/bin || die
- #fi
- #ln -s "${EPREFIX}"/usr/bin/node third_party/node/linux/node-linux-x64/bin/node || die
-
- cp "${FILESDIR}/libusb.gn" build/linux/unbundle || die
- sed -i '/^REPLACEMENTS.*$/{s++REPLACEMENTS = {"libusb":"third_party/libusb/BUILD.gn",+;h};${x;/./{x;q0};x;q1}' \
- build/linux/unbundle/replace_gn_files.py || die
- sed -i '/^.*deps.*third_party\/jsoncpp.*$/{s++public_deps \+= [ "//third_party/jsoncpp" ]+;h};${x;/./{x;q0};x;q1}' \
- third_party/webrtc/rtc_base/BUILD.gn || die
-
- if use override-data-dir; then
- sed -i '/"chromium";/{s++"ungoogled-chromium";+;h};${x;/./{x;q0};x;q1}' \
- chrome/common/chrome_paths_linux.cc || die
- fi
-
- if use system-abseil-cpp; then
- eapply_wrapper "${FILESDIR}/chromium-147-system-abseil.patch"
-
- #! SFINAE mangling incompatibility between clang and gcc:
- #! https://github.com/llvm/llvm-project/issues/85656
- #! gcc: _ZN4absl12lts_202601074CordC1INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELi0EEEOT_
- #! clang: _ZN4absl12lts_202601074CordC1INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEETnNSt9enable_ifIXsr3std7is_sameIT_S8_EE5valueEiE4typeELi0EEEOSA_
- #! So, either this:
- eapply_wrapper "${FILESDIR}/chromium-141-system-abseil-cord.patch"
- #! or build with -fclang-abi-compat=17
-
- # cp -f /usr/include/absl/base/options.h third_party/abseil-cpp/absl/base/options.h
- # sed -i '/^#define ABSL_OPTION_USE_STD_ORDERING.*$/{s++#define ABSL_OPTION_USE_STD_ORDERING 1+;h};${x;/./{x;q0};x;q1}' \
- # third_party/abseil-cpp/absl/base/options.h || die
- fi
-
- #* Applying UGC PRs here
- if [ ! -z "${UGC_PR_COMMITS[*]}" ]; then
- pushd "${UGC_WD}" >/dev/null
- for i in "${UGC_PR_COMMITS[@]}"; do
- eapply_wrapper "${DISTDIR}/${PN}-$i.patch"
- done
- popd >/dev/null
- fi
-
- # From here we adapt ungoogled-chromium's patches to our needs
- local ugc_pruning_list="${UGC_WD}/pruning.list"
- local ugc_patch_series="${UGC_WD}/patches/series"
- local ugc_substitution_list="${UGC_WD}/domain_substitution.list"
-
- local ugc_unneeded=(
- # GN bootstrap
- extra/debian/gn/parallel
- # following Gentoo's Chromium
- core/ungoogled-chromium/build-with-wasm-rollup
- )
-
- if use cromite ; then
- einfo "Using fingerprinting patches from Cromite instead"
- ugc_unneeded+=(
- extra/bromite/fingerprinting-flags-client-rects-and-measuretext
- extra/bromite/flag-max-connections-per-host
- extra/bromite/flag-fingerprinting-canvas-image-data-noise
- extra/ungoogled-chromium/add-components-ungoogled
- extra/ungoogled-chromium/remove-pac-size-limit
- )
- fi
-
- # #* Temporary fix
- # sed -i "\!ios/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/icu/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/libjpeg_turbo/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/snappy/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/closure_compiler/!d" "${ugc_pruning_list}" || die
-
- # #* Didn't unpack them at the first place
- # sed -i "\!build/linux/debian_bullseye_i386-sysroot!d" "${ugc_pruning_list}" || die
- # sed -i "\!build/linux/debian_bullseye_amd64-sysroot!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/llvm-build!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/node/linux!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/rust-src!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/rust-toolchain!d" "${ugc_pruning_list}" || die
- # if ! use libcxx ; then
- # sed -i "\!third_party/libc!d" "${ugc_pruning_list}" || die
- # fi
- sed -i "s|debug('files|error('files|" \
- "${UGC_WD}/utils/prune_binaries.py" || die
- sed -i "\!third_party/node/linux!d" \
- "${UGC_WD}/utils/prune_binaries.py" || die
-
- local ugc_p ugc_dir
- for p in "${ugc_unneeded[@]}"; do
- einfo "Removing ${p}.patch"
- sed -i "\!${p}.patch!d" "${ugc_patch_series}" || die
- done
-
- if [ ! -z "${UGC_SKIP_PATCHES}" ]; then
- for p in ${UGC_SKIP_PATCHES}; do
- ewarn "Removing ${p}"
- sed -i "\!${p}!d" "${ugc_patch_series}" || die
- done
- fi
-
- if [ ! -z "${UGC_KEEP_BINARIES}" ]; then
- for p in ${UGC_KEEP_BINARIES}; do
- ewarn "Keeping binary ${p}"
- sed -i "\!${p}!d" "${ugc_pruning_list}" || die
- done
- fi
-
- if [ ! -z "${UGC_SKIP_SUBSTITUTION}" ]; then
- for p in ${UGC_SKIP_SUBSTITUTION}; do
- ewarn "No substitutions in ${p}"
- sed -i "\!${p}!d" "${ugc_substitution_list}" || die
- done
- fi
-
- ebegin "Pruning binaries"
- "${UGC_WD}/utils/prune_binaries.py" -q . "${UGC_WD}/pruning.list"
- eend $? || die
-
- ebegin "Applying ungoogled-chromium patches"
- "${UGC_WD}/utils/patches.py" -q apply . "${UGC_WD}/patches"
- eend $? || die
-
- ebegin "Applying domain substitution"
- "${UGC_WD}/utils/domain_substitution.py" -q apply -r "${UGC_WD}/domain_regex.list" -f "${UGC_WD}/domain_substitution.list" .
- eend $? || die
-
- # Sanity check esbuild version before we start removing files.
- # We _could_ patch the version check out - in theory esbuild upstream are being super conservative after
- # arch(AUR) packaged an `esbuild` binary and set ESBUILD_BINARY_PATH=/usr/bin/esbuild, causing much breakage,
- # but this is fine too and exactly matches what upstream are expecting.
- # https://github.com/evanw/esbuild/issues/2894
- local esbuild_js="${S}/third_party/devtools-frontend/src/node_modules/esbuild/lib/main.js"
- local found
- found=$(awk -F'"' '/if \(binaryVersion !==/ {print $2}' "${esbuild_js}")
- if [[ "${found}" != "${ESBUILD_VER}" ]]; then
- die "esbuild version mismatch: expected ${ESBUILD_VER}, found ${found}"
- fi
-
- elog "Removing bundled binaries from source tree ..."
- # Purge bundled ELF files: These are non-portable and will cause issues if used instead of system versions.
- # Use `--wasm` to also remove WebAssembly binaries, if desired - they're portable so shouldn't break builds.
- ${EPYTHON} "${FILESDIR}/bin-finder.py" --elf "${S}" | awk '{print $1}' | xargs rm -f ||
- die "Failed to remove bundled binaries"
-
- # And now we restore any that we actually need, from the host system
- local esbuild_path="${S}/third_party/devtools-frontend/src/third_party/esbuild"
- local -A restore_list=(
- ["/usr/bin/esbuild-${ESBUILD_VER}"]="${esbuild_path}/esbuild"
- ["/usr/bin/gperf"]="${S}/third_party/gperf/cipd/bin/gperf"
- ["/usr/bin/node"]="${S}/third_party/node/linux/node-linux-x64/bin/node"
- )
-
- for src in "${!restore_list[@]}"; do
- dst="${restore_list[${src}]}"
- if [[ -f "${src}" ]]; then
- einfo "Symlinking ${src} ..."
- # Make sure the parent dir exists; some tarballs don't include (e.g.) node's bindir
- mkdir -p "$(dirname "${dst}")" || die "Failed to create directory for ${dst}"
- ln -s "${src}" "${dst}" || die "Failed to symlink ${dst} from ${src}"
- if [[ ! -L "${dst}" || "$(readlink -f "${dst}")" != "${src}" ]]; then
- die "Symlink verification failed for ${dst} -> ${src}"
- fi
- else
- die "Expected to find ${src} to restore ${dst}, but it does not exist."
- fi
- done
-
- # adjust python interpreter version
- sed -i -e "s|\(^script_executable = \).*|\1\"${EPYTHON}\"|g" .gn || die
-
- # Use the system copy of hwdata's usb.ids; upstream is woefully out of date (2015!)
- sed 's|//third_party/usb_ids/usb.ids|/usr/share/hwdata/usb.ids|g' \
- -i services/device/public/cpp/usb/BUILD.gn || die "Failed to set system usb.ids path"
-
- # remove_bundled_libraries.py walks the source tree and looks for paths containing the substring 'third_party'
- # whitelist matches use the right-most matching path component, so we need to whitelist from that point down.
- local keeplibs=(
- base/third_party/cityhash
- )
- use system-double-conversion || keeplibs+=(
- base/third_party/double_conversion
- )
- keeplibs+=(
- base/third_party/icu
- base/third_party/nspr
- base/third_party/superfasthash
- base/third_party/symbolize
- base/third_party/xdg_user_dirs
- buildtools/third_party/libc++
- buildtools/third_party/libc++abi
- )
- use cromite && keeplibs+=(
- cromite_flags/third_party
- )
- keeplibs+=(
- net/third_party/mozilla_security_manager
- net/third_party/quic
- net/third_party/uri_template
- )
- use system-abseil-cpp || keeplibs+=(
- third_party/abseil-cpp
- )
- keeplibs+=(
- third_party/angle
- third_party/angle/src/common/third_party/xxhash
- third_party/angle/src/third_party/ceval
- )
- use nvidia || keeplibs+=(
- third_party/angle/src/third_party/libXNVCtrl
- )
- keeplibs+=(
- third_party/angle/src/third_party/volk
- third_party/anonymous_tokens
- third_party/apple_apsl
- third_party/axe-core
- third_party/bidimapper
- third_party/blink
- third_party/boringssl
- third_party/boringssl/src/third_party/fiat
- third_party/breakpad
- third_party/breakpad/breakpad/src/third_party/curl
- )
- use system-brotli || keeplibs+=(
- third_party/brotli
- )
- keeplibs+=(
- third_party/catapult
- third_party/catapult/common/py_vulcanize/third_party/rcssmin
- third_party/catapult/common/py_vulcanize/third_party/rjsmin
- third_party/catapult/third_party/beautifulsoup4-4.9.3
- third_party/catapult/third_party/html5lib-1.1
- third_party/catapult/third_party/polymer
- third_party/catapult/third_party/six
- third_party/catapult/third_party/typ
- third_party/catapult/tracing/third_party/d3
- third_party/catapult/tracing/third_party/gl-matrix
- third_party/catapult/tracing/third_party/jpeg-js
- third_party/catapult/tracing/third_party/jszip
- third_party/catapult/tracing/third_party/mannwhitneyu
- third_party/catapult/tracing/third_party/oboe
- third_party/catapult/tracing/third_party/pako
- third_party/ced
- third_party/cld_3
- third_party/closure_compiler
- )
- use libcxx && keeplibs+=(
- third_party/compiler-rt
- )
- keeplibs+=(
- third_party/content_analysis_sdk
- third_party/cpuinfo
- third_party/crabbyavif
- third_party/crashpad
- third_party/crashpad/crashpad/third_party/lss
- third_party/crashpad/crashpad/third_party/zlib
- )
- use system-crc32c || keeplibs+=(
- third_party/crc32c
- )
- keeplibs+=(
- third_party/cros_system_api
- third_party/d3
- third_party/dawn
- third_party/dawn/third_party/gn/webgpu-cts
- third_party/dawn/third_party/OpenGL-Registry
- third_party/dawn/third_party/renderdoc
- third_party/dawn/third_party/webgpu-headers
- third_party/depot_tools
- third_party/devscripts
- third_party/devtools-frontend
- third_party/devtools-frontend/src/front_end/third_party/acorn
- third_party/devtools-frontend/src/front_end/third_party/additional_readme_paths.json
- third_party/devtools-frontend/src/front_end/third_party/axe-core
- third_party/devtools-frontend/src/front_end/third_party/chromium
- third_party/devtools-frontend/src/front_end/third_party/codemirror
- third_party/devtools-frontend/src/front_end/third_party/csp_evaluator
- third_party/devtools-frontend/src/front_end/third_party/diff
- third_party/devtools-frontend/src/front_end/third_party/i18n
- third_party/devtools-frontend/src/front_end/third_party/intl-messageformat
- third_party/devtools-frontend/src/front_end/third_party/json5
- third_party/devtools-frontend/src/front_end/third_party/legacy-javascript
- third_party/devtools-frontend/src/front_end/third_party/lighthouse
- third_party/devtools-frontend/src/front_end/third_party/lit
- third_party/devtools-frontend/src/front_end/third_party/marked
- third_party/devtools-frontend/src/front_end/third_party/puppeteer
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/third_party/mitt
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/third_party/parsel-js
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/third_party/rxjs
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/third_party/urlpattern-polyfill
- third_party/devtools-frontend/src/front_end/third_party/source-map-scopes-codec
- third_party/devtools-frontend/src/front_end/third_party/third-party-web
- third_party/devtools-frontend/src/front_end/third_party/vscode.web-custom-data
- third_party/devtools-frontend/src/front_end/third_party/wasmparser
- third_party/devtools-frontend/src/front_end/third_party/web-vitals
- third_party/devtools-frontend/src/third_party
- third_party/dom_distiller_js
- third_party/dragonbox
- third_party/eigen3
- third_party/emoji-segmenter
- third_party/farmhash
- third_party/fast_float
- third_party/fdlibm
- third_party/federated_compute/chromium/fcp/confidentialcompute
- third_party/federated_compute/src/fcp/base
- third_party/federated_compute/src/fcp/confidentialcompute
- third_party/federated_compute/src/fcp/protos/confidentialcompute
- third_party/federated_compute/src/fcp/protos/federatedcompute
- third_party/fft2d
- third_party/flatbuffers
- third_party/fp16
- third_party/freetype
- third_party/fusejs
- third_party/fxdiv
- third_party/gemmlowp
- third_party/google_input_tools
- third_party/google_input_tools/third_party/closure_library
- third_party/google_input_tools/third_party/closure_library/third_party/closure
- third_party/googletest
- third_party/gperf # We symlink system gperf, but this will purge the symlink since we tidy up afterwards.
- third_party/highway
- third_party/hunspell
- third_party/hyphenation-patterns
- third_party/ink/src/ink/brush
- third_party/ink/src/ink/color
- third_party/ink/src/ink/geometry
- third_party/ink/src/ink/rendering
- third_party/ink/src/ink/rendering/skia/common_internal
- third_party/ink/src/ink/rendering/skia/native
- third_party/ink/src/ink/rendering/skia/native/internal
- third_party/ink/src/ink/strokes
- third_party/ink/src/ink/types
- third_party/inspector_protocol
- third_party/ipcz
- third_party/jinja2
- )
- use system-jsoncpp || keeplibs+=(
- third_party/jsoncpp
- )
- keeplibs+=(
- third_party/khronos
- third_party/lens_server_proto
- third_party/leveldatabase
- third_party/libaddressinput
- )
- use libcxx && keeplibs+=(
- third_party/libc++
- )
- keeplibs+=(
- third_party/libdrm
- third_party/libgav1
- third_party/libjingle
- third_party/libpfm4
- third_party/libphonenumber
- third_party/libpng
- third_party/libsecret
- third_party/libsrtp
- third_party/libsync
- third_party/libtess2/libtess2
- third_party/libtess2/src/Include
- third_party/libtess2/src/Source
- third_party/liburlpattern
- )
- use system-libusb || keeplibs+=(
- third_party/libusb
- )
- keeplibs+=(
- third_party/libva_protected_content
- )
- use system-libvpx || keeplibs+=(
- third_party/libvpx
- third_party/libvpx/source/libvpx/third_party/x86inc
- )
- keeplibs+=(
- third_party/libwebm
- third_party/libx11
- third_party/libxcb-keysyms
- third_party/libxml/chromium
- third_party/libyuv
- third_party/libzip
- third_party/lit
- )
- use libcxx && keeplibs+=(
- third_party/llvm-libc
- third_party/llvm-libc/src/shared/
- )
- keeplibs+=(
- third_party/lottie
- third_party/lss
- third_party/lzma_sdk
- third_party/mako
- third_party/markupsafe
- third_party/material_color_utilities
- third_party/metrics_proto
- third_party/minigbm
- third_party/ml_dtypes
- third_party/modp_b64
- third_party/nasm
- third_party/nearby
- third_party/neon_2_sse
- third_party/node
- third_party/oak/chromium/proto
- third_party/oak/chromium/proto/attestation
- third_party/omnibox_proto
- third_party/one_euro_filter
- third_party/openscreen
- third_party/openscreen/src/third_party/
- third_party/openscreen/src/third_party/tinycbor/src/src
- third_party/ots
- third_party/pdfium
- third_party/pdfium/third_party/agg23
- third_party/pdfium/third_party/bigint
- third_party/pdfium/third_party/freetype
- third_party/pdfium/third_party/lcms
- )
- use system-openjpeg || keeplibs+=(
- third_party/pdfium/third_party/libopenjpeg
- )
- keeplibs+=(
- third_party/pdfium/third_party/libtiff
- third_party/perfetto
- third_party/perfetto/protos/third_party/android
- third_party/perfetto/protos/third_party/chromium
- third_party/perfetto/protos/third_party/pprof
- third_party/perfetto/protos/third_party/primes
- third_party/perfetto/protos/third_party/simpleperf
- third_party/pffft
- third_party/ply
- third_party/polymer
- third_party/private_membership
- third_party/private-join-and-compute
- third_party/protobuf
- third_party/protobuf/third_party/utf8_range
- third_party/pthreadpool
- third_party/puffin
- third_party/pyjson5
- third_party/pyyaml
- third_party/rapidhash
- third_party/readability
- third_party/rnnoise
- third_party/rust
- third_party/ruy
- third_party/s2cellid
- third_party/search_engines_data
- third_party/securemessage
- third_party/selenium-atoms
- third_party/sentencepiece
- third_party/sentencepiece/src/third_party/darts_clone
- third_party/shell-encryption
- third_party/simdutf
- third_party/simplejson
- third_party/six
- third_party/skia
- third_party/skia/include/third_party/vulkan
- third_party/smhasher
- )
- use system-snappy || keeplibs+=(
- third_party/snappy
- )
- keeplibs+=(
- third_party/spirv-headers
- third_party/spirv-tools
- third_party/sqlite
- third_party/swiftshader
- third_party/swiftshader/third_party/astc-encoder
- third_party/swiftshader/third_party/llvm-subzero
- third_party/swiftshader/third_party/marl
- third_party/swiftshader/third_party/SPIRV-Headers/include/spirv
- third_party/swiftshader/third_party/SPIRV-Tools
- third_party/swiftshader/third_party/subzero
- third_party/tensorflow_models
- third_party/tensorflow-text
- third_party/tflite
- third_party/tflite/src/third_party/fft2d
- third_party/tflite/src/third_party/xla/third_party/tsl
- third_party/tflite/src/third_party/xla/xla/tsl/framework
- third_party/tflite/src/third_party/xla/xla/tsl/lib/random
- third_party/tflite/src/third_party/xla/xla/tsl/platform
- third_party/tflite/src/third_party/xla/xla/tsl/protobuf
- third_party/tflite/src/third_party/xla/xla/tsl/util
- third_party/ukey2
- third_party/utf
- third_party/vulkan
- third_party/wayland
- third_party/webdriver
- third_party/webgpu-cts
- third_party/webrtc
- third_party/webrtc/common_audio/third_party/ooura
- third_party/webrtc/common_audio/third_party/spl_sqrt_floor
- third_party/webrtc/modules/third_party/fft
- third_party/webrtc/modules/third_party/g711
- third_party/webrtc/modules/third_party/g722
- third_party/widevine
- )
- use system-woff2 || keeplibs+=(
- third_party/woff2
- )
- keeplibs+=(
- third_party/wuffs
- third_party/x11proto
- third_party/xcbproto
- third_party/xnnpack
- third_party/zlib/google
- third_party/zxcvbn-cpp
- url/third_party/mozilla
- v8/third_party/glibc
- v8/third_party/inspector_protocol
- v8/third_party/rapidhash-v8
- v8/third_party/siphash
- v8/third_party/utf8-decoder
- v8/third_party/v8
- v8/third_party/valgrind
-
- # gyp -> gn leftovers
- third_party/speech-dispatcher
- third_party/usb_ids
- )
-
- if use test; then
- keeplibs+=(
- third_party/breakpad/breakpad/src/processor
- third_party/fuzztest
- third_party/google_benchmark/src/include/benchmark
- third_party/google_benchmark/src/src
- third_party/test_fonts
- third_party/test_fonts/fontconfig
- third_party/test_fonts/test_fonts
- )
- fi
-
- # USE=system-*
- if ! use system-harfbuzz; then
- keeplibs+=( third_party/harfbuzz )
- fi
-
- if ! use system-ffmpeg; then
- keeplibs+=( third_party/ffmpeg third_party/opus )
- fi
-
- if ! use system-icu; then
- keeplibs+=( third_party/icu )
- fi
-
- if ! use system-zstd; then
- keeplibs+=( third_party/zstd )
- fi
-
- if ! use system-av1; then
- keeplibs+=(
- third_party/dav1d
- third_party/libaom
- third_party/libaom/source/libaom/third_party/fastfeat
- third_party/libaom/source/libaom/third_party/vector
- third_party/libaom/source/libaom/third_party/x86inc
- )
- fi
-
- if use libcxx; then
- keeplibs+=(
- third_party/libc++
- third_party/llvm-libc
- )
- fi
-
- if ! use system-openh264; then
- keeplibs+=( third_party/openh264 )
- fi
-
- if ! use system-re2; then
- keeplibs+=( third_party/re2 )
- fi
-
- # Arch-specific
- if use arm64 || use ppc64 ; then
- keeplibs+=( third_party/swiftshader/third_party/llvm-10.0 )
- fi
- # we need to generate ppc64 stuff because upstream does not ship it yet
- # it has to be done before unbundling.
- if use ppc64; then
- pushd third_party/libvpx >/dev/null || die
- mkdir -p source/config/linux/ppc64 || die
- # requires git and clang, bug #832803
- # Revert https://chromium.googlesource.com/chromium/src/+/b463d0f40b08b4e896e7f458d89ae58ce2a27165%5E%21/third_party/libvpx/generate_gni.sh
- # and https://chromium.googlesource.com/chromium/src/+/71ebcbce867dd31da5f8b405a28fcb0de0657d91%5E%21/third_party/libvpx/generate_gni.sh
- # since we're not in a git repo
- sed -i -e "s|^update_readme||g; s|clang-format|${EPREFIX}/bin/true|g; /^git -C/d; /git cl/d; /cd \$BASE_DIR\/\$LIBVPX_SRC_DIR/ign format --in-place \$BASE_DIR\/BUILD.gn\ngn format --in-place \$BASE_DIR\/libvpx_srcs.gni" \
- generate_gni.sh || die
- ./generate_gni.sh || die
- popd >/dev/null || die
-
- pushd third_party/ffmpeg >/dev/null || die
- cp libavcodec/ppc/h264dsp.c libavcodec/ppc/h264dsp_ppc.c || die
- cp libavcodec/ppc/h264qpel.c libavcodec/ppc/h264qpel_ppc.c || die
- popd >/dev/null || die
- fi
-
- # Sanity check keeplibs, on major version bumps it is often necessary to update this list
- # and this enables us to hit them all at once.
- # There are some entries that need to be whitelisted (TODO: Why? The file is understandable, the rest seem odd)
- whitelist_libs=(
- net/third_party/quic
- third_party/devtools-frontend/src/front_end/third_party/additional_readme_paths.json
- third_party/libjingle
- third_party/mesa
- third_party/skia/third_party/vulkan
- third_party/vulkan
- )
- local not_found_libs=()
- for lib in "${keeplibs[@]}"; do
- if [[ ! -d "${lib}" ]] && ! has "${lib}" "${whitelist_libs[@]}"; then
- not_found_libs+=( "${lib}" )
- fi
- done
-
- if [[ ${#not_found_libs[@]} -gt 0 ]]; then
- ewarn "The following \`keeplibs\` directories were not found in the source tree:"
- for lib in "${not_found_libs[@]}"; do
- ewarn " ${lib}"
- done
- fi
-
- keeplibs+=( third_party/ungoogled )
-
- # Remove most bundled libraries. Some are still needed.
- einfo "Unbundling third-party libraries ..."
- build/linux/unbundle/remove_bundled_libraries.py "${keeplibs[@]}" --do-remove || die
-
- # Interferes with our bundled clang path; we don't want stripped binaries anyway.
- sed -i -e 's|${clang_base_path}/bin/llvm-strip|/bin/true|g' \
- -e 's|${clang_base_path}/bin/llvm-objcopy|/bin/true|g' \
- build/linux/strip_binary.gni || die
-}
-
-src_configure() {
- # Calling this here supports resumption via FEATURES=keepwork
- python_setup
-
- # Bug 491582.
- export TMPDIR="${WORKDIR}/temp"
- mkdir -p -m 755 "${TMPDIR}" || die
-
- # https://bugs.gentoo.org/654216
- addpredict /dev/dri/ #nowarn
-
- # Use system-provided libraries.
- # TODO: freetype -- remove sources (https://bugs.chromium.org/p/pdfium/issues/detail?id=733).
- # TODO: use_system_hunspell (upstream changes needed).
- # TODO: use_system_protobuf (bug #525560).
- # TODO: use_system_sqlite (http://crbug.com/22208).
-
- # libevent: https://bugs.gentoo.org/593458
- local gn_system_libraries=(
- flac
- fontconfig
- freetype
- libjpeg
- libwebp
- libxml
- libxslt
- zlib
- )
- if use system-abseil-cpp; then
- gn_system_libraries+=(
- absl_algorithm
- absl_base
- absl_cleanup
- absl_container
- absl_crc
- absl_debugging
- absl_flags
- absl_functional
- absl_hash
- absl_log
- absl_log_internal
- absl_memory
- absl_meta
- absl_numeric
- absl_random
- absl_status
- absl_strings
- absl_synchronization
- absl_time
- absl_types
- absl_utility
- )
- fi
- if use system-brotli; then
- gn_system_libraries+=( brotli )
- fi
- if use system-crc32c; then
- gn_system_libraries+=( crc32c )
- fi
- if use system-double-conversion; then
- gn_system_libraries+=( double-conversion )
- fi
- if use system-woff2; then
- gn_system_libraries+=( woff2 )
- fi
- if use nvidia; then
- gn_system_libraries+=( libXNVCtrl )
- fi
- if use system-ffmpeg; then
- gn_system_libraries+=( ffmpeg opus )
- fi
- if use system-jsoncpp; then
- gn_system_libraries+=( jsoncpp )
- fi
- if use system-icu; then
- gn_system_libraries+=( icu )
- fi
- if use system-zstd; then
- gn_system_libraries+=( zstd )
- fi
- if use system-av1; then
- gn_system_libraries+=( dav1d libaom )
- fi
- if use system-libusb; then
- gn_system_libraries+=( libusb )
- fi
- if use system-libvpx; then
- gn_system_libraries+=( libvpx )
- fi
- use system-openh264 && gn_system_libraries+=(
- openh264
- )
- use system-re2 && gn_system_libraries+=(
- re2
- )
- use system-snappy && gn_system_libraries+=(
- snappy
- )
-
- build/linux/unbundle/replace_gn_files.py --system-libraries "${gn_system_libraries[@]}" ||
- die "Failed to replace GN files for system libraries"
-
- # TODO 131: The above call clobbers `enable_freetype = true` in the freetype gni file
- # drop the last line, then append the freetype line and a new curly brace to end the block
- local freetype_gni="build/config/freetype/freetype.gni"
- sed -i -e '$d' ${freetype_gni} || die
- echo " enable_freetype = true" >> ${freetype_gni} || die
- echo "}" >> ${freetype_gni} || die
-
- if use !custom-cflags; then
- replace-flags "-Os" "-O2"
- strip-flags
- # Debug info section overflows without component build
- # Prevent linker from running out of address space, bug #471810 .
- filter-flags "-g*"
- # 949123: Several multimedia components explicitly build with specific CFLAGS and
- # use runtime detection to enable optimisations; unfortunately any of our CFLAGS are suffixed
- # to the end of the command line, which causes build failures.
- fi
- # Since M150 `skia` will begin breaking for x86_64 due to compilation of `avx512` code paths;
- # we need to filter these for all arches.
- filter-flags "-march*" "-mtune*" "-mcpu*"
-
- # We don't use the same clang version as upstream, and with -Werror
- # we need to make sure that we don't get superfluous warnings.
- append-flags -Wno-unknown-warning-option
- if tc-is-cross-compiler; then # can you cross-compile with the bundled toolchain?
- export BUILD_CXXFLAGS+=" -Wno-unknown-warning-option"
- export BUILD_CFLAGS+=" -Wno-unknown-warning-option"
- fi
-
- # Start building our GN options
- local myconf_gn=() # Tip: strings must be quoted, bools or numbers are fine
-
- if use !bundled-toolchain; then
- # We already forced the "correct" clang via pkg_setup
-
- if tc-is-cross-compiler; then
- CC="${CC} -target ${CHOST} --sysroot ${ESYSROOT}"
- CXX="${CXX} -target ${CHOST} --sysroot ${ESYSROOT}"
- BUILD_AR=${AR}
- BUILD_CC=${CC}
- BUILD_CXX=${CXX}
- BUILD_NM=${NM}
- fi
-
- # Make sure the build system will use the right tools, bug #340795.
- tc-export AR CC CXX NM
-
- strip-unsupported-flags
- append-ldflags -Wl,--undefined-version # https://bugs.gentoo.org/918897#c32
-
- myconf_gn+=(
- "is_clang=true"
- "clang_use_chrome_plugins=false"
- "use_clang_modules=false" # M141 enables this for the linux platform by default.
- 'custom_toolchain="//build/toolchain/linux/unbundle:default"'
- # From M127 we need to provide a location for libclang and the clang resource dir so that bindgen can find them
- "bindgen_libclang_path=\"$(get_llvm_prefix)/$(get_libdir)\""
- "bindgen_clang_resource_dir=\"${EPREFIX}/usr/lib/clang/${LLVM_SLOT}/include\""
- "bindgen_extra_clang_args=[\"-I${EPREFIX}/usr/lib/clang/${LLVM_SLOT}/include\"]"
- "clang_base_path=\"${EPREFIX}/usr/lib/clang/${LLVM_SLOT}/\""
- "rust_bindgen_root=\"${EPREFIX}/usr/\""
- "rust_sysroot_absolute=\"$(get_rust_prefix)\""
- "rustc_version=\"${RUST_SLOT}\""
- )
-
- if tc-ld-is-mold; then
- myconf_gn+=(
- "use_mold=true"
- "use_lld=false"
- "linker_path=\"${EPREFIX}/usr/bin/mold\""
- )
- else
- myconf_gn+=( "use_lld=true" )
- fi
-
- if [[ ${LLVM_SLOT} -lt 23 ]]; then
- # Workaround for -fsanitize-ignore-for-ubsan-feature (added in LLVM 23)
- myconf_gn+=( 'clang_has_ubsan_feature_ignore=false' )
- fi
-
- if ! tc-is-cross-compiler; then
- myconf_gn+=( 'host_toolchain="//build/toolchain/linux/unbundle:default"' )
- else
- tc-export BUILD_{AR,CC,CXX,NM}
- myconf_gn+=(
- 'host_toolchain="//build/toolchain/linux/unbundle:host"'
- 'v8_snapshot_toolchain="//build/toolchain/linux/unbundle:host"'
- "host_pkg_config=\"$(tc-getBUILD_PKG_CONFIG)\""
- "pkg_config=\"$(tc-getPKG_CONFIG)\""
- )
-
- # setup cups-config, build system only uses --libs option
- if use cups; then
- mkdir "${T}/cups-config" || die
- cp "${ESYSROOT}/usr/bin/${CHOST}-cups-config" "${T}/cups-config/cups-config" || die
- export PATH="${PATH}:${T}/cups-config"
- fi
-
- # Don't inherit PKG_CONFIG_PATH from environment
- local -x PKG_CONFIG_PATH=
- fi
-
- fi # !bundled-toolchain
-
- local myarch
- myarch="$(tc-arch)"
- case ${myarch} in
- amd64)
- # Bug 530248, 544702, 546984, 853646.
- use !custom-cflags && filter-flags -mno-mmx -mno-sse2 -mno-ssse3 -mno-sse4.1 \
- -mno-avx -mno-avx2 -mno-fma -mno-fma4 -mno-xop -mno-sse4a
- myconf_gn+=( 'target_cpu="x64"' )
- ;;
- x86)
- # Bug 530248, 544702, 546984, 853646.
- use !custom-cflags && filter-flags -mno-mmx -mno-sse2 -mno-ssse3 -mno-sse4.1 \
- -mno-avx -mno-avx2 -mno-fma -mno-fma4 -mno-xop -mno-sse4a
- myconf_gn+=( 'target_cpu="x86"' )
- ;;
- arm64)
- myconf_gn+=( 'target_cpu="arm64"' )
- ;;
- ppc64)
- myconf_gn+=( 'target_cpu="ppc64"' )
- ;;
- *)
- die "Failed to determine target arch, got '${myarch}'."
- ;;
- esac
-
- # Common options
-
- myconf_gn+=(
- # Disable code formating of generated files
- "blink_enable_generated_code_formatting=false"
- # enable DCHECK with USE=debug only, increases chrome binary size by 30%, bug #811138.
- # DCHECK is fatal by default, make it configurable at runtime, #bug 807881.
- "dcheck_always_on=$(usex debug true false)"
- "dcheck_is_configurable=$(usex debug true false)"
- # Chromium builds provided by Linux distros should disable the testing config
- "disable_fieldtrial_testing_config=true"
- # Custom patch: Enable building Chromium as individual channels (e.g. stable, beta, dev) that
- # use different profile directories, desktop entries, etc. This enables slotting the ebuild.
- "enable_channel_branding=true"
- # 131 began laying the groundwork for replacing freetype with
- # "Rust-based Fontations set of libraries plus Skia path rendering"
- # We now need to opt-in
- "enable_freetype=true"
- "enable_hangout_services_extension=$(usex hangouts true false)"
- # Don't need nocompile checks and GN crashes with our config (verify with modern GN)
- "enable_nocompile_tests=false"
- # pseudolocales are only used for testing
- "enable_pseudolocales=false"
- "enable_widevine=$(usex widevine true false)"
- # Disable fatal linker warnings, bug 506268.
- "fatal_linker_warnings=false"
- # Component build isn't generally intended for use by end users. It's mostly useful
- # for development and debugging.
- "is_component_build=false"
- # GN needs explicit config for Debug/Release as opposed to inferring it from build directory.
- "is_debug=false"
- "is_official_build=$(usex official true false)"
- # Enable ozone wayland and/or headless support
- "ozone_auto_platforms=false"
- "ozone_platform_headless=true"
- # Enables building without non-free unRAR licence
- "safe_browsing_use_unrar=false"
- # "thin_lto_enable_optimizations=${use_lto}"
- "treat_warnings_as_errors=false"
- # Use in-tree libc++ (buildtools/third_party/libc++ and buildtools/third_party/libc++abi)
- # instead of the system C++ library for C++ standard library support.
- # default: true, but let's be explicit (forced since 120 ; USE removed 127).
- "use_custom_libcxx=true"
- # Enable ozone wayland and/or headless support
- "use_ozone=true"
- # The sysroot is the oldest debian image that chromium supports, we don't need it
- "use_sysroot=false"
- # See dependency logic in third_party/BUILD.gn
- "use_system_harfbuzz=$(usex system-harfbuzz true false)"
- # "use_thin_lto=${use_lto}"
- # Only enabled for clang, but gcc has endian macros too
- "v8_use_libm_trig_functions=true"
- )
-
- myconf_gn+=( "enable_iterator_debugging=$(usex debug true false)" )
-
- if use debug; then
- myconf_gn+=(
- "symbol_level=2"
- "blink_symbol_level=2"
- "v8_symbol_level=2"
- )
- else
- myconf_gn+=(
- "symbol_level=0"
- "blink_symbol_level=0"
- "v8_symbol_level=0"
- )
- fi
-
- if use bindist ; then
- myconf_gn+=(
- # If this is set to false Chromium won't be able to load any proprietary codecs
- # even if provided with an ffmpeg capable of h264/aac decoding
- "proprietary_codecs=true"
- 'ffmpeg_branding="Chrome"'
- # build ffmpeg as an external component (libffmpeg.so) that we can remove / substitute
- "is_component_ffmpeg=true"
- )
- else
- myconf_gn+=(
- "proprietary_codecs=$(usex proprietary-codecs true false)"
- "ffmpeg_branding=\"$(usex proprietary-codecs Chrome Chromium)\""
- )
- fi
-
- if use headless; then
- myconf_gn+=(
- "enable_print_preview=false"
- "enable_remoting=false"
- 'ozone_platform="headless"'
- "rtc_use_pipewire=false"
- "use_alsa=false"
- "use_cups=false"
- "use_gio=false"
- "use_glib=false"
- "use_gtk=false"
- "use_kerberos=false"
- "use_libpci=false"
- "use_pangocairo=false"
- "use_pulseaudio=false"
- "use_qt5=false"
- "use_qt6=false"
- "use_udev=false"
- "use_vaapi=false"
- "use_xkbcommon=false"
- )
- else
- myconf_gn+=(
- "gtk_version=$(usex gtk4 4 3)"
- # link pulseaudio directly (DT_NEEDED) instead of using dlopen.
- # helps with automated detection of ABI mismatches and prevents silent errors.
- "link_pulseaudio=$(usex pulseaudio true false)"
- "ozone_platform_wayland=$(usex wayland true false)"
- "ozone_platform_x11=$(usex X true false)"
- "ozone_platform=\"$(usex wayland wayland x11)\""
- "rtc_use_pipewire=$(usex screencast true false)"
- "use_cups=$(usex cups true false)"
- "use_kerberos=$(usex kerberos true false)"
- "use_pulseaudio=$(usex pulseaudio true false)"
- "use_qt5=false"
- "use_system_libffi=$(usex wayland true false)"
- "use_system_minigbm=true"
- "use_vaapi=$(usex vaapi true false)"
- "use_xkbcommon=true"
- )
- if use qt6; then
- local cbuild_libdir
- cbuild_libdir="$(get_libdir)"
- if tc-is-cross-compiler; then
- # Hack to workaround get_libdir not being able to handle CBUILD, bug #794181
- cbuild_libdir="$($(tc-getBUILD_PKG_CONFIG) --keep-system-libs --libs-only-L libxslt)"
- cbuild_libdir="${cbuild_libdir:2}"
- cbuild_libdir="${cbuild_libdir/% }"
- fi
- myconf_gn+=(
- "use_qt6=true"
- "moc_qt6_path=\"${EPREFIX}/usr/${cbuild_libdir}/qt6/libexec\""
- )
- else
- myconf_gn+=( "use_qt6=false" )
- fi
- fi
-
- # Explicitly disable ICU data file support for system-icu/headless builds.
- if use system-icu || use headless; then
- myconf_gn+=( "icu_use_data_file=false" )
- fi
-
- if use official; then
- # Allow building against system libraries in official builds
- sed -i 's/OFFICIAL_BUILD/GOOGLE_CHROME_BUILD/' \
- tools/generate_shim_headers/generate_shim_headers.py || die
- # Don't add symbols to build
- myconf_gn+=( "symbol_level=0" )
- fi
-
- if use pgo; then
- myconf_gn+=(
- "chrome_pgo_phase=2"
- "v8_enable_builtins_optimization=true"
- )
- else
- myconf_gn+=( "chrome_pgo_phase=0" )
- fi
-
- # Odds and ends
-
- # skipping typecheck is only supported on amd64, bug #876157
- if ! use amd64; then
- myconf_gn+=( "devtools_skip_typecheck=false" )
- fi
-
- # Disable external code space for V8 for ppc64. It is disabled for ppc64
- # by default, but cross-compiling on amd64 enables it again.
- if tc-is-cross-compiler && use ppc64; then
- myconf_gn+=( "v8_enable_external_code_space=false" )
- fi
-
- # This determines whether or not GN uses the bundled libcxx
- if use libcxx; then
- myconf_gn+=( "use_custom_libcxx=true" )
- else
- myconf_gn+=(
- "use_custom_libcxx=false"
- "use_llvm_libatomic=false"
- )
- append-cppflags -U_GLIBCXX_ASSERTIONS #See #318
- fi
-
- myconf_gn+=( "use_bluez=$(usex bluetooth true false)" )
-
- myconf_gn+=( "is_cfi=$(usex cfi true false)" )
-
- if use cfi; then
- myconf_gn+=(
- "use_cfi_icall=true"
- "use_cfi_cast=true"
- )
- fi
-
- myconf_gn+=(
- "optimize_webui=$(usex optimize-webui true false)"
- "use_system_freetype=$(usex system-harfbuzz true false)"
- "use_system_libopenjpeg2=$(usex system-openjpeg true false)"
- "enable_pdf=true"
- "use_system_lcms2=true"
- "enable_print_preview=true"
- "use_thin_lto=$(usex thinlto true false)"
- "thin_lto_enable_optimizations=$(usex optimize-thinlto true false)"
-
- # Ungoogled flags
- "build_with_tflite_lib=false"
- "enable_mdns=false"
- "enable_mse_mpeg2ts_stream_parser=$(usex proprietary-codecs true false)"
- "enable_remoting=false"
- "enable_reporting=false"
- "enable_service_discovery=false"
- "exclude_unwind_tables=true"
- "google_api_key=\"\""
- "google_default_client_id=\"\""
- "google_default_client_secret=\"\""
- "safe_browsing_mode=0"
- "use_official_google_api_keys=false"
- "use_unofficial_version_number=false"
-
- # "enable_swiftshader=false"
-
- # Additional flags
- # "perfetto_use_system_zlib=true"
- # "use_system_zlib=true"
- # "use_system_libjpeg=true"
- # "rtc_build_examples=false"
- # "enable_chromium_prelude=false"
- # "enable_updater=false"
- # "enable_update_notifications=false"
- # "enable_constraints=false"
- # "rtc_rusty_base64=false"
- # "v8_enable_temporal_support=false"
- # "media_use_symphonia=false"
- # "pdf_enable_rust_png=false"
- # "skia_use_libpng_encode=true"
- # "skia_use_libpng_decode=true"
- # "skia_use_rust_png_decode=false"
- # "skia_use_rust_png_encode=false"
- # "enable_jxl_decoder=false"
- )
-
- if use amd64 || use arm64; then
- myconf_gn+=(
- "v8_drumbrake_bounds_checks=true"
- # "v8_enable_drumbrake=true"
- )
- fi
-
- if use thinlto; then
- # We need to change the default value of import-instr-limit in
- # LLVM to limit the text size increase. The default value is
- # 100, and we change it to 30 to reduce the text size increase
- # from 25% to 10%. The performance number of page_cycler is the
- # same on two of the thinLTO configurations, we got 1% slowdown
- # on speedometer when changing import-instr-limit from 100 to 30.
- # append-ldflags "-Wl,-plugin-opt,-import-instr-limit=30"
- sed -i '/import_instr_limit = 5/{s++import_instr_limit = 30+;h};${x;/./{x;q0};x;q1}' \
- build/config/compiler/BUILD.gn || die
-
- append-ldflags "-Wl,--thinlto-jobs=$(makeopts_jobs)"
- fi
-
- # Facilitate deterministic builds (taken from build/config/compiler/BUILD.gn)
- append-cflags -Wno-builtin-macro-redefined
- append-cxxflags -Wno-builtin-macro-redefined
- append-cppflags "-D__DATE__= -D__TIME__= -D__TIMESTAMP__="
-
- local flags
- einfo "Building with the following compiler settings:"
- for flags in C{C,XX} AR NM RANLIB {C,CXX,CPP,LD}FLAGS \
- EXTRA_GN UGC_{SKIP_{PATCHES,SUBSTITUTION},KEEP_BINARIES} ; do
- einfo " ${flags} = \"${!flags}\""
- done
-
- # Since we build from tarballs, we need to set the channel here so that it can be used in the build.
- export CHROME_VERSION_EXTRA="${SLOT}"
-
- einfo "Configuring Chromium ..."
- set -- gn gen --args="${myconf_gn[*]}${EXTRA_GN:+ ${EXTRA_GN}}" out/Release
- echo "$@"
- "$@" || die "Failed to configure Chromium"
-
- # The "if" below should not be executed unless testing
- if [ ! -z "${NODIE}" ]; then
- # List all args
- # gn args --list out/Release
-
- # Quick compiler check
- eninja -C out/Release protoc torque
- fi
-}
-
-src_compile() {
- # Final link uses lots of file descriptors.
- ulimit -n 2048
-
- # Calling this here supports resumption via FEATURES=keepwork
- python_setup
-
- # I hate doing this but upstream Rust have yet to come up with a better solution for
- # us poor packagers. Required for Split LTO units, which are required for CFI.
- export RUSTC_BOOTSTRAP=1
-
- # Don't inherit PYTHONPATH from environment, bug #789021, #812689
- local -x PYTHONPATH=
-
- # Build mksnapshot and pax-mark it.
- if use pax-kernel; then
- local x
- for x in mksnapshot v8_context_snapshot_generator code_cache_generator; do
- if tc-is-cross-compiler; then
- eninja -C out/Release "host/${x}"
- pax-mark m "out/Release/host/${x}"
- else
- eninja -C out/Release "${x}"
- pax-mark m "out/Release/${x}"
- fi
- done
- fi
-
- # Even though ninja autodetects number of CPUs, we respect
- # user's options, for debugging with -j 1 or any other reason.
- eninja -C out/Release chrome chrome_sandbox $(use test && echo "base_unittests")
-
- pax-mark m out/Release/chrome
-
- # This codepath does minimal patching, so we're at the mercy of upstream
- # CFLAGS. This is fine - we're not intending to force this on users
- # and we do a lot of flag 'management' anyway.
- if use bundled-toolchain; then
- QA_FLAGS_IGNORED="
- usr/lib64/chromium-browser/chrome
- usr/lib64/chromium-browser/chrome-sandbox
- usr/lib64/chromium-browser/chromedriver
- usr/lib64/chromium-browser/chrome_crashpad_handler
- usr/lib64/chromium-browser/libEGL.so
- usr/lib64/chromium-browser/libGLESv2.so
- usr/lib64/chromium-browser/libVkICD_mock_icd.so
- usr/lib64/chromium-browser/libVkLayer_khronos_validation.so
- usr/lib64/chromium-browser/libqt6_shim.so
- usr/lib64/chromium-browser/libvk_swiftshader.so
- usr/lib64/chromium-browser/libvulkan.so.1
- "
- fi
-
- use convert-dict && eninja -C out/Release convert_dict
-
- use enable-driver && eninja -C out/Release chromedriver
- #use suid && eninja -C out/Release chrome_sandbox
-
- use enable-driver && mv out/Release/chromedriver{.unstripped,}
-
- rm -f out/Release/locales/*.pak.info || die
-
- # Generate support files (desktop file, manpage, etc.) See: #684550 #706786 #968958
- ${EPYTHON} "${FILESDIR}/generate-support-files.py" \
- --installdir "/usr/$(get_libdir)/ungoogled-chromium-browser" \
- --channel "${SLOT}" ||
- die "Failed to generate support files"
-}
-
-src_test() {
- # Tests may be flaky with usersandbox, and the test runner executes significantly faster without.
- # If you seem to be excluding too many tests for a particular milestone: comment them out, reboot, and
- # run the tests again. If that doesn't help, try FEATURES="-usersandbox" and send it because obviously the
- # chromium gods are not smiling upon you today. Do some runtime testing, obvs.
- local skip_tests=(
- # Wildcard exclusions (if all tests in a test suite are broken)
- 'AlternateTestParams/PartitionAllocDeathTest.RepeatedAllocReturnNullDirect/*'
- 'AlternateTestParams/PartitionAllocDeathTest.RepeatedReallocReturnNullDirect/*'
- 'AlternateTestParams/PartitionAllocTest.*' # 200+ tests, >= 1 crashes entire test runner with usersandbox.
- 'CheckExitCodeAfterSignalHandlerDeathTest.*'
- 'CriticalProcessAndThreadSpotChecks/HangWatcherAnyCriticalThreadTests.*'
- 'LazyThreadPoolTaskRunnerEnvironmentTest.*' # M142
- 'ToolsSanityTest.BadVirtualCall*'
- # requires en-us locale
- SysStrings.SysNativeMBAndWide
- SysStrings.SysNativeMBToWide
- SysStrings.SysWideToNativeMB
- # Specific test cases
- CancelableEventTest.BothCancelFailureAndSucceedOccurUnderContention
- FilePathTest.FromUTF8Unsafe_And_AsUTF8Unsafe
- HistogramTesterTest.PumaTestUniqueSample
- ImmediateCrashTest.ExpectedOpcodeSequence # M150
- PathServiceTest.CheckedGetFailure
- PlatformThreadTest.CanChangeThreadType
- RawPtrTest.SetLookupUsesGetForComparison # M146 ; also broken for alpine in M144.
- RustLogIntegrationTest.CheckAllSeverity
- StackCanary.ChangingStackCanaryCrashesOnReturn
- StackTraceDeathTest.StackDumpSignalHandlerIsMallocFree
- TestLauncherTools.TruncateSnippetFocusedMatchesFatalMessagesTest
- ThreadPoolEnvironmentConfig.CanUseBackgroundPriorityForWorker
- )
- local test_filter="-$(IFS=:; printf '%s' "${skip_tests[*]}")"
- # test-launcher-bot-mode enables parallelism and plain output
- # Check individual tests with --gtest_filter=<test you want> --single-process-tests
- ./out/Release/base_unittests --test-launcher-bot-mode \
- --test-launcher-jobs="$(get_makeopts_jobs)" \
- --gtest_filter="${test_filter}" || die "Tests failed!"
-}
-
-src_install() {
- local browser_suffix
- if [[ "${SLOT}" != "stable" ]]; then
- browser_suffix="-${SLOT}"
- else
- browser_suffix=""
- fi
- local CHROMIUM_HOME="/usr/$(get_libdir)/ungoogled-chromium-browser${browser_suffix}"
- exeinto "${CHROMIUM_HOME}"
- doexe out/Release/chrome
-
- #newexe out/Release/chrome_sandbox chrome-sandbox
- #fperms 4755 "${CHROMIUM_HOME}/chrome-sandbox"
-
- use enable-driver && doexe out/Release/chromedriver
-
- #* https://github.com/ungoogled-software/ungoogled-chromium/pull/3563
- doexe out/Release/chrome_crashpad_handler
-
- if use convert-dict; then
- newexe "${FILESDIR}/update-dicts.sh" update-dicts.sh
- doexe out/Release/convert_dict
- fi
-
- ozone_auto_session () {
- use X && use wayland && ! use headless && echo true || echo false
- }
-
- cat <<- EOF > "${D}${CHROMIUM_HOME}/chromium-launcher.sh" || die
- #!/bin/bash
- # Wrapper to launch slotted Chromium via the chromium-common launcher script.
- export CHROME_DESKTOP="ungoogled-chromium-browser${browser_suffix}.desktop"
- export CHROME_EXEC_NAME="ungoogled-chromium-browser${browser_suffix}"
- export CHROME_VERSION_EXTRA="${SLOT}"
- export CHROME_WRAPPER="\$(readlink -f "\$0")"
- export OZONE_AUTO_SESSION=$(ozone_auto_session)
-
- exec /usr/libexec/chromium/chromium-launcher.sh "\$@"
- EOF
-
- chmod 755 "${D}${CHROMIUM_HOME}/chromium-launcher.sh" || die
-
- # It is important that we name the target "chromium-browser",
- # xdg-utils expect it; bug #355517.
- dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/ungoogled-chromium-browser${browser_suffix}
- # keep the old symlink around for consistency
- dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/ungoogled-chromium${browser_suffix}
-
- use enable-driver && dosym "${CHROMIUM_HOME}/chromedriver" /usr/bin/ungoogled-chromedriver${browser_suffix}
-
- pushd out/Release/locales > /dev/null || die
- chromium_remove_language_paks
- popd > /dev/null || die
-
- insinto "${CHROMIUM_HOME}"
- doins out/Release/*.bin
- doins out/Release/*.pak
- doins -r out/Release/hyphen-data
-
- if use bindist; then
- # We built libffmpeg as a component library, but we can't distribute it
- # with proprietary codec support. Remove it and make a symlink to the requested
- # system library.
- rm -f out/Release/libffmpeg.so \
- || die "Failed to remove bundled libffmpeg.so (with proprietary codecs)"
- # symlink the libffmpeg.so from either ffmpeg-chromium or ffmpeg[chromium].
- einfo "Creating symlink to libffmpeg.so from $(usex ffmpeg-chromium ffmpeg-chromium ffmpeg[chromium])..."
- dosym ../chromium/libffmpeg.so$(usex ffmpeg-chromium .${PV%%\.*} "") \
- /usr/$(get_libdir)/ungoogled-chromium-browser/libffmpeg.so
- fi
-
- (
- shopt -s nullglob
- local files=(out/Release/*.so out/Release/*.so.[0-9])
- [[ ${#files[@]} -gt 0 ]] && doins "${files[@]}"
- )
-
- if ! use system-icu && ! use headless; then
- doins out/Release/icudtl.dat
- fi
-
- doins -r out/Release/locales
- #doins -r out/Release/MEIPreload
-
- # Install vk_swiftshader_icd.json; bug #827861
- doins out/Release/vk_swiftshader_icd.json
-
- if [[ -d out/Release/swiftshader ]]; then
- insinto "${CHROMIUM_HOME}/swiftshader"
- doins out/Release/swiftshader/*.so
- fi
-
- use widevine && dosym WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so "${CHROMIUM_HOME}/libwidevinecdm.so"
-
- # Install icons
- local branding size
- for size in 16 24 32 48 64 128 256 ; do
- case ${size} in
- 16|32) branding="chrome/app/theme/default_100_percent/chromium" ;;
- *) branding="chrome/app/theme/chromium" ;;
- esac
- newicon -s ${size} "${branding}/product_logo_${size}.png" \
- ungoogled-chromium-browser${browser_suffix}.png
- done
-
- # Install desktop entry
- domenu out/Release/ungoogled-chromium-browser${browser_suffix}.desktop
-
- # Install GNOME default application entry (bug #303100).
- insinto /usr/share/gnome-control-center/default-apps
- doins out/Release/ungoogled-chromium-browser${browser_suffix}.xml
-
- # Install AppStream metadata
- insinto /usr/share/appdata
- doins out/Release/ungoogled-chromium-browser${browser_suffix}.appdata.xml
-
- # Install manpage; bug #684550
- doman out/Release/ungoogled-chromium-browser${browser_suffix}.1
- dosym ungoogled-chromium-browser${browser_suffix}.1 /usr/share/man/man1/ungoogled-chromium${browser_suffix}.1
-
- readme.gentoo_create_doc
-}
-
-pkg_postrm() {
- xdg_icon_cache_update
- xdg_desktop_database_update
-}
-
-pkg_postinst() {
- xdg_icon_cache_update
- xdg_desktop_database_update
- readme.gentoo_print_elog
-
- if use !headless && [[ -z "${REPLACING_VERSIONS}" ]]; then
- if use vaapi; then
- elog "Hardware-accelerated video decoding configuration:"
- elog
- elog "Chromium supports multiple backends for hardware acceleration. To enable one,"
- elog " Add to CHROMIUM_FLAGS in /etc/chromium/default:"
- elog
- elog "1. VA-API with OpenGL (recommended for most users):"
- elog " --enable-features=AcceleratedVideoDecodeLinuxGL"
- elog " VaapiVideoDecoder may need to be added as well, but try without first."
- elog
- if use wayland; then
- elog "2. Enhanced Wayland/EGL performance:"
- elog " --enable-features=AcceleratedVideoDecodeLinuxGL,AcceleratedVideoDecodeLinuxZeroCopyGL"
- elog
- fi
- if use X; then
- elog "$(usex wayland "3" "2"). VA-API with Vulkan:"
- elog " --enable-features=VaapiVideoDecoder,VaapiIgnoreDriverChecks,Vulkan,DefaultANGLEVulkan,VulkanFromANGLE"
- elog
- if use wayland; then
- elog " NOTE: Vulkan acceleration requires X11 and will not work under Wayland sessions."
- elog " Use OpenGL-based acceleration instead when running under Wayland."
- elog
- fi
- fi
- elog "Additional options:"
- elog " To enable hardware-accelerated encoding (if supported)"
- elog " add 'AcceleratedVideoEncoder' to your feature list"
- elog " VaapiIgnoreDriverChecks bypasses driver compatibility checks"
- elog " (may be needed for newer/unsupported hardware)"
- elog
- else
- elog "This Chromium build was compiled without VA-API support, which provides"
- elog "hardware-accelerated video decoding."
- fi
- if use screencast; then
- elog "Screencast is disabled by default at runtime. Either enable it"
- elog "by navigating to chrome://flags/#enable-webrtc-pipewire-capturer"
- elog "inside Chromium or add --enable-features=WebRTCPipeWireCapturer"
- elog "to CHROMIUM_FLAGS in /etc/chromium/default."
- elog
- elog "Additional setup may be required for screencasting to work."
- elog "See issue: https://github.com/PF4Public/gentoo-overlay/issues/314"
- fi
- if use gtk4; then
- elog "Chromium prefers GTK3 over GTK4 at runtime. To override this"
- elog "behaviour you need to pass --gtk-version=4, e.g. by adding it"
- elog "to CHROMIUM_FLAGS in /etc/chromium/default."
- fi
- if use widevine; then
- elog "widevine requires binary plugins, which are distributed separately"
- elog "Make sure you have www-plugins/chrome-binary-plugins installed"
- fi
- fi
-
- if systemd_is_booted && ! [[ -f "/etc/machine-id" ]]; then
- ewarn "The lack of an '/etc/machine-id' file on this system booted with systemd"
- ewarn "indicates that the Gentoo handbook was not followed to completion."
- ewarn ""
- ewarn "Chromium is known to behave unpredictably with this system configuration;"
- ewarn "please complete the configuration of this system before logging any bugs."
- fi
-
- # Stable slot doesn't change profile directory, and it's vanishingly unlikely that users will downgrade from dev.
- if [[ -n "${REPLACING_VERSIONS}" ]]; then
- local replacing_non_slotted=false
- # there could be more than one PVR
- for version in ${REPLACING_VERSIONS}; do
- if ver_test "${version}" -le "145.0.7632.116"; then
- replacing_non_slotted=true
- break
- fi
- done
- if ${replacing_non_slotted}; then
- ewarn "This version of Chromium has replaced a non-slotted ebuild."
- if [[ ${SLOT} != "stable" ]]; then
- ewarn "This channel has its own profile directory, so your existing profile will not be used."
- ewarn "To use your existing profile, either copy or move it to the new location."
- ewarn "See https://wiki.gentoo.org/wiki/Chromium#Profile_Directories for more information."
- ewarn ""
- fi
- ewarn "Any existing Progressive Web Apps (PWAs) will need to be reinstalled,"
- ewarn "or have the path in the desktop files updated to point to the new wrapper script."
- fi
- fi
-}
-
-eapply_wrapper () {
- if [ ! -z "${NODIE}" ]; then
- nonfatal eapply "$@"
- else
- eapply "$@"
- fi
-}
-
-git_wrapper () {
- if [ ! -z "${NODIE}" ]; then
- git "$@"
- else
- git "$@" || die
- fi
-}
-
-filter_wrapper () {
- einfo "Applying ${i##*/}"
- #? fuzz factor of 3 is OK?
- if [ ! -z "${NODIE}" ]; then
- filterdiff -p1 "${@:2}" < "$1" | patch -F 3 -p1
- else
- filterdiff -p1 "${@:2}" < "$1" | patch -F 3 -p1 || die
- fi
-}
diff --git a/www-client/ungoogled-chromium/ungoogled-chromium-151.0.7922.108_p1.ebuild b/www-client/ungoogled-chromium/ungoogled-chromium-151.0.7922.108_p1.ebuild
deleted file mode 100644
index f97d9c401b83..000000000000
--- a/www-client/ungoogled-chromium/ungoogled-chromium-151.0.7922.108_p1.ebuild
+++ /dev/null
@@ -1,2564 +0,0 @@
-# Copyright 2009-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-# Use following environment variables to customise the build
-# EXTRA_GN — pass extra options to gn
-# NINJAOPTS="-k0 -j8" useful to populate ccache even if ebuild is still failing
-# UGC_SKIP_PATCHES — space-separated list of patches to skip
-# UGC_KEEP_BINARIES — space-separated list of binaries to keep
-# UGC_SKIP_SUBSTITUTION — space-separated list of files to skip domain substitution
-
-# USE=bundled-toolchain is intended for users who want to use the same toolchain
-# as the upstream releases. It's also a good fallback in case we fall behind
-# and need to get a release out quickly (less likely with `dev` in-tree).
-# We can't rely on it as a default since the toolchain is only shipped for x86-64;
-# other architectures will need to use system toolchain.
-
-# Since m133 we are using CI-generated tarballs from
-# https://github.com/chromium-linux-tarballs/chromium-tarballs/
-
-# These are bit-for-bit identical to the official releases, but are built
-# using an external CI system that we have some control over, in case
-# issues pop up again with official tarball generation.
-
-GN_MIN_VER=0.2374
-# chromium-tools/get-chromium-toolchain-strings.py (or just use Chromicler)
-# Node for M145+ should be 24.12.0 but that's not packaged in Gentoo yet. See #969145
-TEST_FONT="9c07d19d9c5ee1ff94f717e6fb17e0c8c354e6f9"
-BUNDLED_CLANG_VER="llvmorg-23-init-19482-g53d18800-1"
-BUNDLED_RUST_VER="b998449636a48e2c4a362809085b600a0174e1f2-2"
-RUST_SHORT_HASH=${BUNDLED_RUST_VER:0:10}-${BUNDLED_RUST_VER##*-}
-NODE_VER="24.16.0-r1"
-GO_MIN_VER="1.25.0"
-ESBUILD_VER="0.25.1"
-ROLLUP_VER="4.57.1" # currently manual.
-
-CHROMIUM_LANGS="af am ar as az be bg bn bs ca cs cy da de el en-GB es es-419 et eu fa fi fil
- fr fr-CA gl gu he hi hr hu hy id is it ja ka kk km kn ko ky lo lt lv mk ml mn mr ms my
- nb ne nl or pa pl pt-BR pt-PT ro ru si sk sl sq sr sr-Latn sv sw ta te th tr uk ur uz
- vi zh-CN zh-HK zh-TW zu"
-
-#UGC_COMMIT_ID="ecbcc4c1413c961e37d4224f787fecb8534b1505"
-# UGC_PR_COMMITS=(
-# c917e096342e5b90eeea91ab1f8516447c8756cf
-# 5794e9d12bf82620d5f24505798fecb45ca5a22d
-# )
-
-CROMITE_COMMIT_ID="69e841fd35cd92ce5fa1a336791c7989809e0f17"
-
-declare -A CHROMIUM_COMMITS=(
- # ["27f8690db999f6e56f0af7a9ea3d28a019ed72ca"]="." #152+
- ["-cf94ed446320d35c8613ed9b3ffb6e6a61bfcb5f"]="."
-# # ["-37c28a19804e47a68eabf3cf882a310689fc325b"]="." #disable style check for cromite
-# # ["cd5a0df905a28faa89ff2a4ab44f893f84dc4487"]="net/third_party/quiche/src"
-)
-
-LLVM_COMPAT=( 21 22 23 )
-PYTHON_COMPAT=( python3_{13..14} )
-PYTHON_REQ_USE="xml(+)"
-RUST_MIN_VER=1.91.0
-RUST_NEEDS_LLVM="yes please"
-RUST_OPTIONAL="yes" # Not actually optional, but we don't need system Rust (or LLVM) with USE=bundled-toolchain
-RUST_REQ_USE="rustfmt" # Upstream run rustfmt on bindgen output, so we need it to be available.
-
-inherit check-reqs chromium-2 desktop flag-o-matic llvm-r1 multiprocessing ninja-utils pax-utils
-inherit python-any-r1 readme.gentoo-r1 rust systemd toolchain-funcs xdg-utils
-
-DESCRIPTION="Modifications to Chromium for removing Google integration and enhancing privacy"
-HOMEPAGE="https://github.com/ungoogled-software/ungoogled-chromium"
-PPC64_HASH="7aae8a84e327fc2078ce1625c9c70bfda77d626f"
-PATCH_V="${PV%%\.*}-3"
-COPIUM_COMMIT="3c7e56fb4523b43b47595bb3a22f77178fc76293"
-SRC_URI="https://commondatastorage.googleapis.com/chromium-browser-official/chromium-${PV/_*}-lite.tar.xz
- https://deps.gentoo.zip/www-client/chromium/rollup-wasm-node-${ROLLUP_VER}.tgz
- https://gitlab.com/Matt.Jolly/chromium-patches/-/archive/${PATCH_V}/chromium-patches-${PATCH_V}.tar.bz2
- !bundled-toolchain? (
- https://codeberg.org/selfisekai/copium/archive/${COPIUM_COMMIT}.tar.gz
- -> chromium-patches-copium-${COPIUM_COMMIT:0:10}.tar.gz
- )
- bundled-toolchain? (
- https://commondatastorage.googleapis.com/chromium-browser-clang/Linux_x64/clang-${BUNDLED_CLANG_VER}.tar.xz
- -> chromium-clang-${BUNDLED_CLANG_VER}.tar.xz
- https://commondatastorage.googleapis.com/chromium-browser-clang/Linux_x64/rust-toolchain-${BUNDLED_RUST_VER}-${BUNDLED_CLANG_VER%-*}.tar.xz
- -> chromium-rust-toolchain-${RUST_SHORT_HASH}-${BUNDLED_CLANG_VER%-*}.tar.xz
- )
- test? (
- https://chromium-fonts.storage.googleapis.com/${TEST_FONT} -> chromium-testfonts-${TEST_FONT:0:10}.tar.gz
- )
- ppc64? (
- https://gitlab.raptorengineering.com/raptor-engineering-public/chromium/openpower-patches/-/archive/${PPC64_HASH}/openpower-patches-${PPC64_HASH}.tar.bz2 -> chromium-openpower-${PPC64_HASH:0:10}.tar.bz2
- )
-"
-
-# Gentoo tarball:
-# https://chromium-tarballs.distfiles.gentoo.org/chromium-${PV/_*}.tar.xz -> chromium-${PV/_*}-gentoo.tar.xz
-
-# chromium-linux-tarballs
-# https://github.com/chromium-linux-tarballs/chromium-tarballs/releases/download/${PV/_*}/chromium-${PV/_*}-linux.tar.xz
-
-# Official tarball:
-# https://commondatastorage.googleapis.com/chromium-browser-official/chromium-${PV/_*}${LITE_TARBALL:+-lite}.tar.xz
-
-# https://gitweb.gentoo.org/proj/chromium-tools.git/tree/get-chromium-licences.py @ 145.0.7632.76
-LICENSE="Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD BSD-2 Base64 Boost-1.0 CC-BY-3.0 CC-BY-4.0 Clear-BSD FFT2D FTL"
-LICENSE+=" IJG ISC LGPL-2 LGPL-2.1 MIT MPL-1.1 MPL-2.0 Ms-PL PSF-2 SGI-B-2.0 SSLeay SunSoft Unicode-3.0"
-LICENSE+=" Unicode-DFS-2015 Unlicense UoI-NCSA ZLIB libtiff openssl"
-LICENSE+=" cromite? ( GPL-3 )"
-
-SLOT="stable"
-KEYWORDS="amd64 ~arm64 ~ppc64 ~x86"
-
-IUSE_SYSTEM_LIBS="abseil-cpp av1 brotli crc32c double-conversion ffmpeg +harfbuzz icu jsoncpp +libusb libvpx +openh264 openjpeg re2 snappy woff2 +zstd"
-IUSE="+X bindist bluetooth bundled-toolchain cfi convert-dict cups custom-cflags debug ffmpeg-chromium enable-driver gtk4 hangouts headless kerberos +libcxx nvidia +official optimize-thinlto optimize-webui override-data-dir pax-kernel pgo"
-IUSE+=" +proprietary-codecs pulseaudio qt6 screencast selinux test thinlto cromite vaapi wayland widevine cpu_flags_ppc_vsx3"
-RESTRICT="
- !bindist? ( bindist )
- !test? ( test )
- arm64? ( test )
- !system-ffmpeg? ( proprietary-codecs? ( bindist ) )
- !system-openh264? ( bindist )
- cromite? ( bindist )"
-
-REQUIRED_USE="
- !headless? ( || ( X wayland ) )
- screencast? ( wayland )
- ffmpeg-chromium? ( bindist proprietary-codecs )
- optimize-thinlto? ( thinlto )
- cfi? ( thinlto )
- x86? ( !thinlto !widevine )
- debug? ( !official )
- vaapi? ( !system-av1 !system-libvpx )
-"
-
-UGC_PV="${PV/_p/-}"
-UGC_PF="${PN}-${UGC_PV}"
-UGC_URL="https://github.com/ungoogled-software/${PN}/archive/"
-
-if [ -z "$UGC_COMMIT_ID" ]; then
- UGC_URL="${UGC_URL}${UGC_PV}.tar.gz -> ${UGC_PF}.tar.gz"
- UGC_WD="${WORKDIR}/${UGC_PF}"
-else
- UGC_URL="${UGC_URL}${UGC_COMMIT_ID}.tar.gz -> ${PN}-${UGC_COMMIT_ID}.tar.gz"
- UGC_WD="${WORKDIR}/ungoogled-chromium-${UGC_COMMIT_ID}"
-fi
-
-SRC_URI+="${UGC_URL}
-"
-
-if [ ! -z "${UGC_PR_COMMITS[*]}" ]; then
- for i in "${UGC_PR_COMMITS[@]}"; do
- SRC_URI+="https://github.com/ungoogled-software/${PN}/commit/$i.patch?full_index=true -> ${PN}-$i.patch
- "
- done
-fi
-
-if [ ! -z "${CHROMIUM_COMMITS[*]}" ]; then
- # for i in "${CHROMIUM_COMMITS[@]}"; do
- for i in "${!CHROMIUM_COMMITS[@]}"; do
- if [[ ${CHROMIUM_COMMITS[$i]} =~ webrtc ]]; then
- #TODO: is it safe to use this mirror?
- SRC_URI+="https://github.com/webrtc-mirror/webrtc/commit/${i/-}.patch?full_index=true -> webrtc-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ angle ]]; then
- SRC_URI+="https://github.com/google/angle/commit/${i/-}.patch?full_index=true -> angle-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ quiche ]]; then
- SRC_URI+="https://github.com/google/quiche/commit/${i/-}.patch?full_index=true -> quiche-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ dawn ]]; then
- SRC_URI+="https://github.com/google/dawn/commit/${i/-}.patch?full_index=true -> dawn-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ perfetto ]]; then
- SRC_URI+="https://github.com/google/perfetto/commit/${i/-}.patch?full_index=true -> perfetto-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ink ]]; then
- SRC_URI+="https://github.com/google/ink/commit/${i/-}.patch?full_index=true -> ink-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ vulkan-utility-libraries ]]; then
- SRC_URI+="https://github.com/KhronosGroup/Vulkan-Utility-Libraries/commit/${i/-}.patch?full_index=true -> vulkan-utility-libraries-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ruy ]]; then
- SRC_URI+="https://github.com/google/ruy/commit/${i/-}.patch?full_index=true -> ruy-${i/-}.patch
- "
- else
- SRC_URI+="https://github.com/chromium/chromium/commit/${i/-}.patch?full_index=true -> chromium-${i/-}.patch
- "
- fi
- done
-fi
-
-SRC_URI+="cromite? ( https://github.com/uazo/cromite/archive/${CROMITE_COMMIT_ID}.tar.gz -> cromite-${CROMITE_COMMIT_ID}.tar.gz )
-"
-
-for i in ${IUSE_SYSTEM_LIBS}; do
- [[ $i =~ ^(\+)?(.*)$ ]]
- IUSE+=" ${BASH_REMATCH[1]}system-${BASH_REMATCH[2]}"
-done
-
-COMMON_X_DEPEND="
- x11-libs/libXcomposite:=
- x11-libs/libXcursor:=
- x11-libs/libXdamage:=
- x11-libs/libXfixes:=
- >=x11-libs/libXi-1.6.0:=
- x11-libs/libXrandr:=
- x11-libs/libXrender:=
- x11-libs/libXtst:=
- x11-libs/libxshmfence:=
-"
-
-# sys-libs/zlib: https://bugs.gentoo.org/930365; -ng is not compatible.
-# We _could_ use the bundled minizip, but that's against policy.
-COMMON_SNAPSHOT_DEPEND="
- system-icu? ( >=dev-libs/icu-78:= )
- system-abseil-cpp? ( >=dev-cpp/abseil-cpp-20260107.0 )
- system-brotli? ( >=app-arch/brotli-9999 )
- system-crc32c? ( dev-libs/crc32c )
- system-double-conversion? ( dev-libs/double-conversion )
- system-woff2? ( media-libs/woff2 )
- system-snappy? ( app-arch/snappy )
- system-jsoncpp? ( dev-libs/jsoncpp )
- system-openjpeg? ( media-libs/openjpeg:2= )
- system-re2? ( >=dev-libs/re2-0.2019.08.01:= )
- system-libvpx? ( >=media-libs/libvpx-1.13.0:=[postproc] )
- system-libusb? ( virtual/libusb:1 )
- cromite? ( dev-util/patchutils )
- >=dev-libs/libxml2-2.12.4:=[icu]
- dev-libs/nspr:=
- >=dev-libs/nss-3.26:=
- dev-libs/libxslt:=
- media-libs/fontconfig:=
- >=media-libs/freetype-2.11.0-r1:=
- system-harfbuzz? ( >=media-libs/harfbuzz-3:0=[icu(-)] )
- media-libs/libjpeg-turbo:=
- media-libs/libpng:=
- system-zstd? ( >=app-arch/zstd-1.5.5:= )
- >=media-libs/libwebp-0.4.0:=
- media-libs/mesa:=[gbm(+)]
- >=media-libs/openh264-2.6.0:=
- system-av1? (
- >=media-libs/dav1d-1.0.0:=
- >=media-libs/libaom-3.7.0:=
- )
- sys-libs/zlib:=
- !headless? (
- dev-libs/glib:2
- >=media-libs/alsa-lib-1.0.19:=
- media-video/pipewire:=
- pulseaudio? (
- || (
- media-libs/libpulse
- >=media-sound/apulse-0.1.9
- )
- )
- sys-apps/pciutils:=
- kerberos? ( virtual/krb5 )
- vaapi? ( >=media-libs/libva-2.7:=[X?,wayland?] )
- X? (
- x11-base/xorg-proto:=
- x11-libs/libX11:=
- x11-libs/libxcb:=
- x11-libs/libXext:=
- )
- x11-libs/libxkbcommon:=
- wayland? (
- screencast? ( media-video/pipewire:= )
- dev-libs/libffi:=
- dev-libs/wayland:=
- screencast? (
- media-video/pipewire:=
- || (
- sys-apps/xdg-desktop-portal-gnome
- sys-apps/xdg-desktop-portal-gtk
- kde-plasma/xdg-desktop-portal-kde
- gui-libs/xdg-desktop-portal-lxqt
- gui-libs/xdg-desktop-portal-wlr
- )
- )
- )
- )
-"
-
-COMMON_DEPEND="
- ${COMMON_SNAPSHOT_DEPEND}
- app-arch/bzip2:=
- dev-libs/expat:=
- system-ffmpeg? (
- >=media-video/ffmpeg-6.1:=
- >=media-libs/opus-1.3.1:=
- )
- net-misc/curl[ssl]
- sys-apps/dbus:=
- media-libs/flac:=
- sys-libs/zlib:=[minizip]
- !headless? (
- >=app-accessibility/at-spi2-core-2.46.0:2
- media-libs/mesa:=[X?,wayland?]
- virtual/udev
- x11-libs/cairo:=
- x11-libs/gdk-pixbuf:2
- x11-libs/pango:=
- cups? ( >=net-print/cups-1.3.11:= )
- qt6? ( dev-qt/qtbase:6[gui,widgets] )
- X? ( ${COMMON_X_DEPEND} )
- )
-"
-RDEPEND="${COMMON_DEPEND}
- !www-client/ungoogled-chromium:0
- >=www-client/chromium-common-2
- !headless? (
- || (
- x11-libs/gtk+:3[X?,wayland?]
- gui-libs/gtk:4[X?,wayland?]
- )
- qt6? ( dev-qt/qtbase:6[X?,wayland?] )
- )
- virtual/ttf-fonts
- selinux? ( sec-policy/selinux-chromium )
- bindist? (
- ffmpeg-chromium? ( media-video/ffmpeg-chromium:${PV%%\.*} )
- )
- !override-data-dir? (
- !www-client/chromium:${SLOT}
- !www-client/cromite:${SLOT}[-override-data-dir]
- )
-"
-# For M149+ pipewire is a mandatory build-time dependency, but it's optional at runtime for most configurations.
-DEPEND="${COMMON_DEPEND}
- !headless? (
- media-video/pipewire
- gtk4? ( gui-libs/gtk:4[X?,wayland?] )
- !gtk4? ( x11-libs/gtk+:3[X?,wayland?] )
- )
-"
-
- # pgo? ( >=llvm-core/clang-22.0.0_pre20260106 >=llvm-core/lld-22.0.0_pre20260106 )
-BDEPEND="
- ${COMMON_SNAPSHOT_DEPEND}
- ${PYTHON_DEPS}
- $(python_gen_any_dep '
- dev-python/setuptools[${PYTHON_USEDEP}]
- ')
- >=app-arch/gzip-1.7
- !headless? (
- qt6? ( dev-qt/qtbase:6 )
- )
- !bundled-toolchain? ( $(llvm_gen_dep '
- llvm-core/clang:${LLVM_SLOT}
- llvm-core/llvm:${LLVM_SLOT}
- cfi? ( llvm-runtimes/clang-runtime:${LLVM_SLOT}[sanitize] )
- official? (
- !ppc64? ( llvm-runtimes/compiler-rt-sanitizers:${LLVM_SLOT}[cfi] )
- ) ')
- || (
- $(llvm_gen_dep 'llvm-core/lld:${LLVM_SLOT}')
- >=sys-devel/mold-2.41.0
- )
- ${RUST_DEPEND}
- )
- >=dev-util/bindgen-0.72.1
- >=dev-build/gn-${GN_MIN_VER}
- >=dev-lang/go-${GO_MIN_VER}
- app-alternatives/ninja
- dev-lang/perl
- >=dev-util/gperf-3.2
- dev-util/esbuild:${ESBUILD_VER}
- dev-vcs/git
- >=net-libs/nodejs-${NODE_VER}[inspector]
- sys-apps/hwdata
- >=sys-devel/bison-2.4.3
- sys-devel/flex
- virtual/pkgconfig
- x11-misc/xdg-utils
-"
-
-if ! has chromium_pkg_die ${EBUILD_DEATH_HOOKS}; then
- EBUILD_DEATH_HOOKS+=" chromium_pkg_die";
-fi
-
-DISABLE_AUTOFORMATTING="yes"
-DOC_CONTENTS="
-Some web pages may require additional fonts to display properly.
-Try installing some of the following packages if some characters
-are not displayed properly:
-- media-fonts/arphicfonts
-- media-fonts/droid
-- media-fonts/ipamonafont
-- media-fonts/noto
-- media-fonts/ja-ipafonts
-- media-fonts/takao-fonts
-- media-fonts/wqy-microhei
-- media-fonts/wqy-zenhei
-
-To fix broken icons on the Downloads page, you should install an icon
-theme that covers the appropriate MIME types, and configure this as your
-GTK+ icon theme.
-
-For native file dialogs in KDE, install kde-apps/kdialog.
-
-To make password storage work with your desktop environment you may
-have install one of the supported credentials management applications:
-- app-crypt/libsecret (GNOME)
-- kde-frameworks/kwallet (KDE)
-If you have one of above packages installed, but don't want to use
-them in Chromium, then add --password-store=basic to CHROMIUM_FLAGS
-in /etc/chromium/default.
-"
-
-S="${WORKDIR}/chromium-${PV/_*}"
-
-python_check_deps() {
- python_has_version "dev-python/setuptools[${PYTHON_USEDEP}]"
-}
-
-pre_build_checks() {
- # Check build requirements: bugs #471810, #541816, #914220
- # We're going to start doing maths here on the size of an unpacked source tarball,
- # this should make updates easier as chromium continues to balloon in size.
- # xz -l /var/cache/distfiles/chromium-${PV}*.tar.xz
- local base_disk=9 # Round up
- use test && base_disk=$((base_disk + 5))
- local extra_disk=1 # Always include a little extra space
- local memory=4
- tc-is-cross-compiler && extra_disk=$((extra_disk * 2))
- if tc-is-lto || use pgo; then
- memory=$((memory * 2 + 1))
- tc-is-cross-compiler && extra_disk=$((extra_disk * 2)) # Double the requirements
- use pgo && extra_disk=$((extra_disk + 4))
- fi
- if is-flagq '-g?(gdb)?([1-9])'; then
- if use custom-cflags; then
- extra_disk=$((extra_disk + 5))
- fi
- memory=$((memory * 2))
- fi
- local CHECKREQS_MEMORY="${memory}G"
- local CHECKREQS_DISK_BUILD="$((base_disk + extra_disk))G"
- check-reqs_${EBUILD_PHASE_FUNC}
-}
-
-pkg_pretend() {
- if [[ ${MERGE_TYPE} != binary ]]; then
- # The pre_build_checks are all about compilation resources, no need to run it for a binpkg
- pre_build_checks
- fi
-
- if use headless; then
- local headless_unused_flags=("cups" "kerberos" "pulseaudio" "qt6" "vaapi" "wayland")
- for myiuse in ${headless_unused_flags[@]}; do
- use ${myiuse} && ewarn "Ignoring USE=${myiuse}, USE=headless is set."
- done
- fi
-
- if ! use bindist && use ffmpeg-chromium; then
- ewarn "Ignoring USE=ffmpeg-chromium, USE=bindist is not set."
- fi
- if use libcxx; then
- ewarn
- ewarn "Building with libcxx, please be aware that system-*"
- ewarn "and some other c++ dependencies need to be compiled"
- ewarn "with the same c++ library as ungoogled-chromium itself"
- ewarn "dev-libs/jsoncpp is most problematic, see #58 #49 #119 for details"
- ewarn "Simplest solution would be to disable corresponding system-* flags"
- ewarn
- fi
- if use cfi; then
- ewarn
- ewarn "Building with cfi is only possible if building with -stdlib=libc++"
- ewarn "Make sure all dependencies are also built this way, see #40"
- ewarn
- fi
- if use cromite; then
- ewarn
- ewarn "Cromite patches are very experimental and unstable"
- ewarn "Please consider testing them and giving feedback upstream:"
- ewarn "https://github.com/uazo/cromite/issues"
- ewarn "Not all patches are applied, let me know if others should be considered too"
- ewarn
- fi
-}
-
-pkg_setup() {
- if [[ ${MERGE_TYPE} != binary ]]; then
- # The pre_build_checks are all about compilation resources, no need to run it for a binpkg
- pre_build_checks
-
- # We haven't massaged any CFLAGS yet, so we want to do this before we force CC/CXX to prevent warnings.
- local want_lto="false"
- tc-is-lto && want_lto="true"
-
- # The linux:unbundle toolchain in GN grabs CC, CXX, CPP (etc) from the environment
- # We'll set these to clang here then use llvm-utils functions to very explicitly set these
- # to a sane value.
- # This is effectively the 'force-clang' path if GCC support is re-added.
- if use !bundled-toolchain; then
- llvm-r1_pkg_setup
- rust_pkg_setup
-
- if tc-ld-is-mold; then
- ewarn "Mold is currently not supported, it will not be used"
- fi
-
- # Forcing clang; respect llvm_slot_x to enable selection of impl via LLVM_COMPAT
- AR=llvm-ar
- CPP="${CHOST}-clang++-${LLVM_SLOT} -E"
- NM=llvm-nm
- CC="${CHOST}-clang-${LLVM_SLOT}"
- CXX="${CHOST}-clang++-${LLVM_SLOT}"
- fi
-
- # LTO in Chromium means LLVM ThinLTO, if GCC support is re-added
- # We'll need to handle that here too.
- use_lto="false"
- local lto_usable="true"
- if [[ "$want_lto" == "true" ]]; then
- if use arm64 && [[ "${LLVM_SLOT}" -lt 22 ]]; then
- einfo "LTO is broken with LLVM 21 on arm64, ignoring CFLAGS."
- lto_usable="false"
- else
- use_lto="true"
- fi
- # We can rely on GN to do this for us; without this builds
- # take significantly longer with LTO enabled.
- filter-lto
- fi
-
- if [[ "$use_lto" == "false" ]] && use official && [[ "$lto_usable" == "true" ]]; then
- einfo "USE=official selected and LTO not detected."
- einfo "It is _highly_ recommended that LTO be enabled for performance reasons"
- einfo "and to be consistent with the upstream \"official\" build optimisations."
- fi
-
- if [[ "$use_lto" == "false" ]] && use test; then
- die "Tests require CFI which requires LTO"
- fi
-
- export use_lto
-
- if tc-is-cross-compiler; then
- use pgo && die "The pgo USE flag cannot be used when cross-compiling"
- CPP="${CBUILD}-clang++-${LLVM_SLOT} -E"
- fi
-
- # Sanity checks for development convenience
- if ver_test $(gn --version || die) -lt ${GN_MIN_VER}; then
- die "dev-build/gn >= ${GN_MIN_VER} is required to build this Chromium"
- fi
-
- # Sometimes, when adding a new LLVM slot, devs (me) forget to install an appropriate lld.
- if tc-ld-is-lld; then
- local lld_ver=$(ld.lld --version | awk '{split($2,a,"."); print a[1]}' || die "Failed to check lld version")
- if [[ ${lld_ver} -lt ${LLVM_SLOT} ]]; then
- die "Your lld version (${lld_ver}) is too old for the selected LLVM slot (${LLVM_SLOT}). Please install a newer lld or select an older LLVM slot."
- fi
- fi
- fi
-
- chromium_suid_sandbox_check_kernel_config
-}
-
-src_unpack() {
- # # Here be dragons!
- # local XCLD="--exclude=chromium-${PV/_*}/third_party/instrumented_libs \
- # --exclude=chromium-${PV/_*}/third_party/llvm \
- # --exclude=chromium-${PV/_*}/third_party/llvm-build \
- # --exclude=chromium-${PV/_*}/third_party/node/linux \
- # --exclude=chromium-${PV/_*}/third_party/rust-src \
- # --exclude=chromium-${PV/_*}/third_party/rust-toolchain \
- # --exclude=chromium-${PV/_*}/build/linux/debian_bullseye_i386-sysroot \
- # --exclude=chromium-${PV/_*}/build/linux/debian_bullseye_amd64-sysroot \
- # --exclude=chromium-${PV/_*}/third_party/angle/third_party/VK-GL-CTS \
- # "
-
- # if ! use libcxx ; then
- # XCLD+=" --exclude=chromium-${PV/_*}/third_party/libc++"
- # fi
-
- # if ! use pgo ; then
- # XCLD+=" --exclude=chromium-${PV/_*}/chrome/build/pgo_profiles"
- # fi
-
- # einfo "Unpacking chromium-${PV/_*}.tar.xz to ${WORKDIR}"
- # # Gentoo tarball:
- # # tar ${XCLD} -xf "${DISTDIR}/chromium-${PV/_*}-gentoo.tar.xz" -C "${WORKDIR}" || die
- # tar ${XCLD} -xf "${DISTDIR}/chromium-${PV/_*}${LITE_TARBALL:+-lite}.tar.xz" -C "${WORKDIR}" || die
-
- # unpack ${UGC_URL#*->}
- # # unpack chromium-patches-${PATCH_V}.tar.bz2
- # # Warned you!
-
- unpack chromium-${PV/_*}-lite.tar.xz
- unpack chromium-patches-${PATCH_V}.tar.bz2
- # These should only be required when we're not using the official toolchain
- if use !bundled-toolchain; then
- unpack chromium-patches-copium-${COPIUM_COMMIT:0:10}.tar.gz
- fi
-
- if use test; then
- # This just contains a bunch of font files that need to be unpacked (or moved) to the correct location.
- local testfonts_dir="${WORKDIR}/chromium-${PV/_*}/third_party/test_fonts/test_fonts"
- local testfonts_tar="${DISTDIR}/chromium-testfonts-${TEST_FONT:0:10}.tar.gz"
- einfo "Unpacking test fonts ..."
- tar xf "${testfonts_tar}" -C "${testfonts_dir}" || die "Failed to unpack testfonts"
- fi
-
- # We need to manually unpack this since M126 else we'd unpack one toolchain over the other.
- # Since we're doing that anyway let's unpack to sensible locations to make symlink creation easier.
- if use bundled-toolchain; then
- einfo "Unpacking bundled Clang ..."
- mkdir -p "${WORKDIR}"/clang || die "Failed to create clang directory"
- tar xf "${DISTDIR}/chromium-clang-${BUNDLED_CLANG_VER}.tar.xz" -C "${WORKDIR}/clang" || die "Failed to unpack Clang"
- einfo "Unpacking bundled Rust ..."
- local rust_dir="${WORKDIR}/rust-toolchain"
- mkdir -p "${rust_dir}" || die "Failed to create rust toolchain directory"
- tar xf "${DISTDIR}/chromium-rust-toolchain-${RUST_SHORT_HASH}-${BUNDLED_CLANG_VER%-*}.tar.xz" -C "${rust_dir}" ||
- die "Failed to unpack Rust"
- fi
-
- if use ppc64; then
- unpack chromium-openpower-${PPC64_HASH:0:10}.tar.bz2
- fi
-
- # This is a dirty hack, but we need rollup to build successfully and it's proving to be challenging
- # to build locally due to deps
- unpack rollup-wasm-node-${ROLLUP_VER}.tgz
-
- if use cromite; then
- unpack cromite-${CROMITE_COMMIT_ID}.tar.gz
- fi
-
- unpack ${UGC_URL#*->}
-}
-
-remove_compiler_builtins() {
- # We can't use the bundled compiler builtins with the system toolchain
- # We used to `grep` then `sed`, but it was indirect. Combining the two into a single
- # `awk` command is more efficient and lets us document the logic more clearly.
-
- local pattern=' configs += [ "//build/config/clang:compiler_builtins" ]'
- local target='build/config/compiler/BUILD.gn'
-
- local tmpfile
- tmpfile=$(mktemp) || die "Failed to create temporary file."
-
- if awk -v pat="${pattern}" '
- BEGIN {
- match_found = 0
- }
-
- # If the delete countdown is active, decrement it and skip to the next line.
- d > 0 { d--; next }
-
- # If the current line matches the pattern...
- $0 == pat {
- match_found = 1 # ...set our flag to true.
- d = 2 # Set delete counter for this line and the next two.
- prev = "" # Clear the buffered previous line so it is not printed.
- next
- }
-
- # For any other line, print the buffered previous line.
- NR > 1 { print prev }
-
- # Buffer the current line to be printed on the next cycle.
- { prev = $0 }
-
- END {
- # Print the last line if it was not part of a deleted block.
- if (d == 0) { print prev }
-
- # If the pattern was never found, exit with a failure code.
- if (match_found == 0) {
- exit 1
- }
- }
- ' "${target}" > "${tmpfile}"; then
- # AWK SUCCEEDED (exit code 0): The pattern was found and edited.
- # This is to avoid gawk's `-i inplace` option which users complain about.
- mv "${tmpfile}" "${target}"
- else
- # AWK FAILED (exit code 1): The pattern was not found.
- rm -f "${tmpfile}"
- die "Awk patch failed: Pattern not found in ${target}."
- fi
-}
-
-src_prepare() {
- # Calling this here supports resumption via FEATURES=keepwork
- python_setup
-
- # We'll fill this in as we go. Patches go in chromium-patches.
- local PATCHES=()
-
- rm "${WORKDIR}/chromium-patches-${PATCH_V}/common/cr131-unbundle-icu-target.patch"
- if ver_test "${RUST_SLOT}" -ge "1.95.0"; then
- sed -i '/SupportedLaneCount/d' third_party/rust/chromium_crates_io/vendor/bytemuck-v1/src/zeroable.rs || die
- sed -i '/SupportedLaneCount/d' third_party/rust/chromium_crates_io/vendor/bytemuck-v1/src/pod.rs || die
- fi
-
- PATCHES+=(
- "${WORKDIR}/chromium-patches-${PATCH_V}/common/"
- "${FILESDIR}/restore-x86-r4.patch"
- )
-
- # So many fontconfig magic numbers to cover
- # TODO: once upstream roll to 2.18.2+ set that as our minimum and remove this logic.
- # <=2.17.1 -> 9
- # >2.17.1 && <2.18.2 -> 11
- # >=2.18.2 -> 12
- local fontconfig_cache_magic=9
- if has_version ">=media-libs/fontconfig-2.18.2"; then
- fontconfig_cache_magic=12
- elif has_version ">media-libs/fontconfig-2.17.1"; then
- fontconfig_cache_magic=11
- fi
-
- sed -E -i \
- -e "s#(fb5c91b2895aa445d23aebf7f9e2189c-le64\.cache-)(9|10|11|12)#\1${fontconfig_cache_magic}#g" \
- third_party/test_fonts/fontconfig/BUILD.gn || die "Failed to set fontconfig cache magic in BUILD.gn"
-
- #cp -f ${WORKDIR}/chromium-patches-${PATCH_V}/*-compiler.patch "${T}/compiler.patch"
- ##cp -f ${FILESDIR}/chromium-147-compiler.patch "${T}/compiler.patch"
- #if ! use custom-cflags; then #See #25 #92
- # sed -i '/default_stack_frames/Q' "${T}/compiler.patch" || die
- #fi
-
- sed -E -i \
- -e "s#(kCacheKey \+ \"/-le64\.cache-)(9|10|11|12)(\")#\1${fontconfig_cache_magic}\3#g" \
- -e "s#(kCacheKey \+ \"-le64\.cache-)(9|10|11|12)(\")#\1${fontconfig_cache_magic}\3#g" \
- third_party/test_fonts/fontconfig/generate_fontconfig_caches.cc || \
- die "Failed to set fontconfig cache magic in generate_fontconfig_caches.cc"
-
- if use bundled-toolchain; then
- # We need to symlink the toolchain into the expected location
- einfo "Symlinking Clang toolchain to expected location ..."
- mkdir -p third_party/llvm-build/ || die "Failed to create llvm-build directory"
- # the 'Chromium Linux Tarballs' seem to already have 'Release+Asserts/{lib,bin}'; not sure if this is an
- # upstream change - we're using the same scripts to build, theoretically. We'll still attempt to create
- # llvm-build, but we'll rm Release+Asserts and symlink directly.
- if [[ -d third_party/llvm-build/Release+Asserts ]]; then
- rm -r third_party/llvm-build/Release+Asserts || die "Failed to remove third_party/llvm-build/Release+Asserts"
- fi
- ln -s "${WORKDIR}"/clang third_party/llvm-build/Release+Asserts || die "Failed to bundle Clang"
- einfo "Symlinking Rust toolchain to expected location ..."
- # As above, so below
- if [[ -d third_party/rust-toolchain ]]; then
- rm -r third_party/rust-toolchain || die "Failed to remove third_party/rust-toolchain"
- fi
- ln -s "${WORKDIR}"/rust-toolchain third_party/rust-toolchain || die "Failed to bundle rust"
- cp "${WORKDIR}"/rust-toolchain/VERSION \
- "${WORKDIR}"/rust-toolchain/INSTALLED_VERSION || die "Failed to set rust version"
- else
- # We don't need our toolchain patches if we're using the official toolchain
-
- # Copium patches go here.
- PATCHES+=(
- "${WORKDIR}/copium/cr143-libsync-__BEGIN_DECLS.patch"
- "${WORKDIR}/copium/cr149-unbundle-minizip-undo-unicode.patch"
- )
-
- # Automate conditional application of chromium-patches
- # The directory structure is expected to be something like:
- # chromium-patches-145/
- # ├── toolchain/
- # │ ├── cr123-foo.patch
- # │ └── cr135-bar.patch
- # ├── llvm/
- # │ ├── cr144-baz.patch
- # │ └── lt-23/
- # │ └── cr145-bleeding-edge-llvm-feature.patch
- # Where `lt-23` means "apply this patch if the LLVM version is less than 23".
- # Only categories in `slot_map` will be checked for version constraints.
- shopt -s nullglob
- local -A slot_map=( [llvm]="${LLVM_SLOT}" [rust]="${RUST_SLOT}" )
-
- for category in "${WORKDIR}/chromium-patches-${PATCH_V}"/*/; do
- local category_name="${category%/}"
- category_name="${category_name##*/}"
-
- # Skip arch-specific categories
- if [[ "${category_name}" == "ppc64le" ]]; then
- use ppc64 || continue
- fi
-
- # We applied common patches above, no need to apply them again here
- [[ "${category_name}" == "common" ]] && continue
-
- # Unconditional patches for this category
- local category_patches=( "${category}"*.patch )
- [[ ${#category_patches[@]} -gt 0 ]] && PATCHES+=( "${category}" )
-
- # Version-constrained subdirectories (e.g., llvm/lt-23/)
- for constraint_dir in "${category}"*/; do
- local dir_name="${constraint_dir%/}"
- dir_name="${dir_name##*/}"
- if [[ "${dir_name}" =~ ^lt-(.*)$ && -v slot_map[${category_name}] ]]; then
- ver_test "${slot_map[${category_name}]}" -lt "${BASH_REMATCH[1]}" &&
- PATCHES+=( "${constraint_dir}" )
- fi
- done
- done
-
- shopt -u nullglob
-
- # Strictly speaking this doesn't need to be gated (no bundled toolchain for ppc64); it keeps the logic together
- if use ppc64; then
- local patchset_dir="${WORKDIR}/openpower-patches-${PPC64_HASH}/patches"
- # patch causes build errors on 4K page systems (https://bugs.gentoo.org/show_bug.cgi?id=940304)
- local page_size_patch="ppc64le/third_party/use-sysconf-page-size-on-ppc64.patch"
- local isa_3_patch="ppc64le/core/baseline-isa-3-0.patch"
- # Apply the OpenPOWER patches (check for page size and isa 3.0)
- openpower_patches=( $(grep -E "^ppc64le|^upstream" "${patchset_dir}/series" | grep -v "${page_size_patch}" |
- grep -v "${isa_3_patch}" || die) )
- for patch in "${openpower_patches[@]}"; do
- PATCHES+=( "${patchset_dir}/${patch}" )
- done
- if [[ $(getconf PAGESIZE) == 65536 ]]; then
- PATCHES+=( "${patchset_dir}/${page_size_patch}" )
- fi
- # We use vsx3 as a proxy for 'want isa3.0' (POWER9)
- if use cpu_flags_ppc_vsx3 ; then
- PATCHES+=( "${patchset_dir}/${isa_3_patch}" )
- fi
- fi
-
- remove_compiler_builtins
-
- # We can't rely on the eselect'd Rust to actually include rustfmt, so we'll point to the selected slot specifically.
- local suffix=""
- if [[ "${RUST_TYPE}" == "binary" ]]; then
- suffix="-bin-${RUST_SLOT}"
- else
- suffix="-${RUST_SLOT}"
- fi
- sed -i "s|/bin/rustfmt|/bin/rustfmt${suffix}|g" build/rust/rust_bindgen_generator.gni ||
- die "Failed to update rustfmt path"
-
- fi
-
- # Do this before we apply patches since (e.g.) ppc64 needs to patch rollup and it's easier in ${S}
- einfo "Moving rollup wasm-node package into place ..."
- mkdir -p third_party/devtools-frontend/src/node_modules/@rollup/wasm-node ||
- die "Failed to create node_modules/@rollup/wasm-node"
- mv "${WORKDIR}"/package/* third_party/devtools-frontend/src/node_modules/@rollup/wasm-node ||
- die "Failed to move rollup package"
-
- if [ ! -z "${CHROMIUM_COMMITS[*]}" ]; then
- # for i in "${CHROMIUM_COMMITS[@]}"; do
- for i in "${!CHROMIUM_COMMITS[@]}"; do
- if [[ ${CHROMIUM_COMMITS[$i]} =~ webrtc ]]; then
- patch_prefix="webrtc"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ angle ]]; then
- patch_prefix="angle"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ quiche ]]; then
- patch_prefix="quiche"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ dawn ]]; then
- patch_prefix="dawn"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ perfetto ]]; then
- patch_prefix="perfetto"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ink ]]; then
- patch_prefix="ink"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ vulkan-utility-libraries ]]; then
- patch_prefix="vulkan-utility-libraries"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ruy ]]; then
- patch_prefix="ruy"
- else
- patch_prefix="chromium"
- fi
- pushd "${CHROMIUM_COMMITS[$i]}" > /dev/null || die
- if [[ $i = -* ]]; then
- einfo "Reverting ${patch_prefix}-${i/-}.patch"
- git_wrapper apply -R --exclude="*unittest.cc" --exclude="DEPS" \
- -p1 < "${DISTDIR}/${patch_prefix}-${i/-}.patch"
- else
- einfo "Applying ${patch_prefix}-${i/-}.patch"
- git_wrapper apply --exclude="*unittest.cc" --exclude="DEPS" \
- -p1 < "${DISTDIR}/${patch_prefix}-${i/-}.patch"
- fi
- popd > /dev/null || die
- done
- fi
-
- if ! use bluetooth ; then
- PATCHES+=(
- "${FILESDIR}/disable-bluez-r7.patch"
- )
- fi
-
- if use convert-dict ; then
- PATCHES+=(
- "${FILESDIR}/chromium-ucf-dict-utility-r3.patch"
- )
- fi
-
- if ! use libcxx ; then
- PATCHES+=(
- "${FILESDIR}/fix-wayland-oncecallback-copy.patch"
- )
- fi
-
- if use system-ffmpeg; then
- PATCHES+=(
- "${FILESDIR}/chromium-141-opus-mp3.patch"
- "${FILESDIR}/chromium-135-hevc.patch"
- )
- sed -i "\!AVFMT_FLAG_NOH264PARSE!d" media/filters/ffmpeg_glue.cc || die
- ewarn "You need to expose \"av_stream_get_first_dts\" in ffmpeg via user patch"
- fi
-
- if use system-av1; then
- PATCHES+=(
- "${FILESDIR}/chromium-system-av1.patch"
- )
- fi
-
- if use system-libvpx; then
- PATCHES+=(
- "${FILESDIR}/chromium-system-libvpx.patch"
- )
- fi
-
- if use system-openjpeg ; then
- PATCHES+=(
- "${FILESDIR}/chromium-system-openjpeg-r4.patch"
- )
- fi
-
- # if use x86 ; then
- # #* Fixes a segfault in transport_security_state_generator
- # PATCHES+=(
- # "${FILESDIR}/fix-segfault-x86.patch"
- # )
- # fi
-
- # Testing all patches when NODIE is defined
- if [ ! -z "${NODIE}" ]; then
- for i in "${PATCHES[@]}"; do
- eapply_wrapper "$i"
- done
- nonfatal eapply_user
- else
- default
- fi
-
- if use cromite ; then
- BR_PA_PATH="${WORKDIR}/cromite-${CROMITE_COMMIT_ID}/build/patches"
-
- sed -i '/b\/components\/components_strings\.grd/,+10d' "${BR_PA_PATH}/Add-cromite-flags-support.patch" || die
- sed -i '/b\/chrome\/android\/java\/res\/xml\/privacy_preferences\.xml/,+13d' "${BR_PA_PATH}/Add-cromite-flags-support.patch" || die
- sed -i '/b\/android_webview\/support_library\/java\/src\/org\/chromium\/support_lib_glue/,+11d' "${BR_PA_PATH}/Client-hints-overrides.patch" || die
- sed -i '/webapps_strings.grdp" \/>/{s++webapps_strings.grdp" /><part file="cromite_components_strings_grd/placeholder.txt"/>+;h};${x;/./{x;q0};x;q1}' \
- components/components_strings.grd || die
-
- sed -i 's/absl::/std::/' "${BR_PA_PATH}/Add-a-proxy-configuration-page.patch" || die
-
- filterdiff -p1 "${BR_PA_PATH}/JIT-site-settings.patch" --exclude="content/browser/renderer_host/render_process_host_impl.cc" \
- > "${BR_PA_PATH}/JIT-site-settings.patch1"
- mv -f "${BR_PA_PATH}/JIT-site-settings.patch1" "${BR_PA_PATH}/JIT-site-settings.patch"
-
- BROMITE_PATCHES=(
- "${BR_PA_PATH}/bromite-build-utils.patch"
- "${BR_PA_PATH}/Battery-API-return-nothing.patch"
- "${BR_PA_PATH}/Multiple-fingerprinting-mitigations.patch"
- "${BR_PA_PATH}/Add-flag-to-configure-maximum-connections-per-host.patch"
- "${BR_PA_PATH}/Add-a-proxy-configuration-page.patch"
- "${BR_PA_PATH}/Enable-StrictOriginIsolation-and-SitePerProcess.patch"
- "${BR_PA_PATH}/Disable-requests-for-single-word-Omnibar-searches.patch"
- "${BR_PA_PATH}/Reduce-HTTP-headers-in-DoH-requests-to-bare-minimum.patch"
- "${BR_PA_PATH}/Client-hints-overrides.patch"
- "${BR_PA_PATH}/Disable-idle-detection.patch"
- "${BR_PA_PATH}/Disable-TLS-resumption.patch"
- "${BR_PA_PATH}/Remove-navigator.connection-info.patch"
-
- "${BR_PA_PATH}/AudioBuffer-AnalyserNode-fp-mitigations.patch"
- "${BR_PA_PATH}/Fonts-fingerprinting-mitigation.patch"
- "${BR_PA_PATH}/Content-settings-infrastructure.patch"
- "${BR_PA_PATH}/Add-autoplay-site-setting.patch"
- "${BR_PA_PATH}/Site-setting-for-images.patch"
- "${BR_PA_PATH}/JIT-site-settings.patch"
- "${BR_PA_PATH}/Add-webGL-site-setting.patch"
- "${BR_PA_PATH}/Add-webRTC-site-settings.patch"
- "${BR_PA_PATH}/Show-site-settings-for-cookies-javascript-and-ads.patch"
- "${BR_PA_PATH}/Viewport-Protection-flag.patch"
- "${BR_PA_PATH}/Revert-remove-allowscript-content-setting-secondary-url.patch"
- "${BR_PA_PATH}/Timezone-customization.patch"
- "${BR_PA_PATH}/Disable-speechSynthesis-getVoices-API.patch"
- "${BR_PA_PATH}/Remove-support-for-device-memory-and-cpu-recovery.patch"
- "${BR_PA_PATH}/Disable-Feeback-Collector.patch"
- "${BR_PA_PATH}/Disable-remote-altsvc-for-h3-connections.patch"
- "${BR_PA_PATH}/Add-cromite-flags-support.patch"
- "${BR_PA_PATH}/Enables-deactivation-of-the-js-debugger-statement.patch"
- )
- for i in "${BROMITE_PATCHES[@]}"; do
- if [[ "$i" =~ "Add-autoplay-site-setting.patch" ]] ||
- [[ "$i" =~ "JIT-site-settings.patch" ]] ||
- [[ "$i" =~ "Site-setting-for-images.patch" ]]; then
- einfo "Git binary patch: ${i##*/}"
- git_wrapper apply -p1 < "$i"
- else
- filter_wrapper "$i" --exclude="chrome/android/*"
- fi
- done
-
- #! conflicting patches
- sed -i '/browser_features.cc/,+17d' \
- "${UGC_WD}/patches/extra/ungoogled-chromium/add-flag-to-clear-data-on-exit.patch" || die
- sed -i 's$} // namespace features$BASE_FEATURE(kClearDataOnExit, "ClearDataOnExit", base::FEATURE_DISABLED_BY_DEFAULT);}$' \
- chrome/browser/browser_features.cc || die
- sed -i 's$} // namespace features$BASE_DECLARE_FEATURE(kClearDataOnExit);}$' \
- chrome/browser/browser_features.h || die
- sed -i 's$kChromeUIAboutHost,$kChromeUIAboutHost,"ungoogled-first-run",$' \
- chrome/common/webui_url_constants.cc || die
- sed -i '/chrome\/common\/webui_url_constants.cc/Q' \
- "${UGC_WD}/patches/extra/ungoogled-chromium/first-run-page.patch" || die
-
- #! normalise paths in py
- sed -i 's$os.path.dirname(include_file)$os.path.abspath(os.path.dirname(include_file))$' \
- build/bromite/gyp/cpp_bromite_include.py || die
- fi
-
- # if [[ ${LLVM_SLOT} == "19" ]]; then
- # # Upstream now hard depend on a feature that was added in LLVM 20.1, but we don't want to stabilise that yet.
- # # Do the temp file shuffle in case someone is using something other than `gawk`
- # {
- # awk '/config\("clang_warning_suppression"\) \{/ { print $0 " }"; sub(/clang/, "xclang"); print; next }
- # { print }' build/config/compiler/BUILD.gn > "${T}/build.gn" && \
- # mv "${T}/build.gn" build/config/compiler/BUILD.gn
- # } || die "Unable to disable warning suppression"
- # fi
-
- ## Not included in -lite tarballs, but we should check for it anyway.
- #if [[ -f third_party/node/linux/node-linux-x64/bin/node ]]; then
- # rm third_party/node/linux/node-linux-x64/bin/node || die
- #else
- # mkdir -p third_party/node/linux/node-linux-x64/bin || die
- #fi
- #ln -s "${EPREFIX}"/usr/bin/node third_party/node/linux/node-linux-x64/bin/node || die
-
- cp "${FILESDIR}/libusb.gn" build/linux/unbundle || die
- sed -i '/^REPLACEMENTS.*$/{s++REPLACEMENTS = {"libusb":"third_party/libusb/BUILD.gn",+;h};${x;/./{x;q0};x;q1}' \
- build/linux/unbundle/replace_gn_files.py || die
- sed -i '/^.*deps.*third_party\/jsoncpp.*$/{s++public_deps \+= [ "//third_party/jsoncpp" ]+;h};${x;/./{x;q0};x;q1}' \
- third_party/webrtc/rtc_base/BUILD.gn || die
-
- if use override-data-dir; then
- sed -i '/"chromium";/{s++"ungoogled-chromium";+;h};${x;/./{x;q0};x;q1}' \
- chrome/common/chrome_paths_linux.cc || die
- fi
-
- if use system-abseil-cpp; then
- eapply_wrapper "${FILESDIR}/chromium-147-system-abseil.patch"
-
- #! SFINAE mangling incompatibility between clang and gcc:
- #! https://github.com/llvm/llvm-project/issues/85656
- #! gcc: _ZN4absl12lts_202601074CordC1INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELi0EEEOT_
- #! clang: _ZN4absl12lts_202601074CordC1INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEETnNSt9enable_ifIXsr3std7is_sameIT_S8_EE5valueEiE4typeELi0EEEOSA_
- #! So, either this:
- eapply_wrapper "${FILESDIR}/chromium-141-system-abseil-cord.patch"
- #! or build with -fclang-abi-compat=17
-
- # cp -f /usr/include/absl/base/options.h third_party/abseil-cpp/absl/base/options.h
- # sed -i '/^#define ABSL_OPTION_USE_STD_ORDERING.*$/{s++#define ABSL_OPTION_USE_STD_ORDERING 1+;h};${x;/./{x;q0};x;q1}' \
- # third_party/abseil-cpp/absl/base/options.h || die
- fi
-
- #* Applying UGC PRs here
- if [ ! -z "${UGC_PR_COMMITS[*]}" ]; then
- pushd "${UGC_WD}" >/dev/null
- for i in "${UGC_PR_COMMITS[@]}"; do
- eapply_wrapper "${DISTDIR}/${PN}-$i.patch"
- done
- popd >/dev/null
- fi
-
- # From here we adapt ungoogled-chromium's patches to our needs
- local ugc_pruning_list="${UGC_WD}/pruning.list"
- local ugc_patch_series="${UGC_WD}/patches/series"
- local ugc_substitution_list="${UGC_WD}/domain_substitution.list"
-
- local ugc_unneeded=(
- # GN bootstrap
- extra/debian/gn/parallel
- # following Gentoo's Chromium
- core/ungoogled-chromium/build-with-wasm-rollup
- )
-
- if use cromite ; then
- einfo "Using fingerprinting patches from Cromite instead"
- ugc_unneeded+=(
- extra/bromite/fingerprinting-flags-client-rects-and-measuretext
- extra/bromite/flag-max-connections-per-host
- extra/bromite/flag-fingerprinting-canvas-image-data-noise
- extra/ungoogled-chromium/add-components-ungoogled
- extra/ungoogled-chromium/remove-pac-size-limit
- )
- fi
-
- # #* Temporary fix
- # sed -i "\!ios/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/icu/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/libjpeg_turbo/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/snappy/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/closure_compiler/!d" "${ugc_pruning_list}" || die
-
- # #* Didn't unpack them at the first place
- # sed -i "\!build/linux/debian_bullseye_i386-sysroot!d" "${ugc_pruning_list}" || die
- # sed -i "\!build/linux/debian_bullseye_amd64-sysroot!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/llvm-build!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/node/linux!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/rust-src!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/rust-toolchain!d" "${ugc_pruning_list}" || die
- # if ! use libcxx ; then
- # sed -i "\!third_party/libc!d" "${ugc_pruning_list}" || die
- # fi
- sed -i "s|debug('files|error('files|" \
- "${UGC_WD}/utils/prune_binaries.py" || die
- sed -i "\!third_party/node/linux!d" \
- "${UGC_WD}/utils/prune_binaries.py" || die
-
- local ugc_p ugc_dir
- for p in "${ugc_unneeded[@]}"; do
- einfo "Removing ${p}.patch"
- sed -i "\!${p}.patch!d" "${ugc_patch_series}" || die
- done
-
- if [ ! -z "${UGC_SKIP_PATCHES}" ]; then
- for p in ${UGC_SKIP_PATCHES}; do
- ewarn "Removing ${p}"
- sed -i "\!${p}!d" "${ugc_patch_series}" || die
- done
- fi
-
- if [ ! -z "${UGC_KEEP_BINARIES}" ]; then
- for p in ${UGC_KEEP_BINARIES}; do
- ewarn "Keeping binary ${p}"
- sed -i "\!${p}!d" "${ugc_pruning_list}" || die
- done
- fi
-
- if [ ! -z "${UGC_SKIP_SUBSTITUTION}" ]; then
- for p in ${UGC_SKIP_SUBSTITUTION}; do
- ewarn "No substitutions in ${p}"
- sed -i "\!${p}!d" "${ugc_substitution_list}" || die
- done
- fi
-
- ebegin "Pruning binaries"
- "${UGC_WD}/utils/prune_binaries.py" -q . "${UGC_WD}/pruning.list"
- eend $? || die
-
- ebegin "Applying ungoogled-chromium patches"
- "${UGC_WD}/utils/patches.py" -q apply . "${UGC_WD}/patches"
- eend $? || die
-
- ebegin "Applying domain substitution"
- "${UGC_WD}/utils/domain_substitution.py" -q apply -r "${UGC_WD}/domain_regex.list" -f "${UGC_WD}/domain_substitution.list" .
- eend $? || die
-
- # Sanity check esbuild version before we start removing files.
- # We _could_ patch the version check out - in theory esbuild upstream are being super conservative after
- # arch(AUR) packaged an `esbuild` binary and set ESBUILD_BINARY_PATH=/usr/bin/esbuild, causing much breakage,
- # but this is fine too and exactly matches what upstream are expecting.
- # https://github.com/evanw/esbuild/issues/2894
- local esbuild_js="${S}/third_party/devtools-frontend/src/node_modules/esbuild/lib/main.js"
- local found
- found=$(awk -F'"' '/if \(binaryVersion !==/ {print $2}' "${esbuild_js}")
- if [[ "${found}" != "${ESBUILD_VER}" ]]; then
- die "esbuild version mismatch: expected ${ESBUILD_VER}, found ${found}"
- fi
-
- elog "Removing bundled binaries from source tree ..."
- # Purge bundled ELF files: These are non-portable and will cause issues if used instead of system versions.
- # Use `--wasm` to also remove WebAssembly binaries, if desired - they're portable so shouldn't break builds.
- ${EPYTHON} "${FILESDIR}/bin-finder.py" --elf "${S}" | awk '{print $1}' | xargs rm -f ||
- die "Failed to remove bundled binaries"
-
- # And now we restore any that we actually need, from the host system
- local esbuild_path="${S}/third_party/devtools-frontend/src/third_party/esbuild"
- local -A restore_list=(
- ["/usr/bin/esbuild-${ESBUILD_VER}"]="${esbuild_path}/esbuild"
- ["/usr/bin/gperf"]="${S}/third_party/gperf/cipd/bin/gperf"
- ["/usr/bin/node"]="${S}/third_party/node/linux/node-linux-x64/bin/node"
- )
-
- for src in "${!restore_list[@]}"; do
- dst="${restore_list[${src}]}"
- if [[ -f "${src}" ]]; then
- einfo "Symlinking ${src} ..."
- # Make sure the parent dir exists; some tarballs don't include (e.g.) node's bindir
- mkdir -p "$(dirname "${dst}")" || die "Failed to create directory for ${dst}"
- ln -s "${src}" "${dst}" || die "Failed to symlink ${dst} from ${src}"
- if [[ ! -L "${dst}" || "$(readlink -f "${dst}")" != "${src}" ]]; then
- die "Symlink verification failed for ${dst} -> ${src}"
- fi
- else
- die "Expected to find ${src} to restore ${dst}, but it does not exist."
- fi
- done
-
- # adjust python interpreter version
- sed -i -e "s|\(^script_executable = \).*|\1\"${EPYTHON}\"|g" .gn || die
-
- # Use the system copy of hwdata's usb.ids
- sed 's|//third_party/usb_ids/src/usb.ids|/usr/share/hwdata/usb.ids|g' \
- -i services/device/public/cpp/usb/BUILD.gn || die "Failed to set system usb.ids path"
-
- # remove_bundled_libraries.py walks the source tree and looks for paths containing the substring 'third_party'
- # whitelist matches use the right-most matching path component, so we need to whitelist from that point down.
- local keeplibs=(
- base/third_party/cityhash
- )
- use system-double-conversion || keeplibs+=(
- base/third_party/double_conversion
- )
- keeplibs+=(
- base/third_party/icu
- base/third_party/nspr
- base/third_party/superfasthash
- base/third_party/symbolize
- base/third_party/xdg_user_dirs
- buildtools/third_party/libc++
- buildtools/third_party/libc++abi
- )
- use cromite && keeplibs+=(
- cromite_flags/third_party
- )
- keeplibs+=(
- net/third_party/mozilla_security_manager
- net/third_party/quic
- net/third_party/uri_template
- )
- use system-abseil-cpp || keeplibs+=(
- third_party/abseil-cpp
- )
- keeplibs+=(
- third_party/angle
- third_party/angle/src/common/third_party/xxhash
- third_party/angle/src/third_party/ceval
- )
- use nvidia || keeplibs+=(
- third_party/angle/src/third_party/libXNVCtrl
- )
- keeplibs+=(
- third_party/angle/src/third_party/volk
- third_party/anonymous_tokens
- third_party/apple_apsl
- third_party/axe-core
- third_party/bidimapper
- third_party/blink
- third_party/boringssl
- third_party/boringssl/src/third_party/fiat
- third_party/breakpad
- third_party/breakpad/breakpad/src/third_party/curl
- )
- use system-brotli || keeplibs+=(
- third_party/brotli
- )
- keeplibs+=(
- third_party/catapult
- third_party/catapult/common/py_vulcanize/third_party/rcssmin
- third_party/catapult/common/py_vulcanize/third_party/rjsmin
- third_party/catapult/third_party/beautifulsoup4-4.9.3
- third_party/catapult/third_party/html5lib-1.1
- third_party/catapult/third_party/polymer
- third_party/catapult/third_party/six
- third_party/catapult/third_party/typ
- third_party/catapult/tracing/third_party/d3
- third_party/catapult/tracing/third_party/gl-matrix
- third_party/catapult/tracing/third_party/jpeg-js
- third_party/catapult/tracing/third_party/jszip
- third_party/catapult/tracing/third_party/mannwhitneyu
- third_party/catapult/tracing/third_party/oboe
- third_party/catapult/tracing/third_party/pako
- third_party/ced
- third_party/cld_3
- third_party/closure_compiler
- )
- use libcxx && keeplibs+=(
- third_party/compiler-rt
- )
- keeplibs+=(
- third_party/content_analysis_sdk
- third_party/cpuinfo
- third_party/crabbyavif
- third_party/crashpad
- third_party/crashpad/crashpad/third_party/lss
- third_party/crashpad/crashpad/third_party/zlib
- )
- use system-crc32c || keeplibs+=(
- third_party/crc32c
- )
- keeplibs+=(
- third_party/cros_system_api
- third_party/d3
- third_party/dawn
- third_party/dawn/third_party/gn/webgpu-cts
- third_party/dawn/third_party/OpenGL-Registry
- third_party/dawn/third_party/renderdoc
- third_party/dawn/third_party/webgpu-headers
- third_party/depot_tools
- third_party/devscripts
- third_party/devtools-frontend
- third_party/devtools-frontend/src/front_end/third_party/acorn
- third_party/devtools-frontend/src/front_end/third_party/additional_readme_paths.json
- third_party/devtools-frontend/src/front_end/third_party/axe-core
- third_party/devtools-frontend/src/front_end/third_party/chromium
- third_party/devtools-frontend/src/front_end/third_party/codemirror
- third_party/devtools-frontend/src/front_end/third_party/csp_evaluator
- third_party/devtools-frontend/src/front_end/third_party/diff
- third_party/devtools-frontend/src/front_end/third_party/i18n
- third_party/devtools-frontend/src/front_end/third_party/intl-messageformat
- third_party/devtools-frontend/src/front_end/third_party/json5
- third_party/devtools-frontend/src/front_end/third_party/legacy-javascript
- third_party/devtools-frontend/src/front_end/third_party/lighthouse
- third_party/devtools-frontend/src/front_end/third_party/lit
- third_party/devtools-frontend/src/front_end/third_party/marked
- third_party/devtools-frontend/src/front_end/third_party/puppeteer
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/third_party/mitt
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/third_party/parsel-js
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/third_party/rxjs
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/third_party/urlpattern-polyfill
- third_party/devtools-frontend/src/front_end/third_party/source-map-scopes-codec
- third_party/devtools-frontend/src/front_end/third_party/third-party-web
- third_party/devtools-frontend/src/front_end/third_party/vscode.web-custom-data
- third_party/devtools-frontend/src/front_end/third_party/wasmparser
- third_party/devtools-frontend/src/front_end/third_party/web-vitals
- third_party/devtools-frontend/src/third_party
- third_party/dom_distiller_js
- third_party/dragonbox
- third_party/eigen3
- third_party/emoji-segmenter
- third_party/farmhash
- third_party/fast_float
- third_party/fdlibm
- third_party/federated_compute/chromium/fcp/confidentialcompute
- third_party/federated_compute/chromium/fcp/protos
- third_party/federated_compute/chromium/fcp/secagg
- third_party/federated_compute/chromium/fcp/client
- third_party/federated_compute/src/fcp/base
- third_party/federated_compute/src/fcp/confidentialcompute
- third_party/federated_compute/src/fcp/protos
- third_party/federated_compute/src/fcp/client
- third_party/federated_compute/src/fcp/secagg
- third_party/federated_compute/third_party/googleapis/src/google
- third_party/federated_compute/third_party/tensorflow-federated
- third_party/federated_compute/third_party/protodatastore-cpp
- third_party/fft2d
- third_party/flatbuffers
- third_party/fp16
- third_party/freetype
- third_party/fusejs
- third_party/fxdiv
- third_party/gemmlowp
- third_party/google_input_tools
- third_party/google_input_tools/third_party/closure_library
- third_party/google_input_tools/third_party/closure_library/third_party/closure
- third_party/googletest
- third_party/gperf # We symlink system gperf, but this will purge the symlink since we tidy up afterwards.
- third_party/highway
- third_party/hunspell
- third_party/hyphenation-patterns
- third_party/ink/src/ink/brush
- third_party/ink/src/ink/color
- third_party/ink/src/ink/geometry
- third_party/ink/src/ink/rendering
- third_party/ink/src/ink/rendering/skia/common_internal
- third_party/ink/src/ink/rendering/skia/native
- third_party/ink/src/ink/rendering/skia/native/internal
- third_party/ink/src/ink/strokes
- third_party/ink/src/ink/types
- third_party/inspector_protocol
- third_party/ipcz
- third_party/jinja2
- )
- use system-jsoncpp || keeplibs+=(
- third_party/jsoncpp
- )
- keeplibs+=(
- third_party/khronos
- third_party/lens_server_proto
- third_party/leveldatabase
- third_party/libaddressinput
- third_party/libdrm
- third_party/libgav1
- third_party/libjingle
- third_party/libpfm4
- third_party/libphonenumber
- third_party/libpng
- third_party/libsecret
- third_party/libsrtp
- third_party/libsync
- third_party/libtess2/libtess2
- third_party/libtess2/src/Include
- third_party/libtess2/src/Source
- third_party/liburlpattern
- )
- use system-libusb || keeplibs+=(
- third_party/libusb
- )
- keeplibs+=(
- third_party/libva_protected_content
- )
- use system-libvpx || keeplibs+=(
- third_party/libvpx
- third_party/libvpx/source/libvpx/third_party/x86inc
- )
- keeplibs+=(
- third_party/libwebm
- third_party/libx11
- third_party/libxcb-keysyms
- third_party/libxml/chromium
- third_party/libyuv
- third_party/libzip
- third_party/lit
- )
- use libcxx && keeplibs+=(
- third_party/llvm-libc
- third_party/llvm-libc/src/shared/
- )
- keeplibs+=(
- third_party/lottie
- third_party/lss
- third_party/lzma_sdk
- third_party/mako
- third_party/markupsafe
- third_party/material_color_utilities
- third_party/metrics_proto
- third_party/minigbm
- third_party/ml_dtypes
- third_party/modp_b64
- third_party/nasm
- third_party/nearby
- third_party/neon_2_sse
- third_party/node
- third_party/oak/chromium/proto
- third_party/oak/chromium/proto/attestation
- third_party/omnibox_proto
- third_party/one_euro_filter
- third_party/openscreen
- third_party/openscreen/src/third_party/
- third_party/openscreen/src/third_party/tinycbor/src/src
- third_party/ots
- third_party/pdfium
- third_party/pdfium/third_party/agg23
- third_party/pdfium/third_party/bigint
- third_party/pdfium/third_party/freetype
- third_party/pdfium/third_party/lcms
- )
- use system-openjpeg || keeplibs+=(
- third_party/pdfium/third_party/libopenjpeg
- )
- keeplibs+=(
- third_party/pdfium/third_party/libtiff
- third_party/perfetto
- third_party/perfetto/protos/third_party/android
- third_party/perfetto/protos/third_party/chromium
- third_party/perfetto/protos/third_party/pprof
- third_party/perfetto/protos/third_party/primes
- third_party/perfetto/protos/third_party/simpleperf
- third_party/pffft
- third_party/ply
- third_party/polymer
- third_party/private_membership
- third_party/private-join-and-compute
- third_party/protobuf
- third_party/protobuf/third_party/utf8_range
- third_party/pthreadpool
- third_party/puffin
- third_party/pyjson5
- third_party/pyyaml
- third_party/rapidhash
- third_party/readability
- third_party/rnnoise
- third_party/rust
- third_party/ruy
- third_party/s2cellid
- third_party/search_engines_data
- third_party/securemessage
- third_party/selenium-atoms
- third_party/sentencepiece
- third_party/sentencepiece/src/third_party/darts_clone
- third_party/shell-encryption
- third_party/simdutf
- third_party/simplejson
- third_party/six
- third_party/skia
- third_party/skia/include/third_party/vulkan
- third_party/smhasher
- )
- use system-snappy || keeplibs+=(
- third_party/snappy
- )
- keeplibs+=(
- third_party/spirv-headers
- third_party/spirv-tools
- third_party/sqlite
- third_party/swiftshader
- third_party/swiftshader/third_party/astc-encoder
- third_party/swiftshader/third_party/llvm-subzero
- third_party/swiftshader/third_party/marl
- third_party/swiftshader/third_party/SPIRV-Headers/include/spirv
- third_party/swiftshader/third_party/SPIRV-Tools
- third_party/swiftshader/third_party/subzero
- third_party/tensorflow_models
- third_party/tensorflow-text
- third_party/tflite
- third_party/tflite/src/third_party/fft2d
- third_party/tflite/src/third_party/xla/third_party/tsl
- third_party/tflite/src/third_party/xla/xla/tsl/framework
- third_party/tflite/src/third_party/xla/xla/tsl/lib/random
- third_party/tflite/src/third_party/xla/xla/tsl/platform
- third_party/tflite/src/third_party/xla/xla/tsl/protobuf
- third_party/tflite/src/third_party/xla/xla/tsl/util
- third_party/ukey2
- third_party/utf
- third_party/vulkan
- third_party/wayland
- third_party/webdriver
- third_party/webgpu-cts
- third_party/webrtc
- third_party/webrtc/common_audio/third_party/ooura
- third_party/webrtc/common_audio/third_party/spl_sqrt_floor
- third_party/webrtc/modules/third_party/fft
- third_party/webrtc/modules/third_party/g711
- third_party/webrtc/modules/third_party/g722
- third_party/widevine
- )
- use system-woff2 || keeplibs+=(
- third_party/woff2
- )
- keeplibs+=(
- third_party/wuffs
- third_party/x11proto
- third_party/xcbproto
- third_party/xnnpack
- third_party/zlib/google
- third_party/zxcvbn-cpp
- url/third_party/mozilla
- v8/third_party/glibc
- v8/third_party/inspector_protocol
- v8/third_party/rapidhash-v8
- v8/third_party/siphash
- v8/third_party/utf8-decoder
- v8/third_party/v8
- v8/third_party/valgrind
-
- # gyp -> gn leftovers
- third_party/speech-dispatcher
- third_party/usb_ids
- )
-
- if use test; then
- keeplibs+=(
- third_party/breakpad/breakpad/src/processor
- third_party/fuzztest
- third_party/google_benchmark/src/include/benchmark
- third_party/google_benchmark/src/src
- third_party/test_fonts
- third_party/test_fonts/fontconfig
- third_party/test_fonts/test_fonts
- )
- fi
-
- # USE=system-*
- if ! use system-harfbuzz; then
- keeplibs+=( third_party/harfbuzz )
- fi
-
- if ! use system-ffmpeg; then
- keeplibs+=( third_party/ffmpeg third_party/opus )
- fi
-
- if ! use system-icu; then
- keeplibs+=( third_party/icu )
- fi
-
- if ! use system-zstd; then
- keeplibs+=( third_party/zstd )
- fi
-
- if ! use system-av1; then
- keeplibs+=(
- third_party/dav1d
- third_party/libaom
- third_party/libaom/source/libaom/third_party/fastfeat
- third_party/libaom/source/libaom/third_party/vector
- third_party/libaom/source/libaom/third_party/x86inc
- )
- fi
-
- if use libcxx; then
- keeplibs+=(
- third_party/libc++
- third_party/llvm-libc
- )
- fi
-
- if ! use system-openh264; then
- keeplibs+=( third_party/openh264 )
- fi
-
- if ! use system-re2; then
- keeplibs+=( third_party/re2 )
- fi
-
- # Arch-specific
- if use arm64 || use ppc64 ; then
- keeplibs+=( third_party/swiftshader/third_party/llvm-10.0 )
- fi
- # we need to generate ppc64 stuff because upstream does not ship it yet
- # it has to be done before unbundling.
- if use ppc64; then
- pushd third_party/libvpx >/dev/null || die
- mkdir -p source/config/linux/ppc64 || die
- # requires git and clang, bug #832803
- # Revert https://chromium.googlesource.com/chromium/src/+/b463d0f40b08b4e896e7f458d89ae58ce2a27165%5E%21/third_party/libvpx/generate_gni.sh
- # and https://chromium.googlesource.com/chromium/src/+/71ebcbce867dd31da5f8b405a28fcb0de0657d91%5E%21/third_party/libvpx/generate_gni.sh
- # since we're not in a git repo
- sed -i -e "s|^update_readme||g; s|clang-format|${EPREFIX}/bin/true|g; /^git -C/d; /git cl/d; /cd \$BASE_DIR\/\$LIBVPX_SRC_DIR/ign format --in-place \$BASE_DIR\/BUILD.gn\ngn format --in-place \$BASE_DIR\/libvpx_srcs.gni" \
- generate_gni.sh || die
- ./generate_gni.sh || die
- popd >/dev/null || die
-
- pushd third_party/ffmpeg >/dev/null || die
- cp libavcodec/ppc/h264dsp.c libavcodec/ppc/h264dsp_ppc.c || die
- cp libavcodec/ppc/h264qpel.c libavcodec/ppc/h264qpel_ppc.c || die
- popd >/dev/null || die
- fi
-
- # Sanity check keeplibs, on major version bumps it is often necessary to update this list
- # and this enables us to hit them all at once.
- # There are some entries that need to be whitelisted (TODO: Why? The file is understandable, the rest seem odd)
- whitelist_libs=(
- net/third_party/quic
- third_party/devtools-frontend/src/front_end/third_party/additional_readme_paths.json
- third_party/libjingle
- third_party/mesa
- third_party/skia/third_party/vulkan
- third_party/vulkan
- )
- local not_found_libs=()
- for lib in "${keeplibs[@]}"; do
- if [[ ! -d "${lib}" ]] && ! has "${lib}" "${whitelist_libs[@]}"; then
- not_found_libs+=( "${lib}" )
- fi
- done
-
- if [[ ${#not_found_libs[@]} -gt 0 ]]; then
- ewarn "The following \`keeplibs\` directories were not found in the source tree:"
- for lib in "${not_found_libs[@]}"; do
- ewarn " ${lib}"
- done
- fi
-
- keeplibs+=( third_party/ungoogled )
-
- # Remove most bundled libraries. Some are still needed.
- einfo "Unbundling third-party libraries ..."
- build/linux/unbundle/remove_bundled_libraries.py "${keeplibs[@]}" --do-remove || die
-
- # Interferes with our bundled clang path; we don't want stripped binaries anyway.
- sed -i -e 's|${clang_base_path}/bin/llvm-strip|/bin/true|g' \
- -e 's|${clang_base_path}/bin/llvm-objcopy|/bin/true|g' \
- build/linux/strip_binary.gni || die
-}
-
-src_configure() {
- # Calling this here supports resumption via FEATURES=keepwork
- python_setup
-
- # 974899: sometimes people try to build with a non-Unicode locale and python gets very upset
- python_export_utf8_locale || die "Chromium builds require a UTF-8 locale."
-
- # Bug 491582.
- export TMPDIR="${WORKDIR}/temp"
- mkdir -p -m 755 "${TMPDIR}" || die
-
- # https://bugs.gentoo.org/654216
- addpredict /dev/dri/ #nowarn
-
- # Use system-provided libraries.
- # TODO: freetype -- remove sources (https://bugs.chromium.org/p/pdfium/issues/detail?id=733).
- # TODO: use_system_hunspell (upstream changes needed).
- # TODO: use_system_protobuf (bug #525560).
- # TODO: use_system_sqlite (http://crbug.com/22208).
-
- # libevent: https://bugs.gentoo.org/593458
- local gn_system_libraries=(
- flac
- fontconfig
- freetype
- libjpeg
- libwebp
- libxml
- libxslt
- zlib
- )
- if use system-abseil-cpp; then
- gn_system_libraries+=(
- absl_algorithm
- absl_base
- absl_cleanup
- absl_container
- absl_crc
- absl_debugging
- absl_flags
- absl_functional
- absl_hash
- absl_log
- absl_log_internal
- absl_memory
- absl_meta
- absl_numeric
- absl_random
- absl_status
- absl_strings
- absl_synchronization
- absl_time
- absl_types
- absl_utility
- )
- fi
- if use system-brotli; then
- gn_system_libraries+=( brotli )
- fi
- if use system-crc32c; then
- gn_system_libraries+=( crc32c )
- fi
- if use system-double-conversion; then
- gn_system_libraries+=( double-conversion )
- fi
- if use system-woff2; then
- gn_system_libraries+=( woff2 )
- fi
- if use nvidia; then
- gn_system_libraries+=( libXNVCtrl )
- fi
- if use system-ffmpeg; then
- gn_system_libraries+=( ffmpeg opus )
- fi
- if use system-jsoncpp; then
- gn_system_libraries+=( jsoncpp )
- fi
- if use system-icu; then
- gn_system_libraries+=( icu )
- fi
- if use system-zstd; then
- gn_system_libraries+=( zstd )
- fi
- if use system-av1; then
- gn_system_libraries+=( dav1d libaom )
- fi
- if use system-libusb; then
- gn_system_libraries+=( libusb )
- fi
- if use system-libvpx; then
- gn_system_libraries+=( libvpx )
- fi
- use system-openh264 && gn_system_libraries+=(
- openh264
- )
- use system-re2 && gn_system_libraries+=(
- re2
- )
- use system-snappy && gn_system_libraries+=(
- snappy
- )
-
- build/linux/unbundle/replace_gn_files.py --system-libraries "${gn_system_libraries[@]}" ||
- die "Failed to replace GN files for system libraries"
-
- # TODO 131: The above call clobbers `enable_freetype = true` in the freetype gni file
- # drop the last line, then append the freetype line and a new curly brace to end the block
- local freetype_gni="build/config/freetype/freetype.gni"
- sed -i -e '$d' ${freetype_gni} || die
- echo " enable_freetype = true" >> ${freetype_gni} || die
- echo "}" >> ${freetype_gni} || die
-
- if use !custom-cflags; then
- replace-flags "-Os" "-O2"
- strip-flags
- # Debug info section overflows without component build
- # Prevent linker from running out of address space, bug #471810 .
- filter-flags "-g*"
- # 949123: Several multimedia components explicitly build with specific CFLAGS and
- # use runtime detection to enable optimisations; unfortunately any of our CFLAGS are suffixed
- # to the end of the command line, which causes build failures.
- fi
- # Since M150 `skia` will begin breaking for x86_64 due to compilation of `avx512` code paths;
- # we need to filter these for all arches.
- filter-flags "-march*" "-mtune*" "-mcpu*"
-
- # We don't use the same clang version as upstream, and with -Werror
- # we need to make sure that we don't get superfluous warnings.
- append-flags -Wno-unknown-warning-option
- if tc-is-cross-compiler; then # can you cross-compile with the bundled toolchain?
- export BUILD_CXXFLAGS+=" -Wno-unknown-warning-option"
- export BUILD_CFLAGS+=" -Wno-unknown-warning-option"
- fi
-
- # Start building our GN options
- local myconf_gn=() # Tip: strings must be quoted, bools or numbers are fine
-
- if use !bundled-toolchain; then
- # We already forced the "correct" clang via pkg_setup
-
- if tc-is-cross-compiler; then
- CC="${CC} -target ${CHOST} --sysroot ${ESYSROOT}"
- CXX="${CXX} -target ${CHOST} --sysroot ${ESYSROOT}"
- BUILD_AR=${AR}
- BUILD_CC=${CC}
- BUILD_CXX=${CXX}
- BUILD_NM=${NM}
- fi
-
- # Make sure the build system will use the right tools, bug #340795.
- tc-export AR CC CXX NM
-
- strip-unsupported-flags
- append-ldflags -Wl,--undefined-version # https://bugs.gentoo.org/918897#c32
-
- myconf_gn+=(
- "is_clang=true"
- "clang_use_chrome_plugins=false"
- "use_clang_modules=false" # M141 enables this for the linux platform by default.
- 'custom_toolchain="//build/toolchain/linux/unbundle:default"'
- # From M127 we need to provide a location for libclang and the clang resource dir so that bindgen can find them
- "bindgen_libclang_path=\"$(get_llvm_prefix)/$(get_libdir)\""
- "bindgen_clang_resource_dir=\"${EPREFIX}/usr/lib/clang/${LLVM_SLOT}/include\""
- "bindgen_extra_clang_args=[\"-I${EPREFIX}/usr/lib/clang/${LLVM_SLOT}/include\"]"
- "clang_base_path=\"${EPREFIX}/usr/lib/clang/${LLVM_SLOT}/\""
- "rust_bindgen_root=\"${EPREFIX}/usr/\""
- "rust_sysroot_absolute=\"$(get_rust_prefix)\""
- "rustc_version=\"${RUST_SLOT}\""
- )
-
- # Currently disabled, runtime issues with mold
- #if tc-ld-is-mold; then
- # myconf_gn+=(
- # "use_mold=true"
- # "use_lld=false"
- # "linker_path=\"${EPREFIX}/usr/bin/mold\""
- # )
- #else
- myconf_gn+=( "use_lld=true" )
- #fi
-
- if [[ ${LLVM_SLOT} -lt 23 ]]; then
- # Workaround for -fsanitize-ignore-for-ubsan-feature (added in LLVM 23)
- myconf_gn+=( 'clang_has_ubsan_feature_ignore=false' )
- fi
-
- if ! tc-is-cross-compiler; then
- myconf_gn+=( 'host_toolchain="//build/toolchain/linux/unbundle:default"' )
- else
- tc-export BUILD_{AR,CC,CXX,NM}
- myconf_gn+=(
- 'host_toolchain="//build/toolchain/linux/unbundle:host"'
- 'v8_snapshot_toolchain="//build/toolchain/linux/unbundle:host"'
- "host_pkg_config=\"$(tc-getBUILD_PKG_CONFIG)\""
- "pkg_config=\"$(tc-getPKG_CONFIG)\""
- )
-
- # setup cups-config, build system only uses --libs option
- if use cups; then
- mkdir "${T}/cups-config" || die
- cp "${ESYSROOT}/usr/bin/${CHOST}-cups-config" "${T}/cups-config/cups-config" || die
- export PATH="${PATH}:${T}/cups-config"
- fi
-
- # Don't inherit PKG_CONFIG_PATH from environment
- local -x PKG_CONFIG_PATH=
- fi
-
- fi # !bundled-toolchain
-
- local myarch
- myarch="$(tc-arch)"
- case ${myarch} in
- amd64)
- # Bug 530248, 544702, 546984, 853646.
- use !custom-cflags && filter-flags -mno-mmx -mno-sse2 -mno-ssse3 -mno-sse4.1 \
- -mno-avx -mno-avx2 -mno-fma -mno-fma4 -mno-xop -mno-sse4a
- myconf_gn+=( 'target_cpu="x64"' )
- ;;
- x86)
- # Bug 530248, 544702, 546984, 853646.
- use !custom-cflags && filter-flags -mno-mmx -mno-sse2 -mno-ssse3 -mno-sse4.1 \
- -mno-avx -mno-avx2 -mno-fma -mno-fma4 -mno-xop -mno-sse4a
- myconf_gn+=( 'target_cpu="x86"' )
- ;;
- arm64)
- myconf_gn+=( 'target_cpu="arm64"' )
- ;;
- ppc64)
- myconf_gn+=( 'target_cpu="ppc64"' )
- ;;
- *)
- die "Failed to determine target arch, got '${myarch}'."
- ;;
- esac
-
- # Common options
-
- myconf_gn+=(
- # Disable code formating of generated files
- "blink_enable_generated_code_formatting=false"
- # enable DCHECK with USE=debug only, increases chrome binary size by 30%, bug #811138.
- # DCHECK is fatal by default, make it configurable at runtime, #bug 807881.
- "dcheck_always_on=$(usex debug true false)"
- "dcheck_is_configurable=$(usex debug true false)"
- # Chromium builds provided by Linux distros should disable the testing config
- "disable_fieldtrial_testing_config=true"
- # Custom patch: Enable building Chromium as individual channels (e.g. stable, beta, dev) that
- # use different profile directories, desktop entries, etc. This enables slotting the ebuild.
- "enable_channel_branding=true"
- # 131 began laying the groundwork for replacing freetype with
- # "Rust-based Fontations set of libraries plus Skia path rendering"
- # We now need to opt-in
- "enable_freetype=true"
- "enable_hangout_services_extension=$(usex hangouts true false)"
- # Don't need nocompile checks and GN crashes with our config (verify with modern GN)
- "enable_nocompile_tests=false"
- # pseudolocales are only used for testing
- "enable_pseudolocales=false"
- "enable_widevine=$(usex widevine true false)"
- # Disable fatal linker warnings, bug 506268.
- "fatal_linker_warnings=false"
- # Component build isn't generally intended for use by end users. It's mostly useful
- # for development and debugging.
- "is_component_build=false"
- # GN needs explicit config for Debug/Release as opposed to inferring it from build directory.
- "is_debug=false"
- "is_official_build=$(usex official true false)"
- # Enable ozone wayland and/or headless support
- "ozone_auto_platforms=false"
- "ozone_platform_headless=true"
- # Enables building without non-free unRAR licence
- "safe_browsing_use_unrar=false"
- # "thin_lto_enable_optimizations=${use_lto}"
- "treat_warnings_as_errors=false"
- # Use in-tree libc++ (buildtools/third_party/libc++ and buildtools/third_party/libc++abi)
- # instead of the system C++ library for C++ standard library support.
- # default: true, but let's be explicit (forced since 120 ; USE removed 127).
- "use_custom_libcxx=true"
- # Enable ozone wayland and/or headless support
- "use_ozone=true"
- # The sysroot is the oldest debian image that chromium supports, we don't need it
- "use_sysroot=false"
- # See dependency logic in third_party/BUILD.gn
- "use_system_harfbuzz=$(usex system-harfbuzz true false)"
- # "use_thin_lto=${use_lto}"
- # Only enabled for clang, but gcc has endian macros too
- "v8_use_libm_trig_functions=true"
- # use system go
- "tint_use_system_go=true"
- )
-
- myconf_gn+=( "enable_iterator_debugging=$(usex debug true false)" )
-
- if use debug; then
- myconf_gn+=(
- "symbol_level=2"
- "blink_symbol_level=2"
- "v8_symbol_level=2"
- )
- else
- myconf_gn+=(
- "symbol_level=0"
- "blink_symbol_level=0"
- "v8_symbol_level=0"
- )
- fi
-
- if use bindist ; then
- myconf_gn+=(
- # If this is set to false Chromium won't be able to load any proprietary codecs
- # even if provided with an ffmpeg capable of h264/aac decoding
- "proprietary_codecs=true"
- 'ffmpeg_branding="Chrome"'
- # build ffmpeg as an external component (libffmpeg.so) that we can remove / substitute
- "is_component_ffmpeg=true"
- )
- else
- myconf_gn+=(
- "proprietary_codecs=$(usex proprietary-codecs true false)"
- "ffmpeg_branding=\"$(usex proprietary-codecs Chrome Chromium)\""
- )
- fi
-
- if use headless; then
- myconf_gn+=(
- "enable_print_preview=false"
- "enable_remoting=false"
- 'ozone_platform="headless"'
- "rtc_use_pipewire=false"
- "use_alsa=false"
- "use_cups=false"
- "use_gio=false"
- "use_glib=false"
- "use_gtk=false"
- "use_kerberos=false"
- "use_libpci=false"
- "use_pangocairo=false"
- "use_pulseaudio=false"
- "use_qt5=false"
- "use_qt6=false"
- "use_udev=false"
- "use_vaapi=false"
- "use_xkbcommon=false"
- )
- else
- myconf_gn+=(
- "gtk_version=$(usex gtk4 4 3)"
- # link pulseaudio directly (DT_NEEDED) instead of using dlopen.
- # helps with automated detection of ABI mismatches and prevents silent errors.
- "link_pulseaudio=$(usex pulseaudio true false)"
- "ozone_platform_wayland=$(usex wayland true false)"
- "ozone_platform_x11=$(usex X true false)"
- "ozone_platform=\"$(usex wayland wayland x11)\""
- "rtc_use_pipewire=$(usex screencast true false)"
- # As above - link directly instead of dlopening
- "rtc_link_pipewire=$(usex screencast true false)"
- "use_cups=$(usex cups true false)"
- "use_kerberos=$(usex kerberos true false)"
- "use_pulseaudio=$(usex pulseaudio true false)"
- "use_qt5=false"
- "use_system_libffi=$(usex wayland true false)"
- "use_system_minigbm=true"
- "use_vaapi=$(usex vaapi true false)"
- "use_xkbcommon=true"
- )
- if use qt6; then
- local cbuild_libdir
- cbuild_libdir="$(get_libdir)"
- if tc-is-cross-compiler; then
- # Hack to workaround get_libdir not being able to handle CBUILD, bug #794181
- cbuild_libdir="$($(tc-getBUILD_PKG_CONFIG) --keep-system-libs --libs-only-L libxslt)"
- cbuild_libdir="${cbuild_libdir:2}"
- cbuild_libdir="${cbuild_libdir/% }"
- fi
- myconf_gn+=(
- "use_qt6=true"
- "moc_qt6_path=\"${EPREFIX}/usr/${cbuild_libdir}/qt6/libexec\""
- )
- else
- myconf_gn+=( "use_qt6=false" )
- fi
- fi
-
- # Explicitly disable ICU data file support for system-icu/headless builds.
- if use system-icu || use headless; then
- myconf_gn+=( "icu_use_data_file=false" )
- fi
-
- if use official; then
- # Allow building against system libraries in official builds
- sed -i 's/OFFICIAL_BUILD/GOOGLE_CHROME_BUILD/' \
- tools/generate_shim_headers/generate_shim_headers.py || die
- # Don't add symbols to build
- myconf_gn+=( "symbol_level=0" )
- fi
-
- if use pgo; then
- myconf_gn+=(
- "chrome_pgo_phase=2"
- "v8_enable_builtins_optimization=true"
- )
- else
- myconf_gn+=( "chrome_pgo_phase=0" )
- fi
-
- # Odds and ends
-
- # skipping typecheck is only supported on amd64, bug #876157
- if ! use amd64; then
- myconf_gn+=( "devtools_skip_typecheck=false" )
- fi
-
- # Disable external code space for V8 for ppc64. It is disabled for ppc64
- # by default, but cross-compiling on amd64 enables it again.
- if tc-is-cross-compiler && use ppc64; then
- myconf_gn+=( "v8_enable_external_code_space=false" )
- fi
-
- # This determines whether or not GN uses the bundled libcxx
- if use libcxx; then
- myconf_gn+=( "use_custom_libcxx=true" )
- else
- myconf_gn+=(
- "use_custom_libcxx=false"
- "use_llvm_libatomic=false"
- )
- append-cppflags -U_GLIBCXX_ASSERTIONS #See #318
- fi
-
- myconf_gn+=( "use_bluez=$(usex bluetooth true false)" )
-
- myconf_gn+=( "is_cfi=$(usex cfi true false)" )
-
- if use cfi; then
- myconf_gn+=(
- "use_cfi_icall=true"
- "use_cfi_cast=true"
- )
- fi
-
- myconf_gn+=(
- "optimize_webui=$(usex optimize-webui true false)"
- "use_system_freetype=$(usex system-harfbuzz true false)"
- "use_system_libopenjpeg2=$(usex system-openjpeg true false)"
- "enable_pdf=true"
- "use_system_lcms2=true"
- "enable_print_preview=true"
- "use_thin_lto=$(usex thinlto true false)"
- "thin_lto_enable_optimizations=$(usex optimize-thinlto true false)"
-
- # Ungoogled flags
- "build_with_tflite_lib=false"
- "enable_mdns=false"
- "enable_mse_mpeg2ts_stream_parser=$(usex proprietary-codecs true false)"
- "enable_remoting=false"
- "enable_reporting=false"
- "enable_service_discovery=false"
- "exclude_unwind_tables=true"
- "google_api_key=\"\""
- "google_default_client_id=\"\""
- "google_default_client_secret=\"\""
- "safe_browsing_mode=0"
- "use_official_google_api_keys=false"
- "use_unofficial_version_number=false"
-
- # "enable_swiftshader=false"
-
- # Additional flags
- # "perfetto_use_system_zlib=true"
- # "use_system_zlib=true"
- # "use_system_libjpeg=true"
- # "rtc_build_examples=false"
- # "enable_chromium_prelude=false"
- # "enable_updater=false"
- # "enable_update_notifications=false"
- # "enable_constraints=false"
- # "rtc_rusty_base64=false"
- # "v8_enable_temporal_support=false"
- # "media_use_symphonia=false"
- # "pdf_enable_rust_png=false"
- # "skia_use_libpng_encode=true"
- # "skia_use_libpng_decode=true"
- # "skia_use_rust_png_decode=false"
- # "skia_use_rust_png_encode=false"
- # "enable_jxl_decoder=false"
- )
-
- if use amd64 || use arm64; then
- myconf_gn+=(
- "v8_drumbrake_bounds_checks=true"
- # "v8_enable_drumbrake=true"
- )
- fi
-
- if use thinlto; then
- # We need to change the default value of import-instr-limit in
- # LLVM to limit the text size increase. The default value is
- # 100, and we change it to 30 to reduce the text size increase
- # from 25% to 10%. The performance number of page_cycler is the
- # same on two of the thinLTO configurations, we got 1% slowdown
- # on speedometer when changing import-instr-limit from 100 to 30.
- # append-ldflags "-Wl,-plugin-opt,-import-instr-limit=30"
- sed -i '/import_instr_limit = 5/{s++import_instr_limit = 30+;h};${x;/./{x;q0};x;q1}' \
- build/config/compiler/BUILD.gn || die
-
- append-ldflags "-Wl,--thinlto-jobs=$(makeopts_jobs)"
- fi
-
- # Facilitate deterministic builds (taken from build/config/compiler/BUILD.gn)
- append-cflags -Wno-builtin-macro-redefined
- append-cxxflags -Wno-builtin-macro-redefined
- append-cppflags "-D__DATE__= -D__TIME__= -D__TIMESTAMP__="
-
- local flags
- einfo "Building with the following compiler settings:"
- for flags in C{C,XX} AR NM RANLIB {C,CXX,CPP,LD}FLAGS \
- EXTRA_GN UGC_{SKIP_{PATCHES,SUBSTITUTION},KEEP_BINARIES} ; do
- einfo " ${flags} = \"${!flags}\""
- done
-
- # Since we build from tarballs, we need to set the channel here so that it can be used in the build.
- export CHROME_VERSION_EXTRA="${SLOT}"
-
- einfo "Configuring Chromium ..."
- # add a `-v` here if gn `hangs` to see which file it's getting stuck on.
- set -- gn gen --args="${myconf_gn[*]}${EXTRA_GN:+ ${EXTRA_GN}}" out/Release
- echo "$@"
- "$@" || die "Failed to configure Chromium"
-
- # The "if" below should not be executed unless testing
- if [ ! -z "${NODIE}" ]; then
- # List all args
- # gn args --list out/Release
-
- # Quick compiler check
- eninja -C out/Release protoc torque
- fi
-}
-
-src_compile() {
- # Final link uses lots of file descriptors.
- ulimit -n 2048
-
- # Calling this here supports resumption via FEATURES=keepwork
- python_setup
-
- # I hate doing this but upstream Rust have yet to come up with a better solution for
- # us poor packagers. Required for Split LTO units, which are required for CFI.
- export RUSTC_BOOTSTRAP=1
-
- # Don't inherit PYTHONPATH from environment, bug #789021, #812689
- local -x PYTHONPATH=
-
- # Build mksnapshot and pax-mark it.
- if use pax-kernel; then
- local x
- for x in mksnapshot v8_context_snapshot_generator code_cache_generator; do
- if tc-is-cross-compiler; then
- eninja -C out/Release "host/${x}"
- pax-mark m "out/Release/host/${x}"
- else
- eninja -C out/Release "${x}"
- pax-mark m "out/Release/${x}"
- fi
- done
- fi
-
- # Even though ninja autodetects number of CPUs, we respect
- # user's options, for debugging with -j 1 or any other reason.
- eninja -C out/Release chrome chrome_sandbox $(use test && echo "base_unittests")
-
- pax-mark m out/Release/chrome
-
- # This codepath does minimal patching, so we're at the mercy of upstream
- # CFLAGS. This is fine - we're not intending to force this on users
- # and we do a lot of flag 'management' anyway.
- if use bundled-toolchain; then
- QA_FLAGS_IGNORED="
- usr/lib64/chromium-browser/chrome
- usr/lib64/chromium-browser/chrome-sandbox
- usr/lib64/chromium-browser/chromedriver
- usr/lib64/chromium-browser/chrome_crashpad_handler
- usr/lib64/chromium-browser/libEGL.so
- usr/lib64/chromium-browser/libGLESv2.so
- usr/lib64/chromium-browser/libVkICD_mock_icd.so
- usr/lib64/chromium-browser/libVkLayer_khronos_validation.so
- usr/lib64/chromium-browser/libqt6_shim.so
- usr/lib64/chromium-browser/libvk_swiftshader.so
- usr/lib64/chromium-browser/libvulkan.so.1
- "
- fi
-
- use convert-dict && eninja -C out/Release convert_dict
-
- use enable-driver && eninja -C out/Release chromedriver
- #use suid && eninja -C out/Release chrome_sandbox
-
- # use enable-driver && mv out/Release/chromedriver{.unstripped,}
-
- rm -f out/Release/locales/*.pak.info || die
-
- # Generate support files (desktop file, manpage, etc.) See: #684550 #706786 #968958
- ${EPYTHON} "${FILESDIR}/generate-support-files.py" \
- --installdir "/usr/$(get_libdir)/ungoogled-chromium-browser" \
- --channel "${SLOT}" ||
- die "Failed to generate support files"
-}
-
-src_test() {
- # Tests may be flaky with usersandbox, and the test runner executes significantly faster without.
- # If you seem to be excluding too many tests for a particular milestone: comment them out, reboot, and
- # run the tests again. If that doesn't help, try FEATURES="-usersandbox" and send it because obviously the
- # chromium gods are not smiling upon you today. Do some runtime testing, obvs.
- local skip_tests=(
- # Wildcard exclusions (if all tests in a test suite are broken)
- 'AlternateTestParams/PartitionAllocDeathTest.RepeatedAllocReturnNullDirect/*'
- 'AlternateTestParams/PartitionAllocDeathTest.RepeatedReallocReturnNullDirect/*'
- 'AlternateTestParams/PartitionAllocTest.*' # 200+ tests, >= 1 crashes entire test runner with usersandbox.
- 'CheckExitCodeAfterSignalHandlerDeathTest.*'
- 'CriticalProcessAndThreadSpotChecks/HangWatcherAnyCriticalThreadTests.*'
- 'LazyThreadPoolTaskRunnerEnvironmentTest.*' # M142
- 'ToolsSanityTest.BadVirtualCall*'
- # requires en-us locale
- SysStrings.SysNativeMBAndWide
- SysStrings.SysNativeMBToWide
- SysStrings.SysWideToNativeMB
- # Specific test cases
- CancelableEventTest.BothCancelFailureAndSucceedOccurUnderContention
- FilePathTest.FromUTF8Unsafe_And_AsUTF8Unsafe
- HistogramTesterTest.PumaTestUniqueSample
- ImmediateCrashTest.ExpectedOpcodeSequence # M150
- PathServiceTest.CheckedGetFailure
- PlatformThreadTest.CanChangeThreadType
- RawPtrTest.SetLookupUsesGetForComparison # M146 ; also broken for alpine in M144.
- RustLogIntegrationTest.CheckAllSeverity
- StackCanary.ChangingStackCanaryCrashesOnReturn
- StackTraceDeathTest.StackDumpSignalHandlerIsMallocFree
- TestLauncherTools.TruncateSnippetFocusedMatchesFatalMessagesTest
- ThreadPoolEnvironmentConfig.CanUseBackgroundPriorityForWorker
- DriveInfoTest.GetFileDriveInfo
-
- )
- local test_filter="-$(IFS=:; printf '%s' "${skip_tests[*]}")"
- # test-launcher-bot-mode enables parallelism and plain output
- # Check individual tests with --gtest_filter=<test you want> --single-process-tests
- ./out/Release/base_unittests --test-launcher-bot-mode \
- --test-launcher-jobs="$(get_makeopts_jobs)" \
- --gtest_filter="${test_filter}" || die "Tests failed!"
-}
-
-src_install() {
- local browser_suffix
- if [[ "${SLOT}" != "stable" ]]; then
- browser_suffix="-${SLOT}"
- else
- browser_suffix=""
- fi
- local CHROMIUM_HOME="/usr/$(get_libdir)/ungoogled-chromium-browser${browser_suffix}"
- exeinto "${CHROMIUM_HOME}"
- doexe out/Release/chrome
-
- #newexe out/Release/chrome_sandbox chrome-sandbox
- #fperms 4755 "${CHROMIUM_HOME}/chrome-sandbox"
-
- use enable-driver && doexe out/Release/chromedriver
-
- #* https://github.com/ungoogled-software/ungoogled-chromium/pull/3563
- doexe out/Release/chrome_crashpad_handler
-
- if use convert-dict; then
- newexe "${FILESDIR}/update-dicts.sh" update-dicts.sh
- doexe out/Release/convert_dict
- fi
-
- ozone_auto_session () {
- use X && use wayland && ! use headless && echo true || echo false
- }
-
- cat <<- EOF > "${D}${CHROMIUM_HOME}/chromium-launcher.sh" || die
- #!/bin/bash
- # Wrapper to launch slotted Chromium via the chromium-common launcher script.
- export CHROME_DESKTOP="ungoogled-chromium-browser${browser_suffix}.desktop"
- export CHROME_EXEC_NAME="ungoogled-chromium-browser${browser_suffix}"
- export CHROME_VERSION_EXTRA="${SLOT}"
- export CHROME_WRAPPER="\$(readlink -f "\$0")"
- export OZONE_AUTO_SESSION=$(ozone_auto_session)
-
- exec /usr/libexec/chromium/chromium-launcher.sh "\$@"
- EOF
-
- chmod 755 "${D}${CHROMIUM_HOME}/chromium-launcher.sh" || die
-
- # It is important that we name the target "chromium-browser",
- # xdg-utils expect it; bug #355517.
- dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/ungoogled-chromium-browser${browser_suffix}
- # keep the old symlink around for consistency
- dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/ungoogled-chromium${browser_suffix}
-
- use enable-driver && dosym "${CHROMIUM_HOME}/chromedriver" /usr/bin/ungoogled-chromedriver${browser_suffix}
-
- pushd out/Release/locales > /dev/null || die
- chromium_remove_language_paks
- popd > /dev/null || die
-
- insinto "${CHROMIUM_HOME}"
- doins out/Release/*.bin
- doins out/Release/*.pak
- doins -r out/Release/hyphen-data
-
- if use bindist; then
- # We built libffmpeg as a component library, but we can't distribute it
- # with proprietary codec support. Remove it and make a symlink to the requested
- # system library.
- rm -f out/Release/libffmpeg.so \
- || die "Failed to remove bundled libffmpeg.so (with proprietary codecs)"
- # symlink the libffmpeg.so from either ffmpeg-chromium or ffmpeg[chromium].
- einfo "Creating symlink to libffmpeg.so from $(usex ffmpeg-chromium ffmpeg-chromium ffmpeg[chromium])..."
- dosym ../chromium/libffmpeg.so$(usex ffmpeg-chromium .${PV%%\.*} "") \
- /usr/$(get_libdir)/ungoogled-chromium-browser/libffmpeg.so
- fi
-
- (
- shopt -s nullglob
- local files=(out/Release/*.so out/Release/*.so.[0-9])
- [[ ${#files[@]} -gt 0 ]] && doins "${files[@]}"
- )
-
- if ! use system-icu && ! use headless; then
- doins out/Release/icudtl.dat
- fi
-
- doins -r out/Release/locales
- #doins -r out/Release/MEIPreload
-
- # Install vk_swiftshader_icd.json; bug #827861
- doins out/Release/vk_swiftshader_icd.json
-
- if [[ -d out/Release/swiftshader ]]; then
- insinto "${CHROMIUM_HOME}/swiftshader"
- doins out/Release/swiftshader/*.so
- fi
-
- use widevine && dosym WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so "${CHROMIUM_HOME}/libwidevinecdm.so"
-
- # Install icons
- local branding size
- for size in 16 24 32 48 64 128 256 ; do
- case ${size} in
- 16|32) branding="chrome/app/theme/default_100_percent/chromium" ;;
- *) branding="chrome/app/theme/chromium" ;;
- esac
- newicon -s ${size} "${branding}/product_logo_${size}.png" \
- ungoogled-chromium-browser${browser_suffix}.png
- done
-
- # Install desktop entry
- domenu out/Release/ungoogled-chromium-browser${browser_suffix}.desktop
-
- # Install GNOME default application entry (bug #303100).
- insinto /usr/share/gnome-control-center/default-apps
- doins out/Release/ungoogled-chromium-browser${browser_suffix}.xml
-
- # Install AppStream metadata
- insinto /usr/share/appdata
- doins out/Release/ungoogled-chromium-browser${browser_suffix}.appdata.xml
-
- # Install manpage; bug #684550
- doman out/Release/ungoogled-chromium-browser${browser_suffix}.1
- dosym ungoogled-chromium-browser${browser_suffix}.1 /usr/share/man/man1/ungoogled-chromium${browser_suffix}.1
-
- readme.gentoo_create_doc
-}
-
-pkg_postrm() {
- xdg_icon_cache_update
- xdg_desktop_database_update
-}
-
-pkg_postinst() {
- xdg_icon_cache_update
- xdg_desktop_database_update
- readme.gentoo_print_elog
-
- if use !headless && [[ -z "${REPLACING_VERSIONS}" ]]; then
- if use vaapi; then
- elog "Hardware-accelerated video decoding configuration:"
- elog
- elog "Chromium supports multiple backends for hardware acceleration. To enable one,"
- elog " Add to CHROMIUM_FLAGS in /etc/chromium/default:"
- elog
- elog "1. VA-API with OpenGL (recommended for most users):"
- elog " --enable-features=AcceleratedVideoDecodeLinuxGL"
- elog " VaapiVideoDecoder may need to be added as well, but try without first."
- elog
- if use wayland; then
- elog "2. Enhanced Wayland/EGL performance:"
- elog " --enable-features=AcceleratedVideoDecodeLinuxGL,AcceleratedVideoDecodeLinuxZeroCopyGL"
- elog
- fi
- if use X; then
- elog "$(usex wayland "3" "2"). VA-API with Vulkan:"
- elog " --enable-features=VaapiVideoDecoder,VaapiIgnoreDriverChecks,Vulkan,DefaultANGLEVulkan,VulkanFromANGLE"
- elog
- if use wayland; then
- elog " NOTE: Vulkan acceleration requires X11 and will not work under Wayland sessions."
- elog " Use OpenGL-based acceleration instead when running under Wayland."
- elog
- fi
- fi
- elog "Additional options:"
- elog " To enable hardware-accelerated encoding (if supported)"
- elog " add 'AcceleratedVideoEncoder' to your feature list"
- elog " VaapiIgnoreDriverChecks bypasses driver compatibility checks"
- elog " (may be needed for newer/unsupported hardware)"
- elog
- else
- elog "This Chromium build was compiled without VA-API support, which provides"
- elog "hardware-accelerated video decoding."
- fi
- if use screencast; then
- elog "Screencast is disabled by default at runtime. Either enable it"
- elog "by navigating to chrome://flags/#enable-webrtc-pipewire-capturer"
- elog "inside Chromium or add --enable-features=WebRTCPipeWireCapturer"
- elog "to CHROMIUM_FLAGS in /etc/chromium/default."
- elog
- elog "Additional setup may be required for screencasting to work."
- elog "See issue: https://github.com/PF4Public/gentoo-overlay/issues/314"
- fi
- if use gtk4; then
- elog "Chromium prefers GTK3 over GTK4 at runtime. To override this"
- elog "behaviour you need to pass --gtk-version=4, e.g. by adding it"
- elog "to CHROMIUM_FLAGS in /etc/chromium/default."
- fi
- if use widevine; then
- elog "widevine requires binary plugins, which are distributed separately"
- elog "Make sure you have www-plugins/chrome-binary-plugins installed"
- fi
- fi
-
- if systemd_is_booted && ! [[ -f "/etc/machine-id" ]]; then
- ewarn "The lack of an '/etc/machine-id' file on this system booted with systemd"
- ewarn "indicates that the Gentoo handbook was not followed to completion."
- ewarn ""
- ewarn "Chromium is known to behave unpredictably with this system configuration;"
- ewarn "please complete the configuration of this system before logging any bugs."
- fi
-
- # Stable slot doesn't change profile directory, and it's vanishingly unlikely that users will downgrade from dev.
- if [[ -n "${REPLACING_VERSIONS}" ]]; then
- local replacing_non_slotted=false
- # there could be more than one PVR
- for version in ${REPLACING_VERSIONS}; do
- if ver_test "${version}" -le "145.0.7632.116"; then
- replacing_non_slotted=true
- break
- fi
- done
- if ${replacing_non_slotted}; then
- ewarn "This version of Chromium has replaced a non-slotted ebuild."
- if [[ ${SLOT} != "stable" ]]; then
- ewarn "This channel has its own profile directory, so your existing profile will not be used."
- ewarn "To use your existing profile, either copy or move it to the new location."
- ewarn "See https://wiki.gentoo.org/wiki/Chromium#Profile_Directories for more information."
- ewarn ""
- fi
- ewarn "Any existing Progressive Web Apps (PWAs) will need to be reinstalled,"
- ewarn "or have the path in the desktop files updated to point to the new wrapper script."
- fi
- fi
-}
-
-eapply_wrapper () {
- if [ ! -z "${NODIE}" ]; then
- nonfatal eapply "$@"
- else
- eapply "$@"
- fi
-}
-
-git_wrapper () {
- if [ ! -z "${NODIE}" ]; then
- git "$@"
- else
- git "$@" || die
- fi
-}
-
-filter_wrapper () {
- einfo "Applying ${i##*/}"
- #? fuzz factor of 3 is OK?
- if [ ! -z "${NODIE}" ]; then
- filterdiff -p1 "${@:2}" < "$1" | patch -F 3 -p1
- else
- filterdiff -p1 "${@:2}" < "$1" | patch -F 3 -p1 || die
- fi
-}
diff --git a/www-client/ungoogled-chromium/ungoogled-chromium-151.0.7922.137_p1.ebuild b/www-client/ungoogled-chromium/ungoogled-chromium-151.0.7922.137_p1.ebuild
deleted file mode 100644
index f97d9c401b83..000000000000
--- a/www-client/ungoogled-chromium/ungoogled-chromium-151.0.7922.137_p1.ebuild
+++ /dev/null
@@ -1,2564 +0,0 @@
-# Copyright 2009-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-# Use following environment variables to customise the build
-# EXTRA_GN — pass extra options to gn
-# NINJAOPTS="-k0 -j8" useful to populate ccache even if ebuild is still failing
-# UGC_SKIP_PATCHES — space-separated list of patches to skip
-# UGC_KEEP_BINARIES — space-separated list of binaries to keep
-# UGC_SKIP_SUBSTITUTION — space-separated list of files to skip domain substitution
-
-# USE=bundled-toolchain is intended for users who want to use the same toolchain
-# as the upstream releases. It's also a good fallback in case we fall behind
-# and need to get a release out quickly (less likely with `dev` in-tree).
-# We can't rely on it as a default since the toolchain is only shipped for x86-64;
-# other architectures will need to use system toolchain.
-
-# Since m133 we are using CI-generated tarballs from
-# https://github.com/chromium-linux-tarballs/chromium-tarballs/
-
-# These are bit-for-bit identical to the official releases, but are built
-# using an external CI system that we have some control over, in case
-# issues pop up again with official tarball generation.
-
-GN_MIN_VER=0.2374
-# chromium-tools/get-chromium-toolchain-strings.py (or just use Chromicler)
-# Node for M145+ should be 24.12.0 but that's not packaged in Gentoo yet. See #969145
-TEST_FONT="9c07d19d9c5ee1ff94f717e6fb17e0c8c354e6f9"
-BUNDLED_CLANG_VER="llvmorg-23-init-19482-g53d18800-1"
-BUNDLED_RUST_VER="b998449636a48e2c4a362809085b600a0174e1f2-2"
-RUST_SHORT_HASH=${BUNDLED_RUST_VER:0:10}-${BUNDLED_RUST_VER##*-}
-NODE_VER="24.16.0-r1"
-GO_MIN_VER="1.25.0"
-ESBUILD_VER="0.25.1"
-ROLLUP_VER="4.57.1" # currently manual.
-
-CHROMIUM_LANGS="af am ar as az be bg bn bs ca cs cy da de el en-GB es es-419 et eu fa fi fil
- fr fr-CA gl gu he hi hr hu hy id is it ja ka kk km kn ko ky lo lt lv mk ml mn mr ms my
- nb ne nl or pa pl pt-BR pt-PT ro ru si sk sl sq sr sr-Latn sv sw ta te th tr uk ur uz
- vi zh-CN zh-HK zh-TW zu"
-
-#UGC_COMMIT_ID="ecbcc4c1413c961e37d4224f787fecb8534b1505"
-# UGC_PR_COMMITS=(
-# c917e096342e5b90eeea91ab1f8516447c8756cf
-# 5794e9d12bf82620d5f24505798fecb45ca5a22d
-# )
-
-CROMITE_COMMIT_ID="69e841fd35cd92ce5fa1a336791c7989809e0f17"
-
-declare -A CHROMIUM_COMMITS=(
- # ["27f8690db999f6e56f0af7a9ea3d28a019ed72ca"]="." #152+
- ["-cf94ed446320d35c8613ed9b3ffb6e6a61bfcb5f"]="."
-# # ["-37c28a19804e47a68eabf3cf882a310689fc325b"]="." #disable style check for cromite
-# # ["cd5a0df905a28faa89ff2a4ab44f893f84dc4487"]="net/third_party/quiche/src"
-)
-
-LLVM_COMPAT=( 21 22 23 )
-PYTHON_COMPAT=( python3_{13..14} )
-PYTHON_REQ_USE="xml(+)"
-RUST_MIN_VER=1.91.0
-RUST_NEEDS_LLVM="yes please"
-RUST_OPTIONAL="yes" # Not actually optional, but we don't need system Rust (or LLVM) with USE=bundled-toolchain
-RUST_REQ_USE="rustfmt" # Upstream run rustfmt on bindgen output, so we need it to be available.
-
-inherit check-reqs chromium-2 desktop flag-o-matic llvm-r1 multiprocessing ninja-utils pax-utils
-inherit python-any-r1 readme.gentoo-r1 rust systemd toolchain-funcs xdg-utils
-
-DESCRIPTION="Modifications to Chromium for removing Google integration and enhancing privacy"
-HOMEPAGE="https://github.com/ungoogled-software/ungoogled-chromium"
-PPC64_HASH="7aae8a84e327fc2078ce1625c9c70bfda77d626f"
-PATCH_V="${PV%%\.*}-3"
-COPIUM_COMMIT="3c7e56fb4523b43b47595bb3a22f77178fc76293"
-SRC_URI="https://commondatastorage.googleapis.com/chromium-browser-official/chromium-${PV/_*}-lite.tar.xz
- https://deps.gentoo.zip/www-client/chromium/rollup-wasm-node-${ROLLUP_VER}.tgz
- https://gitlab.com/Matt.Jolly/chromium-patches/-/archive/${PATCH_V}/chromium-patches-${PATCH_V}.tar.bz2
- !bundled-toolchain? (
- https://codeberg.org/selfisekai/copium/archive/${COPIUM_COMMIT}.tar.gz
- -> chromium-patches-copium-${COPIUM_COMMIT:0:10}.tar.gz
- )
- bundled-toolchain? (
- https://commondatastorage.googleapis.com/chromium-browser-clang/Linux_x64/clang-${BUNDLED_CLANG_VER}.tar.xz
- -> chromium-clang-${BUNDLED_CLANG_VER}.tar.xz
- https://commondatastorage.googleapis.com/chromium-browser-clang/Linux_x64/rust-toolchain-${BUNDLED_RUST_VER}-${BUNDLED_CLANG_VER%-*}.tar.xz
- -> chromium-rust-toolchain-${RUST_SHORT_HASH}-${BUNDLED_CLANG_VER%-*}.tar.xz
- )
- test? (
- https://chromium-fonts.storage.googleapis.com/${TEST_FONT} -> chromium-testfonts-${TEST_FONT:0:10}.tar.gz
- )
- ppc64? (
- https://gitlab.raptorengineering.com/raptor-engineering-public/chromium/openpower-patches/-/archive/${PPC64_HASH}/openpower-patches-${PPC64_HASH}.tar.bz2 -> chromium-openpower-${PPC64_HASH:0:10}.tar.bz2
- )
-"
-
-# Gentoo tarball:
-# https://chromium-tarballs.distfiles.gentoo.org/chromium-${PV/_*}.tar.xz -> chromium-${PV/_*}-gentoo.tar.xz
-
-# chromium-linux-tarballs
-# https://github.com/chromium-linux-tarballs/chromium-tarballs/releases/download/${PV/_*}/chromium-${PV/_*}-linux.tar.xz
-
-# Official tarball:
-# https://commondatastorage.googleapis.com/chromium-browser-official/chromium-${PV/_*}${LITE_TARBALL:+-lite}.tar.xz
-
-# https://gitweb.gentoo.org/proj/chromium-tools.git/tree/get-chromium-licences.py @ 145.0.7632.76
-LICENSE="Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD BSD-2 Base64 Boost-1.0 CC-BY-3.0 CC-BY-4.0 Clear-BSD FFT2D FTL"
-LICENSE+=" IJG ISC LGPL-2 LGPL-2.1 MIT MPL-1.1 MPL-2.0 Ms-PL PSF-2 SGI-B-2.0 SSLeay SunSoft Unicode-3.0"
-LICENSE+=" Unicode-DFS-2015 Unlicense UoI-NCSA ZLIB libtiff openssl"
-LICENSE+=" cromite? ( GPL-3 )"
-
-SLOT="stable"
-KEYWORDS="amd64 ~arm64 ~ppc64 ~x86"
-
-IUSE_SYSTEM_LIBS="abseil-cpp av1 brotli crc32c double-conversion ffmpeg +harfbuzz icu jsoncpp +libusb libvpx +openh264 openjpeg re2 snappy woff2 +zstd"
-IUSE="+X bindist bluetooth bundled-toolchain cfi convert-dict cups custom-cflags debug ffmpeg-chromium enable-driver gtk4 hangouts headless kerberos +libcxx nvidia +official optimize-thinlto optimize-webui override-data-dir pax-kernel pgo"
-IUSE+=" +proprietary-codecs pulseaudio qt6 screencast selinux test thinlto cromite vaapi wayland widevine cpu_flags_ppc_vsx3"
-RESTRICT="
- !bindist? ( bindist )
- !test? ( test )
- arm64? ( test )
- !system-ffmpeg? ( proprietary-codecs? ( bindist ) )
- !system-openh264? ( bindist )
- cromite? ( bindist )"
-
-REQUIRED_USE="
- !headless? ( || ( X wayland ) )
- screencast? ( wayland )
- ffmpeg-chromium? ( bindist proprietary-codecs )
- optimize-thinlto? ( thinlto )
- cfi? ( thinlto )
- x86? ( !thinlto !widevine )
- debug? ( !official )
- vaapi? ( !system-av1 !system-libvpx )
-"
-
-UGC_PV="${PV/_p/-}"
-UGC_PF="${PN}-${UGC_PV}"
-UGC_URL="https://github.com/ungoogled-software/${PN}/archive/"
-
-if [ -z "$UGC_COMMIT_ID" ]; then
- UGC_URL="${UGC_URL}${UGC_PV}.tar.gz -> ${UGC_PF}.tar.gz"
- UGC_WD="${WORKDIR}/${UGC_PF}"
-else
- UGC_URL="${UGC_URL}${UGC_COMMIT_ID}.tar.gz -> ${PN}-${UGC_COMMIT_ID}.tar.gz"
- UGC_WD="${WORKDIR}/ungoogled-chromium-${UGC_COMMIT_ID}"
-fi
-
-SRC_URI+="${UGC_URL}
-"
-
-if [ ! -z "${UGC_PR_COMMITS[*]}" ]; then
- for i in "${UGC_PR_COMMITS[@]}"; do
- SRC_URI+="https://github.com/ungoogled-software/${PN}/commit/$i.patch?full_index=true -> ${PN}-$i.patch
- "
- done
-fi
-
-if [ ! -z "${CHROMIUM_COMMITS[*]}" ]; then
- # for i in "${CHROMIUM_COMMITS[@]}"; do
- for i in "${!CHROMIUM_COMMITS[@]}"; do
- if [[ ${CHROMIUM_COMMITS[$i]} =~ webrtc ]]; then
- #TODO: is it safe to use this mirror?
- SRC_URI+="https://github.com/webrtc-mirror/webrtc/commit/${i/-}.patch?full_index=true -> webrtc-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ angle ]]; then
- SRC_URI+="https://github.com/google/angle/commit/${i/-}.patch?full_index=true -> angle-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ quiche ]]; then
- SRC_URI+="https://github.com/google/quiche/commit/${i/-}.patch?full_index=true -> quiche-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ dawn ]]; then
- SRC_URI+="https://github.com/google/dawn/commit/${i/-}.patch?full_index=true -> dawn-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ perfetto ]]; then
- SRC_URI+="https://github.com/google/perfetto/commit/${i/-}.patch?full_index=true -> perfetto-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ink ]]; then
- SRC_URI+="https://github.com/google/ink/commit/${i/-}.patch?full_index=true -> ink-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ vulkan-utility-libraries ]]; then
- SRC_URI+="https://github.com/KhronosGroup/Vulkan-Utility-Libraries/commit/${i/-}.patch?full_index=true -> vulkan-utility-libraries-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ruy ]]; then
- SRC_URI+="https://github.com/google/ruy/commit/${i/-}.patch?full_index=true -> ruy-${i/-}.patch
- "
- else
- SRC_URI+="https://github.com/chromium/chromium/commit/${i/-}.patch?full_index=true -> chromium-${i/-}.patch
- "
- fi
- done
-fi
-
-SRC_URI+="cromite? ( https://github.com/uazo/cromite/archive/${CROMITE_COMMIT_ID}.tar.gz -> cromite-${CROMITE_COMMIT_ID}.tar.gz )
-"
-
-for i in ${IUSE_SYSTEM_LIBS}; do
- [[ $i =~ ^(\+)?(.*)$ ]]
- IUSE+=" ${BASH_REMATCH[1]}system-${BASH_REMATCH[2]}"
-done
-
-COMMON_X_DEPEND="
- x11-libs/libXcomposite:=
- x11-libs/libXcursor:=
- x11-libs/libXdamage:=
- x11-libs/libXfixes:=
- >=x11-libs/libXi-1.6.0:=
- x11-libs/libXrandr:=
- x11-libs/libXrender:=
- x11-libs/libXtst:=
- x11-libs/libxshmfence:=
-"
-
-# sys-libs/zlib: https://bugs.gentoo.org/930365; -ng is not compatible.
-# We _could_ use the bundled minizip, but that's against policy.
-COMMON_SNAPSHOT_DEPEND="
- system-icu? ( >=dev-libs/icu-78:= )
- system-abseil-cpp? ( >=dev-cpp/abseil-cpp-20260107.0 )
- system-brotli? ( >=app-arch/brotli-9999 )
- system-crc32c? ( dev-libs/crc32c )
- system-double-conversion? ( dev-libs/double-conversion )
- system-woff2? ( media-libs/woff2 )
- system-snappy? ( app-arch/snappy )
- system-jsoncpp? ( dev-libs/jsoncpp )
- system-openjpeg? ( media-libs/openjpeg:2= )
- system-re2? ( >=dev-libs/re2-0.2019.08.01:= )
- system-libvpx? ( >=media-libs/libvpx-1.13.0:=[postproc] )
- system-libusb? ( virtual/libusb:1 )
- cromite? ( dev-util/patchutils )
- >=dev-libs/libxml2-2.12.4:=[icu]
- dev-libs/nspr:=
- >=dev-libs/nss-3.26:=
- dev-libs/libxslt:=
- media-libs/fontconfig:=
- >=media-libs/freetype-2.11.0-r1:=
- system-harfbuzz? ( >=media-libs/harfbuzz-3:0=[icu(-)] )
- media-libs/libjpeg-turbo:=
- media-libs/libpng:=
- system-zstd? ( >=app-arch/zstd-1.5.5:= )
- >=media-libs/libwebp-0.4.0:=
- media-libs/mesa:=[gbm(+)]
- >=media-libs/openh264-2.6.0:=
- system-av1? (
- >=media-libs/dav1d-1.0.0:=
- >=media-libs/libaom-3.7.0:=
- )
- sys-libs/zlib:=
- !headless? (
- dev-libs/glib:2
- >=media-libs/alsa-lib-1.0.19:=
- media-video/pipewire:=
- pulseaudio? (
- || (
- media-libs/libpulse
- >=media-sound/apulse-0.1.9
- )
- )
- sys-apps/pciutils:=
- kerberos? ( virtual/krb5 )
- vaapi? ( >=media-libs/libva-2.7:=[X?,wayland?] )
- X? (
- x11-base/xorg-proto:=
- x11-libs/libX11:=
- x11-libs/libxcb:=
- x11-libs/libXext:=
- )
- x11-libs/libxkbcommon:=
- wayland? (
- screencast? ( media-video/pipewire:= )
- dev-libs/libffi:=
- dev-libs/wayland:=
- screencast? (
- media-video/pipewire:=
- || (
- sys-apps/xdg-desktop-portal-gnome
- sys-apps/xdg-desktop-portal-gtk
- kde-plasma/xdg-desktop-portal-kde
- gui-libs/xdg-desktop-portal-lxqt
- gui-libs/xdg-desktop-portal-wlr
- )
- )
- )
- )
-"
-
-COMMON_DEPEND="
- ${COMMON_SNAPSHOT_DEPEND}
- app-arch/bzip2:=
- dev-libs/expat:=
- system-ffmpeg? (
- >=media-video/ffmpeg-6.1:=
- >=media-libs/opus-1.3.1:=
- )
- net-misc/curl[ssl]
- sys-apps/dbus:=
- media-libs/flac:=
- sys-libs/zlib:=[minizip]
- !headless? (
- >=app-accessibility/at-spi2-core-2.46.0:2
- media-libs/mesa:=[X?,wayland?]
- virtual/udev
- x11-libs/cairo:=
- x11-libs/gdk-pixbuf:2
- x11-libs/pango:=
- cups? ( >=net-print/cups-1.3.11:= )
- qt6? ( dev-qt/qtbase:6[gui,widgets] )
- X? ( ${COMMON_X_DEPEND} )
- )
-"
-RDEPEND="${COMMON_DEPEND}
- !www-client/ungoogled-chromium:0
- >=www-client/chromium-common-2
- !headless? (
- || (
- x11-libs/gtk+:3[X?,wayland?]
- gui-libs/gtk:4[X?,wayland?]
- )
- qt6? ( dev-qt/qtbase:6[X?,wayland?] )
- )
- virtual/ttf-fonts
- selinux? ( sec-policy/selinux-chromium )
- bindist? (
- ffmpeg-chromium? ( media-video/ffmpeg-chromium:${PV%%\.*} )
- )
- !override-data-dir? (
- !www-client/chromium:${SLOT}
- !www-client/cromite:${SLOT}[-override-data-dir]
- )
-"
-# For M149+ pipewire is a mandatory build-time dependency, but it's optional at runtime for most configurations.
-DEPEND="${COMMON_DEPEND}
- !headless? (
- media-video/pipewire
- gtk4? ( gui-libs/gtk:4[X?,wayland?] )
- !gtk4? ( x11-libs/gtk+:3[X?,wayland?] )
- )
-"
-
- # pgo? ( >=llvm-core/clang-22.0.0_pre20260106 >=llvm-core/lld-22.0.0_pre20260106 )
-BDEPEND="
- ${COMMON_SNAPSHOT_DEPEND}
- ${PYTHON_DEPS}
- $(python_gen_any_dep '
- dev-python/setuptools[${PYTHON_USEDEP}]
- ')
- >=app-arch/gzip-1.7
- !headless? (
- qt6? ( dev-qt/qtbase:6 )
- )
- !bundled-toolchain? ( $(llvm_gen_dep '
- llvm-core/clang:${LLVM_SLOT}
- llvm-core/llvm:${LLVM_SLOT}
- cfi? ( llvm-runtimes/clang-runtime:${LLVM_SLOT}[sanitize] )
- official? (
- !ppc64? ( llvm-runtimes/compiler-rt-sanitizers:${LLVM_SLOT}[cfi] )
- ) ')
- || (
- $(llvm_gen_dep 'llvm-core/lld:${LLVM_SLOT}')
- >=sys-devel/mold-2.41.0
- )
- ${RUST_DEPEND}
- )
- >=dev-util/bindgen-0.72.1
- >=dev-build/gn-${GN_MIN_VER}
- >=dev-lang/go-${GO_MIN_VER}
- app-alternatives/ninja
- dev-lang/perl
- >=dev-util/gperf-3.2
- dev-util/esbuild:${ESBUILD_VER}
- dev-vcs/git
- >=net-libs/nodejs-${NODE_VER}[inspector]
- sys-apps/hwdata
- >=sys-devel/bison-2.4.3
- sys-devel/flex
- virtual/pkgconfig
- x11-misc/xdg-utils
-"
-
-if ! has chromium_pkg_die ${EBUILD_DEATH_HOOKS}; then
- EBUILD_DEATH_HOOKS+=" chromium_pkg_die";
-fi
-
-DISABLE_AUTOFORMATTING="yes"
-DOC_CONTENTS="
-Some web pages may require additional fonts to display properly.
-Try installing some of the following packages if some characters
-are not displayed properly:
-- media-fonts/arphicfonts
-- media-fonts/droid
-- media-fonts/ipamonafont
-- media-fonts/noto
-- media-fonts/ja-ipafonts
-- media-fonts/takao-fonts
-- media-fonts/wqy-microhei
-- media-fonts/wqy-zenhei
-
-To fix broken icons on the Downloads page, you should install an icon
-theme that covers the appropriate MIME types, and configure this as your
-GTK+ icon theme.
-
-For native file dialogs in KDE, install kde-apps/kdialog.
-
-To make password storage work with your desktop environment you may
-have install one of the supported credentials management applications:
-- app-crypt/libsecret (GNOME)
-- kde-frameworks/kwallet (KDE)
-If you have one of above packages installed, but don't want to use
-them in Chromium, then add --password-store=basic to CHROMIUM_FLAGS
-in /etc/chromium/default.
-"
-
-S="${WORKDIR}/chromium-${PV/_*}"
-
-python_check_deps() {
- python_has_version "dev-python/setuptools[${PYTHON_USEDEP}]"
-}
-
-pre_build_checks() {
- # Check build requirements: bugs #471810, #541816, #914220
- # We're going to start doing maths here on the size of an unpacked source tarball,
- # this should make updates easier as chromium continues to balloon in size.
- # xz -l /var/cache/distfiles/chromium-${PV}*.tar.xz
- local base_disk=9 # Round up
- use test && base_disk=$((base_disk + 5))
- local extra_disk=1 # Always include a little extra space
- local memory=4
- tc-is-cross-compiler && extra_disk=$((extra_disk * 2))
- if tc-is-lto || use pgo; then
- memory=$((memory * 2 + 1))
- tc-is-cross-compiler && extra_disk=$((extra_disk * 2)) # Double the requirements
- use pgo && extra_disk=$((extra_disk + 4))
- fi
- if is-flagq '-g?(gdb)?([1-9])'; then
- if use custom-cflags; then
- extra_disk=$((extra_disk + 5))
- fi
- memory=$((memory * 2))
- fi
- local CHECKREQS_MEMORY="${memory}G"
- local CHECKREQS_DISK_BUILD="$((base_disk + extra_disk))G"
- check-reqs_${EBUILD_PHASE_FUNC}
-}
-
-pkg_pretend() {
- if [[ ${MERGE_TYPE} != binary ]]; then
- # The pre_build_checks are all about compilation resources, no need to run it for a binpkg
- pre_build_checks
- fi
-
- if use headless; then
- local headless_unused_flags=("cups" "kerberos" "pulseaudio" "qt6" "vaapi" "wayland")
- for myiuse in ${headless_unused_flags[@]}; do
- use ${myiuse} && ewarn "Ignoring USE=${myiuse}, USE=headless is set."
- done
- fi
-
- if ! use bindist && use ffmpeg-chromium; then
- ewarn "Ignoring USE=ffmpeg-chromium, USE=bindist is not set."
- fi
- if use libcxx; then
- ewarn
- ewarn "Building with libcxx, please be aware that system-*"
- ewarn "and some other c++ dependencies need to be compiled"
- ewarn "with the same c++ library as ungoogled-chromium itself"
- ewarn "dev-libs/jsoncpp is most problematic, see #58 #49 #119 for details"
- ewarn "Simplest solution would be to disable corresponding system-* flags"
- ewarn
- fi
- if use cfi; then
- ewarn
- ewarn "Building with cfi is only possible if building with -stdlib=libc++"
- ewarn "Make sure all dependencies are also built this way, see #40"
- ewarn
- fi
- if use cromite; then
- ewarn
- ewarn "Cromite patches are very experimental and unstable"
- ewarn "Please consider testing them and giving feedback upstream:"
- ewarn "https://github.com/uazo/cromite/issues"
- ewarn "Not all patches are applied, let me know if others should be considered too"
- ewarn
- fi
-}
-
-pkg_setup() {
- if [[ ${MERGE_TYPE} != binary ]]; then
- # The pre_build_checks are all about compilation resources, no need to run it for a binpkg
- pre_build_checks
-
- # We haven't massaged any CFLAGS yet, so we want to do this before we force CC/CXX to prevent warnings.
- local want_lto="false"
- tc-is-lto && want_lto="true"
-
- # The linux:unbundle toolchain in GN grabs CC, CXX, CPP (etc) from the environment
- # We'll set these to clang here then use llvm-utils functions to very explicitly set these
- # to a sane value.
- # This is effectively the 'force-clang' path if GCC support is re-added.
- if use !bundled-toolchain; then
- llvm-r1_pkg_setup
- rust_pkg_setup
-
- if tc-ld-is-mold; then
- ewarn "Mold is currently not supported, it will not be used"
- fi
-
- # Forcing clang; respect llvm_slot_x to enable selection of impl via LLVM_COMPAT
- AR=llvm-ar
- CPP="${CHOST}-clang++-${LLVM_SLOT} -E"
- NM=llvm-nm
- CC="${CHOST}-clang-${LLVM_SLOT}"
- CXX="${CHOST}-clang++-${LLVM_SLOT}"
- fi
-
- # LTO in Chromium means LLVM ThinLTO, if GCC support is re-added
- # We'll need to handle that here too.
- use_lto="false"
- local lto_usable="true"
- if [[ "$want_lto" == "true" ]]; then
- if use arm64 && [[ "${LLVM_SLOT}" -lt 22 ]]; then
- einfo "LTO is broken with LLVM 21 on arm64, ignoring CFLAGS."
- lto_usable="false"
- else
- use_lto="true"
- fi
- # We can rely on GN to do this for us; without this builds
- # take significantly longer with LTO enabled.
- filter-lto
- fi
-
- if [[ "$use_lto" == "false" ]] && use official && [[ "$lto_usable" == "true" ]]; then
- einfo "USE=official selected and LTO not detected."
- einfo "It is _highly_ recommended that LTO be enabled for performance reasons"
- einfo "and to be consistent with the upstream \"official\" build optimisations."
- fi
-
- if [[ "$use_lto" == "false" ]] && use test; then
- die "Tests require CFI which requires LTO"
- fi
-
- export use_lto
-
- if tc-is-cross-compiler; then
- use pgo && die "The pgo USE flag cannot be used when cross-compiling"
- CPP="${CBUILD}-clang++-${LLVM_SLOT} -E"
- fi
-
- # Sanity checks for development convenience
- if ver_test $(gn --version || die) -lt ${GN_MIN_VER}; then
- die "dev-build/gn >= ${GN_MIN_VER} is required to build this Chromium"
- fi
-
- # Sometimes, when adding a new LLVM slot, devs (me) forget to install an appropriate lld.
- if tc-ld-is-lld; then
- local lld_ver=$(ld.lld --version | awk '{split($2,a,"."); print a[1]}' || die "Failed to check lld version")
- if [[ ${lld_ver} -lt ${LLVM_SLOT} ]]; then
- die "Your lld version (${lld_ver}) is too old for the selected LLVM slot (${LLVM_SLOT}). Please install a newer lld or select an older LLVM slot."
- fi
- fi
- fi
-
- chromium_suid_sandbox_check_kernel_config
-}
-
-src_unpack() {
- # # Here be dragons!
- # local XCLD="--exclude=chromium-${PV/_*}/third_party/instrumented_libs \
- # --exclude=chromium-${PV/_*}/third_party/llvm \
- # --exclude=chromium-${PV/_*}/third_party/llvm-build \
- # --exclude=chromium-${PV/_*}/third_party/node/linux \
- # --exclude=chromium-${PV/_*}/third_party/rust-src \
- # --exclude=chromium-${PV/_*}/third_party/rust-toolchain \
- # --exclude=chromium-${PV/_*}/build/linux/debian_bullseye_i386-sysroot \
- # --exclude=chromium-${PV/_*}/build/linux/debian_bullseye_amd64-sysroot \
- # --exclude=chromium-${PV/_*}/third_party/angle/third_party/VK-GL-CTS \
- # "
-
- # if ! use libcxx ; then
- # XCLD+=" --exclude=chromium-${PV/_*}/third_party/libc++"
- # fi
-
- # if ! use pgo ; then
- # XCLD+=" --exclude=chromium-${PV/_*}/chrome/build/pgo_profiles"
- # fi
-
- # einfo "Unpacking chromium-${PV/_*}.tar.xz to ${WORKDIR}"
- # # Gentoo tarball:
- # # tar ${XCLD} -xf "${DISTDIR}/chromium-${PV/_*}-gentoo.tar.xz" -C "${WORKDIR}" || die
- # tar ${XCLD} -xf "${DISTDIR}/chromium-${PV/_*}${LITE_TARBALL:+-lite}.tar.xz" -C "${WORKDIR}" || die
-
- # unpack ${UGC_URL#*->}
- # # unpack chromium-patches-${PATCH_V}.tar.bz2
- # # Warned you!
-
- unpack chromium-${PV/_*}-lite.tar.xz
- unpack chromium-patches-${PATCH_V}.tar.bz2
- # These should only be required when we're not using the official toolchain
- if use !bundled-toolchain; then
- unpack chromium-patches-copium-${COPIUM_COMMIT:0:10}.tar.gz
- fi
-
- if use test; then
- # This just contains a bunch of font files that need to be unpacked (or moved) to the correct location.
- local testfonts_dir="${WORKDIR}/chromium-${PV/_*}/third_party/test_fonts/test_fonts"
- local testfonts_tar="${DISTDIR}/chromium-testfonts-${TEST_FONT:0:10}.tar.gz"
- einfo "Unpacking test fonts ..."
- tar xf "${testfonts_tar}" -C "${testfonts_dir}" || die "Failed to unpack testfonts"
- fi
-
- # We need to manually unpack this since M126 else we'd unpack one toolchain over the other.
- # Since we're doing that anyway let's unpack to sensible locations to make symlink creation easier.
- if use bundled-toolchain; then
- einfo "Unpacking bundled Clang ..."
- mkdir -p "${WORKDIR}"/clang || die "Failed to create clang directory"
- tar xf "${DISTDIR}/chromium-clang-${BUNDLED_CLANG_VER}.tar.xz" -C "${WORKDIR}/clang" || die "Failed to unpack Clang"
- einfo "Unpacking bundled Rust ..."
- local rust_dir="${WORKDIR}/rust-toolchain"
- mkdir -p "${rust_dir}" || die "Failed to create rust toolchain directory"
- tar xf "${DISTDIR}/chromium-rust-toolchain-${RUST_SHORT_HASH}-${BUNDLED_CLANG_VER%-*}.tar.xz" -C "${rust_dir}" ||
- die "Failed to unpack Rust"
- fi
-
- if use ppc64; then
- unpack chromium-openpower-${PPC64_HASH:0:10}.tar.bz2
- fi
-
- # This is a dirty hack, but we need rollup to build successfully and it's proving to be challenging
- # to build locally due to deps
- unpack rollup-wasm-node-${ROLLUP_VER}.tgz
-
- if use cromite; then
- unpack cromite-${CROMITE_COMMIT_ID}.tar.gz
- fi
-
- unpack ${UGC_URL#*->}
-}
-
-remove_compiler_builtins() {
- # We can't use the bundled compiler builtins with the system toolchain
- # We used to `grep` then `sed`, but it was indirect. Combining the two into a single
- # `awk` command is more efficient and lets us document the logic more clearly.
-
- local pattern=' configs += [ "//build/config/clang:compiler_builtins" ]'
- local target='build/config/compiler/BUILD.gn'
-
- local tmpfile
- tmpfile=$(mktemp) || die "Failed to create temporary file."
-
- if awk -v pat="${pattern}" '
- BEGIN {
- match_found = 0
- }
-
- # If the delete countdown is active, decrement it and skip to the next line.
- d > 0 { d--; next }
-
- # If the current line matches the pattern...
- $0 == pat {
- match_found = 1 # ...set our flag to true.
- d = 2 # Set delete counter for this line and the next two.
- prev = "" # Clear the buffered previous line so it is not printed.
- next
- }
-
- # For any other line, print the buffered previous line.
- NR > 1 { print prev }
-
- # Buffer the current line to be printed on the next cycle.
- { prev = $0 }
-
- END {
- # Print the last line if it was not part of a deleted block.
- if (d == 0) { print prev }
-
- # If the pattern was never found, exit with a failure code.
- if (match_found == 0) {
- exit 1
- }
- }
- ' "${target}" > "${tmpfile}"; then
- # AWK SUCCEEDED (exit code 0): The pattern was found and edited.
- # This is to avoid gawk's `-i inplace` option which users complain about.
- mv "${tmpfile}" "${target}"
- else
- # AWK FAILED (exit code 1): The pattern was not found.
- rm -f "${tmpfile}"
- die "Awk patch failed: Pattern not found in ${target}."
- fi
-}
-
-src_prepare() {
- # Calling this here supports resumption via FEATURES=keepwork
- python_setup
-
- # We'll fill this in as we go. Patches go in chromium-patches.
- local PATCHES=()
-
- rm "${WORKDIR}/chromium-patches-${PATCH_V}/common/cr131-unbundle-icu-target.patch"
- if ver_test "${RUST_SLOT}" -ge "1.95.0"; then
- sed -i '/SupportedLaneCount/d' third_party/rust/chromium_crates_io/vendor/bytemuck-v1/src/zeroable.rs || die
- sed -i '/SupportedLaneCount/d' third_party/rust/chromium_crates_io/vendor/bytemuck-v1/src/pod.rs || die
- fi
-
- PATCHES+=(
- "${WORKDIR}/chromium-patches-${PATCH_V}/common/"
- "${FILESDIR}/restore-x86-r4.patch"
- )
-
- # So many fontconfig magic numbers to cover
- # TODO: once upstream roll to 2.18.2+ set that as our minimum and remove this logic.
- # <=2.17.1 -> 9
- # >2.17.1 && <2.18.2 -> 11
- # >=2.18.2 -> 12
- local fontconfig_cache_magic=9
- if has_version ">=media-libs/fontconfig-2.18.2"; then
- fontconfig_cache_magic=12
- elif has_version ">media-libs/fontconfig-2.17.1"; then
- fontconfig_cache_magic=11
- fi
-
- sed -E -i \
- -e "s#(fb5c91b2895aa445d23aebf7f9e2189c-le64\.cache-)(9|10|11|12)#\1${fontconfig_cache_magic}#g" \
- third_party/test_fonts/fontconfig/BUILD.gn || die "Failed to set fontconfig cache magic in BUILD.gn"
-
- #cp -f ${WORKDIR}/chromium-patches-${PATCH_V}/*-compiler.patch "${T}/compiler.patch"
- ##cp -f ${FILESDIR}/chromium-147-compiler.patch "${T}/compiler.patch"
- #if ! use custom-cflags; then #See #25 #92
- # sed -i '/default_stack_frames/Q' "${T}/compiler.patch" || die
- #fi
-
- sed -E -i \
- -e "s#(kCacheKey \+ \"/-le64\.cache-)(9|10|11|12)(\")#\1${fontconfig_cache_magic}\3#g" \
- -e "s#(kCacheKey \+ \"-le64\.cache-)(9|10|11|12)(\")#\1${fontconfig_cache_magic}\3#g" \
- third_party/test_fonts/fontconfig/generate_fontconfig_caches.cc || \
- die "Failed to set fontconfig cache magic in generate_fontconfig_caches.cc"
-
- if use bundled-toolchain; then
- # We need to symlink the toolchain into the expected location
- einfo "Symlinking Clang toolchain to expected location ..."
- mkdir -p third_party/llvm-build/ || die "Failed to create llvm-build directory"
- # the 'Chromium Linux Tarballs' seem to already have 'Release+Asserts/{lib,bin}'; not sure if this is an
- # upstream change - we're using the same scripts to build, theoretically. We'll still attempt to create
- # llvm-build, but we'll rm Release+Asserts and symlink directly.
- if [[ -d third_party/llvm-build/Release+Asserts ]]; then
- rm -r third_party/llvm-build/Release+Asserts || die "Failed to remove third_party/llvm-build/Release+Asserts"
- fi
- ln -s "${WORKDIR}"/clang third_party/llvm-build/Release+Asserts || die "Failed to bundle Clang"
- einfo "Symlinking Rust toolchain to expected location ..."
- # As above, so below
- if [[ -d third_party/rust-toolchain ]]; then
- rm -r third_party/rust-toolchain || die "Failed to remove third_party/rust-toolchain"
- fi
- ln -s "${WORKDIR}"/rust-toolchain third_party/rust-toolchain || die "Failed to bundle rust"
- cp "${WORKDIR}"/rust-toolchain/VERSION \
- "${WORKDIR}"/rust-toolchain/INSTALLED_VERSION || die "Failed to set rust version"
- else
- # We don't need our toolchain patches if we're using the official toolchain
-
- # Copium patches go here.
- PATCHES+=(
- "${WORKDIR}/copium/cr143-libsync-__BEGIN_DECLS.patch"
- "${WORKDIR}/copium/cr149-unbundle-minizip-undo-unicode.patch"
- )
-
- # Automate conditional application of chromium-patches
- # The directory structure is expected to be something like:
- # chromium-patches-145/
- # ├── toolchain/
- # │ ├── cr123-foo.patch
- # │ └── cr135-bar.patch
- # ├── llvm/
- # │ ├── cr144-baz.patch
- # │ └── lt-23/
- # │ └── cr145-bleeding-edge-llvm-feature.patch
- # Where `lt-23` means "apply this patch if the LLVM version is less than 23".
- # Only categories in `slot_map` will be checked for version constraints.
- shopt -s nullglob
- local -A slot_map=( [llvm]="${LLVM_SLOT}" [rust]="${RUST_SLOT}" )
-
- for category in "${WORKDIR}/chromium-patches-${PATCH_V}"/*/; do
- local category_name="${category%/}"
- category_name="${category_name##*/}"
-
- # Skip arch-specific categories
- if [[ "${category_name}" == "ppc64le" ]]; then
- use ppc64 || continue
- fi
-
- # We applied common patches above, no need to apply them again here
- [[ "${category_name}" == "common" ]] && continue
-
- # Unconditional patches for this category
- local category_patches=( "${category}"*.patch )
- [[ ${#category_patches[@]} -gt 0 ]] && PATCHES+=( "${category}" )
-
- # Version-constrained subdirectories (e.g., llvm/lt-23/)
- for constraint_dir in "${category}"*/; do
- local dir_name="${constraint_dir%/}"
- dir_name="${dir_name##*/}"
- if [[ "${dir_name}" =~ ^lt-(.*)$ && -v slot_map[${category_name}] ]]; then
- ver_test "${slot_map[${category_name}]}" -lt "${BASH_REMATCH[1]}" &&
- PATCHES+=( "${constraint_dir}" )
- fi
- done
- done
-
- shopt -u nullglob
-
- # Strictly speaking this doesn't need to be gated (no bundled toolchain for ppc64); it keeps the logic together
- if use ppc64; then
- local patchset_dir="${WORKDIR}/openpower-patches-${PPC64_HASH}/patches"
- # patch causes build errors on 4K page systems (https://bugs.gentoo.org/show_bug.cgi?id=940304)
- local page_size_patch="ppc64le/third_party/use-sysconf-page-size-on-ppc64.patch"
- local isa_3_patch="ppc64le/core/baseline-isa-3-0.patch"
- # Apply the OpenPOWER patches (check for page size and isa 3.0)
- openpower_patches=( $(grep -E "^ppc64le|^upstream" "${patchset_dir}/series" | grep -v "${page_size_patch}" |
- grep -v "${isa_3_patch}" || die) )
- for patch in "${openpower_patches[@]}"; do
- PATCHES+=( "${patchset_dir}/${patch}" )
- done
- if [[ $(getconf PAGESIZE) == 65536 ]]; then
- PATCHES+=( "${patchset_dir}/${page_size_patch}" )
- fi
- # We use vsx3 as a proxy for 'want isa3.0' (POWER9)
- if use cpu_flags_ppc_vsx3 ; then
- PATCHES+=( "${patchset_dir}/${isa_3_patch}" )
- fi
- fi
-
- remove_compiler_builtins
-
- # We can't rely on the eselect'd Rust to actually include rustfmt, so we'll point to the selected slot specifically.
- local suffix=""
- if [[ "${RUST_TYPE}" == "binary" ]]; then
- suffix="-bin-${RUST_SLOT}"
- else
- suffix="-${RUST_SLOT}"
- fi
- sed -i "s|/bin/rustfmt|/bin/rustfmt${suffix}|g" build/rust/rust_bindgen_generator.gni ||
- die "Failed to update rustfmt path"
-
- fi
-
- # Do this before we apply patches since (e.g.) ppc64 needs to patch rollup and it's easier in ${S}
- einfo "Moving rollup wasm-node package into place ..."
- mkdir -p third_party/devtools-frontend/src/node_modules/@rollup/wasm-node ||
- die "Failed to create node_modules/@rollup/wasm-node"
- mv "${WORKDIR}"/package/* third_party/devtools-frontend/src/node_modules/@rollup/wasm-node ||
- die "Failed to move rollup package"
-
- if [ ! -z "${CHROMIUM_COMMITS[*]}" ]; then
- # for i in "${CHROMIUM_COMMITS[@]}"; do
- for i in "${!CHROMIUM_COMMITS[@]}"; do
- if [[ ${CHROMIUM_COMMITS[$i]} =~ webrtc ]]; then
- patch_prefix="webrtc"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ angle ]]; then
- patch_prefix="angle"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ quiche ]]; then
- patch_prefix="quiche"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ dawn ]]; then
- patch_prefix="dawn"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ perfetto ]]; then
- patch_prefix="perfetto"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ink ]]; then
- patch_prefix="ink"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ vulkan-utility-libraries ]]; then
- patch_prefix="vulkan-utility-libraries"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ruy ]]; then
- patch_prefix="ruy"
- else
- patch_prefix="chromium"
- fi
- pushd "${CHROMIUM_COMMITS[$i]}" > /dev/null || die
- if [[ $i = -* ]]; then
- einfo "Reverting ${patch_prefix}-${i/-}.patch"
- git_wrapper apply -R --exclude="*unittest.cc" --exclude="DEPS" \
- -p1 < "${DISTDIR}/${patch_prefix}-${i/-}.patch"
- else
- einfo "Applying ${patch_prefix}-${i/-}.patch"
- git_wrapper apply --exclude="*unittest.cc" --exclude="DEPS" \
- -p1 < "${DISTDIR}/${patch_prefix}-${i/-}.patch"
- fi
- popd > /dev/null || die
- done
- fi
-
- if ! use bluetooth ; then
- PATCHES+=(
- "${FILESDIR}/disable-bluez-r7.patch"
- )
- fi
-
- if use convert-dict ; then
- PATCHES+=(
- "${FILESDIR}/chromium-ucf-dict-utility-r3.patch"
- )
- fi
-
- if ! use libcxx ; then
- PATCHES+=(
- "${FILESDIR}/fix-wayland-oncecallback-copy.patch"
- )
- fi
-
- if use system-ffmpeg; then
- PATCHES+=(
- "${FILESDIR}/chromium-141-opus-mp3.patch"
- "${FILESDIR}/chromium-135-hevc.patch"
- )
- sed -i "\!AVFMT_FLAG_NOH264PARSE!d" media/filters/ffmpeg_glue.cc || die
- ewarn "You need to expose \"av_stream_get_first_dts\" in ffmpeg via user patch"
- fi
-
- if use system-av1; then
- PATCHES+=(
- "${FILESDIR}/chromium-system-av1.patch"
- )
- fi
-
- if use system-libvpx; then
- PATCHES+=(
- "${FILESDIR}/chromium-system-libvpx.patch"
- )
- fi
-
- if use system-openjpeg ; then
- PATCHES+=(
- "${FILESDIR}/chromium-system-openjpeg-r4.patch"
- )
- fi
-
- # if use x86 ; then
- # #* Fixes a segfault in transport_security_state_generator
- # PATCHES+=(
- # "${FILESDIR}/fix-segfault-x86.patch"
- # )
- # fi
-
- # Testing all patches when NODIE is defined
- if [ ! -z "${NODIE}" ]; then
- for i in "${PATCHES[@]}"; do
- eapply_wrapper "$i"
- done
- nonfatal eapply_user
- else
- default
- fi
-
- if use cromite ; then
- BR_PA_PATH="${WORKDIR}/cromite-${CROMITE_COMMIT_ID}/build/patches"
-
- sed -i '/b\/components\/components_strings\.grd/,+10d' "${BR_PA_PATH}/Add-cromite-flags-support.patch" || die
- sed -i '/b\/chrome\/android\/java\/res\/xml\/privacy_preferences\.xml/,+13d' "${BR_PA_PATH}/Add-cromite-flags-support.patch" || die
- sed -i '/b\/android_webview\/support_library\/java\/src\/org\/chromium\/support_lib_glue/,+11d' "${BR_PA_PATH}/Client-hints-overrides.patch" || die
- sed -i '/webapps_strings.grdp" \/>/{s++webapps_strings.grdp" /><part file="cromite_components_strings_grd/placeholder.txt"/>+;h};${x;/./{x;q0};x;q1}' \
- components/components_strings.grd || die
-
- sed -i 's/absl::/std::/' "${BR_PA_PATH}/Add-a-proxy-configuration-page.patch" || die
-
- filterdiff -p1 "${BR_PA_PATH}/JIT-site-settings.patch" --exclude="content/browser/renderer_host/render_process_host_impl.cc" \
- > "${BR_PA_PATH}/JIT-site-settings.patch1"
- mv -f "${BR_PA_PATH}/JIT-site-settings.patch1" "${BR_PA_PATH}/JIT-site-settings.patch"
-
- BROMITE_PATCHES=(
- "${BR_PA_PATH}/bromite-build-utils.patch"
- "${BR_PA_PATH}/Battery-API-return-nothing.patch"
- "${BR_PA_PATH}/Multiple-fingerprinting-mitigations.patch"
- "${BR_PA_PATH}/Add-flag-to-configure-maximum-connections-per-host.patch"
- "${BR_PA_PATH}/Add-a-proxy-configuration-page.patch"
- "${BR_PA_PATH}/Enable-StrictOriginIsolation-and-SitePerProcess.patch"
- "${BR_PA_PATH}/Disable-requests-for-single-word-Omnibar-searches.patch"
- "${BR_PA_PATH}/Reduce-HTTP-headers-in-DoH-requests-to-bare-minimum.patch"
- "${BR_PA_PATH}/Client-hints-overrides.patch"
- "${BR_PA_PATH}/Disable-idle-detection.patch"
- "${BR_PA_PATH}/Disable-TLS-resumption.patch"
- "${BR_PA_PATH}/Remove-navigator.connection-info.patch"
-
- "${BR_PA_PATH}/AudioBuffer-AnalyserNode-fp-mitigations.patch"
- "${BR_PA_PATH}/Fonts-fingerprinting-mitigation.patch"
- "${BR_PA_PATH}/Content-settings-infrastructure.patch"
- "${BR_PA_PATH}/Add-autoplay-site-setting.patch"
- "${BR_PA_PATH}/Site-setting-for-images.patch"
- "${BR_PA_PATH}/JIT-site-settings.patch"
- "${BR_PA_PATH}/Add-webGL-site-setting.patch"
- "${BR_PA_PATH}/Add-webRTC-site-settings.patch"
- "${BR_PA_PATH}/Show-site-settings-for-cookies-javascript-and-ads.patch"
- "${BR_PA_PATH}/Viewport-Protection-flag.patch"
- "${BR_PA_PATH}/Revert-remove-allowscript-content-setting-secondary-url.patch"
- "${BR_PA_PATH}/Timezone-customization.patch"
- "${BR_PA_PATH}/Disable-speechSynthesis-getVoices-API.patch"
- "${BR_PA_PATH}/Remove-support-for-device-memory-and-cpu-recovery.patch"
- "${BR_PA_PATH}/Disable-Feeback-Collector.patch"
- "${BR_PA_PATH}/Disable-remote-altsvc-for-h3-connections.patch"
- "${BR_PA_PATH}/Add-cromite-flags-support.patch"
- "${BR_PA_PATH}/Enables-deactivation-of-the-js-debugger-statement.patch"
- )
- for i in "${BROMITE_PATCHES[@]}"; do
- if [[ "$i" =~ "Add-autoplay-site-setting.patch" ]] ||
- [[ "$i" =~ "JIT-site-settings.patch" ]] ||
- [[ "$i" =~ "Site-setting-for-images.patch" ]]; then
- einfo "Git binary patch: ${i##*/}"
- git_wrapper apply -p1 < "$i"
- else
- filter_wrapper "$i" --exclude="chrome/android/*"
- fi
- done
-
- #! conflicting patches
- sed -i '/browser_features.cc/,+17d' \
- "${UGC_WD}/patches/extra/ungoogled-chromium/add-flag-to-clear-data-on-exit.patch" || die
- sed -i 's$} // namespace features$BASE_FEATURE(kClearDataOnExit, "ClearDataOnExit", base::FEATURE_DISABLED_BY_DEFAULT);}$' \
- chrome/browser/browser_features.cc || die
- sed -i 's$} // namespace features$BASE_DECLARE_FEATURE(kClearDataOnExit);}$' \
- chrome/browser/browser_features.h || die
- sed -i 's$kChromeUIAboutHost,$kChromeUIAboutHost,"ungoogled-first-run",$' \
- chrome/common/webui_url_constants.cc || die
- sed -i '/chrome\/common\/webui_url_constants.cc/Q' \
- "${UGC_WD}/patches/extra/ungoogled-chromium/first-run-page.patch" || die
-
- #! normalise paths in py
- sed -i 's$os.path.dirname(include_file)$os.path.abspath(os.path.dirname(include_file))$' \
- build/bromite/gyp/cpp_bromite_include.py || die
- fi
-
- # if [[ ${LLVM_SLOT} == "19" ]]; then
- # # Upstream now hard depend on a feature that was added in LLVM 20.1, but we don't want to stabilise that yet.
- # # Do the temp file shuffle in case someone is using something other than `gawk`
- # {
- # awk '/config\("clang_warning_suppression"\) \{/ { print $0 " }"; sub(/clang/, "xclang"); print; next }
- # { print }' build/config/compiler/BUILD.gn > "${T}/build.gn" && \
- # mv "${T}/build.gn" build/config/compiler/BUILD.gn
- # } || die "Unable to disable warning suppression"
- # fi
-
- ## Not included in -lite tarballs, but we should check for it anyway.
- #if [[ -f third_party/node/linux/node-linux-x64/bin/node ]]; then
- # rm third_party/node/linux/node-linux-x64/bin/node || die
- #else
- # mkdir -p third_party/node/linux/node-linux-x64/bin || die
- #fi
- #ln -s "${EPREFIX}"/usr/bin/node third_party/node/linux/node-linux-x64/bin/node || die
-
- cp "${FILESDIR}/libusb.gn" build/linux/unbundle || die
- sed -i '/^REPLACEMENTS.*$/{s++REPLACEMENTS = {"libusb":"third_party/libusb/BUILD.gn",+;h};${x;/./{x;q0};x;q1}' \
- build/linux/unbundle/replace_gn_files.py || die
- sed -i '/^.*deps.*third_party\/jsoncpp.*$/{s++public_deps \+= [ "//third_party/jsoncpp" ]+;h};${x;/./{x;q0};x;q1}' \
- third_party/webrtc/rtc_base/BUILD.gn || die
-
- if use override-data-dir; then
- sed -i '/"chromium";/{s++"ungoogled-chromium";+;h};${x;/./{x;q0};x;q1}' \
- chrome/common/chrome_paths_linux.cc || die
- fi
-
- if use system-abseil-cpp; then
- eapply_wrapper "${FILESDIR}/chromium-147-system-abseil.patch"
-
- #! SFINAE mangling incompatibility between clang and gcc:
- #! https://github.com/llvm/llvm-project/issues/85656
- #! gcc: _ZN4absl12lts_202601074CordC1INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELi0EEEOT_
- #! clang: _ZN4absl12lts_202601074CordC1INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEETnNSt9enable_ifIXsr3std7is_sameIT_S8_EE5valueEiE4typeELi0EEEOSA_
- #! So, either this:
- eapply_wrapper "${FILESDIR}/chromium-141-system-abseil-cord.patch"
- #! or build with -fclang-abi-compat=17
-
- # cp -f /usr/include/absl/base/options.h third_party/abseil-cpp/absl/base/options.h
- # sed -i '/^#define ABSL_OPTION_USE_STD_ORDERING.*$/{s++#define ABSL_OPTION_USE_STD_ORDERING 1+;h};${x;/./{x;q0};x;q1}' \
- # third_party/abseil-cpp/absl/base/options.h || die
- fi
-
- #* Applying UGC PRs here
- if [ ! -z "${UGC_PR_COMMITS[*]}" ]; then
- pushd "${UGC_WD}" >/dev/null
- for i in "${UGC_PR_COMMITS[@]}"; do
- eapply_wrapper "${DISTDIR}/${PN}-$i.patch"
- done
- popd >/dev/null
- fi
-
- # From here we adapt ungoogled-chromium's patches to our needs
- local ugc_pruning_list="${UGC_WD}/pruning.list"
- local ugc_patch_series="${UGC_WD}/patches/series"
- local ugc_substitution_list="${UGC_WD}/domain_substitution.list"
-
- local ugc_unneeded=(
- # GN bootstrap
- extra/debian/gn/parallel
- # following Gentoo's Chromium
- core/ungoogled-chromium/build-with-wasm-rollup
- )
-
- if use cromite ; then
- einfo "Using fingerprinting patches from Cromite instead"
- ugc_unneeded+=(
- extra/bromite/fingerprinting-flags-client-rects-and-measuretext
- extra/bromite/flag-max-connections-per-host
- extra/bromite/flag-fingerprinting-canvas-image-data-noise
- extra/ungoogled-chromium/add-components-ungoogled
- extra/ungoogled-chromium/remove-pac-size-limit
- )
- fi
-
- # #* Temporary fix
- # sed -i "\!ios/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/icu/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/libjpeg_turbo/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/snappy/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/closure_compiler/!d" "${ugc_pruning_list}" || die
-
- # #* Didn't unpack them at the first place
- # sed -i "\!build/linux/debian_bullseye_i386-sysroot!d" "${ugc_pruning_list}" || die
- # sed -i "\!build/linux/debian_bullseye_amd64-sysroot!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/llvm-build!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/node/linux!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/rust-src!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/rust-toolchain!d" "${ugc_pruning_list}" || die
- # if ! use libcxx ; then
- # sed -i "\!third_party/libc!d" "${ugc_pruning_list}" || die
- # fi
- sed -i "s|debug('files|error('files|" \
- "${UGC_WD}/utils/prune_binaries.py" || die
- sed -i "\!third_party/node/linux!d" \
- "${UGC_WD}/utils/prune_binaries.py" || die
-
- local ugc_p ugc_dir
- for p in "${ugc_unneeded[@]}"; do
- einfo "Removing ${p}.patch"
- sed -i "\!${p}.patch!d" "${ugc_patch_series}" || die
- done
-
- if [ ! -z "${UGC_SKIP_PATCHES}" ]; then
- for p in ${UGC_SKIP_PATCHES}; do
- ewarn "Removing ${p}"
- sed -i "\!${p}!d" "${ugc_patch_series}" || die
- done
- fi
-
- if [ ! -z "${UGC_KEEP_BINARIES}" ]; then
- for p in ${UGC_KEEP_BINARIES}; do
- ewarn "Keeping binary ${p}"
- sed -i "\!${p}!d" "${ugc_pruning_list}" || die
- done
- fi
-
- if [ ! -z "${UGC_SKIP_SUBSTITUTION}" ]; then
- for p in ${UGC_SKIP_SUBSTITUTION}; do
- ewarn "No substitutions in ${p}"
- sed -i "\!${p}!d" "${ugc_substitution_list}" || die
- done
- fi
-
- ebegin "Pruning binaries"
- "${UGC_WD}/utils/prune_binaries.py" -q . "${UGC_WD}/pruning.list"
- eend $? || die
-
- ebegin "Applying ungoogled-chromium patches"
- "${UGC_WD}/utils/patches.py" -q apply . "${UGC_WD}/patches"
- eend $? || die
-
- ebegin "Applying domain substitution"
- "${UGC_WD}/utils/domain_substitution.py" -q apply -r "${UGC_WD}/domain_regex.list" -f "${UGC_WD}/domain_substitution.list" .
- eend $? || die
-
- # Sanity check esbuild version before we start removing files.
- # We _could_ patch the version check out - in theory esbuild upstream are being super conservative after
- # arch(AUR) packaged an `esbuild` binary and set ESBUILD_BINARY_PATH=/usr/bin/esbuild, causing much breakage,
- # but this is fine too and exactly matches what upstream are expecting.
- # https://github.com/evanw/esbuild/issues/2894
- local esbuild_js="${S}/third_party/devtools-frontend/src/node_modules/esbuild/lib/main.js"
- local found
- found=$(awk -F'"' '/if \(binaryVersion !==/ {print $2}' "${esbuild_js}")
- if [[ "${found}" != "${ESBUILD_VER}" ]]; then
- die "esbuild version mismatch: expected ${ESBUILD_VER}, found ${found}"
- fi
-
- elog "Removing bundled binaries from source tree ..."
- # Purge bundled ELF files: These are non-portable and will cause issues if used instead of system versions.
- # Use `--wasm` to also remove WebAssembly binaries, if desired - they're portable so shouldn't break builds.
- ${EPYTHON} "${FILESDIR}/bin-finder.py" --elf "${S}" | awk '{print $1}' | xargs rm -f ||
- die "Failed to remove bundled binaries"
-
- # And now we restore any that we actually need, from the host system
- local esbuild_path="${S}/third_party/devtools-frontend/src/third_party/esbuild"
- local -A restore_list=(
- ["/usr/bin/esbuild-${ESBUILD_VER}"]="${esbuild_path}/esbuild"
- ["/usr/bin/gperf"]="${S}/third_party/gperf/cipd/bin/gperf"
- ["/usr/bin/node"]="${S}/third_party/node/linux/node-linux-x64/bin/node"
- )
-
- for src in "${!restore_list[@]}"; do
- dst="${restore_list[${src}]}"
- if [[ -f "${src}" ]]; then
- einfo "Symlinking ${src} ..."
- # Make sure the parent dir exists; some tarballs don't include (e.g.) node's bindir
- mkdir -p "$(dirname "${dst}")" || die "Failed to create directory for ${dst}"
- ln -s "${src}" "${dst}" || die "Failed to symlink ${dst} from ${src}"
- if [[ ! -L "${dst}" || "$(readlink -f "${dst}")" != "${src}" ]]; then
- die "Symlink verification failed for ${dst} -> ${src}"
- fi
- else
- die "Expected to find ${src} to restore ${dst}, but it does not exist."
- fi
- done
-
- # adjust python interpreter version
- sed -i -e "s|\(^script_executable = \).*|\1\"${EPYTHON}\"|g" .gn || die
-
- # Use the system copy of hwdata's usb.ids
- sed 's|//third_party/usb_ids/src/usb.ids|/usr/share/hwdata/usb.ids|g' \
- -i services/device/public/cpp/usb/BUILD.gn || die "Failed to set system usb.ids path"
-
- # remove_bundled_libraries.py walks the source tree and looks for paths containing the substring 'third_party'
- # whitelist matches use the right-most matching path component, so we need to whitelist from that point down.
- local keeplibs=(
- base/third_party/cityhash
- )
- use system-double-conversion || keeplibs+=(
- base/third_party/double_conversion
- )
- keeplibs+=(
- base/third_party/icu
- base/third_party/nspr
- base/third_party/superfasthash
- base/third_party/symbolize
- base/third_party/xdg_user_dirs
- buildtools/third_party/libc++
- buildtools/third_party/libc++abi
- )
- use cromite && keeplibs+=(
- cromite_flags/third_party
- )
- keeplibs+=(
- net/third_party/mozilla_security_manager
- net/third_party/quic
- net/third_party/uri_template
- )
- use system-abseil-cpp || keeplibs+=(
- third_party/abseil-cpp
- )
- keeplibs+=(
- third_party/angle
- third_party/angle/src/common/third_party/xxhash
- third_party/angle/src/third_party/ceval
- )
- use nvidia || keeplibs+=(
- third_party/angle/src/third_party/libXNVCtrl
- )
- keeplibs+=(
- third_party/angle/src/third_party/volk
- third_party/anonymous_tokens
- third_party/apple_apsl
- third_party/axe-core
- third_party/bidimapper
- third_party/blink
- third_party/boringssl
- third_party/boringssl/src/third_party/fiat
- third_party/breakpad
- third_party/breakpad/breakpad/src/third_party/curl
- )
- use system-brotli || keeplibs+=(
- third_party/brotli
- )
- keeplibs+=(
- third_party/catapult
- third_party/catapult/common/py_vulcanize/third_party/rcssmin
- third_party/catapult/common/py_vulcanize/third_party/rjsmin
- third_party/catapult/third_party/beautifulsoup4-4.9.3
- third_party/catapult/third_party/html5lib-1.1
- third_party/catapult/third_party/polymer
- third_party/catapult/third_party/six
- third_party/catapult/third_party/typ
- third_party/catapult/tracing/third_party/d3
- third_party/catapult/tracing/third_party/gl-matrix
- third_party/catapult/tracing/third_party/jpeg-js
- third_party/catapult/tracing/third_party/jszip
- third_party/catapult/tracing/third_party/mannwhitneyu
- third_party/catapult/tracing/third_party/oboe
- third_party/catapult/tracing/third_party/pako
- third_party/ced
- third_party/cld_3
- third_party/closure_compiler
- )
- use libcxx && keeplibs+=(
- third_party/compiler-rt
- )
- keeplibs+=(
- third_party/content_analysis_sdk
- third_party/cpuinfo
- third_party/crabbyavif
- third_party/crashpad
- third_party/crashpad/crashpad/third_party/lss
- third_party/crashpad/crashpad/third_party/zlib
- )
- use system-crc32c || keeplibs+=(
- third_party/crc32c
- )
- keeplibs+=(
- third_party/cros_system_api
- third_party/d3
- third_party/dawn
- third_party/dawn/third_party/gn/webgpu-cts
- third_party/dawn/third_party/OpenGL-Registry
- third_party/dawn/third_party/renderdoc
- third_party/dawn/third_party/webgpu-headers
- third_party/depot_tools
- third_party/devscripts
- third_party/devtools-frontend
- third_party/devtools-frontend/src/front_end/third_party/acorn
- third_party/devtools-frontend/src/front_end/third_party/additional_readme_paths.json
- third_party/devtools-frontend/src/front_end/third_party/axe-core
- third_party/devtools-frontend/src/front_end/third_party/chromium
- third_party/devtools-frontend/src/front_end/third_party/codemirror
- third_party/devtools-frontend/src/front_end/third_party/csp_evaluator
- third_party/devtools-frontend/src/front_end/third_party/diff
- third_party/devtools-frontend/src/front_end/third_party/i18n
- third_party/devtools-frontend/src/front_end/third_party/intl-messageformat
- third_party/devtools-frontend/src/front_end/third_party/json5
- third_party/devtools-frontend/src/front_end/third_party/legacy-javascript
- third_party/devtools-frontend/src/front_end/third_party/lighthouse
- third_party/devtools-frontend/src/front_end/third_party/lit
- third_party/devtools-frontend/src/front_end/third_party/marked
- third_party/devtools-frontend/src/front_end/third_party/puppeteer
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/third_party/mitt
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/third_party/parsel-js
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/third_party/rxjs
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/third_party/urlpattern-polyfill
- third_party/devtools-frontend/src/front_end/third_party/source-map-scopes-codec
- third_party/devtools-frontend/src/front_end/third_party/third-party-web
- third_party/devtools-frontend/src/front_end/third_party/vscode.web-custom-data
- third_party/devtools-frontend/src/front_end/third_party/wasmparser
- third_party/devtools-frontend/src/front_end/third_party/web-vitals
- third_party/devtools-frontend/src/third_party
- third_party/dom_distiller_js
- third_party/dragonbox
- third_party/eigen3
- third_party/emoji-segmenter
- third_party/farmhash
- third_party/fast_float
- third_party/fdlibm
- third_party/federated_compute/chromium/fcp/confidentialcompute
- third_party/federated_compute/chromium/fcp/protos
- third_party/federated_compute/chromium/fcp/secagg
- third_party/federated_compute/chromium/fcp/client
- third_party/federated_compute/src/fcp/base
- third_party/federated_compute/src/fcp/confidentialcompute
- third_party/federated_compute/src/fcp/protos
- third_party/federated_compute/src/fcp/client
- third_party/federated_compute/src/fcp/secagg
- third_party/federated_compute/third_party/googleapis/src/google
- third_party/federated_compute/third_party/tensorflow-federated
- third_party/federated_compute/third_party/protodatastore-cpp
- third_party/fft2d
- third_party/flatbuffers
- third_party/fp16
- third_party/freetype
- third_party/fusejs
- third_party/fxdiv
- third_party/gemmlowp
- third_party/google_input_tools
- third_party/google_input_tools/third_party/closure_library
- third_party/google_input_tools/third_party/closure_library/third_party/closure
- third_party/googletest
- third_party/gperf # We symlink system gperf, but this will purge the symlink since we tidy up afterwards.
- third_party/highway
- third_party/hunspell
- third_party/hyphenation-patterns
- third_party/ink/src/ink/brush
- third_party/ink/src/ink/color
- third_party/ink/src/ink/geometry
- third_party/ink/src/ink/rendering
- third_party/ink/src/ink/rendering/skia/common_internal
- third_party/ink/src/ink/rendering/skia/native
- third_party/ink/src/ink/rendering/skia/native/internal
- third_party/ink/src/ink/strokes
- third_party/ink/src/ink/types
- third_party/inspector_protocol
- third_party/ipcz
- third_party/jinja2
- )
- use system-jsoncpp || keeplibs+=(
- third_party/jsoncpp
- )
- keeplibs+=(
- third_party/khronos
- third_party/lens_server_proto
- third_party/leveldatabase
- third_party/libaddressinput
- third_party/libdrm
- third_party/libgav1
- third_party/libjingle
- third_party/libpfm4
- third_party/libphonenumber
- third_party/libpng
- third_party/libsecret
- third_party/libsrtp
- third_party/libsync
- third_party/libtess2/libtess2
- third_party/libtess2/src/Include
- third_party/libtess2/src/Source
- third_party/liburlpattern
- )
- use system-libusb || keeplibs+=(
- third_party/libusb
- )
- keeplibs+=(
- third_party/libva_protected_content
- )
- use system-libvpx || keeplibs+=(
- third_party/libvpx
- third_party/libvpx/source/libvpx/third_party/x86inc
- )
- keeplibs+=(
- third_party/libwebm
- third_party/libx11
- third_party/libxcb-keysyms
- third_party/libxml/chromium
- third_party/libyuv
- third_party/libzip
- third_party/lit
- )
- use libcxx && keeplibs+=(
- third_party/llvm-libc
- third_party/llvm-libc/src/shared/
- )
- keeplibs+=(
- third_party/lottie
- third_party/lss
- third_party/lzma_sdk
- third_party/mako
- third_party/markupsafe
- third_party/material_color_utilities
- third_party/metrics_proto
- third_party/minigbm
- third_party/ml_dtypes
- third_party/modp_b64
- third_party/nasm
- third_party/nearby
- third_party/neon_2_sse
- third_party/node
- third_party/oak/chromium/proto
- third_party/oak/chromium/proto/attestation
- third_party/omnibox_proto
- third_party/one_euro_filter
- third_party/openscreen
- third_party/openscreen/src/third_party/
- third_party/openscreen/src/third_party/tinycbor/src/src
- third_party/ots
- third_party/pdfium
- third_party/pdfium/third_party/agg23
- third_party/pdfium/third_party/bigint
- third_party/pdfium/third_party/freetype
- third_party/pdfium/third_party/lcms
- )
- use system-openjpeg || keeplibs+=(
- third_party/pdfium/third_party/libopenjpeg
- )
- keeplibs+=(
- third_party/pdfium/third_party/libtiff
- third_party/perfetto
- third_party/perfetto/protos/third_party/android
- third_party/perfetto/protos/third_party/chromium
- third_party/perfetto/protos/third_party/pprof
- third_party/perfetto/protos/third_party/primes
- third_party/perfetto/protos/third_party/simpleperf
- third_party/pffft
- third_party/ply
- third_party/polymer
- third_party/private_membership
- third_party/private-join-and-compute
- third_party/protobuf
- third_party/protobuf/third_party/utf8_range
- third_party/pthreadpool
- third_party/puffin
- third_party/pyjson5
- third_party/pyyaml
- third_party/rapidhash
- third_party/readability
- third_party/rnnoise
- third_party/rust
- third_party/ruy
- third_party/s2cellid
- third_party/search_engines_data
- third_party/securemessage
- third_party/selenium-atoms
- third_party/sentencepiece
- third_party/sentencepiece/src/third_party/darts_clone
- third_party/shell-encryption
- third_party/simdutf
- third_party/simplejson
- third_party/six
- third_party/skia
- third_party/skia/include/third_party/vulkan
- third_party/smhasher
- )
- use system-snappy || keeplibs+=(
- third_party/snappy
- )
- keeplibs+=(
- third_party/spirv-headers
- third_party/spirv-tools
- third_party/sqlite
- third_party/swiftshader
- third_party/swiftshader/third_party/astc-encoder
- third_party/swiftshader/third_party/llvm-subzero
- third_party/swiftshader/third_party/marl
- third_party/swiftshader/third_party/SPIRV-Headers/include/spirv
- third_party/swiftshader/third_party/SPIRV-Tools
- third_party/swiftshader/third_party/subzero
- third_party/tensorflow_models
- third_party/tensorflow-text
- third_party/tflite
- third_party/tflite/src/third_party/fft2d
- third_party/tflite/src/third_party/xla/third_party/tsl
- third_party/tflite/src/third_party/xla/xla/tsl/framework
- third_party/tflite/src/third_party/xla/xla/tsl/lib/random
- third_party/tflite/src/third_party/xla/xla/tsl/platform
- third_party/tflite/src/third_party/xla/xla/tsl/protobuf
- third_party/tflite/src/third_party/xla/xla/tsl/util
- third_party/ukey2
- third_party/utf
- third_party/vulkan
- third_party/wayland
- third_party/webdriver
- third_party/webgpu-cts
- third_party/webrtc
- third_party/webrtc/common_audio/third_party/ooura
- third_party/webrtc/common_audio/third_party/spl_sqrt_floor
- third_party/webrtc/modules/third_party/fft
- third_party/webrtc/modules/third_party/g711
- third_party/webrtc/modules/third_party/g722
- third_party/widevine
- )
- use system-woff2 || keeplibs+=(
- third_party/woff2
- )
- keeplibs+=(
- third_party/wuffs
- third_party/x11proto
- third_party/xcbproto
- third_party/xnnpack
- third_party/zlib/google
- third_party/zxcvbn-cpp
- url/third_party/mozilla
- v8/third_party/glibc
- v8/third_party/inspector_protocol
- v8/third_party/rapidhash-v8
- v8/third_party/siphash
- v8/third_party/utf8-decoder
- v8/third_party/v8
- v8/third_party/valgrind
-
- # gyp -> gn leftovers
- third_party/speech-dispatcher
- third_party/usb_ids
- )
-
- if use test; then
- keeplibs+=(
- third_party/breakpad/breakpad/src/processor
- third_party/fuzztest
- third_party/google_benchmark/src/include/benchmark
- third_party/google_benchmark/src/src
- third_party/test_fonts
- third_party/test_fonts/fontconfig
- third_party/test_fonts/test_fonts
- )
- fi
-
- # USE=system-*
- if ! use system-harfbuzz; then
- keeplibs+=( third_party/harfbuzz )
- fi
-
- if ! use system-ffmpeg; then
- keeplibs+=( third_party/ffmpeg third_party/opus )
- fi
-
- if ! use system-icu; then
- keeplibs+=( third_party/icu )
- fi
-
- if ! use system-zstd; then
- keeplibs+=( third_party/zstd )
- fi
-
- if ! use system-av1; then
- keeplibs+=(
- third_party/dav1d
- third_party/libaom
- third_party/libaom/source/libaom/third_party/fastfeat
- third_party/libaom/source/libaom/third_party/vector
- third_party/libaom/source/libaom/third_party/x86inc
- )
- fi
-
- if use libcxx; then
- keeplibs+=(
- third_party/libc++
- third_party/llvm-libc
- )
- fi
-
- if ! use system-openh264; then
- keeplibs+=( third_party/openh264 )
- fi
-
- if ! use system-re2; then
- keeplibs+=( third_party/re2 )
- fi
-
- # Arch-specific
- if use arm64 || use ppc64 ; then
- keeplibs+=( third_party/swiftshader/third_party/llvm-10.0 )
- fi
- # we need to generate ppc64 stuff because upstream does not ship it yet
- # it has to be done before unbundling.
- if use ppc64; then
- pushd third_party/libvpx >/dev/null || die
- mkdir -p source/config/linux/ppc64 || die
- # requires git and clang, bug #832803
- # Revert https://chromium.googlesource.com/chromium/src/+/b463d0f40b08b4e896e7f458d89ae58ce2a27165%5E%21/third_party/libvpx/generate_gni.sh
- # and https://chromium.googlesource.com/chromium/src/+/71ebcbce867dd31da5f8b405a28fcb0de0657d91%5E%21/third_party/libvpx/generate_gni.sh
- # since we're not in a git repo
- sed -i -e "s|^update_readme||g; s|clang-format|${EPREFIX}/bin/true|g; /^git -C/d; /git cl/d; /cd \$BASE_DIR\/\$LIBVPX_SRC_DIR/ign format --in-place \$BASE_DIR\/BUILD.gn\ngn format --in-place \$BASE_DIR\/libvpx_srcs.gni" \
- generate_gni.sh || die
- ./generate_gni.sh || die
- popd >/dev/null || die
-
- pushd third_party/ffmpeg >/dev/null || die
- cp libavcodec/ppc/h264dsp.c libavcodec/ppc/h264dsp_ppc.c || die
- cp libavcodec/ppc/h264qpel.c libavcodec/ppc/h264qpel_ppc.c || die
- popd >/dev/null || die
- fi
-
- # Sanity check keeplibs, on major version bumps it is often necessary to update this list
- # and this enables us to hit them all at once.
- # There are some entries that need to be whitelisted (TODO: Why? The file is understandable, the rest seem odd)
- whitelist_libs=(
- net/third_party/quic
- third_party/devtools-frontend/src/front_end/third_party/additional_readme_paths.json
- third_party/libjingle
- third_party/mesa
- third_party/skia/third_party/vulkan
- third_party/vulkan
- )
- local not_found_libs=()
- for lib in "${keeplibs[@]}"; do
- if [[ ! -d "${lib}" ]] && ! has "${lib}" "${whitelist_libs[@]}"; then
- not_found_libs+=( "${lib}" )
- fi
- done
-
- if [[ ${#not_found_libs[@]} -gt 0 ]]; then
- ewarn "The following \`keeplibs\` directories were not found in the source tree:"
- for lib in "${not_found_libs[@]}"; do
- ewarn " ${lib}"
- done
- fi
-
- keeplibs+=( third_party/ungoogled )
-
- # Remove most bundled libraries. Some are still needed.
- einfo "Unbundling third-party libraries ..."
- build/linux/unbundle/remove_bundled_libraries.py "${keeplibs[@]}" --do-remove || die
-
- # Interferes with our bundled clang path; we don't want stripped binaries anyway.
- sed -i -e 's|${clang_base_path}/bin/llvm-strip|/bin/true|g' \
- -e 's|${clang_base_path}/bin/llvm-objcopy|/bin/true|g' \
- build/linux/strip_binary.gni || die
-}
-
-src_configure() {
- # Calling this here supports resumption via FEATURES=keepwork
- python_setup
-
- # 974899: sometimes people try to build with a non-Unicode locale and python gets very upset
- python_export_utf8_locale || die "Chromium builds require a UTF-8 locale."
-
- # Bug 491582.
- export TMPDIR="${WORKDIR}/temp"
- mkdir -p -m 755 "${TMPDIR}" || die
-
- # https://bugs.gentoo.org/654216
- addpredict /dev/dri/ #nowarn
-
- # Use system-provided libraries.
- # TODO: freetype -- remove sources (https://bugs.chromium.org/p/pdfium/issues/detail?id=733).
- # TODO: use_system_hunspell (upstream changes needed).
- # TODO: use_system_protobuf (bug #525560).
- # TODO: use_system_sqlite (http://crbug.com/22208).
-
- # libevent: https://bugs.gentoo.org/593458
- local gn_system_libraries=(
- flac
- fontconfig
- freetype
- libjpeg
- libwebp
- libxml
- libxslt
- zlib
- )
- if use system-abseil-cpp; then
- gn_system_libraries+=(
- absl_algorithm
- absl_base
- absl_cleanup
- absl_container
- absl_crc
- absl_debugging
- absl_flags
- absl_functional
- absl_hash
- absl_log
- absl_log_internal
- absl_memory
- absl_meta
- absl_numeric
- absl_random
- absl_status
- absl_strings
- absl_synchronization
- absl_time
- absl_types
- absl_utility
- )
- fi
- if use system-brotli; then
- gn_system_libraries+=( brotli )
- fi
- if use system-crc32c; then
- gn_system_libraries+=( crc32c )
- fi
- if use system-double-conversion; then
- gn_system_libraries+=( double-conversion )
- fi
- if use system-woff2; then
- gn_system_libraries+=( woff2 )
- fi
- if use nvidia; then
- gn_system_libraries+=( libXNVCtrl )
- fi
- if use system-ffmpeg; then
- gn_system_libraries+=( ffmpeg opus )
- fi
- if use system-jsoncpp; then
- gn_system_libraries+=( jsoncpp )
- fi
- if use system-icu; then
- gn_system_libraries+=( icu )
- fi
- if use system-zstd; then
- gn_system_libraries+=( zstd )
- fi
- if use system-av1; then
- gn_system_libraries+=( dav1d libaom )
- fi
- if use system-libusb; then
- gn_system_libraries+=( libusb )
- fi
- if use system-libvpx; then
- gn_system_libraries+=( libvpx )
- fi
- use system-openh264 && gn_system_libraries+=(
- openh264
- )
- use system-re2 && gn_system_libraries+=(
- re2
- )
- use system-snappy && gn_system_libraries+=(
- snappy
- )
-
- build/linux/unbundle/replace_gn_files.py --system-libraries "${gn_system_libraries[@]}" ||
- die "Failed to replace GN files for system libraries"
-
- # TODO 131: The above call clobbers `enable_freetype = true` in the freetype gni file
- # drop the last line, then append the freetype line and a new curly brace to end the block
- local freetype_gni="build/config/freetype/freetype.gni"
- sed -i -e '$d' ${freetype_gni} || die
- echo " enable_freetype = true" >> ${freetype_gni} || die
- echo "}" >> ${freetype_gni} || die
-
- if use !custom-cflags; then
- replace-flags "-Os" "-O2"
- strip-flags
- # Debug info section overflows without component build
- # Prevent linker from running out of address space, bug #471810 .
- filter-flags "-g*"
- # 949123: Several multimedia components explicitly build with specific CFLAGS and
- # use runtime detection to enable optimisations; unfortunately any of our CFLAGS are suffixed
- # to the end of the command line, which causes build failures.
- fi
- # Since M150 `skia` will begin breaking for x86_64 due to compilation of `avx512` code paths;
- # we need to filter these for all arches.
- filter-flags "-march*" "-mtune*" "-mcpu*"
-
- # We don't use the same clang version as upstream, and with -Werror
- # we need to make sure that we don't get superfluous warnings.
- append-flags -Wno-unknown-warning-option
- if tc-is-cross-compiler; then # can you cross-compile with the bundled toolchain?
- export BUILD_CXXFLAGS+=" -Wno-unknown-warning-option"
- export BUILD_CFLAGS+=" -Wno-unknown-warning-option"
- fi
-
- # Start building our GN options
- local myconf_gn=() # Tip: strings must be quoted, bools or numbers are fine
-
- if use !bundled-toolchain; then
- # We already forced the "correct" clang via pkg_setup
-
- if tc-is-cross-compiler; then
- CC="${CC} -target ${CHOST} --sysroot ${ESYSROOT}"
- CXX="${CXX} -target ${CHOST} --sysroot ${ESYSROOT}"
- BUILD_AR=${AR}
- BUILD_CC=${CC}
- BUILD_CXX=${CXX}
- BUILD_NM=${NM}
- fi
-
- # Make sure the build system will use the right tools, bug #340795.
- tc-export AR CC CXX NM
-
- strip-unsupported-flags
- append-ldflags -Wl,--undefined-version # https://bugs.gentoo.org/918897#c32
-
- myconf_gn+=(
- "is_clang=true"
- "clang_use_chrome_plugins=false"
- "use_clang_modules=false" # M141 enables this for the linux platform by default.
- 'custom_toolchain="//build/toolchain/linux/unbundle:default"'
- # From M127 we need to provide a location for libclang and the clang resource dir so that bindgen can find them
- "bindgen_libclang_path=\"$(get_llvm_prefix)/$(get_libdir)\""
- "bindgen_clang_resource_dir=\"${EPREFIX}/usr/lib/clang/${LLVM_SLOT}/include\""
- "bindgen_extra_clang_args=[\"-I${EPREFIX}/usr/lib/clang/${LLVM_SLOT}/include\"]"
- "clang_base_path=\"${EPREFIX}/usr/lib/clang/${LLVM_SLOT}/\""
- "rust_bindgen_root=\"${EPREFIX}/usr/\""
- "rust_sysroot_absolute=\"$(get_rust_prefix)\""
- "rustc_version=\"${RUST_SLOT}\""
- )
-
- # Currently disabled, runtime issues with mold
- #if tc-ld-is-mold; then
- # myconf_gn+=(
- # "use_mold=true"
- # "use_lld=false"
- # "linker_path=\"${EPREFIX}/usr/bin/mold\""
- # )
- #else
- myconf_gn+=( "use_lld=true" )
- #fi
-
- if [[ ${LLVM_SLOT} -lt 23 ]]; then
- # Workaround for -fsanitize-ignore-for-ubsan-feature (added in LLVM 23)
- myconf_gn+=( 'clang_has_ubsan_feature_ignore=false' )
- fi
-
- if ! tc-is-cross-compiler; then
- myconf_gn+=( 'host_toolchain="//build/toolchain/linux/unbundle:default"' )
- else
- tc-export BUILD_{AR,CC,CXX,NM}
- myconf_gn+=(
- 'host_toolchain="//build/toolchain/linux/unbundle:host"'
- 'v8_snapshot_toolchain="//build/toolchain/linux/unbundle:host"'
- "host_pkg_config=\"$(tc-getBUILD_PKG_CONFIG)\""
- "pkg_config=\"$(tc-getPKG_CONFIG)\""
- )
-
- # setup cups-config, build system only uses --libs option
- if use cups; then
- mkdir "${T}/cups-config" || die
- cp "${ESYSROOT}/usr/bin/${CHOST}-cups-config" "${T}/cups-config/cups-config" || die
- export PATH="${PATH}:${T}/cups-config"
- fi
-
- # Don't inherit PKG_CONFIG_PATH from environment
- local -x PKG_CONFIG_PATH=
- fi
-
- fi # !bundled-toolchain
-
- local myarch
- myarch="$(tc-arch)"
- case ${myarch} in
- amd64)
- # Bug 530248, 544702, 546984, 853646.
- use !custom-cflags && filter-flags -mno-mmx -mno-sse2 -mno-ssse3 -mno-sse4.1 \
- -mno-avx -mno-avx2 -mno-fma -mno-fma4 -mno-xop -mno-sse4a
- myconf_gn+=( 'target_cpu="x64"' )
- ;;
- x86)
- # Bug 530248, 544702, 546984, 853646.
- use !custom-cflags && filter-flags -mno-mmx -mno-sse2 -mno-ssse3 -mno-sse4.1 \
- -mno-avx -mno-avx2 -mno-fma -mno-fma4 -mno-xop -mno-sse4a
- myconf_gn+=( 'target_cpu="x86"' )
- ;;
- arm64)
- myconf_gn+=( 'target_cpu="arm64"' )
- ;;
- ppc64)
- myconf_gn+=( 'target_cpu="ppc64"' )
- ;;
- *)
- die "Failed to determine target arch, got '${myarch}'."
- ;;
- esac
-
- # Common options
-
- myconf_gn+=(
- # Disable code formating of generated files
- "blink_enable_generated_code_formatting=false"
- # enable DCHECK with USE=debug only, increases chrome binary size by 30%, bug #811138.
- # DCHECK is fatal by default, make it configurable at runtime, #bug 807881.
- "dcheck_always_on=$(usex debug true false)"
- "dcheck_is_configurable=$(usex debug true false)"
- # Chromium builds provided by Linux distros should disable the testing config
- "disable_fieldtrial_testing_config=true"
- # Custom patch: Enable building Chromium as individual channels (e.g. stable, beta, dev) that
- # use different profile directories, desktop entries, etc. This enables slotting the ebuild.
- "enable_channel_branding=true"
- # 131 began laying the groundwork for replacing freetype with
- # "Rust-based Fontations set of libraries plus Skia path rendering"
- # We now need to opt-in
- "enable_freetype=true"
- "enable_hangout_services_extension=$(usex hangouts true false)"
- # Don't need nocompile checks and GN crashes with our config (verify with modern GN)
- "enable_nocompile_tests=false"
- # pseudolocales are only used for testing
- "enable_pseudolocales=false"
- "enable_widevine=$(usex widevine true false)"
- # Disable fatal linker warnings, bug 506268.
- "fatal_linker_warnings=false"
- # Component build isn't generally intended for use by end users. It's mostly useful
- # for development and debugging.
- "is_component_build=false"
- # GN needs explicit config for Debug/Release as opposed to inferring it from build directory.
- "is_debug=false"
- "is_official_build=$(usex official true false)"
- # Enable ozone wayland and/or headless support
- "ozone_auto_platforms=false"
- "ozone_platform_headless=true"
- # Enables building without non-free unRAR licence
- "safe_browsing_use_unrar=false"
- # "thin_lto_enable_optimizations=${use_lto}"
- "treat_warnings_as_errors=false"
- # Use in-tree libc++ (buildtools/third_party/libc++ and buildtools/third_party/libc++abi)
- # instead of the system C++ library for C++ standard library support.
- # default: true, but let's be explicit (forced since 120 ; USE removed 127).
- "use_custom_libcxx=true"
- # Enable ozone wayland and/or headless support
- "use_ozone=true"
- # The sysroot is the oldest debian image that chromium supports, we don't need it
- "use_sysroot=false"
- # See dependency logic in third_party/BUILD.gn
- "use_system_harfbuzz=$(usex system-harfbuzz true false)"
- # "use_thin_lto=${use_lto}"
- # Only enabled for clang, but gcc has endian macros too
- "v8_use_libm_trig_functions=true"
- # use system go
- "tint_use_system_go=true"
- )
-
- myconf_gn+=( "enable_iterator_debugging=$(usex debug true false)" )
-
- if use debug; then
- myconf_gn+=(
- "symbol_level=2"
- "blink_symbol_level=2"
- "v8_symbol_level=2"
- )
- else
- myconf_gn+=(
- "symbol_level=0"
- "blink_symbol_level=0"
- "v8_symbol_level=0"
- )
- fi
-
- if use bindist ; then
- myconf_gn+=(
- # If this is set to false Chromium won't be able to load any proprietary codecs
- # even if provided with an ffmpeg capable of h264/aac decoding
- "proprietary_codecs=true"
- 'ffmpeg_branding="Chrome"'
- # build ffmpeg as an external component (libffmpeg.so) that we can remove / substitute
- "is_component_ffmpeg=true"
- )
- else
- myconf_gn+=(
- "proprietary_codecs=$(usex proprietary-codecs true false)"
- "ffmpeg_branding=\"$(usex proprietary-codecs Chrome Chromium)\""
- )
- fi
-
- if use headless; then
- myconf_gn+=(
- "enable_print_preview=false"
- "enable_remoting=false"
- 'ozone_platform="headless"'
- "rtc_use_pipewire=false"
- "use_alsa=false"
- "use_cups=false"
- "use_gio=false"
- "use_glib=false"
- "use_gtk=false"
- "use_kerberos=false"
- "use_libpci=false"
- "use_pangocairo=false"
- "use_pulseaudio=false"
- "use_qt5=false"
- "use_qt6=false"
- "use_udev=false"
- "use_vaapi=false"
- "use_xkbcommon=false"
- )
- else
- myconf_gn+=(
- "gtk_version=$(usex gtk4 4 3)"
- # link pulseaudio directly (DT_NEEDED) instead of using dlopen.
- # helps with automated detection of ABI mismatches and prevents silent errors.
- "link_pulseaudio=$(usex pulseaudio true false)"
- "ozone_platform_wayland=$(usex wayland true false)"
- "ozone_platform_x11=$(usex X true false)"
- "ozone_platform=\"$(usex wayland wayland x11)\""
- "rtc_use_pipewire=$(usex screencast true false)"
- # As above - link directly instead of dlopening
- "rtc_link_pipewire=$(usex screencast true false)"
- "use_cups=$(usex cups true false)"
- "use_kerberos=$(usex kerberos true false)"
- "use_pulseaudio=$(usex pulseaudio true false)"
- "use_qt5=false"
- "use_system_libffi=$(usex wayland true false)"
- "use_system_minigbm=true"
- "use_vaapi=$(usex vaapi true false)"
- "use_xkbcommon=true"
- )
- if use qt6; then
- local cbuild_libdir
- cbuild_libdir="$(get_libdir)"
- if tc-is-cross-compiler; then
- # Hack to workaround get_libdir not being able to handle CBUILD, bug #794181
- cbuild_libdir="$($(tc-getBUILD_PKG_CONFIG) --keep-system-libs --libs-only-L libxslt)"
- cbuild_libdir="${cbuild_libdir:2}"
- cbuild_libdir="${cbuild_libdir/% }"
- fi
- myconf_gn+=(
- "use_qt6=true"
- "moc_qt6_path=\"${EPREFIX}/usr/${cbuild_libdir}/qt6/libexec\""
- )
- else
- myconf_gn+=( "use_qt6=false" )
- fi
- fi
-
- # Explicitly disable ICU data file support for system-icu/headless builds.
- if use system-icu || use headless; then
- myconf_gn+=( "icu_use_data_file=false" )
- fi
-
- if use official; then
- # Allow building against system libraries in official builds
- sed -i 's/OFFICIAL_BUILD/GOOGLE_CHROME_BUILD/' \
- tools/generate_shim_headers/generate_shim_headers.py || die
- # Don't add symbols to build
- myconf_gn+=( "symbol_level=0" )
- fi
-
- if use pgo; then
- myconf_gn+=(
- "chrome_pgo_phase=2"
- "v8_enable_builtins_optimization=true"
- )
- else
- myconf_gn+=( "chrome_pgo_phase=0" )
- fi
-
- # Odds and ends
-
- # skipping typecheck is only supported on amd64, bug #876157
- if ! use amd64; then
- myconf_gn+=( "devtools_skip_typecheck=false" )
- fi
-
- # Disable external code space for V8 for ppc64. It is disabled for ppc64
- # by default, but cross-compiling on amd64 enables it again.
- if tc-is-cross-compiler && use ppc64; then
- myconf_gn+=( "v8_enable_external_code_space=false" )
- fi
-
- # This determines whether or not GN uses the bundled libcxx
- if use libcxx; then
- myconf_gn+=( "use_custom_libcxx=true" )
- else
- myconf_gn+=(
- "use_custom_libcxx=false"
- "use_llvm_libatomic=false"
- )
- append-cppflags -U_GLIBCXX_ASSERTIONS #See #318
- fi
-
- myconf_gn+=( "use_bluez=$(usex bluetooth true false)" )
-
- myconf_gn+=( "is_cfi=$(usex cfi true false)" )
-
- if use cfi; then
- myconf_gn+=(
- "use_cfi_icall=true"
- "use_cfi_cast=true"
- )
- fi
-
- myconf_gn+=(
- "optimize_webui=$(usex optimize-webui true false)"
- "use_system_freetype=$(usex system-harfbuzz true false)"
- "use_system_libopenjpeg2=$(usex system-openjpeg true false)"
- "enable_pdf=true"
- "use_system_lcms2=true"
- "enable_print_preview=true"
- "use_thin_lto=$(usex thinlto true false)"
- "thin_lto_enable_optimizations=$(usex optimize-thinlto true false)"
-
- # Ungoogled flags
- "build_with_tflite_lib=false"
- "enable_mdns=false"
- "enable_mse_mpeg2ts_stream_parser=$(usex proprietary-codecs true false)"
- "enable_remoting=false"
- "enable_reporting=false"
- "enable_service_discovery=false"
- "exclude_unwind_tables=true"
- "google_api_key=\"\""
- "google_default_client_id=\"\""
- "google_default_client_secret=\"\""
- "safe_browsing_mode=0"
- "use_official_google_api_keys=false"
- "use_unofficial_version_number=false"
-
- # "enable_swiftshader=false"
-
- # Additional flags
- # "perfetto_use_system_zlib=true"
- # "use_system_zlib=true"
- # "use_system_libjpeg=true"
- # "rtc_build_examples=false"
- # "enable_chromium_prelude=false"
- # "enable_updater=false"
- # "enable_update_notifications=false"
- # "enable_constraints=false"
- # "rtc_rusty_base64=false"
- # "v8_enable_temporal_support=false"
- # "media_use_symphonia=false"
- # "pdf_enable_rust_png=false"
- # "skia_use_libpng_encode=true"
- # "skia_use_libpng_decode=true"
- # "skia_use_rust_png_decode=false"
- # "skia_use_rust_png_encode=false"
- # "enable_jxl_decoder=false"
- )
-
- if use amd64 || use arm64; then
- myconf_gn+=(
- "v8_drumbrake_bounds_checks=true"
- # "v8_enable_drumbrake=true"
- )
- fi
-
- if use thinlto; then
- # We need to change the default value of import-instr-limit in
- # LLVM to limit the text size increase. The default value is
- # 100, and we change it to 30 to reduce the text size increase
- # from 25% to 10%. The performance number of page_cycler is the
- # same on two of the thinLTO configurations, we got 1% slowdown
- # on speedometer when changing import-instr-limit from 100 to 30.
- # append-ldflags "-Wl,-plugin-opt,-import-instr-limit=30"
- sed -i '/import_instr_limit = 5/{s++import_instr_limit = 30+;h};${x;/./{x;q0};x;q1}' \
- build/config/compiler/BUILD.gn || die
-
- append-ldflags "-Wl,--thinlto-jobs=$(makeopts_jobs)"
- fi
-
- # Facilitate deterministic builds (taken from build/config/compiler/BUILD.gn)
- append-cflags -Wno-builtin-macro-redefined
- append-cxxflags -Wno-builtin-macro-redefined
- append-cppflags "-D__DATE__= -D__TIME__= -D__TIMESTAMP__="
-
- local flags
- einfo "Building with the following compiler settings:"
- for flags in C{C,XX} AR NM RANLIB {C,CXX,CPP,LD}FLAGS \
- EXTRA_GN UGC_{SKIP_{PATCHES,SUBSTITUTION},KEEP_BINARIES} ; do
- einfo " ${flags} = \"${!flags}\""
- done
-
- # Since we build from tarballs, we need to set the channel here so that it can be used in the build.
- export CHROME_VERSION_EXTRA="${SLOT}"
-
- einfo "Configuring Chromium ..."
- # add a `-v` here if gn `hangs` to see which file it's getting stuck on.
- set -- gn gen --args="${myconf_gn[*]}${EXTRA_GN:+ ${EXTRA_GN}}" out/Release
- echo "$@"
- "$@" || die "Failed to configure Chromium"
-
- # The "if" below should not be executed unless testing
- if [ ! -z "${NODIE}" ]; then
- # List all args
- # gn args --list out/Release
-
- # Quick compiler check
- eninja -C out/Release protoc torque
- fi
-}
-
-src_compile() {
- # Final link uses lots of file descriptors.
- ulimit -n 2048
-
- # Calling this here supports resumption via FEATURES=keepwork
- python_setup
-
- # I hate doing this but upstream Rust have yet to come up with a better solution for
- # us poor packagers. Required for Split LTO units, which are required for CFI.
- export RUSTC_BOOTSTRAP=1
-
- # Don't inherit PYTHONPATH from environment, bug #789021, #812689
- local -x PYTHONPATH=
-
- # Build mksnapshot and pax-mark it.
- if use pax-kernel; then
- local x
- for x in mksnapshot v8_context_snapshot_generator code_cache_generator; do
- if tc-is-cross-compiler; then
- eninja -C out/Release "host/${x}"
- pax-mark m "out/Release/host/${x}"
- else
- eninja -C out/Release "${x}"
- pax-mark m "out/Release/${x}"
- fi
- done
- fi
-
- # Even though ninja autodetects number of CPUs, we respect
- # user's options, for debugging with -j 1 or any other reason.
- eninja -C out/Release chrome chrome_sandbox $(use test && echo "base_unittests")
-
- pax-mark m out/Release/chrome
-
- # This codepath does minimal patching, so we're at the mercy of upstream
- # CFLAGS. This is fine - we're not intending to force this on users
- # and we do a lot of flag 'management' anyway.
- if use bundled-toolchain; then
- QA_FLAGS_IGNORED="
- usr/lib64/chromium-browser/chrome
- usr/lib64/chromium-browser/chrome-sandbox
- usr/lib64/chromium-browser/chromedriver
- usr/lib64/chromium-browser/chrome_crashpad_handler
- usr/lib64/chromium-browser/libEGL.so
- usr/lib64/chromium-browser/libGLESv2.so
- usr/lib64/chromium-browser/libVkICD_mock_icd.so
- usr/lib64/chromium-browser/libVkLayer_khronos_validation.so
- usr/lib64/chromium-browser/libqt6_shim.so
- usr/lib64/chromium-browser/libvk_swiftshader.so
- usr/lib64/chromium-browser/libvulkan.so.1
- "
- fi
-
- use convert-dict && eninja -C out/Release convert_dict
-
- use enable-driver && eninja -C out/Release chromedriver
- #use suid && eninja -C out/Release chrome_sandbox
-
- # use enable-driver && mv out/Release/chromedriver{.unstripped,}
-
- rm -f out/Release/locales/*.pak.info || die
-
- # Generate support files (desktop file, manpage, etc.) See: #684550 #706786 #968958
- ${EPYTHON} "${FILESDIR}/generate-support-files.py" \
- --installdir "/usr/$(get_libdir)/ungoogled-chromium-browser" \
- --channel "${SLOT}" ||
- die "Failed to generate support files"
-}
-
-src_test() {
- # Tests may be flaky with usersandbox, and the test runner executes significantly faster without.
- # If you seem to be excluding too many tests for a particular milestone: comment them out, reboot, and
- # run the tests again. If that doesn't help, try FEATURES="-usersandbox" and send it because obviously the
- # chromium gods are not smiling upon you today. Do some runtime testing, obvs.
- local skip_tests=(
- # Wildcard exclusions (if all tests in a test suite are broken)
- 'AlternateTestParams/PartitionAllocDeathTest.RepeatedAllocReturnNullDirect/*'
- 'AlternateTestParams/PartitionAllocDeathTest.RepeatedReallocReturnNullDirect/*'
- 'AlternateTestParams/PartitionAllocTest.*' # 200+ tests, >= 1 crashes entire test runner with usersandbox.
- 'CheckExitCodeAfterSignalHandlerDeathTest.*'
- 'CriticalProcessAndThreadSpotChecks/HangWatcherAnyCriticalThreadTests.*'
- 'LazyThreadPoolTaskRunnerEnvironmentTest.*' # M142
- 'ToolsSanityTest.BadVirtualCall*'
- # requires en-us locale
- SysStrings.SysNativeMBAndWide
- SysStrings.SysNativeMBToWide
- SysStrings.SysWideToNativeMB
- # Specific test cases
- CancelableEventTest.BothCancelFailureAndSucceedOccurUnderContention
- FilePathTest.FromUTF8Unsafe_And_AsUTF8Unsafe
- HistogramTesterTest.PumaTestUniqueSample
- ImmediateCrashTest.ExpectedOpcodeSequence # M150
- PathServiceTest.CheckedGetFailure
- PlatformThreadTest.CanChangeThreadType
- RawPtrTest.SetLookupUsesGetForComparison # M146 ; also broken for alpine in M144.
- RustLogIntegrationTest.CheckAllSeverity
- StackCanary.ChangingStackCanaryCrashesOnReturn
- StackTraceDeathTest.StackDumpSignalHandlerIsMallocFree
- TestLauncherTools.TruncateSnippetFocusedMatchesFatalMessagesTest
- ThreadPoolEnvironmentConfig.CanUseBackgroundPriorityForWorker
- DriveInfoTest.GetFileDriveInfo
-
- )
- local test_filter="-$(IFS=:; printf '%s' "${skip_tests[*]}")"
- # test-launcher-bot-mode enables parallelism and plain output
- # Check individual tests with --gtest_filter=<test you want> --single-process-tests
- ./out/Release/base_unittests --test-launcher-bot-mode \
- --test-launcher-jobs="$(get_makeopts_jobs)" \
- --gtest_filter="${test_filter}" || die "Tests failed!"
-}
-
-src_install() {
- local browser_suffix
- if [[ "${SLOT}" != "stable" ]]; then
- browser_suffix="-${SLOT}"
- else
- browser_suffix=""
- fi
- local CHROMIUM_HOME="/usr/$(get_libdir)/ungoogled-chromium-browser${browser_suffix}"
- exeinto "${CHROMIUM_HOME}"
- doexe out/Release/chrome
-
- #newexe out/Release/chrome_sandbox chrome-sandbox
- #fperms 4755 "${CHROMIUM_HOME}/chrome-sandbox"
-
- use enable-driver && doexe out/Release/chromedriver
-
- #* https://github.com/ungoogled-software/ungoogled-chromium/pull/3563
- doexe out/Release/chrome_crashpad_handler
-
- if use convert-dict; then
- newexe "${FILESDIR}/update-dicts.sh" update-dicts.sh
- doexe out/Release/convert_dict
- fi
-
- ozone_auto_session () {
- use X && use wayland && ! use headless && echo true || echo false
- }
-
- cat <<- EOF > "${D}${CHROMIUM_HOME}/chromium-launcher.sh" || die
- #!/bin/bash
- # Wrapper to launch slotted Chromium via the chromium-common launcher script.
- export CHROME_DESKTOP="ungoogled-chromium-browser${browser_suffix}.desktop"
- export CHROME_EXEC_NAME="ungoogled-chromium-browser${browser_suffix}"
- export CHROME_VERSION_EXTRA="${SLOT}"
- export CHROME_WRAPPER="\$(readlink -f "\$0")"
- export OZONE_AUTO_SESSION=$(ozone_auto_session)
-
- exec /usr/libexec/chromium/chromium-launcher.sh "\$@"
- EOF
-
- chmod 755 "${D}${CHROMIUM_HOME}/chromium-launcher.sh" || die
-
- # It is important that we name the target "chromium-browser",
- # xdg-utils expect it; bug #355517.
- dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/ungoogled-chromium-browser${browser_suffix}
- # keep the old symlink around for consistency
- dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/ungoogled-chromium${browser_suffix}
-
- use enable-driver && dosym "${CHROMIUM_HOME}/chromedriver" /usr/bin/ungoogled-chromedriver${browser_suffix}
-
- pushd out/Release/locales > /dev/null || die
- chromium_remove_language_paks
- popd > /dev/null || die
-
- insinto "${CHROMIUM_HOME}"
- doins out/Release/*.bin
- doins out/Release/*.pak
- doins -r out/Release/hyphen-data
-
- if use bindist; then
- # We built libffmpeg as a component library, but we can't distribute it
- # with proprietary codec support. Remove it and make a symlink to the requested
- # system library.
- rm -f out/Release/libffmpeg.so \
- || die "Failed to remove bundled libffmpeg.so (with proprietary codecs)"
- # symlink the libffmpeg.so from either ffmpeg-chromium or ffmpeg[chromium].
- einfo "Creating symlink to libffmpeg.so from $(usex ffmpeg-chromium ffmpeg-chromium ffmpeg[chromium])..."
- dosym ../chromium/libffmpeg.so$(usex ffmpeg-chromium .${PV%%\.*} "") \
- /usr/$(get_libdir)/ungoogled-chromium-browser/libffmpeg.so
- fi
-
- (
- shopt -s nullglob
- local files=(out/Release/*.so out/Release/*.so.[0-9])
- [[ ${#files[@]} -gt 0 ]] && doins "${files[@]}"
- )
-
- if ! use system-icu && ! use headless; then
- doins out/Release/icudtl.dat
- fi
-
- doins -r out/Release/locales
- #doins -r out/Release/MEIPreload
-
- # Install vk_swiftshader_icd.json; bug #827861
- doins out/Release/vk_swiftshader_icd.json
-
- if [[ -d out/Release/swiftshader ]]; then
- insinto "${CHROMIUM_HOME}/swiftshader"
- doins out/Release/swiftshader/*.so
- fi
-
- use widevine && dosym WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so "${CHROMIUM_HOME}/libwidevinecdm.so"
-
- # Install icons
- local branding size
- for size in 16 24 32 48 64 128 256 ; do
- case ${size} in
- 16|32) branding="chrome/app/theme/default_100_percent/chromium" ;;
- *) branding="chrome/app/theme/chromium" ;;
- esac
- newicon -s ${size} "${branding}/product_logo_${size}.png" \
- ungoogled-chromium-browser${browser_suffix}.png
- done
-
- # Install desktop entry
- domenu out/Release/ungoogled-chromium-browser${browser_suffix}.desktop
-
- # Install GNOME default application entry (bug #303100).
- insinto /usr/share/gnome-control-center/default-apps
- doins out/Release/ungoogled-chromium-browser${browser_suffix}.xml
-
- # Install AppStream metadata
- insinto /usr/share/appdata
- doins out/Release/ungoogled-chromium-browser${browser_suffix}.appdata.xml
-
- # Install manpage; bug #684550
- doman out/Release/ungoogled-chromium-browser${browser_suffix}.1
- dosym ungoogled-chromium-browser${browser_suffix}.1 /usr/share/man/man1/ungoogled-chromium${browser_suffix}.1
-
- readme.gentoo_create_doc
-}
-
-pkg_postrm() {
- xdg_icon_cache_update
- xdg_desktop_database_update
-}
-
-pkg_postinst() {
- xdg_icon_cache_update
- xdg_desktop_database_update
- readme.gentoo_print_elog
-
- if use !headless && [[ -z "${REPLACING_VERSIONS}" ]]; then
- if use vaapi; then
- elog "Hardware-accelerated video decoding configuration:"
- elog
- elog "Chromium supports multiple backends for hardware acceleration. To enable one,"
- elog " Add to CHROMIUM_FLAGS in /etc/chromium/default:"
- elog
- elog "1. VA-API with OpenGL (recommended for most users):"
- elog " --enable-features=AcceleratedVideoDecodeLinuxGL"
- elog " VaapiVideoDecoder may need to be added as well, but try without first."
- elog
- if use wayland; then
- elog "2. Enhanced Wayland/EGL performance:"
- elog " --enable-features=AcceleratedVideoDecodeLinuxGL,AcceleratedVideoDecodeLinuxZeroCopyGL"
- elog
- fi
- if use X; then
- elog "$(usex wayland "3" "2"). VA-API with Vulkan:"
- elog " --enable-features=VaapiVideoDecoder,VaapiIgnoreDriverChecks,Vulkan,DefaultANGLEVulkan,VulkanFromANGLE"
- elog
- if use wayland; then
- elog " NOTE: Vulkan acceleration requires X11 and will not work under Wayland sessions."
- elog " Use OpenGL-based acceleration instead when running under Wayland."
- elog
- fi
- fi
- elog "Additional options:"
- elog " To enable hardware-accelerated encoding (if supported)"
- elog " add 'AcceleratedVideoEncoder' to your feature list"
- elog " VaapiIgnoreDriverChecks bypasses driver compatibility checks"
- elog " (may be needed for newer/unsupported hardware)"
- elog
- else
- elog "This Chromium build was compiled without VA-API support, which provides"
- elog "hardware-accelerated video decoding."
- fi
- if use screencast; then
- elog "Screencast is disabled by default at runtime. Either enable it"
- elog "by navigating to chrome://flags/#enable-webrtc-pipewire-capturer"
- elog "inside Chromium or add --enable-features=WebRTCPipeWireCapturer"
- elog "to CHROMIUM_FLAGS in /etc/chromium/default."
- elog
- elog "Additional setup may be required for screencasting to work."
- elog "See issue: https://github.com/PF4Public/gentoo-overlay/issues/314"
- fi
- if use gtk4; then
- elog "Chromium prefers GTK3 over GTK4 at runtime. To override this"
- elog "behaviour you need to pass --gtk-version=4, e.g. by adding it"
- elog "to CHROMIUM_FLAGS in /etc/chromium/default."
- fi
- if use widevine; then
- elog "widevine requires binary plugins, which are distributed separately"
- elog "Make sure you have www-plugins/chrome-binary-plugins installed"
- fi
- fi
-
- if systemd_is_booted && ! [[ -f "/etc/machine-id" ]]; then
- ewarn "The lack of an '/etc/machine-id' file on this system booted with systemd"
- ewarn "indicates that the Gentoo handbook was not followed to completion."
- ewarn ""
- ewarn "Chromium is known to behave unpredictably with this system configuration;"
- ewarn "please complete the configuration of this system before logging any bugs."
- fi
-
- # Stable slot doesn't change profile directory, and it's vanishingly unlikely that users will downgrade from dev.
- if [[ -n "${REPLACING_VERSIONS}" ]]; then
- local replacing_non_slotted=false
- # there could be more than one PVR
- for version in ${REPLACING_VERSIONS}; do
- if ver_test "${version}" -le "145.0.7632.116"; then
- replacing_non_slotted=true
- break
- fi
- done
- if ${replacing_non_slotted}; then
- ewarn "This version of Chromium has replaced a non-slotted ebuild."
- if [[ ${SLOT} != "stable" ]]; then
- ewarn "This channel has its own profile directory, so your existing profile will not be used."
- ewarn "To use your existing profile, either copy or move it to the new location."
- ewarn "See https://wiki.gentoo.org/wiki/Chromium#Profile_Directories for more information."
- ewarn ""
- fi
- ewarn "Any existing Progressive Web Apps (PWAs) will need to be reinstalled,"
- ewarn "or have the path in the desktop files updated to point to the new wrapper script."
- fi
- fi
-}
-
-eapply_wrapper () {
- if [ ! -z "${NODIE}" ]; then
- nonfatal eapply "$@"
- else
- eapply "$@"
- fi
-}
-
-git_wrapper () {
- if [ ! -z "${NODIE}" ]; then
- git "$@"
- else
- git "$@" || die
- fi
-}
-
-filter_wrapper () {
- einfo "Applying ${i##*/}"
- #? fuzz factor of 3 is OK?
- if [ ! -z "${NODIE}" ]; then
- filterdiff -p1 "${@:2}" < "$1" | patch -F 3 -p1
- else
- filterdiff -p1 "${@:2}" < "$1" | patch -F 3 -p1 || die
- fi
-}
diff --git a/www-client/ungoogled-chromium/ungoogled-chromium-151.0.7922.169_p1.ebuild b/www-client/ungoogled-chromium/ungoogled-chromium-151.0.7922.169_p1.ebuild
deleted file mode 100644
index a2d700442eb8..000000000000
--- a/www-client/ungoogled-chromium/ungoogled-chromium-151.0.7922.169_p1.ebuild
+++ /dev/null
@@ -1,2564 +0,0 @@
-# Copyright 2009-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-# Use following environment variables to customise the build
-# EXTRA_GN — pass extra options to gn
-# NINJAOPTS="-k0 -j8" useful to populate ccache even if ebuild is still failing
-# UGC_SKIP_PATCHES — space-separated list of patches to skip
-# UGC_KEEP_BINARIES — space-separated list of binaries to keep
-# UGC_SKIP_SUBSTITUTION — space-separated list of files to skip domain substitution
-
-# USE=bundled-toolchain is intended for users who want to use the same toolchain
-# as the upstream releases. It's also a good fallback in case we fall behind
-# and need to get a release out quickly (less likely with `dev` in-tree).
-# We can't rely on it as a default since the toolchain is only shipped for x86-64;
-# other architectures will need to use system toolchain.
-
-# Since m133 we are using CI-generated tarballs from
-# https://github.com/chromium-linux-tarballs/chromium-tarballs/
-
-# These are bit-for-bit identical to the official releases, but are built
-# using an external CI system that we have some control over, in case
-# issues pop up again with official tarball generation.
-
-GN_MIN_VER=0.2374
-# chromium-tools/get-chromium-toolchain-strings.py (or just use Chromicler)
-# Node for M145+ should be 24.12.0 but that's not packaged in Gentoo yet. See #969145
-TEST_FONT="9c07d19d9c5ee1ff94f717e6fb17e0c8c354e6f9"
-BUNDLED_CLANG_VER="llvmorg-23-init-19482-g53d18800-1"
-BUNDLED_RUST_VER="b998449636a48e2c4a362809085b600a0174e1f2-2"
-RUST_SHORT_HASH=${BUNDLED_RUST_VER:0:10}-${BUNDLED_RUST_VER##*-}
-NODE_VER="24.16.0-r1"
-GO_MIN_VER="1.25.0"
-ESBUILD_VER="0.25.1"
-ROLLUP_VER="4.57.1" # currently manual.
-
-CHROMIUM_LANGS="af am ar as az be bg bn bs ca cs cy da de el en-GB es es-419 et eu fa fi fil
- fr fr-CA gl gu he hi hr hu hy id is it ja ka kk km kn ko ky lo lt lv mk ml mn mr ms my
- nb ne nl or pa pl pt-BR pt-PT ro ru si sk sl sq sr sr-Latn sv sw ta te th tr uk ur uz
- vi zh-CN zh-HK zh-TW zu"
-
-#UGC_COMMIT_ID="6f09e99d9c66ae5862d8eb0af5926fc8371269a1"
-# UGC_PR_COMMITS=(
-# c917e096342e5b90eeea91ab1f8516447c8756cf
-# 5794e9d12bf82620d5f24505798fecb45ca5a22d
-# )
-
-CROMITE_COMMIT_ID="69e841fd35cd92ce5fa1a336791c7989809e0f17"
-
-declare -A CHROMIUM_COMMITS=(
- # ["27f8690db999f6e56f0af7a9ea3d28a019ed72ca"]="." #152+
- ["-cf94ed446320d35c8613ed9b3ffb6e6a61bfcb5f"]="."
-# # ["-37c28a19804e47a68eabf3cf882a310689fc325b"]="." #disable style check for cromite
-# # ["cd5a0df905a28faa89ff2a4ab44f893f84dc4487"]="net/third_party/quiche/src"
-)
-
-LLVM_COMPAT=( 21 22 23 )
-PYTHON_COMPAT=( python3_{13..14} )
-PYTHON_REQ_USE="xml(+)"
-RUST_MIN_VER=1.91.0
-RUST_NEEDS_LLVM="yes please"
-RUST_OPTIONAL="yes" # Not actually optional, but we don't need system Rust (or LLVM) with USE=bundled-toolchain
-RUST_REQ_USE="rustfmt" # Upstream run rustfmt on bindgen output, so we need it to be available.
-
-inherit check-reqs chromium-2 desktop flag-o-matic llvm-r1 multiprocessing ninja-utils pax-utils
-inherit python-any-r1 readme.gentoo-r1 rust systemd toolchain-funcs xdg-utils
-
-DESCRIPTION="Modifications to Chromium for removing Google integration and enhancing privacy"
-HOMEPAGE="https://github.com/ungoogled-software/ungoogled-chromium"
-PPC64_HASH="7aae8a84e327fc2078ce1625c9c70bfda77d626f"
-PATCH_V="${PV%%\.*}-3"
-COPIUM_COMMIT="3c7e56fb4523b43b47595bb3a22f77178fc76293"
-SRC_URI="https://commondatastorage.googleapis.com/chromium-browser-official/chromium-${PV/_*}-lite.tar.xz
- https://deps.gentoo.zip/www-client/chromium/rollup-wasm-node-${ROLLUP_VER}.tgz
- https://gitlab.com/Matt.Jolly/chromium-patches/-/archive/${PATCH_V}/chromium-patches-${PATCH_V}.tar.bz2
- !bundled-toolchain? (
- https://codeberg.org/selfisekai/copium/archive/${COPIUM_COMMIT}.tar.gz
- -> chromium-patches-copium-${COPIUM_COMMIT:0:10}.tar.gz
- )
- bundled-toolchain? (
- https://commondatastorage.googleapis.com/chromium-browser-clang/Linux_x64/clang-${BUNDLED_CLANG_VER}.tar.xz
- -> chromium-clang-${BUNDLED_CLANG_VER}.tar.xz
- https://commondatastorage.googleapis.com/chromium-browser-clang/Linux_x64/rust-toolchain-${BUNDLED_RUST_VER}-${BUNDLED_CLANG_VER%-*}.tar.xz
- -> chromium-rust-toolchain-${RUST_SHORT_HASH}-${BUNDLED_CLANG_VER%-*}.tar.xz
- )
- test? (
- https://chromium-fonts.storage.googleapis.com/${TEST_FONT} -> chromium-testfonts-${TEST_FONT:0:10}.tar.gz
- )
- ppc64? (
- https://gitlab.raptorengineering.com/raptor-engineering-public/chromium/openpower-patches/-/archive/${PPC64_HASH}/openpower-patches-${PPC64_HASH}.tar.bz2 -> chromium-openpower-${PPC64_HASH:0:10}.tar.bz2
- )
-"
-
-# Gentoo tarball:
-# https://chromium-tarballs.distfiles.gentoo.org/chromium-${PV/_*}.tar.xz -> chromium-${PV/_*}-gentoo.tar.xz
-
-# chromium-linux-tarballs
-# https://github.com/chromium-linux-tarballs/chromium-tarballs/releases/download/${PV/_*}/chromium-${PV/_*}-linux.tar.xz
-
-# Official tarball:
-# https://commondatastorage.googleapis.com/chromium-browser-official/chromium-${PV/_*}${LITE_TARBALL:+-lite}.tar.xz
-
-# https://gitweb.gentoo.org/proj/chromium-tools.git/tree/get-chromium-licences.py @ 145.0.7632.76
-LICENSE="Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD BSD-2 Base64 Boost-1.0 CC-BY-3.0 CC-BY-4.0 Clear-BSD FFT2D FTL"
-LICENSE+=" IJG ISC LGPL-2 LGPL-2.1 MIT MPL-1.1 MPL-2.0 Ms-PL PSF-2 SGI-B-2.0 SSLeay SunSoft Unicode-3.0"
-LICENSE+=" Unicode-DFS-2015 Unlicense UoI-NCSA ZLIB libtiff openssl"
-LICENSE+=" cromite? ( GPL-3 )"
-
-SLOT="stable"
-KEYWORDS="amd64 ~arm64 ~ppc64 ~x86"
-
-IUSE_SYSTEM_LIBS="abseil-cpp av1 brotli crc32c double-conversion ffmpeg +harfbuzz icu jsoncpp +libusb libvpx +openh264 openjpeg re2 snappy woff2 +zstd"
-IUSE="+X bindist bluetooth bundled-toolchain cfi convert-dict cups custom-cflags debug ffmpeg-chromium enable-driver gtk4 hangouts headless kerberos +libcxx nvidia +official optimize-thinlto optimize-webui override-data-dir pax-kernel pgo"
-IUSE+=" +proprietary-codecs pulseaudio qt6 screencast selinux test thinlto cromite vaapi wayland widevine cpu_flags_ppc_vsx3"
-RESTRICT="
- !bindist? ( bindist )
- !test? ( test )
- arm64? ( test )
- !system-ffmpeg? ( proprietary-codecs? ( bindist ) )
- !system-openh264? ( bindist )
- cromite? ( bindist )"
-
-REQUIRED_USE="
- !headless? ( || ( X wayland ) )
- screencast? ( wayland )
- ffmpeg-chromium? ( bindist proprietary-codecs )
- optimize-thinlto? ( thinlto )
- cfi? ( thinlto )
- x86? ( !thinlto !widevine )
- debug? ( !official )
- vaapi? ( !system-av1 !system-libvpx )
-"
-
-UGC_PV="${PV/_p/-}"
-UGC_PF="${PN}-${UGC_PV}"
-UGC_URL="https://github.com/ungoogled-software/${PN}/archive/"
-
-if [ -z "$UGC_COMMIT_ID" ]; then
- UGC_URL="${UGC_URL}${UGC_PV}.tar.gz -> ${UGC_PF}.tar.gz"
- UGC_WD="${WORKDIR}/${UGC_PF}"
-else
- UGC_URL="${UGC_URL}${UGC_COMMIT_ID}.tar.gz -> ${PN}-${UGC_COMMIT_ID}.tar.gz"
- UGC_WD="${WORKDIR}/ungoogled-chromium-${UGC_COMMIT_ID}"
-fi
-
-SRC_URI+="${UGC_URL}
-"
-
-if [ ! -z "${UGC_PR_COMMITS[*]}" ]; then
- for i in "${UGC_PR_COMMITS[@]}"; do
- SRC_URI+="https://github.com/ungoogled-software/${PN}/commit/$i.patch?full_index=true -> ${PN}-$i.patch
- "
- done
-fi
-
-if [ ! -z "${CHROMIUM_COMMITS[*]}" ]; then
- # for i in "${CHROMIUM_COMMITS[@]}"; do
- for i in "${!CHROMIUM_COMMITS[@]}"; do
- if [[ ${CHROMIUM_COMMITS[$i]} =~ webrtc ]]; then
- #TODO: is it safe to use this mirror?
- SRC_URI+="https://github.com/webrtc-mirror/webrtc/commit/${i/-}.patch?full_index=true -> webrtc-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ angle ]]; then
- SRC_URI+="https://github.com/google/angle/commit/${i/-}.patch?full_index=true -> angle-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ quiche ]]; then
- SRC_URI+="https://github.com/google/quiche/commit/${i/-}.patch?full_index=true -> quiche-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ dawn ]]; then
- SRC_URI+="https://github.com/google/dawn/commit/${i/-}.patch?full_index=true -> dawn-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ perfetto ]]; then
- SRC_URI+="https://github.com/google/perfetto/commit/${i/-}.patch?full_index=true -> perfetto-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ink ]]; then
- SRC_URI+="https://github.com/google/ink/commit/${i/-}.patch?full_index=true -> ink-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ vulkan-utility-libraries ]]; then
- SRC_URI+="https://github.com/KhronosGroup/Vulkan-Utility-Libraries/commit/${i/-}.patch?full_index=true -> vulkan-utility-libraries-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ruy ]]; then
- SRC_URI+="https://github.com/google/ruy/commit/${i/-}.patch?full_index=true -> ruy-${i/-}.patch
- "
- else
- SRC_URI+="https://github.com/chromium/chromium/commit/${i/-}.patch?full_index=true -> chromium-${i/-}.patch
- "
- fi
- done
-fi
-
-SRC_URI+="cromite? ( https://github.com/uazo/cromite/archive/${CROMITE_COMMIT_ID}.tar.gz -> cromite-${CROMITE_COMMIT_ID}.tar.gz )
-"
-
-for i in ${IUSE_SYSTEM_LIBS}; do
- [[ $i =~ ^(\+)?(.*)$ ]]
- IUSE+=" ${BASH_REMATCH[1]}system-${BASH_REMATCH[2]}"
-done
-
-COMMON_X_DEPEND="
- x11-libs/libXcomposite:=
- x11-libs/libXcursor:=
- x11-libs/libXdamage:=
- x11-libs/libXfixes:=
- >=x11-libs/libXi-1.6.0:=
- x11-libs/libXrandr:=
- x11-libs/libXrender:=
- x11-libs/libXtst:=
- x11-libs/libxshmfence:=
-"
-
-# sys-libs/zlib: https://bugs.gentoo.org/930365; -ng is not compatible.
-# We _could_ use the bundled minizip, but that's against policy.
-COMMON_SNAPSHOT_DEPEND="
- system-icu? ( >=dev-libs/icu-78:= )
- system-abseil-cpp? ( >=dev-cpp/abseil-cpp-20260107.0 )
- system-brotli? ( >=app-arch/brotli-9999 )
- system-crc32c? ( dev-libs/crc32c )
- system-double-conversion? ( dev-libs/double-conversion )
- system-woff2? ( media-libs/woff2 )
- system-snappy? ( app-arch/snappy )
- system-jsoncpp? ( dev-libs/jsoncpp )
- system-openjpeg? ( media-libs/openjpeg:2= )
- system-re2? ( >=dev-libs/re2-0.2019.08.01:= )
- system-libvpx? ( >=media-libs/libvpx-1.13.0:=[postproc] )
- system-libusb? ( virtual/libusb:1 )
- cromite? ( dev-util/patchutils )
- >=dev-libs/libxml2-2.12.4:=[icu]
- dev-libs/nspr:=
- >=dev-libs/nss-3.26:=
- dev-libs/libxslt:=
- media-libs/fontconfig:=
- >=media-libs/freetype-2.11.0-r1:=
- system-harfbuzz? ( >=media-libs/harfbuzz-3:0=[icu(-)] )
- media-libs/libjpeg-turbo:=
- media-libs/libpng:=
- system-zstd? ( >=app-arch/zstd-1.5.5:= )
- >=media-libs/libwebp-0.4.0:=
- media-libs/mesa:=[gbm(+)]
- >=media-libs/openh264-2.6.0:=
- system-av1? (
- >=media-libs/dav1d-1.0.0:=
- >=media-libs/libaom-3.7.0:=
- )
- sys-libs/zlib:=
- !headless? (
- dev-libs/glib:2
- >=media-libs/alsa-lib-1.0.19:=
- media-video/pipewire:=
- pulseaudio? (
- || (
- media-libs/libpulse
- >=media-sound/apulse-0.1.9
- )
- )
- sys-apps/pciutils:=
- kerberos? ( virtual/krb5 )
- vaapi? ( >=media-libs/libva-2.7:=[X?,wayland?] )
- X? (
- x11-base/xorg-proto:=
- x11-libs/libX11:=
- x11-libs/libxcb:=
- x11-libs/libXext:=
- )
- x11-libs/libxkbcommon:=
- wayland? (
- screencast? ( media-video/pipewire:= )
- dev-libs/libffi:=
- dev-libs/wayland:=
- screencast? (
- media-video/pipewire:=
- || (
- sys-apps/xdg-desktop-portal-gnome
- sys-apps/xdg-desktop-portal-gtk
- kde-plasma/xdg-desktop-portal-kde
- gui-libs/xdg-desktop-portal-lxqt
- gui-libs/xdg-desktop-portal-wlr
- )
- )
- )
- )
-"
-
-COMMON_DEPEND="
- ${COMMON_SNAPSHOT_DEPEND}
- app-arch/bzip2:=
- dev-libs/expat:=
- system-ffmpeg? (
- >=media-video/ffmpeg-6.1:=
- >=media-libs/opus-1.3.1:=
- )
- net-misc/curl[ssl]
- sys-apps/dbus:=
- media-libs/flac:=
- sys-libs/zlib:=[minizip]
- !headless? (
- >=app-accessibility/at-spi2-core-2.46.0:2
- media-libs/mesa:=[X?,wayland?]
- virtual/udev
- x11-libs/cairo:=
- x11-libs/gdk-pixbuf:2
- x11-libs/pango:=
- cups? ( >=net-print/cups-1.3.11:= )
- qt6? ( dev-qt/qtbase:6[gui,widgets] )
- X? ( ${COMMON_X_DEPEND} )
- )
-"
-RDEPEND="${COMMON_DEPEND}
- !www-client/ungoogled-chromium:0
- >=www-client/chromium-common-2
- !headless? (
- || (
- x11-libs/gtk+:3[X?,wayland?]
- gui-libs/gtk:4[X?,wayland?]
- )
- qt6? ( dev-qt/qtbase:6[X?,wayland?] )
- )
- virtual/ttf-fonts
- selinux? ( sec-policy/selinux-chromium )
- bindist? (
- ffmpeg-chromium? ( media-video/ffmpeg-chromium:${PV%%\.*} )
- )
- !override-data-dir? (
- !www-client/chromium:${SLOT}
- !www-client/cromite:${SLOT}[-override-data-dir]
- )
-"
-# For M149+ pipewire is a mandatory build-time dependency, but it's optional at runtime for most configurations.
-DEPEND="${COMMON_DEPEND}
- !headless? (
- media-video/pipewire
- gtk4? ( gui-libs/gtk:4[X?,wayland?] )
- !gtk4? ( x11-libs/gtk+:3[X?,wayland?] )
- )
-"
-
- # pgo? ( >=llvm-core/clang-22.0.0_pre20260106 >=llvm-core/lld-22.0.0_pre20260106 )
-BDEPEND="
- ${COMMON_SNAPSHOT_DEPEND}
- ${PYTHON_DEPS}
- $(python_gen_any_dep '
- dev-python/setuptools[${PYTHON_USEDEP}]
- ')
- >=app-arch/gzip-1.7
- !headless? (
- qt6? ( dev-qt/qtbase:6 )
- )
- !bundled-toolchain? ( $(llvm_gen_dep '
- llvm-core/clang:${LLVM_SLOT}
- llvm-core/llvm:${LLVM_SLOT}
- cfi? ( llvm-runtimes/clang-runtime:${LLVM_SLOT}[sanitize] )
- official? (
- !ppc64? ( llvm-runtimes/compiler-rt-sanitizers:${LLVM_SLOT}[cfi] )
- ) ')
- || (
- $(llvm_gen_dep 'llvm-core/lld:${LLVM_SLOT}')
- >=sys-devel/mold-2.41.0
- )
- ${RUST_DEPEND}
- )
- >=dev-util/bindgen-0.72.1
- >=dev-build/gn-${GN_MIN_VER}
- >=dev-lang/go-${GO_MIN_VER}
- app-alternatives/ninja
- dev-lang/perl
- >=dev-util/gperf-3.2
- dev-util/esbuild:${ESBUILD_VER}
- dev-vcs/git
- >=net-libs/nodejs-${NODE_VER}[inspector]
- sys-apps/hwdata
- >=sys-devel/bison-2.4.3
- sys-devel/flex
- virtual/pkgconfig
- x11-misc/xdg-utils
-"
-
-if ! has chromium_pkg_die ${EBUILD_DEATH_HOOKS}; then
- EBUILD_DEATH_HOOKS+=" chromium_pkg_die";
-fi
-
-DISABLE_AUTOFORMATTING="yes"
-DOC_CONTENTS="
-Some web pages may require additional fonts to display properly.
-Try installing some of the following packages if some characters
-are not displayed properly:
-- media-fonts/arphicfonts
-- media-fonts/droid
-- media-fonts/ipamonafont
-- media-fonts/noto
-- media-fonts/ja-ipafonts
-- media-fonts/takao-fonts
-- media-fonts/wqy-microhei
-- media-fonts/wqy-zenhei
-
-To fix broken icons on the Downloads page, you should install an icon
-theme that covers the appropriate MIME types, and configure this as your
-GTK+ icon theme.
-
-For native file dialogs in KDE, install kde-apps/kdialog.
-
-To make password storage work with your desktop environment you may
-have install one of the supported credentials management applications:
-- app-crypt/libsecret (GNOME)
-- kde-frameworks/kwallet (KDE)
-If you have one of above packages installed, but don't want to use
-them in Chromium, then add --password-store=basic to CHROMIUM_FLAGS
-in /etc/chromium/default.
-"
-
-S="${WORKDIR}/chromium-${PV/_*}"
-
-python_check_deps() {
- python_has_version "dev-python/setuptools[${PYTHON_USEDEP}]"
-}
-
-pre_build_checks() {
- # Check build requirements: bugs #471810, #541816, #914220
- # We're going to start doing maths here on the size of an unpacked source tarball,
- # this should make updates easier as chromium continues to balloon in size.
- # xz -l /var/cache/distfiles/chromium-${PV}*.tar.xz
- local base_disk=9 # Round up
- use test && base_disk=$((base_disk + 5))
- local extra_disk=1 # Always include a little extra space
- local memory=4
- tc-is-cross-compiler && extra_disk=$((extra_disk * 2))
- if tc-is-lto || use pgo; then
- memory=$((memory * 2 + 1))
- tc-is-cross-compiler && extra_disk=$((extra_disk * 2)) # Double the requirements
- use pgo && extra_disk=$((extra_disk + 4))
- fi
- if is-flagq '-g?(gdb)?([1-9])'; then
- if use custom-cflags; then
- extra_disk=$((extra_disk + 5))
- fi
- memory=$((memory * 2))
- fi
- local CHECKREQS_MEMORY="${memory}G"
- local CHECKREQS_DISK_BUILD="$((base_disk + extra_disk))G"
- check-reqs_${EBUILD_PHASE_FUNC}
-}
-
-pkg_pretend() {
- if [[ ${MERGE_TYPE} != binary ]]; then
- # The pre_build_checks are all about compilation resources, no need to run it for a binpkg
- pre_build_checks
- fi
-
- if use headless; then
- local headless_unused_flags=("cups" "kerberos" "pulseaudio" "qt6" "vaapi" "wayland")
- for myiuse in ${headless_unused_flags[@]}; do
- use ${myiuse} && ewarn "Ignoring USE=${myiuse}, USE=headless is set."
- done
- fi
-
- if ! use bindist && use ffmpeg-chromium; then
- ewarn "Ignoring USE=ffmpeg-chromium, USE=bindist is not set."
- fi
- if use libcxx; then
- ewarn
- ewarn "Building with libcxx, please be aware that system-*"
- ewarn "and some other c++ dependencies need to be compiled"
- ewarn "with the same c++ library as ungoogled-chromium itself"
- ewarn "dev-libs/jsoncpp is most problematic, see #58 #49 #119 for details"
- ewarn "Simplest solution would be to disable corresponding system-* flags"
- ewarn
- fi
- if use cfi; then
- ewarn
- ewarn "Building with cfi is only possible if building with -stdlib=libc++"
- ewarn "Make sure all dependencies are also built this way, see #40"
- ewarn
- fi
- if use cromite; then
- ewarn
- ewarn "Cromite patches are very experimental and unstable"
- ewarn "Please consider testing them and giving feedback upstream:"
- ewarn "https://github.com/uazo/cromite/issues"
- ewarn "Not all patches are applied, let me know if others should be considered too"
- ewarn
- fi
-}
-
-pkg_setup() {
- if [[ ${MERGE_TYPE} != binary ]]; then
- # The pre_build_checks are all about compilation resources, no need to run it for a binpkg
- pre_build_checks
-
- # We haven't massaged any CFLAGS yet, so we want to do this before we force CC/CXX to prevent warnings.
- local want_lto="false"
- tc-is-lto && want_lto="true"
-
- # The linux:unbundle toolchain in GN grabs CC, CXX, CPP (etc) from the environment
- # We'll set these to clang here then use llvm-utils functions to very explicitly set these
- # to a sane value.
- # This is effectively the 'force-clang' path if GCC support is re-added.
- if use !bundled-toolchain; then
- llvm-r1_pkg_setup
- rust_pkg_setup
-
- if tc-ld-is-mold; then
- ewarn "Mold is currently not supported, it will not be used"
- fi
-
- # Forcing clang; respect llvm_slot_x to enable selection of impl via LLVM_COMPAT
- AR=llvm-ar
- CPP="${CHOST}-clang++-${LLVM_SLOT} -E"
- NM=llvm-nm
- CC="${CHOST}-clang-${LLVM_SLOT}"
- CXX="${CHOST}-clang++-${LLVM_SLOT}"
- fi
-
- # LTO in Chromium means LLVM ThinLTO, if GCC support is re-added
- # We'll need to handle that here too.
- use_lto="false"
- local lto_usable="true"
- if [[ "$want_lto" == "true" ]]; then
- if use arm64 && [[ "${LLVM_SLOT}" -lt 22 ]]; then
- einfo "LTO is broken with LLVM 21 on arm64, ignoring CFLAGS."
- lto_usable="false"
- else
- use_lto="true"
- fi
- # We can rely on GN to do this for us; without this builds
- # take significantly longer with LTO enabled.
- filter-lto
- fi
-
- if [[ "$use_lto" == "false" ]] && use official && [[ "$lto_usable" == "true" ]]; then
- einfo "USE=official selected and LTO not detected."
- einfo "It is _highly_ recommended that LTO be enabled for performance reasons"
- einfo "and to be consistent with the upstream \"official\" build optimisations."
- fi
-
- if [[ "$use_lto" == "false" ]] && use test; then
- die "Tests require CFI which requires LTO"
- fi
-
- export use_lto
-
- if tc-is-cross-compiler; then
- use pgo && die "The pgo USE flag cannot be used when cross-compiling"
- CPP="${CBUILD}-clang++-${LLVM_SLOT} -E"
- fi
-
- # Sanity checks for development convenience
- if ver_test $(gn --version || die) -lt ${GN_MIN_VER}; then
- die "dev-build/gn >= ${GN_MIN_VER} is required to build this Chromium"
- fi
-
- # Sometimes, when adding a new LLVM slot, devs (me) forget to install an appropriate lld.
- if tc-ld-is-lld; then
- local lld_ver=$(ld.lld --version | awk '{split($2,a,"."); print a[1]}' || die "Failed to check lld version")
- if [[ ${lld_ver} -lt ${LLVM_SLOT} ]]; then
- die "Your lld version (${lld_ver}) is too old for the selected LLVM slot (${LLVM_SLOT}). Please install a newer lld or select an older LLVM slot."
- fi
- fi
- fi
-
- chromium_suid_sandbox_check_kernel_config
-}
-
-src_unpack() {
- # # Here be dragons!
- # local XCLD="--exclude=chromium-${PV/_*}/third_party/instrumented_libs \
- # --exclude=chromium-${PV/_*}/third_party/llvm \
- # --exclude=chromium-${PV/_*}/third_party/llvm-build \
- # --exclude=chromium-${PV/_*}/third_party/node/linux \
- # --exclude=chromium-${PV/_*}/third_party/rust-src \
- # --exclude=chromium-${PV/_*}/third_party/rust-toolchain \
- # --exclude=chromium-${PV/_*}/build/linux/debian_bullseye_i386-sysroot \
- # --exclude=chromium-${PV/_*}/build/linux/debian_bullseye_amd64-sysroot \
- # --exclude=chromium-${PV/_*}/third_party/angle/third_party/VK-GL-CTS \
- # "
-
- # if ! use libcxx ; then
- # XCLD+=" --exclude=chromium-${PV/_*}/third_party/libc++"
- # fi
-
- # if ! use pgo ; then
- # XCLD+=" --exclude=chromium-${PV/_*}/chrome/build/pgo_profiles"
- # fi
-
- # einfo "Unpacking chromium-${PV/_*}.tar.xz to ${WORKDIR}"
- # # Gentoo tarball:
- # # tar ${XCLD} -xf "${DISTDIR}/chromium-${PV/_*}-gentoo.tar.xz" -C "${WORKDIR}" || die
- # tar ${XCLD} -xf "${DISTDIR}/chromium-${PV/_*}${LITE_TARBALL:+-lite}.tar.xz" -C "${WORKDIR}" || die
-
- # unpack ${UGC_URL#*->}
- # # unpack chromium-patches-${PATCH_V}.tar.bz2
- # # Warned you!
-
- unpack chromium-${PV/_*}-lite.tar.xz
- unpack chromium-patches-${PATCH_V}.tar.bz2
- # These should only be required when we're not using the official toolchain
- if use !bundled-toolchain; then
- unpack chromium-patches-copium-${COPIUM_COMMIT:0:10}.tar.gz
- fi
-
- if use test; then
- # This just contains a bunch of font files that need to be unpacked (or moved) to the correct location.
- local testfonts_dir="${WORKDIR}/chromium-${PV/_*}/third_party/test_fonts/test_fonts"
- local testfonts_tar="${DISTDIR}/chromium-testfonts-${TEST_FONT:0:10}.tar.gz"
- einfo "Unpacking test fonts ..."
- tar xf "${testfonts_tar}" -C "${testfonts_dir}" || die "Failed to unpack testfonts"
- fi
-
- # We need to manually unpack this since M126 else we'd unpack one toolchain over the other.
- # Since we're doing that anyway let's unpack to sensible locations to make symlink creation easier.
- if use bundled-toolchain; then
- einfo "Unpacking bundled Clang ..."
- mkdir -p "${WORKDIR}"/clang || die "Failed to create clang directory"
- tar xf "${DISTDIR}/chromium-clang-${BUNDLED_CLANG_VER}.tar.xz" -C "${WORKDIR}/clang" || die "Failed to unpack Clang"
- einfo "Unpacking bundled Rust ..."
- local rust_dir="${WORKDIR}/rust-toolchain"
- mkdir -p "${rust_dir}" || die "Failed to create rust toolchain directory"
- tar xf "${DISTDIR}/chromium-rust-toolchain-${RUST_SHORT_HASH}-${BUNDLED_CLANG_VER%-*}.tar.xz" -C "${rust_dir}" ||
- die "Failed to unpack Rust"
- fi
-
- if use ppc64; then
- unpack chromium-openpower-${PPC64_HASH:0:10}.tar.bz2
- fi
-
- # This is a dirty hack, but we need rollup to build successfully and it's proving to be challenging
- # to build locally due to deps
- unpack rollup-wasm-node-${ROLLUP_VER}.tgz
-
- if use cromite; then
- unpack cromite-${CROMITE_COMMIT_ID}.tar.gz
- fi
-
- unpack ${UGC_URL#*->}
-}
-
-remove_compiler_builtins() {
- # We can't use the bundled compiler builtins with the system toolchain
- # We used to `grep` then `sed`, but it was indirect. Combining the two into a single
- # `awk` command is more efficient and lets us document the logic more clearly.
-
- local pattern=' configs += [ "//build/config/clang:compiler_builtins" ]'
- local target='build/config/compiler/BUILD.gn'
-
- local tmpfile
- tmpfile=$(mktemp) || die "Failed to create temporary file."
-
- if awk -v pat="${pattern}" '
- BEGIN {
- match_found = 0
- }
-
- # If the delete countdown is active, decrement it and skip to the next line.
- d > 0 { d--; next }
-
- # If the current line matches the pattern...
- $0 == pat {
- match_found = 1 # ...set our flag to true.
- d = 2 # Set delete counter for this line and the next two.
- prev = "" # Clear the buffered previous line so it is not printed.
- next
- }
-
- # For any other line, print the buffered previous line.
- NR > 1 { print prev }
-
- # Buffer the current line to be printed on the next cycle.
- { prev = $0 }
-
- END {
- # Print the last line if it was not part of a deleted block.
- if (d == 0) { print prev }
-
- # If the pattern was never found, exit with a failure code.
- if (match_found == 0) {
- exit 1
- }
- }
- ' "${target}" > "${tmpfile}"; then
- # AWK SUCCEEDED (exit code 0): The pattern was found and edited.
- # This is to avoid gawk's `-i inplace` option which users complain about.
- mv "${tmpfile}" "${target}"
- else
- # AWK FAILED (exit code 1): The pattern was not found.
- rm -f "${tmpfile}"
- die "Awk patch failed: Pattern not found in ${target}."
- fi
-}
-
-src_prepare() {
- # Calling this here supports resumption via FEATURES=keepwork
- python_setup
-
- # We'll fill this in as we go. Patches go in chromium-patches.
- local PATCHES=()
-
- rm "${WORKDIR}/chromium-patches-${PATCH_V}/common/cr131-unbundle-icu-target.patch"
- if ver_test "${RUST_SLOT}" -ge "1.95.0"; then
- sed -i '/SupportedLaneCount/d' third_party/rust/chromium_crates_io/vendor/bytemuck-v1/src/zeroable.rs || die
- sed -i '/SupportedLaneCount/d' third_party/rust/chromium_crates_io/vendor/bytemuck-v1/src/pod.rs || die
- fi
-
- PATCHES+=(
- "${WORKDIR}/chromium-patches-${PATCH_V}/common/"
- "${FILESDIR}/restore-x86-r4.patch"
- )
-
- # So many fontconfig magic numbers to cover
- # TODO: once upstream roll to 2.18.2+ set that as our minimum and remove this logic.
- # <=2.17.1 -> 9
- # >2.17.1 && <2.18.2 -> 11
- # >=2.18.2 -> 12
- local fontconfig_cache_magic=9
- if has_version ">=media-libs/fontconfig-2.18.2"; then
- fontconfig_cache_magic=12
- elif has_version ">media-libs/fontconfig-2.17.1"; then
- fontconfig_cache_magic=11
- fi
-
- sed -E -i \
- -e "s#(fb5c91b2895aa445d23aebf7f9e2189c-le64\.cache-)(9|10|11|12)#\1${fontconfig_cache_magic}#g" \
- third_party/test_fonts/fontconfig/BUILD.gn || die "Failed to set fontconfig cache magic in BUILD.gn"
-
- #cp -f ${WORKDIR}/chromium-patches-${PATCH_V}/*-compiler.patch "${T}/compiler.patch"
- ##cp -f ${FILESDIR}/chromium-147-compiler.patch "${T}/compiler.patch"
- #if ! use custom-cflags; then #See #25 #92
- # sed -i '/default_stack_frames/Q' "${T}/compiler.patch" || die
- #fi
-
- sed -E -i \
- -e "s#(kCacheKey \+ \"/-le64\.cache-)(9|10|11|12)(\")#\1${fontconfig_cache_magic}\3#g" \
- -e "s#(kCacheKey \+ \"-le64\.cache-)(9|10|11|12)(\")#\1${fontconfig_cache_magic}\3#g" \
- third_party/test_fonts/fontconfig/generate_fontconfig_caches.cc || \
- die "Failed to set fontconfig cache magic in generate_fontconfig_caches.cc"
-
- if use bundled-toolchain; then
- # We need to symlink the toolchain into the expected location
- einfo "Symlinking Clang toolchain to expected location ..."
- mkdir -p third_party/llvm-build/ || die "Failed to create llvm-build directory"
- # the 'Chromium Linux Tarballs' seem to already have 'Release+Asserts/{lib,bin}'; not sure if this is an
- # upstream change - we're using the same scripts to build, theoretically. We'll still attempt to create
- # llvm-build, but we'll rm Release+Asserts and symlink directly.
- if [[ -d third_party/llvm-build/Release+Asserts ]]; then
- rm -r third_party/llvm-build/Release+Asserts || die "Failed to remove third_party/llvm-build/Release+Asserts"
- fi
- ln -s "${WORKDIR}"/clang third_party/llvm-build/Release+Asserts || die "Failed to bundle Clang"
- einfo "Symlinking Rust toolchain to expected location ..."
- # As above, so below
- if [[ -d third_party/rust-toolchain ]]; then
- rm -r third_party/rust-toolchain || die "Failed to remove third_party/rust-toolchain"
- fi
- ln -s "${WORKDIR}"/rust-toolchain third_party/rust-toolchain || die "Failed to bundle rust"
- cp "${WORKDIR}"/rust-toolchain/VERSION \
- "${WORKDIR}"/rust-toolchain/INSTALLED_VERSION || die "Failed to set rust version"
- else
- # We don't need our toolchain patches if we're using the official toolchain
-
- # Copium patches go here.
- PATCHES+=(
- "${WORKDIR}/copium/cr143-libsync-__BEGIN_DECLS.patch"
- "${WORKDIR}/copium/cr149-unbundle-minizip-undo-unicode.patch"
- )
-
- # Automate conditional application of chromium-patches
- # The directory structure is expected to be something like:
- # chromium-patches-145/
- # ├── toolchain/
- # │ ├── cr123-foo.patch
- # │ └── cr135-bar.patch
- # ├── llvm/
- # │ ├── cr144-baz.patch
- # │ └── lt-23/
- # │ └── cr145-bleeding-edge-llvm-feature.patch
- # Where `lt-23` means "apply this patch if the LLVM version is less than 23".
- # Only categories in `slot_map` will be checked for version constraints.
- shopt -s nullglob
- local -A slot_map=( [llvm]="${LLVM_SLOT}" [rust]="${RUST_SLOT}" )
-
- for category in "${WORKDIR}/chromium-patches-${PATCH_V}"/*/; do
- local category_name="${category%/}"
- category_name="${category_name##*/}"
-
- # Skip arch-specific categories
- if [[ "${category_name}" == "ppc64le" ]]; then
- use ppc64 || continue
- fi
-
- # We applied common patches above, no need to apply them again here
- [[ "${category_name}" == "common" ]] && continue
-
- # Unconditional patches for this category
- local category_patches=( "${category}"*.patch )
- [[ ${#category_patches[@]} -gt 0 ]] && PATCHES+=( "${category}" )
-
- # Version-constrained subdirectories (e.g., llvm/lt-23/)
- for constraint_dir in "${category}"*/; do
- local dir_name="${constraint_dir%/}"
- dir_name="${dir_name##*/}"
- if [[ "${dir_name}" =~ ^lt-(.*)$ && -v slot_map[${category_name}] ]]; then
- ver_test "${slot_map[${category_name}]}" -lt "${BASH_REMATCH[1]}" &&
- PATCHES+=( "${constraint_dir}" )
- fi
- done
- done
-
- shopt -u nullglob
-
- # Strictly speaking this doesn't need to be gated (no bundled toolchain for ppc64); it keeps the logic together
- if use ppc64; then
- local patchset_dir="${WORKDIR}/openpower-patches-${PPC64_HASH}/patches"
- # patch causes build errors on 4K page systems (https://bugs.gentoo.org/show_bug.cgi?id=940304)
- local page_size_patch="ppc64le/third_party/use-sysconf-page-size-on-ppc64.patch"
- local isa_3_patch="ppc64le/core/baseline-isa-3-0.patch"
- # Apply the OpenPOWER patches (check for page size and isa 3.0)
- openpower_patches=( $(grep -E "^ppc64le|^upstream" "${patchset_dir}/series" | grep -v "${page_size_patch}" |
- grep -v "${isa_3_patch}" || die) )
- for patch in "${openpower_patches[@]}"; do
- PATCHES+=( "${patchset_dir}/${patch}" )
- done
- if [[ $(getconf PAGESIZE) == 65536 ]]; then
- PATCHES+=( "${patchset_dir}/${page_size_patch}" )
- fi
- # We use vsx3 as a proxy for 'want isa3.0' (POWER9)
- if use cpu_flags_ppc_vsx3 ; then
- PATCHES+=( "${patchset_dir}/${isa_3_patch}" )
- fi
- fi
-
- remove_compiler_builtins
-
- # We can't rely on the eselect'd Rust to actually include rustfmt, so we'll point to the selected slot specifically.
- local suffix=""
- if [[ "${RUST_TYPE}" == "binary" ]]; then
- suffix="-bin-${RUST_SLOT}"
- else
- suffix="-${RUST_SLOT}"
- fi
- sed -i "s|/bin/rustfmt|/bin/rustfmt${suffix}|g" build/rust/rust_bindgen_generator.gni ||
- die "Failed to update rustfmt path"
-
- fi
-
- # Do this before we apply patches since (e.g.) ppc64 needs to patch rollup and it's easier in ${S}
- einfo "Moving rollup wasm-node package into place ..."
- mkdir -p third_party/devtools-frontend/src/node_modules/@rollup/wasm-node ||
- die "Failed to create node_modules/@rollup/wasm-node"
- mv "${WORKDIR}"/package/* third_party/devtools-frontend/src/node_modules/@rollup/wasm-node ||
- die "Failed to move rollup package"
-
- if [ ! -z "${CHROMIUM_COMMITS[*]}" ]; then
- # for i in "${CHROMIUM_COMMITS[@]}"; do
- for i in "${!CHROMIUM_COMMITS[@]}"; do
- if [[ ${CHROMIUM_COMMITS[$i]} =~ webrtc ]]; then
- patch_prefix="webrtc"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ angle ]]; then
- patch_prefix="angle"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ quiche ]]; then
- patch_prefix="quiche"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ dawn ]]; then
- patch_prefix="dawn"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ perfetto ]]; then
- patch_prefix="perfetto"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ink ]]; then
- patch_prefix="ink"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ vulkan-utility-libraries ]]; then
- patch_prefix="vulkan-utility-libraries"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ruy ]]; then
- patch_prefix="ruy"
- else
- patch_prefix="chromium"
- fi
- pushd "${CHROMIUM_COMMITS[$i]}" > /dev/null || die
- if [[ $i = -* ]]; then
- einfo "Reverting ${patch_prefix}-${i/-}.patch"
- git_wrapper apply -R --exclude="*unittest.cc" --exclude="DEPS" \
- -p1 < "${DISTDIR}/${patch_prefix}-${i/-}.patch"
- else
- einfo "Applying ${patch_prefix}-${i/-}.patch"
- git_wrapper apply --exclude="*unittest.cc" --exclude="DEPS" \
- -p1 < "${DISTDIR}/${patch_prefix}-${i/-}.patch"
- fi
- popd > /dev/null || die
- done
- fi
-
- if ! use bluetooth ; then
- PATCHES+=(
- "${FILESDIR}/disable-bluez-r7.patch"
- )
- fi
-
- if use convert-dict ; then
- PATCHES+=(
- "${FILESDIR}/chromium-ucf-dict-utility-r3.patch"
- )
- fi
-
- if ! use libcxx ; then
- PATCHES+=(
- "${FILESDIR}/fix-wayland-oncecallback-copy.patch"
- )
- fi
-
- if use system-ffmpeg; then
- PATCHES+=(
- "${FILESDIR}/chromium-141-opus-mp3.patch"
- "${FILESDIR}/chromium-135-hevc.patch"
- )
- sed -i "\!AVFMT_FLAG_NOH264PARSE!d" media/filters/ffmpeg_glue.cc || die
- ewarn "You need to expose \"av_stream_get_first_dts\" in ffmpeg via user patch"
- fi
-
- if use system-av1; then
- PATCHES+=(
- "${FILESDIR}/chromium-system-av1.patch"
- )
- fi
-
- if use system-libvpx; then
- PATCHES+=(
- "${FILESDIR}/chromium-system-libvpx.patch"
- )
- fi
-
- if use system-openjpeg ; then
- PATCHES+=(
- "${FILESDIR}/chromium-system-openjpeg-r4.patch"
- )
- fi
-
- # if use x86 ; then
- # #* Fixes a segfault in transport_security_state_generator
- # PATCHES+=(
- # "${FILESDIR}/fix-segfault-x86.patch"
- # )
- # fi
-
- # Testing all patches when NODIE is defined
- if [ ! -z "${NODIE}" ]; then
- for i in "${PATCHES[@]}"; do
- eapply_wrapper "$i"
- done
- nonfatal eapply_user
- else
- default
- fi
-
- if use cromite ; then
- BR_PA_PATH="${WORKDIR}/cromite-${CROMITE_COMMIT_ID}/build/patches"
-
- sed -i '/b\/components\/components_strings\.grd/,+10d' "${BR_PA_PATH}/Add-cromite-flags-support.patch" || die
- sed -i '/b\/chrome\/android\/java\/res\/xml\/privacy_preferences\.xml/,+13d' "${BR_PA_PATH}/Add-cromite-flags-support.patch" || die
- sed -i '/b\/android_webview\/support_library\/java\/src\/org\/chromium\/support_lib_glue/,+11d' "${BR_PA_PATH}/Client-hints-overrides.patch" || die
- sed -i '/webapps_strings.grdp" \/>/{s++webapps_strings.grdp" /><part file="cromite_components_strings_grd/placeholder.txt"/>+;h};${x;/./{x;q0};x;q1}' \
- components/components_strings.grd || die
-
- sed -i 's/absl::/std::/' "${BR_PA_PATH}/Add-a-proxy-configuration-page.patch" || die
-
- filterdiff -p1 "${BR_PA_PATH}/JIT-site-settings.patch" --exclude="content/browser/renderer_host/render_process_host_impl.cc" \
- > "${BR_PA_PATH}/JIT-site-settings.patch1"
- mv -f "${BR_PA_PATH}/JIT-site-settings.patch1" "${BR_PA_PATH}/JIT-site-settings.patch"
-
- BROMITE_PATCHES=(
- "${BR_PA_PATH}/bromite-build-utils.patch"
- "${BR_PA_PATH}/Battery-API-return-nothing.patch"
- "${BR_PA_PATH}/Multiple-fingerprinting-mitigations.patch"
- "${BR_PA_PATH}/Add-flag-to-configure-maximum-connections-per-host.patch"
- "${BR_PA_PATH}/Add-a-proxy-configuration-page.patch"
- "${BR_PA_PATH}/Enable-StrictOriginIsolation-and-SitePerProcess.patch"
- "${BR_PA_PATH}/Disable-requests-for-single-word-Omnibar-searches.patch"
- "${BR_PA_PATH}/Reduce-HTTP-headers-in-DoH-requests-to-bare-minimum.patch"
- "${BR_PA_PATH}/Client-hints-overrides.patch"
- "${BR_PA_PATH}/Disable-idle-detection.patch"
- "${BR_PA_PATH}/Disable-TLS-resumption.patch"
- "${BR_PA_PATH}/Remove-navigator.connection-info.patch"
-
- "${BR_PA_PATH}/AudioBuffer-AnalyserNode-fp-mitigations.patch"
- "${BR_PA_PATH}/Fonts-fingerprinting-mitigation.patch"
- "${BR_PA_PATH}/Content-settings-infrastructure.patch"
- "${BR_PA_PATH}/Add-autoplay-site-setting.patch"
- "${BR_PA_PATH}/Site-setting-for-images.patch"
- "${BR_PA_PATH}/JIT-site-settings.patch"
- "${BR_PA_PATH}/Add-webGL-site-setting.patch"
- "${BR_PA_PATH}/Add-webRTC-site-settings.patch"
- "${BR_PA_PATH}/Show-site-settings-for-cookies-javascript-and-ads.patch"
- "${BR_PA_PATH}/Viewport-Protection-flag.patch"
- "${BR_PA_PATH}/Revert-remove-allowscript-content-setting-secondary-url.patch"
- "${BR_PA_PATH}/Timezone-customization.patch"
- "${BR_PA_PATH}/Disable-speechSynthesis-getVoices-API.patch"
- "${BR_PA_PATH}/Remove-support-for-device-memory-and-cpu-recovery.patch"
- "${BR_PA_PATH}/Disable-Feeback-Collector.patch"
- "${BR_PA_PATH}/Disable-remote-altsvc-for-h3-connections.patch"
- "${BR_PA_PATH}/Add-cromite-flags-support.patch"
- "${BR_PA_PATH}/Enables-deactivation-of-the-js-debugger-statement.patch"
- )
- for i in "${BROMITE_PATCHES[@]}"; do
- if [[ "$i" =~ "Add-autoplay-site-setting.patch" ]] ||
- [[ "$i" =~ "JIT-site-settings.patch" ]] ||
- [[ "$i" =~ "Site-setting-for-images.patch" ]]; then
- einfo "Git binary patch: ${i##*/}"
- git_wrapper apply -p1 < "$i"
- else
- filter_wrapper "$i" --exclude="chrome/android/*"
- fi
- done
-
- #! conflicting patches
- sed -i '/browser_features.cc/,+17d' \
- "${UGC_WD}/patches/extra/ungoogled-chromium/add-flag-to-clear-data-on-exit.patch" || die
- sed -i 's$} // namespace features$BASE_FEATURE(kClearDataOnExit, "ClearDataOnExit", base::FEATURE_DISABLED_BY_DEFAULT);}$' \
- chrome/browser/browser_features.cc || die
- sed -i 's$} // namespace features$BASE_DECLARE_FEATURE(kClearDataOnExit);}$' \
- chrome/browser/browser_features.h || die
- sed -i 's$kChromeUIAboutHost,$kChromeUIAboutHost,"ungoogled-first-run",$' \
- chrome/common/webui_url_constants.cc || die
- sed -i '/chrome\/common\/webui_url_constants.cc/Q' \
- "${UGC_WD}/patches/extra/ungoogled-chromium/first-run-page.patch" || die
-
- #! normalise paths in py
- sed -i 's$os.path.dirname(include_file)$os.path.abspath(os.path.dirname(include_file))$' \
- build/bromite/gyp/cpp_bromite_include.py || die
- fi
-
- # if [[ ${LLVM_SLOT} == "19" ]]; then
- # # Upstream now hard depend on a feature that was added in LLVM 20.1, but we don't want to stabilise that yet.
- # # Do the temp file shuffle in case someone is using something other than `gawk`
- # {
- # awk '/config\("clang_warning_suppression"\) \{/ { print $0 " }"; sub(/clang/, "xclang"); print; next }
- # { print }' build/config/compiler/BUILD.gn > "${T}/build.gn" && \
- # mv "${T}/build.gn" build/config/compiler/BUILD.gn
- # } || die "Unable to disable warning suppression"
- # fi
-
- ## Not included in -lite tarballs, but we should check for it anyway.
- #if [[ -f third_party/node/linux/node-linux-x64/bin/node ]]; then
- # rm third_party/node/linux/node-linux-x64/bin/node || die
- #else
- # mkdir -p third_party/node/linux/node-linux-x64/bin || die
- #fi
- #ln -s "${EPREFIX}"/usr/bin/node third_party/node/linux/node-linux-x64/bin/node || die
-
- cp "${FILESDIR}/libusb.gn" build/linux/unbundle || die
- sed -i '/^REPLACEMENTS.*$/{s++REPLACEMENTS = {"libusb":"third_party/libusb/BUILD.gn",+;h};${x;/./{x;q0};x;q1}' \
- build/linux/unbundle/replace_gn_files.py || die
- sed -i '/^.*deps.*third_party\/jsoncpp.*$/{s++public_deps \+= [ "//third_party/jsoncpp" ]+;h};${x;/./{x;q0};x;q1}' \
- third_party/webrtc/rtc_base/BUILD.gn || die
-
- if use override-data-dir; then
- sed -i '/"chromium";/{s++"ungoogled-chromium";+;h};${x;/./{x;q0};x;q1}' \
- chrome/common/chrome_paths_linux.cc || die
- fi
-
- if use system-abseil-cpp; then
- eapply_wrapper "${FILESDIR}/chromium-147-system-abseil.patch"
-
- #! SFINAE mangling incompatibility between clang and gcc:
- #! https://github.com/llvm/llvm-project/issues/85656
- #! gcc: _ZN4absl12lts_202601074CordC1INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELi0EEEOT_
- #! clang: _ZN4absl12lts_202601074CordC1INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEETnNSt9enable_ifIXsr3std7is_sameIT_S8_EE5valueEiE4typeELi0EEEOSA_
- #! So, either this:
- eapply_wrapper "${FILESDIR}/chromium-141-system-abseil-cord.patch"
- #! or build with -fclang-abi-compat=17
-
- # cp -f /usr/include/absl/base/options.h third_party/abseil-cpp/absl/base/options.h
- # sed -i '/^#define ABSL_OPTION_USE_STD_ORDERING.*$/{s++#define ABSL_OPTION_USE_STD_ORDERING 1+;h};${x;/./{x;q0};x;q1}' \
- # third_party/abseil-cpp/absl/base/options.h || die
- fi
-
- #* Applying UGC PRs here
- if [ ! -z "${UGC_PR_COMMITS[*]}" ]; then
- pushd "${UGC_WD}" >/dev/null
- for i in "${UGC_PR_COMMITS[@]}"; do
- eapply_wrapper "${DISTDIR}/${PN}-$i.patch"
- done
- popd >/dev/null
- fi
-
- # From here we adapt ungoogled-chromium's patches to our needs
- local ugc_pruning_list="${UGC_WD}/pruning.list"
- local ugc_patch_series="${UGC_WD}/patches/series"
- local ugc_substitution_list="${UGC_WD}/domain_substitution.list"
-
- local ugc_unneeded=(
- # GN bootstrap
- extra/debian/gn/parallel
- # following Gentoo's Chromium
- core/ungoogled-chromium/build-with-wasm-rollup
- )
-
- if use cromite ; then
- einfo "Using fingerprinting patches from Cromite instead"
- ugc_unneeded+=(
- extra/bromite/fingerprinting-flags-client-rects-and-measuretext
- extra/bromite/flag-max-connections-per-host
- extra/bromite/flag-fingerprinting-canvas-image-data-noise
- extra/ungoogled-chromium/add-components-ungoogled
- extra/ungoogled-chromium/remove-pac-size-limit
- )
- fi
-
- # #* Temporary fix
- # sed -i "\!ios/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/icu/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/libjpeg_turbo/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/snappy/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/closure_compiler/!d" "${ugc_pruning_list}" || die
-
- # #* Didn't unpack them at the first place
- # sed -i "\!build/linux/debian_bullseye_i386-sysroot!d" "${ugc_pruning_list}" || die
- # sed -i "\!build/linux/debian_bullseye_amd64-sysroot!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/llvm-build!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/node/linux!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/rust-src!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/rust-toolchain!d" "${ugc_pruning_list}" || die
- # if ! use libcxx ; then
- # sed -i "\!third_party/libc!d" "${ugc_pruning_list}" || die
- # fi
- sed -i "s|debug('files|error('files|" \
- "${UGC_WD}/utils/prune_binaries.py" || die
- sed -i "\!third_party/node/linux!d" \
- "${UGC_WD}/utils/prune_binaries.py" || die
-
- local ugc_p ugc_dir
- for p in "${ugc_unneeded[@]}"; do
- einfo "Removing ${p}.patch"
- sed -i "\!${p}.patch!d" "${ugc_patch_series}" || die
- done
-
- if [ ! -z "${UGC_SKIP_PATCHES}" ]; then
- for p in ${UGC_SKIP_PATCHES}; do
- ewarn "Removing ${p}"
- sed -i "\!${p}!d" "${ugc_patch_series}" || die
- done
- fi
-
- if [ ! -z "${UGC_KEEP_BINARIES}" ]; then
- for p in ${UGC_KEEP_BINARIES}; do
- ewarn "Keeping binary ${p}"
- sed -i "\!${p}!d" "${ugc_pruning_list}" || die
- done
- fi
-
- if [ ! -z "${UGC_SKIP_SUBSTITUTION}" ]; then
- for p in ${UGC_SKIP_SUBSTITUTION}; do
- ewarn "No substitutions in ${p}"
- sed -i "\!${p}!d" "${ugc_substitution_list}" || die
- done
- fi
-
- ebegin "Pruning binaries"
- "${UGC_WD}/utils/prune_binaries.py" -q . "${UGC_WD}/pruning.list"
- eend $? || die
-
- ebegin "Applying ungoogled-chromium patches"
- "${UGC_WD}/utils/patches.py" -q apply . "${UGC_WD}/patches"
- eend $? || die
-
- ebegin "Applying domain substitution"
- "${UGC_WD}/utils/domain_substitution.py" -q apply -r "${UGC_WD}/domain_regex.list" -f "${UGC_WD}/domain_substitution.list" .
- eend $? || die
-
- # Sanity check esbuild version before we start removing files.
- # We _could_ patch the version check out - in theory esbuild upstream are being super conservative after
- # arch(AUR) packaged an `esbuild` binary and set ESBUILD_BINARY_PATH=/usr/bin/esbuild, causing much breakage,
- # but this is fine too and exactly matches what upstream are expecting.
- # https://github.com/evanw/esbuild/issues/2894
- local esbuild_js="${S}/third_party/devtools-frontend/src/node_modules/esbuild/lib/main.js"
- local found
- found=$(awk -F'"' '/if \(binaryVersion !==/ {print $2}' "${esbuild_js}")
- if [[ "${found}" != "${ESBUILD_VER}" ]]; then
- die "esbuild version mismatch: expected ${ESBUILD_VER}, found ${found}"
- fi
-
- elog "Removing bundled binaries from source tree ..."
- # Purge bundled ELF files: These are non-portable and will cause issues if used instead of system versions.
- # Use `--wasm` to also remove WebAssembly binaries, if desired - they're portable so shouldn't break builds.
- ${EPYTHON} "${FILESDIR}/bin-finder.py" --elf "${S}" | awk '{print $1}' | xargs rm -f ||
- die "Failed to remove bundled binaries"
-
- # And now we restore any that we actually need, from the host system
- local esbuild_path="${S}/third_party/devtools-frontend/src/third_party/esbuild"
- local -A restore_list=(
- ["/usr/bin/esbuild-${ESBUILD_VER}"]="${esbuild_path}/esbuild"
- ["/usr/bin/gperf"]="${S}/third_party/gperf/cipd/bin/gperf"
- ["/usr/bin/node"]="${S}/third_party/node/linux/node-linux-x64/bin/node"
- )
-
- for src in "${!restore_list[@]}"; do
- dst="${restore_list[${src}]}"
- if [[ -f "${src}" ]]; then
- einfo "Symlinking ${src} ..."
- # Make sure the parent dir exists; some tarballs don't include (e.g.) node's bindir
- mkdir -p "$(dirname "${dst}")" || die "Failed to create directory for ${dst}"
- ln -s "${src}" "${dst}" || die "Failed to symlink ${dst} from ${src}"
- if [[ ! -L "${dst}" || "$(readlink -f "${dst}")" != "${src}" ]]; then
- die "Symlink verification failed for ${dst} -> ${src}"
- fi
- else
- die "Expected to find ${src} to restore ${dst}, but it does not exist."
- fi
- done
-
- # adjust python interpreter version
- sed -i -e "s|\(^script_executable = \).*|\1\"${EPYTHON}\"|g" .gn || die
-
- # Use the system copy of hwdata's usb.ids
- sed 's|//third_party/usb_ids/src/usb.ids|/usr/share/hwdata/usb.ids|g' \
- -i services/device/public/cpp/usb/BUILD.gn || die "Failed to set system usb.ids path"
-
- # remove_bundled_libraries.py walks the source tree and looks for paths containing the substring 'third_party'
- # whitelist matches use the right-most matching path component, so we need to whitelist from that point down.
- local keeplibs=(
- base/third_party/cityhash
- )
- use system-double-conversion || keeplibs+=(
- base/third_party/double_conversion
- )
- keeplibs+=(
- base/third_party/icu
- base/third_party/nspr
- base/third_party/superfasthash
- base/third_party/symbolize
- base/third_party/xdg_user_dirs
- buildtools/third_party/libc++
- buildtools/third_party/libc++abi
- )
- use cromite && keeplibs+=(
- cromite_flags/third_party
- )
- keeplibs+=(
- net/third_party/mozilla_security_manager
- net/third_party/quic
- net/third_party/uri_template
- )
- use system-abseil-cpp || keeplibs+=(
- third_party/abseil-cpp
- )
- keeplibs+=(
- third_party/angle
- third_party/angle/src/common/third_party/xxhash
- third_party/angle/src/third_party/ceval
- )
- use nvidia || keeplibs+=(
- third_party/angle/src/third_party/libXNVCtrl
- )
- keeplibs+=(
- third_party/angle/src/third_party/volk
- third_party/anonymous_tokens
- third_party/apple_apsl
- third_party/axe-core
- third_party/bidimapper
- third_party/blink
- third_party/boringssl
- third_party/boringssl/src/third_party/fiat
- third_party/breakpad
- third_party/breakpad/breakpad/src/third_party/curl
- )
- use system-brotli || keeplibs+=(
- third_party/brotli
- )
- keeplibs+=(
- third_party/catapult
- third_party/catapult/common/py_vulcanize/third_party/rcssmin
- third_party/catapult/common/py_vulcanize/third_party/rjsmin
- third_party/catapult/third_party/beautifulsoup4-4.9.3
- third_party/catapult/third_party/html5lib-1.1
- third_party/catapult/third_party/polymer
- third_party/catapult/third_party/six
- third_party/catapult/third_party/typ
- third_party/catapult/tracing/third_party/d3
- third_party/catapult/tracing/third_party/gl-matrix
- third_party/catapult/tracing/third_party/jpeg-js
- third_party/catapult/tracing/third_party/jszip
- third_party/catapult/tracing/third_party/mannwhitneyu
- third_party/catapult/tracing/third_party/oboe
- third_party/catapult/tracing/third_party/pako
- third_party/ced
- third_party/cld_3
- third_party/closure_compiler
- )
- use libcxx && keeplibs+=(
- third_party/compiler-rt
- )
- keeplibs+=(
- third_party/content_analysis_sdk
- third_party/cpuinfo
- third_party/crabbyavif
- third_party/crashpad
- third_party/crashpad/crashpad/third_party/lss
- third_party/crashpad/crashpad/third_party/zlib
- )
- use system-crc32c || keeplibs+=(
- third_party/crc32c
- )
- keeplibs+=(
- third_party/cros_system_api
- third_party/d3
- third_party/dawn
- third_party/dawn/third_party/gn/webgpu-cts
- third_party/dawn/third_party/OpenGL-Registry
- third_party/dawn/third_party/renderdoc
- third_party/dawn/third_party/webgpu-headers
- third_party/depot_tools
- third_party/devscripts
- third_party/devtools-frontend
- third_party/devtools-frontend/src/front_end/third_party/acorn
- third_party/devtools-frontend/src/front_end/third_party/additional_readme_paths.json
- third_party/devtools-frontend/src/front_end/third_party/axe-core
- third_party/devtools-frontend/src/front_end/third_party/chromium
- third_party/devtools-frontend/src/front_end/third_party/codemirror
- third_party/devtools-frontend/src/front_end/third_party/csp_evaluator
- third_party/devtools-frontend/src/front_end/third_party/diff
- third_party/devtools-frontend/src/front_end/third_party/i18n
- third_party/devtools-frontend/src/front_end/third_party/intl-messageformat
- third_party/devtools-frontend/src/front_end/third_party/json5
- third_party/devtools-frontend/src/front_end/third_party/legacy-javascript
- third_party/devtools-frontend/src/front_end/third_party/lighthouse
- third_party/devtools-frontend/src/front_end/third_party/lit
- third_party/devtools-frontend/src/front_end/third_party/marked
- third_party/devtools-frontend/src/front_end/third_party/puppeteer
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/third_party/mitt
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/third_party/parsel-js
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/third_party/rxjs
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/third_party/urlpattern-polyfill
- third_party/devtools-frontend/src/front_end/third_party/source-map-scopes-codec
- third_party/devtools-frontend/src/front_end/third_party/third-party-web
- third_party/devtools-frontend/src/front_end/third_party/vscode.web-custom-data
- third_party/devtools-frontend/src/front_end/third_party/wasmparser
- third_party/devtools-frontend/src/front_end/third_party/web-vitals
- third_party/devtools-frontend/src/third_party
- third_party/dom_distiller_js
- third_party/dragonbox
- third_party/eigen3
- third_party/emoji-segmenter
- third_party/farmhash
- third_party/fast_float
- third_party/fdlibm
- third_party/federated_compute/chromium/fcp/confidentialcompute
- third_party/federated_compute/chromium/fcp/protos
- third_party/federated_compute/chromium/fcp/secagg
- third_party/federated_compute/chromium/fcp/client
- third_party/federated_compute/src/fcp/base
- third_party/federated_compute/src/fcp/confidentialcompute
- third_party/federated_compute/src/fcp/protos
- third_party/federated_compute/src/fcp/client
- third_party/federated_compute/src/fcp/secagg
- third_party/federated_compute/third_party/googleapis/src/google
- third_party/federated_compute/third_party/tensorflow-federated
- third_party/federated_compute/third_party/protodatastore-cpp
- third_party/fft2d
- third_party/flatbuffers
- third_party/fp16
- third_party/freetype
- third_party/fusejs
- third_party/fxdiv
- third_party/gemmlowp
- third_party/google_input_tools
- third_party/google_input_tools/third_party/closure_library
- third_party/google_input_tools/third_party/closure_library/third_party/closure
- third_party/googletest
- third_party/gperf # We symlink system gperf, but this will purge the symlink since we tidy up afterwards.
- third_party/highway
- third_party/hunspell
- third_party/hyphenation-patterns
- third_party/ink/src/ink/brush
- third_party/ink/src/ink/color
- third_party/ink/src/ink/geometry
- third_party/ink/src/ink/rendering
- third_party/ink/src/ink/rendering/skia/common_internal
- third_party/ink/src/ink/rendering/skia/native
- third_party/ink/src/ink/rendering/skia/native/internal
- third_party/ink/src/ink/strokes
- third_party/ink/src/ink/types
- third_party/inspector_protocol
- third_party/ipcz
- third_party/jinja2
- )
- use system-jsoncpp || keeplibs+=(
- third_party/jsoncpp
- )
- keeplibs+=(
- third_party/khronos
- third_party/lens_server_proto
- third_party/leveldatabase
- third_party/libaddressinput
- third_party/libdrm
- third_party/libgav1
- third_party/libjingle
- third_party/libpfm4
- third_party/libphonenumber
- third_party/libpng
- third_party/libsecret
- third_party/libsrtp
- third_party/libsync
- third_party/libtess2/libtess2
- third_party/libtess2/src/Include
- third_party/libtess2/src/Source
- third_party/liburlpattern
- )
- use system-libusb || keeplibs+=(
- third_party/libusb
- )
- keeplibs+=(
- third_party/libva_protected_content
- )
- use system-libvpx || keeplibs+=(
- third_party/libvpx
- third_party/libvpx/source/libvpx/third_party/x86inc
- )
- keeplibs+=(
- third_party/libwebm
- third_party/libx11
- third_party/libxcb-keysyms
- third_party/libxml/chromium
- third_party/libyuv
- third_party/libzip
- third_party/lit
- )
- use libcxx && keeplibs+=(
- third_party/llvm-libc
- third_party/llvm-libc/src/shared/
- )
- keeplibs+=(
- third_party/lottie
- third_party/lss
- third_party/lzma_sdk
- third_party/mako
- third_party/markupsafe
- third_party/material_color_utilities
- third_party/metrics_proto
- third_party/minigbm
- third_party/ml_dtypes
- third_party/modp_b64
- third_party/nasm
- third_party/nearby
- third_party/neon_2_sse
- third_party/node
- third_party/oak/chromium/proto
- third_party/oak/chromium/proto/attestation
- third_party/omnibox_proto
- third_party/one_euro_filter
- third_party/openscreen
- third_party/openscreen/src/third_party/
- third_party/openscreen/src/third_party/tinycbor/src/src
- third_party/ots
- third_party/pdfium
- third_party/pdfium/third_party/agg23
- third_party/pdfium/third_party/bigint
- third_party/pdfium/third_party/freetype
- third_party/pdfium/third_party/lcms
- )
- use system-openjpeg || keeplibs+=(
- third_party/pdfium/third_party/libopenjpeg
- )
- keeplibs+=(
- third_party/pdfium/third_party/libtiff
- third_party/perfetto
- third_party/perfetto/protos/third_party/android
- third_party/perfetto/protos/third_party/chromium
- third_party/perfetto/protos/third_party/pprof
- third_party/perfetto/protos/third_party/primes
- third_party/perfetto/protos/third_party/simpleperf
- third_party/pffft
- third_party/ply
- third_party/polymer
- third_party/private_membership
- third_party/private-join-and-compute
- third_party/protobuf
- third_party/protobuf/third_party/utf8_range
- third_party/pthreadpool
- third_party/puffin
- third_party/pyjson5
- third_party/pyyaml
- third_party/rapidhash
- third_party/readability
- third_party/rnnoise
- third_party/rust
- third_party/ruy
- third_party/s2cellid
- third_party/search_engines_data
- third_party/securemessage
- third_party/selenium-atoms
- third_party/sentencepiece
- third_party/sentencepiece/src/third_party/darts_clone
- third_party/shell-encryption
- third_party/simdutf
- third_party/simplejson
- third_party/six
- third_party/skia
- third_party/skia/include/third_party/vulkan
- third_party/smhasher
- )
- use system-snappy || keeplibs+=(
- third_party/snappy
- )
- keeplibs+=(
- third_party/spirv-headers
- third_party/spirv-tools
- third_party/sqlite
- third_party/swiftshader
- third_party/swiftshader/third_party/astc-encoder
- third_party/swiftshader/third_party/llvm-subzero
- third_party/swiftshader/third_party/marl
- third_party/swiftshader/third_party/SPIRV-Headers/include/spirv
- third_party/swiftshader/third_party/SPIRV-Tools
- third_party/swiftshader/third_party/subzero
- third_party/tensorflow_models
- third_party/tensorflow-text
- third_party/tflite
- third_party/tflite/src/third_party/fft2d
- third_party/tflite/src/third_party/xla/third_party/tsl
- third_party/tflite/src/third_party/xla/xla/tsl/framework
- third_party/tflite/src/third_party/xla/xla/tsl/lib/random
- third_party/tflite/src/third_party/xla/xla/tsl/platform
- third_party/tflite/src/third_party/xla/xla/tsl/protobuf
- third_party/tflite/src/third_party/xla/xla/tsl/util
- third_party/ukey2
- third_party/utf
- third_party/vulkan
- third_party/wayland
- third_party/webdriver
- third_party/webgpu-cts
- third_party/webrtc
- third_party/webrtc/common_audio/third_party/ooura
- third_party/webrtc/common_audio/third_party/spl_sqrt_floor
- third_party/webrtc/modules/third_party/fft
- third_party/webrtc/modules/third_party/g711
- third_party/webrtc/modules/third_party/g722
- third_party/widevine
- )
- use system-woff2 || keeplibs+=(
- third_party/woff2
- )
- keeplibs+=(
- third_party/wuffs
- third_party/x11proto
- third_party/xcbproto
- third_party/xnnpack
- third_party/zlib/google
- third_party/zxcvbn-cpp
- url/third_party/mozilla
- v8/third_party/glibc
- v8/third_party/inspector_protocol
- v8/third_party/rapidhash-v8
- v8/third_party/siphash
- v8/third_party/utf8-decoder
- v8/third_party/v8
- v8/third_party/valgrind
-
- # gyp -> gn leftovers
- third_party/speech-dispatcher
- third_party/usb_ids
- )
-
- if use test; then
- keeplibs+=(
- third_party/breakpad/breakpad/src/processor
- third_party/fuzztest
- third_party/google_benchmark/src/include/benchmark
- third_party/google_benchmark/src/src
- third_party/test_fonts
- third_party/test_fonts/fontconfig
- third_party/test_fonts/test_fonts
- )
- fi
-
- # USE=system-*
- if ! use system-harfbuzz; then
- keeplibs+=( third_party/harfbuzz )
- fi
-
- if ! use system-ffmpeg; then
- keeplibs+=( third_party/ffmpeg third_party/opus )
- fi
-
- if ! use system-icu; then
- keeplibs+=( third_party/icu )
- fi
-
- if ! use system-zstd; then
- keeplibs+=( third_party/zstd )
- fi
-
- if ! use system-av1; then
- keeplibs+=(
- third_party/dav1d
- third_party/libaom
- third_party/libaom/source/libaom/third_party/fastfeat
- third_party/libaom/source/libaom/third_party/vector
- third_party/libaom/source/libaom/third_party/x86inc
- )
- fi
-
- if use libcxx; then
- keeplibs+=(
- third_party/libc++
- third_party/llvm-libc
- )
- fi
-
- if ! use system-openh264; then
- keeplibs+=( third_party/openh264 )
- fi
-
- if ! use system-re2; then
- keeplibs+=( third_party/re2 )
- fi
-
- # Arch-specific
- if use arm64 || use ppc64 ; then
- keeplibs+=( third_party/swiftshader/third_party/llvm-10.0 )
- fi
- # we need to generate ppc64 stuff because upstream does not ship it yet
- # it has to be done before unbundling.
- if use ppc64; then
- pushd third_party/libvpx >/dev/null || die
- mkdir -p source/config/linux/ppc64 || die
- # requires git and clang, bug #832803
- # Revert https://chromium.googlesource.com/chromium/src/+/b463d0f40b08b4e896e7f458d89ae58ce2a27165%5E%21/third_party/libvpx/generate_gni.sh
- # and https://chromium.googlesource.com/chromium/src/+/71ebcbce867dd31da5f8b405a28fcb0de0657d91%5E%21/third_party/libvpx/generate_gni.sh
- # since we're not in a git repo
- sed -i -e "s|^update_readme||g; s|clang-format|${EPREFIX}/bin/true|g; /^git -C/d; /git cl/d; /cd \$BASE_DIR\/\$LIBVPX_SRC_DIR/ign format --in-place \$BASE_DIR\/BUILD.gn\ngn format --in-place \$BASE_DIR\/libvpx_srcs.gni" \
- generate_gni.sh || die
- ./generate_gni.sh || die
- popd >/dev/null || die
-
- pushd third_party/ffmpeg >/dev/null || die
- cp libavcodec/ppc/h264dsp.c libavcodec/ppc/h264dsp_ppc.c || die
- cp libavcodec/ppc/h264qpel.c libavcodec/ppc/h264qpel_ppc.c || die
- popd >/dev/null || die
- fi
-
- # Sanity check keeplibs, on major version bumps it is often necessary to update this list
- # and this enables us to hit them all at once.
- # There are some entries that need to be whitelisted (TODO: Why? The file is understandable, the rest seem odd)
- whitelist_libs=(
- net/third_party/quic
- third_party/devtools-frontend/src/front_end/third_party/additional_readme_paths.json
- third_party/libjingle
- third_party/mesa
- third_party/skia/third_party/vulkan
- third_party/vulkan
- )
- local not_found_libs=()
- for lib in "${keeplibs[@]}"; do
- if [[ ! -d "${lib}" ]] && ! has "${lib}" "${whitelist_libs[@]}"; then
- not_found_libs+=( "${lib}" )
- fi
- done
-
- if [[ ${#not_found_libs[@]} -gt 0 ]]; then
- ewarn "The following \`keeplibs\` directories were not found in the source tree:"
- for lib in "${not_found_libs[@]}"; do
- ewarn " ${lib}"
- done
- fi
-
- keeplibs+=( third_party/ungoogled )
-
- # Remove most bundled libraries. Some are still needed.
- einfo "Unbundling third-party libraries ..."
- build/linux/unbundle/remove_bundled_libraries.py "${keeplibs[@]}" --do-remove || die
-
- # Interferes with our bundled clang path; we don't want stripped binaries anyway.
- sed -i -e 's|${clang_base_path}/bin/llvm-strip|/bin/true|g' \
- -e 's|${clang_base_path}/bin/llvm-objcopy|/bin/true|g' \
- build/linux/strip_binary.gni || die
-}
-
-src_configure() {
- # Calling this here supports resumption via FEATURES=keepwork
- python_setup
-
- # 974899: sometimes people try to build with a non-Unicode locale and python gets very upset
- python_export_utf8_locale || die "Chromium builds require a UTF-8 locale."
-
- # Bug 491582.
- export TMPDIR="${WORKDIR}/temp"
- mkdir -p -m 755 "${TMPDIR}" || die
-
- # https://bugs.gentoo.org/654216
- addpredict /dev/dri/ #nowarn
-
- # Use system-provided libraries.
- # TODO: freetype -- remove sources (https://bugs.chromium.org/p/pdfium/issues/detail?id=733).
- # TODO: use_system_hunspell (upstream changes needed).
- # TODO: use_system_protobuf (bug #525560).
- # TODO: use_system_sqlite (http://crbug.com/22208).
-
- # libevent: https://bugs.gentoo.org/593458
- local gn_system_libraries=(
- flac
- fontconfig
- freetype
- libjpeg
- libwebp
- libxml
- libxslt
- zlib
- )
- if use system-abseil-cpp; then
- gn_system_libraries+=(
- absl_algorithm
- absl_base
- absl_cleanup
- absl_container
- absl_crc
- absl_debugging
- absl_flags
- absl_functional
- absl_hash
- absl_log
- absl_log_internal
- absl_memory
- absl_meta
- absl_numeric
- absl_random
- absl_status
- absl_strings
- absl_synchronization
- absl_time
- absl_types
- absl_utility
- )
- fi
- if use system-brotli; then
- gn_system_libraries+=( brotli )
- fi
- if use system-crc32c; then
- gn_system_libraries+=( crc32c )
- fi
- if use system-double-conversion; then
- gn_system_libraries+=( double-conversion )
- fi
- if use system-woff2; then
- gn_system_libraries+=( woff2 )
- fi
- if use nvidia; then
- gn_system_libraries+=( libXNVCtrl )
- fi
- if use system-ffmpeg; then
- gn_system_libraries+=( ffmpeg opus )
- fi
- if use system-jsoncpp; then
- gn_system_libraries+=( jsoncpp )
- fi
- if use system-icu; then
- gn_system_libraries+=( icu )
- fi
- if use system-zstd; then
- gn_system_libraries+=( zstd )
- fi
- if use system-av1; then
- gn_system_libraries+=( dav1d libaom )
- fi
- if use system-libusb; then
- gn_system_libraries+=( libusb )
- fi
- if use system-libvpx; then
- gn_system_libraries+=( libvpx )
- fi
- use system-openh264 && gn_system_libraries+=(
- openh264
- )
- use system-re2 && gn_system_libraries+=(
- re2
- )
- use system-snappy && gn_system_libraries+=(
- snappy
- )
-
- build/linux/unbundle/replace_gn_files.py --system-libraries "${gn_system_libraries[@]}" ||
- die "Failed to replace GN files for system libraries"
-
- # TODO 131: The above call clobbers `enable_freetype = true` in the freetype gni file
- # drop the last line, then append the freetype line and a new curly brace to end the block
- local freetype_gni="build/config/freetype/freetype.gni"
- sed -i -e '$d' ${freetype_gni} || die
- echo " enable_freetype = true" >> ${freetype_gni} || die
- echo "}" >> ${freetype_gni} || die
-
- if use !custom-cflags; then
- replace-flags "-Os" "-O2"
- strip-flags
- # Debug info section overflows without component build
- # Prevent linker from running out of address space, bug #471810 .
- filter-flags "-g*"
- # 949123: Several multimedia components explicitly build with specific CFLAGS and
- # use runtime detection to enable optimisations; unfortunately any of our CFLAGS are suffixed
- # to the end of the command line, which causes build failures.
- fi
- # Since M150 `skia` will begin breaking for x86_64 due to compilation of `avx512` code paths;
- # we need to filter these for all arches.
- filter-flags "-march*" "-mtune*" "-mcpu*"
-
- # We don't use the same clang version as upstream, and with -Werror
- # we need to make sure that we don't get superfluous warnings.
- append-flags -Wno-unknown-warning-option
- if tc-is-cross-compiler; then # can you cross-compile with the bundled toolchain?
- export BUILD_CXXFLAGS+=" -Wno-unknown-warning-option"
- export BUILD_CFLAGS+=" -Wno-unknown-warning-option"
- fi
-
- # Start building our GN options
- local myconf_gn=() # Tip: strings must be quoted, bools or numbers are fine
-
- if use !bundled-toolchain; then
- # We already forced the "correct" clang via pkg_setup
-
- if tc-is-cross-compiler; then
- CC="${CC} -target ${CHOST} --sysroot ${ESYSROOT}"
- CXX="${CXX} -target ${CHOST} --sysroot ${ESYSROOT}"
- BUILD_AR=${AR}
- BUILD_CC=${CC}
- BUILD_CXX=${CXX}
- BUILD_NM=${NM}
- fi
-
- # Make sure the build system will use the right tools, bug #340795.
- tc-export AR CC CXX NM
-
- strip-unsupported-flags
- append-ldflags -Wl,--undefined-version # https://bugs.gentoo.org/918897#c32
-
- myconf_gn+=(
- "is_clang=true"
- "clang_use_chrome_plugins=false"
- "use_clang_modules=false" # M141 enables this for the linux platform by default.
- 'custom_toolchain="//build/toolchain/linux/unbundle:default"'
- # From M127 we need to provide a location for libclang and the clang resource dir so that bindgen can find them
- "bindgen_libclang_path=\"$(get_llvm_prefix)/$(get_libdir)\""
- "bindgen_clang_resource_dir=\"${EPREFIX}/usr/lib/clang/${LLVM_SLOT}/include\""
- "bindgen_extra_clang_args=[\"-I${EPREFIX}/usr/lib/clang/${LLVM_SLOT}/include\"]"
- "clang_base_path=\"${EPREFIX}/usr/lib/clang/${LLVM_SLOT}/\""
- "rust_bindgen_root=\"${EPREFIX}/usr/\""
- "rust_sysroot_absolute=\"$(get_rust_prefix)\""
- "rustc_version=\"${RUST_SLOT}\""
- )
-
- # Currently disabled, runtime issues with mold
- #if tc-ld-is-mold; then
- # myconf_gn+=(
- # "use_mold=true"
- # "use_lld=false"
- # "linker_path=\"${EPREFIX}/usr/bin/mold\""
- # )
- #else
- myconf_gn+=( "use_lld=true" )
- #fi
-
- if [[ ${LLVM_SLOT} -lt 23 ]]; then
- # Workaround for -fsanitize-ignore-for-ubsan-feature (added in LLVM 23)
- myconf_gn+=( 'clang_has_ubsan_feature_ignore=false' )
- fi
-
- if ! tc-is-cross-compiler; then
- myconf_gn+=( 'host_toolchain="//build/toolchain/linux/unbundle:default"' )
- else
- tc-export BUILD_{AR,CC,CXX,NM}
- myconf_gn+=(
- 'host_toolchain="//build/toolchain/linux/unbundle:host"'
- 'v8_snapshot_toolchain="//build/toolchain/linux/unbundle:host"'
- "host_pkg_config=\"$(tc-getBUILD_PKG_CONFIG)\""
- "pkg_config=\"$(tc-getPKG_CONFIG)\""
- )
-
- # setup cups-config, build system only uses --libs option
- if use cups; then
- mkdir "${T}/cups-config" || die
- cp "${ESYSROOT}/usr/bin/${CHOST}-cups-config" "${T}/cups-config/cups-config" || die
- export PATH="${PATH}:${T}/cups-config"
- fi
-
- # Don't inherit PKG_CONFIG_PATH from environment
- local -x PKG_CONFIG_PATH=
- fi
-
- fi # !bundled-toolchain
-
- local myarch
- myarch="$(tc-arch)"
- case ${myarch} in
- amd64)
- # Bug 530248, 544702, 546984, 853646.
- use !custom-cflags && filter-flags -mno-mmx -mno-sse2 -mno-ssse3 -mno-sse4.1 \
- -mno-avx -mno-avx2 -mno-fma -mno-fma4 -mno-xop -mno-sse4a
- myconf_gn+=( 'target_cpu="x64"' )
- ;;
- x86)
- # Bug 530248, 544702, 546984, 853646.
- use !custom-cflags && filter-flags -mno-mmx -mno-sse2 -mno-ssse3 -mno-sse4.1 \
- -mno-avx -mno-avx2 -mno-fma -mno-fma4 -mno-xop -mno-sse4a
- myconf_gn+=( 'target_cpu="x86"' )
- ;;
- arm64)
- myconf_gn+=( 'target_cpu="arm64"' )
- ;;
- ppc64)
- myconf_gn+=( 'target_cpu="ppc64"' )
- ;;
- *)
- die "Failed to determine target arch, got '${myarch}'."
- ;;
- esac
-
- # Common options
-
- myconf_gn+=(
- # Disable code formating of generated files
- "blink_enable_generated_code_formatting=false"
- # enable DCHECK with USE=debug only, increases chrome binary size by 30%, bug #811138.
- # DCHECK is fatal by default, make it configurable at runtime, #bug 807881.
- "dcheck_always_on=$(usex debug true false)"
- "dcheck_is_configurable=$(usex debug true false)"
- # Chromium builds provided by Linux distros should disable the testing config
- "disable_fieldtrial_testing_config=true"
- # Custom patch: Enable building Chromium as individual channels (e.g. stable, beta, dev) that
- # use different profile directories, desktop entries, etc. This enables slotting the ebuild.
- "enable_channel_branding=true"
- # 131 began laying the groundwork for replacing freetype with
- # "Rust-based Fontations set of libraries plus Skia path rendering"
- # We now need to opt-in
- "enable_freetype=true"
- "enable_hangout_services_extension=$(usex hangouts true false)"
- # Don't need nocompile checks and GN crashes with our config (verify with modern GN)
- "enable_nocompile_tests=false"
- # pseudolocales are only used for testing
- "enable_pseudolocales=false"
- "enable_widevine=$(usex widevine true false)"
- # Disable fatal linker warnings, bug 506268.
- "fatal_linker_warnings=false"
- # Component build isn't generally intended for use by end users. It's mostly useful
- # for development and debugging.
- "is_component_build=false"
- # GN needs explicit config for Debug/Release as opposed to inferring it from build directory.
- "is_debug=false"
- "is_official_build=$(usex official true false)"
- # Enable ozone wayland and/or headless support
- "ozone_auto_platforms=false"
- "ozone_platform_headless=true"
- # Enables building without non-free unRAR licence
- "safe_browsing_use_unrar=false"
- # "thin_lto_enable_optimizations=${use_lto}"
- "treat_warnings_as_errors=false"
- # Use in-tree libc++ (buildtools/third_party/libc++ and buildtools/third_party/libc++abi)
- # instead of the system C++ library for C++ standard library support.
- # default: true, but let's be explicit (forced since 120 ; USE removed 127).
- "use_custom_libcxx=true"
- # Enable ozone wayland and/or headless support
- "use_ozone=true"
- # The sysroot is the oldest debian image that chromium supports, we don't need it
- "use_sysroot=false"
- # See dependency logic in third_party/BUILD.gn
- "use_system_harfbuzz=$(usex system-harfbuzz true false)"
- # "use_thin_lto=${use_lto}"
- # Only enabled for clang, but gcc has endian macros too
- "v8_use_libm_trig_functions=true"
- # use system go
- "tint_use_system_go=true"
- )
-
- myconf_gn+=( "enable_iterator_debugging=$(usex debug true false)" )
-
- if use debug; then
- myconf_gn+=(
- "symbol_level=2"
- "blink_symbol_level=2"
- "v8_symbol_level=2"
- )
- else
- myconf_gn+=(
- "symbol_level=0"
- "blink_symbol_level=0"
- "v8_symbol_level=0"
- )
- fi
-
- if use bindist ; then
- myconf_gn+=(
- # If this is set to false Chromium won't be able to load any proprietary codecs
- # even if provided with an ffmpeg capable of h264/aac decoding
- "proprietary_codecs=true"
- 'ffmpeg_branding="Chrome"'
- # build ffmpeg as an external component (libffmpeg.so) that we can remove / substitute
- "is_component_ffmpeg=true"
- )
- else
- myconf_gn+=(
- "proprietary_codecs=$(usex proprietary-codecs true false)"
- "ffmpeg_branding=\"$(usex proprietary-codecs Chrome Chromium)\""
- )
- fi
-
- if use headless; then
- myconf_gn+=(
- "enable_print_preview=false"
- "enable_remoting=false"
- 'ozone_platform="headless"'
- "rtc_use_pipewire=false"
- "use_alsa=false"
- "use_cups=false"
- "use_gio=false"
- "use_glib=false"
- "use_gtk=false"
- "use_kerberos=false"
- "use_libpci=false"
- "use_pangocairo=false"
- "use_pulseaudio=false"
- "use_qt5=false"
- "use_qt6=false"
- "use_udev=false"
- "use_vaapi=false"
- "use_xkbcommon=false"
- )
- else
- myconf_gn+=(
- "gtk_version=$(usex gtk4 4 3)"
- # link pulseaudio directly (DT_NEEDED) instead of using dlopen.
- # helps with automated detection of ABI mismatches and prevents silent errors.
- "link_pulseaudio=$(usex pulseaudio true false)"
- "ozone_platform_wayland=$(usex wayland true false)"
- "ozone_platform_x11=$(usex X true false)"
- "ozone_platform=\"$(usex wayland wayland x11)\""
- "rtc_use_pipewire=$(usex screencast true false)"
- # As above - link directly instead of dlopening
- "rtc_link_pipewire=$(usex screencast true false)"
- "use_cups=$(usex cups true false)"
- "use_kerberos=$(usex kerberos true false)"
- "use_pulseaudio=$(usex pulseaudio true false)"
- "use_qt5=false"
- "use_system_libffi=$(usex wayland true false)"
- "use_system_minigbm=true"
- "use_vaapi=$(usex vaapi true false)"
- "use_xkbcommon=true"
- )
- if use qt6; then
- local cbuild_libdir
- cbuild_libdir="$(get_libdir)"
- if tc-is-cross-compiler; then
- # Hack to workaround get_libdir not being able to handle CBUILD, bug #794181
- cbuild_libdir="$($(tc-getBUILD_PKG_CONFIG) --keep-system-libs --libs-only-L libxslt)"
- cbuild_libdir="${cbuild_libdir:2}"
- cbuild_libdir="${cbuild_libdir/% }"
- fi
- myconf_gn+=(
- "use_qt6=true"
- "moc_qt6_path=\"${EPREFIX}/usr/${cbuild_libdir}/qt6/libexec\""
- )
- else
- myconf_gn+=( "use_qt6=false" )
- fi
- fi
-
- # Explicitly disable ICU data file support for system-icu/headless builds.
- if use system-icu || use headless; then
- myconf_gn+=( "icu_use_data_file=false" )
- fi
-
- if use official; then
- # Allow building against system libraries in official builds
- sed -i 's/OFFICIAL_BUILD/GOOGLE_CHROME_BUILD/' \
- tools/generate_shim_headers/generate_shim_headers.py || die
- # Don't add symbols to build
- myconf_gn+=( "symbol_level=0" )
- fi
-
- if use pgo; then
- myconf_gn+=(
- "chrome_pgo_phase=2"
- "v8_enable_builtins_optimization=true"
- )
- else
- myconf_gn+=( "chrome_pgo_phase=0" )
- fi
-
- # Odds and ends
-
- # skipping typecheck is only supported on amd64, bug #876157
- if ! use amd64; then
- myconf_gn+=( "devtools_skip_typecheck=false" )
- fi
-
- # Disable external code space for V8 for ppc64. It is disabled for ppc64
- # by default, but cross-compiling on amd64 enables it again.
- if tc-is-cross-compiler && use ppc64; then
- myconf_gn+=( "v8_enable_external_code_space=false" )
- fi
-
- # This determines whether or not GN uses the bundled libcxx
- if use libcxx; then
- myconf_gn+=( "use_custom_libcxx=true" )
- else
- myconf_gn+=(
- "use_custom_libcxx=false"
- "use_llvm_libatomic=false"
- )
- append-cppflags -U_GLIBCXX_ASSERTIONS #See #318
- fi
-
- myconf_gn+=( "use_bluez=$(usex bluetooth true false)" )
-
- myconf_gn+=( "is_cfi=$(usex cfi true false)" )
-
- if use cfi; then
- myconf_gn+=(
- "use_cfi_icall=true"
- "use_cfi_cast=true"
- )
- fi
-
- myconf_gn+=(
- "optimize_webui=$(usex optimize-webui true false)"
- "use_system_freetype=$(usex system-harfbuzz true false)"
- "use_system_libopenjpeg2=$(usex system-openjpeg true false)"
- "enable_pdf=true"
- "use_system_lcms2=true"
- "enable_print_preview=true"
- "use_thin_lto=$(usex thinlto true false)"
- "thin_lto_enable_optimizations=$(usex optimize-thinlto true false)"
-
- # Ungoogled flags
- "build_with_tflite_lib=false"
- "enable_mdns=false"
- "enable_mse_mpeg2ts_stream_parser=$(usex proprietary-codecs true false)"
- "enable_remoting=false"
- "enable_reporting=false"
- "enable_service_discovery=false"
- "exclude_unwind_tables=true"
- "google_api_key=\"\""
- "google_default_client_id=\"\""
- "google_default_client_secret=\"\""
- "safe_browsing_mode=0"
- "use_official_google_api_keys=false"
- "use_unofficial_version_number=false"
-
- # "enable_swiftshader=false"
-
- # Additional flags
- # "perfetto_use_system_zlib=true"
- # "use_system_zlib=true"
- # "use_system_libjpeg=true"
- # "rtc_build_examples=false"
- # "enable_chromium_prelude=false"
- # "enable_updater=false"
- # "enable_update_notifications=false"
- # "enable_constraints=false"
- # "rtc_rusty_base64=false"
- # "v8_enable_temporal_support=false"
- # "media_use_symphonia=false"
- # "pdf_enable_rust_png=false"
- # "skia_use_libpng_encode=true"
- # "skia_use_libpng_decode=true"
- # "skia_use_rust_png_decode=false"
- # "skia_use_rust_png_encode=false"
- # "enable_jxl_decoder=false"
- )
-
- if use amd64 || use arm64; then
- myconf_gn+=(
- "v8_drumbrake_bounds_checks=true"
- # "v8_enable_drumbrake=true"
- )
- fi
-
- if use thinlto; then
- # We need to change the default value of import-instr-limit in
- # LLVM to limit the text size increase. The default value is
- # 100, and we change it to 30 to reduce the text size increase
- # from 25% to 10%. The performance number of page_cycler is the
- # same on two of the thinLTO configurations, we got 1% slowdown
- # on speedometer when changing import-instr-limit from 100 to 30.
- # append-ldflags "-Wl,-plugin-opt,-import-instr-limit=30"
- sed -i '/import_instr_limit = 5/{s++import_instr_limit = 30+;h};${x;/./{x;q0};x;q1}' \
- build/config/compiler/BUILD.gn || die
-
- append-ldflags "-Wl,--thinlto-jobs=$(makeopts_jobs)"
- fi
-
- # Facilitate deterministic builds (taken from build/config/compiler/BUILD.gn)
- append-cflags -Wno-builtin-macro-redefined
- append-cxxflags -Wno-builtin-macro-redefined
- append-cppflags "-D__DATE__= -D__TIME__= -D__TIMESTAMP__="
-
- local flags
- einfo "Building with the following compiler settings:"
- for flags in C{C,XX} AR NM RANLIB {C,CXX,CPP,LD}FLAGS \
- EXTRA_GN UGC_{SKIP_{PATCHES,SUBSTITUTION},KEEP_BINARIES} ; do
- einfo " ${flags} = \"${!flags}\""
- done
-
- # Since we build from tarballs, we need to set the channel here so that it can be used in the build.
- export CHROME_VERSION_EXTRA="${SLOT}"
-
- einfo "Configuring Chromium ..."
- # add a `-v` here if gn `hangs` to see which file it's getting stuck on.
- set -- gn gen --args="${myconf_gn[*]}${EXTRA_GN:+ ${EXTRA_GN}}" out/Release
- echo "$@"
- "$@" || die "Failed to configure Chromium"
-
- # The "if" below should not be executed unless testing
- if [ ! -z "${NODIE}" ]; then
- # List all args
- # gn args --list out/Release
-
- # Quick compiler check
- eninja -C out/Release protoc torque
- fi
-}
-
-src_compile() {
- # Final link uses lots of file descriptors.
- ulimit -n 2048
-
- # Calling this here supports resumption via FEATURES=keepwork
- python_setup
-
- # I hate doing this but upstream Rust have yet to come up with a better solution for
- # us poor packagers. Required for Split LTO units, which are required for CFI.
- export RUSTC_BOOTSTRAP=1
-
- # Don't inherit PYTHONPATH from environment, bug #789021, #812689
- local -x PYTHONPATH=
-
- # Build mksnapshot and pax-mark it.
- if use pax-kernel; then
- local x
- for x in mksnapshot v8_context_snapshot_generator code_cache_generator; do
- if tc-is-cross-compiler; then
- eninja -C out/Release "host/${x}"
- pax-mark m "out/Release/host/${x}"
- else
- eninja -C out/Release "${x}"
- pax-mark m "out/Release/${x}"
- fi
- done
- fi
-
- # Even though ninja autodetects number of CPUs, we respect
- # user's options, for debugging with -j 1 or any other reason.
- eninja -C out/Release chrome chrome_sandbox $(use test && echo "base_unittests")
-
- pax-mark m out/Release/chrome
-
- # This codepath does minimal patching, so we're at the mercy of upstream
- # CFLAGS. This is fine - we're not intending to force this on users
- # and we do a lot of flag 'management' anyway.
- if use bundled-toolchain; then
- QA_FLAGS_IGNORED="
- usr/lib64/chromium-browser/chrome
- usr/lib64/chromium-browser/chrome-sandbox
- usr/lib64/chromium-browser/chromedriver
- usr/lib64/chromium-browser/chrome_crashpad_handler
- usr/lib64/chromium-browser/libEGL.so
- usr/lib64/chromium-browser/libGLESv2.so
- usr/lib64/chromium-browser/libVkICD_mock_icd.so
- usr/lib64/chromium-browser/libVkLayer_khronos_validation.so
- usr/lib64/chromium-browser/libqt6_shim.so
- usr/lib64/chromium-browser/libvk_swiftshader.so
- usr/lib64/chromium-browser/libvulkan.so.1
- "
- fi
-
- use convert-dict && eninja -C out/Release convert_dict
-
- use enable-driver && eninja -C out/Release chromedriver
- #use suid && eninja -C out/Release chrome_sandbox
-
- # use enable-driver && mv out/Release/chromedriver{.unstripped,}
-
- rm -f out/Release/locales/*.pak.info || die
-
- # Generate support files (desktop file, manpage, etc.) See: #684550 #706786 #968958
- ${EPYTHON} "${FILESDIR}/generate-support-files.py" \
- --installdir "/usr/$(get_libdir)/ungoogled-chromium-browser" \
- --channel "${SLOT}" ||
- die "Failed to generate support files"
-}
-
-src_test() {
- # Tests may be flaky with usersandbox, and the test runner executes significantly faster without.
- # If you seem to be excluding too many tests for a particular milestone: comment them out, reboot, and
- # run the tests again. If that doesn't help, try FEATURES="-usersandbox" and send it because obviously the
- # chromium gods are not smiling upon you today. Do some runtime testing, obvs.
- local skip_tests=(
- # Wildcard exclusions (if all tests in a test suite are broken)
- 'AlternateTestParams/PartitionAllocDeathTest.RepeatedAllocReturnNullDirect/*'
- 'AlternateTestParams/PartitionAllocDeathTest.RepeatedReallocReturnNullDirect/*'
- 'AlternateTestParams/PartitionAllocTest.*' # 200+ tests, >= 1 crashes entire test runner with usersandbox.
- 'CheckExitCodeAfterSignalHandlerDeathTest.*'
- 'CriticalProcessAndThreadSpotChecks/HangWatcherAnyCriticalThreadTests.*'
- 'LazyThreadPoolTaskRunnerEnvironmentTest.*' # M142
- 'ToolsSanityTest.BadVirtualCall*'
- # requires en-us locale
- SysStrings.SysNativeMBAndWide
- SysStrings.SysNativeMBToWide
- SysStrings.SysWideToNativeMB
- # Specific test cases
- CancelableEventTest.BothCancelFailureAndSucceedOccurUnderContention
- FilePathTest.FromUTF8Unsafe_And_AsUTF8Unsafe
- HistogramTesterTest.PumaTestUniqueSample
- ImmediateCrashTest.ExpectedOpcodeSequence # M150
- PathServiceTest.CheckedGetFailure
- PlatformThreadTest.CanChangeThreadType
- RawPtrTest.SetLookupUsesGetForComparison # M146 ; also broken for alpine in M144.
- RustLogIntegrationTest.CheckAllSeverity
- StackCanary.ChangingStackCanaryCrashesOnReturn
- StackTraceDeathTest.StackDumpSignalHandlerIsMallocFree
- TestLauncherTools.TruncateSnippetFocusedMatchesFatalMessagesTest
- ThreadPoolEnvironmentConfig.CanUseBackgroundPriorityForWorker
- DriveInfoTest.GetFileDriveInfo
-
- )
- local test_filter="-$(IFS=:; printf '%s' "${skip_tests[*]}")"
- # test-launcher-bot-mode enables parallelism and plain output
- # Check individual tests with --gtest_filter=<test you want> --single-process-tests
- ./out/Release/base_unittests --test-launcher-bot-mode \
- --test-launcher-jobs="$(get_makeopts_jobs)" \
- --gtest_filter="${test_filter}" || die "Tests failed!"
-}
-
-src_install() {
- local browser_suffix
- if [[ "${SLOT}" != "stable" ]]; then
- browser_suffix="-${SLOT}"
- else
- browser_suffix=""
- fi
- local CHROMIUM_HOME="/usr/$(get_libdir)/ungoogled-chromium-browser${browser_suffix}"
- exeinto "${CHROMIUM_HOME}"
- doexe out/Release/chrome
-
- #newexe out/Release/chrome_sandbox chrome-sandbox
- #fperms 4755 "${CHROMIUM_HOME}/chrome-sandbox"
-
- use enable-driver && doexe out/Release/chromedriver
-
- #* https://github.com/ungoogled-software/ungoogled-chromium/pull/3563
- doexe out/Release/chrome_crashpad_handler
-
- if use convert-dict; then
- newexe "${FILESDIR}/update-dicts.sh" update-dicts.sh
- doexe out/Release/convert_dict
- fi
-
- ozone_auto_session () {
- use X && use wayland && ! use headless && echo true || echo false
- }
-
- cat <<- EOF > "${D}${CHROMIUM_HOME}/chromium-launcher.sh" || die
- #!/bin/bash
- # Wrapper to launch slotted Chromium via the chromium-common launcher script.
- export CHROME_DESKTOP="ungoogled-chromium-browser${browser_suffix}.desktop"
- export CHROME_EXEC_NAME="ungoogled-chromium-browser${browser_suffix}"
- export CHROME_VERSION_EXTRA="${SLOT}"
- export CHROME_WRAPPER="\$(readlink -f "\$0")"
- export OZONE_AUTO_SESSION=$(ozone_auto_session)
-
- exec /usr/libexec/chromium/chromium-launcher.sh "\$@"
- EOF
-
- chmod 755 "${D}${CHROMIUM_HOME}/chromium-launcher.sh" || die
-
- # It is important that we name the target "chromium-browser",
- # xdg-utils expect it; bug #355517.
- dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/ungoogled-chromium-browser${browser_suffix}
- # keep the old symlink around for consistency
- dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/ungoogled-chromium${browser_suffix}
-
- use enable-driver && dosym "${CHROMIUM_HOME}/chromedriver" /usr/bin/ungoogled-chromedriver${browser_suffix}
-
- pushd out/Release/locales > /dev/null || die
- chromium_remove_language_paks
- popd > /dev/null || die
-
- insinto "${CHROMIUM_HOME}"
- doins out/Release/*.bin
- doins out/Release/*.pak
- doins -r out/Release/hyphen-data
-
- if use bindist; then
- # We built libffmpeg as a component library, but we can't distribute it
- # with proprietary codec support. Remove it and make a symlink to the requested
- # system library.
- rm -f out/Release/libffmpeg.so \
- || die "Failed to remove bundled libffmpeg.so (with proprietary codecs)"
- # symlink the libffmpeg.so from either ffmpeg-chromium or ffmpeg[chromium].
- einfo "Creating symlink to libffmpeg.so from $(usex ffmpeg-chromium ffmpeg-chromium ffmpeg[chromium])..."
- dosym ../chromium/libffmpeg.so$(usex ffmpeg-chromium .${PV%%\.*} "") \
- /usr/$(get_libdir)/ungoogled-chromium-browser/libffmpeg.so
- fi
-
- (
- shopt -s nullglob
- local files=(out/Release/*.so out/Release/*.so.[0-9])
- [[ ${#files[@]} -gt 0 ]] && doins "${files[@]}"
- )
-
- if ! use system-icu && ! use headless; then
- doins out/Release/icudtl.dat
- fi
-
- doins -r out/Release/locales
- #doins -r out/Release/MEIPreload
-
- # Install vk_swiftshader_icd.json; bug #827861
- doins out/Release/vk_swiftshader_icd.json
-
- if [[ -d out/Release/swiftshader ]]; then
- insinto "${CHROMIUM_HOME}/swiftshader"
- doins out/Release/swiftshader/*.so
- fi
-
- use widevine && dosym WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so "${CHROMIUM_HOME}/libwidevinecdm.so"
-
- # Install icons
- local branding size
- for size in 16 24 32 48 64 128 256 ; do
- case ${size} in
- 16|32) branding="chrome/app/theme/default_100_percent/chromium" ;;
- *) branding="chrome/app/theme/chromium" ;;
- esac
- newicon -s ${size} "${branding}/product_logo_${size}.png" \
- ungoogled-chromium-browser${browser_suffix}.png
- done
-
- # Install desktop entry
- domenu out/Release/ungoogled-chromium-browser${browser_suffix}.desktop
-
- # Install GNOME default application entry (bug #303100).
- insinto /usr/share/gnome-control-center/default-apps
- doins out/Release/ungoogled-chromium-browser${browser_suffix}.xml
-
- # Install AppStream metadata
- insinto /usr/share/appdata
- doins out/Release/ungoogled-chromium-browser${browser_suffix}.appdata.xml
-
- # Install manpage; bug #684550
- doman out/Release/ungoogled-chromium-browser${browser_suffix}.1
- dosym ungoogled-chromium-browser${browser_suffix}.1 /usr/share/man/man1/ungoogled-chromium${browser_suffix}.1
-
- readme.gentoo_create_doc
-}
-
-pkg_postrm() {
- xdg_icon_cache_update
- xdg_desktop_database_update
-}
-
-pkg_postinst() {
- xdg_icon_cache_update
- xdg_desktop_database_update
- readme.gentoo_print_elog
-
- if use !headless && [[ -z "${REPLACING_VERSIONS}" ]]; then
- if use vaapi; then
- elog "Hardware-accelerated video decoding configuration:"
- elog
- elog "Chromium supports multiple backends for hardware acceleration. To enable one,"
- elog " Add to CHROMIUM_FLAGS in /etc/chromium/default:"
- elog
- elog "1. VA-API with OpenGL (recommended for most users):"
- elog " --enable-features=AcceleratedVideoDecodeLinuxGL"
- elog " VaapiVideoDecoder may need to be added as well, but try without first."
- elog
- if use wayland; then
- elog "2. Enhanced Wayland/EGL performance:"
- elog " --enable-features=AcceleratedVideoDecodeLinuxGL,AcceleratedVideoDecodeLinuxZeroCopyGL"
- elog
- fi
- if use X; then
- elog "$(usex wayland "3" "2"). VA-API with Vulkan:"
- elog " --enable-features=VaapiVideoDecoder,VaapiIgnoreDriverChecks,Vulkan,DefaultANGLEVulkan,VulkanFromANGLE"
- elog
- if use wayland; then
- elog " NOTE: Vulkan acceleration requires X11 and will not work under Wayland sessions."
- elog " Use OpenGL-based acceleration instead when running under Wayland."
- elog
- fi
- fi
- elog "Additional options:"
- elog " To enable hardware-accelerated encoding (if supported)"
- elog " add 'AcceleratedVideoEncoder' to your feature list"
- elog " VaapiIgnoreDriverChecks bypasses driver compatibility checks"
- elog " (may be needed for newer/unsupported hardware)"
- elog
- else
- elog "This Chromium build was compiled without VA-API support, which provides"
- elog "hardware-accelerated video decoding."
- fi
- if use screencast; then
- elog "Screencast is disabled by default at runtime. Either enable it"
- elog "by navigating to chrome://flags/#enable-webrtc-pipewire-capturer"
- elog "inside Chromium or add --enable-features=WebRTCPipeWireCapturer"
- elog "to CHROMIUM_FLAGS in /etc/chromium/default."
- elog
- elog "Additional setup may be required for screencasting to work."
- elog "See issue: https://github.com/PF4Public/gentoo-overlay/issues/314"
- fi
- if use gtk4; then
- elog "Chromium prefers GTK3 over GTK4 at runtime. To override this"
- elog "behaviour you need to pass --gtk-version=4, e.g. by adding it"
- elog "to CHROMIUM_FLAGS in /etc/chromium/default."
- fi
- if use widevine; then
- elog "widevine requires binary plugins, which are distributed separately"
- elog "Make sure you have www-plugins/chrome-binary-plugins installed"
- fi
- fi
-
- if systemd_is_booted && ! [[ -f "/etc/machine-id" ]]; then
- ewarn "The lack of an '/etc/machine-id' file on this system booted with systemd"
- ewarn "indicates that the Gentoo handbook was not followed to completion."
- ewarn ""
- ewarn "Chromium is known to behave unpredictably with this system configuration;"
- ewarn "please complete the configuration of this system before logging any bugs."
- fi
-
- # Stable slot doesn't change profile directory, and it's vanishingly unlikely that users will downgrade from dev.
- if [[ -n "${REPLACING_VERSIONS}" ]]; then
- local replacing_non_slotted=false
- # there could be more than one PVR
- for version in ${REPLACING_VERSIONS}; do
- if ver_test "${version}" -le "145.0.7632.116"; then
- replacing_non_slotted=true
- break
- fi
- done
- if ${replacing_non_slotted}; then
- ewarn "This version of Chromium has replaced a non-slotted ebuild."
- if [[ ${SLOT} != "stable" ]]; then
- ewarn "This channel has its own profile directory, so your existing profile will not be used."
- ewarn "To use your existing profile, either copy or move it to the new location."
- ewarn "See https://wiki.gentoo.org/wiki/Chromium#Profile_Directories for more information."
- ewarn ""
- fi
- ewarn "Any existing Progressive Web Apps (PWAs) will need to be reinstalled,"
- ewarn "or have the path in the desktop files updated to point to the new wrapper script."
- fi
- fi
-}
-
-eapply_wrapper () {
- if [ ! -z "${NODIE}" ]; then
- nonfatal eapply "$@"
- else
- eapply "$@"
- fi
-}
-
-git_wrapper () {
- if [ ! -z "${NODIE}" ]; then
- git "$@"
- else
- git "$@" || die
- fi
-}
-
-filter_wrapper () {
- einfo "Applying ${i##*/}"
- #? fuzz factor of 3 is OK?
- if [ ! -z "${NODIE}" ]; then
- filterdiff -p1 "${@:2}" < "$1" | patch -F 3 -p1
- else
- filterdiff -p1 "${@:2}" < "$1" | patch -F 3 -p1 || die
- fi
-}
diff --git a/www-client/ungoogled-chromium/ungoogled-chromium-151.0.7922.173_p1.ebuild b/www-client/ungoogled-chromium/ungoogled-chromium-151.0.7922.173_p1.ebuild
deleted file mode 100644
index 5497146e43fb..000000000000
--- a/www-client/ungoogled-chromium/ungoogled-chromium-151.0.7922.173_p1.ebuild
+++ /dev/null
@@ -1,2564 +0,0 @@
-# Copyright 2009-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-# Use following environment variables to customise the build
-# EXTRA_GN — pass extra options to gn
-# NINJAOPTS="-k0 -j8" useful to populate ccache even if ebuild is still failing
-# UGC_SKIP_PATCHES — space-separated list of patches to skip
-# UGC_KEEP_BINARIES — space-separated list of binaries to keep
-# UGC_SKIP_SUBSTITUTION — space-separated list of files to skip domain substitution
-
-# USE=bundled-toolchain is intended for users who want to use the same toolchain
-# as the upstream releases. It's also a good fallback in case we fall behind
-# and need to get a release out quickly (less likely with `dev` in-tree).
-# We can't rely on it as a default since the toolchain is only shipped for x86-64;
-# other architectures will need to use system toolchain.
-
-# Since m133 we are using CI-generated tarballs from
-# https://github.com/chromium-linux-tarballs/chromium-tarballs/
-
-# These are bit-for-bit identical to the official releases, but are built
-# using an external CI system that we have some control over, in case
-# issues pop up again with official tarball generation.
-
-GN_MIN_VER=0.2374
-# chromium-tools/get-chromium-toolchain-strings.py (or just use Chromicler)
-# Node for M145+ should be 24.12.0 but that's not packaged in Gentoo yet. See #969145
-TEST_FONT="9c07d19d9c5ee1ff94f717e6fb17e0c8c354e6f9"
-BUNDLED_CLANG_VER="llvmorg-23-init-19482-g53d18800-1"
-BUNDLED_RUST_VER="b998449636a48e2c4a362809085b600a0174e1f2-2"
-RUST_SHORT_HASH=${BUNDLED_RUST_VER:0:10}-${BUNDLED_RUST_VER##*-}
-NODE_VER="24.16.0-r1"
-GO_MIN_VER="1.25.0"
-ESBUILD_VER="0.25.1"
-ROLLUP_VER="4.57.1" # currently manual.
-
-CHROMIUM_LANGS="af am ar as az be bg bn bs ca cs cy da de el en-GB es es-419 et eu fa fi fil
- fr fr-CA gl gu he hi hr hu hy id is it ja ka kk km kn ko ky lo lt lv mk ml mn mr ms my
- nb ne nl or pa pl pt-BR pt-PT ro ru si sk sl sq sr sr-Latn sv sw ta te th tr uk ur uz
- vi zh-CN zh-HK zh-TW zu"
-
-UGC_COMMIT_ID="4087f48e6d66e55486fe7c3a634303559634ba3f"
-# UGC_PR_COMMITS=(
-# c917e096342e5b90eeea91ab1f8516447c8756cf
-# 5794e9d12bf82620d5f24505798fecb45ca5a22d
-# )
-
-CROMITE_COMMIT_ID="69e841fd35cd92ce5fa1a336791c7989809e0f17"
-
-declare -A CHROMIUM_COMMITS=(
- # ["27f8690db999f6e56f0af7a9ea3d28a019ed72ca"]="." #152+
- ["-cf94ed446320d35c8613ed9b3ffb6e6a61bfcb5f"]="."
-# # ["-37c28a19804e47a68eabf3cf882a310689fc325b"]="." #disable style check for cromite
-# # ["cd5a0df905a28faa89ff2a4ab44f893f84dc4487"]="net/third_party/quiche/src"
-)
-
-LLVM_COMPAT=( 21 22 23 )
-PYTHON_COMPAT=( python3_{13..14} )
-PYTHON_REQ_USE="xml(+)"
-RUST_MIN_VER=1.91.0
-RUST_NEEDS_LLVM="yes please"
-RUST_OPTIONAL="yes" # Not actually optional, but we don't need system Rust (or LLVM) with USE=bundled-toolchain
-RUST_REQ_USE="rustfmt" # Upstream run rustfmt on bindgen output, so we need it to be available.
-
-inherit check-reqs chromium-2 desktop flag-o-matic llvm-r1 multiprocessing ninja-utils pax-utils
-inherit python-any-r1 readme.gentoo-r1 rust systemd toolchain-funcs xdg-utils
-
-DESCRIPTION="Modifications to Chromium for removing Google integration and enhancing privacy"
-HOMEPAGE="https://github.com/ungoogled-software/ungoogled-chromium"
-PPC64_HASH="7aae8a84e327fc2078ce1625c9c70bfda77d626f"
-PATCH_V="${PV%%\.*}-3"
-COPIUM_COMMIT="3c7e56fb4523b43b47595bb3a22f77178fc76293"
-SRC_URI="https://commondatastorage.googleapis.com/chromium-browser-official/chromium-${PV/_*}-lite.tar.xz
- https://deps.gentoo.zip/www-client/chromium/rollup-wasm-node-${ROLLUP_VER}.tgz
- https://gitlab.com/Matt.Jolly/chromium-patches/-/archive/${PATCH_V}/chromium-patches-${PATCH_V}.tar.bz2
- !bundled-toolchain? (
- https://codeberg.org/selfisekai/copium/archive/${COPIUM_COMMIT}.tar.gz
- -> chromium-patches-copium-${COPIUM_COMMIT:0:10}.tar.gz
- )
- bundled-toolchain? (
- https://commondatastorage.googleapis.com/chromium-browser-clang/Linux_x64/clang-${BUNDLED_CLANG_VER}.tar.xz
- -> chromium-clang-${BUNDLED_CLANG_VER}.tar.xz
- https://commondatastorage.googleapis.com/chromium-browser-clang/Linux_x64/rust-toolchain-${BUNDLED_RUST_VER}-${BUNDLED_CLANG_VER%-*}.tar.xz
- -> chromium-rust-toolchain-${RUST_SHORT_HASH}-${BUNDLED_CLANG_VER%-*}.tar.xz
- )
- test? (
- https://chromium-fonts.storage.googleapis.com/${TEST_FONT} -> chromium-testfonts-${TEST_FONT:0:10}.tar.gz
- )
- ppc64? (
- https://gitlab.raptorengineering.com/raptor-engineering-public/chromium/openpower-patches/-/archive/${PPC64_HASH}/openpower-patches-${PPC64_HASH}.tar.bz2 -> chromium-openpower-${PPC64_HASH:0:10}.tar.bz2
- )
-"
-
-# Gentoo tarball:
-# https://chromium-tarballs.distfiles.gentoo.org/chromium-${PV/_*}.tar.xz -> chromium-${PV/_*}-gentoo.tar.xz
-
-# chromium-linux-tarballs
-# https://github.com/chromium-linux-tarballs/chromium-tarballs/releases/download/${PV/_*}/chromium-${PV/_*}-linux.tar.xz
-
-# Official tarball:
-# https://commondatastorage.googleapis.com/chromium-browser-official/chromium-${PV/_*}${LITE_TARBALL:+-lite}.tar.xz
-
-# https://gitweb.gentoo.org/proj/chromium-tools.git/tree/get-chromium-licences.py @ 145.0.7632.76
-LICENSE="Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD BSD-2 Base64 Boost-1.0 CC-BY-3.0 CC-BY-4.0 Clear-BSD FFT2D FTL"
-LICENSE+=" IJG ISC LGPL-2 LGPL-2.1 MIT MPL-1.1 MPL-2.0 Ms-PL PSF-2 SGI-B-2.0 SSLeay SunSoft Unicode-3.0"
-LICENSE+=" Unicode-DFS-2015 Unlicense UoI-NCSA ZLIB libtiff openssl"
-LICENSE+=" cromite? ( GPL-3 )"
-
-SLOT="beta"
-KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
-
-IUSE_SYSTEM_LIBS="abseil-cpp av1 brotli crc32c double-conversion ffmpeg +harfbuzz icu jsoncpp +libusb libvpx +openh264 openjpeg re2 snappy woff2 +zstd"
-IUSE="+X bindist bluetooth bundled-toolchain cfi convert-dict cups custom-cflags debug ffmpeg-chromium enable-driver gtk4 hangouts headless kerberos +libcxx nvidia +official optimize-thinlto optimize-webui override-data-dir pax-kernel pgo"
-IUSE+=" +proprietary-codecs pulseaudio qt6 screencast selinux test thinlto cromite vaapi wayland widevine cpu_flags_ppc_vsx3"
-RESTRICT="
- !bindist? ( bindist )
- !test? ( test )
- arm64? ( test )
- !system-ffmpeg? ( proprietary-codecs? ( bindist ) )
- !system-openh264? ( bindist )
- cromite? ( bindist )"
-
-REQUIRED_USE="
- !headless? ( || ( X wayland ) )
- screencast? ( wayland )
- ffmpeg-chromium? ( bindist proprietary-codecs )
- optimize-thinlto? ( thinlto )
- cfi? ( thinlto )
- x86? ( !thinlto !widevine )
- debug? ( !official )
- vaapi? ( !system-av1 !system-libvpx )
-"
-
-UGC_PV="${PV/_p/-}"
-UGC_PF="${PN}-${UGC_PV}"
-UGC_URL="https://github.com/ungoogled-software/${PN}/archive/"
-
-if [ -z "$UGC_COMMIT_ID" ]; then
- UGC_URL="${UGC_URL}${UGC_PV}.tar.gz -> ${UGC_PF}.tar.gz"
- UGC_WD="${WORKDIR}/${UGC_PF}"
-else
- UGC_URL="${UGC_URL}${UGC_COMMIT_ID}.tar.gz -> ${PN}-${UGC_COMMIT_ID}.tar.gz"
- UGC_WD="${WORKDIR}/ungoogled-chromium-${UGC_COMMIT_ID}"
-fi
-
-SRC_URI+="${UGC_URL}
-"
-
-if [ ! -z "${UGC_PR_COMMITS[*]}" ]; then
- for i in "${UGC_PR_COMMITS[@]}"; do
- SRC_URI+="https://github.com/ungoogled-software/${PN}/commit/$i.patch?full_index=true -> ${PN}-$i.patch
- "
- done
-fi
-
-if [ ! -z "${CHROMIUM_COMMITS[*]}" ]; then
- # for i in "${CHROMIUM_COMMITS[@]}"; do
- for i in "${!CHROMIUM_COMMITS[@]}"; do
- if [[ ${CHROMIUM_COMMITS[$i]} =~ webrtc ]]; then
- #TODO: is it safe to use this mirror?
- SRC_URI+="https://github.com/webrtc-mirror/webrtc/commit/${i/-}.patch?full_index=true -> webrtc-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ angle ]]; then
- SRC_URI+="https://github.com/google/angle/commit/${i/-}.patch?full_index=true -> angle-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ quiche ]]; then
- SRC_URI+="https://github.com/google/quiche/commit/${i/-}.patch?full_index=true -> quiche-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ dawn ]]; then
- SRC_URI+="https://github.com/google/dawn/commit/${i/-}.patch?full_index=true -> dawn-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ perfetto ]]; then
- SRC_URI+="https://github.com/google/perfetto/commit/${i/-}.patch?full_index=true -> perfetto-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ink ]]; then
- SRC_URI+="https://github.com/google/ink/commit/${i/-}.patch?full_index=true -> ink-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ vulkan-utility-libraries ]]; then
- SRC_URI+="https://github.com/KhronosGroup/Vulkan-Utility-Libraries/commit/${i/-}.patch?full_index=true -> vulkan-utility-libraries-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ruy ]]; then
- SRC_URI+="https://github.com/google/ruy/commit/${i/-}.patch?full_index=true -> ruy-${i/-}.patch
- "
- else
- SRC_URI+="https://github.com/chromium/chromium/commit/${i/-}.patch?full_index=true -> chromium-${i/-}.patch
- "
- fi
- done
-fi
-
-SRC_URI+="cromite? ( https://github.com/uazo/cromite/archive/${CROMITE_COMMIT_ID}.tar.gz -> cromite-${CROMITE_COMMIT_ID}.tar.gz )
-"
-
-for i in ${IUSE_SYSTEM_LIBS}; do
- [[ $i =~ ^(\+)?(.*)$ ]]
- IUSE+=" ${BASH_REMATCH[1]}system-${BASH_REMATCH[2]}"
-done
-
-COMMON_X_DEPEND="
- x11-libs/libXcomposite:=
- x11-libs/libXcursor:=
- x11-libs/libXdamage:=
- x11-libs/libXfixes:=
- >=x11-libs/libXi-1.6.0:=
- x11-libs/libXrandr:=
- x11-libs/libXrender:=
- x11-libs/libXtst:=
- x11-libs/libxshmfence:=
-"
-
-# sys-libs/zlib: https://bugs.gentoo.org/930365; -ng is not compatible.
-# We _could_ use the bundled minizip, but that's against policy.
-COMMON_SNAPSHOT_DEPEND="
- system-icu? ( >=dev-libs/icu-78:= )
- system-abseil-cpp? ( >=dev-cpp/abseil-cpp-20260107.0 )
- system-brotli? ( >=app-arch/brotli-9999 )
- system-crc32c? ( dev-libs/crc32c )
- system-double-conversion? ( dev-libs/double-conversion )
- system-woff2? ( media-libs/woff2 )
- system-snappy? ( app-arch/snappy )
- system-jsoncpp? ( dev-libs/jsoncpp )
- system-openjpeg? ( media-libs/openjpeg:2= )
- system-re2? ( >=dev-libs/re2-0.2019.08.01:= )
- system-libvpx? ( >=media-libs/libvpx-1.13.0:=[postproc] )
- system-libusb? ( virtual/libusb:1 )
- cromite? ( dev-util/patchutils )
- >=dev-libs/libxml2-2.12.4:=[icu]
- dev-libs/nspr:=
- >=dev-libs/nss-3.26:=
- dev-libs/libxslt:=
- media-libs/fontconfig:=
- >=media-libs/freetype-2.11.0-r1:=
- system-harfbuzz? ( >=media-libs/harfbuzz-3:0=[icu(-)] )
- media-libs/libjpeg-turbo:=
- media-libs/libpng:=
- system-zstd? ( >=app-arch/zstd-1.5.5:= )
- >=media-libs/libwebp-0.4.0:=
- media-libs/mesa:=[gbm(+)]
- >=media-libs/openh264-2.6.0:=
- system-av1? (
- >=media-libs/dav1d-1.0.0:=
- >=media-libs/libaom-3.7.0:=
- )
- sys-libs/zlib:=
- !headless? (
- dev-libs/glib:2
- >=media-libs/alsa-lib-1.0.19:=
- media-video/pipewire:=
- pulseaudio? (
- || (
- media-libs/libpulse
- >=media-sound/apulse-0.1.9
- )
- )
- sys-apps/pciutils:=
- kerberos? ( virtual/krb5 )
- vaapi? ( >=media-libs/libva-2.7:=[X?,wayland?] )
- X? (
- x11-base/xorg-proto:=
- x11-libs/libX11:=
- x11-libs/libxcb:=
- x11-libs/libXext:=
- )
- x11-libs/libxkbcommon:=
- wayland? (
- screencast? ( media-video/pipewire:= )
- dev-libs/libffi:=
- dev-libs/wayland:=
- screencast? (
- media-video/pipewire:=
- || (
- sys-apps/xdg-desktop-portal-gnome
- sys-apps/xdg-desktop-portal-gtk
- kde-plasma/xdg-desktop-portal-kde
- gui-libs/xdg-desktop-portal-lxqt
- gui-libs/xdg-desktop-portal-wlr
- )
- )
- )
- )
-"
-
-COMMON_DEPEND="
- ${COMMON_SNAPSHOT_DEPEND}
- app-arch/bzip2:=
- dev-libs/expat:=
- system-ffmpeg? (
- >=media-video/ffmpeg-6.1:=
- >=media-libs/opus-1.3.1:=
- )
- net-misc/curl[ssl]
- sys-apps/dbus:=
- media-libs/flac:=
- sys-libs/zlib:=[minizip]
- !headless? (
- >=app-accessibility/at-spi2-core-2.46.0:2
- media-libs/mesa:=[X?,wayland?]
- virtual/udev
- x11-libs/cairo:=
- x11-libs/gdk-pixbuf:2
- x11-libs/pango:=
- cups? ( >=net-print/cups-1.3.11:= )
- qt6? ( dev-qt/qtbase:6[gui,widgets] )
- X? ( ${COMMON_X_DEPEND} )
- )
-"
-RDEPEND="${COMMON_DEPEND}
- !www-client/ungoogled-chromium:0
- >=www-client/chromium-common-2
- !headless? (
- || (
- x11-libs/gtk+:3[X?,wayland?]
- gui-libs/gtk:4[X?,wayland?]
- )
- qt6? ( dev-qt/qtbase:6[X?,wayland?] )
- )
- virtual/ttf-fonts
- selinux? ( sec-policy/selinux-chromium )
- bindist? (
- ffmpeg-chromium? ( media-video/ffmpeg-chromium:${PV%%\.*} )
- )
- !override-data-dir? (
- !www-client/chromium:${SLOT}
- !www-client/cromite:${SLOT}[-override-data-dir]
- )
-"
-# For M149+ pipewire is a mandatory build-time dependency, but it's optional at runtime for most configurations.
-DEPEND="${COMMON_DEPEND}
- !headless? (
- media-video/pipewire
- gtk4? ( gui-libs/gtk:4[X?,wayland?] )
- !gtk4? ( x11-libs/gtk+:3[X?,wayland?] )
- )
-"
-
- # pgo? ( >=llvm-core/clang-22.0.0_pre20260106 >=llvm-core/lld-22.0.0_pre20260106 )
-BDEPEND="
- ${COMMON_SNAPSHOT_DEPEND}
- ${PYTHON_DEPS}
- $(python_gen_any_dep '
- dev-python/setuptools[${PYTHON_USEDEP}]
- ')
- >=app-arch/gzip-1.7
- !headless? (
- qt6? ( dev-qt/qtbase:6 )
- )
- !bundled-toolchain? ( $(llvm_gen_dep '
- llvm-core/clang:${LLVM_SLOT}
- llvm-core/llvm:${LLVM_SLOT}
- cfi? ( llvm-runtimes/clang-runtime:${LLVM_SLOT}[sanitize] )
- official? (
- !ppc64? ( llvm-runtimes/compiler-rt-sanitizers:${LLVM_SLOT}[cfi] )
- ) ')
- || (
- $(llvm_gen_dep 'llvm-core/lld:${LLVM_SLOT}')
- >=sys-devel/mold-2.41.0
- )
- ${RUST_DEPEND}
- )
- >=dev-util/bindgen-0.72.1
- >=dev-build/gn-${GN_MIN_VER}
- >=dev-lang/go-${GO_MIN_VER}
- app-alternatives/ninja
- dev-lang/perl
- >=dev-util/gperf-3.2
- dev-util/esbuild:${ESBUILD_VER}
- dev-vcs/git
- >=net-libs/nodejs-${NODE_VER}[inspector]
- sys-apps/hwdata
- >=sys-devel/bison-2.4.3
- sys-devel/flex
- virtual/pkgconfig
- x11-misc/xdg-utils
-"
-
-if ! has chromium_pkg_die ${EBUILD_DEATH_HOOKS}; then
- EBUILD_DEATH_HOOKS+=" chromium_pkg_die";
-fi
-
-DISABLE_AUTOFORMATTING="yes"
-DOC_CONTENTS="
-Some web pages may require additional fonts to display properly.
-Try installing some of the following packages if some characters
-are not displayed properly:
-- media-fonts/arphicfonts
-- media-fonts/droid
-- media-fonts/ipamonafont
-- media-fonts/noto
-- media-fonts/ja-ipafonts
-- media-fonts/takao-fonts
-- media-fonts/wqy-microhei
-- media-fonts/wqy-zenhei
-
-To fix broken icons on the Downloads page, you should install an icon
-theme that covers the appropriate MIME types, and configure this as your
-GTK+ icon theme.
-
-For native file dialogs in KDE, install kde-apps/kdialog.
-
-To make password storage work with your desktop environment you may
-have install one of the supported credentials management applications:
-- app-crypt/libsecret (GNOME)
-- kde-frameworks/kwallet (KDE)
-If you have one of above packages installed, but don't want to use
-them in Chromium, then add --password-store=basic to CHROMIUM_FLAGS
-in /etc/chromium/default.
-"
-
-S="${WORKDIR}/chromium-${PV/_*}"
-
-python_check_deps() {
- python_has_version "dev-python/setuptools[${PYTHON_USEDEP}]"
-}
-
-pre_build_checks() {
- # Check build requirements: bugs #471810, #541816, #914220
- # We're going to start doing maths here on the size of an unpacked source tarball,
- # this should make updates easier as chromium continues to balloon in size.
- # xz -l /var/cache/distfiles/chromium-${PV}*.tar.xz
- local base_disk=9 # Round up
- use test && base_disk=$((base_disk + 5))
- local extra_disk=1 # Always include a little extra space
- local memory=4
- tc-is-cross-compiler && extra_disk=$((extra_disk * 2))
- if tc-is-lto || use pgo; then
- memory=$((memory * 2 + 1))
- tc-is-cross-compiler && extra_disk=$((extra_disk * 2)) # Double the requirements
- use pgo && extra_disk=$((extra_disk + 4))
- fi
- if is-flagq '-g?(gdb)?([1-9])'; then
- if use custom-cflags; then
- extra_disk=$((extra_disk + 5))
- fi
- memory=$((memory * 2))
- fi
- local CHECKREQS_MEMORY="${memory}G"
- local CHECKREQS_DISK_BUILD="$((base_disk + extra_disk))G"
- check-reqs_${EBUILD_PHASE_FUNC}
-}
-
-pkg_pretend() {
- if [[ ${MERGE_TYPE} != binary ]]; then
- # The pre_build_checks are all about compilation resources, no need to run it for a binpkg
- pre_build_checks
- fi
-
- if use headless; then
- local headless_unused_flags=("cups" "kerberos" "pulseaudio" "qt6" "vaapi" "wayland")
- for myiuse in ${headless_unused_flags[@]}; do
- use ${myiuse} && ewarn "Ignoring USE=${myiuse}, USE=headless is set."
- done
- fi
-
- if ! use bindist && use ffmpeg-chromium; then
- ewarn "Ignoring USE=ffmpeg-chromium, USE=bindist is not set."
- fi
- if use libcxx; then
- ewarn
- ewarn "Building with libcxx, please be aware that system-*"
- ewarn "and some other c++ dependencies need to be compiled"
- ewarn "with the same c++ library as ungoogled-chromium itself"
- ewarn "dev-libs/jsoncpp is most problematic, see #58 #49 #119 for details"
- ewarn "Simplest solution would be to disable corresponding system-* flags"
- ewarn
- fi
- if use cfi; then
- ewarn
- ewarn "Building with cfi is only possible if building with -stdlib=libc++"
- ewarn "Make sure all dependencies are also built this way, see #40"
- ewarn
- fi
- if use cromite; then
- ewarn
- ewarn "Cromite patches are very experimental and unstable"
- ewarn "Please consider testing them and giving feedback upstream:"
- ewarn "https://github.com/uazo/cromite/issues"
- ewarn "Not all patches are applied, let me know if others should be considered too"
- ewarn
- fi
-}
-
-pkg_setup() {
- if [[ ${MERGE_TYPE} != binary ]]; then
- # The pre_build_checks are all about compilation resources, no need to run it for a binpkg
- pre_build_checks
-
- # We haven't massaged any CFLAGS yet, so we want to do this before we force CC/CXX to prevent warnings.
- local want_lto="false"
- tc-is-lto && want_lto="true"
-
- # The linux:unbundle toolchain in GN grabs CC, CXX, CPP (etc) from the environment
- # We'll set these to clang here then use llvm-utils functions to very explicitly set these
- # to a sane value.
- # This is effectively the 'force-clang' path if GCC support is re-added.
- if use !bundled-toolchain; then
- llvm-r1_pkg_setup
- rust_pkg_setup
-
- if tc-ld-is-mold; then
- ewarn "Mold is currently not supported, it will not be used"
- fi
-
- # Forcing clang; respect llvm_slot_x to enable selection of impl via LLVM_COMPAT
- AR=llvm-ar
- CPP="${CHOST}-clang++-${LLVM_SLOT} -E"
- NM=llvm-nm
- CC="${CHOST}-clang-${LLVM_SLOT}"
- CXX="${CHOST}-clang++-${LLVM_SLOT}"
- fi
-
- # LTO in Chromium means LLVM ThinLTO, if GCC support is re-added
- # We'll need to handle that here too.
- use_lto="false"
- local lto_usable="true"
- if [[ "$want_lto" == "true" ]]; then
- if use arm64 && [[ "${LLVM_SLOT}" -lt 22 ]]; then
- einfo "LTO is broken with LLVM 21 on arm64, ignoring CFLAGS."
- lto_usable="false"
- else
- use_lto="true"
- fi
- # We can rely on GN to do this for us; without this builds
- # take significantly longer with LTO enabled.
- filter-lto
- fi
-
- if [[ "$use_lto" == "false" ]] && use official && [[ "$lto_usable" == "true" ]]; then
- einfo "USE=official selected and LTO not detected."
- einfo "It is _highly_ recommended that LTO be enabled for performance reasons"
- einfo "and to be consistent with the upstream \"official\" build optimisations."
- fi
-
- if [[ "$use_lto" == "false" ]] && use test; then
- die "Tests require CFI which requires LTO"
- fi
-
- export use_lto
-
- if tc-is-cross-compiler; then
- use pgo && die "The pgo USE flag cannot be used when cross-compiling"
- CPP="${CBUILD}-clang++-${LLVM_SLOT} -E"
- fi
-
- # Sanity checks for development convenience
- if ver_test $(gn --version || die) -lt ${GN_MIN_VER}; then
- die "dev-build/gn >= ${GN_MIN_VER} is required to build this Chromium"
- fi
-
- # Sometimes, when adding a new LLVM slot, devs (me) forget to install an appropriate lld.
- if tc-ld-is-lld; then
- local lld_ver=$(ld.lld --version | awk '{split($2,a,"."); print a[1]}' || die "Failed to check lld version")
- if [[ ${lld_ver} -lt ${LLVM_SLOT} ]]; then
- die "Your lld version (${lld_ver}) is too old for the selected LLVM slot (${LLVM_SLOT}). Please install a newer lld or select an older LLVM slot."
- fi
- fi
- fi
-
- chromium_suid_sandbox_check_kernel_config
-}
-
-src_unpack() {
- # # Here be dragons!
- # local XCLD="--exclude=chromium-${PV/_*}/third_party/instrumented_libs \
- # --exclude=chromium-${PV/_*}/third_party/llvm \
- # --exclude=chromium-${PV/_*}/third_party/llvm-build \
- # --exclude=chromium-${PV/_*}/third_party/node/linux \
- # --exclude=chromium-${PV/_*}/third_party/rust-src \
- # --exclude=chromium-${PV/_*}/third_party/rust-toolchain \
- # --exclude=chromium-${PV/_*}/build/linux/debian_bullseye_i386-sysroot \
- # --exclude=chromium-${PV/_*}/build/linux/debian_bullseye_amd64-sysroot \
- # --exclude=chromium-${PV/_*}/third_party/angle/third_party/VK-GL-CTS \
- # "
-
- # if ! use libcxx ; then
- # XCLD+=" --exclude=chromium-${PV/_*}/third_party/libc++"
- # fi
-
- # if ! use pgo ; then
- # XCLD+=" --exclude=chromium-${PV/_*}/chrome/build/pgo_profiles"
- # fi
-
- # einfo "Unpacking chromium-${PV/_*}.tar.xz to ${WORKDIR}"
- # # Gentoo tarball:
- # # tar ${XCLD} -xf "${DISTDIR}/chromium-${PV/_*}-gentoo.tar.xz" -C "${WORKDIR}" || die
- # tar ${XCLD} -xf "${DISTDIR}/chromium-${PV/_*}${LITE_TARBALL:+-lite}.tar.xz" -C "${WORKDIR}" || die
-
- # unpack ${UGC_URL#*->}
- # # unpack chromium-patches-${PATCH_V}.tar.bz2
- # # Warned you!
-
- unpack chromium-${PV/_*}-lite.tar.xz
- unpack chromium-patches-${PATCH_V}.tar.bz2
- # These should only be required when we're not using the official toolchain
- if use !bundled-toolchain; then
- unpack chromium-patches-copium-${COPIUM_COMMIT:0:10}.tar.gz
- fi
-
- if use test; then
- # This just contains a bunch of font files that need to be unpacked (or moved) to the correct location.
- local testfonts_dir="${WORKDIR}/chromium-${PV/_*}/third_party/test_fonts/test_fonts"
- local testfonts_tar="${DISTDIR}/chromium-testfonts-${TEST_FONT:0:10}.tar.gz"
- einfo "Unpacking test fonts ..."
- tar xf "${testfonts_tar}" -C "${testfonts_dir}" || die "Failed to unpack testfonts"
- fi
-
- # We need to manually unpack this since M126 else we'd unpack one toolchain over the other.
- # Since we're doing that anyway let's unpack to sensible locations to make symlink creation easier.
- if use bundled-toolchain; then
- einfo "Unpacking bundled Clang ..."
- mkdir -p "${WORKDIR}"/clang || die "Failed to create clang directory"
- tar xf "${DISTDIR}/chromium-clang-${BUNDLED_CLANG_VER}.tar.xz" -C "${WORKDIR}/clang" || die "Failed to unpack Clang"
- einfo "Unpacking bundled Rust ..."
- local rust_dir="${WORKDIR}/rust-toolchain"
- mkdir -p "${rust_dir}" || die "Failed to create rust toolchain directory"
- tar xf "${DISTDIR}/chromium-rust-toolchain-${RUST_SHORT_HASH}-${BUNDLED_CLANG_VER%-*}.tar.xz" -C "${rust_dir}" ||
- die "Failed to unpack Rust"
- fi
-
- if use ppc64; then
- unpack chromium-openpower-${PPC64_HASH:0:10}.tar.bz2
- fi
-
- # This is a dirty hack, but we need rollup to build successfully and it's proving to be challenging
- # to build locally due to deps
- unpack rollup-wasm-node-${ROLLUP_VER}.tgz
-
- if use cromite; then
- unpack cromite-${CROMITE_COMMIT_ID}.tar.gz
- fi
-
- unpack ${UGC_URL#*->}
-}
-
-remove_compiler_builtins() {
- # We can't use the bundled compiler builtins with the system toolchain
- # We used to `grep` then `sed`, but it was indirect. Combining the two into a single
- # `awk` command is more efficient and lets us document the logic more clearly.
-
- local pattern=' configs += [ "//build/config/clang:compiler_builtins" ]'
- local target='build/config/compiler/BUILD.gn'
-
- local tmpfile
- tmpfile=$(mktemp) || die "Failed to create temporary file."
-
- if awk -v pat="${pattern}" '
- BEGIN {
- match_found = 0
- }
-
- # If the delete countdown is active, decrement it and skip to the next line.
- d > 0 { d--; next }
-
- # If the current line matches the pattern...
- $0 == pat {
- match_found = 1 # ...set our flag to true.
- d = 2 # Set delete counter for this line and the next two.
- prev = "" # Clear the buffered previous line so it is not printed.
- next
- }
-
- # For any other line, print the buffered previous line.
- NR > 1 { print prev }
-
- # Buffer the current line to be printed on the next cycle.
- { prev = $0 }
-
- END {
- # Print the last line if it was not part of a deleted block.
- if (d == 0) { print prev }
-
- # If the pattern was never found, exit with a failure code.
- if (match_found == 0) {
- exit 1
- }
- }
- ' "${target}" > "${tmpfile}"; then
- # AWK SUCCEEDED (exit code 0): The pattern was found and edited.
- # This is to avoid gawk's `-i inplace` option which users complain about.
- mv "${tmpfile}" "${target}"
- else
- # AWK FAILED (exit code 1): The pattern was not found.
- rm -f "${tmpfile}"
- die "Awk patch failed: Pattern not found in ${target}."
- fi
-}
-
-src_prepare() {
- # Calling this here supports resumption via FEATURES=keepwork
- python_setup
-
- # We'll fill this in as we go. Patches go in chromium-patches.
- local PATCHES=()
-
- rm "${WORKDIR}/chromium-patches-${PATCH_V}/common/cr131-unbundle-icu-target.patch"
- if ver_test "${RUST_SLOT}" -ge "1.95.0"; then
- sed -i '/SupportedLaneCount/d' third_party/rust/chromium_crates_io/vendor/bytemuck-v1/src/zeroable.rs || die
- sed -i '/SupportedLaneCount/d' third_party/rust/chromium_crates_io/vendor/bytemuck-v1/src/pod.rs || die
- fi
-
- PATCHES+=(
- "${WORKDIR}/chromium-patches-${PATCH_V}/common/"
- "${FILESDIR}/restore-x86-r4.patch"
- )
-
- # So many fontconfig magic numbers to cover
- # TODO: once upstream roll to 2.18.2+ set that as our minimum and remove this logic.
- # <=2.17.1 -> 9
- # >2.17.1 && <2.18.2 -> 11
- # >=2.18.2 -> 12
- local fontconfig_cache_magic=9
- if has_version ">=media-libs/fontconfig-2.18.2"; then
- fontconfig_cache_magic=12
- elif has_version ">media-libs/fontconfig-2.17.1"; then
- fontconfig_cache_magic=11
- fi
-
- sed -E -i \
- -e "s#(fb5c91b2895aa445d23aebf7f9e2189c-le64\.cache-)(9|10|11|12)#\1${fontconfig_cache_magic}#g" \
- third_party/test_fonts/fontconfig/BUILD.gn || die "Failed to set fontconfig cache magic in BUILD.gn"
-
- #cp -f ${WORKDIR}/chromium-patches-${PATCH_V}/*-compiler.patch "${T}/compiler.patch"
- ##cp -f ${FILESDIR}/chromium-147-compiler.patch "${T}/compiler.patch"
- #if ! use custom-cflags; then #See #25 #92
- # sed -i '/default_stack_frames/Q' "${T}/compiler.patch" || die
- #fi
-
- sed -E -i \
- -e "s#(kCacheKey \+ \"/-le64\.cache-)(9|10|11|12)(\")#\1${fontconfig_cache_magic}\3#g" \
- -e "s#(kCacheKey \+ \"-le64\.cache-)(9|10|11|12)(\")#\1${fontconfig_cache_magic}\3#g" \
- third_party/test_fonts/fontconfig/generate_fontconfig_caches.cc || \
- die "Failed to set fontconfig cache magic in generate_fontconfig_caches.cc"
-
- if use bundled-toolchain; then
- # We need to symlink the toolchain into the expected location
- einfo "Symlinking Clang toolchain to expected location ..."
- mkdir -p third_party/llvm-build/ || die "Failed to create llvm-build directory"
- # the 'Chromium Linux Tarballs' seem to already have 'Release+Asserts/{lib,bin}'; not sure if this is an
- # upstream change - we're using the same scripts to build, theoretically. We'll still attempt to create
- # llvm-build, but we'll rm Release+Asserts and symlink directly.
- if [[ -d third_party/llvm-build/Release+Asserts ]]; then
- rm -r third_party/llvm-build/Release+Asserts || die "Failed to remove third_party/llvm-build/Release+Asserts"
- fi
- ln -s "${WORKDIR}"/clang third_party/llvm-build/Release+Asserts || die "Failed to bundle Clang"
- einfo "Symlinking Rust toolchain to expected location ..."
- # As above, so below
- if [[ -d third_party/rust-toolchain ]]; then
- rm -r third_party/rust-toolchain || die "Failed to remove third_party/rust-toolchain"
- fi
- ln -s "${WORKDIR}"/rust-toolchain third_party/rust-toolchain || die "Failed to bundle rust"
- cp "${WORKDIR}"/rust-toolchain/VERSION \
- "${WORKDIR}"/rust-toolchain/INSTALLED_VERSION || die "Failed to set rust version"
- else
- # We don't need our toolchain patches if we're using the official toolchain
-
- # Copium patches go here.
- PATCHES+=(
- "${WORKDIR}/copium/cr143-libsync-__BEGIN_DECLS.patch"
- "${WORKDIR}/copium/cr149-unbundle-minizip-undo-unicode.patch"
- )
-
- # Automate conditional application of chromium-patches
- # The directory structure is expected to be something like:
- # chromium-patches-145/
- # ├── toolchain/
- # │ ├── cr123-foo.patch
- # │ └── cr135-bar.patch
- # ├── llvm/
- # │ ├── cr144-baz.patch
- # │ └── lt-23/
- # │ └── cr145-bleeding-edge-llvm-feature.patch
- # Where `lt-23` means "apply this patch if the LLVM version is less than 23".
- # Only categories in `slot_map` will be checked for version constraints.
- shopt -s nullglob
- local -A slot_map=( [llvm]="${LLVM_SLOT}" [rust]="${RUST_SLOT}" )
-
- for category in "${WORKDIR}/chromium-patches-${PATCH_V}"/*/; do
- local category_name="${category%/}"
- category_name="${category_name##*/}"
-
- # Skip arch-specific categories
- if [[ "${category_name}" == "ppc64le" ]]; then
- use ppc64 || continue
- fi
-
- # We applied common patches above, no need to apply them again here
- [[ "${category_name}" == "common" ]] && continue
-
- # Unconditional patches for this category
- local category_patches=( "${category}"*.patch )
- [[ ${#category_patches[@]} -gt 0 ]] && PATCHES+=( "${category}" )
-
- # Version-constrained subdirectories (e.g., llvm/lt-23/)
- for constraint_dir in "${category}"*/; do
- local dir_name="${constraint_dir%/}"
- dir_name="${dir_name##*/}"
- if [[ "${dir_name}" =~ ^lt-(.*)$ && -v slot_map[${category_name}] ]]; then
- ver_test "${slot_map[${category_name}]}" -lt "${BASH_REMATCH[1]}" &&
- PATCHES+=( "${constraint_dir}" )
- fi
- done
- done
-
- shopt -u nullglob
-
- # Strictly speaking this doesn't need to be gated (no bundled toolchain for ppc64); it keeps the logic together
- if use ppc64; then
- local patchset_dir="${WORKDIR}/openpower-patches-${PPC64_HASH}/patches"
- # patch causes build errors on 4K page systems (https://bugs.gentoo.org/show_bug.cgi?id=940304)
- local page_size_patch="ppc64le/third_party/use-sysconf-page-size-on-ppc64.patch"
- local isa_3_patch="ppc64le/core/baseline-isa-3-0.patch"
- # Apply the OpenPOWER patches (check for page size and isa 3.0)
- openpower_patches=( $(grep -E "^ppc64le|^upstream" "${patchset_dir}/series" | grep -v "${page_size_patch}" |
- grep -v "${isa_3_patch}" || die) )
- for patch in "${openpower_patches[@]}"; do
- PATCHES+=( "${patchset_dir}/${patch}" )
- done
- if [[ $(getconf PAGESIZE) == 65536 ]]; then
- PATCHES+=( "${patchset_dir}/${page_size_patch}" )
- fi
- # We use vsx3 as a proxy for 'want isa3.0' (POWER9)
- if use cpu_flags_ppc_vsx3 ; then
- PATCHES+=( "${patchset_dir}/${isa_3_patch}" )
- fi
- fi
-
- remove_compiler_builtins
-
- # We can't rely on the eselect'd Rust to actually include rustfmt, so we'll point to the selected slot specifically.
- local suffix=""
- if [[ "${RUST_TYPE}" == "binary" ]]; then
- suffix="-bin-${RUST_SLOT}"
- else
- suffix="-${RUST_SLOT}"
- fi
- sed -i "s|/bin/rustfmt|/bin/rustfmt${suffix}|g" build/rust/rust_bindgen_generator.gni ||
- die "Failed to update rustfmt path"
-
- fi
-
- # Do this before we apply patches since (e.g.) ppc64 needs to patch rollup and it's easier in ${S}
- einfo "Moving rollup wasm-node package into place ..."
- mkdir -p third_party/devtools-frontend/src/node_modules/@rollup/wasm-node ||
- die "Failed to create node_modules/@rollup/wasm-node"
- mv "${WORKDIR}"/package/* third_party/devtools-frontend/src/node_modules/@rollup/wasm-node ||
- die "Failed to move rollup package"
-
- if [ ! -z "${CHROMIUM_COMMITS[*]}" ]; then
- # for i in "${CHROMIUM_COMMITS[@]}"; do
- for i in "${!CHROMIUM_COMMITS[@]}"; do
- if [[ ${CHROMIUM_COMMITS[$i]} =~ webrtc ]]; then
- patch_prefix="webrtc"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ angle ]]; then
- patch_prefix="angle"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ quiche ]]; then
- patch_prefix="quiche"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ dawn ]]; then
- patch_prefix="dawn"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ perfetto ]]; then
- patch_prefix="perfetto"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ink ]]; then
- patch_prefix="ink"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ vulkan-utility-libraries ]]; then
- patch_prefix="vulkan-utility-libraries"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ruy ]]; then
- patch_prefix="ruy"
- else
- patch_prefix="chromium"
- fi
- pushd "${CHROMIUM_COMMITS[$i]}" > /dev/null || die
- if [[ $i = -* ]]; then
- einfo "Reverting ${patch_prefix}-${i/-}.patch"
- git_wrapper apply -R --exclude="*unittest.cc" --exclude="DEPS" \
- -p1 < "${DISTDIR}/${patch_prefix}-${i/-}.patch"
- else
- einfo "Applying ${patch_prefix}-${i/-}.patch"
- git_wrapper apply --exclude="*unittest.cc" --exclude="DEPS" \
- -p1 < "${DISTDIR}/${patch_prefix}-${i/-}.patch"
- fi
- popd > /dev/null || die
- done
- fi
-
- if ! use bluetooth ; then
- PATCHES+=(
- "${FILESDIR}/disable-bluez-r7.patch"
- )
- fi
-
- if use convert-dict ; then
- PATCHES+=(
- "${FILESDIR}/chromium-ucf-dict-utility-r3.patch"
- )
- fi
-
- if ! use libcxx ; then
- PATCHES+=(
- "${FILESDIR}/fix-wayland-oncecallback-copy.patch"
- )
- fi
-
- if use system-ffmpeg; then
- PATCHES+=(
- "${FILESDIR}/chromium-141-opus-mp3.patch"
- "${FILESDIR}/chromium-135-hevc.patch"
- )
- sed -i "\!AVFMT_FLAG_NOH264PARSE!d" media/filters/ffmpeg_glue.cc || die
- ewarn "You need to expose \"av_stream_get_first_dts\" in ffmpeg via user patch"
- fi
-
- if use system-av1; then
- PATCHES+=(
- "${FILESDIR}/chromium-system-av1.patch"
- )
- fi
-
- if use system-libvpx; then
- PATCHES+=(
- "${FILESDIR}/chromium-system-libvpx.patch"
- )
- fi
-
- if use system-openjpeg ; then
- PATCHES+=(
- "${FILESDIR}/chromium-system-openjpeg-r4.patch"
- )
- fi
-
- # if use x86 ; then
- # #* Fixes a segfault in transport_security_state_generator
- # PATCHES+=(
- # "${FILESDIR}/fix-segfault-x86.patch"
- # )
- # fi
-
- # Testing all patches when NODIE is defined
- if [ ! -z "${NODIE}" ]; then
- for i in "${PATCHES[@]}"; do
- eapply_wrapper "$i"
- done
- nonfatal eapply_user
- else
- default
- fi
-
- if use cromite ; then
- BR_PA_PATH="${WORKDIR}/cromite-${CROMITE_COMMIT_ID}/build/patches"
-
- sed -i '/b\/components\/components_strings\.grd/,+10d' "${BR_PA_PATH}/Add-cromite-flags-support.patch" || die
- sed -i '/b\/chrome\/android\/java\/res\/xml\/privacy_preferences\.xml/,+13d' "${BR_PA_PATH}/Add-cromite-flags-support.patch" || die
- sed -i '/b\/android_webview\/support_library\/java\/src\/org\/chromium\/support_lib_glue/,+11d' "${BR_PA_PATH}/Client-hints-overrides.patch" || die
- sed -i '/webapps_strings.grdp" \/>/{s++webapps_strings.grdp" /><part file="cromite_components_strings_grd/placeholder.txt"/>+;h};${x;/./{x;q0};x;q1}' \
- components/components_strings.grd || die
-
- sed -i 's/absl::/std::/' "${BR_PA_PATH}/Add-a-proxy-configuration-page.patch" || die
-
- filterdiff -p1 "${BR_PA_PATH}/JIT-site-settings.patch" --exclude="content/browser/renderer_host/render_process_host_impl.cc" \
- > "${BR_PA_PATH}/JIT-site-settings.patch1"
- mv -f "${BR_PA_PATH}/JIT-site-settings.patch1" "${BR_PA_PATH}/JIT-site-settings.patch"
-
- BROMITE_PATCHES=(
- "${BR_PA_PATH}/bromite-build-utils.patch"
- "${BR_PA_PATH}/Battery-API-return-nothing.patch"
- "${BR_PA_PATH}/Multiple-fingerprinting-mitigations.patch"
- "${BR_PA_PATH}/Add-flag-to-configure-maximum-connections-per-host.patch"
- "${BR_PA_PATH}/Add-a-proxy-configuration-page.patch"
- "${BR_PA_PATH}/Enable-StrictOriginIsolation-and-SitePerProcess.patch"
- "${BR_PA_PATH}/Disable-requests-for-single-word-Omnibar-searches.patch"
- "${BR_PA_PATH}/Reduce-HTTP-headers-in-DoH-requests-to-bare-minimum.patch"
- "${BR_PA_PATH}/Client-hints-overrides.patch"
- "${BR_PA_PATH}/Disable-idle-detection.patch"
- "${BR_PA_PATH}/Disable-TLS-resumption.patch"
- "${BR_PA_PATH}/Remove-navigator.connection-info.patch"
-
- "${BR_PA_PATH}/AudioBuffer-AnalyserNode-fp-mitigations.patch"
- "${BR_PA_PATH}/Fonts-fingerprinting-mitigation.patch"
- "${BR_PA_PATH}/Content-settings-infrastructure.patch"
- "${BR_PA_PATH}/Add-autoplay-site-setting.patch"
- "${BR_PA_PATH}/Site-setting-for-images.patch"
- "${BR_PA_PATH}/JIT-site-settings.patch"
- "${BR_PA_PATH}/Add-webGL-site-setting.patch"
- "${BR_PA_PATH}/Add-webRTC-site-settings.patch"
- "${BR_PA_PATH}/Show-site-settings-for-cookies-javascript-and-ads.patch"
- "${BR_PA_PATH}/Viewport-Protection-flag.patch"
- "${BR_PA_PATH}/Revert-remove-allowscript-content-setting-secondary-url.patch"
- "${BR_PA_PATH}/Timezone-customization.patch"
- "${BR_PA_PATH}/Disable-speechSynthesis-getVoices-API.patch"
- "${BR_PA_PATH}/Remove-support-for-device-memory-and-cpu-recovery.patch"
- "${BR_PA_PATH}/Disable-Feeback-Collector.patch"
- "${BR_PA_PATH}/Disable-remote-altsvc-for-h3-connections.patch"
- "${BR_PA_PATH}/Add-cromite-flags-support.patch"
- "${BR_PA_PATH}/Enables-deactivation-of-the-js-debugger-statement.patch"
- )
- for i in "${BROMITE_PATCHES[@]}"; do
- if [[ "$i" =~ "Add-autoplay-site-setting.patch" ]] ||
- [[ "$i" =~ "JIT-site-settings.patch" ]] ||
- [[ "$i" =~ "Site-setting-for-images.patch" ]]; then
- einfo "Git binary patch: ${i##*/}"
- git_wrapper apply -p1 < "$i"
- else
- filter_wrapper "$i" --exclude="chrome/android/*"
- fi
- done
-
- #! conflicting patches
- sed -i '/browser_features.cc/,+17d' \
- "${UGC_WD}/patches/extra/ungoogled-chromium/add-flag-to-clear-data-on-exit.patch" || die
- sed -i 's$} // namespace features$BASE_FEATURE(kClearDataOnExit, "ClearDataOnExit", base::FEATURE_DISABLED_BY_DEFAULT);}$' \
- chrome/browser/browser_features.cc || die
- sed -i 's$} // namespace features$BASE_DECLARE_FEATURE(kClearDataOnExit);}$' \
- chrome/browser/browser_features.h || die
- sed -i 's$kChromeUIAboutHost,$kChromeUIAboutHost,"ungoogled-first-run",$' \
- chrome/common/webui_url_constants.cc || die
- sed -i '/chrome\/common\/webui_url_constants.cc/Q' \
- "${UGC_WD}/patches/extra/ungoogled-chromium/first-run-page.patch" || die
-
- #! normalise paths in py
- sed -i 's$os.path.dirname(include_file)$os.path.abspath(os.path.dirname(include_file))$' \
- build/bromite/gyp/cpp_bromite_include.py || die
- fi
-
- # if [[ ${LLVM_SLOT} == "19" ]]; then
- # # Upstream now hard depend on a feature that was added in LLVM 20.1, but we don't want to stabilise that yet.
- # # Do the temp file shuffle in case someone is using something other than `gawk`
- # {
- # awk '/config\("clang_warning_suppression"\) \{/ { print $0 " }"; sub(/clang/, "xclang"); print; next }
- # { print }' build/config/compiler/BUILD.gn > "${T}/build.gn" && \
- # mv "${T}/build.gn" build/config/compiler/BUILD.gn
- # } || die "Unable to disable warning suppression"
- # fi
-
- ## Not included in -lite tarballs, but we should check for it anyway.
- #if [[ -f third_party/node/linux/node-linux-x64/bin/node ]]; then
- # rm third_party/node/linux/node-linux-x64/bin/node || die
- #else
- # mkdir -p third_party/node/linux/node-linux-x64/bin || die
- #fi
- #ln -s "${EPREFIX}"/usr/bin/node third_party/node/linux/node-linux-x64/bin/node || die
-
- cp "${FILESDIR}/libusb.gn" build/linux/unbundle || die
- sed -i '/^REPLACEMENTS.*$/{s++REPLACEMENTS = {"libusb":"third_party/libusb/BUILD.gn",+;h};${x;/./{x;q0};x;q1}' \
- build/linux/unbundle/replace_gn_files.py || die
- sed -i '/^.*deps.*third_party\/jsoncpp.*$/{s++public_deps \+= [ "//third_party/jsoncpp" ]+;h};${x;/./{x;q0};x;q1}' \
- third_party/webrtc/rtc_base/BUILD.gn || die
-
- if use override-data-dir; then
- sed -i '/"chromium";/{s++"ungoogled-chromium";+;h};${x;/./{x;q0};x;q1}' \
- chrome/common/chrome_paths_linux.cc || die
- fi
-
- if use system-abseil-cpp; then
- eapply_wrapper "${FILESDIR}/chromium-147-system-abseil.patch"
-
- #! SFINAE mangling incompatibility between clang and gcc:
- #! https://github.com/llvm/llvm-project/issues/85656
- #! gcc: _ZN4absl12lts_202601074CordC1INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELi0EEEOT_
- #! clang: _ZN4absl12lts_202601074CordC1INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEETnNSt9enable_ifIXsr3std7is_sameIT_S8_EE5valueEiE4typeELi0EEEOSA_
- #! So, either this:
- eapply_wrapper "${FILESDIR}/chromium-141-system-abseil-cord.patch"
- #! or build with -fclang-abi-compat=17
-
- # cp -f /usr/include/absl/base/options.h third_party/abseil-cpp/absl/base/options.h
- # sed -i '/^#define ABSL_OPTION_USE_STD_ORDERING.*$/{s++#define ABSL_OPTION_USE_STD_ORDERING 1+;h};${x;/./{x;q0};x;q1}' \
- # third_party/abseil-cpp/absl/base/options.h || die
- fi
-
- #* Applying UGC PRs here
- if [ ! -z "${UGC_PR_COMMITS[*]}" ]; then
- pushd "${UGC_WD}" >/dev/null
- for i in "${UGC_PR_COMMITS[@]}"; do
- eapply_wrapper "${DISTDIR}/${PN}-$i.patch"
- done
- popd >/dev/null
- fi
-
- # From here we adapt ungoogled-chromium's patches to our needs
- local ugc_pruning_list="${UGC_WD}/pruning.list"
- local ugc_patch_series="${UGC_WD}/patches/series"
- local ugc_substitution_list="${UGC_WD}/domain_substitution.list"
-
- local ugc_unneeded=(
- # GN bootstrap
- extra/debian/gn/parallel
- # following Gentoo's Chromium
- core/ungoogled-chromium/build-with-wasm-rollup
- )
-
- if use cromite ; then
- einfo "Using fingerprinting patches from Cromite instead"
- ugc_unneeded+=(
- extra/bromite/fingerprinting-flags-client-rects-and-measuretext
- extra/bromite/flag-max-connections-per-host
- extra/bromite/flag-fingerprinting-canvas-image-data-noise
- extra/ungoogled-chromium/add-components-ungoogled
- extra/ungoogled-chromium/remove-pac-size-limit
- )
- fi
-
- # #* Temporary fix
- # sed -i "\!ios/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/icu/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/libjpeg_turbo/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/snappy/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/closure_compiler/!d" "${ugc_pruning_list}" || die
-
- # #* Didn't unpack them at the first place
- # sed -i "\!build/linux/debian_bullseye_i386-sysroot!d" "${ugc_pruning_list}" || die
- # sed -i "\!build/linux/debian_bullseye_amd64-sysroot!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/llvm-build!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/node/linux!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/rust-src!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/rust-toolchain!d" "${ugc_pruning_list}" || die
- # if ! use libcxx ; then
- # sed -i "\!third_party/libc!d" "${ugc_pruning_list}" || die
- # fi
- sed -i "s|debug('files|error('files|" \
- "${UGC_WD}/utils/prune_binaries.py" || die
- sed -i "\!third_party/node/linux!d" \
- "${UGC_WD}/utils/prune_binaries.py" || die
-
- local ugc_p ugc_dir
- for p in "${ugc_unneeded[@]}"; do
- einfo "Removing ${p}.patch"
- sed -i "\!${p}.patch!d" "${ugc_patch_series}" || die
- done
-
- if [ ! -z "${UGC_SKIP_PATCHES}" ]; then
- for p in ${UGC_SKIP_PATCHES}; do
- ewarn "Removing ${p}"
- sed -i "\!${p}!d" "${ugc_patch_series}" || die
- done
- fi
-
- if [ ! -z "${UGC_KEEP_BINARIES}" ]; then
- for p in ${UGC_KEEP_BINARIES}; do
- ewarn "Keeping binary ${p}"
- sed -i "\!${p}!d" "${ugc_pruning_list}" || die
- done
- fi
-
- if [ ! -z "${UGC_SKIP_SUBSTITUTION}" ]; then
- for p in ${UGC_SKIP_SUBSTITUTION}; do
- ewarn "No substitutions in ${p}"
- sed -i "\!${p}!d" "${ugc_substitution_list}" || die
- done
- fi
-
- ebegin "Pruning binaries"
- "${UGC_WD}/utils/prune_binaries.py" -q . "${UGC_WD}/pruning.list"
- eend $? || die
-
- ebegin "Applying ungoogled-chromium patches"
- "${UGC_WD}/utils/patches.py" -q apply . "${UGC_WD}/patches"
- eend $? || die
-
- ebegin "Applying domain substitution"
- "${UGC_WD}/utils/domain_substitution.py" -q apply -r "${UGC_WD}/domain_regex.list" -f "${UGC_WD}/domain_substitution.list" .
- eend $? || die
-
- # Sanity check esbuild version before we start removing files.
- # We _could_ patch the version check out - in theory esbuild upstream are being super conservative after
- # arch(AUR) packaged an `esbuild` binary and set ESBUILD_BINARY_PATH=/usr/bin/esbuild, causing much breakage,
- # but this is fine too and exactly matches what upstream are expecting.
- # https://github.com/evanw/esbuild/issues/2894
- local esbuild_js="${S}/third_party/devtools-frontend/src/node_modules/esbuild/lib/main.js"
- local found
- found=$(awk -F'"' '/if \(binaryVersion !==/ {print $2}' "${esbuild_js}")
- if [[ "${found}" != "${ESBUILD_VER}" ]]; then
- die "esbuild version mismatch: expected ${ESBUILD_VER}, found ${found}"
- fi
-
- elog "Removing bundled binaries from source tree ..."
- # Purge bundled ELF files: These are non-portable and will cause issues if used instead of system versions.
- # Use `--wasm` to also remove WebAssembly binaries, if desired - they're portable so shouldn't break builds.
- ${EPYTHON} "${FILESDIR}/bin-finder.py" --elf "${S}" | awk '{print $1}' | xargs rm -f ||
- die "Failed to remove bundled binaries"
-
- # And now we restore any that we actually need, from the host system
- local esbuild_path="${S}/third_party/devtools-frontend/src/third_party/esbuild"
- local -A restore_list=(
- ["/usr/bin/esbuild-${ESBUILD_VER}"]="${esbuild_path}/esbuild"
- ["/usr/bin/gperf"]="${S}/third_party/gperf/cipd/bin/gperf"
- ["/usr/bin/node"]="${S}/third_party/node/linux/node-linux-x64/bin/node"
- )
-
- for src in "${!restore_list[@]}"; do
- dst="${restore_list[${src}]}"
- if [[ -f "${src}" ]]; then
- einfo "Symlinking ${src} ..."
- # Make sure the parent dir exists; some tarballs don't include (e.g.) node's bindir
- mkdir -p "$(dirname "${dst}")" || die "Failed to create directory for ${dst}"
- ln -s "${src}" "${dst}" || die "Failed to symlink ${dst} from ${src}"
- if [[ ! -L "${dst}" || "$(readlink -f "${dst}")" != "${src}" ]]; then
- die "Symlink verification failed for ${dst} -> ${src}"
- fi
- else
- die "Expected to find ${src} to restore ${dst}, but it does not exist."
- fi
- done
-
- # adjust python interpreter version
- sed -i -e "s|\(^script_executable = \).*|\1\"${EPYTHON}\"|g" .gn || die
-
- # Use the system copy of hwdata's usb.ids
- sed 's|//third_party/usb_ids/src/usb.ids|/usr/share/hwdata/usb.ids|g' \
- -i services/device/public/cpp/usb/BUILD.gn || die "Failed to set system usb.ids path"
-
- # remove_bundled_libraries.py walks the source tree and looks for paths containing the substring 'third_party'
- # whitelist matches use the right-most matching path component, so we need to whitelist from that point down.
- local keeplibs=(
- base/third_party/cityhash
- )
- use system-double-conversion || keeplibs+=(
- base/third_party/double_conversion
- )
- keeplibs+=(
- base/third_party/icu
- base/third_party/nspr
- base/third_party/superfasthash
- base/third_party/symbolize
- base/third_party/xdg_user_dirs
- buildtools/third_party/libc++
- buildtools/third_party/libc++abi
- )
- use cromite && keeplibs+=(
- cromite_flags/third_party
- )
- keeplibs+=(
- net/third_party/mozilla_security_manager
- net/third_party/quic
- net/third_party/uri_template
- )
- use system-abseil-cpp || keeplibs+=(
- third_party/abseil-cpp
- )
- keeplibs+=(
- third_party/angle
- third_party/angle/src/common/third_party/xxhash
- third_party/angle/src/third_party/ceval
- )
- use nvidia || keeplibs+=(
- third_party/angle/src/third_party/libXNVCtrl
- )
- keeplibs+=(
- third_party/angle/src/third_party/volk
- third_party/anonymous_tokens
- third_party/apple_apsl
- third_party/axe-core
- third_party/bidimapper
- third_party/blink
- third_party/boringssl
- third_party/boringssl/src/third_party/fiat
- third_party/breakpad
- third_party/breakpad/breakpad/src/third_party/curl
- )
- use system-brotli || keeplibs+=(
- third_party/brotli
- )
- keeplibs+=(
- third_party/catapult
- third_party/catapult/common/py_vulcanize/third_party/rcssmin
- third_party/catapult/common/py_vulcanize/third_party/rjsmin
- third_party/catapult/third_party/beautifulsoup4-4.9.3
- third_party/catapult/third_party/html5lib-1.1
- third_party/catapult/third_party/polymer
- third_party/catapult/third_party/six
- third_party/catapult/third_party/typ
- third_party/catapult/tracing/third_party/d3
- third_party/catapult/tracing/third_party/gl-matrix
- third_party/catapult/tracing/third_party/jpeg-js
- third_party/catapult/tracing/third_party/jszip
- third_party/catapult/tracing/third_party/mannwhitneyu
- third_party/catapult/tracing/third_party/oboe
- third_party/catapult/tracing/third_party/pako
- third_party/ced
- third_party/cld_3
- third_party/closure_compiler
- )
- use libcxx && keeplibs+=(
- third_party/compiler-rt
- )
- keeplibs+=(
- third_party/content_analysis_sdk
- third_party/cpuinfo
- third_party/crabbyavif
- third_party/crashpad
- third_party/crashpad/crashpad/third_party/lss
- third_party/crashpad/crashpad/third_party/zlib
- )
- use system-crc32c || keeplibs+=(
- third_party/crc32c
- )
- keeplibs+=(
- third_party/cros_system_api
- third_party/d3
- third_party/dawn
- third_party/dawn/third_party/gn/webgpu-cts
- third_party/dawn/third_party/OpenGL-Registry
- third_party/dawn/third_party/renderdoc
- third_party/dawn/third_party/webgpu-headers
- third_party/depot_tools
- third_party/devscripts
- third_party/devtools-frontend
- third_party/devtools-frontend/src/front_end/third_party/acorn
- third_party/devtools-frontend/src/front_end/third_party/additional_readme_paths.json
- third_party/devtools-frontend/src/front_end/third_party/axe-core
- third_party/devtools-frontend/src/front_end/third_party/chromium
- third_party/devtools-frontend/src/front_end/third_party/codemirror
- third_party/devtools-frontend/src/front_end/third_party/csp_evaluator
- third_party/devtools-frontend/src/front_end/third_party/diff
- third_party/devtools-frontend/src/front_end/third_party/i18n
- third_party/devtools-frontend/src/front_end/third_party/intl-messageformat
- third_party/devtools-frontend/src/front_end/third_party/json5
- third_party/devtools-frontend/src/front_end/third_party/legacy-javascript
- third_party/devtools-frontend/src/front_end/third_party/lighthouse
- third_party/devtools-frontend/src/front_end/third_party/lit
- third_party/devtools-frontend/src/front_end/third_party/marked
- third_party/devtools-frontend/src/front_end/third_party/puppeteer
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/third_party/mitt
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/third_party/parsel-js
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/third_party/rxjs
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/third_party/urlpattern-polyfill
- third_party/devtools-frontend/src/front_end/third_party/source-map-scopes-codec
- third_party/devtools-frontend/src/front_end/third_party/third-party-web
- third_party/devtools-frontend/src/front_end/third_party/vscode.web-custom-data
- third_party/devtools-frontend/src/front_end/third_party/wasmparser
- third_party/devtools-frontend/src/front_end/third_party/web-vitals
- third_party/devtools-frontend/src/third_party
- third_party/dom_distiller_js
- third_party/dragonbox
- third_party/eigen3
- third_party/emoji-segmenter
- third_party/farmhash
- third_party/fast_float
- third_party/fdlibm
- third_party/federated_compute/chromium/fcp/confidentialcompute
- third_party/federated_compute/chromium/fcp/protos
- third_party/federated_compute/chromium/fcp/secagg
- third_party/federated_compute/chromium/fcp/client
- third_party/federated_compute/src/fcp/base
- third_party/federated_compute/src/fcp/confidentialcompute
- third_party/federated_compute/src/fcp/protos
- third_party/federated_compute/src/fcp/client
- third_party/federated_compute/src/fcp/secagg
- third_party/federated_compute/third_party/googleapis/src/google
- third_party/federated_compute/third_party/tensorflow-federated
- third_party/federated_compute/third_party/protodatastore-cpp
- third_party/fft2d
- third_party/flatbuffers
- third_party/fp16
- third_party/freetype
- third_party/fusejs
- third_party/fxdiv
- third_party/gemmlowp
- third_party/google_input_tools
- third_party/google_input_tools/third_party/closure_library
- third_party/google_input_tools/third_party/closure_library/third_party/closure
- third_party/googletest
- third_party/gperf # We symlink system gperf, but this will purge the symlink since we tidy up afterwards.
- third_party/highway
- third_party/hunspell
- third_party/hyphenation-patterns
- third_party/ink/src/ink/brush
- third_party/ink/src/ink/color
- third_party/ink/src/ink/geometry
- third_party/ink/src/ink/rendering
- third_party/ink/src/ink/rendering/skia/common_internal
- third_party/ink/src/ink/rendering/skia/native
- third_party/ink/src/ink/rendering/skia/native/internal
- third_party/ink/src/ink/strokes
- third_party/ink/src/ink/types
- third_party/inspector_protocol
- third_party/ipcz
- third_party/jinja2
- )
- use system-jsoncpp || keeplibs+=(
- third_party/jsoncpp
- )
- keeplibs+=(
- third_party/khronos
- third_party/lens_server_proto
- third_party/leveldatabase
- third_party/libaddressinput
- third_party/libdrm
- third_party/libgav1
- third_party/libjingle
- third_party/libpfm4
- third_party/libphonenumber
- third_party/libpng
- third_party/libsecret
- third_party/libsrtp
- third_party/libsync
- third_party/libtess2/libtess2
- third_party/libtess2/src/Include
- third_party/libtess2/src/Source
- third_party/liburlpattern
- )
- use system-libusb || keeplibs+=(
- third_party/libusb
- )
- keeplibs+=(
- third_party/libva_protected_content
- )
- use system-libvpx || keeplibs+=(
- third_party/libvpx
- third_party/libvpx/source/libvpx/third_party/x86inc
- )
- keeplibs+=(
- third_party/libwebm
- third_party/libx11
- third_party/libxcb-keysyms
- third_party/libxml/chromium
- third_party/libyuv
- third_party/libzip
- third_party/lit
- )
- use libcxx && keeplibs+=(
- third_party/llvm-libc
- third_party/llvm-libc/src/shared/
- )
- keeplibs+=(
- third_party/lottie
- third_party/lss
- third_party/lzma_sdk
- third_party/mako
- third_party/markupsafe
- third_party/material_color_utilities
- third_party/metrics_proto
- third_party/minigbm
- third_party/ml_dtypes
- third_party/modp_b64
- third_party/nasm
- third_party/nearby
- third_party/neon_2_sse
- third_party/node
- third_party/oak/chromium/proto
- third_party/oak/chromium/proto/attestation
- third_party/omnibox_proto
- third_party/one_euro_filter
- third_party/openscreen
- third_party/openscreen/src/third_party/
- third_party/openscreen/src/third_party/tinycbor/src/src
- third_party/ots
- third_party/pdfium
- third_party/pdfium/third_party/agg23
- third_party/pdfium/third_party/bigint
- third_party/pdfium/third_party/freetype
- third_party/pdfium/third_party/lcms
- )
- use system-openjpeg || keeplibs+=(
- third_party/pdfium/third_party/libopenjpeg
- )
- keeplibs+=(
- third_party/pdfium/third_party/libtiff
- third_party/perfetto
- third_party/perfetto/protos/third_party/android
- third_party/perfetto/protos/third_party/chromium
- third_party/perfetto/protos/third_party/pprof
- third_party/perfetto/protos/third_party/primes
- third_party/perfetto/protos/third_party/simpleperf
- third_party/pffft
- third_party/ply
- third_party/polymer
- third_party/private_membership
- third_party/private-join-and-compute
- third_party/protobuf
- third_party/protobuf/third_party/utf8_range
- third_party/pthreadpool
- third_party/puffin
- third_party/pyjson5
- third_party/pyyaml
- third_party/rapidhash
- third_party/readability
- third_party/rnnoise
- third_party/rust
- third_party/ruy
- third_party/s2cellid
- third_party/search_engines_data
- third_party/securemessage
- third_party/selenium-atoms
- third_party/sentencepiece
- third_party/sentencepiece/src/third_party/darts_clone
- third_party/shell-encryption
- third_party/simdutf
- third_party/simplejson
- third_party/six
- third_party/skia
- third_party/skia/include/third_party/vulkan
- third_party/smhasher
- )
- use system-snappy || keeplibs+=(
- third_party/snappy
- )
- keeplibs+=(
- third_party/spirv-headers
- third_party/spirv-tools
- third_party/sqlite
- third_party/swiftshader
- third_party/swiftshader/third_party/astc-encoder
- third_party/swiftshader/third_party/llvm-subzero
- third_party/swiftshader/third_party/marl
- third_party/swiftshader/third_party/SPIRV-Headers/include/spirv
- third_party/swiftshader/third_party/SPIRV-Tools
- third_party/swiftshader/third_party/subzero
- third_party/tensorflow_models
- third_party/tensorflow-text
- third_party/tflite
- third_party/tflite/src/third_party/fft2d
- third_party/tflite/src/third_party/xla/third_party/tsl
- third_party/tflite/src/third_party/xla/xla/tsl/framework
- third_party/tflite/src/third_party/xla/xla/tsl/lib/random
- third_party/tflite/src/third_party/xla/xla/tsl/platform
- third_party/tflite/src/third_party/xla/xla/tsl/protobuf
- third_party/tflite/src/third_party/xla/xla/tsl/util
- third_party/ukey2
- third_party/utf
- third_party/vulkan
- third_party/wayland
- third_party/webdriver
- third_party/webgpu-cts
- third_party/webrtc
- third_party/webrtc/common_audio/third_party/ooura
- third_party/webrtc/common_audio/third_party/spl_sqrt_floor
- third_party/webrtc/modules/third_party/fft
- third_party/webrtc/modules/third_party/g711
- third_party/webrtc/modules/third_party/g722
- third_party/widevine
- )
- use system-woff2 || keeplibs+=(
- third_party/woff2
- )
- keeplibs+=(
- third_party/wuffs
- third_party/x11proto
- third_party/xcbproto
- third_party/xnnpack
- third_party/zlib/google
- third_party/zxcvbn-cpp
- url/third_party/mozilla
- v8/third_party/glibc
- v8/third_party/inspector_protocol
- v8/third_party/rapidhash-v8
- v8/third_party/siphash
- v8/third_party/utf8-decoder
- v8/third_party/v8
- v8/third_party/valgrind
-
- # gyp -> gn leftovers
- third_party/speech-dispatcher
- third_party/usb_ids
- )
-
- if use test; then
- keeplibs+=(
- third_party/breakpad/breakpad/src/processor
- third_party/fuzztest
- third_party/google_benchmark/src/include/benchmark
- third_party/google_benchmark/src/src
- third_party/test_fonts
- third_party/test_fonts/fontconfig
- third_party/test_fonts/test_fonts
- )
- fi
-
- # USE=system-*
- if ! use system-harfbuzz; then
- keeplibs+=( third_party/harfbuzz )
- fi
-
- if ! use system-ffmpeg; then
- keeplibs+=( third_party/ffmpeg third_party/opus )
- fi
-
- if ! use system-icu; then
- keeplibs+=( third_party/icu )
- fi
-
- if ! use system-zstd; then
- keeplibs+=( third_party/zstd )
- fi
-
- if ! use system-av1; then
- keeplibs+=(
- third_party/dav1d
- third_party/libaom
- third_party/libaom/source/libaom/third_party/fastfeat
- third_party/libaom/source/libaom/third_party/vector
- third_party/libaom/source/libaom/third_party/x86inc
- )
- fi
-
- if use libcxx; then
- keeplibs+=(
- third_party/libc++
- third_party/llvm-libc
- )
- fi
-
- if ! use system-openh264; then
- keeplibs+=( third_party/openh264 )
- fi
-
- if ! use system-re2; then
- keeplibs+=( third_party/re2 )
- fi
-
- # Arch-specific
- if use arm64 || use ppc64 ; then
- keeplibs+=( third_party/swiftshader/third_party/llvm-10.0 )
- fi
- # we need to generate ppc64 stuff because upstream does not ship it yet
- # it has to be done before unbundling.
- if use ppc64; then
- pushd third_party/libvpx >/dev/null || die
- mkdir -p source/config/linux/ppc64 || die
- # requires git and clang, bug #832803
- # Revert https://chromium.googlesource.com/chromium/src/+/b463d0f40b08b4e896e7f458d89ae58ce2a27165%5E%21/third_party/libvpx/generate_gni.sh
- # and https://chromium.googlesource.com/chromium/src/+/71ebcbce867dd31da5f8b405a28fcb0de0657d91%5E%21/third_party/libvpx/generate_gni.sh
- # since we're not in a git repo
- sed -i -e "s|^update_readme||g; s|clang-format|${EPREFIX}/bin/true|g; /^git -C/d; /git cl/d; /cd \$BASE_DIR\/\$LIBVPX_SRC_DIR/ign format --in-place \$BASE_DIR\/BUILD.gn\ngn format --in-place \$BASE_DIR\/libvpx_srcs.gni" \
- generate_gni.sh || die
- ./generate_gni.sh || die
- popd >/dev/null || die
-
- pushd third_party/ffmpeg >/dev/null || die
- cp libavcodec/ppc/h264dsp.c libavcodec/ppc/h264dsp_ppc.c || die
- cp libavcodec/ppc/h264qpel.c libavcodec/ppc/h264qpel_ppc.c || die
- popd >/dev/null || die
- fi
-
- # Sanity check keeplibs, on major version bumps it is often necessary to update this list
- # and this enables us to hit them all at once.
- # There are some entries that need to be whitelisted (TODO: Why? The file is understandable, the rest seem odd)
- whitelist_libs=(
- net/third_party/quic
- third_party/devtools-frontend/src/front_end/third_party/additional_readme_paths.json
- third_party/libjingle
- third_party/mesa
- third_party/skia/third_party/vulkan
- third_party/vulkan
- )
- local not_found_libs=()
- for lib in "${keeplibs[@]}"; do
- if [[ ! -d "${lib}" ]] && ! has "${lib}" "${whitelist_libs[@]}"; then
- not_found_libs+=( "${lib}" )
- fi
- done
-
- if [[ ${#not_found_libs[@]} -gt 0 ]]; then
- ewarn "The following \`keeplibs\` directories were not found in the source tree:"
- for lib in "${not_found_libs[@]}"; do
- ewarn " ${lib}"
- done
- fi
-
- keeplibs+=( third_party/ungoogled )
-
- # Remove most bundled libraries. Some are still needed.
- einfo "Unbundling third-party libraries ..."
- build/linux/unbundle/remove_bundled_libraries.py "${keeplibs[@]}" --do-remove || die
-
- # Interferes with our bundled clang path; we don't want stripped binaries anyway.
- sed -i -e 's|${clang_base_path}/bin/llvm-strip|/bin/true|g' \
- -e 's|${clang_base_path}/bin/llvm-objcopy|/bin/true|g' \
- build/linux/strip_binary.gni || die
-}
-
-src_configure() {
- # Calling this here supports resumption via FEATURES=keepwork
- python_setup
-
- # 974899: sometimes people try to build with a non-Unicode locale and python gets very upset
- python_export_utf8_locale || die "Chromium builds require a UTF-8 locale."
-
- # Bug 491582.
- export TMPDIR="${WORKDIR}/temp"
- mkdir -p -m 755 "${TMPDIR}" || die
-
- # https://bugs.gentoo.org/654216
- addpredict /dev/dri/ #nowarn
-
- # Use system-provided libraries.
- # TODO: freetype -- remove sources (https://bugs.chromium.org/p/pdfium/issues/detail?id=733).
- # TODO: use_system_hunspell (upstream changes needed).
- # TODO: use_system_protobuf (bug #525560).
- # TODO: use_system_sqlite (http://crbug.com/22208).
-
- # libevent: https://bugs.gentoo.org/593458
- local gn_system_libraries=(
- flac
- fontconfig
- freetype
- libjpeg
- libwebp
- libxml
- libxslt
- zlib
- )
- if use system-abseil-cpp; then
- gn_system_libraries+=(
- absl_algorithm
- absl_base
- absl_cleanup
- absl_container
- absl_crc
- absl_debugging
- absl_flags
- absl_functional
- absl_hash
- absl_log
- absl_log_internal
- absl_memory
- absl_meta
- absl_numeric
- absl_random
- absl_status
- absl_strings
- absl_synchronization
- absl_time
- absl_types
- absl_utility
- )
- fi
- if use system-brotli; then
- gn_system_libraries+=( brotli )
- fi
- if use system-crc32c; then
- gn_system_libraries+=( crc32c )
- fi
- if use system-double-conversion; then
- gn_system_libraries+=( double-conversion )
- fi
- if use system-woff2; then
- gn_system_libraries+=( woff2 )
- fi
- if use nvidia; then
- gn_system_libraries+=( libXNVCtrl )
- fi
- if use system-ffmpeg; then
- gn_system_libraries+=( ffmpeg opus )
- fi
- if use system-jsoncpp; then
- gn_system_libraries+=( jsoncpp )
- fi
- if use system-icu; then
- gn_system_libraries+=( icu )
- fi
- if use system-zstd; then
- gn_system_libraries+=( zstd )
- fi
- if use system-av1; then
- gn_system_libraries+=( dav1d libaom )
- fi
- if use system-libusb; then
- gn_system_libraries+=( libusb )
- fi
- if use system-libvpx; then
- gn_system_libraries+=( libvpx )
- fi
- use system-openh264 && gn_system_libraries+=(
- openh264
- )
- use system-re2 && gn_system_libraries+=(
- re2
- )
- use system-snappy && gn_system_libraries+=(
- snappy
- )
-
- build/linux/unbundle/replace_gn_files.py --system-libraries "${gn_system_libraries[@]}" ||
- die "Failed to replace GN files for system libraries"
-
- # TODO 131: The above call clobbers `enable_freetype = true` in the freetype gni file
- # drop the last line, then append the freetype line and a new curly brace to end the block
- local freetype_gni="build/config/freetype/freetype.gni"
- sed -i -e '$d' ${freetype_gni} || die
- echo " enable_freetype = true" >> ${freetype_gni} || die
- echo "}" >> ${freetype_gni} || die
-
- if use !custom-cflags; then
- replace-flags "-Os" "-O2"
- strip-flags
- # Debug info section overflows without component build
- # Prevent linker from running out of address space, bug #471810 .
- filter-flags "-g*"
- # 949123: Several multimedia components explicitly build with specific CFLAGS and
- # use runtime detection to enable optimisations; unfortunately any of our CFLAGS are suffixed
- # to the end of the command line, which causes build failures.
- fi
- # Since M150 `skia` will begin breaking for x86_64 due to compilation of `avx512` code paths;
- # we need to filter these for all arches.
- filter-flags "-march*" "-mtune*" "-mcpu*"
-
- # We don't use the same clang version as upstream, and with -Werror
- # we need to make sure that we don't get superfluous warnings.
- append-flags -Wno-unknown-warning-option
- if tc-is-cross-compiler; then # can you cross-compile with the bundled toolchain?
- export BUILD_CXXFLAGS+=" -Wno-unknown-warning-option"
- export BUILD_CFLAGS+=" -Wno-unknown-warning-option"
- fi
-
- # Start building our GN options
- local myconf_gn=() # Tip: strings must be quoted, bools or numbers are fine
-
- if use !bundled-toolchain; then
- # We already forced the "correct" clang via pkg_setup
-
- if tc-is-cross-compiler; then
- CC="${CC} -target ${CHOST} --sysroot ${ESYSROOT}"
- CXX="${CXX} -target ${CHOST} --sysroot ${ESYSROOT}"
- BUILD_AR=${AR}
- BUILD_CC=${CC}
- BUILD_CXX=${CXX}
- BUILD_NM=${NM}
- fi
-
- # Make sure the build system will use the right tools, bug #340795.
- tc-export AR CC CXX NM
-
- strip-unsupported-flags
- append-ldflags -Wl,--undefined-version # https://bugs.gentoo.org/918897#c32
-
- myconf_gn+=(
- "is_clang=true"
- "clang_use_chrome_plugins=false"
- "use_clang_modules=false" # M141 enables this for the linux platform by default.
- 'custom_toolchain="//build/toolchain/linux/unbundle:default"'
- # From M127 we need to provide a location for libclang and the clang resource dir so that bindgen can find them
- "bindgen_libclang_path=\"$(get_llvm_prefix)/$(get_libdir)\""
- "bindgen_clang_resource_dir=\"${EPREFIX}/usr/lib/clang/${LLVM_SLOT}/include\""
- "bindgen_extra_clang_args=[\"-I${EPREFIX}/usr/lib/clang/${LLVM_SLOT}/include\"]"
- "clang_base_path=\"${EPREFIX}/usr/lib/clang/${LLVM_SLOT}/\""
- "rust_bindgen_root=\"${EPREFIX}/usr/\""
- "rust_sysroot_absolute=\"$(get_rust_prefix)\""
- "rustc_version=\"${RUST_SLOT}\""
- )
-
- # Currently disabled, runtime issues with mold
- #if tc-ld-is-mold; then
- # myconf_gn+=(
- # "use_mold=true"
- # "use_lld=false"
- # "linker_path=\"${EPREFIX}/usr/bin/mold\""
- # )
- #else
- myconf_gn+=( "use_lld=true" )
- #fi
-
- if [[ ${LLVM_SLOT} -lt 23 ]]; then
- # Workaround for -fsanitize-ignore-for-ubsan-feature (added in LLVM 23)
- myconf_gn+=( 'clang_has_ubsan_feature_ignore=false' )
- fi
-
- if ! tc-is-cross-compiler; then
- myconf_gn+=( 'host_toolchain="//build/toolchain/linux/unbundle:default"' )
- else
- tc-export BUILD_{AR,CC,CXX,NM}
- myconf_gn+=(
- 'host_toolchain="//build/toolchain/linux/unbundle:host"'
- 'v8_snapshot_toolchain="//build/toolchain/linux/unbundle:host"'
- "host_pkg_config=\"$(tc-getBUILD_PKG_CONFIG)\""
- "pkg_config=\"$(tc-getPKG_CONFIG)\""
- )
-
- # setup cups-config, build system only uses --libs option
- if use cups; then
- mkdir "${T}/cups-config" || die
- cp "${ESYSROOT}/usr/bin/${CHOST}-cups-config" "${T}/cups-config/cups-config" || die
- export PATH="${PATH}:${T}/cups-config"
- fi
-
- # Don't inherit PKG_CONFIG_PATH from environment
- local -x PKG_CONFIG_PATH=
- fi
-
- fi # !bundled-toolchain
-
- local myarch
- myarch="$(tc-arch)"
- case ${myarch} in
- amd64)
- # Bug 530248, 544702, 546984, 853646.
- use !custom-cflags && filter-flags -mno-mmx -mno-sse2 -mno-ssse3 -mno-sse4.1 \
- -mno-avx -mno-avx2 -mno-fma -mno-fma4 -mno-xop -mno-sse4a
- myconf_gn+=( 'target_cpu="x64"' )
- ;;
- x86)
- # Bug 530248, 544702, 546984, 853646.
- use !custom-cflags && filter-flags -mno-mmx -mno-sse2 -mno-ssse3 -mno-sse4.1 \
- -mno-avx -mno-avx2 -mno-fma -mno-fma4 -mno-xop -mno-sse4a
- myconf_gn+=( 'target_cpu="x86"' )
- ;;
- arm64)
- myconf_gn+=( 'target_cpu="arm64"' )
- ;;
- ppc64)
- myconf_gn+=( 'target_cpu="ppc64"' )
- ;;
- *)
- die "Failed to determine target arch, got '${myarch}'."
- ;;
- esac
-
- # Common options
-
- myconf_gn+=(
- # Disable code formating of generated files
- "blink_enable_generated_code_formatting=false"
- # enable DCHECK with USE=debug only, increases chrome binary size by 30%, bug #811138.
- # DCHECK is fatal by default, make it configurable at runtime, #bug 807881.
- "dcheck_always_on=$(usex debug true false)"
- "dcheck_is_configurable=$(usex debug true false)"
- # Chromium builds provided by Linux distros should disable the testing config
- "disable_fieldtrial_testing_config=true"
- # Custom patch: Enable building Chromium as individual channels (e.g. stable, beta, dev) that
- # use different profile directories, desktop entries, etc. This enables slotting the ebuild.
- "enable_channel_branding=true"
- # 131 began laying the groundwork for replacing freetype with
- # "Rust-based Fontations set of libraries plus Skia path rendering"
- # We now need to opt-in
- "enable_freetype=true"
- "enable_hangout_services_extension=$(usex hangouts true false)"
- # Don't need nocompile checks and GN crashes with our config (verify with modern GN)
- "enable_nocompile_tests=false"
- # pseudolocales are only used for testing
- "enable_pseudolocales=false"
- "enable_widevine=$(usex widevine true false)"
- # Disable fatal linker warnings, bug 506268.
- "fatal_linker_warnings=false"
- # Component build isn't generally intended for use by end users. It's mostly useful
- # for development and debugging.
- "is_component_build=false"
- # GN needs explicit config for Debug/Release as opposed to inferring it from build directory.
- "is_debug=false"
- "is_official_build=$(usex official true false)"
- # Enable ozone wayland and/or headless support
- "ozone_auto_platforms=false"
- "ozone_platform_headless=true"
- # Enables building without non-free unRAR licence
- "safe_browsing_use_unrar=false"
- # "thin_lto_enable_optimizations=${use_lto}"
- "treat_warnings_as_errors=false"
- # Use in-tree libc++ (buildtools/third_party/libc++ and buildtools/third_party/libc++abi)
- # instead of the system C++ library for C++ standard library support.
- # default: true, but let's be explicit (forced since 120 ; USE removed 127).
- "use_custom_libcxx=true"
- # Enable ozone wayland and/or headless support
- "use_ozone=true"
- # The sysroot is the oldest debian image that chromium supports, we don't need it
- "use_sysroot=false"
- # See dependency logic in third_party/BUILD.gn
- "use_system_harfbuzz=$(usex system-harfbuzz true false)"
- # "use_thin_lto=${use_lto}"
- # Only enabled for clang, but gcc has endian macros too
- "v8_use_libm_trig_functions=true"
- # use system go
- "tint_use_system_go=true"
- )
-
- myconf_gn+=( "enable_iterator_debugging=$(usex debug true false)" )
-
- if use debug; then
- myconf_gn+=(
- "symbol_level=2"
- "blink_symbol_level=2"
- "v8_symbol_level=2"
- )
- else
- myconf_gn+=(
- "symbol_level=0"
- "blink_symbol_level=0"
- "v8_symbol_level=0"
- )
- fi
-
- if use bindist ; then
- myconf_gn+=(
- # If this is set to false Chromium won't be able to load any proprietary codecs
- # even if provided with an ffmpeg capable of h264/aac decoding
- "proprietary_codecs=true"
- 'ffmpeg_branding="Chrome"'
- # build ffmpeg as an external component (libffmpeg.so) that we can remove / substitute
- "is_component_ffmpeg=true"
- )
- else
- myconf_gn+=(
- "proprietary_codecs=$(usex proprietary-codecs true false)"
- "ffmpeg_branding=\"$(usex proprietary-codecs Chrome Chromium)\""
- )
- fi
-
- if use headless; then
- myconf_gn+=(
- "enable_print_preview=false"
- "enable_remoting=false"
- 'ozone_platform="headless"'
- "rtc_use_pipewire=false"
- "use_alsa=false"
- "use_cups=false"
- "use_gio=false"
- "use_glib=false"
- "use_gtk=false"
- "use_kerberos=false"
- "use_libpci=false"
- "use_pangocairo=false"
- "use_pulseaudio=false"
- "use_qt5=false"
- "use_qt6=false"
- "use_udev=false"
- "use_vaapi=false"
- "use_xkbcommon=false"
- )
- else
- myconf_gn+=(
- "gtk_version=$(usex gtk4 4 3)"
- # link pulseaudio directly (DT_NEEDED) instead of using dlopen.
- # helps with automated detection of ABI mismatches and prevents silent errors.
- "link_pulseaudio=$(usex pulseaudio true false)"
- "ozone_platform_wayland=$(usex wayland true false)"
- "ozone_platform_x11=$(usex X true false)"
- "ozone_platform=\"$(usex wayland wayland x11)\""
- "rtc_use_pipewire=$(usex screencast true false)"
- # As above - link directly instead of dlopening
- "rtc_link_pipewire=$(usex screencast true false)"
- "use_cups=$(usex cups true false)"
- "use_kerberos=$(usex kerberos true false)"
- "use_pulseaudio=$(usex pulseaudio true false)"
- "use_qt5=false"
- "use_system_libffi=$(usex wayland true false)"
- "use_system_minigbm=true"
- "use_vaapi=$(usex vaapi true false)"
- "use_xkbcommon=true"
- )
- if use qt6; then
- local cbuild_libdir
- cbuild_libdir="$(get_libdir)"
- if tc-is-cross-compiler; then
- # Hack to workaround get_libdir not being able to handle CBUILD, bug #794181
- cbuild_libdir="$($(tc-getBUILD_PKG_CONFIG) --keep-system-libs --libs-only-L libxslt)"
- cbuild_libdir="${cbuild_libdir:2}"
- cbuild_libdir="${cbuild_libdir/% }"
- fi
- myconf_gn+=(
- "use_qt6=true"
- "moc_qt6_path=\"${EPREFIX}/usr/${cbuild_libdir}/qt6/libexec\""
- )
- else
- myconf_gn+=( "use_qt6=false" )
- fi
- fi
-
- # Explicitly disable ICU data file support for system-icu/headless builds.
- if use system-icu || use headless; then
- myconf_gn+=( "icu_use_data_file=false" )
- fi
-
- if use official; then
- # Allow building against system libraries in official builds
- sed -i 's/OFFICIAL_BUILD/GOOGLE_CHROME_BUILD/' \
- tools/generate_shim_headers/generate_shim_headers.py || die
- # Don't add symbols to build
- myconf_gn+=( "symbol_level=0" )
- fi
-
- if use pgo; then
- myconf_gn+=(
- "chrome_pgo_phase=2"
- "v8_enable_builtins_optimization=true"
- )
- else
- myconf_gn+=( "chrome_pgo_phase=0" )
- fi
-
- # Odds and ends
-
- # skipping typecheck is only supported on amd64, bug #876157
- if ! use amd64; then
- myconf_gn+=( "devtools_skip_typecheck=false" )
- fi
-
- # Disable external code space for V8 for ppc64. It is disabled for ppc64
- # by default, but cross-compiling on amd64 enables it again.
- if tc-is-cross-compiler && use ppc64; then
- myconf_gn+=( "v8_enable_external_code_space=false" )
- fi
-
- # This determines whether or not GN uses the bundled libcxx
- if use libcxx; then
- myconf_gn+=( "use_custom_libcxx=true" )
- else
- myconf_gn+=(
- "use_custom_libcxx=false"
- "use_llvm_libatomic=false"
- )
- append-cppflags -U_GLIBCXX_ASSERTIONS #See #318
- fi
-
- myconf_gn+=( "use_bluez=$(usex bluetooth true false)" )
-
- myconf_gn+=( "is_cfi=$(usex cfi true false)" )
-
- if use cfi; then
- myconf_gn+=(
- "use_cfi_icall=true"
- "use_cfi_cast=true"
- )
- fi
-
- myconf_gn+=(
- "optimize_webui=$(usex optimize-webui true false)"
- "use_system_freetype=$(usex system-harfbuzz true false)"
- "use_system_libopenjpeg2=$(usex system-openjpeg true false)"
- "enable_pdf=true"
- "use_system_lcms2=true"
- "enable_print_preview=true"
- "use_thin_lto=$(usex thinlto true false)"
- "thin_lto_enable_optimizations=$(usex optimize-thinlto true false)"
-
- # Ungoogled flags
- "build_with_tflite_lib=false"
- "enable_mdns=false"
- "enable_mse_mpeg2ts_stream_parser=$(usex proprietary-codecs true false)"
- "enable_remoting=false"
- "enable_reporting=false"
- "enable_service_discovery=false"
- "exclude_unwind_tables=true"
- "google_api_key=\"\""
- "google_default_client_id=\"\""
- "google_default_client_secret=\"\""
- "safe_browsing_mode=0"
- "use_official_google_api_keys=false"
- "use_unofficial_version_number=false"
-
- # "enable_swiftshader=false"
-
- # Additional flags
- # "perfetto_use_system_zlib=true"
- # "use_system_zlib=true"
- # "use_system_libjpeg=true"
- # "rtc_build_examples=false"
- # "enable_chromium_prelude=false"
- # "enable_updater=false"
- # "enable_update_notifications=false"
- # "enable_constraints=false"
- # "rtc_rusty_base64=false"
- # "v8_enable_temporal_support=false"
- # "media_use_symphonia=false"
- # "pdf_enable_rust_png=false"
- # "skia_use_libpng_encode=true"
- # "skia_use_libpng_decode=true"
- # "skia_use_rust_png_decode=false"
- # "skia_use_rust_png_encode=false"
- # "enable_jxl_decoder=false"
- )
-
- if use amd64 || use arm64; then
- myconf_gn+=(
- "v8_drumbrake_bounds_checks=true"
- # "v8_enable_drumbrake=true"
- )
- fi
-
- if use thinlto; then
- # We need to change the default value of import-instr-limit in
- # LLVM to limit the text size increase. The default value is
- # 100, and we change it to 30 to reduce the text size increase
- # from 25% to 10%. The performance number of page_cycler is the
- # same on two of the thinLTO configurations, we got 1% slowdown
- # on speedometer when changing import-instr-limit from 100 to 30.
- # append-ldflags "-Wl,-plugin-opt,-import-instr-limit=30"
- sed -i '/import_instr_limit = 5/{s++import_instr_limit = 30+;h};${x;/./{x;q0};x;q1}' \
- build/config/compiler/BUILD.gn || die
-
- append-ldflags "-Wl,--thinlto-jobs=$(makeopts_jobs)"
- fi
-
- # Facilitate deterministic builds (taken from build/config/compiler/BUILD.gn)
- append-cflags -Wno-builtin-macro-redefined
- append-cxxflags -Wno-builtin-macro-redefined
- append-cppflags "-D__DATE__= -D__TIME__= -D__TIMESTAMP__="
-
- local flags
- einfo "Building with the following compiler settings:"
- for flags in C{C,XX} AR NM RANLIB {C,CXX,CPP,LD}FLAGS \
- EXTRA_GN UGC_{SKIP_{PATCHES,SUBSTITUTION},KEEP_BINARIES} ; do
- einfo " ${flags} = \"${!flags}\""
- done
-
- # Since we build from tarballs, we need to set the channel here so that it can be used in the build.
- export CHROME_VERSION_EXTRA="${SLOT}"
-
- einfo "Configuring Chromium ..."
- # add a `-v` here if gn `hangs` to see which file it's getting stuck on.
- set -- gn gen --args="${myconf_gn[*]}${EXTRA_GN:+ ${EXTRA_GN}}" out/Release
- echo "$@"
- "$@" || die "Failed to configure Chromium"
-
- # The "if" below should not be executed unless testing
- if [ ! -z "${NODIE}" ]; then
- # List all args
- # gn args --list out/Release
-
- # Quick compiler check
- eninja -C out/Release protoc torque
- fi
-}
-
-src_compile() {
- # Final link uses lots of file descriptors.
- ulimit -n 2048
-
- # Calling this here supports resumption via FEATURES=keepwork
- python_setup
-
- # I hate doing this but upstream Rust have yet to come up with a better solution for
- # us poor packagers. Required for Split LTO units, which are required for CFI.
- export RUSTC_BOOTSTRAP=1
-
- # Don't inherit PYTHONPATH from environment, bug #789021, #812689
- local -x PYTHONPATH=
-
- # Build mksnapshot and pax-mark it.
- if use pax-kernel; then
- local x
- for x in mksnapshot v8_context_snapshot_generator code_cache_generator; do
- if tc-is-cross-compiler; then
- eninja -C out/Release "host/${x}"
- pax-mark m "out/Release/host/${x}"
- else
- eninja -C out/Release "${x}"
- pax-mark m "out/Release/${x}"
- fi
- done
- fi
-
- # Even though ninja autodetects number of CPUs, we respect
- # user's options, for debugging with -j 1 or any other reason.
- eninja -C out/Release chrome chrome_sandbox $(use test && echo "base_unittests")
-
- pax-mark m out/Release/chrome
-
- # This codepath does minimal patching, so we're at the mercy of upstream
- # CFLAGS. This is fine - we're not intending to force this on users
- # and we do a lot of flag 'management' anyway.
- if use bundled-toolchain; then
- QA_FLAGS_IGNORED="
- usr/lib64/chromium-browser/chrome
- usr/lib64/chromium-browser/chrome-sandbox
- usr/lib64/chromium-browser/chromedriver
- usr/lib64/chromium-browser/chrome_crashpad_handler
- usr/lib64/chromium-browser/libEGL.so
- usr/lib64/chromium-browser/libGLESv2.so
- usr/lib64/chromium-browser/libVkICD_mock_icd.so
- usr/lib64/chromium-browser/libVkLayer_khronos_validation.so
- usr/lib64/chromium-browser/libqt6_shim.so
- usr/lib64/chromium-browser/libvk_swiftshader.so
- usr/lib64/chromium-browser/libvulkan.so.1
- "
- fi
-
- use convert-dict && eninja -C out/Release convert_dict
-
- use enable-driver && eninja -C out/Release chromedriver
- #use suid && eninja -C out/Release chrome_sandbox
-
- # use enable-driver && mv out/Release/chromedriver{.unstripped,}
-
- rm -f out/Release/locales/*.pak.info || die
-
- # Generate support files (desktop file, manpage, etc.) See: #684550 #706786 #968958
- ${EPYTHON} "${FILESDIR}/generate-support-files.py" \
- --installdir "/usr/$(get_libdir)/ungoogled-chromium-browser" \
- --channel "${SLOT}" ||
- die "Failed to generate support files"
-}
-
-src_test() {
- # Tests may be flaky with usersandbox, and the test runner executes significantly faster without.
- # If you seem to be excluding too many tests for a particular milestone: comment them out, reboot, and
- # run the tests again. If that doesn't help, try FEATURES="-usersandbox" and send it because obviously the
- # chromium gods are not smiling upon you today. Do some runtime testing, obvs.
- local skip_tests=(
- # Wildcard exclusions (if all tests in a test suite are broken)
- 'AlternateTestParams/PartitionAllocDeathTest.RepeatedAllocReturnNullDirect/*'
- 'AlternateTestParams/PartitionAllocDeathTest.RepeatedReallocReturnNullDirect/*'
- 'AlternateTestParams/PartitionAllocTest.*' # 200+ tests, >= 1 crashes entire test runner with usersandbox.
- 'CheckExitCodeAfterSignalHandlerDeathTest.*'
- 'CriticalProcessAndThreadSpotChecks/HangWatcherAnyCriticalThreadTests.*'
- 'LazyThreadPoolTaskRunnerEnvironmentTest.*' # M142
- 'ToolsSanityTest.BadVirtualCall*'
- # requires en-us locale
- SysStrings.SysNativeMBAndWide
- SysStrings.SysNativeMBToWide
- SysStrings.SysWideToNativeMB
- # Specific test cases
- CancelableEventTest.BothCancelFailureAndSucceedOccurUnderContention
- FilePathTest.FromUTF8Unsafe_And_AsUTF8Unsafe
- HistogramTesterTest.PumaTestUniqueSample
- ImmediateCrashTest.ExpectedOpcodeSequence # M150
- PathServiceTest.CheckedGetFailure
- PlatformThreadTest.CanChangeThreadType
- RawPtrTest.SetLookupUsesGetForComparison # M146 ; also broken for alpine in M144.
- RustLogIntegrationTest.CheckAllSeverity
- StackCanary.ChangingStackCanaryCrashesOnReturn
- StackTraceDeathTest.StackDumpSignalHandlerIsMallocFree
- TestLauncherTools.TruncateSnippetFocusedMatchesFatalMessagesTest
- ThreadPoolEnvironmentConfig.CanUseBackgroundPriorityForWorker
- DriveInfoTest.GetFileDriveInfo
-
- )
- local test_filter="-$(IFS=:; printf '%s' "${skip_tests[*]}")"
- # test-launcher-bot-mode enables parallelism and plain output
- # Check individual tests with --gtest_filter=<test you want> --single-process-tests
- ./out/Release/base_unittests --test-launcher-bot-mode \
- --test-launcher-jobs="$(get_makeopts_jobs)" \
- --gtest_filter="${test_filter}" || die "Tests failed!"
-}
-
-src_install() {
- local browser_suffix
- if [[ "${SLOT}" != "stable" ]]; then
- browser_suffix="-${SLOT}"
- else
- browser_suffix=""
- fi
- local CHROMIUM_HOME="/usr/$(get_libdir)/ungoogled-chromium-browser${browser_suffix}"
- exeinto "${CHROMIUM_HOME}"
- doexe out/Release/chrome
-
- #newexe out/Release/chrome_sandbox chrome-sandbox
- #fperms 4755 "${CHROMIUM_HOME}/chrome-sandbox"
-
- use enable-driver && doexe out/Release/chromedriver
-
- #* https://github.com/ungoogled-software/ungoogled-chromium/pull/3563
- doexe out/Release/chrome_crashpad_handler
-
- if use convert-dict; then
- newexe "${FILESDIR}/update-dicts.sh" update-dicts.sh
- doexe out/Release/convert_dict
- fi
-
- ozone_auto_session () {
- use X && use wayland && ! use headless && echo true || echo false
- }
-
- cat <<- EOF > "${D}${CHROMIUM_HOME}/chromium-launcher.sh" || die
- #!/bin/bash
- # Wrapper to launch slotted Chromium via the chromium-common launcher script.
- export CHROME_DESKTOP="ungoogled-chromium-browser${browser_suffix}.desktop"
- export CHROME_EXEC_NAME="ungoogled-chromium-browser${browser_suffix}"
- export CHROME_VERSION_EXTRA="${SLOT}"
- export CHROME_WRAPPER="\$(readlink -f "\$0")"
- export OZONE_AUTO_SESSION=$(ozone_auto_session)
-
- exec /usr/libexec/chromium/chromium-launcher.sh "\$@"
- EOF
-
- chmod 755 "${D}${CHROMIUM_HOME}/chromium-launcher.sh" || die
-
- # It is important that we name the target "chromium-browser",
- # xdg-utils expect it; bug #355517.
- dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/ungoogled-chromium-browser${browser_suffix}
- # keep the old symlink around for consistency
- dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/ungoogled-chromium${browser_suffix}
-
- use enable-driver && dosym "${CHROMIUM_HOME}/chromedriver" /usr/bin/ungoogled-chromedriver${browser_suffix}
-
- pushd out/Release/locales > /dev/null || die
- chromium_remove_language_paks
- popd > /dev/null || die
-
- insinto "${CHROMIUM_HOME}"
- doins out/Release/*.bin
- doins out/Release/*.pak
- doins -r out/Release/hyphen-data
-
- if use bindist; then
- # We built libffmpeg as a component library, but we can't distribute it
- # with proprietary codec support. Remove it and make a symlink to the requested
- # system library.
- rm -f out/Release/libffmpeg.so \
- || die "Failed to remove bundled libffmpeg.so (with proprietary codecs)"
- # symlink the libffmpeg.so from either ffmpeg-chromium or ffmpeg[chromium].
- einfo "Creating symlink to libffmpeg.so from $(usex ffmpeg-chromium ffmpeg-chromium ffmpeg[chromium])..."
- dosym ../chromium/libffmpeg.so$(usex ffmpeg-chromium .${PV%%\.*} "") \
- /usr/$(get_libdir)/ungoogled-chromium-browser/libffmpeg.so
- fi
-
- (
- shopt -s nullglob
- local files=(out/Release/*.so out/Release/*.so.[0-9])
- [[ ${#files[@]} -gt 0 ]] && doins "${files[@]}"
- )
-
- if ! use system-icu && ! use headless; then
- doins out/Release/icudtl.dat
- fi
-
- doins -r out/Release/locales
- #doins -r out/Release/MEIPreload
-
- # Install vk_swiftshader_icd.json; bug #827861
- doins out/Release/vk_swiftshader_icd.json
-
- if [[ -d out/Release/swiftshader ]]; then
- insinto "${CHROMIUM_HOME}/swiftshader"
- doins out/Release/swiftshader/*.so
- fi
-
- use widevine && dosym WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so "${CHROMIUM_HOME}/libwidevinecdm.so"
-
- # Install icons
- local branding size
- for size in 16 24 32 48 64 128 256 ; do
- case ${size} in
- 16|32) branding="chrome/app/theme/default_100_percent/chromium" ;;
- *) branding="chrome/app/theme/chromium" ;;
- esac
- newicon -s ${size} "${branding}/product_logo_${size}.png" \
- ungoogled-chromium-browser${browser_suffix}.png
- done
-
- # Install desktop entry
- domenu out/Release/ungoogled-chromium-browser${browser_suffix}.desktop
-
- # Install GNOME default application entry (bug #303100).
- insinto /usr/share/gnome-control-center/default-apps
- doins out/Release/ungoogled-chromium-browser${browser_suffix}.xml
-
- # Install AppStream metadata
- insinto /usr/share/appdata
- doins out/Release/ungoogled-chromium-browser${browser_suffix}.appdata.xml
-
- # Install manpage; bug #684550
- doman out/Release/ungoogled-chromium-browser${browser_suffix}.1
- dosym ungoogled-chromium-browser${browser_suffix}.1 /usr/share/man/man1/ungoogled-chromium${browser_suffix}.1
-
- readme.gentoo_create_doc
-}
-
-pkg_postrm() {
- xdg_icon_cache_update
- xdg_desktop_database_update
-}
-
-pkg_postinst() {
- xdg_icon_cache_update
- xdg_desktop_database_update
- readme.gentoo_print_elog
-
- if use !headless && [[ -z "${REPLACING_VERSIONS}" ]]; then
- if use vaapi; then
- elog "Hardware-accelerated video decoding configuration:"
- elog
- elog "Chromium supports multiple backends for hardware acceleration. To enable one,"
- elog " Add to CHROMIUM_FLAGS in /etc/chromium/default:"
- elog
- elog "1. VA-API with OpenGL (recommended for most users):"
- elog " --enable-features=AcceleratedVideoDecodeLinuxGL"
- elog " VaapiVideoDecoder may need to be added as well, but try without first."
- elog
- if use wayland; then
- elog "2. Enhanced Wayland/EGL performance:"
- elog " --enable-features=AcceleratedVideoDecodeLinuxGL,AcceleratedVideoDecodeLinuxZeroCopyGL"
- elog
- fi
- if use X; then
- elog "$(usex wayland "3" "2"). VA-API with Vulkan:"
- elog " --enable-features=VaapiVideoDecoder,VaapiIgnoreDriverChecks,Vulkan,DefaultANGLEVulkan,VulkanFromANGLE"
- elog
- if use wayland; then
- elog " NOTE: Vulkan acceleration requires X11 and will not work under Wayland sessions."
- elog " Use OpenGL-based acceleration instead when running under Wayland."
- elog
- fi
- fi
- elog "Additional options:"
- elog " To enable hardware-accelerated encoding (if supported)"
- elog " add 'AcceleratedVideoEncoder' to your feature list"
- elog " VaapiIgnoreDriverChecks bypasses driver compatibility checks"
- elog " (may be needed for newer/unsupported hardware)"
- elog
- else
- elog "This Chromium build was compiled without VA-API support, which provides"
- elog "hardware-accelerated video decoding."
- fi
- if use screencast; then
- elog "Screencast is disabled by default at runtime. Either enable it"
- elog "by navigating to chrome://flags/#enable-webrtc-pipewire-capturer"
- elog "inside Chromium or add --enable-features=WebRTCPipeWireCapturer"
- elog "to CHROMIUM_FLAGS in /etc/chromium/default."
- elog
- elog "Additional setup may be required for screencasting to work."
- elog "See issue: https://github.com/PF4Public/gentoo-overlay/issues/314"
- fi
- if use gtk4; then
- elog "Chromium prefers GTK3 over GTK4 at runtime. To override this"
- elog "behaviour you need to pass --gtk-version=4, e.g. by adding it"
- elog "to CHROMIUM_FLAGS in /etc/chromium/default."
- fi
- if use widevine; then
- elog "widevine requires binary plugins, which are distributed separately"
- elog "Make sure you have www-plugins/chrome-binary-plugins installed"
- fi
- fi
-
- if systemd_is_booted && ! [[ -f "/etc/machine-id" ]]; then
- ewarn "The lack of an '/etc/machine-id' file on this system booted with systemd"
- ewarn "indicates that the Gentoo handbook was not followed to completion."
- ewarn ""
- ewarn "Chromium is known to behave unpredictably with this system configuration;"
- ewarn "please complete the configuration of this system before logging any bugs."
- fi
-
- # Stable slot doesn't change profile directory, and it's vanishingly unlikely that users will downgrade from dev.
- if [[ -n "${REPLACING_VERSIONS}" ]]; then
- local replacing_non_slotted=false
- # there could be more than one PVR
- for version in ${REPLACING_VERSIONS}; do
- if ver_test "${version}" -le "145.0.7632.116"; then
- replacing_non_slotted=true
- break
- fi
- done
- if ${replacing_non_slotted}; then
- ewarn "This version of Chromium has replaced a non-slotted ebuild."
- if [[ ${SLOT} != "stable" ]]; then
- ewarn "This channel has its own profile directory, so your existing profile will not be used."
- ewarn "To use your existing profile, either copy or move it to the new location."
- ewarn "See https://wiki.gentoo.org/wiki/Chromium#Profile_Directories for more information."
- ewarn ""
- fi
- ewarn "Any existing Progressive Web Apps (PWAs) will need to be reinstalled,"
- ewarn "or have the path in the desktop files updated to point to the new wrapper script."
- fi
- fi
-}
-
-eapply_wrapper () {
- if [ ! -z "${NODIE}" ]; then
- nonfatal eapply "$@"
- else
- eapply "$@"
- fi
-}
-
-git_wrapper () {
- if [ ! -z "${NODIE}" ]; then
- git "$@"
- else
- git "$@" || die
- fi
-}
-
-filter_wrapper () {
- einfo "Applying ${i##*/}"
- #? fuzz factor of 3 is OK?
- if [ ! -z "${NODIE}" ]; then
- filterdiff -p1 "${@:2}" < "$1" | patch -F 3 -p1
- else
- filterdiff -p1 "${@:2}" < "$1" | patch -F 3 -p1 || die
- fi
-}
diff --git a/www-client/ungoogled-chromium/ungoogled-chromium-151.0.7922.47_p1.ebuild b/www-client/ungoogled-chromium/ungoogled-chromium-151.0.7922.47_p1.ebuild
deleted file mode 100644
index 4ebd257dabe7..000000000000
--- a/www-client/ungoogled-chromium/ungoogled-chromium-151.0.7922.47_p1.ebuild
+++ /dev/null
@@ -1,2528 +0,0 @@
-# Copyright 2009-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-# Use following environment variables to customise the build
-# EXTRA_GN — pass extra options to gn
-# NINJAOPTS="-k0 -j8" useful to populate ccache even if ebuild is still failing
-# UGC_SKIP_PATCHES — space-separated list of patches to skip
-# UGC_KEEP_BINARIES — space-separated list of binaries to keep
-# UGC_SKIP_SUBSTITUTION — space-separated list of files to skip domain substitution
-
-# USE=bundled-toolchain is intended for users who want to use the same toolchain
-# as the upstream releases. It's also a good fallback in case we fall behind
-# and need to get a release out quickly (less likely with `dev` in-tree).
-# We can't rely on it as a default since the toolchain is only shipped for x86-64;
-# other architectures will need to use system toolchain.
-
-# Since m133 we are using CI-generated tarballs from
-# https://github.com/chromium-linux-tarballs/chromium-tarballs/
-
-# These are bit-for-bit identical to the official releases, but are built
-# using an external CI system that we have some control over, in case
-# issues pop up again with official tarball generation.
-
-GN_MIN_VER=0.2374
-# chromium-tools/get-chromium-toolchain-strings.py (or just use Chromicler)
-# Node for M145+ should be 24.12.0 but that's not packaged in Gentoo yet. See #969145
-TEST_FONT="9c07d19d9c5ee1ff94f717e6fb17e0c8c354e6f9"
-BUNDLED_CLANG_VER="llvmorg-23-init-10931-g20b6ec66-11"
-BUNDLED_RUST_VER="4c4205163abcbd089150.0.7871.18148b3efab796c543ba1ea687-5"
-RUST_SHORT_HASH=${BUNDLED_RUST_VER:0:10}-${BUNDLED_RUST_VER##*-}
-NODE_VER="24.16.0-r1"
-ESBUILD_VER="0.25.1"
-ROLLUP_VER="4.57.1" # currently manual.
-
-CHROMIUM_LANGS="af am ar as az be bg bn bs ca cs cy da de el en-GB es es-419 et eu fa fi fil
- fr fr-CA gl gu he hi hr hu hy id is it ja ka kk km kn ko ky lo lt lv mk ml mn mr ms my
- nb ne nl or pa pl pt-BR pt-PT ro ru si sk sl sq sr sr-Latn sv sw ta te th tr uk ur uz
- vi zh-CN zh-HK zh-TW zu"
-
-UGC_COMMIT_ID="6fda5bc707792220745f9d53c25e84b89ceaabe4"
-# UGC_PR_COMMITS=(
-# c917e096342e5b90eeea91ab1f8516447c8756cf
-# 5794e9d12bf82620d5f24505798fecb45ca5a22d
-# )
-
-CROMITE_COMMIT_ID="cb3baf14f52eb4365d017f640f85310735c19b79"
-
-declare -A CHROMIUM_COMMITS=(
-# ["fcfb1a42813f1e9d8babedc7bb2e0f06101a3151"]="." #148+
- ["-cf94ed446320d35c8613ed9b3ffb6e6a61bfcb5f"]="."
-# # ["-37c28a19804e47a68eabf3cf882a310689fc325b"]="." #disable style check for cromite
-# # ["cd5a0df905a28faa89ff2a4ab44f893f84dc4487"]="net/third_party/quiche/src"
-)
-
-LLVM_COMPAT=( 21 22 23 )
-PYTHON_COMPAT=( python3_{13..14} )
-PYTHON_REQ_USE="xml(+)"
-RUST_MIN_VER=1.91.0
-RUST_NEEDS_LLVM="yes please"
-RUST_OPTIONAL="yes" # Not actually optional, but we don't need system Rust (or LLVM) with USE=bundled-toolchain
-RUST_REQ_USE="rustfmt" # Upstream run rustfmt on bindgen output, so we need it to be available.
-
-inherit check-reqs chromium-2 desktop flag-o-matic llvm-r1 multiprocessing ninja-utils pax-utils
-inherit python-any-r1 readme.gentoo-r1 rust systemd toolchain-funcs xdg-utils
-
-DESCRIPTION="Modifications to Chromium for removing Google integration and enhancing privacy"
-HOMEPAGE="https://github.com/ungoogled-software/ungoogled-chromium"
-PPC64_HASH="a85b64f07b489b8c6fdb13ecf79c16c56c560fc6"
-PATCH_V="${PV%%\.*}"
-COPIUM_COMMIT="b00f26bb5e0781020da5f830981472a142c6baf1"
-SRC_URI="https://github.com/chromium-linux-tarballs/chromium-tarballs/releases/download/${PV/_*}/chromium-${PV/_*}-linux.tar.xz
- https://deps.gentoo.zip/www-client/chromium/rollup-wasm-node-${ROLLUP_VER}.tgz
- https://gitlab.com/Matt.Jolly/chromium-patches/-/archive/${PATCH_V}/chromium-patches-${PATCH_V}.tar.bz2
- !bundled-toolchain? (
- https://codeberg.org/selfisekai/copium/archive/${COPIUM_COMMIT}.tar.gz
- -> chromium-patches-copium-${COPIUM_COMMIT:0:10}.tar.gz
- )
- bundled-toolchain? (
- https://commondatastorage.googleapis.com/chromium-browser-clang/Linux_x64/clang-${BUNDLED_CLANG_VER}.tar.xz
- -> chromium-clang-${BUNDLED_CLANG_VER}.tar.xz
- https://commondatastorage.googleapis.com/chromium-browser-clang/Linux_x64/rust-toolchain-${BUNDLED_RUST_VER}-${BUNDLED_CLANG_VER%-*}.tar.xz
- -> chromium-rust-toolchain-${RUST_SHORT_HASH}-${BUNDLED_CLANG_VER%-*}.tar.xz
- )
- test? (
- https://chromium-fonts.storage.googleapis.com/${TEST_FONT} -> chromium-testfonts-${TEST_FONT:0:10}.tar.gz
- )
- ppc64? (
- https://gitlab.raptorengineering.com/raptor-engineering-public/chromium/openpower-patches/-/archive/${PPC64_HASH}/openpower-patches-${PPC64_HASH}.tar.bz2 -> chromium-openpower-${PPC64_HASH:0:10}.tar.bz2
- )
-"
-
-# Gentoo tarball:
-# https://chromium-tarballs.distfiles.gentoo.org/chromium-${PV/_*}.tar.xz -> chromium-${PV/_*}-gentoo.tar.xz
-
-# chromium-linux-tarballs
-# https://github.com/chromium-linux-tarballs/chromium-tarballs/releases/download/${PV/_*}/chromium-${PV/_*}-linux.tar.xz
-
-# Official tarball:
-# https://commondatastorage.googleapis.com/chromium-browser-official/chromium-${PV/_*}${LITE_TARBALL:+-lite}.tar.xz
-
-# https://gitweb.gentoo.org/proj/chromium-tools.git/tree/get-chromium-licences.py @ 145.0.7632.76
-LICENSE="Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD BSD-2 Base64 Boost-1.0 CC-BY-3.0 CC-BY-4.0 Clear-BSD FFT2D FTL"
-LICENSE+=" IJG ISC LGPL-2 LGPL-2.1 MIT MPL-1.1 MPL-2.0 Ms-PL PSF-2 SGI-B-2.0 SSLeay SunSoft Unicode-3.0"
-LICENSE+=" Unicode-DFS-2015 Unlicense UoI-NCSA ZLIB libtiff openssl"
-LICENSE+=" cromite? ( GPL-3 )"
-
-SLOT="beta"
-KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
-
-IUSE_SYSTEM_LIBS="abseil-cpp av1 brotli crc32c double-conversion ffmpeg +harfbuzz icu jsoncpp +libusb libvpx +openh264 openjpeg re2 snappy woff2 +zstd"
-IUSE="+X bindist bluetooth bundled-toolchain cfi convert-dict cups custom-cflags debug ffmpeg-chromium enable-driver gtk4 hangouts headless kerberos +libcxx nvidia +official optimize-thinlto optimize-webui override-data-dir pax-kernel pgo"
-IUSE+=" +proprietary-codecs pulseaudio qt6 screencast selinux test thinlto cromite vaapi wayland widevine cpu_flags_ppc_vsx3"
-RESTRICT="
- !bindist? ( bindist )
- !test? ( test )
- arm64? ( test )
- !system-ffmpeg? ( proprietary-codecs? ( bindist ) )
- !system-openh264? ( bindist )
- cromite? ( bindist )"
-
-REQUIRED_USE="
- !headless? ( || ( X wayland ) )
- screencast? ( wayland )
- ffmpeg-chromium? ( bindist proprietary-codecs )
- optimize-thinlto? ( thinlto )
- cfi? ( thinlto )
- x86? ( !thinlto !widevine )
- debug? ( !official )
- vaapi? ( !system-av1 !system-libvpx )
-"
-
-UGC_PV="${PV/_p/-}"
-UGC_PF="${PN}-${UGC_PV}"
-UGC_URL="https://github.com/ungoogled-software/${PN}/archive/"
-
-if [ -z "$UGC_COMMIT_ID" ]; then
- UGC_URL="${UGC_URL}${UGC_PV}.tar.gz -> ${UGC_PF}.tar.gz"
- UGC_WD="${WORKDIR}/${UGC_PF}"
-else
- UGC_URL="${UGC_URL}${UGC_COMMIT_ID}.tar.gz -> ${PN}-${UGC_COMMIT_ID}.tar.gz"
- UGC_WD="${WORKDIR}/ungoogled-chromium-${UGC_COMMIT_ID}"
-fi
-
-SRC_URI+="${UGC_URL}
-"
-
-if [ ! -z "${UGC_PR_COMMITS[*]}" ]; then
- for i in "${UGC_PR_COMMITS[@]}"; do
- SRC_URI+="https://github.com/ungoogled-software/${PN}/commit/$i.patch?full_index=true -> ${PN}-$i.patch
- "
- done
-fi
-
-if [ ! -z "${CHROMIUM_COMMITS[*]}" ]; then
- # for i in "${CHROMIUM_COMMITS[@]}"; do
- for i in "${!CHROMIUM_COMMITS[@]}"; do
- if [[ ${CHROMIUM_COMMITS[$i]} =~ webrtc ]]; then
- #TODO: is it safe to use this mirror?
- SRC_URI+="https://github.com/webrtc-mirror/webrtc/commit/${i/-}.patch?full_index=true -> webrtc-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ angle ]]; then
- SRC_URI+="https://github.com/google/angle/commit/${i/-}.patch?full_index=true -> angle-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ quiche ]]; then
- SRC_URI+="https://github.com/google/quiche/commit/${i/-}.patch?full_index=true -> quiche-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ dawn ]]; then
- SRC_URI+="https://github.com/google/dawn/commit/${i/-}.patch?full_index=true -> dawn-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ perfetto ]]; then
- SRC_URI+="https://github.com/google/perfetto/commit/${i/-}.patch?full_index=true -> perfetto-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ink ]]; then
- SRC_URI+="https://github.com/google/ink/commit/${i/-}.patch?full_index=true -> ink-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ vulkan-utility-libraries ]]; then
- SRC_URI+="https://github.com/KhronosGroup/Vulkan-Utility-Libraries/commit/${i/-}.patch?full_index=true -> vulkan-utility-libraries-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ruy ]]; then
- SRC_URI+="https://github.com/google/ruy/commit/${i/-}.patch?full_index=true -> ruy-${i/-}.patch
- "
- else
- SRC_URI+="https://github.com/chromium/chromium/commit/${i/-}.patch?full_index=true -> chromium-${i/-}.patch
- "
- fi
- done
-fi
-
-SRC_URI+="cromite? ( https://github.com/uazo/cromite/archive/${CROMITE_COMMIT_ID}.tar.gz -> cromite-${CROMITE_COMMIT_ID}.tar.gz )
-"
-
-for i in ${IUSE_SYSTEM_LIBS}; do
- [[ $i =~ ^(\+)?(.*)$ ]]
- IUSE+=" ${BASH_REMATCH[1]}system-${BASH_REMATCH[2]}"
-done
-
-COMMON_X_DEPEND="
- x11-libs/libXcomposite:=
- x11-libs/libXcursor:=
- x11-libs/libXdamage:=
- x11-libs/libXfixes:=
- >=x11-libs/libXi-1.6.0:=
- x11-libs/libXrandr:=
- x11-libs/libXrender:=
- x11-libs/libXtst:=
- x11-libs/libxshmfence:=
-"
-
-# sys-libs/zlib: https://bugs.gentoo.org/930365; -ng is not compatible.
-# We _could_ use the bundled minizip, but that's against policy.
-COMMON_SNAPSHOT_DEPEND="
- system-icu? ( >=dev-libs/icu-78:= )
- system-abseil-cpp? ( >=dev-cpp/abseil-cpp-20260107.0 )
- system-brotli? ( >=app-arch/brotli-9999 )
- system-crc32c? ( dev-libs/crc32c )
- system-double-conversion? ( dev-libs/double-conversion )
- system-woff2? ( media-libs/woff2 )
- system-snappy? ( app-arch/snappy )
- system-jsoncpp? ( dev-libs/jsoncpp )
- system-openjpeg? ( media-libs/openjpeg:2= )
- system-re2? ( >=dev-libs/re2-0.2019.08.01:= )
- system-libvpx? ( >=media-libs/libvpx-1.13.0:=[postproc] )
- system-libusb? ( virtual/libusb:1 )
- cromite? ( dev-util/patchutils )
- >=dev-libs/libxml2-2.12.4:=[icu]
- dev-libs/nspr:=
- >=dev-libs/nss-3.26:=
- dev-libs/libxslt:=
- media-libs/fontconfig:=
- >=media-libs/freetype-2.11.0-r1:=
- system-harfbuzz? ( >=media-libs/harfbuzz-3:0=[icu(-)] )
- media-libs/libjpeg-turbo:=
- media-libs/libpng:=
- system-zstd? ( >=app-arch/zstd-1.5.5:= )
- >=media-libs/libwebp-0.4.0:=
- media-libs/mesa:=[gbm(+)]
- >=media-libs/openh264-2.6.0:=
- system-av1? (
- >=media-libs/dav1d-1.0.0:=
- >=media-libs/libaom-3.7.0:=
- )
- sys-libs/zlib:=
- !headless? (
- dev-libs/glib:2
- >=media-libs/alsa-lib-1.0.19:=
- media-video/pipewire:=
- pulseaudio? (
- || (
- media-libs/libpulse
- >=media-sound/apulse-0.1.9
- )
- )
- sys-apps/pciutils:=
- kerberos? ( virtual/krb5 )
- vaapi? ( >=media-libs/libva-2.7:=[X?,wayland?] )
- X? (
- x11-base/xorg-proto:=
- x11-libs/libX11:=
- x11-libs/libxcb:=
- x11-libs/libXext:=
- )
- x11-libs/libxkbcommon:=
- wayland? (
- screencast? ( media-video/pipewire:= )
- dev-libs/libffi:=
- dev-libs/wayland:=
- screencast? (
- media-video/pipewire:=
- || (
- sys-apps/xdg-desktop-portal-gnome
- sys-apps/xdg-desktop-portal-gtk
- kde-plasma/xdg-desktop-portal-kde
- gui-libs/xdg-desktop-portal-lxqt
- gui-libs/xdg-desktop-portal-wlr
- )
- )
- )
- )
-"
-
-COMMON_DEPEND="
- ${COMMON_SNAPSHOT_DEPEND}
- app-arch/bzip2:=
- dev-libs/expat:=
- system-ffmpeg? (
- >=media-video/ffmpeg-6.1:=
- >=media-libs/opus-1.3.1:=
- )
- net-misc/curl[ssl]
- sys-apps/dbus:=
- media-libs/flac:=
- sys-libs/zlib:=[minizip]
- !headless? (
- >=app-accessibility/at-spi2-core-2.46.0:2
- media-libs/mesa:=[X?,wayland?]
- virtual/udev
- x11-libs/cairo:=
- x11-libs/gdk-pixbuf:2
- x11-libs/pango:=
- cups? ( >=net-print/cups-1.3.11:= )
- qt6? ( dev-qt/qtbase:6[gui,widgets] )
- X? ( ${COMMON_X_DEPEND} )
- )
-"
-RDEPEND="${COMMON_DEPEND}
- !www-client/ungoogled-chromium:0
- >=www-client/chromium-common-2
- !headless? (
- || (
- x11-libs/gtk+:3[X?,wayland?]
- gui-libs/gtk:4[X?,wayland?]
- )
- qt6? ( dev-qt/qtbase:6[X?,wayland?] )
- )
- virtual/ttf-fonts
- selinux? ( sec-policy/selinux-chromium )
- bindist? (
- ffmpeg-chromium? ( media-video/ffmpeg-chromium:${PV%%\.*} )
- )
- !override-data-dir? (
- !www-client/chromium:${SLOT}
- !www-client/cromite:${SLOT}[-override-data-dir]
- )
-"
-# For M149+ pipewire is a mandatory build-time dependency, but it's optional at runtime for most configurations.
-DEPEND="${COMMON_DEPEND}
- !headless? (
- media-video/pipewire
- gtk4? ( gui-libs/gtk:4[X?,wayland?] )
- !gtk4? ( x11-libs/gtk+:3[X?,wayland?] )
- )
-"
-
- # pgo? ( >=llvm-core/clang-22.0.0_pre20260106 >=llvm-core/lld-22.0.0_pre20260106 )
-BDEPEND="
- ${COMMON_SNAPSHOT_DEPEND}
- ${PYTHON_DEPS}
- $(python_gen_any_dep '
- dev-python/setuptools[${PYTHON_USEDEP}]
- ')
- >=app-arch/gzip-1.7
- !headless? (
- qt6? ( dev-qt/qtbase:6 )
- )
- !bundled-toolchain? ( $(llvm_gen_dep '
- llvm-core/clang:${LLVM_SLOT}
- llvm-core/llvm:${LLVM_SLOT}
- cfi? ( llvm-runtimes/clang-runtime:${LLVM_SLOT}[sanitize] )
- official? (
- !ppc64? ( llvm-runtimes/compiler-rt-sanitizers:${LLVM_SLOT}[cfi] )
- ) ')
- || (
- $(llvm_gen_dep 'llvm-core/lld:${LLVM_SLOT}')
- >=sys-devel/mold-2.41.0
- )
- ${RUST_DEPEND}
- )
- >=dev-util/bindgen-0.72.1
- >=dev-build/gn-${GN_MIN_VER}
- app-alternatives/ninja
- dev-lang/perl
- >=dev-util/gperf-3.2
- dev-util/esbuild:${ESBUILD_VER}
- dev-vcs/git
- >=net-libs/nodejs-${NODE_VER}[inspector]
- sys-apps/hwdata
- >=sys-devel/bison-2.4.3
- sys-devel/flex
- virtual/pkgconfig
- x11-misc/xdg-utils
-"
-
-if ! has chromium_pkg_die ${EBUILD_DEATH_HOOKS}; then
- EBUILD_DEATH_HOOKS+=" chromium_pkg_die";
-fi
-
-DISABLE_AUTOFORMATTING="yes"
-DOC_CONTENTS="
-Some web pages may require additional fonts to display properly.
-Try installing some of the following packages if some characters
-are not displayed properly:
-- media-fonts/arphicfonts
-- media-fonts/droid
-- media-fonts/ipamonafont
-- media-fonts/noto
-- media-fonts/ja-ipafonts
-- media-fonts/takao-fonts
-- media-fonts/wqy-microhei
-- media-fonts/wqy-zenhei
-
-To fix broken icons on the Downloads page, you should install an icon
-theme that covers the appropriate MIME types, and configure this as your
-GTK+ icon theme.
-
-For native file dialogs in KDE, install kde-apps/kdialog.
-
-To make password storage work with your desktop environment you may
-have install one of the supported credentials management applications:
-- app-crypt/libsecret (GNOME)
-- kde-frameworks/kwallet (KDE)
-If you have one of above packages installed, but don't want to use
-them in Chromium, then add --password-store=basic to CHROMIUM_FLAGS
-in /etc/chromium/default.
-"
-
-S="${WORKDIR}/chromium-${PV/_*}"
-
-python_check_deps() {
- python_has_version "dev-python/setuptools[${PYTHON_USEDEP}]"
-}
-
-pre_build_checks() {
- # Check build requirements: bugs #471810, #541816, #914220
- # We're going to start doing maths here on the size of an unpacked source tarball,
- # this should make updates easier as chromium continues to balloon in size.
- # xz -l /var/cache/distfiles/chromium-${PV}*.tar.xz
- local base_disk=9 # Round up
- use test && base_disk=$((base_disk + 5))
- local extra_disk=1 # Always include a little extra space
- local memory=4
- tc-is-cross-compiler && extra_disk=$((extra_disk * 2))
- if tc-is-lto || use pgo; then
- memory=$((memory * 2 + 1))
- tc-is-cross-compiler && extra_disk=$((extra_disk * 2)) # Double the requirements
- use pgo && extra_disk=$((extra_disk + 4))
- fi
- if is-flagq '-g?(gdb)?([1-9])'; then
- if use custom-cflags; then
- extra_disk=$((extra_disk + 5))
- fi
- memory=$((memory * 2))
- fi
- local CHECKREQS_MEMORY="${memory}G"
- local CHECKREQS_DISK_BUILD="$((base_disk + extra_disk))G"
- check-reqs_${EBUILD_PHASE_FUNC}
-}
-
-pkg_pretend() {
- if [[ ${MERGE_TYPE} != binary ]]; then
- # The pre_build_checks are all about compilation resources, no need to run it for a binpkg
- pre_build_checks
- fi
-
- if use headless; then
- local headless_unused_flags=("cups" "kerberos" "pulseaudio" "qt6" "vaapi" "wayland")
- for myiuse in ${headless_unused_flags[@]}; do
- use ${myiuse} && ewarn "Ignoring USE=${myiuse}, USE=headless is set."
- done
- fi
-
- if ! use bindist && use ffmpeg-chromium; then
- ewarn "Ignoring USE=ffmpeg-chromium, USE=bindist is not set."
- fi
- if use libcxx; then
- ewarn
- ewarn "Building with libcxx, please be aware that system-*"
- ewarn "and some other c++ dependencies need to be compiled"
- ewarn "with the same c++ library as ungoogled-chromium itself"
- ewarn "dev-libs/jsoncpp is most problematic, see #58 #49 #119 for details"
- ewarn "Simplest solution would be to disable corresponding system-* flags"
- ewarn
- fi
- if use cfi; then
- ewarn
- ewarn "Building with cfi is only possible if building with -stdlib=libc++"
- ewarn "Make sure all dependencies are also built this way, see #40"
- ewarn
- fi
- if use cromite; then
- ewarn
- ewarn "Cromite patches are very experimental and unstable"
- ewarn "Please consider testing them and giving feedback upstream:"
- ewarn "https://github.com/uazo/cromite/issues"
- ewarn "Not all patches are applied, let me know if others should be considered too"
- ewarn
- fi
-}
-
-pkg_setup() {
- if [[ ${MERGE_TYPE} != binary ]]; then
- # The pre_build_checks are all about compilation resources, no need to run it for a binpkg
- pre_build_checks
-
- # We haven't massaged any CFLAGS yet, so we want to do this before we force CC/CXX to prevent warnings.
- local want_lto="false"
- tc-is-lto && want_lto="true"
-
- # The linux:unbundle toolchain in GN grabs CC, CXX, CPP (etc) from the environment
- # We'll set these to clang here then use llvm-utils functions to very explicitly set these
- # to a sane value.
- # This is effectively the 'force-clang' path if GCC support is re-added.
- if use !bundled-toolchain; then
- llvm-r1_pkg_setup
- rust_pkg_setup
-
- # Forcing clang; respect llvm_slot_x to enable selection of impl via LLVM_COMPAT
- AR=llvm-ar
- CPP="${CHOST}-clang++-${LLVM_SLOT} -E"
- NM=llvm-nm
- CC="${CHOST}-clang-${LLVM_SLOT}"
- CXX="${CHOST}-clang++-${LLVM_SLOT}"
- fi
-
- # LTO in Chromium means LLVM ThinLTO, if GCC support is re-added
- # We'll need to handle that here too.
- use_lto="false"
- local lto_usable="true"
- if [[ "$want_lto" == "true" ]]; then
- if use arm64 && [[ "${LLVM_SLOT}" -lt 22 ]]; then
- einfo "LTO is broken with LLVM 21 on arm64, ignoring CFLAGS."
- lto_usable="false"
- else
- use_lto="true"
- fi
- # We can rely on GN to do this for us; without this builds
- # take significantly longer with LTO enabled.
- filter-lto
- fi
-
- if [[ "$use_lto" == "false" ]] && use official && [[ "$lto_usable" == "true" ]]; then
- einfo "USE=official selected and LTO not detected."
- einfo "It is _highly_ recommended that LTO be enabled for performance reasons"
- einfo "and to be consistent with the upstream \"official\" build optimisations."
- fi
-
- if [[ "$use_lto" == "false" ]] && use test; then
- die "Tests require CFI which requires LTO"
- fi
-
- export use_lto
-
- if tc-is-cross-compiler; then
- use pgo && die "The pgo USE flag cannot be used when cross-compiling"
- CPP="${CBUILD}-clang++-${LLVM_SLOT} -E"
- fi
-
- # Sanity checks for development convenience
- if ver_test $(gn --version || die) -lt ${GN_MIN_VER}; then
- die "dev-build/gn >= ${GN_MIN_VER} is required to build this Chromium"
- fi
-
- # Sometimes, when adding a new LLVM slot, devs (me) forget to install an appropriate lld.
- if tc-ld-is-lld; then
- local lld_ver=$(ld.lld --version | awk '{split($2,a,"."); print a[1]}' || die "Failed to check lld version")
- if [[ ${lld_ver} -lt ${LLVM_SLOT} ]]; then
- die "Your lld version (${lld_ver}) is too old for the selected LLVM slot (${LLVM_SLOT}). Please install a newer lld or select an older LLVM slot."
- fi
- fi
- fi
-
- chromium_suid_sandbox_check_kernel_config
-}
-
-src_unpack() {
- # # Here be dragons!
- # local XCLD="--exclude=chromium-${PV/_*}/third_party/instrumented_libs \
- # --exclude=chromium-${PV/_*}/third_party/llvm \
- # --exclude=chromium-${PV/_*}/third_party/llvm-build \
- # --exclude=chromium-${PV/_*}/third_party/node/linux \
- # --exclude=chromium-${PV/_*}/third_party/rust-src \
- # --exclude=chromium-${PV/_*}/third_party/rust-toolchain \
- # --exclude=chromium-${PV/_*}/build/linux/debian_bullseye_i386-sysroot \
- # --exclude=chromium-${PV/_*}/build/linux/debian_bullseye_amd64-sysroot \
- # --exclude=chromium-${PV/_*}/third_party/angle/third_party/VK-GL-CTS \
- # "
-
- # if ! use libcxx ; then
- # XCLD+=" --exclude=chromium-${PV/_*}/third_party/libc++"
- # fi
-
- # if ! use pgo ; then
- # XCLD+=" --exclude=chromium-${PV/_*}/chrome/build/pgo_profiles"
- # fi
-
- # einfo "Unpacking chromium-${PV/_*}.tar.xz to ${WORKDIR}"
- # # Gentoo tarball:
- # # tar ${XCLD} -xf "${DISTDIR}/chromium-${PV/_*}-gentoo.tar.xz" -C "${WORKDIR}" || die
- # tar ${XCLD} -xf "${DISTDIR}/chromium-${PV/_*}${LITE_TARBALL:+-lite}.tar.xz" -C "${WORKDIR}" || die
-
- # unpack ${UGC_URL#*->}
- # # unpack chromium-patches-${PATCH_V}.tar.bz2
- # # Warned you!
-
- unpack chromium-${PV/_*}-linux.tar.xz
- unpack chromium-patches-${PATCH_V}.tar.bz2
- # These should only be required when we're not using the official toolchain
- if use !bundled-toolchain; then
- unpack chromium-patches-copium-${COPIUM_COMMIT:0:10}.tar.gz
- fi
-
- if use test; then
- # This just contains a bunch of font files that need to be unpacked (or moved) to the correct location.
- local testfonts_dir="${WORKDIR}/chromium-${PV/_*}/third_party/test_fonts/test_fonts"
- local testfonts_tar="${DISTDIR}/chromium-testfonts-${TEST_FONT:0:10}.tar.gz"
- einfo "Unpacking test fonts ..."
- tar xf "${testfonts_tar}" -C "${testfonts_dir}" || die "Failed to unpack testfonts"
- fi
-
- # We need to manually unpack this since M126 else we'd unpack one toolchain over the other.
- # Since we're doing that anyway let's unpack to sensible locations to make symlink creation easier.
- if use bundled-toolchain; then
- einfo "Unpacking bundled Clang ..."
- mkdir -p "${WORKDIR}"/clang || die "Failed to create clang directory"
- tar xf "${DISTDIR}/chromium-clang-${BUNDLED_CLANG_VER}.tar.xz" -C "${WORKDIR}/clang" || die "Failed to unpack Clang"
- einfo "Unpacking bundled Rust ..."
- local rust_dir="${WORKDIR}/rust-toolchain"
- mkdir -p "${rust_dir}" || die "Failed to create rust toolchain directory"
- tar xf "${DISTDIR}/chromium-rust-toolchain-${RUST_SHORT_HASH}-${BUNDLED_CLANG_VER%-*}.tar.xz" -C "${rust_dir}" ||
- die "Failed to unpack Rust"
- fi
-
- if use ppc64; then
- unpack chromium-openpower-${PPC64_HASH:0:10}.tar.bz2
- fi
-
- # This is a dirty hack, but we need rollup to build successfully and it's proving to be challenging
- # to build locally due to deps
- unpack rollup-wasm-node-${ROLLUP_VER}.tgz
-
- if use cromite; then
- unpack cromite-${CROMITE_COMMIT_ID}.tar.gz
- fi
-
- unpack ${UGC_URL#*->}
-}
-
-remove_compiler_builtins() {
- # We can't use the bundled compiler builtins with the system toolchain
- # We used to `grep` then `sed`, but it was indirect. Combining the two into a single
- # `awk` command is more efficient and lets us document the logic more clearly.
-
- local pattern=' configs += [ "//build/config/clang:compiler_builtins" ]'
- local target='build/config/compiler/BUILD.gn'
-
- local tmpfile
- tmpfile=$(mktemp) || die "Failed to create temporary file."
-
- if awk -v pat="${pattern}" '
- BEGIN {
- match_found = 0
- }
-
- # If the delete countdown is active, decrement it and skip to the next line.
- d > 0 { d--; next }
-
- # If the current line matches the pattern...
- $0 == pat {
- match_found = 1 # ...set our flag to true.
- d = 2 # Set delete counter for this line and the next two.
- prev = "" # Clear the buffered previous line so it is not printed.
- next
- }
-
- # For any other line, print the buffered previous line.
- NR > 1 { print prev }
-
- # Buffer the current line to be printed on the next cycle.
- { prev = $0 }
-
- END {
- # Print the last line if it was not part of a deleted block.
- if (d == 0) { print prev }
-
- # If the pattern was never found, exit with a failure code.
- if (match_found == 0) {
- exit 1
- }
- }
- ' "${target}" > "${tmpfile}"; then
- # AWK SUCCEEDED (exit code 0): The pattern was found and edited.
- # This is to avoid gawk's `-i inplace` option which users complain about.
- mv "${tmpfile}" "${target}"
- else
- # AWK FAILED (exit code 1): The pattern was not found.
- rm -f "${tmpfile}"
- die "Awk patch failed: Pattern not found in ${target}."
- fi
-}
-
-src_prepare() {
- # Calling this here supports resumption via FEATURES=keepwork
- python_setup
-
- # We'll fill this in as we go. Patches go in chromium-patches.
- local PATCHES=()
-
- rm "${WORKDIR}/chromium-patches-${PATCH_V}/common/cr131-unbundle-icu-target.patch"
- if ver_test "${RUST_SLOT}" -ge "1.95.0"; then
- rm "${WORKDIR}/chromium-patches-${PATCH_V}/rust/cr146-fix-botched-bytemuck-roll.patch"
- sed -i '/SupportedLaneCount/d' third_party/rust/chromium_crates_io/vendor/bytemuck-v1/src/zeroable.rs || die
- sed -i '/SupportedLaneCount/d' third_party/rust/chromium_crates_io/vendor/bytemuck-v1/src/pod.rs || die
- fi
-
- #cp -f ${WORKDIR}/chromium-patches-${PATCH_V}/*-compiler.patch "${T}/compiler.patch"
- ##cp -f ${FILESDIR}/chromium-147-compiler.patch "${T}/compiler.patch"
- #if ! use custom-cflags; then #See #25 #92
- # sed -i '/default_stack_frames/Q' "${T}/compiler.patch" || die
- #fi
-
- PATCHES+=( "${WORKDIR}/chromium-patches-${PATCH_V}/common/" )
- PATCHES+=( "${FILESDIR}/restore-x86-r4.patch" )
-
- # https://issues.chromium.org/issues/442698344
- # Unreleased fontconfig changed magic numbers and google have rolled to this version
- if has_version "<=media-libs/fontconfig-2.17.1"; then
- PATCHES+=( "${FILESDIR}/chromium-142-work-with-old-fontconfig.patch" )
- fi
-
- if use bundled-toolchain; then
- # We need to symlink the toolchain into the expected location
- einfo "Symlinking Clang toolchain to expected location ..."
- mkdir -p third_party/llvm-build/ || die "Failed to create llvm-build directory"
- # the 'Chromium Linux Tarballs' seem to already have 'Release+Asserts/{lib,bin}'; not sure if this is an
- # upstream change - we're using the same scripts to build, theoretically. We'll still attempt to create
- # llvm-build, but we'll rm Release+Asserts and symlink directly.
- if [[ -d third_party/llvm-build/Release+Asserts ]]; then
- rm -r third_party/llvm-build/Release+Asserts || die "Failed to remove third_party/llvm-build/Release+Asserts"
- fi
- ln -s "${WORKDIR}"/clang third_party/llvm-build/Release+Asserts || die "Failed to bundle Clang"
- einfo "Symlinking Rust toolchain to expected location ..."
- # As above, so below
- if [[ -d third_party/rust-toolchain ]]; then
- rm -r third_party/rust-toolchain || die "Failed to remove third_party/rust-toolchain"
- fi
- ln -s "${WORKDIR}"/rust-toolchain third_party/rust-toolchain || die "Failed to bundle rust"
- cp "${WORKDIR}"/rust-toolchain/VERSION \
- "${WORKDIR}"/rust-toolchain/INSTALLED_VERSION || die "Failed to set rust version"
- else
- # We don't need our toolchain patches if we're using the official toolchain
-
- # Copium patches go here.
- PATCHES+=(
- "${WORKDIR}/copium/cr143-libsync-__BEGIN_DECLS.patch"
- "${WORKDIR}/copium/cr149-unbundle-minizip-undo-unicode.patch"
- )
-
- # Automate conditional application of chromium-patches
- # The directory structure is expected to be something like:
- # chromium-patches-145/
- # ├── toolchain/
- # │ ├── cr123-foo.patch
- # │ └── cr135-bar.patch
- # ├── llvm/
- # │ ├── cr144-baz.patch
- # │ └── lt-23/
- # │ └── cr145-bleeding-edge-llvm-feature.patch
- # Where `lt-23` means "apply this patch if the LLVM version is less than 23".
- # Only categories in `slot_map` will be checked for version constraints.
- shopt -s nullglob
- local -A slot_map=( [llvm]="${LLVM_SLOT}" [rust]="${RUST_SLOT}" )
-
- for category in "${WORKDIR}/chromium-patches-${PATCH_V}"/*/; do
- local category_name="${category%/}"
- category_name="${category_name##*/}"
-
- # Skip arch-specific categories
- if [[ "${category_name}" == "ppc64le" ]]; then
- use ppc64 || continue
- fi
-
- # We applied common patches above, no need to apply them again here
- [[ "${category_name}" == "common" ]] && continue
-
- # Unconditional patches for this category
- local category_patches=( "${category}"*.patch )
- [[ ${#category_patches[@]} -gt 0 ]] && PATCHES+=( "${category}" )
-
- # Version-constrained subdirectories (e.g., llvm/lt-23/)
- for constraint_dir in "${category}"*/; do
- local dir_name="${constraint_dir%/}"
- dir_name="${dir_name##*/}"
- if [[ "${dir_name}" =~ ^lt-(.*)$ && -v slot_map[${category_name}] ]]; then
- ver_test "${slot_map[${category_name}]}" -lt "${BASH_REMATCH[1]}" &&
- PATCHES+=( "${constraint_dir}" )
- fi
- done
- done
-
- shopt -u nullglob
-
- # Strictly speaking this doesn't need to be gated (no bundled toolchain for ppc64); it keeps the logic together
- if use ppc64; then
- local patchset_dir="${WORKDIR}/openpower-patches-${PPC64_HASH}/patches"
- # patch causes build errors on 4K page systems (https://bugs.gentoo.org/show_bug.cgi?id=940304)
- local page_size_patch="ppc64le/third_party/use-sysconf-page-size-on-ppc64.patch"
- local isa_3_patch="ppc64le/core/baseline-isa-3-0.patch"
- # Apply the OpenPOWER patches (check for page size and isa 3.0)
- openpower_patches=( $(grep -E "^ppc64le|^upstream" "${patchset_dir}/series" | grep -v "${page_size_patch}" |
- grep -v "${isa_3_patch}" || die) )
- for patch in "${openpower_patches[@]}"; do
- PATCHES+=( "${patchset_dir}/${patch}" )
- done
- if [[ $(getconf PAGESIZE) == 65536 ]]; then
- PATCHES+=( "${patchset_dir}/${page_size_patch}" )
- fi
- # We use vsx3 as a proxy for 'want isa3.0' (POWER9)
- if use cpu_flags_ppc_vsx3 ; then
- PATCHES+=( "${patchset_dir}/${isa_3_patch}" )
- fi
- fi
-
- remove_compiler_builtins
-
- # We can't rely on the eselect'd Rust to actually include rustfmt, so we'll point to the selected slot specifically.
- local suffix=""
- if [[ "${RUST_TYPE}" == "binary" ]]; then
- suffix="-bin-${RUST_SLOT}"
- else
- suffix="-${RUST_SLOT}"
- fi
- sed -i "s|/bin/rustfmt|/bin/rustfmt${suffix}|g" build/rust/rust_bindgen_generator.gni ||
- die "Failed to update rustfmt path"
-
- fi
-
- # Do this before we apply patches since (e.g.) ppc64 needs to patch rollup and it's easier in ${S}
- einfo "Moving rollup wasm-node package into place ..."
- mkdir -p third_party/devtools-frontend/src/node_modules/@rollup/wasm-node ||
- die "Failed to create node_modules/@rollup/wasm-node"
- mv "${WORKDIR}"/package/* third_party/devtools-frontend/src/node_modules/@rollup/wasm-node ||
- die "Failed to move rollup package"
-
- if [ ! -z "${CHROMIUM_COMMITS[*]}" ]; then
- # for i in "${CHROMIUM_COMMITS[@]}"; do
- for i in "${!CHROMIUM_COMMITS[@]}"; do
- if [[ ${CHROMIUM_COMMITS[$i]} =~ webrtc ]]; then
- patch_prefix="webrtc"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ angle ]]; then
- patch_prefix="angle"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ quiche ]]; then
- patch_prefix="quiche"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ dawn ]]; then
- patch_prefix="dawn"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ perfetto ]]; then
- patch_prefix="perfetto"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ink ]]; then
- patch_prefix="ink"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ vulkan-utility-libraries ]]; then
- patch_prefix="vulkan-utility-libraries"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ruy ]]; then
- patch_prefix="ruy"
- else
- patch_prefix="chromium"
- fi
- pushd "${CHROMIUM_COMMITS[$i]}" > /dev/null || die
- if [[ $i = -* ]]; then
- einfo "Reverting ${patch_prefix}-${i/-}.patch"
- git_wrapper apply -R --exclude="*unittest.cc" --exclude="DEPS" \
- -p1 < "${DISTDIR}/${patch_prefix}-${i/-}.patch"
- else
- einfo "Applying ${patch_prefix}-${i/-}.patch"
- git_wrapper apply --exclude="*unittest.cc" --exclude="DEPS" \
- -p1 < "${DISTDIR}/${patch_prefix}-${i/-}.patch"
- fi
- popd > /dev/null || die
- done
- fi
-
- if ! use bluetooth ; then
- PATCHES+=(
- "${FILESDIR}/disable-bluez-r7.patch"
- )
- fi
-
- if use convert-dict ; then
- PATCHES+=(
- "${FILESDIR}/chromium-ucf-dict-utility-r3.patch"
- )
- fi
-
- if ! use libcxx ; then
- PATCHES+=(
- "${FILESDIR}/fix-wayland-oncecallback-copy.patch"
- )
- fi
-
- if use system-ffmpeg; then
- PATCHES+=(
- "${FILESDIR}/chromium-141-opus-mp3.patch"
- "${FILESDIR}/chromium-135-hevc.patch"
- )
- sed -i "\!AVFMT_FLAG_NOH264PARSE!d" media/filters/ffmpeg_glue.cc || die
- ewarn "You need to expose \"av_stream_get_first_dts\" in ffmpeg via user patch"
- fi
-
- if use system-av1; then
- PATCHES+=(
- "${FILESDIR}/chromium-system-av1.patch"
- )
- fi
-
- if use system-libvpx; then
- PATCHES+=(
- "${FILESDIR}/chromium-system-libvpx.patch"
- )
- fi
-
- if use system-openjpeg ; then
- PATCHES+=(
- "${FILESDIR}/chromium-system-openjpeg-r4.patch"
- )
- fi
-
- # if use x86 ; then
- # #* Fixes a segfault in transport_security_state_generator
- # PATCHES+=(
- # "${FILESDIR}/fix-segfault-x86.patch"
- # )
- # fi
-
- # Testing all patches when NODIE is defined
- if [ ! -z "${NODIE}" ]; then
- for i in "${PATCHES[@]}"; do
- eapply_wrapper "$i"
- done
- nonfatal eapply_user
- else
- default
- fi
-
- if use cromite ; then
- BR_PA_PATH="${WORKDIR}/cromite-${CROMITE_COMMIT_ID}/build/patches"
-
- sed -i '/b\/components\/components_strings\.grd/,+10d' "${BR_PA_PATH}/Add-cromite-flags-support.patch" || die
- sed -i '/b\/chrome\/android\/java\/res\/xml\/privacy_preferences\.xml/,+13d' "${BR_PA_PATH}/Add-cromite-flags-support.patch" || die
- sed -i '/b\/android_webview\/support_library\/java\/src\/org\/chromium\/support_lib_glue/,+11d' "${BR_PA_PATH}/Client-hints-overrides.patch" || die
- sed -i '/webapps_strings.grdp" \/>/{s++webapps_strings.grdp" /><part file="cromite_components_strings_grd/placeholder.txt"/>+;h};${x;/./{x;q0};x;q1}' \
- components/components_strings.grd || die
-
- sed -i 's/absl::/std::/' "${BR_PA_PATH}/Add-a-proxy-configuration-page.patch" || die
-
- filterdiff -p1 "${BR_PA_PATH}/JIT-site-settings.patch" --exclude="content/browser/renderer_host/render_process_host_impl.cc" \
- > "${BR_PA_PATH}/JIT-site-settings.patch1"
- mv -f "${BR_PA_PATH}/JIT-site-settings.patch1" "${BR_PA_PATH}/JIT-site-settings.patch"
-
- BROMITE_PATCHES=(
- "${BR_PA_PATH}/bromite-build-utils.patch"
- "${BR_PA_PATH}/Battery-API-return-nothing.patch"
- "${BR_PA_PATH}/Multiple-fingerprinting-mitigations.patch"
- "${BR_PA_PATH}/Add-flag-to-configure-maximum-connections-per-host.patch"
- "${BR_PA_PATH}/Add-a-proxy-configuration-page.patch"
- "${BR_PA_PATH}/Enable-StrictOriginIsolation-and-SitePerProcess.patch"
- "${BR_PA_PATH}/Disable-requests-for-single-word-Omnibar-searches.patch"
- "${BR_PA_PATH}/Reduce-HTTP-headers-in-DoH-requests-to-bare-minimum.patch"
- "${BR_PA_PATH}/Client-hints-overrides.patch"
- "${BR_PA_PATH}/Disable-idle-detection.patch"
- "${BR_PA_PATH}/Disable-TLS-resumption.patch"
- "${BR_PA_PATH}/Remove-navigator.connection-info.patch"
-
- "${BR_PA_PATH}/AudioBuffer-AnalyserNode-fp-mitigations.patch"
- "${BR_PA_PATH}/Fonts-fingerprinting-mitigation.patch"
- "${BR_PA_PATH}/Content-settings-infrastructure.patch"
- "${BR_PA_PATH}/Add-autoplay-site-setting.patch"
- "${BR_PA_PATH}/Site-setting-for-images.patch"
- "${BR_PA_PATH}/JIT-site-settings.patch"
- "${BR_PA_PATH}/Add-webGL-site-setting.patch"
- "${BR_PA_PATH}/Add-webRTC-site-settings.patch"
- "${BR_PA_PATH}/Show-site-settings-for-cookies-javascript-and-ads.patch"
- "${BR_PA_PATH}/Viewport-Protection-flag.patch"
- "${BR_PA_PATH}/Revert-remove-allowscript-content-setting-secondary-url.patch"
- "${BR_PA_PATH}/Timezone-customization.patch"
- "${BR_PA_PATH}/Disable-speechSynthesis-getVoices-API.patch"
- "${BR_PA_PATH}/Remove-support-for-device-memory-and-cpu-recovery.patch"
- "${BR_PA_PATH}/Disable-Feeback-Collector.patch"
- "${BR_PA_PATH}/Disable-remote-altsvc-for-h3-connections.patch"
- "${BR_PA_PATH}/Add-cromite-flags-support.patch"
- "${BR_PA_PATH}/Enables-deactivation-of-the-js-debugger-statement.patch"
- )
- for i in "${BROMITE_PATCHES[@]}"; do
- if [[ "$i" =~ "Add-autoplay-site-setting.patch" ]] ||
- [[ "$i" =~ "JIT-site-settings.patch" ]] ||
- [[ "$i" =~ "Site-setting-for-images.patch" ]]; then
- einfo "Git binary patch: ${i##*/}"
- git_wrapper apply -p1 < "$i"
- else
- filter_wrapper "$i" --exclude="chrome/android/*"
- fi
- done
-
- #! conflicting patches
- sed -i '/browser_features.cc/,+17d' \
- "${UGC_WD}/patches/extra/ungoogled-chromium/add-flag-to-clear-data-on-exit.patch" || die
- sed -i 's$} // namespace features$BASE_FEATURE(kClearDataOnExit, "ClearDataOnExit", base::FEATURE_DISABLED_BY_DEFAULT);}$' \
- chrome/browser/browser_features.cc || die
- sed -i 's$} // namespace features$BASE_DECLARE_FEATURE(kClearDataOnExit);}$' \
- chrome/browser/browser_features.h || die
- sed -i 's$kChromeUIAboutHost,$kChromeUIAboutHost,"ungoogled-first-run",$' \
- chrome/common/webui_url_constants.cc || die
- sed -i '/chrome\/common\/webui_url_constants.cc/Q' \
- "${UGC_WD}/patches/extra/ungoogled-chromium/first-run-page.patch" || die
-
- #! normalise paths in py
- sed -i 's$os.path.dirname(include_file)$os.path.abspath(os.path.dirname(include_file))$' \
- build/bromite/gyp/cpp_bromite_include.py || die
- fi
-
- # if [[ ${LLVM_SLOT} == "19" ]]; then
- # # Upstream now hard depend on a feature that was added in LLVM 20.1, but we don't want to stabilise that yet.
- # # Do the temp file shuffle in case someone is using something other than `gawk`
- # {
- # awk '/config\("clang_warning_suppression"\) \{/ { print $0 " }"; sub(/clang/, "xclang"); print; next }
- # { print }' build/config/compiler/BUILD.gn > "${T}/build.gn" && \
- # mv "${T}/build.gn" build/config/compiler/BUILD.gn
- # } || die "Unable to disable warning suppression"
- # fi
-
- ## Not included in -lite tarballs, but we should check for it anyway.
- #if [[ -f third_party/node/linux/node-linux-x64/bin/node ]]; then
- # rm third_party/node/linux/node-linux-x64/bin/node || die
- #else
- # mkdir -p third_party/node/linux/node-linux-x64/bin || die
- #fi
- #ln -s "${EPREFIX}"/usr/bin/node third_party/node/linux/node-linux-x64/bin/node || die
-
- cp "${FILESDIR}/libusb.gn" build/linux/unbundle || die
- sed -i '/^REPLACEMENTS.*$/{s++REPLACEMENTS = {"libusb":"third_party/libusb/BUILD.gn",+;h};${x;/./{x;q0};x;q1}' \
- build/linux/unbundle/replace_gn_files.py || die
- sed -i '/^.*deps.*third_party\/jsoncpp.*$/{s++public_deps \+= [ "//third_party/jsoncpp" ]+;h};${x;/./{x;q0};x;q1}' \
- third_party/webrtc/rtc_base/BUILD.gn || die
-
- if use override-data-dir; then
- sed -i '/"chromium";/{s++"ungoogled-chromium";+;h};${x;/./{x;q0};x;q1}' \
- chrome/common/chrome_paths_linux.cc || die
- fi
-
- if use system-abseil-cpp; then
- eapply_wrapper "${FILESDIR}/chromium-147-system-abseil.patch"
-
- #! SFINAE mangling incompatibility between clang and gcc:
- #! https://github.com/llvm/llvm-project/issues/85656
- #! gcc: _ZN4absl12lts_202601074CordC1INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELi0EEEOT_
- #! clang: _ZN4absl12lts_202601074CordC1INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEETnNSt9enable_ifIXsr3std7is_sameIT_S8_EE5valueEiE4typeELi0EEEOSA_
- #! So, either this:
- eapply_wrapper "${FILESDIR}/chromium-141-system-abseil-cord.patch"
- #! or build with -fclang-abi-compat=17
-
- # cp -f /usr/include/absl/base/options.h third_party/abseil-cpp/absl/base/options.h
- # sed -i '/^#define ABSL_OPTION_USE_STD_ORDERING.*$/{s++#define ABSL_OPTION_USE_STD_ORDERING 1+;h};${x;/./{x;q0};x;q1}' \
- # third_party/abseil-cpp/absl/base/options.h || die
- fi
-
- #* Applying UGC PRs here
- if [ ! -z "${UGC_PR_COMMITS[*]}" ]; then
- pushd "${UGC_WD}" >/dev/null
- for i in "${UGC_PR_COMMITS[@]}"; do
- eapply_wrapper "${DISTDIR}/${PN}-$i.patch"
- done
- popd >/dev/null
- fi
-
- # From here we adapt ungoogled-chromium's patches to our needs
- local ugc_pruning_list="${UGC_WD}/pruning.list"
- local ugc_patch_series="${UGC_WD}/patches/series"
- local ugc_substitution_list="${UGC_WD}/domain_substitution.list"
-
- local ugc_unneeded=(
- # GN bootstrap
- extra/debian/gn/parallel
- # following Gentoo's Chromium
- core/ungoogled-chromium/build-with-wasm-rollup
- )
-
- if use cromite ; then
- einfo "Using fingerprinting patches from Cromite instead"
- ugc_unneeded+=(
- extra/bromite/fingerprinting-flags-client-rects-and-measuretext
- extra/bromite/flag-max-connections-per-host
- extra/bromite/flag-fingerprinting-canvas-image-data-noise
- extra/ungoogled-chromium/add-components-ungoogled
- extra/ungoogled-chromium/remove-pac-size-limit
- )
- fi
-
- # #* Temporary fix
- # sed -i "\!ios/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/icu/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/libjpeg_turbo/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/snappy/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/closure_compiler/!d" "${ugc_pruning_list}" || die
-
- # #* Didn't unpack them at the first place
- # sed -i "\!build/linux/debian_bullseye_i386-sysroot!d" "${ugc_pruning_list}" || die
- # sed -i "\!build/linux/debian_bullseye_amd64-sysroot!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/llvm-build!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/node/linux!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/rust-src!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/rust-toolchain!d" "${ugc_pruning_list}" || die
- # if ! use libcxx ; then
- # sed -i "\!third_party/libc!d" "${ugc_pruning_list}" || die
- # fi
- sed -i "s|debug('files|error('files|" \
- "${UGC_WD}/utils/prune_binaries.py" || die
- sed -i "\!third_party/node/linux!d" \
- "${UGC_WD}/utils/prune_binaries.py" || die
-
- local ugc_p ugc_dir
- for p in "${ugc_unneeded[@]}"; do
- einfo "Removing ${p}.patch"
- sed -i "\!${p}.patch!d" "${ugc_patch_series}" || die
- done
-
- if [ ! -z "${UGC_SKIP_PATCHES}" ]; then
- for p in ${UGC_SKIP_PATCHES}; do
- ewarn "Removing ${p}"
- sed -i "\!${p}!d" "${ugc_patch_series}" || die
- done
- fi
-
- if [ ! -z "${UGC_KEEP_BINARIES}" ]; then
- for p in ${UGC_KEEP_BINARIES}; do
- ewarn "Keeping binary ${p}"
- sed -i "\!${p}!d" "${ugc_pruning_list}" || die
- done
- fi
-
- if [ ! -z "${UGC_SKIP_SUBSTITUTION}" ]; then
- for p in ${UGC_SKIP_SUBSTITUTION}; do
- ewarn "No substitutions in ${p}"
- sed -i "\!${p}!d" "${ugc_substitution_list}" || die
- done
- fi
-
- ebegin "Pruning binaries"
- "${UGC_WD}/utils/prune_binaries.py" -q . "${UGC_WD}/pruning.list"
- eend $? || die
-
- ebegin "Applying ungoogled-chromium patches"
- "${UGC_WD}/utils/patches.py" -q apply . "${UGC_WD}/patches"
- eend $? || die
-
- ebegin "Applying domain substitution"
- "${UGC_WD}/utils/domain_substitution.py" -q apply -r "${UGC_WD}/domain_regex.list" -f "${UGC_WD}/domain_substitution.list" .
- eend $? || die
-
- # Sanity check esbuild version before we start removing files.
- # We _could_ patch the version check out - in theory esbuild upstream are being super conservative after
- # arch(AUR) packaged an `esbuild` binary and set ESBUILD_BINARY_PATH=/usr/bin/esbuild, causing much breakage,
- # but this is fine too and exactly matches what upstream are expecting.
- # https://github.com/evanw/esbuild/issues/2894
- local esbuild_js="${S}/third_party/devtools-frontend/src/node_modules/esbuild/lib/main.js"
- local found
- found=$(awk -F'"' '/if \(binaryVersion !==/ {print $2}' "${esbuild_js}")
- if [[ "${found}" != "${ESBUILD_VER}" ]]; then
- die "esbuild version mismatch: expected ${ESBUILD_VER}, found ${found}"
- fi
-
- elog "Removing bundled binaries from source tree ..."
- # Purge bundled ELF files: These are non-portable and will cause issues if used instead of system versions.
- # Use `--wasm` to also remove WebAssembly binaries, if desired - they're portable so shouldn't break builds.
- ${EPYTHON} "${FILESDIR}/bin-finder.py" --elf "${S}" | awk '{print $1}' | xargs rm -f ||
- die "Failed to remove bundled binaries"
-
- # And now we restore any that we actually need, from the host system
- local esbuild_path="${S}/third_party/devtools-frontend/src/third_party/esbuild"
- local -A restore_list=(
- ["/usr/bin/esbuild-${ESBUILD_VER}"]="${esbuild_path}/esbuild"
- ["/usr/bin/gperf"]="${S}/third_party/gperf/cipd/bin/gperf"
- ["/usr/bin/node"]="${S}/third_party/node/linux/node-linux-x64/bin/node"
- )
-
- for src in "${!restore_list[@]}"; do
- dst="${restore_list[${src}]}"
- if [[ -f "${src}" ]]; then
- einfo "Symlinking ${src} ..."
- # Make sure the parent dir exists; some tarballs don't include (e.g.) node's bindir
- mkdir -p "$(dirname "${dst}")" || die "Failed to create directory for ${dst}"
- ln -s "${src}" "${dst}" || die "Failed to symlink ${dst} from ${src}"
- if [[ ! -L "${dst}" || "$(readlink -f "${dst}")" != "${src}" ]]; then
- die "Symlink verification failed for ${dst} -> ${src}"
- fi
- else
- die "Expected to find ${src} to restore ${dst}, but it does not exist."
- fi
- done
-
- # adjust python interpreter version
- sed -i -e "s|\(^script_executable = \).*|\1\"${EPYTHON}\"|g" .gn || die
-
- # Use the system copy of hwdata's usb.ids; upstream is woefully out of date (2015!)
- sed 's|//third_party/usb_ids/usb.ids|/usr/share/hwdata/usb.ids|g' \
- -i services/device/public/cpp/usb/BUILD.gn || die "Failed to set system usb.ids path"
-
- # remove_bundled_libraries.py walks the source tree and looks for paths containing the substring 'third_party'
- # whitelist matches use the right-most matching path component, so we need to whitelist from that point down.
- local keeplibs=(
- base/third_party/cityhash
- )
- use system-double-conversion || keeplibs+=(
- base/third_party/double_conversion
- )
- keeplibs+=(
- base/third_party/icu
- base/third_party/nspr
- base/third_party/superfasthash
- base/third_party/symbolize
- base/third_party/xdg_user_dirs
- buildtools/third_party/libc++
- buildtools/third_party/libc++abi
- )
- use cromite && keeplibs+=(
- cromite_flags/third_party
- )
- keeplibs+=(
- net/third_party/mozilla_security_manager
- net/third_party/quic
- net/third_party/uri_template
- )
- use system-abseil-cpp || keeplibs+=(
- third_party/abseil-cpp
- )
- keeplibs+=(
- third_party/angle
- third_party/angle/src/common/third_party/xxhash
- third_party/angle/src/third_party/ceval
- )
- use nvidia || keeplibs+=(
- third_party/angle/src/third_party/libXNVCtrl
- )
- keeplibs+=(
- third_party/angle/src/third_party/volk
- third_party/anonymous_tokens
- third_party/apple_apsl
- third_party/axe-core
- third_party/bidimapper
- third_party/blink
- third_party/boringssl
- third_party/boringssl/src/third_party/fiat
- third_party/breakpad
- third_party/breakpad/breakpad/src/third_party/curl
- )
- use system-brotli || keeplibs+=(
- third_party/brotli
- )
- keeplibs+=(
- third_party/catapult
- third_party/catapult/common/py_vulcanize/third_party/rcssmin
- third_party/catapult/common/py_vulcanize/third_party/rjsmin
- third_party/catapult/third_party/beautifulsoup4-4.9.3
- third_party/catapult/third_party/html5lib-1.1
- third_party/catapult/third_party/polymer
- third_party/catapult/third_party/six
- third_party/catapult/third_party/typ
- third_party/catapult/tracing/third_party/d3
- third_party/catapult/tracing/third_party/gl-matrix
- third_party/catapult/tracing/third_party/jpeg-js
- third_party/catapult/tracing/third_party/jszip
- third_party/catapult/tracing/third_party/mannwhitneyu
- third_party/catapult/tracing/third_party/oboe
- third_party/catapult/tracing/third_party/pako
- third_party/ced
- third_party/cld_3
- third_party/closure_compiler
- )
- use libcxx && keeplibs+=(
- third_party/compiler-rt
- )
- keeplibs+=(
- third_party/content_analysis_sdk
- third_party/cpuinfo
- third_party/crabbyavif
- third_party/crashpad
- third_party/crashpad/crashpad/third_party/lss
- third_party/crashpad/crashpad/third_party/zlib
- )
- use system-crc32c || keeplibs+=(
- third_party/crc32c
- )
- keeplibs+=(
- third_party/cros_system_api
- third_party/d3
- third_party/dawn
- third_party/dawn/third_party/gn/webgpu-cts
- third_party/dawn/third_party/OpenGL-Registry
- third_party/dawn/third_party/renderdoc
- third_party/dawn/third_party/webgpu-headers
- third_party/depot_tools
- third_party/devscripts
- third_party/devtools-frontend
- third_party/devtools-frontend/src/front_end/third_party/acorn
- third_party/devtools-frontend/src/front_end/third_party/additional_readme_paths.json
- third_party/devtools-frontend/src/front_end/third_party/axe-core
- third_party/devtools-frontend/src/front_end/third_party/chromium
- third_party/devtools-frontend/src/front_end/third_party/codemirror
- third_party/devtools-frontend/src/front_end/third_party/csp_evaluator
- third_party/devtools-frontend/src/front_end/third_party/diff
- third_party/devtools-frontend/src/front_end/third_party/i18n
- third_party/devtools-frontend/src/front_end/third_party/intl-messageformat
- third_party/devtools-frontend/src/front_end/third_party/json5
- third_party/devtools-frontend/src/front_end/third_party/legacy-javascript
- third_party/devtools-frontend/src/front_end/third_party/lighthouse
- third_party/devtools-frontend/src/front_end/third_party/lit
- third_party/devtools-frontend/src/front_end/third_party/marked
- third_party/devtools-frontend/src/front_end/third_party/puppeteer
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/third_party/mitt
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/third_party/parsel-js
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/third_party/rxjs
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/third_party/urlpattern-polyfill
- third_party/devtools-frontend/src/front_end/third_party/source-map-scopes-codec
- third_party/devtools-frontend/src/front_end/third_party/third-party-web
- third_party/devtools-frontend/src/front_end/third_party/vscode.web-custom-data
- third_party/devtools-frontend/src/front_end/third_party/wasmparser
- third_party/devtools-frontend/src/front_end/third_party/web-vitals
- third_party/devtools-frontend/src/third_party
- third_party/dom_distiller_js
- third_party/dragonbox
- third_party/eigen3
- third_party/emoji-segmenter
- third_party/farmhash
- third_party/fast_float
- third_party/fdlibm
- third_party/federated_compute/chromium/fcp/confidentialcompute
- third_party/federated_compute/src/fcp/base
- third_party/federated_compute/src/fcp/confidentialcompute
- third_party/federated_compute/src/fcp/protos/confidentialcompute
- third_party/federated_compute/src/fcp/protos/federatedcompute
- third_party/fft2d
- third_party/flatbuffers
- third_party/fp16
- third_party/freetype
- third_party/fusejs
- third_party/fxdiv
- third_party/gemmlowp
- third_party/google_input_tools
- third_party/google_input_tools/third_party/closure_library
- third_party/google_input_tools/third_party/closure_library/third_party/closure
- third_party/googletest
- third_party/gperf # We symlink system gperf, but this will purge the symlink since we tidy up afterwards.
- third_party/highway
- third_party/hunspell
- third_party/hyphenation-patterns
- third_party/ink/src/ink/brush
- third_party/ink/src/ink/color
- third_party/ink/src/ink/geometry
- third_party/ink/src/ink/rendering
- third_party/ink/src/ink/rendering/skia/common_internal
- third_party/ink/src/ink/rendering/skia/native
- third_party/ink/src/ink/rendering/skia/native/internal
- third_party/ink/src/ink/strokes
- third_party/ink/src/ink/types
- third_party/inspector_protocol
- third_party/ipcz
- third_party/jinja2
- )
- use system-jsoncpp || keeplibs+=(
- third_party/jsoncpp
- )
- keeplibs+=(
- third_party/khronos
- third_party/lens_server_proto
- third_party/leveldatabase
- third_party/libaddressinput
- )
- use libcxx && keeplibs+=(
- third_party/libc++
- )
- keeplibs+=(
- third_party/libdrm
- third_party/libgav1
- third_party/libjingle
- third_party/libpfm4
- third_party/libphonenumber
- third_party/libpng
- third_party/libsecret
- third_party/libsrtp
- third_party/libsync
- third_party/libtess2/libtess2
- third_party/libtess2/src/Include
- third_party/libtess2/src/Source
- third_party/liburlpattern
- )
- use system-libusb || keeplibs+=(
- third_party/libusb
- )
- keeplibs+=(
- third_party/libva_protected_content
- )
- use system-libvpx || keeplibs+=(
- third_party/libvpx
- third_party/libvpx/source/libvpx/third_party/x86inc
- )
- keeplibs+=(
- third_party/libwebm
- third_party/libx11
- third_party/libxcb-keysyms
- third_party/libxml/chromium
- third_party/libyuv
- third_party/libzip
- third_party/lit
- )
- use libcxx && keeplibs+=(
- third_party/llvm-libc
- third_party/llvm-libc/src/shared/
- )
- keeplibs+=(
- third_party/lottie
- third_party/lss
- third_party/lzma_sdk
- third_party/mako
- third_party/markupsafe
- third_party/material_color_utilities
- third_party/metrics_proto
- third_party/minigbm
- third_party/ml_dtypes
- third_party/modp_b64
- third_party/nasm
- third_party/nearby
- third_party/neon_2_sse
- third_party/node
- third_party/oak/chromium/proto
- third_party/oak/chromium/proto/attestation
- third_party/omnibox_proto
- third_party/one_euro_filter
- third_party/openscreen
- third_party/openscreen/src/third_party/
- third_party/openscreen/src/third_party/tinycbor/src/src
- third_party/ots
- third_party/pdfium
- third_party/pdfium/third_party/agg23
- third_party/pdfium/third_party/bigint
- third_party/pdfium/third_party/freetype
- third_party/pdfium/third_party/lcms
- )
- use system-openjpeg || keeplibs+=(
- third_party/pdfium/third_party/libopenjpeg
- )
- keeplibs+=(
- third_party/pdfium/third_party/libtiff
- third_party/perfetto
- third_party/perfetto/protos/third_party/android
- third_party/perfetto/protos/third_party/chromium
- third_party/perfetto/protos/third_party/pprof
- third_party/perfetto/protos/third_party/primes
- third_party/perfetto/protos/third_party/simpleperf
- third_party/pffft
- third_party/ply
- third_party/polymer
- third_party/private_membership
- third_party/private-join-and-compute
- third_party/protobuf
- third_party/protobuf/third_party/utf8_range
- third_party/pthreadpool
- third_party/puffin
- third_party/pyjson5
- third_party/pyyaml
- third_party/rapidhash
- third_party/readability
- third_party/rnnoise
- third_party/rust
- third_party/ruy
- third_party/s2cellid
- third_party/search_engines_data
- third_party/securemessage
- third_party/selenium-atoms
- third_party/sentencepiece
- third_party/sentencepiece/src/third_party/darts_clone
- third_party/shell-encryption
- third_party/simdutf
- third_party/simplejson
- third_party/six
- third_party/skia
- third_party/skia/include/third_party/vulkan
- third_party/smhasher
- )
- use system-snappy || keeplibs+=(
- third_party/snappy
- )
- keeplibs+=(
- third_party/spirv-headers
- third_party/spirv-tools
- third_party/sqlite
- third_party/swiftshader
- third_party/swiftshader/third_party/astc-encoder
- third_party/swiftshader/third_party/llvm-subzero
- third_party/swiftshader/third_party/marl
- third_party/swiftshader/third_party/SPIRV-Headers/include/spirv
- third_party/swiftshader/third_party/SPIRV-Tools
- third_party/swiftshader/third_party/subzero
- third_party/tensorflow_models
- third_party/tensorflow-text
- third_party/tflite
- third_party/tflite/src/third_party/fft2d
- third_party/tflite/src/third_party/xla/third_party/tsl
- third_party/tflite/src/third_party/xla/xla/tsl/framework
- third_party/tflite/src/third_party/xla/xla/tsl/lib/random
- third_party/tflite/src/third_party/xla/xla/tsl/platform
- third_party/tflite/src/third_party/xla/xla/tsl/protobuf
- third_party/tflite/src/third_party/xla/xla/tsl/util
- third_party/ukey2
- third_party/utf
- third_party/vulkan
- third_party/wayland
- third_party/webdriver
- third_party/webgpu-cts
- third_party/webrtc
- third_party/webrtc/common_audio/third_party/ooura
- third_party/webrtc/common_audio/third_party/spl_sqrt_floor
- third_party/webrtc/modules/third_party/fft
- third_party/webrtc/modules/third_party/g711
- third_party/webrtc/modules/third_party/g722
- third_party/widevine
- )
- use system-woff2 || keeplibs+=(
- third_party/woff2
- )
- keeplibs+=(
- third_party/wuffs
- third_party/x11proto
- third_party/xcbproto
- third_party/xnnpack
- third_party/zlib/google
- third_party/zxcvbn-cpp
- url/third_party/mozilla
- v8/third_party/glibc
- v8/third_party/inspector_protocol
- v8/third_party/rapidhash-v8
- v8/third_party/siphash
- v8/third_party/utf8-decoder
- v8/third_party/v8
- v8/third_party/valgrind
-
- # gyp -> gn leftovers
- third_party/speech-dispatcher
- third_party/usb_ids
- )
-
- if use test; then
- keeplibs+=(
- third_party/breakpad/breakpad/src/processor
- third_party/fuzztest
- third_party/google_benchmark/src/include/benchmark
- third_party/google_benchmark/src/src
- third_party/test_fonts
- third_party/test_fonts/fontconfig
- third_party/test_fonts/test_fonts
- )
- fi
-
- # USE=system-*
- if ! use system-harfbuzz; then
- keeplibs+=( third_party/harfbuzz )
- fi
-
- if ! use system-ffmpeg; then
- keeplibs+=( third_party/ffmpeg third_party/opus )
- fi
-
- if ! use system-icu; then
- keeplibs+=( third_party/icu )
- fi
-
- if ! use system-zstd; then
- keeplibs+=( third_party/zstd )
- fi
-
- if ! use system-av1; then
- keeplibs+=(
- third_party/dav1d
- third_party/libaom
- third_party/libaom/source/libaom/third_party/fastfeat
- third_party/libaom/source/libaom/third_party/vector
- third_party/libaom/source/libaom/third_party/x86inc
- )
- fi
-
- if use libcxx; then
- keeplibs+=(
- third_party/libc++
- third_party/llvm-libc
- )
- fi
-
- if ! use system-openh264; then
- keeplibs+=( third_party/openh264 )
- fi
-
- if ! use system-re2; then
- keeplibs+=( third_party/re2 )
- fi
-
- # Arch-specific
- if use arm64 || use ppc64 ; then
- keeplibs+=( third_party/swiftshader/third_party/llvm-10.0 )
- fi
- # we need to generate ppc64 stuff because upstream does not ship it yet
- # it has to be done before unbundling.
- if use ppc64; then
- pushd third_party/libvpx >/dev/null || die
- mkdir -p source/config/linux/ppc64 || die
- # requires git and clang, bug #832803
- # Revert https://chromium.googlesource.com/chromium/src/+/b463d0f40b08b4e896e7f458d89ae58ce2a27165%5E%21/third_party/libvpx/generate_gni.sh
- # and https://chromium.googlesource.com/chromium/src/+/71ebcbce867dd31da5f8b405a28fcb0de0657d91%5E%21/third_party/libvpx/generate_gni.sh
- # since we're not in a git repo
- sed -i -e "s|^update_readme||g; s|clang-format|${EPREFIX}/bin/true|g; /^git -C/d; /git cl/d; /cd \$BASE_DIR\/\$LIBVPX_SRC_DIR/ign format --in-place \$BASE_DIR\/BUILD.gn\ngn format --in-place \$BASE_DIR\/libvpx_srcs.gni" \
- generate_gni.sh || die
- ./generate_gni.sh || die
- popd >/dev/null || die
-
- pushd third_party/ffmpeg >/dev/null || die
- cp libavcodec/ppc/h264dsp.c libavcodec/ppc/h264dsp_ppc.c || die
- cp libavcodec/ppc/h264qpel.c libavcodec/ppc/h264qpel_ppc.c || die
- popd >/dev/null || die
- fi
-
- # Sanity check keeplibs, on major version bumps it is often necessary to update this list
- # and this enables us to hit them all at once.
- # There are some entries that need to be whitelisted (TODO: Why? The file is understandable, the rest seem odd)
- whitelist_libs=(
- net/third_party/quic
- third_party/devtools-frontend/src/front_end/third_party/additional_readme_paths.json
- third_party/libjingle
- third_party/mesa
- third_party/skia/third_party/vulkan
- third_party/vulkan
- )
- local not_found_libs=()
- for lib in "${keeplibs[@]}"; do
- if [[ ! -d "${lib}" ]] && ! has "${lib}" "${whitelist_libs[@]}"; then
- not_found_libs+=( "${lib}" )
- fi
- done
-
- if [[ ${#not_found_libs[@]} -gt 0 ]]; then
- ewarn "The following \`keeplibs\` directories were not found in the source tree:"
- for lib in "${not_found_libs[@]}"; do
- ewarn " ${lib}"
- done
- fi
-
- keeplibs+=( third_party/ungoogled )
-
- # Remove most bundled libraries. Some are still needed.
- einfo "Unbundling third-party libraries ..."
- build/linux/unbundle/remove_bundled_libraries.py "${keeplibs[@]}" --do-remove || die
-
- # Interferes with our bundled clang path; we don't want stripped binaries anyway.
- sed -i -e 's|${clang_base_path}/bin/llvm-strip|/bin/true|g' \
- -e 's|${clang_base_path}/bin/llvm-objcopy|/bin/true|g' \
- build/linux/strip_binary.gni || die
-}
-
-src_configure() {
- # Calling this here supports resumption via FEATURES=keepwork
- python_setup
-
- # Bug 491582.
- export TMPDIR="${WORKDIR}/temp"
- mkdir -p -m 755 "${TMPDIR}" || die
-
- # https://bugs.gentoo.org/654216
- addpredict /dev/dri/ #nowarn
-
- # Use system-provided libraries.
- # TODO: freetype -- remove sources (https://bugs.chromium.org/p/pdfium/issues/detail?id=733).
- # TODO: use_system_hunspell (upstream changes needed).
- # TODO: use_system_protobuf (bug #525560).
- # TODO: use_system_sqlite (http://crbug.com/22208).
-
- # libevent: https://bugs.gentoo.org/593458
- local gn_system_libraries=(
- flac
- fontconfig
- freetype
- libjpeg
- libwebp
- libxml
- libxslt
- zlib
- )
- if use system-abseil-cpp; then
- gn_system_libraries+=(
- absl_algorithm
- absl_base
- absl_cleanup
- absl_container
- absl_crc
- absl_debugging
- absl_flags
- absl_functional
- absl_hash
- absl_log
- absl_log_internal
- absl_memory
- absl_meta
- absl_numeric
- absl_random
- absl_status
- absl_strings
- absl_synchronization
- absl_time
- absl_types
- absl_utility
- )
- fi
- if use system-brotli; then
- gn_system_libraries+=( brotli )
- fi
- if use system-crc32c; then
- gn_system_libraries+=( crc32c )
- fi
- if use system-double-conversion; then
- gn_system_libraries+=( double-conversion )
- fi
- if use system-woff2; then
- gn_system_libraries+=( woff2 )
- fi
- if use nvidia; then
- gn_system_libraries+=( libXNVCtrl )
- fi
- if use system-ffmpeg; then
- gn_system_libraries+=( ffmpeg opus )
- fi
- if use system-jsoncpp; then
- gn_system_libraries+=( jsoncpp )
- fi
- if use system-icu; then
- gn_system_libraries+=( icu )
- fi
- if use system-zstd; then
- gn_system_libraries+=( zstd )
- fi
- if use system-av1; then
- gn_system_libraries+=( dav1d libaom )
- fi
- if use system-libusb; then
- gn_system_libraries+=( libusb )
- fi
- if use system-libvpx; then
- gn_system_libraries+=( libvpx )
- fi
- use system-openh264 && gn_system_libraries+=(
- openh264
- )
- use system-re2 && gn_system_libraries+=(
- re2
- )
- use system-snappy && gn_system_libraries+=(
- snappy
- )
-
- build/linux/unbundle/replace_gn_files.py --system-libraries "${gn_system_libraries[@]}" ||
- die "Failed to replace GN files for system libraries"
-
- # TODO 131: The above call clobbers `enable_freetype = true` in the freetype gni file
- # drop the last line, then append the freetype line and a new curly brace to end the block
- local freetype_gni="build/config/freetype/freetype.gni"
- sed -i -e '$d' ${freetype_gni} || die
- echo " enable_freetype = true" >> ${freetype_gni} || die
- echo "}" >> ${freetype_gni} || die
-
- if use !custom-cflags; then
- replace-flags "-Os" "-O2"
- strip-flags
- # Debug info section overflows without component build
- # Prevent linker from running out of address space, bug #471810 .
- filter-flags "-g*"
- # 949123: Several multimedia components explicitly build with specific CFLAGS and
- # use runtime detection to enable optimisations; unfortunately any of our CFLAGS are suffixed
- # to the end of the command line, which causes build failures.
- fi
- # Since M150 `skia` will begin breaking for x86_64 due to compilation of `avx512` code paths;
- # we need to filter these for all arches.
- filter-flags "-march*" "-mtune*" "-mcpu*"
-
- # We don't use the same clang version as upstream, and with -Werror
- # we need to make sure that we don't get superfluous warnings.
- append-flags -Wno-unknown-warning-option
- if tc-is-cross-compiler; then # can you cross-compile with the bundled toolchain?
- export BUILD_CXXFLAGS+=" -Wno-unknown-warning-option"
- export BUILD_CFLAGS+=" -Wno-unknown-warning-option"
- fi
-
- # Start building our GN options
- local myconf_gn=() # Tip: strings must be quoted, bools or numbers are fine
-
- if use !bundled-toolchain; then
- # We already forced the "correct" clang via pkg_setup
-
- if tc-is-cross-compiler; then
- CC="${CC} -target ${CHOST} --sysroot ${ESYSROOT}"
- CXX="${CXX} -target ${CHOST} --sysroot ${ESYSROOT}"
- BUILD_AR=${AR}
- BUILD_CC=${CC}
- BUILD_CXX=${CXX}
- BUILD_NM=${NM}
- fi
-
- # Make sure the build system will use the right tools, bug #340795.
- tc-export AR CC CXX NM
-
- strip-unsupported-flags
- append-ldflags -Wl,--undefined-version # https://bugs.gentoo.org/918897#c32
-
- myconf_gn+=(
- "is_clang=true"
- "clang_use_chrome_plugins=false"
- "use_clang_modules=false" # M141 enables this for the linux platform by default.
- 'custom_toolchain="//build/toolchain/linux/unbundle:default"'
- # From M127 we need to provide a location for libclang and the clang resource dir so that bindgen can find them
- "bindgen_libclang_path=\"$(get_llvm_prefix)/$(get_libdir)\""
- "bindgen_clang_resource_dir=\"${EPREFIX}/usr/lib/clang/${LLVM_SLOT}/include\""
- "bindgen_extra_clang_args=[\"-I${EPREFIX}/usr/lib/clang/${LLVM_SLOT}/include\"]"
- "clang_base_path=\"${EPREFIX}/usr/lib/clang/${LLVM_SLOT}/\""
- "rust_bindgen_root=\"${EPREFIX}/usr/\""
- "rust_sysroot_absolute=\"$(get_rust_prefix)\""
- "rustc_version=\"${RUST_SLOT}\""
- )
-
- if tc-ld-is-mold; then
- myconf_gn+=(
- "use_mold=true"
- "use_lld=false"
- "linker_path=\"${EPREFIX}/usr/bin/mold\""
- )
- else
- myconf_gn+=( "use_lld=true" )
- fi
-
- if [[ ${LLVM_SLOT} -lt 23 ]]; then
- # Workaround for -fsanitize-ignore-for-ubsan-feature (added in LLVM 23)
- myconf_gn+=( 'clang_has_ubsan_feature_ignore=false' )
- fi
-
- if ! tc-is-cross-compiler; then
- myconf_gn+=( 'host_toolchain="//build/toolchain/linux/unbundle:default"' )
- else
- tc-export BUILD_{AR,CC,CXX,NM}
- myconf_gn+=(
- 'host_toolchain="//build/toolchain/linux/unbundle:host"'
- 'v8_snapshot_toolchain="//build/toolchain/linux/unbundle:host"'
- "host_pkg_config=\"$(tc-getBUILD_PKG_CONFIG)\""
- "pkg_config=\"$(tc-getPKG_CONFIG)\""
- )
-
- # setup cups-config, build system only uses --libs option
- if use cups; then
- mkdir "${T}/cups-config" || die
- cp "${ESYSROOT}/usr/bin/${CHOST}-cups-config" "${T}/cups-config/cups-config" || die
- export PATH="${PATH}:${T}/cups-config"
- fi
-
- # Don't inherit PKG_CONFIG_PATH from environment
- local -x PKG_CONFIG_PATH=
- fi
-
- fi # !bundled-toolchain
-
- local myarch
- myarch="$(tc-arch)"
- case ${myarch} in
- amd64)
- # Bug 530248, 544702, 546984, 853646.
- use !custom-cflags && filter-flags -mno-mmx -mno-sse2 -mno-ssse3 -mno-sse4.1 \
- -mno-avx -mno-avx2 -mno-fma -mno-fma4 -mno-xop -mno-sse4a
- myconf_gn+=( 'target_cpu="x64"' )
- ;;
- x86)
- # Bug 530248, 544702, 546984, 853646.
- use !custom-cflags && filter-flags -mno-mmx -mno-sse2 -mno-ssse3 -mno-sse4.1 \
- -mno-avx -mno-avx2 -mno-fma -mno-fma4 -mno-xop -mno-sse4a
- myconf_gn+=( 'target_cpu="x86"' )
- ;;
- arm64)
- myconf_gn+=( 'target_cpu="arm64"' )
- ;;
- ppc64)
- myconf_gn+=( 'target_cpu="ppc64"' )
- ;;
- *)
- die "Failed to determine target arch, got '${myarch}'."
- ;;
- esac
-
- # Common options
-
- myconf_gn+=(
- # Disable code formating of generated files
- "blink_enable_generated_code_formatting=false"
- # enable DCHECK with USE=debug only, increases chrome binary size by 30%, bug #811138.
- # DCHECK is fatal by default, make it configurable at runtime, #bug 807881.
- "dcheck_always_on=$(usex debug true false)"
- "dcheck_is_configurable=$(usex debug true false)"
- # Chromium builds provided by Linux distros should disable the testing config
- "disable_fieldtrial_testing_config=true"
- # Custom patch: Enable building Chromium as individual channels (e.g. stable, beta, dev) that
- # use different profile directories, desktop entries, etc. This enables slotting the ebuild.
- "enable_channel_branding=true"
- # 131 began laying the groundwork for replacing freetype with
- # "Rust-based Fontations set of libraries plus Skia path rendering"
- # We now need to opt-in
- "enable_freetype=true"
- "enable_hangout_services_extension=$(usex hangouts true false)"
- # Don't need nocompile checks and GN crashes with our config (verify with modern GN)
- "enable_nocompile_tests=false"
- # pseudolocales are only used for testing
- "enable_pseudolocales=false"
- "enable_widevine=$(usex widevine true false)"
- # Disable fatal linker warnings, bug 506268.
- "fatal_linker_warnings=false"
- # Component build isn't generally intended for use by end users. It's mostly useful
- # for development and debugging.
- "is_component_build=false"
- # GN needs explicit config for Debug/Release as opposed to inferring it from build directory.
- "is_debug=false"
- "is_official_build=$(usex official true false)"
- # Enable ozone wayland and/or headless support
- "ozone_auto_platforms=false"
- "ozone_platform_headless=true"
- # Enables building without non-free unRAR licence
- "safe_browsing_use_unrar=false"
- # "thin_lto_enable_optimizations=${use_lto}"
- "treat_warnings_as_errors=false"
- # Use in-tree libc++ (buildtools/third_party/libc++ and buildtools/third_party/libc++abi)
- # instead of the system C++ library for C++ standard library support.
- # default: true, but let's be explicit (forced since 120 ; USE removed 127).
- "use_custom_libcxx=true"
- # Enable ozone wayland and/or headless support
- "use_ozone=true"
- # The sysroot is the oldest debian image that chromium supports, we don't need it
- "use_sysroot=false"
- # See dependency logic in third_party/BUILD.gn
- "use_system_harfbuzz=$(usex system-harfbuzz true false)"
- # "use_thin_lto=${use_lto}"
- # Only enabled for clang, but gcc has endian macros too
- "v8_use_libm_trig_functions=true"
- )
-
- myconf_gn+=( "enable_iterator_debugging=$(usex debug true false)" )
-
- if use debug; then
- myconf_gn+=(
- "symbol_level=2"
- "blink_symbol_level=2"
- "v8_symbol_level=2"
- )
- else
- myconf_gn+=(
- "symbol_level=0"
- "blink_symbol_level=0"
- "v8_symbol_level=0"
- )
- fi
-
- if use bindist ; then
- myconf_gn+=(
- # If this is set to false Chromium won't be able to load any proprietary codecs
- # even if provided with an ffmpeg capable of h264/aac decoding
- "proprietary_codecs=true"
- 'ffmpeg_branding="Chrome"'
- # build ffmpeg as an external component (libffmpeg.so) that we can remove / substitute
- "is_component_ffmpeg=true"
- )
- else
- myconf_gn+=(
- "proprietary_codecs=$(usex proprietary-codecs true false)"
- "ffmpeg_branding=\"$(usex proprietary-codecs Chrome Chromium)\""
- )
- fi
-
- if use headless; then
- myconf_gn+=(
- "enable_print_preview=false"
- "enable_remoting=false"
- 'ozone_platform="headless"'
- "rtc_use_pipewire=false"
- "use_alsa=false"
- "use_cups=false"
- "use_gio=false"
- "use_glib=false"
- "use_gtk=false"
- "use_kerberos=false"
- "use_libpci=false"
- "use_pangocairo=false"
- "use_pulseaudio=false"
- "use_qt5=false"
- "use_qt6=false"
- "use_udev=false"
- "use_vaapi=false"
- "use_xkbcommon=false"
- )
- else
- myconf_gn+=(
- "gtk_version=$(usex gtk4 4 3)"
- # link pulseaudio directly (DT_NEEDED) instead of using dlopen.
- # helps with automated detection of ABI mismatches and prevents silent errors.
- "link_pulseaudio=$(usex pulseaudio true false)"
- "ozone_platform_wayland=$(usex wayland true false)"
- "ozone_platform_x11=$(usex X true false)"
- "ozone_platform=\"$(usex wayland wayland x11)\""
- "rtc_use_pipewire=$(usex screencast true false)"
- "use_cups=$(usex cups true false)"
- "use_kerberos=$(usex kerberos true false)"
- "use_pulseaudio=$(usex pulseaudio true false)"
- "use_qt5=false"
- "use_system_libffi=$(usex wayland true false)"
- "use_system_minigbm=true"
- "use_vaapi=$(usex vaapi true false)"
- "use_xkbcommon=true"
- )
- if use qt6; then
- local cbuild_libdir
- cbuild_libdir="$(get_libdir)"
- if tc-is-cross-compiler; then
- # Hack to workaround get_libdir not being able to handle CBUILD, bug #794181
- cbuild_libdir="$($(tc-getBUILD_PKG_CONFIG) --keep-system-libs --libs-only-L libxslt)"
- cbuild_libdir="${cbuild_libdir:2}"
- cbuild_libdir="${cbuild_libdir/% }"
- fi
- myconf_gn+=(
- "use_qt6=true"
- "moc_qt6_path=\"${EPREFIX}/usr/${cbuild_libdir}/qt6/libexec\""
- )
- else
- myconf_gn+=( "use_qt6=false" )
- fi
- fi
-
- # Explicitly disable ICU data file support for system-icu/headless builds.
- if use system-icu || use headless; then
- myconf_gn+=( "icu_use_data_file=false" )
- fi
-
- if use official; then
- # Allow building against system libraries in official builds
- sed -i 's/OFFICIAL_BUILD/GOOGLE_CHROME_BUILD/' \
- tools/generate_shim_headers/generate_shim_headers.py || die
- # Don't add symbols to build
- myconf_gn+=( "symbol_level=0" )
- fi
-
- if use pgo; then
- myconf_gn+=(
- "chrome_pgo_phase=2"
- "v8_enable_builtins_optimization=true"
- )
- else
- myconf_gn+=( "chrome_pgo_phase=0" )
- fi
-
- # Odds and ends
-
- # skipping typecheck is only supported on amd64, bug #876157
- if ! use amd64; then
- myconf_gn+=( "devtools_skip_typecheck=false" )
- fi
-
- # Disable external code space for V8 for ppc64. It is disabled for ppc64
- # by default, but cross-compiling on amd64 enables it again.
- if tc-is-cross-compiler && use ppc64; then
- myconf_gn+=( "v8_enable_external_code_space=false" )
- fi
-
- # This determines whether or not GN uses the bundled libcxx
- if use libcxx; then
- myconf_gn+=( "use_custom_libcxx=true" )
- else
- myconf_gn+=(
- "use_custom_libcxx=false"
- "use_llvm_libatomic=false"
- )
- append-cppflags -U_GLIBCXX_ASSERTIONS #See #318
- fi
-
- myconf_gn+=( "use_bluez=$(usex bluetooth true false)" )
-
- myconf_gn+=( "is_cfi=$(usex cfi true false)" )
-
- if use cfi; then
- myconf_gn+=(
- "use_cfi_icall=true"
- "use_cfi_cast=true"
- )
- fi
-
- myconf_gn+=(
- "optimize_webui=$(usex optimize-webui true false)"
- "use_system_freetype=$(usex system-harfbuzz true false)"
- "use_system_libopenjpeg2=$(usex system-openjpeg true false)"
- "enable_pdf=true"
- "use_system_lcms2=true"
- "enable_print_preview=true"
- "use_thin_lto=$(usex thinlto true false)"
- "thin_lto_enable_optimizations=$(usex optimize-thinlto true false)"
-
- # Ungoogled flags
- "build_with_tflite_lib=false"
- "enable_mdns=false"
- "enable_mse_mpeg2ts_stream_parser=$(usex proprietary-codecs true false)"
- "enable_remoting=false"
- "enable_reporting=false"
- "enable_service_discovery=false"
- "exclude_unwind_tables=true"
- "google_api_key=\"\""
- "google_default_client_id=\"\""
- "google_default_client_secret=\"\""
- "safe_browsing_mode=0"
- "use_official_google_api_keys=false"
- "use_unofficial_version_number=false"
-
- # "enable_swiftshader=false"
-
- # Additional flags
- # "perfetto_use_system_zlib=true"
- # "use_system_zlib=true"
- # "use_system_libjpeg=true"
- # "rtc_build_examples=false"
- # "enable_chromium_prelude=false"
- # "enable_updater=false"
- # "enable_update_notifications=false"
- # "enable_constraints=false"
- # "rtc_rusty_base64=false"
- # "v8_enable_temporal_support=false"
- # "media_use_symphonia=false"
- # "pdf_enable_rust_png=false"
- # "skia_use_libpng_encode=true"
- # "skia_use_libpng_decode=true"
- # "skia_use_rust_png_decode=false"
- # "skia_use_rust_png_encode=false"
- # "enable_jxl_decoder=false"
- )
-
- if use amd64 || use arm64; then
- myconf_gn+=(
- "v8_drumbrake_bounds_checks=true"
- # "v8_enable_drumbrake=true"
- )
- fi
-
- if use thinlto; then
- # We need to change the default value of import-instr-limit in
- # LLVM to limit the text size increase. The default value is
- # 100, and we change it to 30 to reduce the text size increase
- # from 25% to 10%. The performance number of page_cycler is the
- # same on two of the thinLTO configurations, we got 1% slowdown
- # on speedometer when changing import-instr-limit from 100 to 30.
- # append-ldflags "-Wl,-plugin-opt,-import-instr-limit=30"
- sed -i '/import_instr_limit = 5/{s++import_instr_limit = 30+;h};${x;/./{x;q0};x;q1}' \
- build/config/compiler/BUILD.gn || die
-
- append-ldflags "-Wl,--thinlto-jobs=$(makeopts_jobs)"
- fi
-
- # Facilitate deterministic builds (taken from build/config/compiler/BUILD.gn)
- append-cflags -Wno-builtin-macro-redefined
- append-cxxflags -Wno-builtin-macro-redefined
- append-cppflags "-D__DATE__= -D__TIME__= -D__TIMESTAMP__="
-
- local flags
- einfo "Building with the following compiler settings:"
- for flags in C{C,XX} AR NM RANLIB {C,CXX,CPP,LD}FLAGS \
- EXTRA_GN UGC_{SKIP_{PATCHES,SUBSTITUTION},KEEP_BINARIES} ; do
- einfo " ${flags} = \"${!flags}\""
- done
-
- # Since we build from tarballs, we need to set the channel here so that it can be used in the build.
- export CHROME_VERSION_EXTRA="${SLOT}"
-
- einfo "Configuring Chromium ..."
- set -- gn gen --args="${myconf_gn[*]}${EXTRA_GN:+ ${EXTRA_GN}}" out/Release
- echo "$@"
- "$@" || die "Failed to configure Chromium"
-
- # The "if" below should not be executed unless testing
- if [ ! -z "${NODIE}" ]; then
- # List all args
- # gn args --list out/Release
-
- # Quick compiler check
- eninja -C out/Release protoc torque
- fi
-}
-
-src_compile() {
- # Final link uses lots of file descriptors.
- ulimit -n 2048
-
- # Calling this here supports resumption via FEATURES=keepwork
- python_setup
-
- # I hate doing this but upstream Rust have yet to come up with a better solution for
- # us poor packagers. Required for Split LTO units, which are required for CFI.
- export RUSTC_BOOTSTRAP=1
-
- # Don't inherit PYTHONPATH from environment, bug #789021, #812689
- local -x PYTHONPATH=
-
- # Build mksnapshot and pax-mark it.
- if use pax-kernel; then
- local x
- for x in mksnapshot v8_context_snapshot_generator code_cache_generator; do
- if tc-is-cross-compiler; then
- eninja -C out/Release "host/${x}"
- pax-mark m "out/Release/host/${x}"
- else
- eninja -C out/Release "${x}"
- pax-mark m "out/Release/${x}"
- fi
- done
- fi
-
- # Even though ninja autodetects number of CPUs, we respect
- # user's options, for debugging with -j 1 or any other reason.
- eninja -C out/Release chrome chrome_sandbox $(use test && echo "base_unittests")
-
- pax-mark m out/Release/chrome
-
- # This codepath does minimal patching, so we're at the mercy of upstream
- # CFLAGS. This is fine - we're not intending to force this on users
- # and we do a lot of flag 'management' anyway.
- if use bundled-toolchain; then
- QA_FLAGS_IGNORED="
- usr/lib64/chromium-browser/chrome
- usr/lib64/chromium-browser/chrome-sandbox
- usr/lib64/chromium-browser/chromedriver
- usr/lib64/chromium-browser/chrome_crashpad_handler
- usr/lib64/chromium-browser/libEGL.so
- usr/lib64/chromium-browser/libGLESv2.so
- usr/lib64/chromium-browser/libVkICD_mock_icd.so
- usr/lib64/chromium-browser/libVkLayer_khronos_validation.so
- usr/lib64/chromium-browser/libqt6_shim.so
- usr/lib64/chromium-browser/libvk_swiftshader.so
- usr/lib64/chromium-browser/libvulkan.so.1
- "
- fi
-
- use convert-dict && eninja -C out/Release convert_dict
-
- use enable-driver && eninja -C out/Release chromedriver
- #use suid && eninja -C out/Release chrome_sandbox
-
- use enable-driver && mv out/Release/chromedriver{.unstripped,}
-
- rm -f out/Release/locales/*.pak.info || die
-
- # Generate support files (desktop file, manpage, etc.) See: #684550 #706786 #968958
- ${EPYTHON} "${FILESDIR}/generate-support-files.py" \
- --installdir "/usr/$(get_libdir)/ungoogled-chromium-browser" \
- --channel "${SLOT}" ||
- die "Failed to generate support files"
-}
-
-src_test() {
- # Tests may be flaky with usersandbox, and the test runner executes significantly faster without.
- # If you seem to be excluding too many tests for a particular milestone: comment them out, reboot, and
- # run the tests again. If that doesn't help, try FEATURES="-usersandbox" and send it because obviously the
- # chromium gods are not smiling upon you today. Do some runtime testing, obvs.
- local skip_tests=(
- # Wildcard exclusions (if all tests in a test suite are broken)
- 'AlternateTestParams/PartitionAllocDeathTest.RepeatedAllocReturnNullDirect/*'
- 'AlternateTestParams/PartitionAllocDeathTest.RepeatedReallocReturnNullDirect/*'
- 'AlternateTestParams/PartitionAllocTest.*' # 200+ tests, >= 1 crashes entire test runner with usersandbox.
- 'CheckExitCodeAfterSignalHandlerDeathTest.*'
- 'CriticalProcessAndThreadSpotChecks/HangWatcherAnyCriticalThreadTests.*'
- 'LazyThreadPoolTaskRunnerEnvironmentTest.*' # M142
- 'ToolsSanityTest.BadVirtualCall*'
- # requires en-us locale
- SysStrings.SysNativeMBAndWide
- SysStrings.SysNativeMBToWide
- SysStrings.SysWideToNativeMB
- # Specific test cases
- CancelableEventTest.BothCancelFailureAndSucceedOccurUnderContention
- FilePathTest.FromUTF8Unsafe_And_AsUTF8Unsafe
- HistogramTesterTest.PumaTestUniqueSample
- ImmediateCrashTest.ExpectedOpcodeSequence # M150
- PathServiceTest.CheckedGetFailure
- PlatformThreadTest.CanChangeThreadType
- RawPtrTest.SetLookupUsesGetForComparison # M146 ; also broken for alpine in M144.
- RustLogIntegrationTest.CheckAllSeverity
- StackCanary.ChangingStackCanaryCrashesOnReturn
- StackTraceDeathTest.StackDumpSignalHandlerIsMallocFree
- TestLauncherTools.TruncateSnippetFocusedMatchesFatalMessagesTest
- ThreadPoolEnvironmentConfig.CanUseBackgroundPriorityForWorker
- )
- local test_filter="-$(IFS=:; printf '%s' "${skip_tests[*]}")"
- # test-launcher-bot-mode enables parallelism and plain output
- # Check individual tests with --gtest_filter=<test you want> --single-process-tests
- ./out/Release/base_unittests --test-launcher-bot-mode \
- --test-launcher-jobs="$(get_makeopts_jobs)" \
- --gtest_filter="${test_filter}" || die "Tests failed!"
-}
-
-src_install() {
- local browser_suffix
- if [[ "${SLOT}" != "stable" ]]; then
- browser_suffix="-${SLOT}"
- else
- browser_suffix=""
- fi
- local CHROMIUM_HOME="/usr/$(get_libdir)/ungoogled-chromium-browser${browser_suffix}"
- exeinto "${CHROMIUM_HOME}"
- doexe out/Release/chrome
-
- #newexe out/Release/chrome_sandbox chrome-sandbox
- #fperms 4755 "${CHROMIUM_HOME}/chrome-sandbox"
-
- use enable-driver && doexe out/Release/chromedriver
-
- #* https://github.com/ungoogled-software/ungoogled-chromium/pull/3563
- doexe out/Release/chrome_crashpad_handler
-
- if use convert-dict; then
- newexe "${FILESDIR}/update-dicts.sh" update-dicts.sh
- doexe out/Release/convert_dict
- fi
-
- ozone_auto_session () {
- use X && use wayland && ! use headless && echo true || echo false
- }
-
- cat <<- EOF > "${D}${CHROMIUM_HOME}/chromium-launcher.sh" || die
- #!/bin/bash
- # Wrapper to launch slotted Chromium via the chromium-common launcher script.
- export CHROME_DESKTOP="ungoogled-chromium-browser${browser_suffix}.desktop"
- export CHROME_EXEC_NAME="ungoogled-chromium-browser${browser_suffix}"
- export CHROME_VERSION_EXTRA="${SLOT}"
- export CHROME_WRAPPER="\$(readlink -f "\$0")"
- export OZONE_AUTO_SESSION=$(ozone_auto_session)
-
- exec /usr/libexec/chromium/chromium-launcher.sh "\$@"
- EOF
-
- chmod 755 "${D}${CHROMIUM_HOME}/chromium-launcher.sh" || die
-
- # It is important that we name the target "chromium-browser",
- # xdg-utils expect it; bug #355517.
- dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/ungoogled-chromium-browser${browser_suffix}
- # keep the old symlink around for consistency
- dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/ungoogled-chromium${browser_suffix}
-
- use enable-driver && dosym "${CHROMIUM_HOME}/chromedriver" /usr/bin/ungoogled-chromedriver${browser_suffix}
-
- pushd out/Release/locales > /dev/null || die
- chromium_remove_language_paks
- popd > /dev/null || die
-
- insinto "${CHROMIUM_HOME}"
- doins out/Release/*.bin
- doins out/Release/*.pak
- doins -r out/Release/hyphen-data
-
- if use bindist; then
- # We built libffmpeg as a component library, but we can't distribute it
- # with proprietary codec support. Remove it and make a symlink to the requested
- # system library.
- rm -f out/Release/libffmpeg.so \
- || die "Failed to remove bundled libffmpeg.so (with proprietary codecs)"
- # symlink the libffmpeg.so from either ffmpeg-chromium or ffmpeg[chromium].
- einfo "Creating symlink to libffmpeg.so from $(usex ffmpeg-chromium ffmpeg-chromium ffmpeg[chromium])..."
- dosym ../chromium/libffmpeg.so$(usex ffmpeg-chromium .${PV%%\.*} "") \
- /usr/$(get_libdir)/ungoogled-chromium-browser/libffmpeg.so
- fi
-
- (
- shopt -s nullglob
- local files=(out/Release/*.so out/Release/*.so.[0-9])
- [[ ${#files[@]} -gt 0 ]] && doins "${files[@]}"
- )
-
- if ! use system-icu && ! use headless; then
- doins out/Release/icudtl.dat
- fi
-
- doins -r out/Release/locales
- #doins -r out/Release/MEIPreload
-
- # Install vk_swiftshader_icd.json; bug #827861
- doins out/Release/vk_swiftshader_icd.json
-
- if [[ -d out/Release/swiftshader ]]; then
- insinto "${CHROMIUM_HOME}/swiftshader"
- doins out/Release/swiftshader/*.so
- fi
-
- use widevine && dosym WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so "${CHROMIUM_HOME}/libwidevinecdm.so"
-
- # Install icons
- local branding size
- for size in 16 24 32 48 64 128 256 ; do
- case ${size} in
- 16|32) branding="chrome/app/theme/default_100_percent/chromium" ;;
- *) branding="chrome/app/theme/chromium" ;;
- esac
- newicon -s ${size} "${branding}/product_logo_${size}.png" \
- ungoogled-chromium-browser${browser_suffix}.png
- done
-
- # Install desktop entry
- domenu out/Release/ungoogled-chromium-browser${browser_suffix}.desktop
-
- # Install GNOME default application entry (bug #303100).
- insinto /usr/share/gnome-control-center/default-apps
- doins out/Release/ungoogled-chromium-browser${browser_suffix}.xml
-
- # Install AppStream metadata
- insinto /usr/share/appdata
- doins out/Release/ungoogled-chromium-browser${browser_suffix}.appdata.xml
-
- # Install manpage; bug #684550
- doman out/Release/ungoogled-chromium-browser${browser_suffix}.1
- dosym ungoogled-chromium-browser${browser_suffix}.1 /usr/share/man/man1/ungoogled-chromium${browser_suffix}.1
-
- readme.gentoo_create_doc
-}
-
-pkg_postrm() {
- xdg_icon_cache_update
- xdg_desktop_database_update
-}
-
-pkg_postinst() {
- xdg_icon_cache_update
- xdg_desktop_database_update
- readme.gentoo_print_elog
-
- if use !headless && [[ -z "${REPLACING_VERSIONS}" ]]; then
- if use vaapi; then
- elog "Hardware-accelerated video decoding configuration:"
- elog
- elog "Chromium supports multiple backends for hardware acceleration. To enable one,"
- elog " Add to CHROMIUM_FLAGS in /etc/chromium/default:"
- elog
- elog "1. VA-API with OpenGL (recommended for most users):"
- elog " --enable-features=AcceleratedVideoDecodeLinuxGL"
- elog " VaapiVideoDecoder may need to be added as well, but try without first."
- elog
- if use wayland; then
- elog "2. Enhanced Wayland/EGL performance:"
- elog " --enable-features=AcceleratedVideoDecodeLinuxGL,AcceleratedVideoDecodeLinuxZeroCopyGL"
- elog
- fi
- if use X; then
- elog "$(usex wayland "3" "2"). VA-API with Vulkan:"
- elog " --enable-features=VaapiVideoDecoder,VaapiIgnoreDriverChecks,Vulkan,DefaultANGLEVulkan,VulkanFromANGLE"
- elog
- if use wayland; then
- elog " NOTE: Vulkan acceleration requires X11 and will not work under Wayland sessions."
- elog " Use OpenGL-based acceleration instead when running under Wayland."
- elog
- fi
- fi
- elog "Additional options:"
- elog " To enable hardware-accelerated encoding (if supported)"
- elog " add 'AcceleratedVideoEncoder' to your feature list"
- elog " VaapiIgnoreDriverChecks bypasses driver compatibility checks"
- elog " (may be needed for newer/unsupported hardware)"
- elog
- else
- elog "This Chromium build was compiled without VA-API support, which provides"
- elog "hardware-accelerated video decoding."
- fi
- if use screencast; then
- elog "Screencast is disabled by default at runtime. Either enable it"
- elog "by navigating to chrome://flags/#enable-webrtc-pipewire-capturer"
- elog "inside Chromium or add --enable-features=WebRTCPipeWireCapturer"
- elog "to CHROMIUM_FLAGS in /etc/chromium/default."
- elog
- elog "Additional setup may be required for screencasting to work."
- elog "See issue: https://github.com/PF4Public/gentoo-overlay/issues/314"
- fi
- if use gtk4; then
- elog "Chromium prefers GTK3 over GTK4 at runtime. To override this"
- elog "behaviour you need to pass --gtk-version=4, e.g. by adding it"
- elog "to CHROMIUM_FLAGS in /etc/chromium/default."
- fi
- if use widevine; then
- elog "widevine requires binary plugins, which are distributed separately"
- elog "Make sure you have www-plugins/chrome-binary-plugins installed"
- fi
- fi
-
- if systemd_is_booted && ! [[ -f "/etc/machine-id" ]]; then
- ewarn "The lack of an '/etc/machine-id' file on this system booted with systemd"
- ewarn "indicates that the Gentoo handbook was not followed to completion."
- ewarn ""
- ewarn "Chromium is known to behave unpredictably with this system configuration;"
- ewarn "please complete the configuration of this system before logging any bugs."
- fi
-
- # Stable slot doesn't change profile directory, and it's vanishingly unlikely that users will downgrade from dev.
- if [[ -n "${REPLACING_VERSIONS}" ]]; then
- local replacing_non_slotted=false
- # there could be more than one PVR
- for version in ${REPLACING_VERSIONS}; do
- if ver_test "${version}" -le "145.0.7632.116"; then
- replacing_non_slotted=true
- break
- fi
- done
- if ${replacing_non_slotted}; then
- ewarn "This version of Chromium has replaced a non-slotted ebuild."
- if [[ ${SLOT} != "stable" ]]; then
- ewarn "This channel has its own profile directory, so your existing profile will not be used."
- ewarn "To use your existing profile, either copy or move it to the new location."
- ewarn "See https://wiki.gentoo.org/wiki/Chromium#Profile_Directories for more information."
- ewarn ""
- fi
- ewarn "Any existing Progressive Web Apps (PWAs) will need to be reinstalled,"
- ewarn "or have the path in the desktop files updated to point to the new wrapper script."
- fi
- fi
-}
-
-eapply_wrapper () {
- if [ ! -z "${NODIE}" ]; then
- nonfatal eapply "$@"
- else
- eapply "$@"
- fi
-}
-
-git_wrapper () {
- if [ ! -z "${NODIE}" ]; then
- git "$@"
- else
- git "$@" || die
- fi
-}
-
-filter_wrapper () {
- einfo "Applying ${i##*/}"
- #? fuzz factor of 3 is OK?
- if [ ! -z "${NODIE}" ]; then
- filterdiff -p1 "${@:2}" < "$1" | patch -F 3 -p1
- else
- filterdiff -p1 "${@:2}" < "$1" | patch -F 3 -p1 || die
- fi
-}
diff --git a/www-client/ungoogled-chromium/ungoogled-chromium-151.0.7922.71_p1.ebuild b/www-client/ungoogled-chromium/ungoogled-chromium-151.0.7922.71_p1.ebuild
deleted file mode 100644
index db36b779c7cf..000000000000
--- a/www-client/ungoogled-chromium/ungoogled-chromium-151.0.7922.71_p1.ebuild
+++ /dev/null
@@ -1,2536 +0,0 @@
-# Copyright 2009-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-# Use following environment variables to customise the build
-# EXTRA_GN — pass extra options to gn
-# NINJAOPTS="-k0 -j8" useful to populate ccache even if ebuild is still failing
-# UGC_SKIP_PATCHES — space-separated list of patches to skip
-# UGC_KEEP_BINARIES — space-separated list of binaries to keep
-# UGC_SKIP_SUBSTITUTION — space-separated list of files to skip domain substitution
-
-# USE=bundled-toolchain is intended for users who want to use the same toolchain
-# as the upstream releases. It's also a good fallback in case we fall behind
-# and need to get a release out quickly (less likely with `dev` in-tree).
-# We can't rely on it as a default since the toolchain is only shipped for x86-64;
-# other architectures will need to use system toolchain.
-
-# Since m133 we are using CI-generated tarballs from
-# https://github.com/chromium-linux-tarballs/chromium-tarballs/
-
-# These are bit-for-bit identical to the official releases, but are built
-# using an external CI system that we have some control over, in case
-# issues pop up again with official tarball generation.
-
-GN_MIN_VER=0.2374
-# chromium-tools/get-chromium-toolchain-strings.py (or just use Chromicler)
-# Node for M145+ should be 24.12.0 but that's not packaged in Gentoo yet. See #969145
-TEST_FONT="9c07d19d9c5ee1ff94f717e6fb17e0c8c354e6f9"
-BUNDLED_CLANG_VER="llvmorg-23-init-10931-g20b6ec66-11"
-BUNDLED_RUST_VER="4c4205163abcbd089150.0.7871.18148b3efab796c543ba1ea687-5"
-RUST_SHORT_HASH=${BUNDLED_RUST_VER:0:10}-${BUNDLED_RUST_VER##*-}
-NODE_VER="24.16.0-r1"
-ESBUILD_VER="0.25.1"
-ROLLUP_VER="4.57.1" # currently manual.
-
-CHROMIUM_LANGS="af am ar as az be bg bn bs ca cs cy da de el en-GB es es-419 et eu fa fi fil
- fr fr-CA gl gu he hi hr hu hy id is it ja ka kk km kn ko ky lo lt lv mk ml mn mr ms my
- nb ne nl or pa pl pt-BR pt-PT ro ru si sk sl sq sr sr-Latn sv sw ta te th tr uk ur uz
- vi zh-CN zh-HK zh-TW zu"
-
-#UGC_COMMIT_ID="f2038df00b82e3afbd5cbecac37cf7b463acb42a"
-# UGC_PR_COMMITS=(
-# c917e096342e5b90eeea91ab1f8516447c8756cf
-# 5794e9d12bf82620d5f24505798fecb45ca5a22d
-# )
-
-CROMITE_COMMIT_ID="cb3baf14f52eb4365d017f640f85310735c19b79"
-
-declare -A CHROMIUM_COMMITS=(
- ["27f8690db999f6e56f0af7a9ea3d28a019ed72ca"]="." #152+
- ["-cf94ed446320d35c8613ed9b3ffb6e6a61bfcb5f"]="."
-# # ["-37c28a19804e47a68eabf3cf882a310689fc325b"]="." #disable style check for cromite
-# # ["cd5a0df905a28faa89ff2a4ab44f893f84dc4487"]="net/third_party/quiche/src"
-)
-
-LLVM_COMPAT=( 21 22 23 )
-PYTHON_COMPAT=( python3_{13..14} )
-PYTHON_REQ_USE="xml(+)"
-RUST_MIN_VER=1.91.0
-RUST_NEEDS_LLVM="yes please"
-RUST_OPTIONAL="yes" # Not actually optional, but we don't need system Rust (or LLVM) with USE=bundled-toolchain
-RUST_REQ_USE="rustfmt" # Upstream run rustfmt on bindgen output, so we need it to be available.
-
-inherit check-reqs chromium-2 desktop flag-o-matic llvm-r1 multiprocessing ninja-utils pax-utils
-inherit python-any-r1 readme.gentoo-r1 rust systemd toolchain-funcs xdg-utils
-
-DESCRIPTION="Modifications to Chromium for removing Google integration and enhancing privacy"
-HOMEPAGE="https://github.com/ungoogled-software/ungoogled-chromium"
-PPC64_HASH="a85b64f07b489b8c6fdb13ecf79c16c56c560fc6"
-PATCH_V="${PV%%\.*}-1"
-COPIUM_COMMIT="b00f26bb5e0781020da5f830981472a142c6baf1"
-SRC_URI="https://github.com/chromium-linux-tarballs/chromium-tarballs/releases/download/${PV/_*}/chromium-${PV/_*}-linux.tar.xz
- https://deps.gentoo.zip/www-client/chromium/rollup-wasm-node-${ROLLUP_VER}.tgz
- https://gitlab.com/Matt.Jolly/chromium-patches/-/archive/${PATCH_V}/chromium-patches-${PATCH_V}.tar.bz2
- !bundled-toolchain? (
- https://codeberg.org/selfisekai/copium/archive/${COPIUM_COMMIT}.tar.gz
- -> chromium-patches-copium-${COPIUM_COMMIT:0:10}.tar.gz
- )
- bundled-toolchain? (
- https://commondatastorage.googleapis.com/chromium-browser-clang/Linux_x64/clang-${BUNDLED_CLANG_VER}.tar.xz
- -> chromium-clang-${BUNDLED_CLANG_VER}.tar.xz
- https://commondatastorage.googleapis.com/chromium-browser-clang/Linux_x64/rust-toolchain-${BUNDLED_RUST_VER}-${BUNDLED_CLANG_VER%-*}.tar.xz
- -> chromium-rust-toolchain-${RUST_SHORT_HASH}-${BUNDLED_CLANG_VER%-*}.tar.xz
- )
- test? (
- https://chromium-fonts.storage.googleapis.com/${TEST_FONT} -> chromium-testfonts-${TEST_FONT:0:10}.tar.gz
- )
- ppc64? (
- https://gitlab.raptorengineering.com/raptor-engineering-public/chromium/openpower-patches/-/archive/${PPC64_HASH}/openpower-patches-${PPC64_HASH}.tar.bz2 -> chromium-openpower-${PPC64_HASH:0:10}.tar.bz2
- )
-"
-
-# Gentoo tarball:
-# https://chromium-tarballs.distfiles.gentoo.org/chromium-${PV/_*}.tar.xz -> chromium-${PV/_*}-gentoo.tar.xz
-
-# chromium-linux-tarballs
-# https://github.com/chromium-linux-tarballs/chromium-tarballs/releases/download/${PV/_*}/chromium-${PV/_*}-linux.tar.xz
-
-# Official tarball:
-# https://commondatastorage.googleapis.com/chromium-browser-official/chromium-${PV/_*}${LITE_TARBALL:+-lite}.tar.xz
-
-# https://gitweb.gentoo.org/proj/chromium-tools.git/tree/get-chromium-licences.py @ 145.0.7632.76
-LICENSE="Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD BSD-2 Base64 Boost-1.0 CC-BY-3.0 CC-BY-4.0 Clear-BSD FFT2D FTL"
-LICENSE+=" IJG ISC LGPL-2 LGPL-2.1 MIT MPL-1.1 MPL-2.0 Ms-PL PSF-2 SGI-B-2.0 SSLeay SunSoft Unicode-3.0"
-LICENSE+=" Unicode-DFS-2015 Unlicense UoI-NCSA ZLIB libtiff openssl"
-LICENSE+=" cromite? ( GPL-3 )"
-
-SLOT="stable"
-KEYWORDS="amd64 ~arm64 ~ppc64 ~x86"
-
-IUSE_SYSTEM_LIBS="abseil-cpp av1 brotli crc32c double-conversion ffmpeg +harfbuzz icu jsoncpp +libusb libvpx +openh264 openjpeg re2 snappy woff2 +zstd"
-IUSE="+X bindist bluetooth bundled-toolchain cfi convert-dict cups custom-cflags debug ffmpeg-chromium enable-driver gtk4 hangouts headless kerberos +libcxx nvidia +official optimize-thinlto optimize-webui override-data-dir pax-kernel pgo"
-IUSE+=" +proprietary-codecs pulseaudio qt6 screencast selinux test thinlto cromite vaapi wayland widevine cpu_flags_ppc_vsx3"
-RESTRICT="
- !bindist? ( bindist )
- !test? ( test )
- arm64? ( test )
- !system-ffmpeg? ( proprietary-codecs? ( bindist ) )
- !system-openh264? ( bindist )
- cromite? ( bindist )"
-
-REQUIRED_USE="
- !headless? ( || ( X wayland ) )
- screencast? ( wayland )
- ffmpeg-chromium? ( bindist proprietary-codecs )
- optimize-thinlto? ( thinlto )
- cfi? ( thinlto )
- x86? ( !thinlto !widevine )
- debug? ( !official )
- vaapi? ( !system-av1 !system-libvpx )
-"
-
-UGC_PV="${PV/_p/-}"
-UGC_PF="${PN}-${UGC_PV}"
-UGC_URL="https://github.com/ungoogled-software/${PN}/archive/"
-
-if [ -z "$UGC_COMMIT_ID" ]; then
- UGC_URL="${UGC_URL}${UGC_PV}.tar.gz -> ${UGC_PF}.tar.gz"
- UGC_WD="${WORKDIR}/${UGC_PF}"
-else
- UGC_URL="${UGC_URL}${UGC_COMMIT_ID}.tar.gz -> ${PN}-${UGC_COMMIT_ID}.tar.gz"
- UGC_WD="${WORKDIR}/ungoogled-chromium-${UGC_COMMIT_ID}"
-fi
-
-SRC_URI+="${UGC_URL}
-"
-
-if [ ! -z "${UGC_PR_COMMITS[*]}" ]; then
- for i in "${UGC_PR_COMMITS[@]}"; do
- SRC_URI+="https://github.com/ungoogled-software/${PN}/commit/$i.patch?full_index=true -> ${PN}-$i.patch
- "
- done
-fi
-
-if [ ! -z "${CHROMIUM_COMMITS[*]}" ]; then
- # for i in "${CHROMIUM_COMMITS[@]}"; do
- for i in "${!CHROMIUM_COMMITS[@]}"; do
- if [[ ${CHROMIUM_COMMITS[$i]} =~ webrtc ]]; then
- #TODO: is it safe to use this mirror?
- SRC_URI+="https://github.com/webrtc-mirror/webrtc/commit/${i/-}.patch?full_index=true -> webrtc-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ angle ]]; then
- SRC_URI+="https://github.com/google/angle/commit/${i/-}.patch?full_index=true -> angle-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ quiche ]]; then
- SRC_URI+="https://github.com/google/quiche/commit/${i/-}.patch?full_index=true -> quiche-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ dawn ]]; then
- SRC_URI+="https://github.com/google/dawn/commit/${i/-}.patch?full_index=true -> dawn-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ perfetto ]]; then
- SRC_URI+="https://github.com/google/perfetto/commit/${i/-}.patch?full_index=true -> perfetto-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ink ]]; then
- SRC_URI+="https://github.com/google/ink/commit/${i/-}.patch?full_index=true -> ink-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ vulkan-utility-libraries ]]; then
- SRC_URI+="https://github.com/KhronosGroup/Vulkan-Utility-Libraries/commit/${i/-}.patch?full_index=true -> vulkan-utility-libraries-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ruy ]]; then
- SRC_URI+="https://github.com/google/ruy/commit/${i/-}.patch?full_index=true -> ruy-${i/-}.patch
- "
- else
- SRC_URI+="https://github.com/chromium/chromium/commit/${i/-}.patch?full_index=true -> chromium-${i/-}.patch
- "
- fi
- done
-fi
-
-SRC_URI+="cromite? ( https://github.com/uazo/cromite/archive/${CROMITE_COMMIT_ID}.tar.gz -> cromite-${CROMITE_COMMIT_ID}.tar.gz )
-"
-
-for i in ${IUSE_SYSTEM_LIBS}; do
- [[ $i =~ ^(\+)?(.*)$ ]]
- IUSE+=" ${BASH_REMATCH[1]}system-${BASH_REMATCH[2]}"
-done
-
-COMMON_X_DEPEND="
- x11-libs/libXcomposite:=
- x11-libs/libXcursor:=
- x11-libs/libXdamage:=
- x11-libs/libXfixes:=
- >=x11-libs/libXi-1.6.0:=
- x11-libs/libXrandr:=
- x11-libs/libXrender:=
- x11-libs/libXtst:=
- x11-libs/libxshmfence:=
-"
-
-# sys-libs/zlib: https://bugs.gentoo.org/930365; -ng is not compatible.
-# We _could_ use the bundled minizip, but that's against policy.
-COMMON_SNAPSHOT_DEPEND="
- system-icu? ( >=dev-libs/icu-78:= )
- system-abseil-cpp? ( >=dev-cpp/abseil-cpp-20260107.0 )
- system-brotli? ( >=app-arch/brotli-9999 )
- system-crc32c? ( dev-libs/crc32c )
- system-double-conversion? ( dev-libs/double-conversion )
- system-woff2? ( media-libs/woff2 )
- system-snappy? ( app-arch/snappy )
- system-jsoncpp? ( dev-libs/jsoncpp )
- system-openjpeg? ( media-libs/openjpeg:2= )
- system-re2? ( >=dev-libs/re2-0.2019.08.01:= )
- system-libvpx? ( >=media-libs/libvpx-1.13.0:=[postproc] )
- system-libusb? ( virtual/libusb:1 )
- cromite? ( dev-util/patchutils )
- >=dev-libs/libxml2-2.12.4:=[icu]
- dev-libs/nspr:=
- >=dev-libs/nss-3.26:=
- dev-libs/libxslt:=
- media-libs/fontconfig:=
- >=media-libs/freetype-2.11.0-r1:=
- system-harfbuzz? ( >=media-libs/harfbuzz-3:0=[icu(-)] )
- media-libs/libjpeg-turbo:=
- media-libs/libpng:=
- system-zstd? ( >=app-arch/zstd-1.5.5:= )
- >=media-libs/libwebp-0.4.0:=
- media-libs/mesa:=[gbm(+)]
- >=media-libs/openh264-2.6.0:=
- system-av1? (
- >=media-libs/dav1d-1.0.0:=
- >=media-libs/libaom-3.7.0:=
- )
- sys-libs/zlib:=
- !headless? (
- dev-libs/glib:2
- >=media-libs/alsa-lib-1.0.19:=
- media-video/pipewire:=
- pulseaudio? (
- || (
- media-libs/libpulse
- >=media-sound/apulse-0.1.9
- )
- )
- sys-apps/pciutils:=
- kerberos? ( virtual/krb5 )
- vaapi? ( >=media-libs/libva-2.7:=[X?,wayland?] )
- X? (
- x11-base/xorg-proto:=
- x11-libs/libX11:=
- x11-libs/libxcb:=
- x11-libs/libXext:=
- )
- x11-libs/libxkbcommon:=
- wayland? (
- screencast? ( media-video/pipewire:= )
- dev-libs/libffi:=
- dev-libs/wayland:=
- screencast? (
- media-video/pipewire:=
- || (
- sys-apps/xdg-desktop-portal-gnome
- sys-apps/xdg-desktop-portal-gtk
- kde-plasma/xdg-desktop-portal-kde
- gui-libs/xdg-desktop-portal-lxqt
- gui-libs/xdg-desktop-portal-wlr
- )
- )
- )
- )
-"
-
-COMMON_DEPEND="
- ${COMMON_SNAPSHOT_DEPEND}
- app-arch/bzip2:=
- dev-libs/expat:=
- system-ffmpeg? (
- >=media-video/ffmpeg-6.1:=
- >=media-libs/opus-1.3.1:=
- )
- net-misc/curl[ssl]
- sys-apps/dbus:=
- media-libs/flac:=
- sys-libs/zlib:=[minizip]
- !headless? (
- >=app-accessibility/at-spi2-core-2.46.0:2
- media-libs/mesa:=[X?,wayland?]
- virtual/udev
- x11-libs/cairo:=
- x11-libs/gdk-pixbuf:2
- x11-libs/pango:=
- cups? ( >=net-print/cups-1.3.11:= )
- qt6? ( dev-qt/qtbase:6[gui,widgets] )
- X? ( ${COMMON_X_DEPEND} )
- )
-"
-RDEPEND="${COMMON_DEPEND}
- !www-client/ungoogled-chromium:0
- >=www-client/chromium-common-2
- !headless? (
- || (
- x11-libs/gtk+:3[X?,wayland?]
- gui-libs/gtk:4[X?,wayland?]
- )
- qt6? ( dev-qt/qtbase:6[X?,wayland?] )
- )
- virtual/ttf-fonts
- selinux? ( sec-policy/selinux-chromium )
- bindist? (
- ffmpeg-chromium? ( media-video/ffmpeg-chromium:${PV%%\.*} )
- )
- !override-data-dir? (
- !www-client/chromium:${SLOT}
- !www-client/cromite:${SLOT}[-override-data-dir]
- )
-"
-# For M149+ pipewire is a mandatory build-time dependency, but it's optional at runtime for most configurations.
-DEPEND="${COMMON_DEPEND}
- !headless? (
- media-video/pipewire
- gtk4? ( gui-libs/gtk:4[X?,wayland?] )
- !gtk4? ( x11-libs/gtk+:3[X?,wayland?] )
- )
-"
-
- # pgo? ( >=llvm-core/clang-22.0.0_pre20260106 >=llvm-core/lld-22.0.0_pre20260106 )
-BDEPEND="
- ${COMMON_SNAPSHOT_DEPEND}
- ${PYTHON_DEPS}
- $(python_gen_any_dep '
- dev-python/setuptools[${PYTHON_USEDEP}]
- ')
- >=app-arch/gzip-1.7
- !headless? (
- qt6? ( dev-qt/qtbase:6 )
- )
- !bundled-toolchain? ( $(llvm_gen_dep '
- llvm-core/clang:${LLVM_SLOT}
- llvm-core/llvm:${LLVM_SLOT}
- cfi? ( llvm-runtimes/clang-runtime:${LLVM_SLOT}[sanitize] )
- official? (
- !ppc64? ( llvm-runtimes/compiler-rt-sanitizers:${LLVM_SLOT}[cfi] )
- ) ')
- || (
- $(llvm_gen_dep 'llvm-core/lld:${LLVM_SLOT}')
- >=sys-devel/mold-2.41.0
- )
- ${RUST_DEPEND}
- )
- >=dev-util/bindgen-0.72.1
- >=dev-build/gn-${GN_MIN_VER}
- app-alternatives/ninja
- dev-lang/perl
- >=dev-util/gperf-3.2
- dev-util/esbuild:${ESBUILD_VER}
- dev-vcs/git
- >=net-libs/nodejs-${NODE_VER}[inspector]
- sys-apps/hwdata
- >=sys-devel/bison-2.4.3
- sys-devel/flex
- virtual/pkgconfig
- x11-misc/xdg-utils
-"
-
-if ! has chromium_pkg_die ${EBUILD_DEATH_HOOKS}; then
- EBUILD_DEATH_HOOKS+=" chromium_pkg_die";
-fi
-
-DISABLE_AUTOFORMATTING="yes"
-DOC_CONTENTS="
-Some web pages may require additional fonts to display properly.
-Try installing some of the following packages if some characters
-are not displayed properly:
-- media-fonts/arphicfonts
-- media-fonts/droid
-- media-fonts/ipamonafont
-- media-fonts/noto
-- media-fonts/ja-ipafonts
-- media-fonts/takao-fonts
-- media-fonts/wqy-microhei
-- media-fonts/wqy-zenhei
-
-To fix broken icons on the Downloads page, you should install an icon
-theme that covers the appropriate MIME types, and configure this as your
-GTK+ icon theme.
-
-For native file dialogs in KDE, install kde-apps/kdialog.
-
-To make password storage work with your desktop environment you may
-have install one of the supported credentials management applications:
-- app-crypt/libsecret (GNOME)
-- kde-frameworks/kwallet (KDE)
-If you have one of above packages installed, but don't want to use
-them in Chromium, then add --password-store=basic to CHROMIUM_FLAGS
-in /etc/chromium/default.
-"
-
-S="${WORKDIR}/chromium-${PV/_*}"
-
-python_check_deps() {
- python_has_version "dev-python/setuptools[${PYTHON_USEDEP}]"
-}
-
-pre_build_checks() {
- # Check build requirements: bugs #471810, #541816, #914220
- # We're going to start doing maths here on the size of an unpacked source tarball,
- # this should make updates easier as chromium continues to balloon in size.
- # xz -l /var/cache/distfiles/chromium-${PV}*.tar.xz
- local base_disk=9 # Round up
- use test && base_disk=$((base_disk + 5))
- local extra_disk=1 # Always include a little extra space
- local memory=4
- tc-is-cross-compiler && extra_disk=$((extra_disk * 2))
- if tc-is-lto || use pgo; then
- memory=$((memory * 2 + 1))
- tc-is-cross-compiler && extra_disk=$((extra_disk * 2)) # Double the requirements
- use pgo && extra_disk=$((extra_disk + 4))
- fi
- if is-flagq '-g?(gdb)?([1-9])'; then
- if use custom-cflags; then
- extra_disk=$((extra_disk + 5))
- fi
- memory=$((memory * 2))
- fi
- local CHECKREQS_MEMORY="${memory}G"
- local CHECKREQS_DISK_BUILD="$((base_disk + extra_disk))G"
- check-reqs_${EBUILD_PHASE_FUNC}
-}
-
-pkg_pretend() {
- if [[ ${MERGE_TYPE} != binary ]]; then
- # The pre_build_checks are all about compilation resources, no need to run it for a binpkg
- pre_build_checks
- fi
-
- if use headless; then
- local headless_unused_flags=("cups" "kerberos" "pulseaudio" "qt6" "vaapi" "wayland")
- for myiuse in ${headless_unused_flags[@]}; do
- use ${myiuse} && ewarn "Ignoring USE=${myiuse}, USE=headless is set."
- done
- fi
-
- if ! use bindist && use ffmpeg-chromium; then
- ewarn "Ignoring USE=ffmpeg-chromium, USE=bindist is not set."
- fi
- if use libcxx; then
- ewarn
- ewarn "Building with libcxx, please be aware that system-*"
- ewarn "and some other c++ dependencies need to be compiled"
- ewarn "with the same c++ library as ungoogled-chromium itself"
- ewarn "dev-libs/jsoncpp is most problematic, see #58 #49 #119 for details"
- ewarn "Simplest solution would be to disable corresponding system-* flags"
- ewarn
- fi
- if use cfi; then
- ewarn
- ewarn "Building with cfi is only possible if building with -stdlib=libc++"
- ewarn "Make sure all dependencies are also built this way, see #40"
- ewarn
- fi
- if use cromite; then
- ewarn
- ewarn "Cromite patches are very experimental and unstable"
- ewarn "Please consider testing them and giving feedback upstream:"
- ewarn "https://github.com/uazo/cromite/issues"
- ewarn "Not all patches are applied, let me know if others should be considered too"
- ewarn
- fi
-}
-
-pkg_setup() {
- if [[ ${MERGE_TYPE} != binary ]]; then
- # The pre_build_checks are all about compilation resources, no need to run it for a binpkg
- pre_build_checks
-
- # We haven't massaged any CFLAGS yet, so we want to do this before we force CC/CXX to prevent warnings.
- local want_lto="false"
- tc-is-lto && want_lto="true"
-
- # The linux:unbundle toolchain in GN grabs CC, CXX, CPP (etc) from the environment
- # We'll set these to clang here then use llvm-utils functions to very explicitly set these
- # to a sane value.
- # This is effectively the 'force-clang' path if GCC support is re-added.
- if use !bundled-toolchain; then
- llvm-r1_pkg_setup
- rust_pkg_setup
-
- # Forcing clang; respect llvm_slot_x to enable selection of impl via LLVM_COMPAT
- AR=llvm-ar
- CPP="${CHOST}-clang++-${LLVM_SLOT} -E"
- NM=llvm-nm
- CC="${CHOST}-clang-${LLVM_SLOT}"
- CXX="${CHOST}-clang++-${LLVM_SLOT}"
- fi
-
- # LTO in Chromium means LLVM ThinLTO, if GCC support is re-added
- # We'll need to handle that here too.
- use_lto="false"
- local lto_usable="true"
- if [[ "$want_lto" == "true" ]]; then
- if use arm64 && [[ "${LLVM_SLOT}" -lt 22 ]]; then
- einfo "LTO is broken with LLVM 21 on arm64, ignoring CFLAGS."
- lto_usable="false"
- else
- use_lto="true"
- fi
- # We can rely on GN to do this for us; without this builds
- # take significantly longer with LTO enabled.
- filter-lto
- fi
-
- if [[ "$use_lto" == "false" ]] && use official && [[ "$lto_usable" == "true" ]]; then
- einfo "USE=official selected and LTO not detected."
- einfo "It is _highly_ recommended that LTO be enabled for performance reasons"
- einfo "and to be consistent with the upstream \"official\" build optimisations."
- fi
-
- if [[ "$use_lto" == "false" ]] && use test; then
- die "Tests require CFI which requires LTO"
- fi
-
- export use_lto
-
- if tc-is-cross-compiler; then
- use pgo && die "The pgo USE flag cannot be used when cross-compiling"
- CPP="${CBUILD}-clang++-${LLVM_SLOT} -E"
- fi
-
- # Sanity checks for development convenience
- if ver_test $(gn --version || die) -lt ${GN_MIN_VER}; then
- die "dev-build/gn >= ${GN_MIN_VER} is required to build this Chromium"
- fi
-
- # Sometimes, when adding a new LLVM slot, devs (me) forget to install an appropriate lld.
- if tc-ld-is-lld; then
- local lld_ver=$(ld.lld --version | awk '{split($2,a,"."); print a[1]}' || die "Failed to check lld version")
- if [[ ${lld_ver} -lt ${LLVM_SLOT} ]]; then
- die "Your lld version (${lld_ver}) is too old for the selected LLVM slot (${LLVM_SLOT}). Please install a newer lld or select an older LLVM slot."
- fi
- fi
- fi
-
- chromium_suid_sandbox_check_kernel_config
-}
-
-src_unpack() {
- # # Here be dragons!
- # local XCLD="--exclude=chromium-${PV/_*}/third_party/instrumented_libs \
- # --exclude=chromium-${PV/_*}/third_party/llvm \
- # --exclude=chromium-${PV/_*}/third_party/llvm-build \
- # --exclude=chromium-${PV/_*}/third_party/node/linux \
- # --exclude=chromium-${PV/_*}/third_party/rust-src \
- # --exclude=chromium-${PV/_*}/third_party/rust-toolchain \
- # --exclude=chromium-${PV/_*}/build/linux/debian_bullseye_i386-sysroot \
- # --exclude=chromium-${PV/_*}/build/linux/debian_bullseye_amd64-sysroot \
- # --exclude=chromium-${PV/_*}/third_party/angle/third_party/VK-GL-CTS \
- # "
-
- # if ! use libcxx ; then
- # XCLD+=" --exclude=chromium-${PV/_*}/third_party/libc++"
- # fi
-
- # if ! use pgo ; then
- # XCLD+=" --exclude=chromium-${PV/_*}/chrome/build/pgo_profiles"
- # fi
-
- # einfo "Unpacking chromium-${PV/_*}.tar.xz to ${WORKDIR}"
- # # Gentoo tarball:
- # # tar ${XCLD} -xf "${DISTDIR}/chromium-${PV/_*}-gentoo.tar.xz" -C "${WORKDIR}" || die
- # tar ${XCLD} -xf "${DISTDIR}/chromium-${PV/_*}${LITE_TARBALL:+-lite}.tar.xz" -C "${WORKDIR}" || die
-
- # unpack ${UGC_URL#*->}
- # # unpack chromium-patches-${PATCH_V}.tar.bz2
- # # Warned you!
-
- unpack chromium-${PV/_*}-linux.tar.xz
- unpack chromium-patches-${PATCH_V}.tar.bz2
- # These should only be required when we're not using the official toolchain
- if use !bundled-toolchain; then
- unpack chromium-patches-copium-${COPIUM_COMMIT:0:10}.tar.gz
- fi
-
- if use test; then
- # This just contains a bunch of font files that need to be unpacked (or moved) to the correct location.
- local testfonts_dir="${WORKDIR}/chromium-${PV/_*}/third_party/test_fonts/test_fonts"
- local testfonts_tar="${DISTDIR}/chromium-testfonts-${TEST_FONT:0:10}.tar.gz"
- einfo "Unpacking test fonts ..."
- tar xf "${testfonts_tar}" -C "${testfonts_dir}" || die "Failed to unpack testfonts"
- fi
-
- # We need to manually unpack this since M126 else we'd unpack one toolchain over the other.
- # Since we're doing that anyway let's unpack to sensible locations to make symlink creation easier.
- if use bundled-toolchain; then
- einfo "Unpacking bundled Clang ..."
- mkdir -p "${WORKDIR}"/clang || die "Failed to create clang directory"
- tar xf "${DISTDIR}/chromium-clang-${BUNDLED_CLANG_VER}.tar.xz" -C "${WORKDIR}/clang" || die "Failed to unpack Clang"
- einfo "Unpacking bundled Rust ..."
- local rust_dir="${WORKDIR}/rust-toolchain"
- mkdir -p "${rust_dir}" || die "Failed to create rust toolchain directory"
- tar xf "${DISTDIR}/chromium-rust-toolchain-${RUST_SHORT_HASH}-${BUNDLED_CLANG_VER%-*}.tar.xz" -C "${rust_dir}" ||
- die "Failed to unpack Rust"
- fi
-
- if use ppc64; then
- unpack chromium-openpower-${PPC64_HASH:0:10}.tar.bz2
- fi
-
- # This is a dirty hack, but we need rollup to build successfully and it's proving to be challenging
- # to build locally due to deps
- unpack rollup-wasm-node-${ROLLUP_VER}.tgz
-
- if use cromite; then
- unpack cromite-${CROMITE_COMMIT_ID}.tar.gz
- fi
-
- unpack ${UGC_URL#*->}
-}
-
-remove_compiler_builtins() {
- # We can't use the bundled compiler builtins with the system toolchain
- # We used to `grep` then `sed`, but it was indirect. Combining the two into a single
- # `awk` command is more efficient and lets us document the logic more clearly.
-
- local pattern=' configs += [ "//build/config/clang:compiler_builtins" ]'
- local target='build/config/compiler/BUILD.gn'
-
- local tmpfile
- tmpfile=$(mktemp) || die "Failed to create temporary file."
-
- if awk -v pat="${pattern}" '
- BEGIN {
- match_found = 0
- }
-
- # If the delete countdown is active, decrement it and skip to the next line.
- d > 0 { d--; next }
-
- # If the current line matches the pattern...
- $0 == pat {
- match_found = 1 # ...set our flag to true.
- d = 2 # Set delete counter for this line and the next two.
- prev = "" # Clear the buffered previous line so it is not printed.
- next
- }
-
- # For any other line, print the buffered previous line.
- NR > 1 { print prev }
-
- # Buffer the current line to be printed on the next cycle.
- { prev = $0 }
-
- END {
- # Print the last line if it was not part of a deleted block.
- if (d == 0) { print prev }
-
- # If the pattern was never found, exit with a failure code.
- if (match_found == 0) {
- exit 1
- }
- }
- ' "${target}" > "${tmpfile}"; then
- # AWK SUCCEEDED (exit code 0): The pattern was found and edited.
- # This is to avoid gawk's `-i inplace` option which users complain about.
- mv "${tmpfile}" "${target}"
- else
- # AWK FAILED (exit code 1): The pattern was not found.
- rm -f "${tmpfile}"
- die "Awk patch failed: Pattern not found in ${target}."
- fi
-}
-
-src_prepare() {
- # Calling this here supports resumption via FEATURES=keepwork
- python_setup
-
- # We'll fill this in as we go. Patches go in chromium-patches.
- local PATCHES=()
-
- rm "${WORKDIR}/chromium-patches-${PATCH_V}/common/cr131-unbundle-icu-target.patch"
- if ver_test "${RUST_SLOT}" -ge "1.95.0"; then
- rm "${WORKDIR}/chromium-patches-${PATCH_V}/rust/cr146-fix-botched-bytemuck-roll.patch"
- sed -i '/SupportedLaneCount/d' third_party/rust/chromium_crates_io/vendor/bytemuck-v1/src/zeroable.rs || die
- sed -i '/SupportedLaneCount/d' third_party/rust/chromium_crates_io/vendor/bytemuck-v1/src/pod.rs || die
- fi
-
- rm ${WORKDIR}/chromium-patches-${PATCH_V}/common/cr150-module-sysroot.patch || die # upstreamed
- rm ${WORKDIR}/chromium-patches-${PATCH_V}/toolchain/cr117-material-color-include.patch || die # same
- rm ${WORKDIR}/chromium-patches-${PATCH_V}/toolchain/cr151-actually-fix-ar.patch || die # same
- rm ${WORKDIR}/chromium-patches-${PATCH_V}/toolchain/cr151-dawn-system-go.patch || die # hardcode it like node
- rm ${WORKDIR}/chromium-patches-${PATCH_V}/toolchain/cr151-mold-unbundle.patch || die # don't care
-
- #cp -f ${WORKDIR}/chromium-patches-${PATCH_V}/*-compiler.patch "${T}/compiler.patch"
- ##cp -f ${FILESDIR}/chromium-147-compiler.patch "${T}/compiler.patch"
- #if ! use custom-cflags; then #See #25 #92
- # sed -i '/default_stack_frames/Q' "${T}/compiler.patch" || die
- #fi
-
- PATCHES+=( "${WORKDIR}/chromium-patches-${PATCH_V}/common/" )
- PATCHES+=( "${FILESDIR}/restore-x86-r4.patch" )
-
- # https://issues.chromium.org/issues/442698344
- # Unreleased fontconfig changed magic numbers and google have rolled to this version
- if has_version "<=media-libs/fontconfig-2.17.1"; then
- PATCHES+=( "${FILESDIR}/chromium-142-work-with-old-fontconfig.patch" )
- fi
-
- if use bundled-toolchain; then
- # We need to symlink the toolchain into the expected location
- einfo "Symlinking Clang toolchain to expected location ..."
- mkdir -p third_party/llvm-build/ || die "Failed to create llvm-build directory"
- # the 'Chromium Linux Tarballs' seem to already have 'Release+Asserts/{lib,bin}'; not sure if this is an
- # upstream change - we're using the same scripts to build, theoretically. We'll still attempt to create
- # llvm-build, but we'll rm Release+Asserts and symlink directly.
- if [[ -d third_party/llvm-build/Release+Asserts ]]; then
- rm -r third_party/llvm-build/Release+Asserts || die "Failed to remove third_party/llvm-build/Release+Asserts"
- fi
- ln -s "${WORKDIR}"/clang third_party/llvm-build/Release+Asserts || die "Failed to bundle Clang"
- einfo "Symlinking Rust toolchain to expected location ..."
- # As above, so below
- if [[ -d third_party/rust-toolchain ]]; then
- rm -r third_party/rust-toolchain || die "Failed to remove third_party/rust-toolchain"
- fi
- ln -s "${WORKDIR}"/rust-toolchain third_party/rust-toolchain || die "Failed to bundle rust"
- cp "${WORKDIR}"/rust-toolchain/VERSION \
- "${WORKDIR}"/rust-toolchain/INSTALLED_VERSION || die "Failed to set rust version"
- else
- # We don't need our toolchain patches if we're using the official toolchain
-
- # Copium patches go here.
- PATCHES+=(
- "${WORKDIR}/copium/cr143-libsync-__BEGIN_DECLS.patch"
- "${WORKDIR}/copium/cr149-unbundle-minizip-undo-unicode.patch"
- )
-
- # Automate conditional application of chromium-patches
- # The directory structure is expected to be something like:
- # chromium-patches-145/
- # ├── toolchain/
- # │ ├── cr123-foo.patch
- # │ └── cr135-bar.patch
- # ├── llvm/
- # │ ├── cr144-baz.patch
- # │ └── lt-23/
- # │ └── cr145-bleeding-edge-llvm-feature.patch
- # Where `lt-23` means "apply this patch if the LLVM version is less than 23".
- # Only categories in `slot_map` will be checked for version constraints.
- shopt -s nullglob
- local -A slot_map=( [llvm]="${LLVM_SLOT}" [rust]="${RUST_SLOT}" )
-
- for category in "${WORKDIR}/chromium-patches-${PATCH_V}"/*/; do
- local category_name="${category%/}"
- category_name="${category_name##*/}"
-
- # Skip arch-specific categories
- if [[ "${category_name}" == "ppc64le" ]]; then
- use ppc64 || continue
- fi
-
- # We applied common patches above, no need to apply them again here
- [[ "${category_name}" == "common" ]] && continue
-
- # Unconditional patches for this category
- local category_patches=( "${category}"*.patch )
- [[ ${#category_patches[@]} -gt 0 ]] && PATCHES+=( "${category}" )
-
- # Version-constrained subdirectories (e.g., llvm/lt-23/)
- for constraint_dir in "${category}"*/; do
- local dir_name="${constraint_dir%/}"
- dir_name="${dir_name##*/}"
- if [[ "${dir_name}" =~ ^lt-(.*)$ && -v slot_map[${category_name}] ]]; then
- ver_test "${slot_map[${category_name}]}" -lt "${BASH_REMATCH[1]}" &&
- PATCHES+=( "${constraint_dir}" )
- fi
- done
- done
-
- shopt -u nullglob
-
- # Strictly speaking this doesn't need to be gated (no bundled toolchain for ppc64); it keeps the logic together
- if use ppc64; then
- local patchset_dir="${WORKDIR}/openpower-patches-${PPC64_HASH}/patches"
- # patch causes build errors on 4K page systems (https://bugs.gentoo.org/show_bug.cgi?id=940304)
- local page_size_patch="ppc64le/third_party/use-sysconf-page-size-on-ppc64.patch"
- local isa_3_patch="ppc64le/core/baseline-isa-3-0.patch"
- # Apply the OpenPOWER patches (check for page size and isa 3.0)
- openpower_patches=( $(grep -E "^ppc64le|^upstream" "${patchset_dir}/series" | grep -v "${page_size_patch}" |
- grep -v "${isa_3_patch}" || die) )
- for patch in "${openpower_patches[@]}"; do
- PATCHES+=( "${patchset_dir}/${patch}" )
- done
- if [[ $(getconf PAGESIZE) == 65536 ]]; then
- PATCHES+=( "${patchset_dir}/${page_size_patch}" )
- fi
- # We use vsx3 as a proxy for 'want isa3.0' (POWER9)
- if use cpu_flags_ppc_vsx3 ; then
- PATCHES+=( "${patchset_dir}/${isa_3_patch}" )
- fi
- fi
-
- remove_compiler_builtins
-
- # We can't rely on the eselect'd Rust to actually include rustfmt, so we'll point to the selected slot specifically.
- local suffix=""
- if [[ "${RUST_TYPE}" == "binary" ]]; then
- suffix="-bin-${RUST_SLOT}"
- else
- suffix="-${RUST_SLOT}"
- fi
- sed -i "s|/bin/rustfmt|/bin/rustfmt${suffix}|g" build/rust/rust_bindgen_generator.gni ||
- die "Failed to update rustfmt path"
-
- fi
-
- # Do this before we apply patches since (e.g.) ppc64 needs to patch rollup and it's easier in ${S}
- einfo "Moving rollup wasm-node package into place ..."
- mkdir -p third_party/devtools-frontend/src/node_modules/@rollup/wasm-node ||
- die "Failed to create node_modules/@rollup/wasm-node"
- mv "${WORKDIR}"/package/* third_party/devtools-frontend/src/node_modules/@rollup/wasm-node ||
- die "Failed to move rollup package"
-
- if [ ! -z "${CHROMIUM_COMMITS[*]}" ]; then
- # for i in "${CHROMIUM_COMMITS[@]}"; do
- for i in "${!CHROMIUM_COMMITS[@]}"; do
- if [[ ${CHROMIUM_COMMITS[$i]} =~ webrtc ]]; then
- patch_prefix="webrtc"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ angle ]]; then
- patch_prefix="angle"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ quiche ]]; then
- patch_prefix="quiche"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ dawn ]]; then
- patch_prefix="dawn"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ perfetto ]]; then
- patch_prefix="perfetto"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ink ]]; then
- patch_prefix="ink"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ vulkan-utility-libraries ]]; then
- patch_prefix="vulkan-utility-libraries"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ruy ]]; then
- patch_prefix="ruy"
- else
- patch_prefix="chromium"
- fi
- pushd "${CHROMIUM_COMMITS[$i]}" > /dev/null || die
- if [[ $i = -* ]]; then
- einfo "Reverting ${patch_prefix}-${i/-}.patch"
- git_wrapper apply -R --exclude="*unittest.cc" --exclude="DEPS" \
- -p1 < "${DISTDIR}/${patch_prefix}-${i/-}.patch"
- else
- einfo "Applying ${patch_prefix}-${i/-}.patch"
- git_wrapper apply --exclude="*unittest.cc" --exclude="DEPS" \
- -p1 < "${DISTDIR}/${patch_prefix}-${i/-}.patch"
- fi
- popd > /dev/null || die
- done
- fi
-
- if ! use bluetooth ; then
- PATCHES+=(
- "${FILESDIR}/disable-bluez-r7.patch"
- )
- fi
-
- if use convert-dict ; then
- PATCHES+=(
- "${FILESDIR}/chromium-ucf-dict-utility-r3.patch"
- )
- fi
-
- if ! use libcxx ; then
- PATCHES+=(
- "${FILESDIR}/fix-wayland-oncecallback-copy.patch"
- )
- fi
-
- if use system-ffmpeg; then
- PATCHES+=(
- "${FILESDIR}/chromium-141-opus-mp3.patch"
- "${FILESDIR}/chromium-135-hevc.patch"
- )
- sed -i "\!AVFMT_FLAG_NOH264PARSE!d" media/filters/ffmpeg_glue.cc || die
- ewarn "You need to expose \"av_stream_get_first_dts\" in ffmpeg via user patch"
- fi
-
- if use system-av1; then
- PATCHES+=(
- "${FILESDIR}/chromium-system-av1.patch"
- )
- fi
-
- if use system-libvpx; then
- PATCHES+=(
- "${FILESDIR}/chromium-system-libvpx.patch"
- )
- fi
-
- if use system-openjpeg ; then
- PATCHES+=(
- "${FILESDIR}/chromium-system-openjpeg-r4.patch"
- )
- fi
-
- # if use x86 ; then
- # #* Fixes a segfault in transport_security_state_generator
- # PATCHES+=(
- # "${FILESDIR}/fix-segfault-x86.patch"
- # )
- # fi
-
- # Testing all patches when NODIE is defined
- if [ ! -z "${NODIE}" ]; then
- for i in "${PATCHES[@]}"; do
- eapply_wrapper "$i"
- done
- nonfatal eapply_user
- else
- default
- fi
-
- if use cromite ; then
- BR_PA_PATH="${WORKDIR}/cromite-${CROMITE_COMMIT_ID}/build/patches"
-
- sed -i '/b\/components\/components_strings\.grd/,+10d' "${BR_PA_PATH}/Add-cromite-flags-support.patch" || die
- sed -i '/b\/chrome\/android\/java\/res\/xml\/privacy_preferences\.xml/,+13d' "${BR_PA_PATH}/Add-cromite-flags-support.patch" || die
- sed -i '/b\/android_webview\/support_library\/java\/src\/org\/chromium\/support_lib_glue/,+11d' "${BR_PA_PATH}/Client-hints-overrides.patch" || die
- sed -i '/webapps_strings.grdp" \/>/{s++webapps_strings.grdp" /><part file="cromite_components_strings_grd/placeholder.txt"/>+;h};${x;/./{x;q0};x;q1}' \
- components/components_strings.grd || die
-
- sed -i 's/absl::/std::/' "${BR_PA_PATH}/Add-a-proxy-configuration-page.patch" || die
-
- filterdiff -p1 "${BR_PA_PATH}/JIT-site-settings.patch" --exclude="content/browser/renderer_host/render_process_host_impl.cc" \
- > "${BR_PA_PATH}/JIT-site-settings.patch1"
- mv -f "${BR_PA_PATH}/JIT-site-settings.patch1" "${BR_PA_PATH}/JIT-site-settings.patch"
-
- BROMITE_PATCHES=(
- "${BR_PA_PATH}/bromite-build-utils.patch"
- "${BR_PA_PATH}/Battery-API-return-nothing.patch"
- "${BR_PA_PATH}/Multiple-fingerprinting-mitigations.patch"
- "${BR_PA_PATH}/Add-flag-to-configure-maximum-connections-per-host.patch"
- "${BR_PA_PATH}/Add-a-proxy-configuration-page.patch"
- "${BR_PA_PATH}/Enable-StrictOriginIsolation-and-SitePerProcess.patch"
- "${BR_PA_PATH}/Disable-requests-for-single-word-Omnibar-searches.patch"
- "${BR_PA_PATH}/Reduce-HTTP-headers-in-DoH-requests-to-bare-minimum.patch"
- "${BR_PA_PATH}/Client-hints-overrides.patch"
- "${BR_PA_PATH}/Disable-idle-detection.patch"
- "${BR_PA_PATH}/Disable-TLS-resumption.patch"
- "${BR_PA_PATH}/Remove-navigator.connection-info.patch"
-
- "${BR_PA_PATH}/AudioBuffer-AnalyserNode-fp-mitigations.patch"
- "${BR_PA_PATH}/Fonts-fingerprinting-mitigation.patch"
- "${BR_PA_PATH}/Content-settings-infrastructure.patch"
- "${BR_PA_PATH}/Add-autoplay-site-setting.patch"
- "${BR_PA_PATH}/Site-setting-for-images.patch"
- "${BR_PA_PATH}/JIT-site-settings.patch"
- "${BR_PA_PATH}/Add-webGL-site-setting.patch"
- "${BR_PA_PATH}/Add-webRTC-site-settings.patch"
- "${BR_PA_PATH}/Show-site-settings-for-cookies-javascript-and-ads.patch"
- "${BR_PA_PATH}/Viewport-Protection-flag.patch"
- "${BR_PA_PATH}/Revert-remove-allowscript-content-setting-secondary-url.patch"
- "${BR_PA_PATH}/Timezone-customization.patch"
- "${BR_PA_PATH}/Disable-speechSynthesis-getVoices-API.patch"
- "${BR_PA_PATH}/Remove-support-for-device-memory-and-cpu-recovery.patch"
- "${BR_PA_PATH}/Disable-Feeback-Collector.patch"
- "${BR_PA_PATH}/Disable-remote-altsvc-for-h3-connections.patch"
- "${BR_PA_PATH}/Add-cromite-flags-support.patch"
- "${BR_PA_PATH}/Enables-deactivation-of-the-js-debugger-statement.patch"
- )
- for i in "${BROMITE_PATCHES[@]}"; do
- if [[ "$i" =~ "Add-autoplay-site-setting.patch" ]] ||
- [[ "$i" =~ "JIT-site-settings.patch" ]] ||
- [[ "$i" =~ "Site-setting-for-images.patch" ]]; then
- einfo "Git binary patch: ${i##*/}"
- git_wrapper apply -p1 < "$i"
- else
- filter_wrapper "$i" --exclude="chrome/android/*"
- fi
- done
-
- #! conflicting patches
- sed -i '/browser_features.cc/,+17d' \
- "${UGC_WD}/patches/extra/ungoogled-chromium/add-flag-to-clear-data-on-exit.patch" || die
- sed -i 's$} // namespace features$BASE_FEATURE(kClearDataOnExit, "ClearDataOnExit", base::FEATURE_DISABLED_BY_DEFAULT);}$' \
- chrome/browser/browser_features.cc || die
- sed -i 's$} // namespace features$BASE_DECLARE_FEATURE(kClearDataOnExit);}$' \
- chrome/browser/browser_features.h || die
- sed -i 's$kChromeUIAboutHost,$kChromeUIAboutHost,"ungoogled-first-run",$' \
- chrome/common/webui_url_constants.cc || die
- sed -i '/chrome\/common\/webui_url_constants.cc/Q' \
- "${UGC_WD}/patches/extra/ungoogled-chromium/first-run-page.patch" || die
-
- #! normalise paths in py
- sed -i 's$os.path.dirname(include_file)$os.path.abspath(os.path.dirname(include_file))$' \
- build/bromite/gyp/cpp_bromite_include.py || die
- fi
-
- # if [[ ${LLVM_SLOT} == "19" ]]; then
- # # Upstream now hard depend on a feature that was added in LLVM 20.1, but we don't want to stabilise that yet.
- # # Do the temp file shuffle in case someone is using something other than `gawk`
- # {
- # awk '/config\("clang_warning_suppression"\) \{/ { print $0 " }"; sub(/clang/, "xclang"); print; next }
- # { print }' build/config/compiler/BUILD.gn > "${T}/build.gn" && \
- # mv "${T}/build.gn" build/config/compiler/BUILD.gn
- # } || die "Unable to disable warning suppression"
- # fi
-
- ## Not included in -lite tarballs, but we should check for it anyway.
- #if [[ -f third_party/node/linux/node-linux-x64/bin/node ]]; then
- # rm third_party/node/linux/node-linux-x64/bin/node || die
- #else
- # mkdir -p third_party/node/linux/node-linux-x64/bin || die
- #fi
- #ln -s "${EPREFIX}"/usr/bin/node third_party/node/linux/node-linux-x64/bin/node || die
-
- cp "${FILESDIR}/libusb.gn" build/linux/unbundle || die
- sed -i '/^REPLACEMENTS.*$/{s++REPLACEMENTS = {"libusb":"third_party/libusb/BUILD.gn",+;h};${x;/./{x;q0};x;q1}' \
- build/linux/unbundle/replace_gn_files.py || die
- sed -i '/^.*deps.*third_party\/jsoncpp.*$/{s++public_deps \+= [ "//third_party/jsoncpp" ]+;h};${x;/./{x;q0};x;q1}' \
- third_party/webrtc/rtc_base/BUILD.gn || die
-
- if use override-data-dir; then
- sed -i '/"chromium";/{s++"ungoogled-chromium";+;h};${x;/./{x;q0};x;q1}' \
- chrome/common/chrome_paths_linux.cc || die
- fi
-
- if use system-abseil-cpp; then
- eapply_wrapper "${FILESDIR}/chromium-147-system-abseil.patch"
-
- #! SFINAE mangling incompatibility between clang and gcc:
- #! https://github.com/llvm/llvm-project/issues/85656
- #! gcc: _ZN4absl12lts_202601074CordC1INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELi0EEEOT_
- #! clang: _ZN4absl12lts_202601074CordC1INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEETnNSt9enable_ifIXsr3std7is_sameIT_S8_EE5valueEiE4typeELi0EEEOSA_
- #! So, either this:
- eapply_wrapper "${FILESDIR}/chromium-141-system-abseil-cord.patch"
- #! or build with -fclang-abi-compat=17
-
- # cp -f /usr/include/absl/base/options.h third_party/abseil-cpp/absl/base/options.h
- # sed -i '/^#define ABSL_OPTION_USE_STD_ORDERING.*$/{s++#define ABSL_OPTION_USE_STD_ORDERING 1+;h};${x;/./{x;q0};x;q1}' \
- # third_party/abseil-cpp/absl/base/options.h || die
- fi
-
- #* Applying UGC PRs here
- if [ ! -z "${UGC_PR_COMMITS[*]}" ]; then
- pushd "${UGC_WD}" >/dev/null
- for i in "${UGC_PR_COMMITS[@]}"; do
- eapply_wrapper "${DISTDIR}/${PN}-$i.patch"
- done
- popd >/dev/null
- fi
-
- # From here we adapt ungoogled-chromium's patches to our needs
- local ugc_pruning_list="${UGC_WD}/pruning.list"
- local ugc_patch_series="${UGC_WD}/patches/series"
- local ugc_substitution_list="${UGC_WD}/domain_substitution.list"
-
- local ugc_unneeded=(
- # GN bootstrap
- extra/debian/gn/parallel
- # following Gentoo's Chromium
- core/ungoogled-chromium/build-with-wasm-rollup
- )
-
- if use cromite ; then
- einfo "Using fingerprinting patches from Cromite instead"
- ugc_unneeded+=(
- extra/bromite/fingerprinting-flags-client-rects-and-measuretext
- extra/bromite/flag-max-connections-per-host
- extra/bromite/flag-fingerprinting-canvas-image-data-noise
- extra/ungoogled-chromium/add-components-ungoogled
- extra/ungoogled-chromium/remove-pac-size-limit
- )
- fi
-
- # #* Temporary fix
- # sed -i "\!ios/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/icu/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/libjpeg_turbo/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/snappy/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/closure_compiler/!d" "${ugc_pruning_list}" || die
-
- # #* Didn't unpack them at the first place
- # sed -i "\!build/linux/debian_bullseye_i386-sysroot!d" "${ugc_pruning_list}" || die
- # sed -i "\!build/linux/debian_bullseye_amd64-sysroot!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/llvm-build!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/node/linux!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/rust-src!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/rust-toolchain!d" "${ugc_pruning_list}" || die
- # if ! use libcxx ; then
- # sed -i "\!third_party/libc!d" "${ugc_pruning_list}" || die
- # fi
- sed -i "s|debug('files|error('files|" \
- "${UGC_WD}/utils/prune_binaries.py" || die
- sed -i "\!third_party/node/linux!d" \
- "${UGC_WD}/utils/prune_binaries.py" || die
-
- local ugc_p ugc_dir
- for p in "${ugc_unneeded[@]}"; do
- einfo "Removing ${p}.patch"
- sed -i "\!${p}.patch!d" "${ugc_patch_series}" || die
- done
-
- if [ ! -z "${UGC_SKIP_PATCHES}" ]; then
- for p in ${UGC_SKIP_PATCHES}; do
- ewarn "Removing ${p}"
- sed -i "\!${p}!d" "${ugc_patch_series}" || die
- done
- fi
-
- if [ ! -z "${UGC_KEEP_BINARIES}" ]; then
- for p in ${UGC_KEEP_BINARIES}; do
- ewarn "Keeping binary ${p}"
- sed -i "\!${p}!d" "${ugc_pruning_list}" || die
- done
- fi
-
- if [ ! -z "${UGC_SKIP_SUBSTITUTION}" ]; then
- for p in ${UGC_SKIP_SUBSTITUTION}; do
- ewarn "No substitutions in ${p}"
- sed -i "\!${p}!d" "${ugc_substitution_list}" || die
- done
- fi
-
- ebegin "Pruning binaries"
- "${UGC_WD}/utils/prune_binaries.py" -q . "${UGC_WD}/pruning.list"
- eend $? || die
-
- ebegin "Applying ungoogled-chromium patches"
- "${UGC_WD}/utils/patches.py" -q apply . "${UGC_WD}/patches"
- eend $? || die
-
- ebegin "Applying domain substitution"
- "${UGC_WD}/utils/domain_substitution.py" -q apply -r "${UGC_WD}/domain_regex.list" -f "${UGC_WD}/domain_substitution.list" .
- eend $? || die
-
- # Sanity check esbuild version before we start removing files.
- # We _could_ patch the version check out - in theory esbuild upstream are being super conservative after
- # arch(AUR) packaged an `esbuild` binary and set ESBUILD_BINARY_PATH=/usr/bin/esbuild, causing much breakage,
- # but this is fine too and exactly matches what upstream are expecting.
- # https://github.com/evanw/esbuild/issues/2894
- local esbuild_js="${S}/third_party/devtools-frontend/src/node_modules/esbuild/lib/main.js"
- local found
- found=$(awk -F'"' '/if \(binaryVersion !==/ {print $2}' "${esbuild_js}")
- if [[ "${found}" != "${ESBUILD_VER}" ]]; then
- die "esbuild version mismatch: expected ${ESBUILD_VER}, found ${found}"
- fi
-
- elog "Removing bundled binaries from source tree ..."
- # Purge bundled ELF files: These are non-portable and will cause issues if used instead of system versions.
- # Use `--wasm` to also remove WebAssembly binaries, if desired - they're portable so shouldn't break builds.
- ${EPYTHON} "${FILESDIR}/bin-finder.py" --elf "${S}" | awk '{print $1}' | xargs rm -f ||
- die "Failed to remove bundled binaries"
-
- # And now we restore any that we actually need, from the host system
- local esbuild_path="${S}/third_party/devtools-frontend/src/third_party/esbuild"
- local -A restore_list=(
- ["/usr/bin/esbuild-${ESBUILD_VER}"]="${esbuild_path}/esbuild"
- ["/usr/bin/gperf"]="${S}/third_party/gperf/cipd/bin/gperf"
- ["/usr/bin/node"]="${S}/third_party/node/linux/node-linux-x64/bin/node"
- ["/usr/lib/go/bin/go"]="${S}/third_party/dawn/tools/golang/linux-amd64/bin/go"
- )
-
- for src in "${!restore_list[@]}"; do
- dst="${restore_list[${src}]}"
- if [[ -f "${src}" ]]; then
- einfo "Symlinking ${src} ..."
- # Make sure the parent dir exists; some tarballs don't include (e.g.) node's bindir
- mkdir -p "$(dirname "${dst}")" || die "Failed to create directory for ${dst}"
- ln -s "${src}" "${dst}" || die "Failed to symlink ${dst} from ${src}"
- if [[ ! -L "${dst}" || "$(readlink -f "${dst}")" != "${src}" ]]; then
- die "Symlink verification failed for ${dst} -> ${src}"
- fi
- else
- die "Expected to find ${src} to restore ${dst}, but it does not exist."
- fi
- done
-
- # adjust python interpreter version
- sed -i -e "s|\(^script_executable = \).*|\1\"${EPYTHON}\"|g" .gn || die
-
- # Use the system copy of hwdata's usb.ids; upstream is woefully out of date (2015!)
- sed 's|//third_party/usb_ids/usb.ids|/usr/share/hwdata/usb.ids|g' \
- -i services/device/public/cpp/usb/BUILD.gn || die "Failed to set system usb.ids path"
-
- # remove_bundled_libraries.py walks the source tree and looks for paths containing the substring 'third_party'
- # whitelist matches use the right-most matching path component, so we need to whitelist from that point down.
- local keeplibs=(
- base/third_party/cityhash
- )
- use system-double-conversion || keeplibs+=(
- base/third_party/double_conversion
- )
- keeplibs+=(
- base/third_party/icu
- base/third_party/nspr
- base/third_party/superfasthash
- base/third_party/symbolize
- base/third_party/xdg_user_dirs
- buildtools/third_party/libc++
- buildtools/third_party/libc++abi
- )
- use cromite && keeplibs+=(
- cromite_flags/third_party
- )
- keeplibs+=(
- net/third_party/mozilla_security_manager
- net/third_party/quic
- net/third_party/uri_template
- )
- use system-abseil-cpp || keeplibs+=(
- third_party/abseil-cpp
- )
- keeplibs+=(
- third_party/angle
- third_party/angle/src/common/third_party/xxhash
- third_party/angle/src/third_party/ceval
- )
- use nvidia || keeplibs+=(
- third_party/angle/src/third_party/libXNVCtrl
- )
- keeplibs+=(
- third_party/angle/src/third_party/volk
- third_party/anonymous_tokens
- third_party/apple_apsl
- third_party/axe-core
- third_party/bidimapper
- third_party/blink
- third_party/boringssl
- third_party/boringssl/src/third_party/fiat
- third_party/breakpad
- third_party/breakpad/breakpad/src/third_party/curl
- )
- use system-brotli || keeplibs+=(
- third_party/brotli
- )
- keeplibs+=(
- third_party/catapult
- third_party/catapult/common/py_vulcanize/third_party/rcssmin
- third_party/catapult/common/py_vulcanize/third_party/rjsmin
- third_party/catapult/third_party/beautifulsoup4-4.9.3
- third_party/catapult/third_party/html5lib-1.1
- third_party/catapult/third_party/polymer
- third_party/catapult/third_party/six
- third_party/catapult/third_party/typ
- third_party/catapult/tracing/third_party/d3
- third_party/catapult/tracing/third_party/gl-matrix
- third_party/catapult/tracing/third_party/jpeg-js
- third_party/catapult/tracing/third_party/jszip
- third_party/catapult/tracing/third_party/mannwhitneyu
- third_party/catapult/tracing/third_party/oboe
- third_party/catapult/tracing/third_party/pako
- third_party/ced
- third_party/cld_3
- third_party/closure_compiler
- )
- use libcxx && keeplibs+=(
- third_party/compiler-rt
- )
- keeplibs+=(
- third_party/content_analysis_sdk
- third_party/cpuinfo
- third_party/crabbyavif
- third_party/crashpad
- third_party/crashpad/crashpad/third_party/lss
- third_party/crashpad/crashpad/third_party/zlib
- )
- use system-crc32c || keeplibs+=(
- third_party/crc32c
- )
- keeplibs+=(
- third_party/cros_system_api
- third_party/d3
- third_party/dawn
- third_party/dawn/third_party/gn/webgpu-cts
- third_party/dawn/third_party/OpenGL-Registry
- third_party/dawn/third_party/renderdoc
- third_party/dawn/third_party/webgpu-headers
- third_party/depot_tools
- third_party/devscripts
- third_party/devtools-frontend
- third_party/devtools-frontend/src/front_end/third_party/acorn
- third_party/devtools-frontend/src/front_end/third_party/additional_readme_paths.json
- third_party/devtools-frontend/src/front_end/third_party/axe-core
- third_party/devtools-frontend/src/front_end/third_party/chromium
- third_party/devtools-frontend/src/front_end/third_party/codemirror
- third_party/devtools-frontend/src/front_end/third_party/csp_evaluator
- third_party/devtools-frontend/src/front_end/third_party/diff
- third_party/devtools-frontend/src/front_end/third_party/i18n
- third_party/devtools-frontend/src/front_end/third_party/intl-messageformat
- third_party/devtools-frontend/src/front_end/third_party/json5
- third_party/devtools-frontend/src/front_end/third_party/legacy-javascript
- third_party/devtools-frontend/src/front_end/third_party/lighthouse
- third_party/devtools-frontend/src/front_end/third_party/lit
- third_party/devtools-frontend/src/front_end/third_party/marked
- third_party/devtools-frontend/src/front_end/third_party/puppeteer
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/third_party/mitt
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/third_party/parsel-js
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/third_party/rxjs
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/third_party/urlpattern-polyfill
- third_party/devtools-frontend/src/front_end/third_party/source-map-scopes-codec
- third_party/devtools-frontend/src/front_end/third_party/third-party-web
- third_party/devtools-frontend/src/front_end/third_party/vscode.web-custom-data
- third_party/devtools-frontend/src/front_end/third_party/wasmparser
- third_party/devtools-frontend/src/front_end/third_party/web-vitals
- third_party/devtools-frontend/src/third_party
- third_party/dom_distiller_js
- third_party/dragonbox
- third_party/eigen3
- third_party/emoji-segmenter
- third_party/farmhash
- third_party/fast_float
- third_party/fdlibm
- third_party/federated_compute/chromium/fcp
- third_party/federated_compute/src/fcp
- third_party/federated_compute/third_party/googleapis
- third_party/federated_compute/third_party/protodatastore-cpp
- third_party/federated_compute/third_party/tensorflow-federated
- third_party/fft2d
- third_party/flatbuffers
- third_party/fp16
- third_party/freetype
- third_party/fusejs
- third_party/fxdiv
- third_party/gemmlowp
- third_party/google_input_tools
- third_party/google_input_tools/third_party/closure_library
- third_party/google_input_tools/third_party/closure_library/third_party/closure
- third_party/googletest
- third_party/gperf # We symlink system gperf, but this will purge the symlink since we tidy up afterwards.
- third_party/highway
- third_party/hunspell
- third_party/hyphenation-patterns
- third_party/ink/src/ink/brush
- third_party/ink/src/ink/color
- third_party/ink/src/ink/geometry
- third_party/ink/src/ink/rendering
- third_party/ink/src/ink/rendering/skia/common_internal
- third_party/ink/src/ink/rendering/skia/native
- third_party/ink/src/ink/rendering/skia/native/internal
- third_party/ink/src/ink/strokes
- third_party/ink/src/ink/types
- third_party/inspector_protocol
- third_party/ipcz
- third_party/jinja2
- )
- use system-jsoncpp || keeplibs+=(
- third_party/jsoncpp
- )
- keeplibs+=(
- third_party/khronos
- third_party/lens_server_proto
- third_party/leveldatabase
- third_party/libaddressinput
- )
- use libcxx && keeplibs+=(
- third_party/libc++
- )
- keeplibs+=(
- third_party/libdrm
- third_party/libgav1
- third_party/libjingle
- third_party/libpfm4
- third_party/libphonenumber
- third_party/libpng
- third_party/libsecret
- third_party/libsrtp
- third_party/libsync
- third_party/libtess2/libtess2
- third_party/libtess2/src/Include
- third_party/libtess2/src/Source
- third_party/liburlpattern
- )
- use system-libusb || keeplibs+=(
- third_party/libusb
- )
- keeplibs+=(
- third_party/libva_protected_content
- )
- use system-libvpx || keeplibs+=(
- third_party/libvpx
- third_party/libvpx/source/libvpx/third_party/x86inc
- )
- keeplibs+=(
- third_party/libwebm
- third_party/libx11
- third_party/libxcb-keysyms
- third_party/libxml/chromium
- third_party/libyuv
- third_party/libzip
- third_party/lit
- )
- use libcxx && keeplibs+=(
- third_party/llvm-libc
- third_party/llvm-libc/src/shared/
- )
- keeplibs+=(
- third_party/lottie
- third_party/lss
- third_party/lzma_sdk
- third_party/mako
- third_party/markupsafe
- third_party/material_color_utilities
- third_party/metrics_proto
- third_party/minigbm
- third_party/ml_dtypes
- third_party/modp_b64
- third_party/nasm
- third_party/nearby
- third_party/neon_2_sse
- third_party/node
- third_party/oak/chromium/proto
- third_party/oak/chromium/proto/attestation
- third_party/omnibox_proto
- third_party/one_euro_filter
- third_party/openscreen
- third_party/openscreen/src/third_party/
- third_party/openscreen/src/third_party/tinycbor/src/src
- third_party/ots
- third_party/pdfium
- third_party/pdfium/third_party/agg23
- third_party/pdfium/third_party/bigint
- third_party/pdfium/third_party/freetype
- third_party/pdfium/third_party/lcms
- )
- use system-openjpeg || keeplibs+=(
- third_party/pdfium/third_party/libopenjpeg
- )
- keeplibs+=(
- third_party/pdfium/third_party/libtiff
- third_party/perfetto
- third_party/perfetto/protos/third_party/android
- third_party/perfetto/protos/third_party/chromium
- third_party/perfetto/protos/third_party/pprof
- third_party/perfetto/protos/third_party/primes
- third_party/perfetto/protos/third_party/simpleperf
- third_party/pffft
- third_party/ply
- third_party/polymer
- third_party/private_membership
- third_party/private-join-and-compute
- third_party/protobuf
- third_party/protobuf/third_party/utf8_range
- third_party/pthreadpool
- third_party/puffin
- third_party/pyjson5
- third_party/pyyaml
- third_party/rapidhash
- third_party/readability
- third_party/rnnoise
- third_party/rust
- third_party/ruy
- third_party/s2cellid
- third_party/search_engines_data
- third_party/securemessage
- third_party/selenium-atoms
- third_party/sentencepiece
- third_party/sentencepiece/src/third_party/darts_clone
- third_party/shell-encryption
- third_party/simdutf
- third_party/simplejson
- third_party/six
- third_party/skia
- third_party/skia/include/third_party/vulkan
- third_party/smhasher
- )
- use system-snappy || keeplibs+=(
- third_party/snappy
- )
- keeplibs+=(
- third_party/spirv-headers
- third_party/spirv-tools
- third_party/sqlite
- third_party/swiftshader
- third_party/swiftshader/third_party/astc-encoder
- third_party/swiftshader/third_party/llvm-subzero
- third_party/swiftshader/third_party/marl
- third_party/swiftshader/third_party/SPIRV-Headers/include/spirv
- third_party/swiftshader/third_party/SPIRV-Tools
- third_party/swiftshader/third_party/subzero
- third_party/tensorflow_models
- third_party/tensorflow-text
- third_party/tflite
- third_party/tflite/src/third_party/fft2d
- third_party/tflite/src/third_party/xla/third_party/tsl
- third_party/tflite/src/third_party/xla/xla/tsl/framework
- third_party/tflite/src/third_party/xla/xla/tsl/lib/random
- third_party/tflite/src/third_party/xla/xla/tsl/platform
- third_party/tflite/src/third_party/xla/xla/tsl/protobuf
- third_party/tflite/src/third_party/xla/xla/tsl/util
- third_party/ukey2
- third_party/utf
- third_party/vulkan
- third_party/wayland
- third_party/webdriver
- third_party/webgpu-cts
- third_party/webrtc
- third_party/webrtc/common_audio/third_party/ooura
- third_party/webrtc/common_audio/third_party/spl_sqrt_floor
- third_party/webrtc/modules/third_party/fft
- third_party/webrtc/modules/third_party/g711
- third_party/webrtc/modules/third_party/g722
- third_party/widevine
- )
- use system-woff2 || keeplibs+=(
- third_party/woff2
- )
- keeplibs+=(
- third_party/wuffs
- third_party/x11proto
- third_party/xcbproto
- third_party/xnnpack
- third_party/zlib/google
- third_party/zxcvbn-cpp
- url/third_party/mozilla
- v8/third_party/glibc
- v8/third_party/inspector_protocol
- v8/third_party/rapidhash-v8
- v8/third_party/siphash
- v8/third_party/utf8-decoder
- v8/third_party/v8
- v8/third_party/valgrind
-
- # gyp -> gn leftovers
- third_party/speech-dispatcher
- third_party/usb_ids
- )
-
- if use test; then
- keeplibs+=(
- third_party/breakpad/breakpad/src/processor
- third_party/fuzztest
- third_party/google_benchmark/src/include/benchmark
- third_party/google_benchmark/src/src
- third_party/test_fonts
- third_party/test_fonts/fontconfig
- third_party/test_fonts/test_fonts
- )
- fi
-
- # USE=system-*
- if ! use system-harfbuzz; then
- keeplibs+=( third_party/harfbuzz )
- fi
-
- if ! use system-ffmpeg; then
- keeplibs+=( third_party/ffmpeg third_party/opus )
- fi
-
- if ! use system-icu; then
- keeplibs+=( third_party/icu )
- fi
-
- if ! use system-zstd; then
- keeplibs+=( third_party/zstd )
- fi
-
- if ! use system-av1; then
- keeplibs+=(
- third_party/dav1d
- third_party/libaom
- third_party/libaom/source/libaom/third_party/fastfeat
- third_party/libaom/source/libaom/third_party/vector
- third_party/libaom/source/libaom/third_party/x86inc
- )
- fi
-
- if use libcxx; then
- keeplibs+=(
- third_party/libc++
- third_party/llvm-libc
- )
- fi
-
- if ! use system-openh264; then
- keeplibs+=( third_party/openh264 )
- fi
-
- if ! use system-re2; then
- keeplibs+=( third_party/re2 )
- fi
-
- # Arch-specific
- if use arm64 || use ppc64 ; then
- keeplibs+=( third_party/swiftshader/third_party/llvm-10.0 )
- fi
- # we need to generate ppc64 stuff because upstream does not ship it yet
- # it has to be done before unbundling.
- if use ppc64; then
- pushd third_party/libvpx >/dev/null || die
- mkdir -p source/config/linux/ppc64 || die
- # requires git and clang, bug #832803
- # Revert https://chromium.googlesource.com/chromium/src/+/b463d0f40b08b4e896e7f458d89ae58ce2a27165%5E%21/third_party/libvpx/generate_gni.sh
- # and https://chromium.googlesource.com/chromium/src/+/71ebcbce867dd31da5f8b405a28fcb0de0657d91%5E%21/third_party/libvpx/generate_gni.sh
- # since we're not in a git repo
- sed -i -e "s|^update_readme||g; s|clang-format|${EPREFIX}/bin/true|g; /^git -C/d; /git cl/d; /cd \$BASE_DIR\/\$LIBVPX_SRC_DIR/ign format --in-place \$BASE_DIR\/BUILD.gn\ngn format --in-place \$BASE_DIR\/libvpx_srcs.gni" \
- generate_gni.sh || die
- ./generate_gni.sh || die
- popd >/dev/null || die
-
- pushd third_party/ffmpeg >/dev/null || die
- cp libavcodec/ppc/h264dsp.c libavcodec/ppc/h264dsp_ppc.c || die
- cp libavcodec/ppc/h264qpel.c libavcodec/ppc/h264qpel_ppc.c || die
- popd >/dev/null || die
- fi
-
- # Sanity check keeplibs, on major version bumps it is often necessary to update this list
- # and this enables us to hit them all at once.
- # There are some entries that need to be whitelisted (TODO: Why? The file is understandable, the rest seem odd)
- whitelist_libs=(
- net/third_party/quic
- third_party/devtools-frontend/src/front_end/third_party/additional_readme_paths.json
- third_party/libjingle
- third_party/mesa
- third_party/skia/third_party/vulkan
- third_party/vulkan
- )
- local not_found_libs=()
- for lib in "${keeplibs[@]}"; do
- if [[ ! -d "${lib}" ]] && ! has "${lib}" "${whitelist_libs[@]}"; then
- not_found_libs+=( "${lib}" )
- fi
- done
-
- if [[ ${#not_found_libs[@]} -gt 0 ]]; then
- ewarn "The following \`keeplibs\` directories were not found in the source tree:"
- for lib in "${not_found_libs[@]}"; do
- ewarn " ${lib}"
- done
- fi
-
- keeplibs+=( third_party/ungoogled )
-
- # Remove most bundled libraries. Some are still needed.
- einfo "Unbundling third-party libraries ..."
- build/linux/unbundle/remove_bundled_libraries.py "${keeplibs[@]}" --do-remove || die
-
- # Interferes with our bundled clang path; we don't want stripped binaries anyway.
- sed -i -e 's|${clang_base_path}/bin/llvm-strip|/bin/true|g' \
- -e 's|${clang_base_path}/bin/llvm-objcopy|/bin/true|g' \
- build/linux/strip_binary.gni || die
-}
-
-src_configure() {
- # Calling this here supports resumption via FEATURES=keepwork
- python_setup
-
- # Bug 491582.
- export TMPDIR="${WORKDIR}/temp"
- mkdir -p -m 755 "${TMPDIR}" || die
-
- # https://bugs.gentoo.org/654216
- addpredict /dev/dri/ #nowarn
-
- # Use system-provided libraries.
- # TODO: freetype -- remove sources (https://bugs.chromium.org/p/pdfium/issues/detail?id=733).
- # TODO: use_system_hunspell (upstream changes needed).
- # TODO: use_system_protobuf (bug #525560).
- # TODO: use_system_sqlite (http://crbug.com/22208).
-
- # libevent: https://bugs.gentoo.org/593458
- local gn_system_libraries=(
- flac
- fontconfig
- freetype
- libjpeg
- libwebp
- libxml
- libxslt
- zlib
- )
- if use system-abseil-cpp; then
- gn_system_libraries+=(
- absl_algorithm
- absl_base
- absl_cleanup
- absl_container
- absl_crc
- absl_debugging
- absl_flags
- absl_functional
- absl_hash
- absl_log
- absl_log_internal
- absl_memory
- absl_meta
- absl_numeric
- absl_random
- absl_status
- absl_strings
- absl_synchronization
- absl_time
- absl_types
- absl_utility
- )
- fi
- if use system-brotli; then
- gn_system_libraries+=( brotli )
- fi
- if use system-crc32c; then
- gn_system_libraries+=( crc32c )
- fi
- if use system-double-conversion; then
- gn_system_libraries+=( double-conversion )
- fi
- if use system-woff2; then
- gn_system_libraries+=( woff2 )
- fi
- if use nvidia; then
- gn_system_libraries+=( libXNVCtrl )
- fi
- if use system-ffmpeg; then
- gn_system_libraries+=( ffmpeg opus )
- fi
- if use system-jsoncpp; then
- gn_system_libraries+=( jsoncpp )
- fi
- if use system-icu; then
- gn_system_libraries+=( icu )
- fi
- if use system-zstd; then
- gn_system_libraries+=( zstd )
- fi
- if use system-av1; then
- gn_system_libraries+=( dav1d libaom )
- fi
- if use system-libusb; then
- gn_system_libraries+=( libusb )
- fi
- if use system-libvpx; then
- gn_system_libraries+=( libvpx )
- fi
- use system-openh264 && gn_system_libraries+=(
- openh264
- )
- use system-re2 && gn_system_libraries+=(
- re2
- )
- use system-snappy && gn_system_libraries+=(
- snappy
- )
-
- build/linux/unbundle/replace_gn_files.py --system-libraries "${gn_system_libraries[@]}" ||
- die "Failed to replace GN files for system libraries"
-
- # TODO 131: The above call clobbers `enable_freetype = true` in the freetype gni file
- # drop the last line, then append the freetype line and a new curly brace to end the block
- local freetype_gni="build/config/freetype/freetype.gni"
- sed -i -e '$d' ${freetype_gni} || die
- echo " enable_freetype = true" >> ${freetype_gni} || die
- echo "}" >> ${freetype_gni} || die
-
- if use !custom-cflags; then
- replace-flags "-Os" "-O2"
- strip-flags
- # Debug info section overflows without component build
- # Prevent linker from running out of address space, bug #471810 .
- filter-flags "-g*"
- # 949123: Several multimedia components explicitly build with specific CFLAGS and
- # use runtime detection to enable optimisations; unfortunately any of our CFLAGS are suffixed
- # to the end of the command line, which causes build failures.
- fi
- # Since M150 `skia` will begin breaking for x86_64 due to compilation of `avx512` code paths;
- # we need to filter these for all arches.
- filter-flags "-march*" "-mtune*" "-mcpu*"
-
- # We don't use the same clang version as upstream, and with -Werror
- # we need to make sure that we don't get superfluous warnings.
- append-flags -Wno-unknown-warning-option
- if tc-is-cross-compiler; then # can you cross-compile with the bundled toolchain?
- export BUILD_CXXFLAGS+=" -Wno-unknown-warning-option"
- export BUILD_CFLAGS+=" -Wno-unknown-warning-option"
- fi
-
- # Start building our GN options
- local myconf_gn=() # Tip: strings must be quoted, bools or numbers are fine
-
- if use !bundled-toolchain; then
- # We already forced the "correct" clang via pkg_setup
-
- if tc-is-cross-compiler; then
- CC="${CC} -target ${CHOST} --sysroot ${ESYSROOT}"
- CXX="${CXX} -target ${CHOST} --sysroot ${ESYSROOT}"
- BUILD_AR=${AR}
- BUILD_CC=${CC}
- BUILD_CXX=${CXX}
- BUILD_NM=${NM}
- fi
-
- # Make sure the build system will use the right tools, bug #340795.
- tc-export AR CC CXX NM
-
- strip-unsupported-flags
- append-ldflags -Wl,--undefined-version # https://bugs.gentoo.org/918897#c32
-
- myconf_gn+=(
- "is_clang=true"
- "clang_use_chrome_plugins=false"
- "use_clang_modules=false" # M141 enables this for the linux platform by default.
- 'custom_toolchain="//build/toolchain/linux/unbundle:default"'
- # From M127 we need to provide a location for libclang and the clang resource dir so that bindgen can find them
- "bindgen_libclang_path=\"$(get_llvm_prefix)/$(get_libdir)\""
- "bindgen_clang_resource_dir=\"${EPREFIX}/usr/lib/clang/${LLVM_SLOT}/include\""
- "bindgen_extra_clang_args=[\"-I${EPREFIX}/usr/lib/clang/${LLVM_SLOT}/include\"]"
- "clang_base_path=\"${EPREFIX}/usr/lib/clang/${LLVM_SLOT}/\""
- "rust_bindgen_root=\"${EPREFIX}/usr/\""
- "rust_sysroot_absolute=\"$(get_rust_prefix)\""
- "rustc_version=\"${RUST_SLOT}\""
- )
-
- if tc-ld-is-mold; then
- myconf_gn+=(
- "use_mold=true"
- "use_lld=false"
- "linker_path=\"${EPREFIX}/usr/bin/mold\""
- )
- else
- myconf_gn+=( "use_lld=true" )
- fi
-
- if [[ ${LLVM_SLOT} -lt 23 ]]; then
- # Workaround for -fsanitize-ignore-for-ubsan-feature (added in LLVM 23)
- myconf_gn+=( 'clang_has_ubsan_feature_ignore=false' )
- fi
-
- if ! tc-is-cross-compiler; then
- myconf_gn+=( 'host_toolchain="//build/toolchain/linux/unbundle:default"' )
- else
- tc-export BUILD_{AR,CC,CXX,NM}
- myconf_gn+=(
- 'host_toolchain="//build/toolchain/linux/unbundle:host"'
- 'v8_snapshot_toolchain="//build/toolchain/linux/unbundle:host"'
- "host_pkg_config=\"$(tc-getBUILD_PKG_CONFIG)\""
- "pkg_config=\"$(tc-getPKG_CONFIG)\""
- )
-
- # setup cups-config, build system only uses --libs option
- if use cups; then
- mkdir "${T}/cups-config" || die
- cp "${ESYSROOT}/usr/bin/${CHOST}-cups-config" "${T}/cups-config/cups-config" || die
- export PATH="${PATH}:${T}/cups-config"
- fi
-
- # Don't inherit PKG_CONFIG_PATH from environment
- local -x PKG_CONFIG_PATH=
- fi
-
- fi # !bundled-toolchain
-
- local myarch
- myarch="$(tc-arch)"
- case ${myarch} in
- amd64)
- # Bug 530248, 544702, 546984, 853646.
- use !custom-cflags && filter-flags -mno-mmx -mno-sse2 -mno-ssse3 -mno-sse4.1 \
- -mno-avx -mno-avx2 -mno-fma -mno-fma4 -mno-xop -mno-sse4a
- myconf_gn+=( 'target_cpu="x64"' )
- ;;
- x86)
- # Bug 530248, 544702, 546984, 853646.
- use !custom-cflags && filter-flags -mno-mmx -mno-sse2 -mno-ssse3 -mno-sse4.1 \
- -mno-avx -mno-avx2 -mno-fma -mno-fma4 -mno-xop -mno-sse4a
- myconf_gn+=( 'target_cpu="x86"' )
- ;;
- arm64)
- myconf_gn+=( 'target_cpu="arm64"' )
- ;;
- ppc64)
- myconf_gn+=( 'target_cpu="ppc64"' )
- ;;
- *)
- die "Failed to determine target arch, got '${myarch}'."
- ;;
- esac
-
- # Common options
-
- myconf_gn+=(
- # Disable code formating of generated files
- "blink_enable_generated_code_formatting=false"
- # enable DCHECK with USE=debug only, increases chrome binary size by 30%, bug #811138.
- # DCHECK is fatal by default, make it configurable at runtime, #bug 807881.
- "dcheck_always_on=$(usex debug true false)"
- "dcheck_is_configurable=$(usex debug true false)"
- # Chromium builds provided by Linux distros should disable the testing config
- "disable_fieldtrial_testing_config=true"
- # Custom patch: Enable building Chromium as individual channels (e.g. stable, beta, dev) that
- # use different profile directories, desktop entries, etc. This enables slotting the ebuild.
- "enable_channel_branding=true"
- # 131 began laying the groundwork for replacing freetype with
- # "Rust-based Fontations set of libraries plus Skia path rendering"
- # We now need to opt-in
- "enable_freetype=true"
- "enable_hangout_services_extension=$(usex hangouts true false)"
- # Don't need nocompile checks and GN crashes with our config (verify with modern GN)
- "enable_nocompile_tests=false"
- # pseudolocales are only used for testing
- "enable_pseudolocales=false"
- "enable_widevine=$(usex widevine true false)"
- # Disable fatal linker warnings, bug 506268.
- "fatal_linker_warnings=false"
- # Component build isn't generally intended for use by end users. It's mostly useful
- # for development and debugging.
- "is_component_build=false"
- # GN needs explicit config for Debug/Release as opposed to inferring it from build directory.
- "is_debug=false"
- "is_official_build=$(usex official true false)"
- # Enable ozone wayland and/or headless support
- "ozone_auto_platforms=false"
- "ozone_platform_headless=true"
- # Enables building without non-free unRAR licence
- "safe_browsing_use_unrar=false"
- # "thin_lto_enable_optimizations=${use_lto}"
- "treat_warnings_as_errors=false"
- # Use in-tree libc++ (buildtools/third_party/libc++ and buildtools/third_party/libc++abi)
- # instead of the system C++ library for C++ standard library support.
- # default: true, but let's be explicit (forced since 120 ; USE removed 127).
- "use_custom_libcxx=true"
- # Enable ozone wayland and/or headless support
- "use_ozone=true"
- # The sysroot is the oldest debian image that chromium supports, we don't need it
- "use_sysroot=false"
- # See dependency logic in third_party/BUILD.gn
- "use_system_harfbuzz=$(usex system-harfbuzz true false)"
- # "use_thin_lto=${use_lto}"
- # Only enabled for clang, but gcc has endian macros too
- "v8_use_libm_trig_functions=true"
- "tint_use_system_go=true"
- )
-
- myconf_gn+=( "enable_iterator_debugging=$(usex debug true false)" )
-
- if use debug; then
- myconf_gn+=(
- "symbol_level=2"
- "blink_symbol_level=2"
- "v8_symbol_level=2"
- )
- else
- myconf_gn+=(
- "symbol_level=0"
- "blink_symbol_level=0"
- "v8_symbol_level=0"
- )
- fi
-
- if use bindist ; then
- myconf_gn+=(
- # If this is set to false Chromium won't be able to load any proprietary codecs
- # even if provided with an ffmpeg capable of h264/aac decoding
- "proprietary_codecs=true"
- 'ffmpeg_branding="Chrome"'
- # build ffmpeg as an external component (libffmpeg.so) that we can remove / substitute
- "is_component_ffmpeg=true"
- )
- else
- myconf_gn+=(
- "proprietary_codecs=$(usex proprietary-codecs true false)"
- "ffmpeg_branding=\"$(usex proprietary-codecs Chrome Chromium)\""
- )
- fi
-
- if use headless; then
- myconf_gn+=(
- "enable_print_preview=false"
- "enable_remoting=false"
- 'ozone_platform="headless"'
- "rtc_use_pipewire=false"
- "use_alsa=false"
- "use_cups=false"
- "use_gio=false"
- "use_glib=false"
- "use_gtk=false"
- "use_kerberos=false"
- "use_libpci=false"
- "use_pangocairo=false"
- "use_pulseaudio=false"
- "use_qt5=false"
- "use_qt6=false"
- "use_udev=false"
- "use_vaapi=false"
- "use_xkbcommon=false"
- )
- else
- myconf_gn+=(
- "gtk_version=$(usex gtk4 4 3)"
- # link pulseaudio directly (DT_NEEDED) instead of using dlopen.
- # helps with automated detection of ABI mismatches and prevents silent errors.
- "link_pulseaudio=$(usex pulseaudio true false)"
- "ozone_platform_wayland=$(usex wayland true false)"
- "ozone_platform_x11=$(usex X true false)"
- "ozone_platform=\"$(usex wayland wayland x11)\""
- "rtc_use_pipewire=$(usex screencast true false)"
- "use_cups=$(usex cups true false)"
- "use_kerberos=$(usex kerberos true false)"
- "use_pulseaudio=$(usex pulseaudio true false)"
- "use_qt5=false"
- "use_system_libffi=$(usex wayland true false)"
- "use_system_minigbm=true"
- "use_vaapi=$(usex vaapi true false)"
- "use_xkbcommon=true"
- )
- if use qt6; then
- local cbuild_libdir
- cbuild_libdir="$(get_libdir)"
- if tc-is-cross-compiler; then
- # Hack to workaround get_libdir not being able to handle CBUILD, bug #794181
- cbuild_libdir="$($(tc-getBUILD_PKG_CONFIG) --keep-system-libs --libs-only-L libxslt)"
- cbuild_libdir="${cbuild_libdir:2}"
- cbuild_libdir="${cbuild_libdir/% }"
- fi
- myconf_gn+=(
- "use_qt6=true"
- "moc_qt6_path=\"${EPREFIX}/usr/${cbuild_libdir}/qt6/libexec\""
- )
- else
- myconf_gn+=( "use_qt6=false" )
- fi
- fi
-
- # Explicitly disable ICU data file support for system-icu/headless builds.
- if use system-icu || use headless; then
- myconf_gn+=( "icu_use_data_file=false" )
- fi
-
- if use official; then
- # Allow building against system libraries in official builds
- sed -i 's/OFFICIAL_BUILD/GOOGLE_CHROME_BUILD/' \
- tools/generate_shim_headers/generate_shim_headers.py || die
- # Don't add symbols to build
- myconf_gn+=( "symbol_level=0" )
- fi
-
- if use pgo; then
- myconf_gn+=(
- "chrome_pgo_phase=2"
- "v8_enable_builtins_optimization=true"
- )
- else
- myconf_gn+=( "chrome_pgo_phase=0" )
- fi
-
- # Odds and ends
-
- # skipping typecheck is only supported on amd64, bug #876157
- if ! use amd64; then
- myconf_gn+=( "devtools_skip_typecheck=false" )
- fi
-
- # Disable external code space for V8 for ppc64. It is disabled for ppc64
- # by default, but cross-compiling on amd64 enables it again.
- if tc-is-cross-compiler && use ppc64; then
- myconf_gn+=( "v8_enable_external_code_space=false" )
- fi
-
- # This determines whether or not GN uses the bundled libcxx
- if use libcxx; then
- myconf_gn+=( "use_custom_libcxx=true" )
- else
- myconf_gn+=(
- "use_custom_libcxx=false"
- "use_llvm_libatomic=false"
- )
- append-cppflags -U_GLIBCXX_ASSERTIONS #See #318
- fi
-
- myconf_gn+=( "use_bluez=$(usex bluetooth true false)" )
-
- myconf_gn+=( "is_cfi=$(usex cfi true false)" )
-
- if use cfi; then
- myconf_gn+=(
- "use_cfi_icall=true"
- "use_cfi_cast=true"
- )
- fi
-
- myconf_gn+=(
- "optimize_webui=$(usex optimize-webui true false)"
- "use_system_freetype=$(usex system-harfbuzz true false)"
- "use_system_libopenjpeg2=$(usex system-openjpeg true false)"
- "enable_pdf=true"
- "use_system_lcms2=true"
- "enable_print_preview=true"
- "use_thin_lto=$(usex thinlto true false)"
- "thin_lto_enable_optimizations=$(usex optimize-thinlto true false)"
-
- # Ungoogled flags
- "build_with_tflite_lib=false"
- "enable_mdns=false"
- "enable_mse_mpeg2ts_stream_parser=$(usex proprietary-codecs true false)"
- "enable_remoting=false"
- "enable_reporting=false"
- "enable_service_discovery=false"
- "exclude_unwind_tables=true"
- "google_api_key=\"\""
- "google_default_client_id=\"\""
- "google_default_client_secret=\"\""
- "safe_browsing_mode=0"
- "use_official_google_api_keys=false"
- "use_unofficial_version_number=false"
-
- # "enable_swiftshader=false"
-
- # Additional flags
- # "perfetto_use_system_zlib=true"
- # "use_system_zlib=true"
- # "use_system_libjpeg=true"
- # "rtc_build_examples=false"
- # "enable_chromium_prelude=false"
- # "enable_updater=false"
- # "enable_update_notifications=false"
- # "enable_constraints=false"
- # "rtc_rusty_base64=false"
- # "v8_enable_temporal_support=false"
- # "media_use_symphonia=false"
- # "pdf_enable_rust_png=false"
- # "skia_use_libpng_encode=true"
- # "skia_use_libpng_decode=true"
- # "skia_use_rust_png_decode=false"
- # "skia_use_rust_png_encode=false"
- # "enable_jxl_decoder=false"
- )
-
- if use amd64 || use arm64; then
- myconf_gn+=(
- "v8_drumbrake_bounds_checks=true"
- # "v8_enable_drumbrake=true"
- )
- fi
-
- if use thinlto; then
- # We need to change the default value of import-instr-limit in
- # LLVM to limit the text size increase. The default value is
- # 100, and we change it to 30 to reduce the text size increase
- # from 25% to 10%. The performance number of page_cycler is the
- # same on two of the thinLTO configurations, we got 1% slowdown
- # on speedometer when changing import-instr-limit from 100 to 30.
- # append-ldflags "-Wl,-plugin-opt,-import-instr-limit=30"
- sed -i '/import_instr_limit = 5/{s++import_instr_limit = 30+;h};${x;/./{x;q0};x;q1}' \
- build/config/compiler/BUILD.gn || die
-
- append-ldflags "-Wl,--thinlto-jobs=$(makeopts_jobs)"
- fi
-
- # Facilitate deterministic builds (taken from build/config/compiler/BUILD.gn)
- append-cflags -Wno-builtin-macro-redefined
- append-cxxflags -Wno-builtin-macro-redefined
- append-cppflags "-D__DATE__= -D__TIME__= -D__TIMESTAMP__="
-
- local flags
- einfo "Building with the following compiler settings:"
- for flags in C{C,XX} AR NM RANLIB {C,CXX,CPP,LD}FLAGS \
- EXTRA_GN UGC_{SKIP_{PATCHES,SUBSTITUTION},KEEP_BINARIES} ; do
- einfo " ${flags} = \"${!flags}\""
- done
-
- # Since we build from tarballs, we need to set the channel here so that it can be used in the build.
- export CHROME_VERSION_EXTRA="${SLOT}"
-
- einfo "Configuring Chromium ..."
- set -- gn gen -v --args="${myconf_gn[*]}${EXTRA_GN:+ ${EXTRA_GN}}" out/Release
- echo "$@"
- "$@" || die "Failed to configure Chromium"
-
- # The "if" below should not be executed unless testing
- if [ ! -z "${NODIE}" ]; then
- # List all args
- # gn args --list out/Release
-
- # Quick compiler check
- eninja -C out/Release protoc torque
- fi
-}
-
-src_compile() {
- # Final link uses lots of file descriptors.
- ulimit -n 2048
-
- # Calling this here supports resumption via FEATURES=keepwork
- python_setup
-
- # I hate doing this but upstream Rust have yet to come up with a better solution for
- # us poor packagers. Required for Split LTO units, which are required for CFI.
- export RUSTC_BOOTSTRAP=1
-
- # Don't inherit PYTHONPATH from environment, bug #789021, #812689
- local -x PYTHONPATH=
-
- # Build mksnapshot and pax-mark it.
- if use pax-kernel; then
- local x
- for x in mksnapshot v8_context_snapshot_generator code_cache_generator; do
- if tc-is-cross-compiler; then
- eninja -C out/Release "host/${x}"
- pax-mark m "out/Release/host/${x}"
- else
- eninja -C out/Release "${x}"
- pax-mark m "out/Release/${x}"
- fi
- done
- fi
-
- # Even though ninja autodetects number of CPUs, we respect
- # user's options, for debugging with -j 1 or any other reason.
- eninja -C out/Release chrome chrome_sandbox $(use test && echo "base_unittests")
-
- pax-mark m out/Release/chrome
-
- # This codepath does minimal patching, so we're at the mercy of upstream
- # CFLAGS. This is fine - we're not intending to force this on users
- # and we do a lot of flag 'management' anyway.
- if use bundled-toolchain; then
- QA_FLAGS_IGNORED="
- usr/lib64/chromium-browser/chrome
- usr/lib64/chromium-browser/chrome-sandbox
- usr/lib64/chromium-browser/chromedriver
- usr/lib64/chromium-browser/chrome_crashpad_handler
- usr/lib64/chromium-browser/libEGL.so
- usr/lib64/chromium-browser/libGLESv2.so
- usr/lib64/chromium-browser/libVkICD_mock_icd.so
- usr/lib64/chromium-browser/libVkLayer_khronos_validation.so
- usr/lib64/chromium-browser/libqt6_shim.so
- usr/lib64/chromium-browser/libvk_swiftshader.so
- usr/lib64/chromium-browser/libvulkan.so.1
- "
- fi
-
- use convert-dict && eninja -C out/Release convert_dict
-
- use enable-driver && eninja -C out/Release chromedriver
- #use suid && eninja -C out/Release chrome_sandbox
-
- # use enable-driver && mv out/Release/chromedriver{.unstripped,}
-
- rm -f out/Release/locales/*.pak.info || die
-
- # Generate support files (desktop file, manpage, etc.) See: #684550 #706786 #968958
- ${EPYTHON} "${FILESDIR}/generate-support-files.py" \
- --installdir "/usr/$(get_libdir)/ungoogled-chromium-browser" \
- --channel "${SLOT}" ||
- die "Failed to generate support files"
-}
-
-src_test() {
- # Tests may be flaky with usersandbox, and the test runner executes significantly faster without.
- # If you seem to be excluding too many tests for a particular milestone: comment them out, reboot, and
- # run the tests again. If that doesn't help, try FEATURES="-usersandbox" and send it because obviously the
- # chromium gods are not smiling upon you today. Do some runtime testing, obvs.
- local skip_tests=(
- # Wildcard exclusions (if all tests in a test suite are broken)
- 'AlternateTestParams/PartitionAllocDeathTest.RepeatedAllocReturnNullDirect/*'
- 'AlternateTestParams/PartitionAllocDeathTest.RepeatedReallocReturnNullDirect/*'
- 'AlternateTestParams/PartitionAllocTest.*' # 200+ tests, >= 1 crashes entire test runner with usersandbox.
- 'CheckExitCodeAfterSignalHandlerDeathTest.*'
- 'CriticalProcessAndThreadSpotChecks/HangWatcherAnyCriticalThreadTests.*'
- 'LazyThreadPoolTaskRunnerEnvironmentTest.*' # M142
- 'ToolsSanityTest.BadVirtualCall*'
- # requires en-us locale
- SysStrings.SysNativeMBAndWide
- SysStrings.SysNativeMBToWide
- SysStrings.SysWideToNativeMB
- # Specific test cases
- CancelableEventTest.BothCancelFailureAndSucceedOccurUnderContention
- FilePathTest.FromUTF8Unsafe_And_AsUTF8Unsafe
- HistogramTesterTest.PumaTestUniqueSample
- ImmediateCrashTest.ExpectedOpcodeSequence # M150
- PathServiceTest.CheckedGetFailure
- PlatformThreadTest.CanChangeThreadType
- RawPtrTest.SetLookupUsesGetForComparison # M146 ; also broken for alpine in M144.
- RustLogIntegrationTest.CheckAllSeverity
- StackCanary.ChangingStackCanaryCrashesOnReturn
- StackTraceDeathTest.StackDumpSignalHandlerIsMallocFree
- TestLauncherTools.TruncateSnippetFocusedMatchesFatalMessagesTest
- ThreadPoolEnvironmentConfig.CanUseBackgroundPriorityForWorker
- )
- local test_filter="-$(IFS=:; printf '%s' "${skip_tests[*]}")"
- # test-launcher-bot-mode enables parallelism and plain output
- # Check individual tests with --gtest_filter=<test you want> --single-process-tests
- ./out/Release/base_unittests --test-launcher-bot-mode \
- --test-launcher-jobs="$(get_makeopts_jobs)" \
- --gtest_filter="${test_filter}" || die "Tests failed!"
-}
-
-src_install() {
- local browser_suffix
- if [[ "${SLOT}" != "stable" ]]; then
- browser_suffix="-${SLOT}"
- else
- browser_suffix=""
- fi
- local CHROMIUM_HOME="/usr/$(get_libdir)/ungoogled-chromium-browser${browser_suffix}"
- exeinto "${CHROMIUM_HOME}"
- doexe out/Release/chrome
-
- #newexe out/Release/chrome_sandbox chrome-sandbox
- #fperms 4755 "${CHROMIUM_HOME}/chrome-sandbox"
-
- use enable-driver && doexe out/Release/chromedriver
-
- #* https://github.com/ungoogled-software/ungoogled-chromium/pull/3563
- doexe out/Release/chrome_crashpad_handler
-
- if use convert-dict; then
- newexe "${FILESDIR}/update-dicts.sh" update-dicts.sh
- doexe out/Release/convert_dict
- fi
-
- ozone_auto_session () {
- use X && use wayland && ! use headless && echo true || echo false
- }
-
- cat <<- EOF > "${D}${CHROMIUM_HOME}/chromium-launcher.sh" || die
- #!/bin/bash
- # Wrapper to launch slotted Chromium via the chromium-common launcher script.
- export CHROME_DESKTOP="ungoogled-chromium-browser${browser_suffix}.desktop"
- export CHROME_EXEC_NAME="ungoogled-chromium-browser${browser_suffix}"
- export CHROME_VERSION_EXTRA="${SLOT}"
- export CHROME_WRAPPER="\$(readlink -f "\$0")"
- export OZONE_AUTO_SESSION=$(ozone_auto_session)
-
- exec /usr/libexec/chromium/chromium-launcher.sh "\$@"
- EOF
-
- chmod 755 "${D}${CHROMIUM_HOME}/chromium-launcher.sh" || die
-
- # It is important that we name the target "chromium-browser",
- # xdg-utils expect it; bug #355517.
- dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/ungoogled-chromium-browser${browser_suffix}
- # keep the old symlink around for consistency
- dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/ungoogled-chromium${browser_suffix}
-
- use enable-driver && dosym "${CHROMIUM_HOME}/chromedriver" /usr/bin/ungoogled-chromedriver${browser_suffix}
-
- pushd out/Release/locales > /dev/null || die
- chromium_remove_language_paks
- popd > /dev/null || die
-
- insinto "${CHROMIUM_HOME}"
- doins out/Release/*.bin
- doins out/Release/*.pak
- doins -r out/Release/hyphen-data
-
- if use bindist; then
- # We built libffmpeg as a component library, but we can't distribute it
- # with proprietary codec support. Remove it and make a symlink to the requested
- # system library.
- rm -f out/Release/libffmpeg.so \
- || die "Failed to remove bundled libffmpeg.so (with proprietary codecs)"
- # symlink the libffmpeg.so from either ffmpeg-chromium or ffmpeg[chromium].
- einfo "Creating symlink to libffmpeg.so from $(usex ffmpeg-chromium ffmpeg-chromium ffmpeg[chromium])..."
- dosym ../chromium/libffmpeg.so$(usex ffmpeg-chromium .${PV%%\.*} "") \
- /usr/$(get_libdir)/ungoogled-chromium-browser/libffmpeg.so
- fi
-
- (
- shopt -s nullglob
- local files=(out/Release/*.so out/Release/*.so.[0-9])
- [[ ${#files[@]} -gt 0 ]] && doins "${files[@]}"
- )
-
- if ! use system-icu && ! use headless; then
- doins out/Release/icudtl.dat
- fi
-
- doins -r out/Release/locales
- #doins -r out/Release/MEIPreload
-
- # Install vk_swiftshader_icd.json; bug #827861
- doins out/Release/vk_swiftshader_icd.json
-
- if [[ -d out/Release/swiftshader ]]; then
- insinto "${CHROMIUM_HOME}/swiftshader"
- doins out/Release/swiftshader/*.so
- fi
-
- use widevine && dosym WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so "${CHROMIUM_HOME}/libwidevinecdm.so"
-
- # Install icons
- local branding size
- for size in 16 24 32 48 64 128 256 ; do
- case ${size} in
- 16|32) branding="chrome/app/theme/default_100_percent/chromium" ;;
- *) branding="chrome/app/theme/chromium" ;;
- esac
- newicon -s ${size} "${branding}/product_logo_${size}.png" \
- ungoogled-chromium-browser${browser_suffix}.png
- done
-
- # Install desktop entry
- domenu out/Release/ungoogled-chromium-browser${browser_suffix}.desktop
-
- # Install GNOME default application entry (bug #303100).
- insinto /usr/share/gnome-control-center/default-apps
- doins out/Release/ungoogled-chromium-browser${browser_suffix}.xml
-
- # Install AppStream metadata
- insinto /usr/share/appdata
- doins out/Release/ungoogled-chromium-browser${browser_suffix}.appdata.xml
-
- # Install manpage; bug #684550
- doman out/Release/ungoogled-chromium-browser${browser_suffix}.1
- dosym ungoogled-chromium-browser${browser_suffix}.1 /usr/share/man/man1/ungoogled-chromium${browser_suffix}.1
-
- readme.gentoo_create_doc
-}
-
-pkg_postrm() {
- xdg_icon_cache_update
- xdg_desktop_database_update
-}
-
-pkg_postinst() {
- xdg_icon_cache_update
- xdg_desktop_database_update
- readme.gentoo_print_elog
-
- if use !headless && [[ -z "${REPLACING_VERSIONS}" ]]; then
- if use vaapi; then
- elog "Hardware-accelerated video decoding configuration:"
- elog
- elog "Chromium supports multiple backends for hardware acceleration. To enable one,"
- elog " Add to CHROMIUM_FLAGS in /etc/chromium/default:"
- elog
- elog "1. VA-API with OpenGL (recommended for most users):"
- elog " --enable-features=AcceleratedVideoDecodeLinuxGL"
- elog " VaapiVideoDecoder may need to be added as well, but try without first."
- elog
- if use wayland; then
- elog "2. Enhanced Wayland/EGL performance:"
- elog " --enable-features=AcceleratedVideoDecodeLinuxGL,AcceleratedVideoDecodeLinuxZeroCopyGL"
- elog
- fi
- if use X; then
- elog "$(usex wayland "3" "2"). VA-API with Vulkan:"
- elog " --enable-features=VaapiVideoDecoder,VaapiIgnoreDriverChecks,Vulkan,DefaultANGLEVulkan,VulkanFromANGLE"
- elog
- if use wayland; then
- elog " NOTE: Vulkan acceleration requires X11 and will not work under Wayland sessions."
- elog " Use OpenGL-based acceleration instead when running under Wayland."
- elog
- fi
- fi
- elog "Additional options:"
- elog " To enable hardware-accelerated encoding (if supported)"
- elog " add 'AcceleratedVideoEncoder' to your feature list"
- elog " VaapiIgnoreDriverChecks bypasses driver compatibility checks"
- elog " (may be needed for newer/unsupported hardware)"
- elog
- else
- elog "This Chromium build was compiled without VA-API support, which provides"
- elog "hardware-accelerated video decoding."
- fi
- if use screencast; then
- elog "Screencast is disabled by default at runtime. Either enable it"
- elog "by navigating to chrome://flags/#enable-webrtc-pipewire-capturer"
- elog "inside Chromium or add --enable-features=WebRTCPipeWireCapturer"
- elog "to CHROMIUM_FLAGS in /etc/chromium/default."
- elog
- elog "Additional setup may be required for screencasting to work."
- elog "See issue: https://github.com/PF4Public/gentoo-overlay/issues/314"
- fi
- if use gtk4; then
- elog "Chromium prefers GTK3 over GTK4 at runtime. To override this"
- elog "behaviour you need to pass --gtk-version=4, e.g. by adding it"
- elog "to CHROMIUM_FLAGS in /etc/chromium/default."
- fi
- if use widevine; then
- elog "widevine requires binary plugins, which are distributed separately"
- elog "Make sure you have www-plugins/chrome-binary-plugins installed"
- fi
- fi
-
- if systemd_is_booted && ! [[ -f "/etc/machine-id" ]]; then
- ewarn "The lack of an '/etc/machine-id' file on this system booted with systemd"
- ewarn "indicates that the Gentoo handbook was not followed to completion."
- ewarn ""
- ewarn "Chromium is known to behave unpredictably with this system configuration;"
- ewarn "please complete the configuration of this system before logging any bugs."
- fi
-
- # Stable slot doesn't change profile directory, and it's vanishingly unlikely that users will downgrade from dev.
- if [[ -n "${REPLACING_VERSIONS}" ]]; then
- local replacing_non_slotted=false
- # there could be more than one PVR
- for version in ${REPLACING_VERSIONS}; do
- if ver_test "${version}" -le "145.0.7632.116"; then
- replacing_non_slotted=true
- break
- fi
- done
- if ${replacing_non_slotted}; then
- ewarn "This version of Chromium has replaced a non-slotted ebuild."
- if [[ ${SLOT} != "stable" ]]; then
- ewarn "This channel has its own profile directory, so your existing profile will not be used."
- ewarn "To use your existing profile, either copy or move it to the new location."
- ewarn "See https://wiki.gentoo.org/wiki/Chromium#Profile_Directories for more information."
- ewarn ""
- fi
- ewarn "Any existing Progressive Web Apps (PWAs) will need to be reinstalled,"
- ewarn "or have the path in the desktop files updated to point to the new wrapper script."
- fi
- fi
-}
-
-eapply_wrapper () {
- if [ ! -z "${NODIE}" ]; then
- nonfatal eapply "$@"
- else
- eapply "$@"
- fi
-}
-
-git_wrapper () {
- if [ ! -z "${NODIE}" ]; then
- git "$@"
- else
- git "$@" || die
- fi
-}
-
-filter_wrapper () {
- einfo "Applying ${i##*/}"
- #? fuzz factor of 3 is OK?
- if [ ! -z "${NODIE}" ]; then
- filterdiff -p1 "${@:2}" < "$1" | patch -F 3 -p1
- else
- filterdiff -p1 "${@:2}" < "$1" | patch -F 3 -p1 || die
- fi
-}
diff --git a/www-client/ungoogled-chromium/ungoogled-chromium-151.0.7922.75_p1.ebuild b/www-client/ungoogled-chromium/ungoogled-chromium-151.0.7922.75_p1.ebuild
deleted file mode 100644
index db36b779c7cf..000000000000
--- a/www-client/ungoogled-chromium/ungoogled-chromium-151.0.7922.75_p1.ebuild
+++ /dev/null
@@ -1,2536 +0,0 @@
-# Copyright 2009-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-# Use following environment variables to customise the build
-# EXTRA_GN — pass extra options to gn
-# NINJAOPTS="-k0 -j8" useful to populate ccache even if ebuild is still failing
-# UGC_SKIP_PATCHES — space-separated list of patches to skip
-# UGC_KEEP_BINARIES — space-separated list of binaries to keep
-# UGC_SKIP_SUBSTITUTION — space-separated list of files to skip domain substitution
-
-# USE=bundled-toolchain is intended for users who want to use the same toolchain
-# as the upstream releases. It's also a good fallback in case we fall behind
-# and need to get a release out quickly (less likely with `dev` in-tree).
-# We can't rely on it as a default since the toolchain is only shipped for x86-64;
-# other architectures will need to use system toolchain.
-
-# Since m133 we are using CI-generated tarballs from
-# https://github.com/chromium-linux-tarballs/chromium-tarballs/
-
-# These are bit-for-bit identical to the official releases, but are built
-# using an external CI system that we have some control over, in case
-# issues pop up again with official tarball generation.
-
-GN_MIN_VER=0.2374
-# chromium-tools/get-chromium-toolchain-strings.py (or just use Chromicler)
-# Node for M145+ should be 24.12.0 but that's not packaged in Gentoo yet. See #969145
-TEST_FONT="9c07d19d9c5ee1ff94f717e6fb17e0c8c354e6f9"
-BUNDLED_CLANG_VER="llvmorg-23-init-10931-g20b6ec66-11"
-BUNDLED_RUST_VER="4c4205163abcbd089150.0.7871.18148b3efab796c543ba1ea687-5"
-RUST_SHORT_HASH=${BUNDLED_RUST_VER:0:10}-${BUNDLED_RUST_VER##*-}
-NODE_VER="24.16.0-r1"
-ESBUILD_VER="0.25.1"
-ROLLUP_VER="4.57.1" # currently manual.
-
-CHROMIUM_LANGS="af am ar as az be bg bn bs ca cs cy da de el en-GB es es-419 et eu fa fi fil
- fr fr-CA gl gu he hi hr hu hy id is it ja ka kk km kn ko ky lo lt lv mk ml mn mr ms my
- nb ne nl or pa pl pt-BR pt-PT ro ru si sk sl sq sr sr-Latn sv sw ta te th tr uk ur uz
- vi zh-CN zh-HK zh-TW zu"
-
-#UGC_COMMIT_ID="f2038df00b82e3afbd5cbecac37cf7b463acb42a"
-# UGC_PR_COMMITS=(
-# c917e096342e5b90eeea91ab1f8516447c8756cf
-# 5794e9d12bf82620d5f24505798fecb45ca5a22d
-# )
-
-CROMITE_COMMIT_ID="cb3baf14f52eb4365d017f640f85310735c19b79"
-
-declare -A CHROMIUM_COMMITS=(
- ["27f8690db999f6e56f0af7a9ea3d28a019ed72ca"]="." #152+
- ["-cf94ed446320d35c8613ed9b3ffb6e6a61bfcb5f"]="."
-# # ["-37c28a19804e47a68eabf3cf882a310689fc325b"]="." #disable style check for cromite
-# # ["cd5a0df905a28faa89ff2a4ab44f893f84dc4487"]="net/third_party/quiche/src"
-)
-
-LLVM_COMPAT=( 21 22 23 )
-PYTHON_COMPAT=( python3_{13..14} )
-PYTHON_REQ_USE="xml(+)"
-RUST_MIN_VER=1.91.0
-RUST_NEEDS_LLVM="yes please"
-RUST_OPTIONAL="yes" # Not actually optional, but we don't need system Rust (or LLVM) with USE=bundled-toolchain
-RUST_REQ_USE="rustfmt" # Upstream run rustfmt on bindgen output, so we need it to be available.
-
-inherit check-reqs chromium-2 desktop flag-o-matic llvm-r1 multiprocessing ninja-utils pax-utils
-inherit python-any-r1 readme.gentoo-r1 rust systemd toolchain-funcs xdg-utils
-
-DESCRIPTION="Modifications to Chromium for removing Google integration and enhancing privacy"
-HOMEPAGE="https://github.com/ungoogled-software/ungoogled-chromium"
-PPC64_HASH="a85b64f07b489b8c6fdb13ecf79c16c56c560fc6"
-PATCH_V="${PV%%\.*}-1"
-COPIUM_COMMIT="b00f26bb5e0781020da5f830981472a142c6baf1"
-SRC_URI="https://github.com/chromium-linux-tarballs/chromium-tarballs/releases/download/${PV/_*}/chromium-${PV/_*}-linux.tar.xz
- https://deps.gentoo.zip/www-client/chromium/rollup-wasm-node-${ROLLUP_VER}.tgz
- https://gitlab.com/Matt.Jolly/chromium-patches/-/archive/${PATCH_V}/chromium-patches-${PATCH_V}.tar.bz2
- !bundled-toolchain? (
- https://codeberg.org/selfisekai/copium/archive/${COPIUM_COMMIT}.tar.gz
- -> chromium-patches-copium-${COPIUM_COMMIT:0:10}.tar.gz
- )
- bundled-toolchain? (
- https://commondatastorage.googleapis.com/chromium-browser-clang/Linux_x64/clang-${BUNDLED_CLANG_VER}.tar.xz
- -> chromium-clang-${BUNDLED_CLANG_VER}.tar.xz
- https://commondatastorage.googleapis.com/chromium-browser-clang/Linux_x64/rust-toolchain-${BUNDLED_RUST_VER}-${BUNDLED_CLANG_VER%-*}.tar.xz
- -> chromium-rust-toolchain-${RUST_SHORT_HASH}-${BUNDLED_CLANG_VER%-*}.tar.xz
- )
- test? (
- https://chromium-fonts.storage.googleapis.com/${TEST_FONT} -> chromium-testfonts-${TEST_FONT:0:10}.tar.gz
- )
- ppc64? (
- https://gitlab.raptorengineering.com/raptor-engineering-public/chromium/openpower-patches/-/archive/${PPC64_HASH}/openpower-patches-${PPC64_HASH}.tar.bz2 -> chromium-openpower-${PPC64_HASH:0:10}.tar.bz2
- )
-"
-
-# Gentoo tarball:
-# https://chromium-tarballs.distfiles.gentoo.org/chromium-${PV/_*}.tar.xz -> chromium-${PV/_*}-gentoo.tar.xz
-
-# chromium-linux-tarballs
-# https://github.com/chromium-linux-tarballs/chromium-tarballs/releases/download/${PV/_*}/chromium-${PV/_*}-linux.tar.xz
-
-# Official tarball:
-# https://commondatastorage.googleapis.com/chromium-browser-official/chromium-${PV/_*}${LITE_TARBALL:+-lite}.tar.xz
-
-# https://gitweb.gentoo.org/proj/chromium-tools.git/tree/get-chromium-licences.py @ 145.0.7632.76
-LICENSE="Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD BSD-2 Base64 Boost-1.0 CC-BY-3.0 CC-BY-4.0 Clear-BSD FFT2D FTL"
-LICENSE+=" IJG ISC LGPL-2 LGPL-2.1 MIT MPL-1.1 MPL-2.0 Ms-PL PSF-2 SGI-B-2.0 SSLeay SunSoft Unicode-3.0"
-LICENSE+=" Unicode-DFS-2015 Unlicense UoI-NCSA ZLIB libtiff openssl"
-LICENSE+=" cromite? ( GPL-3 )"
-
-SLOT="stable"
-KEYWORDS="amd64 ~arm64 ~ppc64 ~x86"
-
-IUSE_SYSTEM_LIBS="abseil-cpp av1 brotli crc32c double-conversion ffmpeg +harfbuzz icu jsoncpp +libusb libvpx +openh264 openjpeg re2 snappy woff2 +zstd"
-IUSE="+X bindist bluetooth bundled-toolchain cfi convert-dict cups custom-cflags debug ffmpeg-chromium enable-driver gtk4 hangouts headless kerberos +libcxx nvidia +official optimize-thinlto optimize-webui override-data-dir pax-kernel pgo"
-IUSE+=" +proprietary-codecs pulseaudio qt6 screencast selinux test thinlto cromite vaapi wayland widevine cpu_flags_ppc_vsx3"
-RESTRICT="
- !bindist? ( bindist )
- !test? ( test )
- arm64? ( test )
- !system-ffmpeg? ( proprietary-codecs? ( bindist ) )
- !system-openh264? ( bindist )
- cromite? ( bindist )"
-
-REQUIRED_USE="
- !headless? ( || ( X wayland ) )
- screencast? ( wayland )
- ffmpeg-chromium? ( bindist proprietary-codecs )
- optimize-thinlto? ( thinlto )
- cfi? ( thinlto )
- x86? ( !thinlto !widevine )
- debug? ( !official )
- vaapi? ( !system-av1 !system-libvpx )
-"
-
-UGC_PV="${PV/_p/-}"
-UGC_PF="${PN}-${UGC_PV}"
-UGC_URL="https://github.com/ungoogled-software/${PN}/archive/"
-
-if [ -z "$UGC_COMMIT_ID" ]; then
- UGC_URL="${UGC_URL}${UGC_PV}.tar.gz -> ${UGC_PF}.tar.gz"
- UGC_WD="${WORKDIR}/${UGC_PF}"
-else
- UGC_URL="${UGC_URL}${UGC_COMMIT_ID}.tar.gz -> ${PN}-${UGC_COMMIT_ID}.tar.gz"
- UGC_WD="${WORKDIR}/ungoogled-chromium-${UGC_COMMIT_ID}"
-fi
-
-SRC_URI+="${UGC_URL}
-"
-
-if [ ! -z "${UGC_PR_COMMITS[*]}" ]; then
- for i in "${UGC_PR_COMMITS[@]}"; do
- SRC_URI+="https://github.com/ungoogled-software/${PN}/commit/$i.patch?full_index=true -> ${PN}-$i.patch
- "
- done
-fi
-
-if [ ! -z "${CHROMIUM_COMMITS[*]}" ]; then
- # for i in "${CHROMIUM_COMMITS[@]}"; do
- for i in "${!CHROMIUM_COMMITS[@]}"; do
- if [[ ${CHROMIUM_COMMITS[$i]} =~ webrtc ]]; then
- #TODO: is it safe to use this mirror?
- SRC_URI+="https://github.com/webrtc-mirror/webrtc/commit/${i/-}.patch?full_index=true -> webrtc-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ angle ]]; then
- SRC_URI+="https://github.com/google/angle/commit/${i/-}.patch?full_index=true -> angle-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ quiche ]]; then
- SRC_URI+="https://github.com/google/quiche/commit/${i/-}.patch?full_index=true -> quiche-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ dawn ]]; then
- SRC_URI+="https://github.com/google/dawn/commit/${i/-}.patch?full_index=true -> dawn-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ perfetto ]]; then
- SRC_URI+="https://github.com/google/perfetto/commit/${i/-}.patch?full_index=true -> perfetto-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ink ]]; then
- SRC_URI+="https://github.com/google/ink/commit/${i/-}.patch?full_index=true -> ink-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ vulkan-utility-libraries ]]; then
- SRC_URI+="https://github.com/KhronosGroup/Vulkan-Utility-Libraries/commit/${i/-}.patch?full_index=true -> vulkan-utility-libraries-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ruy ]]; then
- SRC_URI+="https://github.com/google/ruy/commit/${i/-}.patch?full_index=true -> ruy-${i/-}.patch
- "
- else
- SRC_URI+="https://github.com/chromium/chromium/commit/${i/-}.patch?full_index=true -> chromium-${i/-}.patch
- "
- fi
- done
-fi
-
-SRC_URI+="cromite? ( https://github.com/uazo/cromite/archive/${CROMITE_COMMIT_ID}.tar.gz -> cromite-${CROMITE_COMMIT_ID}.tar.gz )
-"
-
-for i in ${IUSE_SYSTEM_LIBS}; do
- [[ $i =~ ^(\+)?(.*)$ ]]
- IUSE+=" ${BASH_REMATCH[1]}system-${BASH_REMATCH[2]}"
-done
-
-COMMON_X_DEPEND="
- x11-libs/libXcomposite:=
- x11-libs/libXcursor:=
- x11-libs/libXdamage:=
- x11-libs/libXfixes:=
- >=x11-libs/libXi-1.6.0:=
- x11-libs/libXrandr:=
- x11-libs/libXrender:=
- x11-libs/libXtst:=
- x11-libs/libxshmfence:=
-"
-
-# sys-libs/zlib: https://bugs.gentoo.org/930365; -ng is not compatible.
-# We _could_ use the bundled minizip, but that's against policy.
-COMMON_SNAPSHOT_DEPEND="
- system-icu? ( >=dev-libs/icu-78:= )
- system-abseil-cpp? ( >=dev-cpp/abseil-cpp-20260107.0 )
- system-brotli? ( >=app-arch/brotli-9999 )
- system-crc32c? ( dev-libs/crc32c )
- system-double-conversion? ( dev-libs/double-conversion )
- system-woff2? ( media-libs/woff2 )
- system-snappy? ( app-arch/snappy )
- system-jsoncpp? ( dev-libs/jsoncpp )
- system-openjpeg? ( media-libs/openjpeg:2= )
- system-re2? ( >=dev-libs/re2-0.2019.08.01:= )
- system-libvpx? ( >=media-libs/libvpx-1.13.0:=[postproc] )
- system-libusb? ( virtual/libusb:1 )
- cromite? ( dev-util/patchutils )
- >=dev-libs/libxml2-2.12.4:=[icu]
- dev-libs/nspr:=
- >=dev-libs/nss-3.26:=
- dev-libs/libxslt:=
- media-libs/fontconfig:=
- >=media-libs/freetype-2.11.0-r1:=
- system-harfbuzz? ( >=media-libs/harfbuzz-3:0=[icu(-)] )
- media-libs/libjpeg-turbo:=
- media-libs/libpng:=
- system-zstd? ( >=app-arch/zstd-1.5.5:= )
- >=media-libs/libwebp-0.4.0:=
- media-libs/mesa:=[gbm(+)]
- >=media-libs/openh264-2.6.0:=
- system-av1? (
- >=media-libs/dav1d-1.0.0:=
- >=media-libs/libaom-3.7.0:=
- )
- sys-libs/zlib:=
- !headless? (
- dev-libs/glib:2
- >=media-libs/alsa-lib-1.0.19:=
- media-video/pipewire:=
- pulseaudio? (
- || (
- media-libs/libpulse
- >=media-sound/apulse-0.1.9
- )
- )
- sys-apps/pciutils:=
- kerberos? ( virtual/krb5 )
- vaapi? ( >=media-libs/libva-2.7:=[X?,wayland?] )
- X? (
- x11-base/xorg-proto:=
- x11-libs/libX11:=
- x11-libs/libxcb:=
- x11-libs/libXext:=
- )
- x11-libs/libxkbcommon:=
- wayland? (
- screencast? ( media-video/pipewire:= )
- dev-libs/libffi:=
- dev-libs/wayland:=
- screencast? (
- media-video/pipewire:=
- || (
- sys-apps/xdg-desktop-portal-gnome
- sys-apps/xdg-desktop-portal-gtk
- kde-plasma/xdg-desktop-portal-kde
- gui-libs/xdg-desktop-portal-lxqt
- gui-libs/xdg-desktop-portal-wlr
- )
- )
- )
- )
-"
-
-COMMON_DEPEND="
- ${COMMON_SNAPSHOT_DEPEND}
- app-arch/bzip2:=
- dev-libs/expat:=
- system-ffmpeg? (
- >=media-video/ffmpeg-6.1:=
- >=media-libs/opus-1.3.1:=
- )
- net-misc/curl[ssl]
- sys-apps/dbus:=
- media-libs/flac:=
- sys-libs/zlib:=[minizip]
- !headless? (
- >=app-accessibility/at-spi2-core-2.46.0:2
- media-libs/mesa:=[X?,wayland?]
- virtual/udev
- x11-libs/cairo:=
- x11-libs/gdk-pixbuf:2
- x11-libs/pango:=
- cups? ( >=net-print/cups-1.3.11:= )
- qt6? ( dev-qt/qtbase:6[gui,widgets] )
- X? ( ${COMMON_X_DEPEND} )
- )
-"
-RDEPEND="${COMMON_DEPEND}
- !www-client/ungoogled-chromium:0
- >=www-client/chromium-common-2
- !headless? (
- || (
- x11-libs/gtk+:3[X?,wayland?]
- gui-libs/gtk:4[X?,wayland?]
- )
- qt6? ( dev-qt/qtbase:6[X?,wayland?] )
- )
- virtual/ttf-fonts
- selinux? ( sec-policy/selinux-chromium )
- bindist? (
- ffmpeg-chromium? ( media-video/ffmpeg-chromium:${PV%%\.*} )
- )
- !override-data-dir? (
- !www-client/chromium:${SLOT}
- !www-client/cromite:${SLOT}[-override-data-dir]
- )
-"
-# For M149+ pipewire is a mandatory build-time dependency, but it's optional at runtime for most configurations.
-DEPEND="${COMMON_DEPEND}
- !headless? (
- media-video/pipewire
- gtk4? ( gui-libs/gtk:4[X?,wayland?] )
- !gtk4? ( x11-libs/gtk+:3[X?,wayland?] )
- )
-"
-
- # pgo? ( >=llvm-core/clang-22.0.0_pre20260106 >=llvm-core/lld-22.0.0_pre20260106 )
-BDEPEND="
- ${COMMON_SNAPSHOT_DEPEND}
- ${PYTHON_DEPS}
- $(python_gen_any_dep '
- dev-python/setuptools[${PYTHON_USEDEP}]
- ')
- >=app-arch/gzip-1.7
- !headless? (
- qt6? ( dev-qt/qtbase:6 )
- )
- !bundled-toolchain? ( $(llvm_gen_dep '
- llvm-core/clang:${LLVM_SLOT}
- llvm-core/llvm:${LLVM_SLOT}
- cfi? ( llvm-runtimes/clang-runtime:${LLVM_SLOT}[sanitize] )
- official? (
- !ppc64? ( llvm-runtimes/compiler-rt-sanitizers:${LLVM_SLOT}[cfi] )
- ) ')
- || (
- $(llvm_gen_dep 'llvm-core/lld:${LLVM_SLOT}')
- >=sys-devel/mold-2.41.0
- )
- ${RUST_DEPEND}
- )
- >=dev-util/bindgen-0.72.1
- >=dev-build/gn-${GN_MIN_VER}
- app-alternatives/ninja
- dev-lang/perl
- >=dev-util/gperf-3.2
- dev-util/esbuild:${ESBUILD_VER}
- dev-vcs/git
- >=net-libs/nodejs-${NODE_VER}[inspector]
- sys-apps/hwdata
- >=sys-devel/bison-2.4.3
- sys-devel/flex
- virtual/pkgconfig
- x11-misc/xdg-utils
-"
-
-if ! has chromium_pkg_die ${EBUILD_DEATH_HOOKS}; then
- EBUILD_DEATH_HOOKS+=" chromium_pkg_die";
-fi
-
-DISABLE_AUTOFORMATTING="yes"
-DOC_CONTENTS="
-Some web pages may require additional fonts to display properly.
-Try installing some of the following packages if some characters
-are not displayed properly:
-- media-fonts/arphicfonts
-- media-fonts/droid
-- media-fonts/ipamonafont
-- media-fonts/noto
-- media-fonts/ja-ipafonts
-- media-fonts/takao-fonts
-- media-fonts/wqy-microhei
-- media-fonts/wqy-zenhei
-
-To fix broken icons on the Downloads page, you should install an icon
-theme that covers the appropriate MIME types, and configure this as your
-GTK+ icon theme.
-
-For native file dialogs in KDE, install kde-apps/kdialog.
-
-To make password storage work with your desktop environment you may
-have install one of the supported credentials management applications:
-- app-crypt/libsecret (GNOME)
-- kde-frameworks/kwallet (KDE)
-If you have one of above packages installed, but don't want to use
-them in Chromium, then add --password-store=basic to CHROMIUM_FLAGS
-in /etc/chromium/default.
-"
-
-S="${WORKDIR}/chromium-${PV/_*}"
-
-python_check_deps() {
- python_has_version "dev-python/setuptools[${PYTHON_USEDEP}]"
-}
-
-pre_build_checks() {
- # Check build requirements: bugs #471810, #541816, #914220
- # We're going to start doing maths here on the size of an unpacked source tarball,
- # this should make updates easier as chromium continues to balloon in size.
- # xz -l /var/cache/distfiles/chromium-${PV}*.tar.xz
- local base_disk=9 # Round up
- use test && base_disk=$((base_disk + 5))
- local extra_disk=1 # Always include a little extra space
- local memory=4
- tc-is-cross-compiler && extra_disk=$((extra_disk * 2))
- if tc-is-lto || use pgo; then
- memory=$((memory * 2 + 1))
- tc-is-cross-compiler && extra_disk=$((extra_disk * 2)) # Double the requirements
- use pgo && extra_disk=$((extra_disk + 4))
- fi
- if is-flagq '-g?(gdb)?([1-9])'; then
- if use custom-cflags; then
- extra_disk=$((extra_disk + 5))
- fi
- memory=$((memory * 2))
- fi
- local CHECKREQS_MEMORY="${memory}G"
- local CHECKREQS_DISK_BUILD="$((base_disk + extra_disk))G"
- check-reqs_${EBUILD_PHASE_FUNC}
-}
-
-pkg_pretend() {
- if [[ ${MERGE_TYPE} != binary ]]; then
- # The pre_build_checks are all about compilation resources, no need to run it for a binpkg
- pre_build_checks
- fi
-
- if use headless; then
- local headless_unused_flags=("cups" "kerberos" "pulseaudio" "qt6" "vaapi" "wayland")
- for myiuse in ${headless_unused_flags[@]}; do
- use ${myiuse} && ewarn "Ignoring USE=${myiuse}, USE=headless is set."
- done
- fi
-
- if ! use bindist && use ffmpeg-chromium; then
- ewarn "Ignoring USE=ffmpeg-chromium, USE=bindist is not set."
- fi
- if use libcxx; then
- ewarn
- ewarn "Building with libcxx, please be aware that system-*"
- ewarn "and some other c++ dependencies need to be compiled"
- ewarn "with the same c++ library as ungoogled-chromium itself"
- ewarn "dev-libs/jsoncpp is most problematic, see #58 #49 #119 for details"
- ewarn "Simplest solution would be to disable corresponding system-* flags"
- ewarn
- fi
- if use cfi; then
- ewarn
- ewarn "Building with cfi is only possible if building with -stdlib=libc++"
- ewarn "Make sure all dependencies are also built this way, see #40"
- ewarn
- fi
- if use cromite; then
- ewarn
- ewarn "Cromite patches are very experimental and unstable"
- ewarn "Please consider testing them and giving feedback upstream:"
- ewarn "https://github.com/uazo/cromite/issues"
- ewarn "Not all patches are applied, let me know if others should be considered too"
- ewarn
- fi
-}
-
-pkg_setup() {
- if [[ ${MERGE_TYPE} != binary ]]; then
- # The pre_build_checks are all about compilation resources, no need to run it for a binpkg
- pre_build_checks
-
- # We haven't massaged any CFLAGS yet, so we want to do this before we force CC/CXX to prevent warnings.
- local want_lto="false"
- tc-is-lto && want_lto="true"
-
- # The linux:unbundle toolchain in GN grabs CC, CXX, CPP (etc) from the environment
- # We'll set these to clang here then use llvm-utils functions to very explicitly set these
- # to a sane value.
- # This is effectively the 'force-clang' path if GCC support is re-added.
- if use !bundled-toolchain; then
- llvm-r1_pkg_setup
- rust_pkg_setup
-
- # Forcing clang; respect llvm_slot_x to enable selection of impl via LLVM_COMPAT
- AR=llvm-ar
- CPP="${CHOST}-clang++-${LLVM_SLOT} -E"
- NM=llvm-nm
- CC="${CHOST}-clang-${LLVM_SLOT}"
- CXX="${CHOST}-clang++-${LLVM_SLOT}"
- fi
-
- # LTO in Chromium means LLVM ThinLTO, if GCC support is re-added
- # We'll need to handle that here too.
- use_lto="false"
- local lto_usable="true"
- if [[ "$want_lto" == "true" ]]; then
- if use arm64 && [[ "${LLVM_SLOT}" -lt 22 ]]; then
- einfo "LTO is broken with LLVM 21 on arm64, ignoring CFLAGS."
- lto_usable="false"
- else
- use_lto="true"
- fi
- # We can rely on GN to do this for us; without this builds
- # take significantly longer with LTO enabled.
- filter-lto
- fi
-
- if [[ "$use_lto" == "false" ]] && use official && [[ "$lto_usable" == "true" ]]; then
- einfo "USE=official selected and LTO not detected."
- einfo "It is _highly_ recommended that LTO be enabled for performance reasons"
- einfo "and to be consistent with the upstream \"official\" build optimisations."
- fi
-
- if [[ "$use_lto" == "false" ]] && use test; then
- die "Tests require CFI which requires LTO"
- fi
-
- export use_lto
-
- if tc-is-cross-compiler; then
- use pgo && die "The pgo USE flag cannot be used when cross-compiling"
- CPP="${CBUILD}-clang++-${LLVM_SLOT} -E"
- fi
-
- # Sanity checks for development convenience
- if ver_test $(gn --version || die) -lt ${GN_MIN_VER}; then
- die "dev-build/gn >= ${GN_MIN_VER} is required to build this Chromium"
- fi
-
- # Sometimes, when adding a new LLVM slot, devs (me) forget to install an appropriate lld.
- if tc-ld-is-lld; then
- local lld_ver=$(ld.lld --version | awk '{split($2,a,"."); print a[1]}' || die "Failed to check lld version")
- if [[ ${lld_ver} -lt ${LLVM_SLOT} ]]; then
- die "Your lld version (${lld_ver}) is too old for the selected LLVM slot (${LLVM_SLOT}). Please install a newer lld or select an older LLVM slot."
- fi
- fi
- fi
-
- chromium_suid_sandbox_check_kernel_config
-}
-
-src_unpack() {
- # # Here be dragons!
- # local XCLD="--exclude=chromium-${PV/_*}/third_party/instrumented_libs \
- # --exclude=chromium-${PV/_*}/third_party/llvm \
- # --exclude=chromium-${PV/_*}/third_party/llvm-build \
- # --exclude=chromium-${PV/_*}/third_party/node/linux \
- # --exclude=chromium-${PV/_*}/third_party/rust-src \
- # --exclude=chromium-${PV/_*}/third_party/rust-toolchain \
- # --exclude=chromium-${PV/_*}/build/linux/debian_bullseye_i386-sysroot \
- # --exclude=chromium-${PV/_*}/build/linux/debian_bullseye_amd64-sysroot \
- # --exclude=chromium-${PV/_*}/third_party/angle/third_party/VK-GL-CTS \
- # "
-
- # if ! use libcxx ; then
- # XCLD+=" --exclude=chromium-${PV/_*}/third_party/libc++"
- # fi
-
- # if ! use pgo ; then
- # XCLD+=" --exclude=chromium-${PV/_*}/chrome/build/pgo_profiles"
- # fi
-
- # einfo "Unpacking chromium-${PV/_*}.tar.xz to ${WORKDIR}"
- # # Gentoo tarball:
- # # tar ${XCLD} -xf "${DISTDIR}/chromium-${PV/_*}-gentoo.tar.xz" -C "${WORKDIR}" || die
- # tar ${XCLD} -xf "${DISTDIR}/chromium-${PV/_*}${LITE_TARBALL:+-lite}.tar.xz" -C "${WORKDIR}" || die
-
- # unpack ${UGC_URL#*->}
- # # unpack chromium-patches-${PATCH_V}.tar.bz2
- # # Warned you!
-
- unpack chromium-${PV/_*}-linux.tar.xz
- unpack chromium-patches-${PATCH_V}.tar.bz2
- # These should only be required when we're not using the official toolchain
- if use !bundled-toolchain; then
- unpack chromium-patches-copium-${COPIUM_COMMIT:0:10}.tar.gz
- fi
-
- if use test; then
- # This just contains a bunch of font files that need to be unpacked (or moved) to the correct location.
- local testfonts_dir="${WORKDIR}/chromium-${PV/_*}/third_party/test_fonts/test_fonts"
- local testfonts_tar="${DISTDIR}/chromium-testfonts-${TEST_FONT:0:10}.tar.gz"
- einfo "Unpacking test fonts ..."
- tar xf "${testfonts_tar}" -C "${testfonts_dir}" || die "Failed to unpack testfonts"
- fi
-
- # We need to manually unpack this since M126 else we'd unpack one toolchain over the other.
- # Since we're doing that anyway let's unpack to sensible locations to make symlink creation easier.
- if use bundled-toolchain; then
- einfo "Unpacking bundled Clang ..."
- mkdir -p "${WORKDIR}"/clang || die "Failed to create clang directory"
- tar xf "${DISTDIR}/chromium-clang-${BUNDLED_CLANG_VER}.tar.xz" -C "${WORKDIR}/clang" || die "Failed to unpack Clang"
- einfo "Unpacking bundled Rust ..."
- local rust_dir="${WORKDIR}/rust-toolchain"
- mkdir -p "${rust_dir}" || die "Failed to create rust toolchain directory"
- tar xf "${DISTDIR}/chromium-rust-toolchain-${RUST_SHORT_HASH}-${BUNDLED_CLANG_VER%-*}.tar.xz" -C "${rust_dir}" ||
- die "Failed to unpack Rust"
- fi
-
- if use ppc64; then
- unpack chromium-openpower-${PPC64_HASH:0:10}.tar.bz2
- fi
-
- # This is a dirty hack, but we need rollup to build successfully and it's proving to be challenging
- # to build locally due to deps
- unpack rollup-wasm-node-${ROLLUP_VER}.tgz
-
- if use cromite; then
- unpack cromite-${CROMITE_COMMIT_ID}.tar.gz
- fi
-
- unpack ${UGC_URL#*->}
-}
-
-remove_compiler_builtins() {
- # We can't use the bundled compiler builtins with the system toolchain
- # We used to `grep` then `sed`, but it was indirect. Combining the two into a single
- # `awk` command is more efficient and lets us document the logic more clearly.
-
- local pattern=' configs += [ "//build/config/clang:compiler_builtins" ]'
- local target='build/config/compiler/BUILD.gn'
-
- local tmpfile
- tmpfile=$(mktemp) || die "Failed to create temporary file."
-
- if awk -v pat="${pattern}" '
- BEGIN {
- match_found = 0
- }
-
- # If the delete countdown is active, decrement it and skip to the next line.
- d > 0 { d--; next }
-
- # If the current line matches the pattern...
- $0 == pat {
- match_found = 1 # ...set our flag to true.
- d = 2 # Set delete counter for this line and the next two.
- prev = "" # Clear the buffered previous line so it is not printed.
- next
- }
-
- # For any other line, print the buffered previous line.
- NR > 1 { print prev }
-
- # Buffer the current line to be printed on the next cycle.
- { prev = $0 }
-
- END {
- # Print the last line if it was not part of a deleted block.
- if (d == 0) { print prev }
-
- # If the pattern was never found, exit with a failure code.
- if (match_found == 0) {
- exit 1
- }
- }
- ' "${target}" > "${tmpfile}"; then
- # AWK SUCCEEDED (exit code 0): The pattern was found and edited.
- # This is to avoid gawk's `-i inplace` option which users complain about.
- mv "${tmpfile}" "${target}"
- else
- # AWK FAILED (exit code 1): The pattern was not found.
- rm -f "${tmpfile}"
- die "Awk patch failed: Pattern not found in ${target}."
- fi
-}
-
-src_prepare() {
- # Calling this here supports resumption via FEATURES=keepwork
- python_setup
-
- # We'll fill this in as we go. Patches go in chromium-patches.
- local PATCHES=()
-
- rm "${WORKDIR}/chromium-patches-${PATCH_V}/common/cr131-unbundle-icu-target.patch"
- if ver_test "${RUST_SLOT}" -ge "1.95.0"; then
- rm "${WORKDIR}/chromium-patches-${PATCH_V}/rust/cr146-fix-botched-bytemuck-roll.patch"
- sed -i '/SupportedLaneCount/d' third_party/rust/chromium_crates_io/vendor/bytemuck-v1/src/zeroable.rs || die
- sed -i '/SupportedLaneCount/d' third_party/rust/chromium_crates_io/vendor/bytemuck-v1/src/pod.rs || die
- fi
-
- rm ${WORKDIR}/chromium-patches-${PATCH_V}/common/cr150-module-sysroot.patch || die # upstreamed
- rm ${WORKDIR}/chromium-patches-${PATCH_V}/toolchain/cr117-material-color-include.patch || die # same
- rm ${WORKDIR}/chromium-patches-${PATCH_V}/toolchain/cr151-actually-fix-ar.patch || die # same
- rm ${WORKDIR}/chromium-patches-${PATCH_V}/toolchain/cr151-dawn-system-go.patch || die # hardcode it like node
- rm ${WORKDIR}/chromium-patches-${PATCH_V}/toolchain/cr151-mold-unbundle.patch || die # don't care
-
- #cp -f ${WORKDIR}/chromium-patches-${PATCH_V}/*-compiler.patch "${T}/compiler.patch"
- ##cp -f ${FILESDIR}/chromium-147-compiler.patch "${T}/compiler.patch"
- #if ! use custom-cflags; then #See #25 #92
- # sed -i '/default_stack_frames/Q' "${T}/compiler.patch" || die
- #fi
-
- PATCHES+=( "${WORKDIR}/chromium-patches-${PATCH_V}/common/" )
- PATCHES+=( "${FILESDIR}/restore-x86-r4.patch" )
-
- # https://issues.chromium.org/issues/442698344
- # Unreleased fontconfig changed magic numbers and google have rolled to this version
- if has_version "<=media-libs/fontconfig-2.17.1"; then
- PATCHES+=( "${FILESDIR}/chromium-142-work-with-old-fontconfig.patch" )
- fi
-
- if use bundled-toolchain; then
- # We need to symlink the toolchain into the expected location
- einfo "Symlinking Clang toolchain to expected location ..."
- mkdir -p third_party/llvm-build/ || die "Failed to create llvm-build directory"
- # the 'Chromium Linux Tarballs' seem to already have 'Release+Asserts/{lib,bin}'; not sure if this is an
- # upstream change - we're using the same scripts to build, theoretically. We'll still attempt to create
- # llvm-build, but we'll rm Release+Asserts and symlink directly.
- if [[ -d third_party/llvm-build/Release+Asserts ]]; then
- rm -r third_party/llvm-build/Release+Asserts || die "Failed to remove third_party/llvm-build/Release+Asserts"
- fi
- ln -s "${WORKDIR}"/clang third_party/llvm-build/Release+Asserts || die "Failed to bundle Clang"
- einfo "Symlinking Rust toolchain to expected location ..."
- # As above, so below
- if [[ -d third_party/rust-toolchain ]]; then
- rm -r third_party/rust-toolchain || die "Failed to remove third_party/rust-toolchain"
- fi
- ln -s "${WORKDIR}"/rust-toolchain third_party/rust-toolchain || die "Failed to bundle rust"
- cp "${WORKDIR}"/rust-toolchain/VERSION \
- "${WORKDIR}"/rust-toolchain/INSTALLED_VERSION || die "Failed to set rust version"
- else
- # We don't need our toolchain patches if we're using the official toolchain
-
- # Copium patches go here.
- PATCHES+=(
- "${WORKDIR}/copium/cr143-libsync-__BEGIN_DECLS.patch"
- "${WORKDIR}/copium/cr149-unbundle-minizip-undo-unicode.patch"
- )
-
- # Automate conditional application of chromium-patches
- # The directory structure is expected to be something like:
- # chromium-patches-145/
- # ├── toolchain/
- # │ ├── cr123-foo.patch
- # │ └── cr135-bar.patch
- # ├── llvm/
- # │ ├── cr144-baz.patch
- # │ └── lt-23/
- # │ └── cr145-bleeding-edge-llvm-feature.patch
- # Where `lt-23` means "apply this patch if the LLVM version is less than 23".
- # Only categories in `slot_map` will be checked for version constraints.
- shopt -s nullglob
- local -A slot_map=( [llvm]="${LLVM_SLOT}" [rust]="${RUST_SLOT}" )
-
- for category in "${WORKDIR}/chromium-patches-${PATCH_V}"/*/; do
- local category_name="${category%/}"
- category_name="${category_name##*/}"
-
- # Skip arch-specific categories
- if [[ "${category_name}" == "ppc64le" ]]; then
- use ppc64 || continue
- fi
-
- # We applied common patches above, no need to apply them again here
- [[ "${category_name}" == "common" ]] && continue
-
- # Unconditional patches for this category
- local category_patches=( "${category}"*.patch )
- [[ ${#category_patches[@]} -gt 0 ]] && PATCHES+=( "${category}" )
-
- # Version-constrained subdirectories (e.g., llvm/lt-23/)
- for constraint_dir in "${category}"*/; do
- local dir_name="${constraint_dir%/}"
- dir_name="${dir_name##*/}"
- if [[ "${dir_name}" =~ ^lt-(.*)$ && -v slot_map[${category_name}] ]]; then
- ver_test "${slot_map[${category_name}]}" -lt "${BASH_REMATCH[1]}" &&
- PATCHES+=( "${constraint_dir}" )
- fi
- done
- done
-
- shopt -u nullglob
-
- # Strictly speaking this doesn't need to be gated (no bundled toolchain for ppc64); it keeps the logic together
- if use ppc64; then
- local patchset_dir="${WORKDIR}/openpower-patches-${PPC64_HASH}/patches"
- # patch causes build errors on 4K page systems (https://bugs.gentoo.org/show_bug.cgi?id=940304)
- local page_size_patch="ppc64le/third_party/use-sysconf-page-size-on-ppc64.patch"
- local isa_3_patch="ppc64le/core/baseline-isa-3-0.patch"
- # Apply the OpenPOWER patches (check for page size and isa 3.0)
- openpower_patches=( $(grep -E "^ppc64le|^upstream" "${patchset_dir}/series" | grep -v "${page_size_patch}" |
- grep -v "${isa_3_patch}" || die) )
- for patch in "${openpower_patches[@]}"; do
- PATCHES+=( "${patchset_dir}/${patch}" )
- done
- if [[ $(getconf PAGESIZE) == 65536 ]]; then
- PATCHES+=( "${patchset_dir}/${page_size_patch}" )
- fi
- # We use vsx3 as a proxy for 'want isa3.0' (POWER9)
- if use cpu_flags_ppc_vsx3 ; then
- PATCHES+=( "${patchset_dir}/${isa_3_patch}" )
- fi
- fi
-
- remove_compiler_builtins
-
- # We can't rely on the eselect'd Rust to actually include rustfmt, so we'll point to the selected slot specifically.
- local suffix=""
- if [[ "${RUST_TYPE}" == "binary" ]]; then
- suffix="-bin-${RUST_SLOT}"
- else
- suffix="-${RUST_SLOT}"
- fi
- sed -i "s|/bin/rustfmt|/bin/rustfmt${suffix}|g" build/rust/rust_bindgen_generator.gni ||
- die "Failed to update rustfmt path"
-
- fi
-
- # Do this before we apply patches since (e.g.) ppc64 needs to patch rollup and it's easier in ${S}
- einfo "Moving rollup wasm-node package into place ..."
- mkdir -p third_party/devtools-frontend/src/node_modules/@rollup/wasm-node ||
- die "Failed to create node_modules/@rollup/wasm-node"
- mv "${WORKDIR}"/package/* third_party/devtools-frontend/src/node_modules/@rollup/wasm-node ||
- die "Failed to move rollup package"
-
- if [ ! -z "${CHROMIUM_COMMITS[*]}" ]; then
- # for i in "${CHROMIUM_COMMITS[@]}"; do
- for i in "${!CHROMIUM_COMMITS[@]}"; do
- if [[ ${CHROMIUM_COMMITS[$i]} =~ webrtc ]]; then
- patch_prefix="webrtc"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ angle ]]; then
- patch_prefix="angle"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ quiche ]]; then
- patch_prefix="quiche"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ dawn ]]; then
- patch_prefix="dawn"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ perfetto ]]; then
- patch_prefix="perfetto"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ink ]]; then
- patch_prefix="ink"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ vulkan-utility-libraries ]]; then
- patch_prefix="vulkan-utility-libraries"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ruy ]]; then
- patch_prefix="ruy"
- else
- patch_prefix="chromium"
- fi
- pushd "${CHROMIUM_COMMITS[$i]}" > /dev/null || die
- if [[ $i = -* ]]; then
- einfo "Reverting ${patch_prefix}-${i/-}.patch"
- git_wrapper apply -R --exclude="*unittest.cc" --exclude="DEPS" \
- -p1 < "${DISTDIR}/${patch_prefix}-${i/-}.patch"
- else
- einfo "Applying ${patch_prefix}-${i/-}.patch"
- git_wrapper apply --exclude="*unittest.cc" --exclude="DEPS" \
- -p1 < "${DISTDIR}/${patch_prefix}-${i/-}.patch"
- fi
- popd > /dev/null || die
- done
- fi
-
- if ! use bluetooth ; then
- PATCHES+=(
- "${FILESDIR}/disable-bluez-r7.patch"
- )
- fi
-
- if use convert-dict ; then
- PATCHES+=(
- "${FILESDIR}/chromium-ucf-dict-utility-r3.patch"
- )
- fi
-
- if ! use libcxx ; then
- PATCHES+=(
- "${FILESDIR}/fix-wayland-oncecallback-copy.patch"
- )
- fi
-
- if use system-ffmpeg; then
- PATCHES+=(
- "${FILESDIR}/chromium-141-opus-mp3.patch"
- "${FILESDIR}/chromium-135-hevc.patch"
- )
- sed -i "\!AVFMT_FLAG_NOH264PARSE!d" media/filters/ffmpeg_glue.cc || die
- ewarn "You need to expose \"av_stream_get_first_dts\" in ffmpeg via user patch"
- fi
-
- if use system-av1; then
- PATCHES+=(
- "${FILESDIR}/chromium-system-av1.patch"
- )
- fi
-
- if use system-libvpx; then
- PATCHES+=(
- "${FILESDIR}/chromium-system-libvpx.patch"
- )
- fi
-
- if use system-openjpeg ; then
- PATCHES+=(
- "${FILESDIR}/chromium-system-openjpeg-r4.patch"
- )
- fi
-
- # if use x86 ; then
- # #* Fixes a segfault in transport_security_state_generator
- # PATCHES+=(
- # "${FILESDIR}/fix-segfault-x86.patch"
- # )
- # fi
-
- # Testing all patches when NODIE is defined
- if [ ! -z "${NODIE}" ]; then
- for i in "${PATCHES[@]}"; do
- eapply_wrapper "$i"
- done
- nonfatal eapply_user
- else
- default
- fi
-
- if use cromite ; then
- BR_PA_PATH="${WORKDIR}/cromite-${CROMITE_COMMIT_ID}/build/patches"
-
- sed -i '/b\/components\/components_strings\.grd/,+10d' "${BR_PA_PATH}/Add-cromite-flags-support.patch" || die
- sed -i '/b\/chrome\/android\/java\/res\/xml\/privacy_preferences\.xml/,+13d' "${BR_PA_PATH}/Add-cromite-flags-support.patch" || die
- sed -i '/b\/android_webview\/support_library\/java\/src\/org\/chromium\/support_lib_glue/,+11d' "${BR_PA_PATH}/Client-hints-overrides.patch" || die
- sed -i '/webapps_strings.grdp" \/>/{s++webapps_strings.grdp" /><part file="cromite_components_strings_grd/placeholder.txt"/>+;h};${x;/./{x;q0};x;q1}' \
- components/components_strings.grd || die
-
- sed -i 's/absl::/std::/' "${BR_PA_PATH}/Add-a-proxy-configuration-page.patch" || die
-
- filterdiff -p1 "${BR_PA_PATH}/JIT-site-settings.patch" --exclude="content/browser/renderer_host/render_process_host_impl.cc" \
- > "${BR_PA_PATH}/JIT-site-settings.patch1"
- mv -f "${BR_PA_PATH}/JIT-site-settings.patch1" "${BR_PA_PATH}/JIT-site-settings.patch"
-
- BROMITE_PATCHES=(
- "${BR_PA_PATH}/bromite-build-utils.patch"
- "${BR_PA_PATH}/Battery-API-return-nothing.patch"
- "${BR_PA_PATH}/Multiple-fingerprinting-mitigations.patch"
- "${BR_PA_PATH}/Add-flag-to-configure-maximum-connections-per-host.patch"
- "${BR_PA_PATH}/Add-a-proxy-configuration-page.patch"
- "${BR_PA_PATH}/Enable-StrictOriginIsolation-and-SitePerProcess.patch"
- "${BR_PA_PATH}/Disable-requests-for-single-word-Omnibar-searches.patch"
- "${BR_PA_PATH}/Reduce-HTTP-headers-in-DoH-requests-to-bare-minimum.patch"
- "${BR_PA_PATH}/Client-hints-overrides.patch"
- "${BR_PA_PATH}/Disable-idle-detection.patch"
- "${BR_PA_PATH}/Disable-TLS-resumption.patch"
- "${BR_PA_PATH}/Remove-navigator.connection-info.patch"
-
- "${BR_PA_PATH}/AudioBuffer-AnalyserNode-fp-mitigations.patch"
- "${BR_PA_PATH}/Fonts-fingerprinting-mitigation.patch"
- "${BR_PA_PATH}/Content-settings-infrastructure.patch"
- "${BR_PA_PATH}/Add-autoplay-site-setting.patch"
- "${BR_PA_PATH}/Site-setting-for-images.patch"
- "${BR_PA_PATH}/JIT-site-settings.patch"
- "${BR_PA_PATH}/Add-webGL-site-setting.patch"
- "${BR_PA_PATH}/Add-webRTC-site-settings.patch"
- "${BR_PA_PATH}/Show-site-settings-for-cookies-javascript-and-ads.patch"
- "${BR_PA_PATH}/Viewport-Protection-flag.patch"
- "${BR_PA_PATH}/Revert-remove-allowscript-content-setting-secondary-url.patch"
- "${BR_PA_PATH}/Timezone-customization.patch"
- "${BR_PA_PATH}/Disable-speechSynthesis-getVoices-API.patch"
- "${BR_PA_PATH}/Remove-support-for-device-memory-and-cpu-recovery.patch"
- "${BR_PA_PATH}/Disable-Feeback-Collector.patch"
- "${BR_PA_PATH}/Disable-remote-altsvc-for-h3-connections.patch"
- "${BR_PA_PATH}/Add-cromite-flags-support.patch"
- "${BR_PA_PATH}/Enables-deactivation-of-the-js-debugger-statement.patch"
- )
- for i in "${BROMITE_PATCHES[@]}"; do
- if [[ "$i" =~ "Add-autoplay-site-setting.patch" ]] ||
- [[ "$i" =~ "JIT-site-settings.patch" ]] ||
- [[ "$i" =~ "Site-setting-for-images.patch" ]]; then
- einfo "Git binary patch: ${i##*/}"
- git_wrapper apply -p1 < "$i"
- else
- filter_wrapper "$i" --exclude="chrome/android/*"
- fi
- done
-
- #! conflicting patches
- sed -i '/browser_features.cc/,+17d' \
- "${UGC_WD}/patches/extra/ungoogled-chromium/add-flag-to-clear-data-on-exit.patch" || die
- sed -i 's$} // namespace features$BASE_FEATURE(kClearDataOnExit, "ClearDataOnExit", base::FEATURE_DISABLED_BY_DEFAULT);}$' \
- chrome/browser/browser_features.cc || die
- sed -i 's$} // namespace features$BASE_DECLARE_FEATURE(kClearDataOnExit);}$' \
- chrome/browser/browser_features.h || die
- sed -i 's$kChromeUIAboutHost,$kChromeUIAboutHost,"ungoogled-first-run",$' \
- chrome/common/webui_url_constants.cc || die
- sed -i '/chrome\/common\/webui_url_constants.cc/Q' \
- "${UGC_WD}/patches/extra/ungoogled-chromium/first-run-page.patch" || die
-
- #! normalise paths in py
- sed -i 's$os.path.dirname(include_file)$os.path.abspath(os.path.dirname(include_file))$' \
- build/bromite/gyp/cpp_bromite_include.py || die
- fi
-
- # if [[ ${LLVM_SLOT} == "19" ]]; then
- # # Upstream now hard depend on a feature that was added in LLVM 20.1, but we don't want to stabilise that yet.
- # # Do the temp file shuffle in case someone is using something other than `gawk`
- # {
- # awk '/config\("clang_warning_suppression"\) \{/ { print $0 " }"; sub(/clang/, "xclang"); print; next }
- # { print }' build/config/compiler/BUILD.gn > "${T}/build.gn" && \
- # mv "${T}/build.gn" build/config/compiler/BUILD.gn
- # } || die "Unable to disable warning suppression"
- # fi
-
- ## Not included in -lite tarballs, but we should check for it anyway.
- #if [[ -f third_party/node/linux/node-linux-x64/bin/node ]]; then
- # rm third_party/node/linux/node-linux-x64/bin/node || die
- #else
- # mkdir -p third_party/node/linux/node-linux-x64/bin || die
- #fi
- #ln -s "${EPREFIX}"/usr/bin/node third_party/node/linux/node-linux-x64/bin/node || die
-
- cp "${FILESDIR}/libusb.gn" build/linux/unbundle || die
- sed -i '/^REPLACEMENTS.*$/{s++REPLACEMENTS = {"libusb":"third_party/libusb/BUILD.gn",+;h};${x;/./{x;q0};x;q1}' \
- build/linux/unbundle/replace_gn_files.py || die
- sed -i '/^.*deps.*third_party\/jsoncpp.*$/{s++public_deps \+= [ "//third_party/jsoncpp" ]+;h};${x;/./{x;q0};x;q1}' \
- third_party/webrtc/rtc_base/BUILD.gn || die
-
- if use override-data-dir; then
- sed -i '/"chromium";/{s++"ungoogled-chromium";+;h};${x;/./{x;q0};x;q1}' \
- chrome/common/chrome_paths_linux.cc || die
- fi
-
- if use system-abseil-cpp; then
- eapply_wrapper "${FILESDIR}/chromium-147-system-abseil.patch"
-
- #! SFINAE mangling incompatibility between clang and gcc:
- #! https://github.com/llvm/llvm-project/issues/85656
- #! gcc: _ZN4absl12lts_202601074CordC1INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELi0EEEOT_
- #! clang: _ZN4absl12lts_202601074CordC1INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEETnNSt9enable_ifIXsr3std7is_sameIT_S8_EE5valueEiE4typeELi0EEEOSA_
- #! So, either this:
- eapply_wrapper "${FILESDIR}/chromium-141-system-abseil-cord.patch"
- #! or build with -fclang-abi-compat=17
-
- # cp -f /usr/include/absl/base/options.h third_party/abseil-cpp/absl/base/options.h
- # sed -i '/^#define ABSL_OPTION_USE_STD_ORDERING.*$/{s++#define ABSL_OPTION_USE_STD_ORDERING 1+;h};${x;/./{x;q0};x;q1}' \
- # third_party/abseil-cpp/absl/base/options.h || die
- fi
-
- #* Applying UGC PRs here
- if [ ! -z "${UGC_PR_COMMITS[*]}" ]; then
- pushd "${UGC_WD}" >/dev/null
- for i in "${UGC_PR_COMMITS[@]}"; do
- eapply_wrapper "${DISTDIR}/${PN}-$i.patch"
- done
- popd >/dev/null
- fi
-
- # From here we adapt ungoogled-chromium's patches to our needs
- local ugc_pruning_list="${UGC_WD}/pruning.list"
- local ugc_patch_series="${UGC_WD}/patches/series"
- local ugc_substitution_list="${UGC_WD}/domain_substitution.list"
-
- local ugc_unneeded=(
- # GN bootstrap
- extra/debian/gn/parallel
- # following Gentoo's Chromium
- core/ungoogled-chromium/build-with-wasm-rollup
- )
-
- if use cromite ; then
- einfo "Using fingerprinting patches from Cromite instead"
- ugc_unneeded+=(
- extra/bromite/fingerprinting-flags-client-rects-and-measuretext
- extra/bromite/flag-max-connections-per-host
- extra/bromite/flag-fingerprinting-canvas-image-data-noise
- extra/ungoogled-chromium/add-components-ungoogled
- extra/ungoogled-chromium/remove-pac-size-limit
- )
- fi
-
- # #* Temporary fix
- # sed -i "\!ios/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/icu/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/libjpeg_turbo/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/snappy/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/closure_compiler/!d" "${ugc_pruning_list}" || die
-
- # #* Didn't unpack them at the first place
- # sed -i "\!build/linux/debian_bullseye_i386-sysroot!d" "${ugc_pruning_list}" || die
- # sed -i "\!build/linux/debian_bullseye_amd64-sysroot!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/llvm-build!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/node/linux!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/rust-src!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/rust-toolchain!d" "${ugc_pruning_list}" || die
- # if ! use libcxx ; then
- # sed -i "\!third_party/libc!d" "${ugc_pruning_list}" || die
- # fi
- sed -i "s|debug('files|error('files|" \
- "${UGC_WD}/utils/prune_binaries.py" || die
- sed -i "\!third_party/node/linux!d" \
- "${UGC_WD}/utils/prune_binaries.py" || die
-
- local ugc_p ugc_dir
- for p in "${ugc_unneeded[@]}"; do
- einfo "Removing ${p}.patch"
- sed -i "\!${p}.patch!d" "${ugc_patch_series}" || die
- done
-
- if [ ! -z "${UGC_SKIP_PATCHES}" ]; then
- for p in ${UGC_SKIP_PATCHES}; do
- ewarn "Removing ${p}"
- sed -i "\!${p}!d" "${ugc_patch_series}" || die
- done
- fi
-
- if [ ! -z "${UGC_KEEP_BINARIES}" ]; then
- for p in ${UGC_KEEP_BINARIES}; do
- ewarn "Keeping binary ${p}"
- sed -i "\!${p}!d" "${ugc_pruning_list}" || die
- done
- fi
-
- if [ ! -z "${UGC_SKIP_SUBSTITUTION}" ]; then
- for p in ${UGC_SKIP_SUBSTITUTION}; do
- ewarn "No substitutions in ${p}"
- sed -i "\!${p}!d" "${ugc_substitution_list}" || die
- done
- fi
-
- ebegin "Pruning binaries"
- "${UGC_WD}/utils/prune_binaries.py" -q . "${UGC_WD}/pruning.list"
- eend $? || die
-
- ebegin "Applying ungoogled-chromium patches"
- "${UGC_WD}/utils/patches.py" -q apply . "${UGC_WD}/patches"
- eend $? || die
-
- ebegin "Applying domain substitution"
- "${UGC_WD}/utils/domain_substitution.py" -q apply -r "${UGC_WD}/domain_regex.list" -f "${UGC_WD}/domain_substitution.list" .
- eend $? || die
-
- # Sanity check esbuild version before we start removing files.
- # We _could_ patch the version check out - in theory esbuild upstream are being super conservative after
- # arch(AUR) packaged an `esbuild` binary and set ESBUILD_BINARY_PATH=/usr/bin/esbuild, causing much breakage,
- # but this is fine too and exactly matches what upstream are expecting.
- # https://github.com/evanw/esbuild/issues/2894
- local esbuild_js="${S}/third_party/devtools-frontend/src/node_modules/esbuild/lib/main.js"
- local found
- found=$(awk -F'"' '/if \(binaryVersion !==/ {print $2}' "${esbuild_js}")
- if [[ "${found}" != "${ESBUILD_VER}" ]]; then
- die "esbuild version mismatch: expected ${ESBUILD_VER}, found ${found}"
- fi
-
- elog "Removing bundled binaries from source tree ..."
- # Purge bundled ELF files: These are non-portable and will cause issues if used instead of system versions.
- # Use `--wasm` to also remove WebAssembly binaries, if desired - they're portable so shouldn't break builds.
- ${EPYTHON} "${FILESDIR}/bin-finder.py" --elf "${S}" | awk '{print $1}' | xargs rm -f ||
- die "Failed to remove bundled binaries"
-
- # And now we restore any that we actually need, from the host system
- local esbuild_path="${S}/third_party/devtools-frontend/src/third_party/esbuild"
- local -A restore_list=(
- ["/usr/bin/esbuild-${ESBUILD_VER}"]="${esbuild_path}/esbuild"
- ["/usr/bin/gperf"]="${S}/third_party/gperf/cipd/bin/gperf"
- ["/usr/bin/node"]="${S}/third_party/node/linux/node-linux-x64/bin/node"
- ["/usr/lib/go/bin/go"]="${S}/third_party/dawn/tools/golang/linux-amd64/bin/go"
- )
-
- for src in "${!restore_list[@]}"; do
- dst="${restore_list[${src}]}"
- if [[ -f "${src}" ]]; then
- einfo "Symlinking ${src} ..."
- # Make sure the parent dir exists; some tarballs don't include (e.g.) node's bindir
- mkdir -p "$(dirname "${dst}")" || die "Failed to create directory for ${dst}"
- ln -s "${src}" "${dst}" || die "Failed to symlink ${dst} from ${src}"
- if [[ ! -L "${dst}" || "$(readlink -f "${dst}")" != "${src}" ]]; then
- die "Symlink verification failed for ${dst} -> ${src}"
- fi
- else
- die "Expected to find ${src} to restore ${dst}, but it does not exist."
- fi
- done
-
- # adjust python interpreter version
- sed -i -e "s|\(^script_executable = \).*|\1\"${EPYTHON}\"|g" .gn || die
-
- # Use the system copy of hwdata's usb.ids; upstream is woefully out of date (2015!)
- sed 's|//third_party/usb_ids/usb.ids|/usr/share/hwdata/usb.ids|g' \
- -i services/device/public/cpp/usb/BUILD.gn || die "Failed to set system usb.ids path"
-
- # remove_bundled_libraries.py walks the source tree and looks for paths containing the substring 'third_party'
- # whitelist matches use the right-most matching path component, so we need to whitelist from that point down.
- local keeplibs=(
- base/third_party/cityhash
- )
- use system-double-conversion || keeplibs+=(
- base/third_party/double_conversion
- )
- keeplibs+=(
- base/third_party/icu
- base/third_party/nspr
- base/third_party/superfasthash
- base/third_party/symbolize
- base/third_party/xdg_user_dirs
- buildtools/third_party/libc++
- buildtools/third_party/libc++abi
- )
- use cromite && keeplibs+=(
- cromite_flags/third_party
- )
- keeplibs+=(
- net/third_party/mozilla_security_manager
- net/third_party/quic
- net/third_party/uri_template
- )
- use system-abseil-cpp || keeplibs+=(
- third_party/abseil-cpp
- )
- keeplibs+=(
- third_party/angle
- third_party/angle/src/common/third_party/xxhash
- third_party/angle/src/third_party/ceval
- )
- use nvidia || keeplibs+=(
- third_party/angle/src/third_party/libXNVCtrl
- )
- keeplibs+=(
- third_party/angle/src/third_party/volk
- third_party/anonymous_tokens
- third_party/apple_apsl
- third_party/axe-core
- third_party/bidimapper
- third_party/blink
- third_party/boringssl
- third_party/boringssl/src/third_party/fiat
- third_party/breakpad
- third_party/breakpad/breakpad/src/third_party/curl
- )
- use system-brotli || keeplibs+=(
- third_party/brotli
- )
- keeplibs+=(
- third_party/catapult
- third_party/catapult/common/py_vulcanize/third_party/rcssmin
- third_party/catapult/common/py_vulcanize/third_party/rjsmin
- third_party/catapult/third_party/beautifulsoup4-4.9.3
- third_party/catapult/third_party/html5lib-1.1
- third_party/catapult/third_party/polymer
- third_party/catapult/third_party/six
- third_party/catapult/third_party/typ
- third_party/catapult/tracing/third_party/d3
- third_party/catapult/tracing/third_party/gl-matrix
- third_party/catapult/tracing/third_party/jpeg-js
- third_party/catapult/tracing/third_party/jszip
- third_party/catapult/tracing/third_party/mannwhitneyu
- third_party/catapult/tracing/third_party/oboe
- third_party/catapult/tracing/third_party/pako
- third_party/ced
- third_party/cld_3
- third_party/closure_compiler
- )
- use libcxx && keeplibs+=(
- third_party/compiler-rt
- )
- keeplibs+=(
- third_party/content_analysis_sdk
- third_party/cpuinfo
- third_party/crabbyavif
- third_party/crashpad
- third_party/crashpad/crashpad/third_party/lss
- third_party/crashpad/crashpad/third_party/zlib
- )
- use system-crc32c || keeplibs+=(
- third_party/crc32c
- )
- keeplibs+=(
- third_party/cros_system_api
- third_party/d3
- third_party/dawn
- third_party/dawn/third_party/gn/webgpu-cts
- third_party/dawn/third_party/OpenGL-Registry
- third_party/dawn/third_party/renderdoc
- third_party/dawn/third_party/webgpu-headers
- third_party/depot_tools
- third_party/devscripts
- third_party/devtools-frontend
- third_party/devtools-frontend/src/front_end/third_party/acorn
- third_party/devtools-frontend/src/front_end/third_party/additional_readme_paths.json
- third_party/devtools-frontend/src/front_end/third_party/axe-core
- third_party/devtools-frontend/src/front_end/third_party/chromium
- third_party/devtools-frontend/src/front_end/third_party/codemirror
- third_party/devtools-frontend/src/front_end/third_party/csp_evaluator
- third_party/devtools-frontend/src/front_end/third_party/diff
- third_party/devtools-frontend/src/front_end/third_party/i18n
- third_party/devtools-frontend/src/front_end/third_party/intl-messageformat
- third_party/devtools-frontend/src/front_end/third_party/json5
- third_party/devtools-frontend/src/front_end/third_party/legacy-javascript
- third_party/devtools-frontend/src/front_end/third_party/lighthouse
- third_party/devtools-frontend/src/front_end/third_party/lit
- third_party/devtools-frontend/src/front_end/third_party/marked
- third_party/devtools-frontend/src/front_end/third_party/puppeteer
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/third_party/mitt
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/third_party/parsel-js
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/third_party/rxjs
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/third_party/urlpattern-polyfill
- third_party/devtools-frontend/src/front_end/third_party/source-map-scopes-codec
- third_party/devtools-frontend/src/front_end/third_party/third-party-web
- third_party/devtools-frontend/src/front_end/third_party/vscode.web-custom-data
- third_party/devtools-frontend/src/front_end/third_party/wasmparser
- third_party/devtools-frontend/src/front_end/third_party/web-vitals
- third_party/devtools-frontend/src/third_party
- third_party/dom_distiller_js
- third_party/dragonbox
- third_party/eigen3
- third_party/emoji-segmenter
- third_party/farmhash
- third_party/fast_float
- third_party/fdlibm
- third_party/federated_compute/chromium/fcp
- third_party/federated_compute/src/fcp
- third_party/federated_compute/third_party/googleapis
- third_party/federated_compute/third_party/protodatastore-cpp
- third_party/federated_compute/third_party/tensorflow-federated
- third_party/fft2d
- third_party/flatbuffers
- third_party/fp16
- third_party/freetype
- third_party/fusejs
- third_party/fxdiv
- third_party/gemmlowp
- third_party/google_input_tools
- third_party/google_input_tools/third_party/closure_library
- third_party/google_input_tools/third_party/closure_library/third_party/closure
- third_party/googletest
- third_party/gperf # We symlink system gperf, but this will purge the symlink since we tidy up afterwards.
- third_party/highway
- third_party/hunspell
- third_party/hyphenation-patterns
- third_party/ink/src/ink/brush
- third_party/ink/src/ink/color
- third_party/ink/src/ink/geometry
- third_party/ink/src/ink/rendering
- third_party/ink/src/ink/rendering/skia/common_internal
- third_party/ink/src/ink/rendering/skia/native
- third_party/ink/src/ink/rendering/skia/native/internal
- third_party/ink/src/ink/strokes
- third_party/ink/src/ink/types
- third_party/inspector_protocol
- third_party/ipcz
- third_party/jinja2
- )
- use system-jsoncpp || keeplibs+=(
- third_party/jsoncpp
- )
- keeplibs+=(
- third_party/khronos
- third_party/lens_server_proto
- third_party/leveldatabase
- third_party/libaddressinput
- )
- use libcxx && keeplibs+=(
- third_party/libc++
- )
- keeplibs+=(
- third_party/libdrm
- third_party/libgav1
- third_party/libjingle
- third_party/libpfm4
- third_party/libphonenumber
- third_party/libpng
- third_party/libsecret
- third_party/libsrtp
- third_party/libsync
- third_party/libtess2/libtess2
- third_party/libtess2/src/Include
- third_party/libtess2/src/Source
- third_party/liburlpattern
- )
- use system-libusb || keeplibs+=(
- third_party/libusb
- )
- keeplibs+=(
- third_party/libva_protected_content
- )
- use system-libvpx || keeplibs+=(
- third_party/libvpx
- third_party/libvpx/source/libvpx/third_party/x86inc
- )
- keeplibs+=(
- third_party/libwebm
- third_party/libx11
- third_party/libxcb-keysyms
- third_party/libxml/chromium
- third_party/libyuv
- third_party/libzip
- third_party/lit
- )
- use libcxx && keeplibs+=(
- third_party/llvm-libc
- third_party/llvm-libc/src/shared/
- )
- keeplibs+=(
- third_party/lottie
- third_party/lss
- third_party/lzma_sdk
- third_party/mako
- third_party/markupsafe
- third_party/material_color_utilities
- third_party/metrics_proto
- third_party/minigbm
- third_party/ml_dtypes
- third_party/modp_b64
- third_party/nasm
- third_party/nearby
- third_party/neon_2_sse
- third_party/node
- third_party/oak/chromium/proto
- third_party/oak/chromium/proto/attestation
- third_party/omnibox_proto
- third_party/one_euro_filter
- third_party/openscreen
- third_party/openscreen/src/third_party/
- third_party/openscreen/src/third_party/tinycbor/src/src
- third_party/ots
- third_party/pdfium
- third_party/pdfium/third_party/agg23
- third_party/pdfium/third_party/bigint
- third_party/pdfium/third_party/freetype
- third_party/pdfium/third_party/lcms
- )
- use system-openjpeg || keeplibs+=(
- third_party/pdfium/third_party/libopenjpeg
- )
- keeplibs+=(
- third_party/pdfium/third_party/libtiff
- third_party/perfetto
- third_party/perfetto/protos/third_party/android
- third_party/perfetto/protos/third_party/chromium
- third_party/perfetto/protos/third_party/pprof
- third_party/perfetto/protos/third_party/primes
- third_party/perfetto/protos/third_party/simpleperf
- third_party/pffft
- third_party/ply
- third_party/polymer
- third_party/private_membership
- third_party/private-join-and-compute
- third_party/protobuf
- third_party/protobuf/third_party/utf8_range
- third_party/pthreadpool
- third_party/puffin
- third_party/pyjson5
- third_party/pyyaml
- third_party/rapidhash
- third_party/readability
- third_party/rnnoise
- third_party/rust
- third_party/ruy
- third_party/s2cellid
- third_party/search_engines_data
- third_party/securemessage
- third_party/selenium-atoms
- third_party/sentencepiece
- third_party/sentencepiece/src/third_party/darts_clone
- third_party/shell-encryption
- third_party/simdutf
- third_party/simplejson
- third_party/six
- third_party/skia
- third_party/skia/include/third_party/vulkan
- third_party/smhasher
- )
- use system-snappy || keeplibs+=(
- third_party/snappy
- )
- keeplibs+=(
- third_party/spirv-headers
- third_party/spirv-tools
- third_party/sqlite
- third_party/swiftshader
- third_party/swiftshader/third_party/astc-encoder
- third_party/swiftshader/third_party/llvm-subzero
- third_party/swiftshader/third_party/marl
- third_party/swiftshader/third_party/SPIRV-Headers/include/spirv
- third_party/swiftshader/third_party/SPIRV-Tools
- third_party/swiftshader/third_party/subzero
- third_party/tensorflow_models
- third_party/tensorflow-text
- third_party/tflite
- third_party/tflite/src/third_party/fft2d
- third_party/tflite/src/third_party/xla/third_party/tsl
- third_party/tflite/src/third_party/xla/xla/tsl/framework
- third_party/tflite/src/third_party/xla/xla/tsl/lib/random
- third_party/tflite/src/third_party/xla/xla/tsl/platform
- third_party/tflite/src/third_party/xla/xla/tsl/protobuf
- third_party/tflite/src/third_party/xla/xla/tsl/util
- third_party/ukey2
- third_party/utf
- third_party/vulkan
- third_party/wayland
- third_party/webdriver
- third_party/webgpu-cts
- third_party/webrtc
- third_party/webrtc/common_audio/third_party/ooura
- third_party/webrtc/common_audio/third_party/spl_sqrt_floor
- third_party/webrtc/modules/third_party/fft
- third_party/webrtc/modules/third_party/g711
- third_party/webrtc/modules/third_party/g722
- third_party/widevine
- )
- use system-woff2 || keeplibs+=(
- third_party/woff2
- )
- keeplibs+=(
- third_party/wuffs
- third_party/x11proto
- third_party/xcbproto
- third_party/xnnpack
- third_party/zlib/google
- third_party/zxcvbn-cpp
- url/third_party/mozilla
- v8/third_party/glibc
- v8/third_party/inspector_protocol
- v8/third_party/rapidhash-v8
- v8/third_party/siphash
- v8/third_party/utf8-decoder
- v8/third_party/v8
- v8/third_party/valgrind
-
- # gyp -> gn leftovers
- third_party/speech-dispatcher
- third_party/usb_ids
- )
-
- if use test; then
- keeplibs+=(
- third_party/breakpad/breakpad/src/processor
- third_party/fuzztest
- third_party/google_benchmark/src/include/benchmark
- third_party/google_benchmark/src/src
- third_party/test_fonts
- third_party/test_fonts/fontconfig
- third_party/test_fonts/test_fonts
- )
- fi
-
- # USE=system-*
- if ! use system-harfbuzz; then
- keeplibs+=( third_party/harfbuzz )
- fi
-
- if ! use system-ffmpeg; then
- keeplibs+=( third_party/ffmpeg third_party/opus )
- fi
-
- if ! use system-icu; then
- keeplibs+=( third_party/icu )
- fi
-
- if ! use system-zstd; then
- keeplibs+=( third_party/zstd )
- fi
-
- if ! use system-av1; then
- keeplibs+=(
- third_party/dav1d
- third_party/libaom
- third_party/libaom/source/libaom/third_party/fastfeat
- third_party/libaom/source/libaom/third_party/vector
- third_party/libaom/source/libaom/third_party/x86inc
- )
- fi
-
- if use libcxx; then
- keeplibs+=(
- third_party/libc++
- third_party/llvm-libc
- )
- fi
-
- if ! use system-openh264; then
- keeplibs+=( third_party/openh264 )
- fi
-
- if ! use system-re2; then
- keeplibs+=( third_party/re2 )
- fi
-
- # Arch-specific
- if use arm64 || use ppc64 ; then
- keeplibs+=( third_party/swiftshader/third_party/llvm-10.0 )
- fi
- # we need to generate ppc64 stuff because upstream does not ship it yet
- # it has to be done before unbundling.
- if use ppc64; then
- pushd third_party/libvpx >/dev/null || die
- mkdir -p source/config/linux/ppc64 || die
- # requires git and clang, bug #832803
- # Revert https://chromium.googlesource.com/chromium/src/+/b463d0f40b08b4e896e7f458d89ae58ce2a27165%5E%21/third_party/libvpx/generate_gni.sh
- # and https://chromium.googlesource.com/chromium/src/+/71ebcbce867dd31da5f8b405a28fcb0de0657d91%5E%21/third_party/libvpx/generate_gni.sh
- # since we're not in a git repo
- sed -i -e "s|^update_readme||g; s|clang-format|${EPREFIX}/bin/true|g; /^git -C/d; /git cl/d; /cd \$BASE_DIR\/\$LIBVPX_SRC_DIR/ign format --in-place \$BASE_DIR\/BUILD.gn\ngn format --in-place \$BASE_DIR\/libvpx_srcs.gni" \
- generate_gni.sh || die
- ./generate_gni.sh || die
- popd >/dev/null || die
-
- pushd third_party/ffmpeg >/dev/null || die
- cp libavcodec/ppc/h264dsp.c libavcodec/ppc/h264dsp_ppc.c || die
- cp libavcodec/ppc/h264qpel.c libavcodec/ppc/h264qpel_ppc.c || die
- popd >/dev/null || die
- fi
-
- # Sanity check keeplibs, on major version bumps it is often necessary to update this list
- # and this enables us to hit them all at once.
- # There are some entries that need to be whitelisted (TODO: Why? The file is understandable, the rest seem odd)
- whitelist_libs=(
- net/third_party/quic
- third_party/devtools-frontend/src/front_end/third_party/additional_readme_paths.json
- third_party/libjingle
- third_party/mesa
- third_party/skia/third_party/vulkan
- third_party/vulkan
- )
- local not_found_libs=()
- for lib in "${keeplibs[@]}"; do
- if [[ ! -d "${lib}" ]] && ! has "${lib}" "${whitelist_libs[@]}"; then
- not_found_libs+=( "${lib}" )
- fi
- done
-
- if [[ ${#not_found_libs[@]} -gt 0 ]]; then
- ewarn "The following \`keeplibs\` directories were not found in the source tree:"
- for lib in "${not_found_libs[@]}"; do
- ewarn " ${lib}"
- done
- fi
-
- keeplibs+=( third_party/ungoogled )
-
- # Remove most bundled libraries. Some are still needed.
- einfo "Unbundling third-party libraries ..."
- build/linux/unbundle/remove_bundled_libraries.py "${keeplibs[@]}" --do-remove || die
-
- # Interferes with our bundled clang path; we don't want stripped binaries anyway.
- sed -i -e 's|${clang_base_path}/bin/llvm-strip|/bin/true|g' \
- -e 's|${clang_base_path}/bin/llvm-objcopy|/bin/true|g' \
- build/linux/strip_binary.gni || die
-}
-
-src_configure() {
- # Calling this here supports resumption via FEATURES=keepwork
- python_setup
-
- # Bug 491582.
- export TMPDIR="${WORKDIR}/temp"
- mkdir -p -m 755 "${TMPDIR}" || die
-
- # https://bugs.gentoo.org/654216
- addpredict /dev/dri/ #nowarn
-
- # Use system-provided libraries.
- # TODO: freetype -- remove sources (https://bugs.chromium.org/p/pdfium/issues/detail?id=733).
- # TODO: use_system_hunspell (upstream changes needed).
- # TODO: use_system_protobuf (bug #525560).
- # TODO: use_system_sqlite (http://crbug.com/22208).
-
- # libevent: https://bugs.gentoo.org/593458
- local gn_system_libraries=(
- flac
- fontconfig
- freetype
- libjpeg
- libwebp
- libxml
- libxslt
- zlib
- )
- if use system-abseil-cpp; then
- gn_system_libraries+=(
- absl_algorithm
- absl_base
- absl_cleanup
- absl_container
- absl_crc
- absl_debugging
- absl_flags
- absl_functional
- absl_hash
- absl_log
- absl_log_internal
- absl_memory
- absl_meta
- absl_numeric
- absl_random
- absl_status
- absl_strings
- absl_synchronization
- absl_time
- absl_types
- absl_utility
- )
- fi
- if use system-brotli; then
- gn_system_libraries+=( brotli )
- fi
- if use system-crc32c; then
- gn_system_libraries+=( crc32c )
- fi
- if use system-double-conversion; then
- gn_system_libraries+=( double-conversion )
- fi
- if use system-woff2; then
- gn_system_libraries+=( woff2 )
- fi
- if use nvidia; then
- gn_system_libraries+=( libXNVCtrl )
- fi
- if use system-ffmpeg; then
- gn_system_libraries+=( ffmpeg opus )
- fi
- if use system-jsoncpp; then
- gn_system_libraries+=( jsoncpp )
- fi
- if use system-icu; then
- gn_system_libraries+=( icu )
- fi
- if use system-zstd; then
- gn_system_libraries+=( zstd )
- fi
- if use system-av1; then
- gn_system_libraries+=( dav1d libaom )
- fi
- if use system-libusb; then
- gn_system_libraries+=( libusb )
- fi
- if use system-libvpx; then
- gn_system_libraries+=( libvpx )
- fi
- use system-openh264 && gn_system_libraries+=(
- openh264
- )
- use system-re2 && gn_system_libraries+=(
- re2
- )
- use system-snappy && gn_system_libraries+=(
- snappy
- )
-
- build/linux/unbundle/replace_gn_files.py --system-libraries "${gn_system_libraries[@]}" ||
- die "Failed to replace GN files for system libraries"
-
- # TODO 131: The above call clobbers `enable_freetype = true` in the freetype gni file
- # drop the last line, then append the freetype line and a new curly brace to end the block
- local freetype_gni="build/config/freetype/freetype.gni"
- sed -i -e '$d' ${freetype_gni} || die
- echo " enable_freetype = true" >> ${freetype_gni} || die
- echo "}" >> ${freetype_gni} || die
-
- if use !custom-cflags; then
- replace-flags "-Os" "-O2"
- strip-flags
- # Debug info section overflows without component build
- # Prevent linker from running out of address space, bug #471810 .
- filter-flags "-g*"
- # 949123: Several multimedia components explicitly build with specific CFLAGS and
- # use runtime detection to enable optimisations; unfortunately any of our CFLAGS are suffixed
- # to the end of the command line, which causes build failures.
- fi
- # Since M150 `skia` will begin breaking for x86_64 due to compilation of `avx512` code paths;
- # we need to filter these for all arches.
- filter-flags "-march*" "-mtune*" "-mcpu*"
-
- # We don't use the same clang version as upstream, and with -Werror
- # we need to make sure that we don't get superfluous warnings.
- append-flags -Wno-unknown-warning-option
- if tc-is-cross-compiler; then # can you cross-compile with the bundled toolchain?
- export BUILD_CXXFLAGS+=" -Wno-unknown-warning-option"
- export BUILD_CFLAGS+=" -Wno-unknown-warning-option"
- fi
-
- # Start building our GN options
- local myconf_gn=() # Tip: strings must be quoted, bools or numbers are fine
-
- if use !bundled-toolchain; then
- # We already forced the "correct" clang via pkg_setup
-
- if tc-is-cross-compiler; then
- CC="${CC} -target ${CHOST} --sysroot ${ESYSROOT}"
- CXX="${CXX} -target ${CHOST} --sysroot ${ESYSROOT}"
- BUILD_AR=${AR}
- BUILD_CC=${CC}
- BUILD_CXX=${CXX}
- BUILD_NM=${NM}
- fi
-
- # Make sure the build system will use the right tools, bug #340795.
- tc-export AR CC CXX NM
-
- strip-unsupported-flags
- append-ldflags -Wl,--undefined-version # https://bugs.gentoo.org/918897#c32
-
- myconf_gn+=(
- "is_clang=true"
- "clang_use_chrome_plugins=false"
- "use_clang_modules=false" # M141 enables this for the linux platform by default.
- 'custom_toolchain="//build/toolchain/linux/unbundle:default"'
- # From M127 we need to provide a location for libclang and the clang resource dir so that bindgen can find them
- "bindgen_libclang_path=\"$(get_llvm_prefix)/$(get_libdir)\""
- "bindgen_clang_resource_dir=\"${EPREFIX}/usr/lib/clang/${LLVM_SLOT}/include\""
- "bindgen_extra_clang_args=[\"-I${EPREFIX}/usr/lib/clang/${LLVM_SLOT}/include\"]"
- "clang_base_path=\"${EPREFIX}/usr/lib/clang/${LLVM_SLOT}/\""
- "rust_bindgen_root=\"${EPREFIX}/usr/\""
- "rust_sysroot_absolute=\"$(get_rust_prefix)\""
- "rustc_version=\"${RUST_SLOT}\""
- )
-
- if tc-ld-is-mold; then
- myconf_gn+=(
- "use_mold=true"
- "use_lld=false"
- "linker_path=\"${EPREFIX}/usr/bin/mold\""
- )
- else
- myconf_gn+=( "use_lld=true" )
- fi
-
- if [[ ${LLVM_SLOT} -lt 23 ]]; then
- # Workaround for -fsanitize-ignore-for-ubsan-feature (added in LLVM 23)
- myconf_gn+=( 'clang_has_ubsan_feature_ignore=false' )
- fi
-
- if ! tc-is-cross-compiler; then
- myconf_gn+=( 'host_toolchain="//build/toolchain/linux/unbundle:default"' )
- else
- tc-export BUILD_{AR,CC,CXX,NM}
- myconf_gn+=(
- 'host_toolchain="//build/toolchain/linux/unbundle:host"'
- 'v8_snapshot_toolchain="//build/toolchain/linux/unbundle:host"'
- "host_pkg_config=\"$(tc-getBUILD_PKG_CONFIG)\""
- "pkg_config=\"$(tc-getPKG_CONFIG)\""
- )
-
- # setup cups-config, build system only uses --libs option
- if use cups; then
- mkdir "${T}/cups-config" || die
- cp "${ESYSROOT}/usr/bin/${CHOST}-cups-config" "${T}/cups-config/cups-config" || die
- export PATH="${PATH}:${T}/cups-config"
- fi
-
- # Don't inherit PKG_CONFIG_PATH from environment
- local -x PKG_CONFIG_PATH=
- fi
-
- fi # !bundled-toolchain
-
- local myarch
- myarch="$(tc-arch)"
- case ${myarch} in
- amd64)
- # Bug 530248, 544702, 546984, 853646.
- use !custom-cflags && filter-flags -mno-mmx -mno-sse2 -mno-ssse3 -mno-sse4.1 \
- -mno-avx -mno-avx2 -mno-fma -mno-fma4 -mno-xop -mno-sse4a
- myconf_gn+=( 'target_cpu="x64"' )
- ;;
- x86)
- # Bug 530248, 544702, 546984, 853646.
- use !custom-cflags && filter-flags -mno-mmx -mno-sse2 -mno-ssse3 -mno-sse4.1 \
- -mno-avx -mno-avx2 -mno-fma -mno-fma4 -mno-xop -mno-sse4a
- myconf_gn+=( 'target_cpu="x86"' )
- ;;
- arm64)
- myconf_gn+=( 'target_cpu="arm64"' )
- ;;
- ppc64)
- myconf_gn+=( 'target_cpu="ppc64"' )
- ;;
- *)
- die "Failed to determine target arch, got '${myarch}'."
- ;;
- esac
-
- # Common options
-
- myconf_gn+=(
- # Disable code formating of generated files
- "blink_enable_generated_code_formatting=false"
- # enable DCHECK with USE=debug only, increases chrome binary size by 30%, bug #811138.
- # DCHECK is fatal by default, make it configurable at runtime, #bug 807881.
- "dcheck_always_on=$(usex debug true false)"
- "dcheck_is_configurable=$(usex debug true false)"
- # Chromium builds provided by Linux distros should disable the testing config
- "disable_fieldtrial_testing_config=true"
- # Custom patch: Enable building Chromium as individual channels (e.g. stable, beta, dev) that
- # use different profile directories, desktop entries, etc. This enables slotting the ebuild.
- "enable_channel_branding=true"
- # 131 began laying the groundwork for replacing freetype with
- # "Rust-based Fontations set of libraries plus Skia path rendering"
- # We now need to opt-in
- "enable_freetype=true"
- "enable_hangout_services_extension=$(usex hangouts true false)"
- # Don't need nocompile checks and GN crashes with our config (verify with modern GN)
- "enable_nocompile_tests=false"
- # pseudolocales are only used for testing
- "enable_pseudolocales=false"
- "enable_widevine=$(usex widevine true false)"
- # Disable fatal linker warnings, bug 506268.
- "fatal_linker_warnings=false"
- # Component build isn't generally intended for use by end users. It's mostly useful
- # for development and debugging.
- "is_component_build=false"
- # GN needs explicit config for Debug/Release as opposed to inferring it from build directory.
- "is_debug=false"
- "is_official_build=$(usex official true false)"
- # Enable ozone wayland and/or headless support
- "ozone_auto_platforms=false"
- "ozone_platform_headless=true"
- # Enables building without non-free unRAR licence
- "safe_browsing_use_unrar=false"
- # "thin_lto_enable_optimizations=${use_lto}"
- "treat_warnings_as_errors=false"
- # Use in-tree libc++ (buildtools/third_party/libc++ and buildtools/third_party/libc++abi)
- # instead of the system C++ library for C++ standard library support.
- # default: true, but let's be explicit (forced since 120 ; USE removed 127).
- "use_custom_libcxx=true"
- # Enable ozone wayland and/or headless support
- "use_ozone=true"
- # The sysroot is the oldest debian image that chromium supports, we don't need it
- "use_sysroot=false"
- # See dependency logic in third_party/BUILD.gn
- "use_system_harfbuzz=$(usex system-harfbuzz true false)"
- # "use_thin_lto=${use_lto}"
- # Only enabled for clang, but gcc has endian macros too
- "v8_use_libm_trig_functions=true"
- "tint_use_system_go=true"
- )
-
- myconf_gn+=( "enable_iterator_debugging=$(usex debug true false)" )
-
- if use debug; then
- myconf_gn+=(
- "symbol_level=2"
- "blink_symbol_level=2"
- "v8_symbol_level=2"
- )
- else
- myconf_gn+=(
- "symbol_level=0"
- "blink_symbol_level=0"
- "v8_symbol_level=0"
- )
- fi
-
- if use bindist ; then
- myconf_gn+=(
- # If this is set to false Chromium won't be able to load any proprietary codecs
- # even if provided with an ffmpeg capable of h264/aac decoding
- "proprietary_codecs=true"
- 'ffmpeg_branding="Chrome"'
- # build ffmpeg as an external component (libffmpeg.so) that we can remove / substitute
- "is_component_ffmpeg=true"
- )
- else
- myconf_gn+=(
- "proprietary_codecs=$(usex proprietary-codecs true false)"
- "ffmpeg_branding=\"$(usex proprietary-codecs Chrome Chromium)\""
- )
- fi
-
- if use headless; then
- myconf_gn+=(
- "enable_print_preview=false"
- "enable_remoting=false"
- 'ozone_platform="headless"'
- "rtc_use_pipewire=false"
- "use_alsa=false"
- "use_cups=false"
- "use_gio=false"
- "use_glib=false"
- "use_gtk=false"
- "use_kerberos=false"
- "use_libpci=false"
- "use_pangocairo=false"
- "use_pulseaudio=false"
- "use_qt5=false"
- "use_qt6=false"
- "use_udev=false"
- "use_vaapi=false"
- "use_xkbcommon=false"
- )
- else
- myconf_gn+=(
- "gtk_version=$(usex gtk4 4 3)"
- # link pulseaudio directly (DT_NEEDED) instead of using dlopen.
- # helps with automated detection of ABI mismatches and prevents silent errors.
- "link_pulseaudio=$(usex pulseaudio true false)"
- "ozone_platform_wayland=$(usex wayland true false)"
- "ozone_platform_x11=$(usex X true false)"
- "ozone_platform=\"$(usex wayland wayland x11)\""
- "rtc_use_pipewire=$(usex screencast true false)"
- "use_cups=$(usex cups true false)"
- "use_kerberos=$(usex kerberos true false)"
- "use_pulseaudio=$(usex pulseaudio true false)"
- "use_qt5=false"
- "use_system_libffi=$(usex wayland true false)"
- "use_system_minigbm=true"
- "use_vaapi=$(usex vaapi true false)"
- "use_xkbcommon=true"
- )
- if use qt6; then
- local cbuild_libdir
- cbuild_libdir="$(get_libdir)"
- if tc-is-cross-compiler; then
- # Hack to workaround get_libdir not being able to handle CBUILD, bug #794181
- cbuild_libdir="$($(tc-getBUILD_PKG_CONFIG) --keep-system-libs --libs-only-L libxslt)"
- cbuild_libdir="${cbuild_libdir:2}"
- cbuild_libdir="${cbuild_libdir/% }"
- fi
- myconf_gn+=(
- "use_qt6=true"
- "moc_qt6_path=\"${EPREFIX}/usr/${cbuild_libdir}/qt6/libexec\""
- )
- else
- myconf_gn+=( "use_qt6=false" )
- fi
- fi
-
- # Explicitly disable ICU data file support for system-icu/headless builds.
- if use system-icu || use headless; then
- myconf_gn+=( "icu_use_data_file=false" )
- fi
-
- if use official; then
- # Allow building against system libraries in official builds
- sed -i 's/OFFICIAL_BUILD/GOOGLE_CHROME_BUILD/' \
- tools/generate_shim_headers/generate_shim_headers.py || die
- # Don't add symbols to build
- myconf_gn+=( "symbol_level=0" )
- fi
-
- if use pgo; then
- myconf_gn+=(
- "chrome_pgo_phase=2"
- "v8_enable_builtins_optimization=true"
- )
- else
- myconf_gn+=( "chrome_pgo_phase=0" )
- fi
-
- # Odds and ends
-
- # skipping typecheck is only supported on amd64, bug #876157
- if ! use amd64; then
- myconf_gn+=( "devtools_skip_typecheck=false" )
- fi
-
- # Disable external code space for V8 for ppc64. It is disabled for ppc64
- # by default, but cross-compiling on amd64 enables it again.
- if tc-is-cross-compiler && use ppc64; then
- myconf_gn+=( "v8_enable_external_code_space=false" )
- fi
-
- # This determines whether or not GN uses the bundled libcxx
- if use libcxx; then
- myconf_gn+=( "use_custom_libcxx=true" )
- else
- myconf_gn+=(
- "use_custom_libcxx=false"
- "use_llvm_libatomic=false"
- )
- append-cppflags -U_GLIBCXX_ASSERTIONS #See #318
- fi
-
- myconf_gn+=( "use_bluez=$(usex bluetooth true false)" )
-
- myconf_gn+=( "is_cfi=$(usex cfi true false)" )
-
- if use cfi; then
- myconf_gn+=(
- "use_cfi_icall=true"
- "use_cfi_cast=true"
- )
- fi
-
- myconf_gn+=(
- "optimize_webui=$(usex optimize-webui true false)"
- "use_system_freetype=$(usex system-harfbuzz true false)"
- "use_system_libopenjpeg2=$(usex system-openjpeg true false)"
- "enable_pdf=true"
- "use_system_lcms2=true"
- "enable_print_preview=true"
- "use_thin_lto=$(usex thinlto true false)"
- "thin_lto_enable_optimizations=$(usex optimize-thinlto true false)"
-
- # Ungoogled flags
- "build_with_tflite_lib=false"
- "enable_mdns=false"
- "enable_mse_mpeg2ts_stream_parser=$(usex proprietary-codecs true false)"
- "enable_remoting=false"
- "enable_reporting=false"
- "enable_service_discovery=false"
- "exclude_unwind_tables=true"
- "google_api_key=\"\""
- "google_default_client_id=\"\""
- "google_default_client_secret=\"\""
- "safe_browsing_mode=0"
- "use_official_google_api_keys=false"
- "use_unofficial_version_number=false"
-
- # "enable_swiftshader=false"
-
- # Additional flags
- # "perfetto_use_system_zlib=true"
- # "use_system_zlib=true"
- # "use_system_libjpeg=true"
- # "rtc_build_examples=false"
- # "enable_chromium_prelude=false"
- # "enable_updater=false"
- # "enable_update_notifications=false"
- # "enable_constraints=false"
- # "rtc_rusty_base64=false"
- # "v8_enable_temporal_support=false"
- # "media_use_symphonia=false"
- # "pdf_enable_rust_png=false"
- # "skia_use_libpng_encode=true"
- # "skia_use_libpng_decode=true"
- # "skia_use_rust_png_decode=false"
- # "skia_use_rust_png_encode=false"
- # "enable_jxl_decoder=false"
- )
-
- if use amd64 || use arm64; then
- myconf_gn+=(
- "v8_drumbrake_bounds_checks=true"
- # "v8_enable_drumbrake=true"
- )
- fi
-
- if use thinlto; then
- # We need to change the default value of import-instr-limit in
- # LLVM to limit the text size increase. The default value is
- # 100, and we change it to 30 to reduce the text size increase
- # from 25% to 10%. The performance number of page_cycler is the
- # same on two of the thinLTO configurations, we got 1% slowdown
- # on speedometer when changing import-instr-limit from 100 to 30.
- # append-ldflags "-Wl,-plugin-opt,-import-instr-limit=30"
- sed -i '/import_instr_limit = 5/{s++import_instr_limit = 30+;h};${x;/./{x;q0};x;q1}' \
- build/config/compiler/BUILD.gn || die
-
- append-ldflags "-Wl,--thinlto-jobs=$(makeopts_jobs)"
- fi
-
- # Facilitate deterministic builds (taken from build/config/compiler/BUILD.gn)
- append-cflags -Wno-builtin-macro-redefined
- append-cxxflags -Wno-builtin-macro-redefined
- append-cppflags "-D__DATE__= -D__TIME__= -D__TIMESTAMP__="
-
- local flags
- einfo "Building with the following compiler settings:"
- for flags in C{C,XX} AR NM RANLIB {C,CXX,CPP,LD}FLAGS \
- EXTRA_GN UGC_{SKIP_{PATCHES,SUBSTITUTION},KEEP_BINARIES} ; do
- einfo " ${flags} = \"${!flags}\""
- done
-
- # Since we build from tarballs, we need to set the channel here so that it can be used in the build.
- export CHROME_VERSION_EXTRA="${SLOT}"
-
- einfo "Configuring Chromium ..."
- set -- gn gen -v --args="${myconf_gn[*]}${EXTRA_GN:+ ${EXTRA_GN}}" out/Release
- echo "$@"
- "$@" || die "Failed to configure Chromium"
-
- # The "if" below should not be executed unless testing
- if [ ! -z "${NODIE}" ]; then
- # List all args
- # gn args --list out/Release
-
- # Quick compiler check
- eninja -C out/Release protoc torque
- fi
-}
-
-src_compile() {
- # Final link uses lots of file descriptors.
- ulimit -n 2048
-
- # Calling this here supports resumption via FEATURES=keepwork
- python_setup
-
- # I hate doing this but upstream Rust have yet to come up with a better solution for
- # us poor packagers. Required for Split LTO units, which are required for CFI.
- export RUSTC_BOOTSTRAP=1
-
- # Don't inherit PYTHONPATH from environment, bug #789021, #812689
- local -x PYTHONPATH=
-
- # Build mksnapshot and pax-mark it.
- if use pax-kernel; then
- local x
- for x in mksnapshot v8_context_snapshot_generator code_cache_generator; do
- if tc-is-cross-compiler; then
- eninja -C out/Release "host/${x}"
- pax-mark m "out/Release/host/${x}"
- else
- eninja -C out/Release "${x}"
- pax-mark m "out/Release/${x}"
- fi
- done
- fi
-
- # Even though ninja autodetects number of CPUs, we respect
- # user's options, for debugging with -j 1 or any other reason.
- eninja -C out/Release chrome chrome_sandbox $(use test && echo "base_unittests")
-
- pax-mark m out/Release/chrome
-
- # This codepath does minimal patching, so we're at the mercy of upstream
- # CFLAGS. This is fine - we're not intending to force this on users
- # and we do a lot of flag 'management' anyway.
- if use bundled-toolchain; then
- QA_FLAGS_IGNORED="
- usr/lib64/chromium-browser/chrome
- usr/lib64/chromium-browser/chrome-sandbox
- usr/lib64/chromium-browser/chromedriver
- usr/lib64/chromium-browser/chrome_crashpad_handler
- usr/lib64/chromium-browser/libEGL.so
- usr/lib64/chromium-browser/libGLESv2.so
- usr/lib64/chromium-browser/libVkICD_mock_icd.so
- usr/lib64/chromium-browser/libVkLayer_khronos_validation.so
- usr/lib64/chromium-browser/libqt6_shim.so
- usr/lib64/chromium-browser/libvk_swiftshader.so
- usr/lib64/chromium-browser/libvulkan.so.1
- "
- fi
-
- use convert-dict && eninja -C out/Release convert_dict
-
- use enable-driver && eninja -C out/Release chromedriver
- #use suid && eninja -C out/Release chrome_sandbox
-
- # use enable-driver && mv out/Release/chromedriver{.unstripped,}
-
- rm -f out/Release/locales/*.pak.info || die
-
- # Generate support files (desktop file, manpage, etc.) See: #684550 #706786 #968958
- ${EPYTHON} "${FILESDIR}/generate-support-files.py" \
- --installdir "/usr/$(get_libdir)/ungoogled-chromium-browser" \
- --channel "${SLOT}" ||
- die "Failed to generate support files"
-}
-
-src_test() {
- # Tests may be flaky with usersandbox, and the test runner executes significantly faster without.
- # If you seem to be excluding too many tests for a particular milestone: comment them out, reboot, and
- # run the tests again. If that doesn't help, try FEATURES="-usersandbox" and send it because obviously the
- # chromium gods are not smiling upon you today. Do some runtime testing, obvs.
- local skip_tests=(
- # Wildcard exclusions (if all tests in a test suite are broken)
- 'AlternateTestParams/PartitionAllocDeathTest.RepeatedAllocReturnNullDirect/*'
- 'AlternateTestParams/PartitionAllocDeathTest.RepeatedReallocReturnNullDirect/*'
- 'AlternateTestParams/PartitionAllocTest.*' # 200+ tests, >= 1 crashes entire test runner with usersandbox.
- 'CheckExitCodeAfterSignalHandlerDeathTest.*'
- 'CriticalProcessAndThreadSpotChecks/HangWatcherAnyCriticalThreadTests.*'
- 'LazyThreadPoolTaskRunnerEnvironmentTest.*' # M142
- 'ToolsSanityTest.BadVirtualCall*'
- # requires en-us locale
- SysStrings.SysNativeMBAndWide
- SysStrings.SysNativeMBToWide
- SysStrings.SysWideToNativeMB
- # Specific test cases
- CancelableEventTest.BothCancelFailureAndSucceedOccurUnderContention
- FilePathTest.FromUTF8Unsafe_And_AsUTF8Unsafe
- HistogramTesterTest.PumaTestUniqueSample
- ImmediateCrashTest.ExpectedOpcodeSequence # M150
- PathServiceTest.CheckedGetFailure
- PlatformThreadTest.CanChangeThreadType
- RawPtrTest.SetLookupUsesGetForComparison # M146 ; also broken for alpine in M144.
- RustLogIntegrationTest.CheckAllSeverity
- StackCanary.ChangingStackCanaryCrashesOnReturn
- StackTraceDeathTest.StackDumpSignalHandlerIsMallocFree
- TestLauncherTools.TruncateSnippetFocusedMatchesFatalMessagesTest
- ThreadPoolEnvironmentConfig.CanUseBackgroundPriorityForWorker
- )
- local test_filter="-$(IFS=:; printf '%s' "${skip_tests[*]}")"
- # test-launcher-bot-mode enables parallelism and plain output
- # Check individual tests with --gtest_filter=<test you want> --single-process-tests
- ./out/Release/base_unittests --test-launcher-bot-mode \
- --test-launcher-jobs="$(get_makeopts_jobs)" \
- --gtest_filter="${test_filter}" || die "Tests failed!"
-}
-
-src_install() {
- local browser_suffix
- if [[ "${SLOT}" != "stable" ]]; then
- browser_suffix="-${SLOT}"
- else
- browser_suffix=""
- fi
- local CHROMIUM_HOME="/usr/$(get_libdir)/ungoogled-chromium-browser${browser_suffix}"
- exeinto "${CHROMIUM_HOME}"
- doexe out/Release/chrome
-
- #newexe out/Release/chrome_sandbox chrome-sandbox
- #fperms 4755 "${CHROMIUM_HOME}/chrome-sandbox"
-
- use enable-driver && doexe out/Release/chromedriver
-
- #* https://github.com/ungoogled-software/ungoogled-chromium/pull/3563
- doexe out/Release/chrome_crashpad_handler
-
- if use convert-dict; then
- newexe "${FILESDIR}/update-dicts.sh" update-dicts.sh
- doexe out/Release/convert_dict
- fi
-
- ozone_auto_session () {
- use X && use wayland && ! use headless && echo true || echo false
- }
-
- cat <<- EOF > "${D}${CHROMIUM_HOME}/chromium-launcher.sh" || die
- #!/bin/bash
- # Wrapper to launch slotted Chromium via the chromium-common launcher script.
- export CHROME_DESKTOP="ungoogled-chromium-browser${browser_suffix}.desktop"
- export CHROME_EXEC_NAME="ungoogled-chromium-browser${browser_suffix}"
- export CHROME_VERSION_EXTRA="${SLOT}"
- export CHROME_WRAPPER="\$(readlink -f "\$0")"
- export OZONE_AUTO_SESSION=$(ozone_auto_session)
-
- exec /usr/libexec/chromium/chromium-launcher.sh "\$@"
- EOF
-
- chmod 755 "${D}${CHROMIUM_HOME}/chromium-launcher.sh" || die
-
- # It is important that we name the target "chromium-browser",
- # xdg-utils expect it; bug #355517.
- dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/ungoogled-chromium-browser${browser_suffix}
- # keep the old symlink around for consistency
- dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/ungoogled-chromium${browser_suffix}
-
- use enable-driver && dosym "${CHROMIUM_HOME}/chromedriver" /usr/bin/ungoogled-chromedriver${browser_suffix}
-
- pushd out/Release/locales > /dev/null || die
- chromium_remove_language_paks
- popd > /dev/null || die
-
- insinto "${CHROMIUM_HOME}"
- doins out/Release/*.bin
- doins out/Release/*.pak
- doins -r out/Release/hyphen-data
-
- if use bindist; then
- # We built libffmpeg as a component library, but we can't distribute it
- # with proprietary codec support. Remove it and make a symlink to the requested
- # system library.
- rm -f out/Release/libffmpeg.so \
- || die "Failed to remove bundled libffmpeg.so (with proprietary codecs)"
- # symlink the libffmpeg.so from either ffmpeg-chromium or ffmpeg[chromium].
- einfo "Creating symlink to libffmpeg.so from $(usex ffmpeg-chromium ffmpeg-chromium ffmpeg[chromium])..."
- dosym ../chromium/libffmpeg.so$(usex ffmpeg-chromium .${PV%%\.*} "") \
- /usr/$(get_libdir)/ungoogled-chromium-browser/libffmpeg.so
- fi
-
- (
- shopt -s nullglob
- local files=(out/Release/*.so out/Release/*.so.[0-9])
- [[ ${#files[@]} -gt 0 ]] && doins "${files[@]}"
- )
-
- if ! use system-icu && ! use headless; then
- doins out/Release/icudtl.dat
- fi
-
- doins -r out/Release/locales
- #doins -r out/Release/MEIPreload
-
- # Install vk_swiftshader_icd.json; bug #827861
- doins out/Release/vk_swiftshader_icd.json
-
- if [[ -d out/Release/swiftshader ]]; then
- insinto "${CHROMIUM_HOME}/swiftshader"
- doins out/Release/swiftshader/*.so
- fi
-
- use widevine && dosym WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so "${CHROMIUM_HOME}/libwidevinecdm.so"
-
- # Install icons
- local branding size
- for size in 16 24 32 48 64 128 256 ; do
- case ${size} in
- 16|32) branding="chrome/app/theme/default_100_percent/chromium" ;;
- *) branding="chrome/app/theme/chromium" ;;
- esac
- newicon -s ${size} "${branding}/product_logo_${size}.png" \
- ungoogled-chromium-browser${browser_suffix}.png
- done
-
- # Install desktop entry
- domenu out/Release/ungoogled-chromium-browser${browser_suffix}.desktop
-
- # Install GNOME default application entry (bug #303100).
- insinto /usr/share/gnome-control-center/default-apps
- doins out/Release/ungoogled-chromium-browser${browser_suffix}.xml
-
- # Install AppStream metadata
- insinto /usr/share/appdata
- doins out/Release/ungoogled-chromium-browser${browser_suffix}.appdata.xml
-
- # Install manpage; bug #684550
- doman out/Release/ungoogled-chromium-browser${browser_suffix}.1
- dosym ungoogled-chromium-browser${browser_suffix}.1 /usr/share/man/man1/ungoogled-chromium${browser_suffix}.1
-
- readme.gentoo_create_doc
-}
-
-pkg_postrm() {
- xdg_icon_cache_update
- xdg_desktop_database_update
-}
-
-pkg_postinst() {
- xdg_icon_cache_update
- xdg_desktop_database_update
- readme.gentoo_print_elog
-
- if use !headless && [[ -z "${REPLACING_VERSIONS}" ]]; then
- if use vaapi; then
- elog "Hardware-accelerated video decoding configuration:"
- elog
- elog "Chromium supports multiple backends for hardware acceleration. To enable one,"
- elog " Add to CHROMIUM_FLAGS in /etc/chromium/default:"
- elog
- elog "1. VA-API with OpenGL (recommended for most users):"
- elog " --enable-features=AcceleratedVideoDecodeLinuxGL"
- elog " VaapiVideoDecoder may need to be added as well, but try without first."
- elog
- if use wayland; then
- elog "2. Enhanced Wayland/EGL performance:"
- elog " --enable-features=AcceleratedVideoDecodeLinuxGL,AcceleratedVideoDecodeLinuxZeroCopyGL"
- elog
- fi
- if use X; then
- elog "$(usex wayland "3" "2"). VA-API with Vulkan:"
- elog " --enable-features=VaapiVideoDecoder,VaapiIgnoreDriverChecks,Vulkan,DefaultANGLEVulkan,VulkanFromANGLE"
- elog
- if use wayland; then
- elog " NOTE: Vulkan acceleration requires X11 and will not work under Wayland sessions."
- elog " Use OpenGL-based acceleration instead when running under Wayland."
- elog
- fi
- fi
- elog "Additional options:"
- elog " To enable hardware-accelerated encoding (if supported)"
- elog " add 'AcceleratedVideoEncoder' to your feature list"
- elog " VaapiIgnoreDriverChecks bypasses driver compatibility checks"
- elog " (may be needed for newer/unsupported hardware)"
- elog
- else
- elog "This Chromium build was compiled without VA-API support, which provides"
- elog "hardware-accelerated video decoding."
- fi
- if use screencast; then
- elog "Screencast is disabled by default at runtime. Either enable it"
- elog "by navigating to chrome://flags/#enable-webrtc-pipewire-capturer"
- elog "inside Chromium or add --enable-features=WebRTCPipeWireCapturer"
- elog "to CHROMIUM_FLAGS in /etc/chromium/default."
- elog
- elog "Additional setup may be required for screencasting to work."
- elog "See issue: https://github.com/PF4Public/gentoo-overlay/issues/314"
- fi
- if use gtk4; then
- elog "Chromium prefers GTK3 over GTK4 at runtime. To override this"
- elog "behaviour you need to pass --gtk-version=4, e.g. by adding it"
- elog "to CHROMIUM_FLAGS in /etc/chromium/default."
- fi
- if use widevine; then
- elog "widevine requires binary plugins, which are distributed separately"
- elog "Make sure you have www-plugins/chrome-binary-plugins installed"
- fi
- fi
-
- if systemd_is_booted && ! [[ -f "/etc/machine-id" ]]; then
- ewarn "The lack of an '/etc/machine-id' file on this system booted with systemd"
- ewarn "indicates that the Gentoo handbook was not followed to completion."
- ewarn ""
- ewarn "Chromium is known to behave unpredictably with this system configuration;"
- ewarn "please complete the configuration of this system before logging any bugs."
- fi
-
- # Stable slot doesn't change profile directory, and it's vanishingly unlikely that users will downgrade from dev.
- if [[ -n "${REPLACING_VERSIONS}" ]]; then
- local replacing_non_slotted=false
- # there could be more than one PVR
- for version in ${REPLACING_VERSIONS}; do
- if ver_test "${version}" -le "145.0.7632.116"; then
- replacing_non_slotted=true
- break
- fi
- done
- if ${replacing_non_slotted}; then
- ewarn "This version of Chromium has replaced a non-slotted ebuild."
- if [[ ${SLOT} != "stable" ]]; then
- ewarn "This channel has its own profile directory, so your existing profile will not be used."
- ewarn "To use your existing profile, either copy or move it to the new location."
- ewarn "See https://wiki.gentoo.org/wiki/Chromium#Profile_Directories for more information."
- ewarn ""
- fi
- ewarn "Any existing Progressive Web Apps (PWAs) will need to be reinstalled,"
- ewarn "or have the path in the desktop files updated to point to the new wrapper script."
- fi
- fi
-}
-
-eapply_wrapper () {
- if [ ! -z "${NODIE}" ]; then
- nonfatal eapply "$@"
- else
- eapply "$@"
- fi
-}
-
-git_wrapper () {
- if [ ! -z "${NODIE}" ]; then
- git "$@"
- else
- git "$@" || die
- fi
-}
-
-filter_wrapper () {
- einfo "Applying ${i##*/}"
- #? fuzz factor of 3 is OK?
- if [ ! -z "${NODIE}" ]; then
- filterdiff -p1 "${@:2}" < "$1" | patch -F 3 -p1
- else
- filterdiff -p1 "${@:2}" < "$1" | patch -F 3 -p1 || die
- fi
-}
diff --git a/www-client/ungoogled-chromium/ungoogled-chromium-152.0.7977.64_p1.ebuild b/www-client/ungoogled-chromium/ungoogled-chromium-152.0.7977.64_p1.ebuild
deleted file mode 100644
index f502c00a21cd..000000000000
--- a/www-client/ungoogled-chromium/ungoogled-chromium-152.0.7977.64_p1.ebuild
+++ /dev/null
@@ -1,2622 +0,0 @@
-# Copyright 2009-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-# Use following environment variables to customise the build
-# EXTRA_GN — pass extra options to gn
-# NINJAOPTS="-k0 -j8" useful to populate ccache even if ebuild is still failing
-# UGC_SKIP_PATCHES — space-separated list of patches to skip
-# UGC_KEEP_BINARIES — space-separated list of binaries to keep
-# UGC_SKIP_SUBSTITUTION — space-separated list of files to skip domain substitution
-
-# USE=bundled-toolchain is intended for users who want to use the same toolchain
-# as the upstream releases. It's also a good fallback in case we fall behind
-# and need to get a release out quickly (less likely with `dev` in-tree).
-# We can't rely on it as a default since the toolchain is only shipped for x86-64;
-# other architectures will need to use system toolchain.
-
-# Since m133 we are using CI-generated tarballs from
-# https://github.com/chromium-linux-tarballs/chromium-tarballs/
-
-# These are bit-for-bit identical to the official releases, but are built
-# using an external CI system that we have some control over, in case
-# issues pop up again with official tarball generation.
-
-GN_MIN_VER=0.2374
-# chromium-tools/get-chromium-toolchain-strings.py (or just use Chromicler)
-# Node for M145+ should be 24.12.0 but that's not packaged in Gentoo yet. See #969145
-TEST_FONT="9c07d19d9c5ee1ff94f717e6fb17e0c8c354e6f9"
-BUNDLED_CLANG_VER="llvmorg-23-init-19482-g53d18800-1"
-BUNDLED_RUST_VER="b998449636a48e2c4a362809085b600a0174e1f2-2"
-RUST_SHORT_HASH=${BUNDLED_RUST_VER:0:10}-${BUNDLED_RUST_VER##*-}
-NODE_VER="24.12.0"
-GO_MIN_VER="1.25.0"
-ESBUILD_VER="0.25.1"
-ROLLUP_VER="4.57.1" # currently manual.
-
-CHROMIUM_LANGS="af am ar as az be bg bn bs ca cs cy da de el en-GB es es-419 et eu fa fi fil
- fr fr-CA gl gu he hi hr hu hy id is it ja ka kk km kn ko ky lo lt lv mk ml mn mr ms my
- nb ne nl or pa pl pt-BR pt-PT ro ru si sk sl sq sr sr-Latn sv sw ta te th tr uk ur uz
- vi zh-CN zh-HK zh-TW zu"
-
-#UGC_COMMIT_ID="59657a38437d11520a68618008eb825721319b9e"
-# UGC_PR_COMMITS=(
-# c917e096342e5b90eeea91ab1f8516447c8756cf
-# 5794e9d12bf82620d5f24505798fecb45ca5a22d
-# )
-
-CROMITE_COMMIT_ID="69e841fd35cd92ce5fa1a336791c7989809e0f17"
-
-declare -A CHROMIUM_COMMITS=(
- # ["27f8690db999f6e56f0af7a9ea3d28a019ed72ca"]="." #152+
- ["-cf94ed446320d35c8613ed9b3ffb6e6a61bfcb5f"]="." # ffmpeg 9
- # ["-bf6be9310a07b981edf81e0ac9b89dead09be35c"]="." # ffmpeg 9
- ["-c72c7b0971e3e31974b0adea0dac42278e22e3b0"]="third_party/devtools-frontend/src" # need gn >= 2459
-# # ["-37c28a19804e47a68eabf3cf882a310689fc325b"]="." #disable style check for cromite
-# # ["cd5a0df905a28faa89ff2a4ab44f893f84dc4487"]="net/third_party/quiche/src"
-)
-
-LLVM_COMPAT=( 21 22 23 )
-PYTHON_COMPAT=( python3_{13..14} )
-PYTHON_REQ_USE="xml(+)"
-RUST_MIN_VER=1.91.0
-RUST_NEEDS_LLVM="yes please"
-RUST_OPTIONAL="yes" # Not actually optional, but we don't need system Rust (or LLVM) with USE=bundled-toolchain
-RUST_REQ_USE="rustfmt" # Upstream run rustfmt on bindgen output, so we need it to be available.
-
-inherit check-reqs chromium-2 desktop flag-o-matic llvm-r1 multiprocessing ninja-utils pax-utils
-inherit python-any-r1 readme.gentoo-r1 rust systemd toolchain-funcs xdg-utils
-
-DESCRIPTION="Modifications to Chromium for removing Google integration and enhancing privacy"
-HOMEPAGE="https://github.com/ungoogled-software/ungoogled-chromium"
-PPC64_HASH="7aae8a84e327fc2078ce1625c9c70bfda77d626f"
-PATCH_V="${PV%%\.*}"
-COPIUM_COMMIT="3c7e56fb4523b43b47595bb3a22f77178fc76293"
-SRC_URI="https://commondatastorage.googleapis.com/chromium-browser-official/chromium-${PV/_*}-lite.tar.xz
- https://deps.gentoo.zip/www-client/chromium/rollup-wasm-node-${ROLLUP_VER}.tgz
- https://gitlab.com/Matt.Jolly/chromium-patches/-/archive/${PATCH_V}/chromium-patches-${PATCH_V}.tar.bz2
- !bundled-toolchain? (
- https://codeberg.org/selfisekai/copium/archive/${COPIUM_COMMIT}.tar.gz
- -> chromium-patches-copium-${COPIUM_COMMIT:0:10}.tar.gz
- )
- bundled-toolchain? (
- https://commondatastorage.googleapis.com/chromium-browser-clang/Linux_x64/clang-${BUNDLED_CLANG_VER}.tar.xz
- -> chromium-clang-${BUNDLED_CLANG_VER}.tar.xz
- https://commondatastorage.googleapis.com/chromium-browser-clang/Linux_x64/rust-toolchain-${BUNDLED_RUST_VER}-${BUNDLED_CLANG_VER%-*}.tar.xz
- -> chromium-rust-toolchain-${RUST_SHORT_HASH}-${BUNDLED_CLANG_VER%-*}.tar.xz
- )
- test? (
- https://chromium-fonts.storage.googleapis.com/${TEST_FONT} -> chromium-testfonts-${TEST_FONT:0:10}.tar.gz
- )
- ppc64? (
- https://gitlab.raptorengineering.com/raptor-engineering-public/chromium/openpower-patches/-/archive/${PPC64_HASH}/openpower-patches-${PPC64_HASH}.tar.bz2 -> chromium-openpower-${PPC64_HASH:0:10}.tar.bz2
- )
-"
-
-# Gentoo tarball:
-# https://chromium-tarballs.distfiles.gentoo.org/chromium-${PV/_*}.tar.xz -> chromium-${PV/_*}-gentoo.tar.xz
-
-# chromium-linux-tarballs
-# https://github.com/chromium-linux-tarballs/chromium-tarballs/releases/download/${PV/_*}/chromium-${PV/_*}-linux.tar.xz
-
-# Official tarball:
-# https://commondatastorage.googleapis.com/chromium-browser-official/chromium-${PV/_*}${LITE_TARBALL:+-lite}.tar.xz
-
-# https://gitweb.gentoo.org/proj/chromium-tools.git/tree/get-chromium-licences.py @ 145.0.7632.76
-LICENSE="Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD BSD-2 Base64 Boost-1.0 CC-BY-3.0 CC-BY-4.0 Clear-BSD FFT2D FTL"
-LICENSE+=" IJG ISC LGPL-2 LGPL-2.1 MIT MPL-1.1 MPL-2.0 Ms-PL PSF-2 SGI-B-2.0 SSLeay SunSoft Unicode-3.0"
-LICENSE+=" Unicode-DFS-2015 Unlicense UoI-NCSA ZLIB libtiff openssl"
-LICENSE+=" cromite? ( GPL-3 )"
-
-SLOT="stable"
-KEYWORDS="amd64 ~arm64 ~ppc64 ~x86"
-
-IUSE_SYSTEM_LIBS="abseil-cpp av1 brotli crc32c double-conversion ffmpeg +harfbuzz icu jsoncpp +libusb libvpx +openh264 openjpeg re2 snappy woff2 +zstd"
-IUSE="+X bindist bluetooth bundled-toolchain cfi convert-dict cups custom-cflags debug ffmpeg-chromium enable-driver gtk4 hangouts headless kerberos +libcxx nvidia +official optimize-thinlto optimize-webui override-data-dir pax-kernel pgo"
-IUSE+=" +proprietary-codecs pulseaudio qt6 screencast selinux test thinlto cromite vaapi wayland widevine cpu_flags_ppc_vsx3"
-RESTRICT="
- !bindist? ( bindist )
- !test? ( test )
- arm64? ( test )
- !system-ffmpeg? ( proprietary-codecs? ( bindist ) )
- !system-openh264? ( bindist )
- cromite? ( bindist )"
-
-REQUIRED_USE="
- !headless? ( || ( X wayland ) )
- screencast? ( wayland )
- ffmpeg-chromium? ( bindist proprietary-codecs )
- optimize-thinlto? ( thinlto )
- cfi? ( thinlto )
- x86? ( !thinlto !widevine )
- debug? ( !official )
- vaapi? ( !system-av1 !system-libvpx )
-"
-
-UGC_PV="${PV/_p/-}"
-UGC_PF="${PN}-${UGC_PV}"
-UGC_URL="https://github.com/ungoogled-software/${PN}/archive/"
-
-if [ -z "$UGC_COMMIT_ID" ]; then
- UGC_URL="${UGC_URL}${UGC_PV}.tar.gz -> ${UGC_PF}.tar.gz"
- UGC_WD="${WORKDIR}/${UGC_PF}"
-else
- UGC_URL="${UGC_URL}${UGC_COMMIT_ID}.tar.gz -> ${PN}-${UGC_COMMIT_ID}.tar.gz"
- UGC_WD="${WORKDIR}/ungoogled-chromium-${UGC_COMMIT_ID}"
-fi
-
-SRC_URI+="${UGC_URL}
-"
-
-if [ ! -z "${UGC_PR_COMMITS[*]}" ]; then
- for i in "${UGC_PR_COMMITS[@]}"; do
- SRC_URI+="https://github.com/ungoogled-software/${PN}/commit/$i.patch?full_index=true -> ${PN}-$i.patch
- "
- done
-fi
-
-if [ ! -z "${CHROMIUM_COMMITS[*]}" ]; then
- # for i in "${CHROMIUM_COMMITS[@]}"; do
- for i in "${!CHROMIUM_COMMITS[@]}"; do
- if [[ ${CHROMIUM_COMMITS[$i]} =~ webrtc ]]; then
- #TODO: is it safe to use this mirror?
- SRC_URI+="https://github.com/webrtc-mirror/webrtc/commit/${i/-}.patch?full_index=true -> webrtc-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ angle ]]; then
- SRC_URI+="https://github.com/google/angle/commit/${i/-}.patch?full_index=true -> angle-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ quiche ]]; then
- SRC_URI+="https://github.com/google/quiche/commit/${i/-}.patch?full_index=true -> quiche-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ dawn ]]; then
- SRC_URI+="https://github.com/google/dawn/commit/${i/-}.patch?full_index=true -> dawn-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ perfetto ]]; then
- SRC_URI+="https://github.com/google/perfetto/commit/${i/-}.patch?full_index=true -> perfetto-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ink ]]; then
- SRC_URI+="https://github.com/google/ink/commit/${i/-}.patch?full_index=true -> ink-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ vulkan-utility-libraries ]]; then
- SRC_URI+="https://github.com/KhronosGroup/Vulkan-Utility-Libraries/commit/${i/-}.patch?full_index=true -> vulkan-utility-libraries-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ruy ]]; then
- SRC_URI+="https://github.com/google/ruy/commit/${i/-}.patch?full_index=true -> ruy-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ devtools-frontend ]]; then
- SRC_URI+="https://github.com/ChromeDevTools/devtools-frontend/commit/${i/-}.patch?full_index=true -> devtools-frontend-${i/-}.patch
- "
- else
- SRC_URI+="https://github.com/chromium/chromium/commit/${i/-}.patch?full_index=true -> chromium-${i/-}.patch
- "
- fi
- done
-fi
-
-SRC_URI+="cromite? ( https://github.com/uazo/cromite/archive/${CROMITE_COMMIT_ID}.tar.gz -> cromite-${CROMITE_COMMIT_ID}.tar.gz )
-"
-
-for i in ${IUSE_SYSTEM_LIBS}; do
- [[ $i =~ ^(\+)?(.*)$ ]]
- IUSE+=" ${BASH_REMATCH[1]}system-${BASH_REMATCH[2]}"
-done
-
-COMMON_X_DEPEND="
- x11-libs/libXcomposite:=
- x11-libs/libXcursor:=
- x11-libs/libXdamage:=
- x11-libs/libXfixes:=
- >=x11-libs/libXi-1.6.0:=
- x11-libs/libXrandr:=
- x11-libs/libXrender:=
- x11-libs/libXtst:=
- x11-libs/libxshmfence:=
-"
-
-# sys-libs/zlib: https://bugs.gentoo.org/930365; -ng is not compatible.
-# We _could_ use the bundled minizip, but that's against policy.
-COMMON_SNAPSHOT_DEPEND="
- system-icu? ( >=dev-libs/icu-78:= )
- system-abseil-cpp? ( >=dev-cpp/abseil-cpp-20260107.0 )
- system-brotli? ( >=app-arch/brotli-9999 )
- system-crc32c? ( dev-libs/crc32c )
- system-double-conversion? ( dev-libs/double-conversion )
- system-woff2? ( media-libs/woff2 )
- system-snappy? ( app-arch/snappy )
- system-jsoncpp? ( dev-libs/jsoncpp )
- system-openjpeg? ( media-libs/openjpeg:2= )
- system-re2? ( >=dev-libs/re2-0.2019.08.01:= )
- system-libvpx? ( >=media-libs/libvpx-1.13.0:=[postproc] )
- system-libusb? ( virtual/libusb:1 )
- cromite? ( dev-util/patchutils )
- >=dev-libs/libxml2-2.12.4:=[icu]
- dev-libs/nspr:=
- >=dev-libs/nss-3.26:=
- dev-libs/libxslt:=
- media-libs/fontconfig:=
- >=media-libs/freetype-2.11.0-r1:=
- system-harfbuzz? ( >=media-libs/harfbuzz-3:0=[icu(-)] )
- media-libs/libjpeg-turbo:=
- media-libs/libpng:=
- system-zstd? ( >=app-arch/zstd-1.5.5:= )
- >=media-libs/libwebp-0.4.0:=
- media-libs/mesa:=[gbm(+)]
- >=media-libs/openh264-2.6.0:=
- system-av1? (
- >=media-libs/dav1d-1.0.0:=
- >=media-libs/libaom-3.7.0:=
- )
- sys-libs/zlib:=
- !headless? (
- dev-libs/glib:2
- >=media-libs/alsa-lib-1.0.19:=
- media-video/pipewire:=
- pulseaudio? (
- || (
- media-libs/libpulse
- >=media-sound/apulse-0.1.9
- )
- )
- sys-apps/pciutils:=
- kerberos? ( virtual/krb5 )
- vaapi? ( >=media-libs/libva-2.7:=[X?,wayland?] )
- X? (
- x11-base/xorg-proto:=
- x11-libs/libX11:=
- x11-libs/libxcb:=
- x11-libs/libXext:=
- )
- x11-libs/libxkbcommon:=
- wayland? (
- screencast? ( media-video/pipewire:= )
- dev-libs/libffi:=
- dev-libs/wayland:=
- screencast? (
- media-video/pipewire:=
- || (
- sys-apps/xdg-desktop-portal-gnome
- sys-apps/xdg-desktop-portal-gtk
- kde-plasma/xdg-desktop-portal-kde
- gui-libs/xdg-desktop-portal-lxqt
- gui-libs/xdg-desktop-portal-wlr
- )
- )
- )
- )
-"
-
-COMMON_DEPEND="
- ${COMMON_SNAPSHOT_DEPEND}
- app-arch/bzip2:=
- dev-libs/expat:=
- system-ffmpeg? (
- >=media-video/ffmpeg-6.1:=
- >=media-libs/opus-1.3.1:=
- )
- net-misc/curl[ssl]
- sys-apps/dbus:=
- media-libs/flac:=
- sys-libs/zlib:=[minizip]
- !headless? (
- >=app-accessibility/at-spi2-core-2.46.0:2
- media-libs/mesa:=[X?,wayland?]
- virtual/udev
- x11-libs/cairo:=
- x11-libs/gdk-pixbuf:2
- x11-libs/pango:=
- cups? ( >=net-print/cups-1.3.11:= )
- qt6? ( dev-qt/qtbase:6[gui,widgets] )
- X? ( ${COMMON_X_DEPEND} )
- )
-"
-RDEPEND="${COMMON_DEPEND}
- !www-client/ungoogled-chromium:0
- >=www-client/chromium-common-2
- !headless? (
- || (
- x11-libs/gtk+:3[X?,wayland?]
- gui-libs/gtk:4[X?,wayland?]
- )
- qt6? ( dev-qt/qtbase:6[X?,wayland?] )
- )
- virtual/ttf-fonts
- selinux? ( sec-policy/selinux-chromium )
- bindist? (
- ffmpeg-chromium? ( media-video/ffmpeg-chromium:${PV%%\.*} )
- )
- !override-data-dir? (
- !www-client/chromium:${SLOT}
- !www-client/cromite:${SLOT}[-override-data-dir]
- )
-"
-# For M149+ pipewire is a mandatory build-time dependency, but it's optional at runtime for most configurations.
-DEPEND="${COMMON_DEPEND}
- !headless? (
- media-video/pipewire
- gtk4? ( gui-libs/gtk:4[X?,wayland?] )
- !gtk4? ( x11-libs/gtk+:3[X?,wayland?] )
- )
-"
-
- # pgo? ( >=llvm-core/clang-22.0.0_pre20260106 >=llvm-core/lld-22.0.0_pre20260106 )
-BDEPEND="
- ${COMMON_SNAPSHOT_DEPEND}
- ${PYTHON_DEPS}
- $(python_gen_any_dep '
- dev-python/setuptools[${PYTHON_USEDEP}]
- ')
- >=app-arch/gzip-1.7
- !headless? (
- qt6? ( dev-qt/qtbase:6 )
- )
- !bundled-toolchain? ( $(llvm_gen_dep '
- llvm-core/clang:${LLVM_SLOT}
- llvm-core/llvm:${LLVM_SLOT}
- llvm-core/lld:${LLVM_SLOT}
- cfi? ( llvm-runtimes/clang-runtime:${LLVM_SLOT}[sanitize] )
- official? (
- !ppc64? ( llvm-runtimes/compiler-rt-sanitizers:${LLVM_SLOT}[cfi] )
- ) ')
- ${RUST_DEPEND}
- )
- >=dev-util/bindgen-0.72.1
- >=dev-build/gn-${GN_MIN_VER}
- >=dev-lang/go-${GO_MIN_VER}
- app-alternatives/ninja
- dev-lang/perl
- >=dev-util/gperf-3.2
- dev-util/esbuild:${ESBUILD_VER}
- dev-vcs/git
- >=net-libs/nodejs-${NODE_VER}[inspector]
- sys-apps/hwdata
- >=sys-devel/bison-2.4.3
- sys-devel/flex
- virtual/pkgconfig
- x11-misc/xdg-utils
-"
-
-if ! has chromium_pkg_die ${EBUILD_DEATH_HOOKS}; then
- EBUILD_DEATH_HOOKS+=" chromium_pkg_die";
-fi
-
-DISABLE_AUTOFORMATTING="yes"
-DOC_CONTENTS="
-Some web pages may require additional fonts to display properly.
-Try installing some of the following packages if some characters
-are not displayed properly:
-- media-fonts/arphicfonts
-- media-fonts/droid
-- media-fonts/ipamonafont
-- media-fonts/noto
-- media-fonts/ja-ipafonts
-- media-fonts/takao-fonts
-- media-fonts/wqy-microhei
-- media-fonts/wqy-zenhei
-
-To fix broken icons on the Downloads page, you should install an icon
-theme that covers the appropriate MIME types, and configure this as your
-GTK+ icon theme.
-
-For native file dialogs in KDE, install kde-apps/kdialog.
-
-To make password storage work with your desktop environment you may
-have install one of the supported credentials management applications:
-- app-crypt/libsecret (GNOME)
-- kde-frameworks/kwallet (KDE)
-If you have one of above packages installed, but don't want to use
-them in Chromium, then add --password-store=basic to CHROMIUM_FLAGS
-in /etc/chromium/default.
-"
-
-S="${WORKDIR}/chromium-${PV/_*}"
-
-python_check_deps() {
- python_has_version "dev-python/setuptools[${PYTHON_USEDEP}]"
-}
-
-pre_build_checks() {
- # Check build requirements: bugs #471810, #541816, #914220
- # We're going to start doing maths here on the size of an unpacked source tarball,
- # this should make updates easier as chromium continues to balloon in size.
- # xz -l /var/cache/distfiles/chromium-${PV}*.tar.xz
- local base_disk=9 # Round up
- use test && base_disk=$((base_disk + 5))
- local extra_disk=1 # Always include a little extra space
- local memory=4
- tc-is-cross-compiler && extra_disk=$((extra_disk * 2))
- if tc-is-lto || use pgo; then
- memory=$((memory * 2 + 1))
- tc-is-cross-compiler && extra_disk=$((extra_disk * 2)) # Double the requirements
- use pgo && extra_disk=$((extra_disk + 4))
- fi
- if is-flagq '-g?(gdb)?([1-9])'; then
- if use custom-cflags; then
- extra_disk=$((extra_disk + 5))
- fi
- memory=$((memory * 2))
- fi
- local CHECKREQS_MEMORY="${memory}G"
- local CHECKREQS_DISK_BUILD="$((base_disk + extra_disk))G"
- check-reqs_${EBUILD_PHASE_FUNC}
-}
-
-pkg_pretend() {
- if [[ ${MERGE_TYPE} != binary ]]; then
- # The pre_build_checks are all about compilation resources, no need to run it for a binpkg
- pre_build_checks
- fi
-
- if use headless; then
- local headless_unused_flags=("cups" "kerberos" "pulseaudio" "qt6" "vaapi" "wayland")
- for myiuse in ${headless_unused_flags[@]}; do
- use ${myiuse} && ewarn "Ignoring USE=${myiuse}, USE=headless is set."
- done
- fi
-
- if ! use bindist && use ffmpeg-chromium; then
- ewarn "Ignoring USE=ffmpeg-chromium, USE=bindist is not set."
- fi
- if use libcxx; then
- ewarn
- ewarn "Building with libcxx, please be aware that system-*"
- ewarn "and some other c++ dependencies need to be compiled"
- ewarn "with the same c++ library as ungoogled-chromium itself"
- ewarn "dev-libs/jsoncpp is most problematic, see #58 #49 #119 for details"
- ewarn "Simplest solution would be to disable corresponding system-* flags"
- ewarn
- fi
- if use cfi; then
- ewarn
- ewarn "Building with cfi is only possible if building with -stdlib=libc++"
- ewarn "Make sure all dependencies are also built this way, see #40"
- ewarn
- fi
- if use cromite; then
- ewarn
- ewarn "Cromite patches are very experimental and unstable"
- ewarn "Please consider testing them and giving feedback upstream:"
- ewarn "https://github.com/uazo/cromite/issues"
- ewarn "Not all patches are applied, let me know if others should be considered too"
- ewarn
- fi
-}
-
-pkg_setup() {
- if [[ ${MERGE_TYPE} != binary ]]; then
- # The pre_build_checks are all about compilation resources, no need to run it for a binpkg
- pre_build_checks
-
- # We haven't massaged any CFLAGS yet, so we want to do this before we force CC/CXX to prevent warnings.
- local want_lto="false"
- tc-is-lto && want_lto="true"
-
- # The linux:unbundle toolchain in GN grabs CC, CXX, CPP (etc) from the environment
- # We'll set these to clang here then use llvm-utils functions to very explicitly set these
- # to a sane value.
- # This is effectively the 'force-clang' path if GCC support is re-added.
- if use !bundled-toolchain; then
- llvm-r1_pkg_setup
- rust_pkg_setup
-
- if tc-ld-is-mold; then
- ewarn "Mold is currently not supported, it will not be used"
- fi
-
- # Forcing clang; respect llvm_slot_x to enable selection of impl via LLVM_COMPAT
- AR=llvm-ar
- CPP="${CHOST}-clang++-${LLVM_SLOT} -E"
- NM=llvm-nm
- CC="${CHOST}-clang-${LLVM_SLOT}"
- CXX="${CHOST}-clang++-${LLVM_SLOT}"
- fi
-
- # LTO in Chromium means LLVM ThinLTO, if GCC support is re-added
- # We'll need to handle that here too.
- use_lto="false"
- local lto_usable="true"
- if [[ "$want_lto" == "true" ]]; then
- if use arm64 && [[ "${LLVM_SLOT}" -lt 22 ]]; then
- einfo "LTO is broken with LLVM 21 on arm64, ignoring CFLAGS."
- lto_usable="false"
- else
- use_lto="true"
- fi
- # We can rely on GN to do this for us; without this builds
- # take significantly longer with LTO enabled.
- filter-lto
- fi
-
- if [[ "$use_lto" == "false" ]] && use official && [[ "$lto_usable" == "true" ]]; then
- einfo "USE=official selected and LTO not detected."
- einfo "It is _highly_ recommended that LTO be enabled for performance reasons"
- einfo "and to be consistent with the upstream \"official\" build optimisations."
- fi
-
- if [[ "$use_lto" == "false" ]] && use test; then
- die "Tests require CFI which requires LTO"
- fi
-
- export use_lto
-
- if tc-is-cross-compiler; then
- use pgo && die "The pgo USE flag cannot be used when cross-compiling"
- CPP="${CBUILD}-clang++-${LLVM_SLOT} -E"
- fi
-
- # Sanity checks for development convenience
- if ver_test $(gn --version || die) -lt ${GN_MIN_VER}; then
- die "dev-build/gn >= ${GN_MIN_VER} is required to build this Chromium"
- fi
-
- # Sometimes, when adding a new LLVM slot, devs (me) forget to install an appropriate lld.
- if tc-ld-is-lld; then
- local lld_ver=$(ld.lld --version | awk '{split($2,a,"."); print a[1]}' || die "Failed to check lld version")
- if [[ ${lld_ver} -lt ${LLVM_SLOT} ]]; then
- die "Your lld version (${lld_ver}) is too old for the selected LLVM slot (${LLVM_SLOT}). Please install a newer lld or select an older LLVM slot."
- fi
- fi
- fi
-
- chromium_suid_sandbox_check_kernel_config
-}
-
-src_unpack() {
- # # Here be dragons!
- # local XCLD="--exclude=chromium-${PV/_*}/third_party/instrumented_libs \
- # --exclude=chromium-${PV/_*}/third_party/llvm \
- # --exclude=chromium-${PV/_*}/third_party/llvm-build \
- # --exclude=chromium-${PV/_*}/third_party/node/linux \
- # --exclude=chromium-${PV/_*}/third_party/rust-src \
- # --exclude=chromium-${PV/_*}/third_party/rust-toolchain \
- # --exclude=chromium-${PV/_*}/build/linux/debian_bullseye_i386-sysroot \
- # --exclude=chromium-${PV/_*}/build/linux/debian_bullseye_amd64-sysroot \
- # --exclude=chromium-${PV/_*}/third_party/angle/third_party/VK-GL-CTS \
- # "
-
- # if ! use libcxx ; then
- # XCLD+=" --exclude=chromium-${PV/_*}/third_party/libc++"
- # fi
-
- # if ! use pgo ; then
- # XCLD+=" --exclude=chromium-${PV/_*}/chrome/build/pgo_profiles"
- # fi
-
- # einfo "Unpacking chromium-${PV/_*}.tar.xz to ${WORKDIR}"
- # # Gentoo tarball:
- # # tar ${XCLD} -xf "${DISTDIR}/chromium-${PV/_*}-gentoo.tar.xz" -C "${WORKDIR}" || die
- # tar ${XCLD} -xf "${DISTDIR}/chromium-${PV/_*}${LITE_TARBALL:+-lite}.tar.xz" -C "${WORKDIR}" || die
-
- # unpack ${UGC_URL#*->}
- # # unpack chromium-patches-${PATCH_V}.tar.bz2
- # # Warned you!
-
- unpack chromium-${PV/_*}-lite.tar.xz
- unpack chromium-patches-${PATCH_V}.tar.bz2
- # These should only be required when we're not using the official toolchain
- if use !bundled-toolchain; then
- unpack chromium-patches-copium-${COPIUM_COMMIT:0:10}.tar.gz
- fi
-
- if use test; then
- # This just contains a bunch of font files that need to be unpacked (or moved) to the correct location.
- local testfonts_dir="${WORKDIR}/chromium-${PV/_*}/third_party/test_fonts/test_fonts"
- local testfonts_tar="${DISTDIR}/chromium-testfonts-${TEST_FONT:0:10}.tar.gz"
- einfo "Unpacking test fonts ..."
- tar xf "${testfonts_tar}" -C "${testfonts_dir}" || die "Failed to unpack testfonts"
- fi
-
- # We need to manually unpack this since M126 else we'd unpack one toolchain over the other.
- # Since we're doing that anyway let's unpack to sensible locations to make symlink creation easier.
- if use bundled-toolchain; then
- einfo "Unpacking bundled Clang ..."
- mkdir -p "${WORKDIR}"/clang || die "Failed to create clang directory"
- tar xf "${DISTDIR}/chromium-clang-${BUNDLED_CLANG_VER}.tar.xz" -C "${WORKDIR}/clang" || die "Failed to unpack Clang"
- einfo "Unpacking bundled Rust ..."
- local rust_dir="${WORKDIR}/rust-toolchain"
- mkdir -p "${rust_dir}" || die "Failed to create rust toolchain directory"
- tar xf "${DISTDIR}/chromium-rust-toolchain-${RUST_SHORT_HASH}-${BUNDLED_CLANG_VER%-*}.tar.xz" -C "${rust_dir}" ||
- die "Failed to unpack Rust"
- fi
-
- if use ppc64; then
- unpack chromium-openpower-${PPC64_HASH:0:10}.tar.bz2
- fi
-
- # This is a dirty hack, but we need rollup to build successfully and it's proving to be challenging
- # to build locally due to deps
- unpack rollup-wasm-node-${ROLLUP_VER}.tgz
-
- if use cromite; then
- unpack cromite-${CROMITE_COMMIT_ID}.tar.gz
- fi
-
- unpack ${UGC_URL#*->}
-}
-
-remove_compiler_builtins() {
- # We can't use the bundled compiler builtins with the system toolchain
- # We used to `grep` then `sed`, but it was indirect. Combining the two into a single
- # `awk` command is more efficient and lets us document the logic more clearly.
-
- local pattern=' configs += [ "//build/config/clang:compiler_builtins" ]'
- local target='build/config/compiler/BUILD.gn'
-
- local tmpfile
- tmpfile=$(mktemp) || die "Failed to create temporary file."
-
- if awk -v pat="${pattern}" '
- BEGIN {
- match_found = 0
- }
-
- # If the delete countdown is active, decrement it and skip to the next line.
- d > 0 { d--; next }
-
- # If the current line matches the pattern...
- $0 == pat {
- match_found = 1 # ...set our flag to true.
- d = 2 # Set delete counter for this line and the next two.
- prev = "" # Clear the buffered previous line so it is not printed.
- next
- }
-
- # For any other line, print the buffered previous line.
- NR > 1 { print prev }
-
- # Buffer the current line to be printed on the next cycle.
- { prev = $0 }
-
- END {
- # Print the last line if it was not part of a deleted block.
- if (d == 0) { print prev }
-
- # If the pattern was never found, exit with a failure code.
- if (match_found == 0) {
- exit 1
- }
- }
- ' "${target}" > "${tmpfile}"; then
- # AWK SUCCEEDED (exit code 0): The pattern was found and edited.
- # This is to avoid gawk's `-i inplace` option which users complain about.
- mv "${tmpfile}" "${target}"
- else
- # AWK FAILED (exit code 1): The pattern was not found.
- rm -f "${tmpfile}"
- die "Awk patch failed: Pattern not found in ${target}."
- fi
-}
-
-src_prepare() {
- # Calling this here supports resumption via FEATURES=keepwork
- python_setup
-
- # We'll fill this in as we go. Patches go in chromium-patches.
- local PATCHES=()
-
- rm "${WORKDIR}/chromium-patches-${PATCH_V}/common/cr131-unbundle-icu-target.patch"
- if ver_test "${RUST_SLOT}" -ge "1.95.0"; then
- sed -i '/SupportedLaneCount/d' third_party/rust/chromium_crates_io/vendor/bytemuck-v1/src/zeroable.rs || die
- sed -i '/SupportedLaneCount/d' third_party/rust/chromium_crates_io/vendor/bytemuck-v1/src/pod.rs || die
- fi
-
- sed -i '/no-lifetime-safety-inference/d' third_party/dawn/src/utils/BUILD.gn || die
- sed -i '/no-experimental-lifetime-safety-tu-analysis/d' third_party/dawn/src/utils/BUILD.gn || die
-
- PATCHES+=(
- "${WORKDIR}/chromium-patches-${PATCH_V}/common/"
- "${FILESDIR}/restore-x86-r4.patch"
- "${FILESDIR}/chromium-151-cbor-fix.patch"
- "${FILESDIR}/chromium-152-ffmpeg-fix.patch"
- "${FILESDIR}/chromium-152-unbundle-minizip-undo-unicode.patch"
- )
-
- # So many fontconfig magic numbers to cover
- # TODO: once upstream roll to 2.18.2+ set that as our minimum and remove this logic.
- # <=2.17.1 -> 9
- # >2.17.1 && <2.18.2 -> 11
- # >=2.18.2 -> 12
- local fontconfig_cache_magic=9
- if has_version ">=media-libs/fontconfig-2.18.2"; then
- fontconfig_cache_magic=12
- elif has_version ">media-libs/fontconfig-2.17.1"; then
- fontconfig_cache_magic=11
- fi
-
- sed -E -i \
- -e "s#(fb5c91b2895aa445d23aebf7f9e2189c-le64\.cache-)(9|10|11|12)#\1${fontconfig_cache_magic}#g" \
- third_party/test_fonts/fontconfig/BUILD.gn || die "Failed to set fontconfig cache magic in BUILD.gn"
-
- #cp -f ${WORKDIR}/chromium-patches-${PATCH_V}/*-compiler.patch "${T}/compiler.patch"
- ##cp -f ${FILESDIR}/chromium-147-compiler.patch "${T}/compiler.patch"
- #if ! use custom-cflags; then #See #25 #92
- # sed -i '/default_stack_frames/Q' "${T}/compiler.patch" || die
- #fi
-
- sed -E -i \
- -e "s#(kCacheKey \+ \"/-le64\.cache-)(9|10|11|12)(\")#\1${fontconfig_cache_magic}\3#g" \
- -e "s#(kCacheKey \+ \"-le64\.cache-)(9|10|11|12)(\")#\1${fontconfig_cache_magic}\3#g" \
- third_party/test_fonts/fontconfig/generate_fontconfig_caches.cc || \
- die "Failed to set fontconfig cache magic in generate_fontconfig_caches.cc"
-
- if use bundled-toolchain; then
- # We need to symlink the toolchain into the expected location
- einfo "Symlinking Clang toolchain to expected location ..."
- mkdir -p third_party/llvm-build/ || die "Failed to create llvm-build directory"
- # the 'Chromium Linux Tarballs' seem to already have 'Release+Asserts/{lib,bin}'; not sure if this is an
- # upstream change - we're using the same scripts to build, theoretically. We'll still attempt to create
- # llvm-build, but we'll rm Release+Asserts and symlink directly.
- if [[ -d third_party/llvm-build/Release+Asserts ]]; then
- rm -r third_party/llvm-build/Release+Asserts || die "Failed to remove third_party/llvm-build/Release+Asserts"
- fi
- ln -s "${WORKDIR}"/clang third_party/llvm-build/Release+Asserts || die "Failed to bundle Clang"
- einfo "Symlinking Rust toolchain to expected location ..."
- # As above, so below
- if [[ -d third_party/rust-toolchain ]]; then
- rm -r third_party/rust-toolchain || die "Failed to remove third_party/rust-toolchain"
- fi
- ln -s "${WORKDIR}"/rust-toolchain third_party/rust-toolchain || die "Failed to bundle rust"
- cp "${WORKDIR}"/rust-toolchain/VERSION \
- "${WORKDIR}"/rust-toolchain/INSTALLED_VERSION || die "Failed to set rust version"
- else
- # We don't need our toolchain patches if we're using the official toolchain
-
- # Copium patches go here.
- PATCHES+=(
- "${WORKDIR}/copium/cr143-libsync-__BEGIN_DECLS.patch"
- )
-
- # Automate conditional application of chromium-patches
- # The directory structure is expected to be something like:
- # chromium-patches-145/
- # ├── toolchain/
- # │ ├── cr123-foo.patch
- # │ └── cr135-bar.patch
- # ├── llvm/
- # │ ├── cr144-baz.patch
- # │ └── lt-23/
- # │ └── cr145-bleeding-edge-llvm-feature.patch
- # Where `lt-23` means "apply this patch if the LLVM version is less than 23".
- # Only categories in `slot_map` will be checked for version constraints.
- shopt -s nullglob
- local -A slot_map=( [llvm]="${LLVM_SLOT}" [rust]="${RUST_SLOT}" )
-
- for category in "${WORKDIR}/chromium-patches-${PATCH_V}"/*/; do
- local category_name="${category%/}"
- category_name="${category_name##*/}"
-
- # Skip arch-specific categories
- if [[ "${category_name}" == "ppc64le" ]]; then
- use ppc64 || continue
- fi
-
- # We applied common patches above, no need to apply them again here
- [[ "${category_name}" == "common" ]] && continue
-
- # Unconditional patches for this category
- local category_patches=( "${category}"*.patch )
- [[ ${#category_patches[@]} -gt 0 ]] && PATCHES+=( "${category}" )
-
- # Version-constrained subdirectories (e.g., llvm/lt-23/)
- for constraint_dir in "${category}"*/; do
- local dir_name="${constraint_dir%/}"
- dir_name="${dir_name##*/}"
- if [[ "${dir_name}" =~ ^lt-(.*)$ && -v slot_map[${category_name}] ]]; then
- ver_test "${slot_map[${category_name}]}" -lt "${BASH_REMATCH[1]}" &&
- PATCHES+=( "${constraint_dir}" )
- fi
- done
- done
-
- shopt -u nullglob
-
- # Strictly speaking this doesn't need to be gated (no bundled toolchain for ppc64); it keeps the logic together
- if use ppc64; then
- local patchset_dir="${WORKDIR}/openpower-patches-${PPC64_HASH}/patches"
- # patch causes build errors on 4K page systems (https://bugs.gentoo.org/show_bug.cgi?id=940304)
- local page_size_patch="ppc64le/third_party/use-sysconf-page-size-on-ppc64.patch"
- local isa_3_patch="ppc64le/core/baseline-isa-3-0.patch"
- # Apply the OpenPOWER patches (check for page size and isa 3.0)
- openpower_patches=( $(grep -E "^ppc64le|^upstream" "${patchset_dir}/series" | grep -v "${page_size_patch}" |
- grep -v "${isa_3_patch}" || die) )
- for patch in "${openpower_patches[@]}"; do
- PATCHES+=( "${patchset_dir}/${patch}" )
- done
- if [[ $(getconf PAGESIZE) == 65536 ]]; then
- PATCHES+=( "${patchset_dir}/${page_size_patch}" )
- fi
- # We use vsx3 as a proxy for 'want isa3.0' (POWER9)
- if use cpu_flags_ppc_vsx3 ; then
- PATCHES+=( "${patchset_dir}/${isa_3_patch}" )
- fi
- fi
-
- remove_compiler_builtins
-
- # We can't rely on the eselect'd Rust to actually include rustfmt, so we'll point to the selected slot specifically.
- local suffix=""
- if [[ "${RUST_TYPE}" == "binary" ]]; then
- suffix="-bin-${RUST_SLOT}"
- else
- suffix="-${RUST_SLOT}"
- fi
- sed -i "s|/bin/rustfmt|/bin/rustfmt${suffix}|g" build/rust/rust_bindgen_generator.gni ||
- die "Failed to update rustfmt path"
-
- fi
-
- # Do this before we apply patches since (e.g.) ppc64 needs to patch rollup and it's easier in ${S}
- einfo "Moving rollup wasm-node package into place ..."
- mkdir -p third_party/devtools-frontend/src/node_modules/@rollup/wasm-node ||
- die "Failed to create node_modules/@rollup/wasm-node"
- mv "${WORKDIR}"/package/* third_party/devtools-frontend/src/node_modules/@rollup/wasm-node ||
- die "Failed to move rollup package"
-
- if [ ! -z "${CHROMIUM_COMMITS[*]}" ]; then
- # for i in "${CHROMIUM_COMMITS[@]}"; do
- for i in "${!CHROMIUM_COMMITS[@]}"; do
- if [[ ${CHROMIUM_COMMITS[$i]} =~ webrtc ]]; then
- patch_prefix="webrtc"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ angle ]]; then
- patch_prefix="angle"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ quiche ]]; then
- patch_prefix="quiche"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ dawn ]]; then
- patch_prefix="dawn"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ perfetto ]]; then
- patch_prefix="perfetto"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ink ]]; then
- patch_prefix="ink"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ vulkan-utility-libraries ]]; then
- patch_prefix="vulkan-utility-libraries"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ruy ]]; then
- patch_prefix="ruy"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ devtools-frontend ]]; then
- patch_prefix="devtools-frontend"
- else
- patch_prefix="chromium"
- fi
- pushd "${CHROMIUM_COMMITS[$i]}" > /dev/null || die
- if [[ $i = -* ]]; then
- einfo "Reverting ${patch_prefix}-${i/-}.patch"
- git_wrapper apply -R --exclude="*unittest.cc" --exclude="DEPS" \
- -p1 < "${DISTDIR}/${patch_prefix}-${i/-}.patch"
- else
- einfo "Applying ${patch_prefix}-${i/-}.patch"
- git_wrapper apply --exclude="*unittest.cc" --exclude="DEPS" \
- -p1 < "${DISTDIR}/${patch_prefix}-${i/-}.patch"
- fi
- popd > /dev/null || die
- done
- fi
-
- if ! use bluetooth ; then
- PATCHES+=(
- "${FILESDIR}/disable-bluez-r7.patch"
- )
- fi
-
- if use convert-dict ; then
- PATCHES+=(
- "${FILESDIR}/chromium-ucf-dict-utility-r3.patch"
- )
- fi
-
- if ! use libcxx ; then
- PATCHES+=(
- "${FILESDIR}/fix-wayland-oncecallback-copy.patch"
- )
- fi
-
- if use system-ffmpeg; then
- PATCHES+=(
- "${FILESDIR}/chromium-141-opus-mp3.patch"
- "${FILESDIR}/chromium-135-hevc.patch"
- )
- sed -i "\!AVFMT_FLAG_NOH264PARSE!d" media/filters/ffmpeg_glue.cc || die
- ewarn "You need to expose \"av_stream_get_first_dts\" in ffmpeg via user patch"
- fi
-
- if use system-av1; then
- PATCHES+=(
- "${FILESDIR}/chromium-system-av1.patch"
- )
- fi
-
- if use system-libvpx; then
- PATCHES+=(
- "${FILESDIR}/chromium-system-libvpx.patch"
- )
- fi
-
- if use system-openjpeg ; then
- PATCHES+=(
- "${FILESDIR}/chromium-system-openjpeg-r4.patch"
- )
- fi
-
- # if use x86 ; then
- # #* Fixes a segfault in transport_security_state_generator
- # PATCHES+=(
- # "${FILESDIR}/fix-segfault-x86.patch"
- # )
- # fi
-
- # Testing all patches when NODIE is defined
- if [ ! -z "${NODIE}" ]; then
- for i in "${PATCHES[@]}"; do
- eapply_wrapper "$i"
- done
- nonfatal eapply_user
- else
- default
- fi
-
- if use cromite ; then
- BR_PA_PATH="${WORKDIR}/cromite-${CROMITE_COMMIT_ID}/build/patches"
-
- sed -i '/b\/components\/components_strings\.grd/,+10d' "${BR_PA_PATH}/Add-cromite-flags-support.patch" || die
- sed -i '/b\/chrome\/android\/java\/res\/xml\/privacy_preferences\.xml/,+13d' "${BR_PA_PATH}/Add-cromite-flags-support.patch" || die
- sed -i '/b\/android_webview\/support_library\/java\/src\/org\/chromium\/support_lib_glue/,+11d' "${BR_PA_PATH}/Client-hints-overrides.patch" || die
- sed -i '/webapps_strings.grdp" \/>/{s++webapps_strings.grdp" /><part file="cromite_components_strings_grd/placeholder.txt"/>+;h};${x;/./{x;q0};x;q1}' \
- components/components_strings.grd || die
-
- sed -i 's/absl::/std::/' "${BR_PA_PATH}/Add-a-proxy-configuration-page.patch" || die
-
- filterdiff -p1 "${BR_PA_PATH}/JIT-site-settings.patch" --exclude="content/browser/renderer_host/render_process_host_impl.cc" \
- > "${BR_PA_PATH}/JIT-site-settings.patch1"
- mv -f "${BR_PA_PATH}/JIT-site-settings.patch1" "${BR_PA_PATH}/JIT-site-settings.patch"
-
- BROMITE_PATCHES=(
- "${BR_PA_PATH}/bromite-build-utils.patch"
- "${BR_PA_PATH}/Battery-API-return-nothing.patch"
- "${BR_PA_PATH}/Multiple-fingerprinting-mitigations.patch"
- "${BR_PA_PATH}/Add-flag-to-configure-maximum-connections-per-host.patch"
- "${BR_PA_PATH}/Add-a-proxy-configuration-page.patch"
- "${BR_PA_PATH}/Enable-StrictOriginIsolation-and-SitePerProcess.patch"
- "${BR_PA_PATH}/Disable-requests-for-single-word-Omnibar-searches.patch"
- "${BR_PA_PATH}/Reduce-HTTP-headers-in-DoH-requests-to-bare-minimum.patch"
- "${BR_PA_PATH}/Client-hints-overrides.patch"
- "${BR_PA_PATH}/Disable-idle-detection.patch"
- "${BR_PA_PATH}/Disable-TLS-resumption.patch"
- "${BR_PA_PATH}/Remove-navigator.connection-info.patch"
-
- "${BR_PA_PATH}/AudioBuffer-AnalyserNode-fp-mitigations.patch"
- "${BR_PA_PATH}/Fonts-fingerprinting-mitigation.patch"
- "${BR_PA_PATH}/Content-settings-infrastructure.patch"
- "${BR_PA_PATH}/Add-autoplay-site-setting.patch"
- "${BR_PA_PATH}/Site-setting-for-images.patch"
- "${BR_PA_PATH}/JIT-site-settings.patch"
- "${BR_PA_PATH}/Add-webGL-site-setting.patch"
- "${BR_PA_PATH}/Add-webRTC-site-settings.patch"
- "${BR_PA_PATH}/Show-site-settings-for-cookies-javascript-and-ads.patch"
- "${BR_PA_PATH}/Viewport-Protection-flag.patch"
- "${BR_PA_PATH}/Revert-remove-allowscript-content-setting-secondary-url.patch"
- "${BR_PA_PATH}/Timezone-customization.patch"
- "${BR_PA_PATH}/Disable-speechSynthesis-getVoices-API.patch"
- "${BR_PA_PATH}/Remove-support-for-device-memory-and-cpu-recovery.patch"
- "${BR_PA_PATH}/Disable-Feeback-Collector.patch"
- "${BR_PA_PATH}/Disable-remote-altsvc-for-h3-connections.patch"
- "${BR_PA_PATH}/Add-cromite-flags-support.patch"
- "${BR_PA_PATH}/Enables-deactivation-of-the-js-debugger-statement.patch"
- )
- for i in "${BROMITE_PATCHES[@]}"; do
- if [[ "$i" =~ "Add-autoplay-site-setting.patch" ]] ||
- [[ "$i" =~ "JIT-site-settings.patch" ]] ||
- [[ "$i" =~ "Site-setting-for-images.patch" ]]; then
- einfo "Git binary patch: ${i##*/}"
- git_wrapper apply -p1 < "$i"
- else
- filter_wrapper "$i" --exclude="chrome/android/*"
- fi
- done
-
- #! conflicting patches
- sed -i '/browser_features.cc/,+17d' \
- "${UGC_WD}/patches/extra/ungoogled-chromium/add-flag-to-clear-data-on-exit.patch" || die
- sed -i 's$} // namespace features$BASE_FEATURE(kClearDataOnExit, "ClearDataOnExit", base::FEATURE_DISABLED_BY_DEFAULT);}$' \
- chrome/browser/browser_features.cc || die
- sed -i 's$} // namespace features$BASE_DECLARE_FEATURE(kClearDataOnExit);}$' \
- chrome/browser/browser_features.h || die
- sed -i 's$kChromeUIAboutHost,$kChromeUIAboutHost,"ungoogled-first-run",$' \
- chrome/common/webui_url_constants.cc || die
- sed -i '/chrome\/common\/webui_url_constants.cc/Q' \
- "${UGC_WD}/patches/extra/ungoogled-chromium/first-run-page.patch" || die
-
- #! normalise paths in py
- sed -i 's$os.path.dirname(include_file)$os.path.abspath(os.path.dirname(include_file))$' \
- build/bromite/gyp/cpp_bromite_include.py || die
- fi
-
- # if [[ ${LLVM_SLOT} == "19" ]]; then
- # # Upstream now hard depend on a feature that was added in LLVM 20.1, but we don't want to stabilise that yet.
- # # Do the temp file shuffle in case someone is using something other than `gawk`
- # {
- # awk '/config\("clang_warning_suppression"\) \{/ { print $0 " }"; sub(/clang/, "xclang"); print; next }
- # { print }' build/config/compiler/BUILD.gn > "${T}/build.gn" && \
- # mv "${T}/build.gn" build/config/compiler/BUILD.gn
- # } || die "Unable to disable warning suppression"
- # fi
-
- ## Not included in -lite tarballs, but we should check for it anyway.
- #if [[ -f third_party/node/linux/node-linux-x64/bin/node ]]; then
- # rm third_party/node/linux/node-linux-x64/bin/node || die
- #else
- # mkdir -p third_party/node/linux/node-linux-x64/bin || die
- #fi
- #ln -s "${EPREFIX}"/usr/bin/node third_party/node/linux/node-linux-x64/bin/node || die
-
- cp "${FILESDIR}/libusb.gn" build/linux/unbundle || die
- sed -i '/^REPLACEMENTS.*$/{s++REPLACEMENTS = {"libusb":"third_party/libusb/BUILD.gn",+;h};${x;/./{x;q0};x;q1}' \
- build/linux/unbundle/replace_gn_files.py || die
- sed -i '/^.*deps.*third_party\/jsoncpp.*$/{s++public_deps \+= [ "//third_party/jsoncpp" ]+;h};${x;/./{x;q0};x;q1}' \
- third_party/webrtc/rtc_base/BUILD.gn || die
-
- if use override-data-dir; then
- sed -i '/"chromium";/{s++"ungoogled-chromium";+;h};${x;/./{x;q0};x;q1}' \
- chrome/common/chrome_paths_linux.cc || die
- fi
-
- if use system-abseil-cpp; then
- eapply_wrapper "${FILESDIR}/chromium-147-system-abseil.patch"
-
- #! SFINAE mangling incompatibility between clang and gcc:
- #! https://github.com/llvm/llvm-project/issues/85656
- #! gcc: _ZN4absl12lts_202601074CordC1INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELi0EEEOT_
- #! clang: _ZN4absl12lts_202601074CordC1INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEETnNSt9enable_ifIXsr3std7is_sameIT_S8_EE5valueEiE4typeELi0EEEOSA_
- #! So, either this:
- eapply_wrapper "${FILESDIR}/chromium-141-system-abseil-cord.patch"
- #! or build with -fclang-abi-compat=17
-
- # cp -f /usr/include/absl/base/options.h third_party/abseil-cpp/absl/base/options.h
- # sed -i '/^#define ABSL_OPTION_USE_STD_ORDERING.*$/{s++#define ABSL_OPTION_USE_STD_ORDERING 1+;h};${x;/./{x;q0};x;q1}' \
- # third_party/abseil-cpp/absl/base/options.h || die
- fi
-
- #* Applying UGC PRs here
- if [ ! -z "${UGC_PR_COMMITS[*]}" ]; then
- pushd "${UGC_WD}" >/dev/null
- for i in "${UGC_PR_COMMITS[@]}"; do
- eapply_wrapper "${DISTDIR}/${PN}-$i.patch"
- done
- popd >/dev/null
- fi
-
- # From here we adapt ungoogled-chromium's patches to our needs
- local ugc_pruning_list="${UGC_WD}/pruning.list"
- local ugc_patch_series="${UGC_WD}/patches/series"
- local ugc_substitution_list="${UGC_WD}/domain_substitution.list"
-
- local ugc_unneeded=(
- # GN bootstrap
- extra/debian/gn/parallel
- # following Gentoo's Chromium
- core/ungoogled-chromium/build-with-wasm-rollup
- )
-
- if use cromite ; then
- einfo "Using fingerprinting patches from Cromite instead"
- ugc_unneeded+=(
- extra/bromite/fingerprinting-flags-client-rects-and-measuretext
- extra/bromite/flag-max-connections-per-host
- extra/bromite/flag-fingerprinting-canvas-image-data-noise
- extra/ungoogled-chromium/add-components-ungoogled
- extra/ungoogled-chromium/remove-pac-size-limit
- )
- fi
-
- # #* Temporary fix
- # sed -i "\!ios/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/icu/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/libjpeg_turbo/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/snappy/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/closure_compiler/!d" "${ugc_pruning_list}" || die
-
- # #* Didn't unpack them at the first place
- # sed -i "\!build/linux/debian_bullseye_i386-sysroot!d" "${ugc_pruning_list}" || die
- # sed -i "\!build/linux/debian_bullseye_amd64-sysroot!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/llvm-build!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/node/linux!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/rust-src!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/rust-toolchain!d" "${ugc_pruning_list}" || die
- # if ! use libcxx ; then
- # sed -i "\!third_party/libc!d" "${ugc_pruning_list}" || die
- # fi
- sed -i "s|debug('files|error('files|" \
- "${UGC_WD}/utils/prune_binaries.py" || die
- sed -i "\!third_party/node/linux!d" \
- "${UGC_WD}/utils/prune_binaries.py" || die
-
- local ugc_p ugc_dir
- for p in "${ugc_unneeded[@]}"; do
- einfo "Removing ${p}.patch"
- sed -i "\!${p}.patch!d" "${ugc_patch_series}" || die
- done
-
- if [ ! -z "${UGC_SKIP_PATCHES}" ]; then
- for p in ${UGC_SKIP_PATCHES}; do
- ewarn "Removing ${p}"
- sed -i "\!${p}!d" "${ugc_patch_series}" || die
- done
- fi
-
- if [ ! -z "${UGC_KEEP_BINARIES}" ]; then
- for p in ${UGC_KEEP_BINARIES}; do
- ewarn "Keeping binary ${p}"
- sed -i "\!${p}!d" "${ugc_pruning_list}" || die
- done
- fi
-
- if [ ! -z "${UGC_SKIP_SUBSTITUTION}" ]; then
- for p in ${UGC_SKIP_SUBSTITUTION}; do
- ewarn "No substitutions in ${p}"
- sed -i "\!${p}!d" "${ugc_substitution_list}" || die
- done
- fi
-
- ebegin "Pruning binaries"
- "${UGC_WD}/utils/prune_binaries.py" -q . "${UGC_WD}/pruning.list"
- eend $? || die
-
- ebegin "Applying ungoogled-chromium patches"
- "${UGC_WD}/utils/patches.py" -q apply . "${UGC_WD}/patches"
- eend $? || die
-
- ebegin "Applying domain substitution"
- "${UGC_WD}/utils/domain_substitution.py" -q apply -r "${UGC_WD}/domain_regex.list" -f "${UGC_WD}/domain_substitution.list" .
- eend $? || die
-
- # Sanity check esbuild version before we start removing files.
- # We _could_ patch the version check out - in theory esbuild upstream are being super conservative after
- # arch(AUR) packaged an `esbuild` binary and set ESBUILD_BINARY_PATH=/usr/bin/esbuild, causing much breakage,
- # but this is fine too and exactly matches what upstream are expecting.
- # https://github.com/evanw/esbuild/issues/2894
- local esbuild_js="${S}/third_party/devtools-frontend/src/node_modules/esbuild/lib/main.js"
- local found
- found=$(awk -F'"' '/if \(binaryVersion !==/ {print $2}' "${esbuild_js}")
- if [[ "${found}" != "${ESBUILD_VER}" ]]; then
- die "esbuild version mismatch: expected ${ESBUILD_VER}, found ${found}"
- fi
-
- elog "Removing bundled binaries from source tree ..."
- # Purge bundled ELF files: These are non-portable and will cause issues if used instead of system versions.
- # Use `--wasm` to also remove WebAssembly binaries, if desired - they're portable so shouldn't break builds.
- ${EPYTHON} "${FILESDIR}/bin-finder.py" --elf "${S}" | awk '{print $1}' | xargs rm -f ||
- die "Failed to remove bundled binaries"
-
- # And now we restore any that we actually need, from the host system
- local esbuild_path="${S}/third_party/devtools-frontend/src/third_party/esbuild"
- local -A restore_list=(
- ["/usr/bin/esbuild-${ESBUILD_VER}"]="${esbuild_path}/esbuild"
- ["/usr/bin/gperf"]="${S}/third_party/gperf/cipd/bin/gperf"
- ["/usr/bin/node"]="${S}/third_party/node/linux/node-linux-x64/bin/node"
- )
-
- for src in "${!restore_list[@]}"; do
- dst="${restore_list[${src}]}"
- if [[ -f "${src}" ]]; then
- einfo "Symlinking ${src} ..."
- # Make sure the parent dir exists; some tarballs don't include (e.g.) node's bindir
- mkdir -p "$(dirname "${dst}")" || die "Failed to create directory for ${dst}"
- ln -s "${src}" "${dst}" || die "Failed to symlink ${dst} from ${src}"
- if [[ ! -L "${dst}" || "$(readlink -f "${dst}")" != "${src}" ]]; then
- die "Symlink verification failed for ${dst} -> ${src}"
- fi
- else
- die "Expected to find ${src} to restore ${dst}, but it does not exist."
- fi
- done
-
- # adjust python interpreter version
- sed -i -e "s|\(^script_executable = \).*|\1\"${EPYTHON}\"|g" .gn || die
-
- # Use the system copy of hwdata's usb.ids
- sed 's|//third_party/usb_ids/src/usb.ids|/usr/share/hwdata/usb.ids|g' \
- -i services/device/public/cpp/usb/BUILD.gn || die "Failed to set system usb.ids path"
-
- # remove_bundled_libraries.py walks the source tree and looks for paths containing the substring 'third_party'
- # whitelist matches use the right-most matching path component, so we need to whitelist from that point down.
- local keeplibs=(
- base/third_party/cityhash
- )
- use system-double-conversion || keeplibs+=(
- base/third_party/double_conversion
- )
- keeplibs+=(
- base/third_party/icu
- base/third_party/nspr
- base/third_party/superfasthash
- base/third_party/symbolize
- base/third_party/xdg_user_dirs
- buildtools/third_party/libc++
- buildtools/third_party/libc++abi
- )
- use cromite && keeplibs+=(
- cromite_flags/third_party
- )
- keeplibs+=(
- net/third_party/mozilla_security_manager
- net/third_party/quic
- net/third_party/uri_template
- )
- use system-abseil-cpp || keeplibs+=(
- third_party/abseil-cpp
- )
- keeplibs+=(
- third_party/angle
- third_party/angle/src/common/third_party/xxhash
- third_party/angle/src/third_party/ceval
- )
- use nvidia || keeplibs+=(
- third_party/angle/src/third_party/libXNVCtrl
- )
- keeplibs+=(
- third_party/angle/src/third_party/volk
- third_party/anonymous_tokens
- third_party/apple_apsl
- third_party/axe-core
- third_party/bidimapper
- third_party/blink
- third_party/boringssl
- third_party/boringssl/src/third_party/fiat
- third_party/breakpad
- third_party/breakpad/breakpad/src/third_party/curl
- )
- use system-brotli || keeplibs+=(
- third_party/brotli
- )
- keeplibs+=(
- third_party/catapult
- third_party/catapult/common/py_vulcanize/third_party/rcssmin
- third_party/catapult/common/py_vulcanize/third_party/rjsmin
- third_party/catapult/third_party/beautifulsoup4-4.9.3
- third_party/catapult/third_party/html5lib-1.1
- third_party/catapult/third_party/polymer
- third_party/catapult/third_party/six
- third_party/catapult/third_party/typ
- third_party/catapult/tracing/third_party/d3
- third_party/catapult/tracing/third_party/gl-matrix
- third_party/catapult/tracing/third_party/jpeg-js
- third_party/catapult/tracing/third_party/jszip
- third_party/catapult/tracing/third_party/mannwhitneyu
- third_party/catapult/tracing/third_party/oboe
- third_party/catapult/tracing/third_party/pako
- third_party/ced
- third_party/cld_3
- third_party/closure_compiler
- )
- use libcxx && keeplibs+=(
- third_party/compiler-rt
- )
- keeplibs+=(
- third_party/content_analysis_sdk
- third_party/cpuinfo
- third_party/crabbyavif
- third_party/crashpad
- third_party/crashpad/crashpad/third_party/lss
- third_party/crashpad/crashpad/third_party/zlib
- )
- use system-crc32c || keeplibs+=(
- third_party/crc32c
- )
- keeplibs+=(
- third_party/cros_system_api
- third_party/d3
- third_party/dawn
- third_party/dawn/third_party/gn/webgpu-cts
- third_party/dawn/third_party/OpenGL-Registry
- third_party/dawn/third_party/renderdoc
- third_party/dawn/third_party/webgpu-headers
- third_party/depot_tools
- third_party/devscripts
- third_party/devtools-frontend
- third_party/devtools-frontend/src/front_end/third_party/acorn
- third_party/devtools-frontend/src/front_end/third_party/additional_readme_paths.json
- third_party/devtools-frontend/src/front_end/third_party/axe-core
- third_party/devtools-frontend/src/front_end/third_party/chromium
- third_party/devtools-frontend/src/front_end/third_party/codemirror
- third_party/devtools-frontend/src/front_end/third_party/csp_evaluator
- third_party/devtools-frontend/src/front_end/third_party/diff
- third_party/devtools-frontend/src/front_end/third_party/i18n
- third_party/devtools-frontend/src/front_end/third_party/intl-messageformat
- third_party/devtools-frontend/src/front_end/third_party/json5
- third_party/devtools-frontend/src/front_end/third_party/legacy-javascript
- third_party/devtools-frontend/src/front_end/third_party/lighthouse
- third_party/devtools-frontend/src/front_end/third_party/lit
- third_party/devtools-frontend/src/front_end/third_party/marked
- third_party/devtools-frontend/src/front_end/third_party/puppeteer
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/third_party/mitt
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/third_party/parsel-js
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/third_party/rxjs
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/third_party/urlpattern-polyfill
- third_party/devtools-frontend/src/front_end/third_party/source-map-scopes-codec
- third_party/devtools-frontend/src/front_end/third_party/third-party-web
- third_party/devtools-frontend/src/front_end/third_party/vscode.web-custom-data
- third_party/devtools-frontend/src/front_end/third_party/wasmparser
- third_party/devtools-frontend/src/front_end/third_party/web-vitals
- third_party/devtools-frontend/src/third_party
- third_party/dom_distiller_js
- third_party/dragonbox
- third_party/eigen3
- third_party/emoji-segmenter
- third_party/farmhash
- third_party/fast_float
- third_party/fdlibm
- third_party/federated_compute/chromium/fcp/confidentialcompute
- third_party/federated_compute/chromium/fcp/protos
- third_party/federated_compute/chromium/fcp/secagg
- third_party/federated_compute/chromium/fcp/client
- third_party/federated_compute/src/fcp/base
- third_party/federated_compute/src/fcp/confidentialcompute
- third_party/federated_compute/src/fcp/protos
- third_party/federated_compute/src/fcp/client
- third_party/federated_compute/src/fcp/secagg
- third_party/federated_compute/third_party/googleapis/src/google
- third_party/federated_compute/third_party/tensorflow-federated
- third_party/federated_compute/third_party/protodatastore-cpp
- third_party/fft2d
- third_party/flatbuffers
- third_party/fp16
- third_party/freetype
- third_party/fusejs
- third_party/fxdiv
- third_party/gemmlowp
- third_party/google_input_tools
- third_party/google_input_tools/third_party/closure_library
- third_party/google_input_tools/third_party/closure_library/third_party/closure
- third_party/googletest
- third_party/gperf # We symlink system gperf, but this will purge the symlink since we tidy up afterwards.
- third_party/highway
- third_party/hunspell
- third_party/hyphenation-patterns
- third_party/ink/src/ink/brush
- third_party/ink/src/ink/color
- third_party/ink/src/ink/geometry
- third_party/ink/src/ink/rendering
- third_party/ink/src/ink/rendering/skia/common_internal
- third_party/ink/src/ink/rendering/skia/native
- third_party/ink/src/ink/rendering/skia/native/internal
- third_party/ink/src/ink/strokes
- third_party/ink/src/ink/types
- third_party/inspector_protocol
- third_party/ipcz
- third_party/jinja2
- )
- use system-jsoncpp || keeplibs+=(
- third_party/jsoncpp
- )
- keeplibs+=(
- third_party/khronos
- third_party/lens_server_proto
- third_party/leveldatabase
- third_party/libaddressinput
- third_party/libdrm
- third_party/libgav1
- third_party/libjingle
- third_party/libpfm4
- third_party/libphonenumber
- third_party/libpng
- third_party/libsecret
- third_party/libsrtp
- third_party/libsync
- third_party/libtess2/libtess2
- third_party/libtess2/src/Include
- third_party/libtess2/src/Source
- third_party/liburlpattern
- )
- use system-libusb || keeplibs+=(
- third_party/libusb
- )
- keeplibs+=(
- third_party/libva_protected_content
- )
- use system-libvpx || keeplibs+=(
- third_party/libvpx
- third_party/libvpx/source/libvpx/third_party/x86inc
- )
- keeplibs+=(
- third_party/libwebm
- third_party/libx11
- third_party/libxcb-keysyms
- third_party/libxml/chromium
- third_party/libyuv
- third_party/libzip
- third_party/lit
- )
- use libcxx && keeplibs+=(
- third_party/llvm-libc
- third_party/llvm-libc/src/shared/
- )
- keeplibs+=(
- third_party/lottie
- third_party/lss
- third_party/lzma_sdk
- third_party/mako
- third_party/markupsafe
- third_party/material_color_utilities
- third_party/metrics_proto
- third_party/minigbm
- third_party/ml_dtypes
- third_party/modp_b64
- third_party/nasm
- third_party/nearby
- third_party/neon_2_sse
- third_party/node
- third_party/oak/chromium/proto
- third_party/oak/chromium/proto/attestation
- third_party/omnibox_proto
- third_party/one_euro_filter
- third_party/openscreen
- third_party/openscreen/src/third_party/
- third_party/openscreen/src/third_party/tinycbor/src/src
- third_party/ots
- third_party/pdfium
- third_party/pdfium/third_party/agg23
- third_party/pdfium/third_party/bigint
- third_party/pdfium/third_party/freetype
- third_party/pdfium/third_party/lcms
- )
- use system-openjpeg || keeplibs+=(
- third_party/pdfium/third_party/libopenjpeg
- )
- keeplibs+=(
- third_party/pdfium/third_party/libtiff
- third_party/perfetto
- third_party/perfetto/protos/third_party/android
- third_party/perfetto/protos/third_party/chromium
- third_party/perfetto/protos/third_party/pprof
- third_party/perfetto/protos/third_party/primes
- third_party/perfetto/protos/third_party/simpleperf
- third_party/pffft
- third_party/ply
- third_party/polymer
- third_party/private_membership
- third_party/private-join-and-compute
- third_party/protobuf
- third_party/protobuf/third_party/utf8_range
- third_party/pthreadpool
- third_party/puffin
- third_party/pyjson5
- third_party/pyyaml
- third_party/rapidhash
- third_party/readability
- third_party/rnnoise
- third_party/rust
- third_party/ruy
- third_party/s2cellid
- third_party/search_engines_data
- third_party/securemessage
- third_party/selenium-atoms
- third_party/sentencepiece
- third_party/sentencepiece/src/third_party/darts_clone
- third_party/shell-encryption
- third_party/simdutf
- third_party/simplejson
- third_party/six
- third_party/skia
- third_party/skia/include/third_party/vulkan
- third_party/smhasher
- )
- use system-snappy || keeplibs+=(
- third_party/snappy
- )
- keeplibs+=(
- third_party/spirv-headers
- third_party/spirv-tools
- third_party/sqlite
- third_party/swiftshader
- third_party/swiftshader/third_party/astc-encoder
- third_party/swiftshader/third_party/llvm-subzero
- third_party/swiftshader/third_party/marl
- third_party/swiftshader/third_party/SPIRV-Headers/include/spirv
- third_party/swiftshader/third_party/SPIRV-Tools
- third_party/swiftshader/third_party/subzero
- third_party/tensorflow_models
- third_party/tensorflow-text
- third_party/tflite
- third_party/tflite/src/third_party/fft2d
- third_party/tflite/src/third_party/xla/third_party/tsl
- third_party/tflite/src/third_party/xla/xla/tsl/framework
- third_party/tflite/src/third_party/xla/xla/tsl/lib/random
- third_party/tflite/src/third_party/xla/xla/tsl/platform
- third_party/tflite/src/third_party/xla/xla/tsl/protobuf
- third_party/tflite/src/third_party/xla/xla/tsl/util
- third_party/ukey2
- third_party/utf
- third_party/vulkan
- third_party/wayland
- third_party/webdriver
- third_party/webgpu-cts
- third_party/webrtc
- third_party/webrtc/common_audio/third_party/ooura
- third_party/webrtc/common_audio/third_party/spl_sqrt_floor
- third_party/webrtc/modules/third_party/fft
- third_party/webrtc/modules/third_party/g711
- third_party/webrtc/modules/third_party/g722
- third_party/widevine
- )
- use system-woff2 || keeplibs+=(
- third_party/woff2
- )
- keeplibs+=(
- third_party/wuffs
- third_party/x11proto
- third_party/xcbproto
- third_party/xnnpack
- third_party/zlib/google
- third_party/zxcvbn-cpp
- url/third_party/mozilla
- v8/third_party/inspector_protocol
- v8/third_party/rapidhash-v8
- v8/third_party/siphash
- v8/third_party/utf8-decoder
- v8/third_party/v8
- v8/third_party/valgrind
-
- # gyp -> gn leftovers
- third_party/speech-dispatcher
- third_party/usb_ids
- )
-
- if use test; then
- keeplibs+=(
- third_party/breakpad/breakpad/src/processor
- third_party/fuzztest
- third_party/google_benchmark/src/include/benchmark
- third_party/google_benchmark/src/src
- third_party/test_fonts
- third_party/test_fonts/fontconfig
- third_party/test_fonts/test_fonts
- )
- fi
-
- # USE=system-*
- if ! use system-harfbuzz; then
- keeplibs+=( third_party/harfbuzz )
- fi
-
- if ! use system-ffmpeg; then
- keeplibs+=( third_party/ffmpeg third_party/opus )
- fi
-
- if ! use system-icu; then
- keeplibs+=( third_party/icu )
- fi
-
- if ! use system-zstd; then
- keeplibs+=( third_party/zstd )
- fi
-
- if ! use system-av1; then
- keeplibs+=(
- third_party/dav1d
- third_party/libaom
- third_party/libaom/source/libaom/third_party/fastfeat
- third_party/libaom/source/libaom/third_party/vector
- third_party/libaom/source/libaom/third_party/x86inc
- )
- fi
-
- if use libcxx; then
- keeplibs+=(
- third_party/libc++
- third_party/llvm-libc
- )
- fi
-
- if ! use system-openh264; then
- keeplibs+=( third_party/openh264 )
- fi
-
- if ! use system-re2; then
- keeplibs+=( third_party/re2 )
- fi
-
- # Arch-specific
- if use arm64 || use ppc64 ; then
- keeplibs+=( third_party/swiftshader/third_party/llvm-10.0 )
- fi
- # we need to generate ppc64 stuff because upstream does not ship it yet
- # it has to be done before unbundling.
- if use ppc64; then
- pushd third_party/libvpx >/dev/null || die
- mkdir -p source/config/linux/ppc64 || die
- # requires git and clang, bug #832803
- # Revert https://chromium.googlesource.com/chromium/src/+/b463d0f40b08b4e896e7f458d89ae58ce2a27165%5E%21/third_party/libvpx/generate_gni.sh
- # and https://chromium.googlesource.com/chromium/src/+/71ebcbce867dd31da5f8b405a28fcb0de0657d91%5E%21/third_party/libvpx/generate_gni.sh
- # since we're not in a git repo
- sed -i -e "s|^update_readme||g; s|clang-format|${EPREFIX}/bin/true|g; /^git -C/d; /git cl/d; /cd \$BASE_DIR\/\$LIBVPX_SRC_DIR/ign format --in-place \$BASE_DIR\/BUILD.gn\ngn format --in-place \$BASE_DIR\/libvpx_srcs.gni" \
- generate_gni.sh || die
- ./generate_gni.sh || die
- popd >/dev/null || die
-
- pushd third_party/ffmpeg >/dev/null || die
- cp libavcodec/ppc/h264dsp.c libavcodec/ppc/h264dsp_ppc.c || die
- cp libavcodec/ppc/h264qpel.c libavcodec/ppc/h264qpel_ppc.c || die
- popd >/dev/null || die
- fi
-
- # Sanity check keeplibs, on major version bumps it is often necessary to update this list
- # and this enables us to hit them all at once.
- # There are some entries that need to be whitelisted (TODO: Why? The file is understandable, the rest seem odd)
- whitelist_libs=(
- net/third_party/quic
- third_party/devtools-frontend/src/front_end/third_party/additional_readme_paths.json
- third_party/libjingle
- third_party/mesa
- third_party/skia/third_party/vulkan
- third_party/vulkan
- )
- local not_found_libs=()
- for lib in "${keeplibs[@]}"; do
- if [[ ! -d "${lib}" ]] && ! has "${lib}" "${whitelist_libs[@]}"; then
- not_found_libs+=( "${lib}" )
- fi
- done
-
- if [[ ${#not_found_libs[@]} -gt 0 ]]; then
- ewarn "The following \`keeplibs\` directories were not found in the source tree:"
- for lib in "${not_found_libs[@]}"; do
- ewarn " ${lib}"
- done
- fi
-
- keeplibs+=( third_party/ungoogled )
-
- # Remove most bundled libraries. Some are still needed.
- einfo "Unbundling third-party libraries ..."
- build/linux/unbundle/remove_bundled_libraries.py "${keeplibs[@]}" --do-remove || die
-
- # Interferes with our bundled clang path; we don't want stripped binaries anyway.
- sed -i -e 's|${clang_base_path}/bin/llvm-strip|/bin/true|g' \
- -e 's|${clang_base_path}/bin/llvm-objcopy|/bin/true|g' \
- build/linux/strip_binary.gni || die
-}
-
-src_configure() {
- # Calling this here supports resumption via FEATURES=keepwork
- python_setup
-
- # 974899: sometimes people try to build with a non-Unicode locale and python gets very upset
- python_export_utf8_locale || die "Chromium builds require a UTF-8 locale."
-
- # Bug 491582.
- export TMPDIR="${WORKDIR}/temp"
- mkdir -p -m 755 "${TMPDIR}" || die
-
- # https://bugs.gentoo.org/654216
- addpredict /dev/dri/ #nowarn
-
- # Use system-provided libraries.
- # TODO: freetype -- remove sources (https://bugs.chromium.org/p/pdfium/issues/detail?id=733).
- # TODO: use_system_hunspell (upstream changes needed).
- # TODO: use_system_protobuf (bug #525560).
- # TODO: use_system_sqlite (http://crbug.com/22208).
-
- # libevent: https://bugs.gentoo.org/593458
- local gn_system_libraries=(
- flac
- fontconfig
- freetype
- libjpeg
- libwebp
- libxml
- libxslt
- zlib
- )
- if use system-abseil-cpp; then
- gn_system_libraries+=(
- absl_algorithm
- absl_base
- absl_cleanup
- absl_container
- absl_crc
- absl_debugging
- absl_flags
- absl_functional
- absl_hash
- absl_log
- absl_log_internal
- absl_memory
- absl_meta
- absl_numeric
- absl_random
- absl_status
- absl_strings
- absl_synchronization
- absl_time
- absl_types
- absl_utility
- )
- fi
- if use system-brotli; then
- gn_system_libraries+=( brotli )
- fi
- if use system-crc32c; then
- gn_system_libraries+=( crc32c )
- fi
- if use system-double-conversion; then
- gn_system_libraries+=( double-conversion )
- fi
- if use system-woff2; then
- gn_system_libraries+=( woff2 )
- fi
- if use nvidia; then
- gn_system_libraries+=( libXNVCtrl )
- fi
- if use system-ffmpeg; then
- gn_system_libraries+=( ffmpeg opus )
- fi
- if use system-jsoncpp; then
- gn_system_libraries+=( jsoncpp )
- fi
- if use system-icu; then
- gn_system_libraries+=( icu )
- fi
- if use system-zstd; then
- gn_system_libraries+=( zstd )
- fi
- if use system-av1; then
- gn_system_libraries+=( dav1d libaom )
- fi
- if use system-libusb; then
- gn_system_libraries+=( libusb )
- fi
- if use system-libvpx; then
- gn_system_libraries+=( libvpx )
- fi
- use system-openh264 && gn_system_libraries+=(
- openh264
- )
- use system-re2 && gn_system_libraries+=(
- re2
- )
- use system-snappy && gn_system_libraries+=(
- snappy
- )
-
- build/linux/unbundle/replace_gn_files.py --system-libraries "${gn_system_libraries[@]}" ||
- die "Failed to replace GN files for system libraries"
-
- # TODO 131: The above call clobbers `enable_freetype = true` in the freetype gni file
- # drop the last line, then append the freetype line and a new curly brace to end the block
- local freetype_gni="build/config/freetype/freetype.gni"
- sed -i -e '$d' ${freetype_gni} || die
- echo " enable_freetype = true" >> ${freetype_gni} || die
- echo "}" >> ${freetype_gni} || die
-
- if use !custom-cflags; then
- replace-flags "-Os" "-O2"
- strip-flags
- # Debug info section overflows without component build
- # Prevent linker from running out of address space, bug #471810 .
- filter-flags "-g*"
- # 949123: Several multimedia components explicitly build with specific CFLAGS and
- # use runtime detection to enable optimisations; unfortunately any of our CFLAGS are suffixed
- # to the end of the command line, which causes build failures.
- fi
- # Since M150 `skia` will begin breaking for x86_64 due to compilation of `avx512` code paths;
- # we need to filter these for all arches.
- filter-flags "-march*" "-mtune*" "-mcpu*"
-
- # We don't use the same clang version as upstream, and with -Werror
- # we need to make sure that we don't get superfluous warnings.
- append-flags -Wno-unknown-warning-option
- if tc-is-cross-compiler; then # can you cross-compile with the bundled toolchain?
- export BUILD_CXXFLAGS+=" -Wno-unknown-warning-option"
- export BUILD_CFLAGS+=" -Wno-unknown-warning-option"
- fi
-
- # Start building our GN options
- local myconf_gn=() # Tip: strings must be quoted, bools or numbers are fine
-
- if use !bundled-toolchain; then
- # We already forced the "correct" clang via pkg_setup
-
- if tc-is-cross-compiler; then
- CC="${CC} -target ${CHOST} --sysroot ${ESYSROOT}"
- CXX="${CXX} -target ${CHOST} --sysroot ${ESYSROOT}"
- BUILD_AR=${AR}
- BUILD_CC=${CC}
- BUILD_CXX=${CXX}
- BUILD_NM=${NM}
- fi
-
- # Make sure the build system will use the right tools, bug #340795.
- tc-export AR CC CXX NM
-
- strip-unsupported-flags
- append-ldflags -Wl,--undefined-version # https://bugs.gentoo.org/918897#c32
-
- myconf_gn+=(
- "is_clang=true"
- "clang_use_chrome_plugins=false"
- "use_clang_modules=false" # M141 enables this for the linux platform by default.
- 'custom_toolchain="//build/toolchain/linux/unbundle:default"'
- # From M127 we need to provide a location for libclang and the clang resource dir so that bindgen can find them
- "bindgen_libclang_path=\"$(get_llvm_prefix)/$(get_libdir)\""
- "bindgen_clang_resource_dir=\"${EPREFIX}/usr/lib/clang/${LLVM_SLOT}/include\""
- "bindgen_extra_clang_args=[\"-I${EPREFIX}/usr/lib/clang/${LLVM_SLOT}/include\"]"
- "clang_base_path=\"${EPREFIX}/usr/lib/clang/${LLVM_SLOT}/\""
- "rust_bindgen_root=\"${EPREFIX}/usr/\""
- "rust_sysroot_absolute=\"$(get_rust_prefix)\""
- "rustc_version=\"${RUST_SLOT}\""
- )
-
- # Currently disabled, runtime issues with mold
- #if tc-ld-is-mold; then
- # myconf_gn+=(
- # "use_mold=true"
- # "use_lld=false"
- # "linker_path=\"${EPREFIX}/usr/bin/mold\""
- # )
- #else
- myconf_gn+=( "use_lld=true" )
- #fi
-
- if [[ ${LLVM_SLOT} -lt 23 ]]; then
- # Workaround for -fsanitize-ignore-for-ubsan-feature (added in LLVM 23)
- myconf_gn+=( 'clang_has_ubsan_feature_ignore=false' )
- fi
-
- if ! tc-is-cross-compiler; then
- myconf_gn+=( 'host_toolchain="//build/toolchain/linux/unbundle:default"' )
- else
- tc-export BUILD_{AR,CC,CXX,NM}
- myconf_gn+=(
- 'host_toolchain="//build/toolchain/linux/unbundle:host"'
- 'v8_snapshot_toolchain="//build/toolchain/linux/unbundle:host"'
- "host_pkg_config=\"$(tc-getBUILD_PKG_CONFIG)\""
- "pkg_config=\"$(tc-getPKG_CONFIG)\""
- )
-
- # setup cups-config, build system only uses --libs option
- if use cups; then
- mkdir "${T}/cups-config" || die
- cp "${ESYSROOT}/usr/bin/${CHOST}-cups-config" "${T}/cups-config/cups-config" || die
- export PATH="${PATH}:${T}/cups-config"
- fi
-
- # Don't inherit PKG_CONFIG_PATH from environment
- local -x PKG_CONFIG_PATH=
- fi
-
- fi # !bundled-toolchain
-
- local myarch
- myarch="$(tc-arch)"
- case ${myarch} in
- amd64)
- # Bug 530248, 544702, 546984, 853646.
- use !custom-cflags && filter-flags -mno-mmx -mno-sse2 -mno-ssse3 -mno-sse4.1 \
- -mno-avx -mno-avx2 -mno-fma -mno-fma4 -mno-xop -mno-sse4a
- myconf_gn+=( 'target_cpu="x64"' )
- ;;
- x86)
- # Bug 530248, 544702, 546984, 853646.
- use !custom-cflags && filter-flags -mno-mmx -mno-sse2 -mno-ssse3 -mno-sse4.1 \
- -mno-avx -mno-avx2 -mno-fma -mno-fma4 -mno-xop -mno-sse4a
- myconf_gn+=( 'target_cpu="x86"' )
- ;;
- arm64)
- myconf_gn+=( 'target_cpu="arm64"' )
- ;;
- ppc64)
- myconf_gn+=( 'target_cpu="ppc64"' )
- ;;
- *)
- die "Failed to determine target arch, got '${myarch}'."
- ;;
- esac
-
- # Common options
-
- myconf_gn+=(
- # Disable code formating of generated files
- "blink_enable_generated_code_formatting=false"
- # enable DCHECK with USE=debug only, increases chrome binary size by 30%, bug #811138.
- # DCHECK is fatal by default, make it configurable at runtime, #bug 807881.
- "dcheck_always_on=$(usex debug true false)"
- "dcheck_is_configurable=$(usex debug true false)"
- # Chromium builds provided by Linux distros should disable the testing config
- "disable_fieldtrial_testing_config=true"
- # Custom patch: Enable building Chromium as individual channels (e.g. stable, beta, dev) that
- # use different profile directories, desktop entries, etc. This enables slotting the ebuild.
- "enable_channel_branding=true"
- # 131 began laying the groundwork for replacing freetype with
- # "Rust-based Fontations set of libraries plus Skia path rendering"
- # We now need to opt-in
- "enable_freetype=true"
- "enable_hangout_services_extension=$(usex hangouts true false)"
- # Don't need nocompile checks and GN crashes with our config (verify with modern GN)
- "enable_nocompile_tests=false"
- # pseudolocales are only used for testing
- "enable_pseudolocales=false"
- "enable_widevine=$(usex widevine true false)"
- # Disable fatal linker warnings, bug 506268.
- "fatal_linker_warnings=false"
- # Component build isn't generally intended for use by end users. It's mostly useful
- # for development and debugging.
- "is_component_build=false"
- # GN needs explicit config for Debug/Release as opposed to inferring it from build directory.
- "is_debug=false"
- "is_official_build=$(usex official true false)"
- # Enable ozone wayland and/or headless support
- "ozone_auto_platforms=false"
- "ozone_platform_headless=true"
- # Enables building without non-free unRAR licence
- "safe_browsing_use_unrar=false"
- # "thin_lto_enable_optimizations=${use_lto}"
- "treat_warnings_as_errors=false"
- # Use in-tree libc++ (buildtools/third_party/libc++ and buildtools/third_party/libc++abi)
- # instead of the system C++ library for C++ standard library support.
- # default: true, but let's be explicit (forced since 120 ; USE removed 127).
- "use_custom_libcxx=true"
- # Enable ozone wayland and/or headless support
- "use_ozone=true"
- # The sysroot is the oldest debian image that chromium supports, we don't need it
- "use_sysroot=false"
- # See dependency logic in third_party/BUILD.gn
- "use_system_harfbuzz=$(usex system-harfbuzz true false)"
- # "use_thin_lto=${use_lto}"
- # Only enabled for clang, but gcc has endian macros too
- "v8_use_libm_trig_functions=true"
- # use system go
- "tint_use_system_go=true"
- )
-
- myconf_gn+=( "enable_iterator_debugging=$(usex debug true false)" )
-
- if use debug; then
- myconf_gn+=(
- "symbol_level=2"
- "blink_symbol_level=2"
- "v8_symbol_level=2"
- )
- else
- myconf_gn+=(
- "symbol_level=0"
- "blink_symbol_level=0"
- "v8_symbol_level=0"
- )
- fi
-
- if use bindist ; then
- myconf_gn+=(
- # If this is set to false Chromium won't be able to load any proprietary codecs
- # even if provided with an ffmpeg capable of h264/aac decoding
- "proprietary_codecs=true"
- 'ffmpeg_branding="Chrome"'
- # build ffmpeg as an external component (libffmpeg.so) that we can remove / substitute
- "is_component_ffmpeg=true"
- )
- else
- myconf_gn+=(
- "proprietary_codecs=$(usex proprietary-codecs true false)"
- "ffmpeg_branding=\"$(usex proprietary-codecs Chrome Chromium)\""
- )
- fi
-
- if use headless; then
- myconf_gn+=(
- "enable_print_preview=false"
- "enable_remoting=false"
- 'ozone_platform="headless"'
- "rtc_use_pipewire=false"
- "use_alsa=false"
- "use_cups=false"
- "use_gio=false"
- "use_glib=false"
- "use_gtk=false"
- "use_kerberos=false"
- "use_libpci=false"
- "use_pangocairo=false"
- "use_pulseaudio=false"
- "use_qt5=false"
- "use_qt6=false"
- "use_udev=false"
- "use_vaapi=false"
- "use_xkbcommon=false"
- )
- else
- myconf_gn+=(
- "gtk_version=$(usex gtk4 4 3)"
- # link pulseaudio directly (DT_NEEDED) instead of using dlopen.
- # helps with automated detection of ABI mismatches and prevents silent errors.
- "link_pulseaudio=$(usex pulseaudio true false)"
- "ozone_platform_wayland=$(usex wayland true false)"
- "ozone_platform_x11=$(usex X true false)"
- "ozone_platform=\"$(usex wayland wayland x11)\""
- "rtc_use_pipewire=$(usex screencast true false)"
- # As above - link directly instead of dlopening
- "rtc_link_pipewire=$(usex screencast true false)"
- "use_cups=$(usex cups true false)"
- "use_kerberos=$(usex kerberos true false)"
- "use_pulseaudio=$(usex pulseaudio true false)"
- "use_qt5=false"
- "use_system_libffi=$(usex wayland true false)"
- "use_system_minigbm=true"
- "use_vaapi=$(usex vaapi true false)"
- "use_xkbcommon=true"
- )
- if use qt6; then
- local cbuild_libdir
- cbuild_libdir="$(get_libdir)"
- if tc-is-cross-compiler; then
- # Hack to workaround get_libdir not being able to handle CBUILD, bug #794181
- cbuild_libdir="$($(tc-getBUILD_PKG_CONFIG) --keep-system-libs --libs-only-L libxslt)"
- cbuild_libdir="${cbuild_libdir:2}"
- cbuild_libdir="${cbuild_libdir/% }"
- fi
- myconf_gn+=(
- "use_qt6=true"
- "moc_qt6_path=\"${EPREFIX}/usr/${cbuild_libdir}/qt6/libexec\""
- )
- else
- myconf_gn+=( "use_qt6=false" )
- fi
- fi
-
- # Explicitly disable ICU data file support for system-icu/headless builds.
- if use system-icu || use headless; then
- myconf_gn+=( "icu_use_data_file=false" )
- fi
-
- if use official; then
- # Allow building against system libraries in official builds
- sed -i 's/OFFICIAL_BUILD/GOOGLE_CHROME_BUILD/' \
- tools/generate_shim_headers/generate_shim_headers.py || die
- # Don't add symbols to build
- myconf_gn+=( "symbol_level=0" )
- fi
-
- if use pgo; then
- myconf_gn+=(
- "chrome_pgo_phase=2"
- "v8_enable_builtins_optimization=true"
- )
- else
- myconf_gn+=( "chrome_pgo_phase=0" )
- fi
-
- # Odds and ends
-
- # skipping typecheck is only supported on amd64, bug #876157
- if ! use amd64; then
- myconf_gn+=( "devtools_skip_typecheck=false" )
- fi
-
- # Disable external code space for V8 for ppc64. It is disabled for ppc64
- # by default, but cross-compiling on amd64 enables it again.
- if tc-is-cross-compiler && use ppc64; then
- myconf_gn+=( "v8_enable_external_code_space=false" )
- fi
-
- # This determines whether or not GN uses the bundled libcxx
- if use libcxx; then
- myconf_gn+=( "use_custom_libcxx=true" )
- else
- myconf_gn+=(
- "use_custom_libcxx=false"
- "use_llvm_libatomic=false"
- )
- append-cppflags -U_GLIBCXX_ASSERTIONS #See #318
- fi
-
- myconf_gn+=( "use_bluez=$(usex bluetooth true false)" )
-
- myconf_gn+=( "is_cfi=$(usex cfi true false)" )
-
- if use cfi; then
- myconf_gn+=(
- "use_cfi_icall=true"
- "use_cfi_cast=true"
- )
- fi
-
- myconf_gn+=(
- "optimize_webui=$(usex optimize-webui true false)"
- "use_system_freetype=$(usex system-harfbuzz true false)"
- "use_system_libopenjpeg2=$(usex system-openjpeg true false)"
- "enable_pdf=true"
- "use_system_lcms2=true"
- "enable_print_preview=true"
- "use_thin_lto=$(usex thinlto true false)"
- "thin_lto_enable_optimizations=$(usex optimize-thinlto true false)"
-
- # Ungoogled flags
- "enable_mdns=false"
- "enable_mse_mpeg2ts_stream_parser=$(usex proprietary-codecs true false)"
- "enable_remoting=false"
- "enable_reporting=false"
- "enable_service_discovery=false"
- "exclude_unwind_tables=true"
- "google_api_key=\"\""
- "google_default_client_id=\"\""
- "google_default_client_secret=\"\""
- "safe_browsing_mode=0"
- "use_official_google_api_keys=false"
- "use_unofficial_version_number=false"
-
- # "enable_swiftshader=false"
-
- # Additional flags
- # "perfetto_use_system_zlib=true"
- # "use_system_zlib=true"
- # "use_system_libjpeg=true"
- # "rtc_build_examples=false"
- # "enable_chromium_prelude=false"
- # "enable_updater=false"
- # "enable_update_notifications=false"
- # "enable_constraints=false"
- # "rtc_rusty_base64=false"
- # "v8_enable_temporal_support=false"
- # "media_use_symphonia=false"
- # "pdf_enable_rust_png=false"
- # "skia_use_libpng_encode=true"
- # "skia_use_libpng_decode=true"
- # "skia_use_rust_png_decode=false"
- # "skia_use_rust_png_encode=false"
- # "enable_jxl_decoder=false"
- )
-
- if use amd64 || use arm64; then
- myconf_gn+=(
- "v8_drumbrake_bounds_checks=true"
- # "v8_enable_drumbrake=true"
- )
- fi
-
- if use thinlto; then
- # We need to change the default value of import-instr-limit in
- # LLVM to limit the text size increase. The default value is
- # 100, and we change it to 30 to reduce the text size increase
- # from 25% to 10%. The performance number of page_cycler is the
- # same on two of the thinLTO configurations, we got 1% slowdown
- # on speedometer when changing import-instr-limit from 100 to 30.
- # append-ldflags "-Wl,-plugin-opt,-import-instr-limit=30"
- sed -i '/import_instr_limit = 5/{s++import_instr_limit = 30+;h};${x;/./{x;q0};x;q1}' \
- build/config/compiler/BUILD.gn || die
-
- append-ldflags "-Wl,--thinlto-jobs=$(makeopts_jobs)"
- fi
-
- # Facilitate deterministic builds (taken from build/config/compiler/BUILD.gn)
- append-cflags -Wno-builtin-macro-redefined
- append-cxxflags -Wno-builtin-macro-redefined
- append-cppflags "-D__DATE__= -D__TIME__= -D__TIMESTAMP__="
-
- local flags
- einfo "Building with the following compiler settings:"
- for flags in C{C,XX} AR NM RANLIB {C,CXX,CPP,LD}FLAGS \
- EXTRA_GN UGC_{SKIP_{PATCHES,SUBSTITUTION},KEEP_BINARIES} ; do
- einfo " ${flags} = \"${!flags}\""
- done
-
- # Since we build from tarballs, we need to set the channel here so that it can be used in the build.
- export CHROME_VERSION_EXTRA="${SLOT}"
-
- einfo "Configuring Chromium ..."
- # add a `-v` here if gn `hangs` to see which file it's getting stuck on.
- set -- gn gen --args="${myconf_gn[*]}${EXTRA_GN:+ ${EXTRA_GN}}" out/Release
- echo "$@"
- "$@" || die "Failed to configure Chromium"
-
- # The "if" below should not be executed unless testing
- if [ ! -z "${NODIE}" ]; then
- # List all args
- # gn args --list out/Release
-
- # Quick compiler check
- eninja -C out/Release protoc torque
- fi
-}
-
-src_compile() {
- # Final link uses lots of file descriptors.
- ulimit -n 2048
-
- # Calling this here supports resumption via FEATURES=keepwork
- python_setup
-
- # I hate doing this but upstream Rust have yet to come up with a better solution for
- # us poor packagers. Required for Split LTO units, which are required for CFI.
- export RUSTC_BOOTSTRAP=1
-
- # Don't inherit PYTHONPATH from environment, bug #789021, #812689
- local -x PYTHONPATH=
-
- # Build mksnapshot and pax-mark it.
- if use pax-kernel; then
- local x
- for x in mksnapshot v8_context_snapshot_generator code_cache_generator; do
- if tc-is-cross-compiler; then
- eninja -C out/Release "host/${x}"
- pax-mark m "out/Release/host/${x}"
- else
- eninja -C out/Release "${x}"
- pax-mark m "out/Release/${x}"
- fi
- done
- fi
-
- # Even though ninja autodetects number of CPUs, we respect
- # user's options, for debugging with -j 1 or any other reason.
- eninja -C out/Release chrome chrome_sandbox $(use test && echo "base_unittests")
-
- pax-mark m out/Release/chrome
-
- # This codepath does minimal patching, so we're at the mercy of upstream
- # CFLAGS. This is fine - we're not intending to force this on users
- # and we do a lot of flag 'management' anyway.
- if use bundled-toolchain; then
- QA_FLAGS_IGNORED="
- usr/lib64/chromium-browser/chrome
- usr/lib64/chromium-browser/chrome-sandbox
- usr/lib64/chromium-browser/chromedriver
- usr/lib64/chromium-browser/chrome_crashpad_handler
- usr/lib64/chromium-browser/libEGL.so
- usr/lib64/chromium-browser/libGLESv2.so
- usr/lib64/chromium-browser/libVkICD_mock_icd.so
- usr/lib64/chromium-browser/libVkLayer_khronos_validation.so
- usr/lib64/chromium-browser/libqt6_shim.so
- usr/lib64/chromium-browser/libvk_swiftshader.so
- usr/lib64/chromium-browser/libvulkan.so.1
- "
- fi
-
- use convert-dict && eninja -C out/Release convert_dict
-
- use enable-driver && eninja -C out/Release chromedriver
- #use suid && eninja -C out/Release chrome_sandbox
-
- # use enable-driver && mv out/Release/chromedriver{.unstripped,}
-
- rm -f out/Release/locales/*.pak.info || die
-
- # Generate support files (desktop file, manpage, etc.) See: #684550 #706786 #968958
- ${EPYTHON} "${FILESDIR}/generate-support-files.py" \
- --installdir "/usr/$(get_libdir)/ungoogled-chromium-browser" \
- --channel "${SLOT}" ||
- die "Failed to generate support files"
-}
-
-src_test() {
- # Tests may be flaky with usersandbox, and the test runner executes significantly faster without.
- # If you seem to be excluding too many tests for a particular milestone: comment them out, reboot, and
- # run the tests again. If that doesn't help, try FEATURES="-usersandbox" and send it because obviously the
- # chromium gods are not smiling upon you today. Do some runtime testing, obvs.
- local skip_tests=(
- # Wildcard exclusions (if all tests in a test suite are broken)
- 'AlternateTestParams/PartitionAllocDeathTest.RepeatedAllocReturnNullDirect/*'
- 'AlternateTestParams/PartitionAllocDeathTest.RepeatedReallocReturnNullDirect/*'
- 'AlternateTestParams/PartitionAllocTest.*' # 200+ tests, >= 1 crashes entire test runner with usersandbox.
- 'CheckExitCodeAfterSignalHandlerDeathTest.*'
- 'CriticalProcessAndThreadSpotChecks/HangWatcherAnyCriticalThreadTests.*'
- 'LazyThreadPoolTaskRunnerEnvironmentTest.*' # M142
- 'ToolsSanityTest.BadVirtualCall*'
- # Since 151.0.7922.137
- 'CheckDeathTest.*'
- 'EnumSetDeathTest.*'
- 'OptionalRefDeathTest.*'
- 'RawRefDeathTest.*'
- 'AlternateTestParams/PartitionAllocDeathTest.CheckTriggered*'
- 'CallbackHelpersTest.*'
- 'SafeRefTest.*'
- 'SpanTest.*'
- 'WeakValueTableTest.*'
- 'PlatformSharedMemoryRegionTest.*'
- 'RefCountedOverflowTest.*'
- 'SingleThreadTaskRunnerCurrentDefaultHandleTest.*'
- 'TestFutureDeathTest.*'
- 'WeakPtrDeathTest.*'
- 'SafeRefDeathTest.*'
- 'LinkedListDeathTest.*'
- 'BindDeathTest.*'
- 'ReallocProtectedIteratorDeathTest.*'
- 'PASpanTest.*'
- 'BackupRefPtrTest.*'
- 'All/Base64Test.Overflow*'
- 'ValuesTest.*'
- 'TaskEnvironmentTest.*'
- 'CheckedObserverListTest.*'
- 'MemoryConsumerRegistryTest.*'
- ProtectedMemoryDeathTest.FailsIfDefinedOutsideOfProtectMemoryRegion
- StructuredSharedMemoryDeathTest.DuplicateRegion
- CheckedContiguousIteratorDeathTest.OutOfBounds
- HeapArrayDeathTest.TakeFirstWithOverSize
- CallbackDeathTest.RunNullCallbackChecks
- ObserverListThreadSafeDeathTest.CrossThreadRemovalRestricted
- SequencedTaskRunnerCurrentDefaultHandleDeathTest.OverrideWithNull
- TestFutureWithoutTaskEnvironmentDeathTest.WaitShouldDcheckWithoutTaskEnvironment
- ScopedThreadPriorityDeathTest.NoRealTime
- ReallocProtectedIteratorDeathTest.StringReallocCrashes
- BarrierCallbackTest.ErrorToCallCallbackWithZeroCallbacks
- BarrierClosureTest.ChecksIfCalledForZeroClosures
- SupportsUserDataTest.ReentrantSetUserDataDuringRemoval
- TimeBase.AddSubInfinities
- LibcppHardeningTest.Assertions
- IDMapTest.RemovedValueHandling
- MultiMemoryConsumerTest.DuplicateInterventionsCheck
- PersistentMemoryAllocatorTest.DelayedAllocationTest
- SequenceCheckerTest.MoveOffSequenceBanned
- ThreadCheckerTest.MoveOffThreadBanned
- TokenType.TokenFromNullUnguessableToken
- ZipTest.CheckForIterationPastTheEnd
- MemoryConsumerTraitsTest.ActiveConsumerWithPassiveTraitsFails
- SingleThreadTaskRunnerMainThreadDefaultHandleTest.Basic
-
- # requires en-us locale
- SysStrings.SysNativeMBAndWide
- SysStrings.SysNativeMBToWide
- SysStrings.SysWideToNativeMB
- # Specific test cases
- CancelableEventTest.BothCancelFailureAndSucceedOccurUnderContention
- FilePathTest.FromUTF8Unsafe_And_AsUTF8Unsafe
- HistogramTesterTest.PumaTestUniqueSample
- ImmediateCrashTest.ExpectedOpcodeSequence # M150
- PathServiceTest.CheckedGetFailure
- PlatformThreadTest.CanChangeThreadType
- RawPtrTest.SetLookupUsesGetForComparison # M146 ; also broken for alpine in M144.
- RustLogIntegrationTest.CheckAllSeverity
- StackCanary.ChangingStackCanaryCrashesOnReturn
- StackTraceDeathTest.StackDumpSignalHandlerIsMallocFree
- TestLauncherTools.TruncateSnippetFocusedMatchesFatalMessagesTest
- ThreadPoolEnvironmentConfig.CanUseBackgroundPriorityForWorker
- DriveInfoTest.GetFileDriveInfo
-
- )
- local test_filter="-$(IFS=:; printf '%s' "${skip_tests[*]}")"
- # test-launcher-bot-mode enables parallelism and plain output
- # Check individual tests with --gtest_filter=<test you want> --single-process-tests
- ./out/Release/base_unittests --test-launcher-bot-mode \
- --test-launcher-jobs="$(get_makeopts_jobs)" \
- --gtest_filter="${test_filter}" || die "Tests failed!"
-}
-
-src_install() {
- local browser_suffix
- if [[ "${SLOT}" != "stable" ]]; then
- browser_suffix="-${SLOT}"
- else
- browser_suffix=""
- fi
- local CHROMIUM_HOME="/usr/$(get_libdir)/ungoogled-chromium-browser${browser_suffix}"
- exeinto "${CHROMIUM_HOME}"
- doexe out/Release/chrome
-
- #newexe out/Release/chrome_sandbox chrome-sandbox
- #fperms 4755 "${CHROMIUM_HOME}/chrome-sandbox"
-
- use enable-driver && doexe out/Release/chromedriver
-
- #* https://github.com/ungoogled-software/ungoogled-chromium/pull/3563
- doexe out/Release/chrome_crashpad_handler
-
- if use convert-dict; then
- newexe "${FILESDIR}/update-dicts.sh" update-dicts.sh
- doexe out/Release/convert_dict
- fi
-
- ozone_auto_session () {
- use X && use wayland && ! use headless && echo true || echo false
- }
-
- cat <<- EOF > "${D}${CHROMIUM_HOME}/chromium-launcher.sh" || die
- #!/bin/bash
- # Wrapper to launch slotted Chromium via the chromium-common launcher script.
- export CHROME_DESKTOP="ungoogled-chromium-browser${browser_suffix}.desktop"
- export CHROME_EXEC_NAME="ungoogled-chromium-browser${browser_suffix}"
- export CHROME_VERSION_EXTRA="${SLOT}"
- export CHROME_WRAPPER="\$(readlink -f "\$0")"
- export OZONE_AUTO_SESSION=$(ozone_auto_session)
-
- exec /usr/libexec/chromium/chromium-launcher.sh "\$@"
- EOF
-
- chmod 755 "${D}${CHROMIUM_HOME}/chromium-launcher.sh" || die
-
- # It is important that we name the target "chromium-browser",
- # xdg-utils expect it; bug #355517.
- dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/ungoogled-chromium-browser${browser_suffix}
- # keep the old symlink around for consistency
- dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/ungoogled-chromium${browser_suffix}
-
- use enable-driver && dosym "${CHROMIUM_HOME}/chromedriver" /usr/bin/ungoogled-chromedriver${browser_suffix}
-
- pushd out/Release/locales > /dev/null || die
- chromium_remove_language_paks
- popd > /dev/null || die
-
- insinto "${CHROMIUM_HOME}"
- doins out/Release/*.bin
- doins out/Release/*.pak
- doins -r out/Release/hyphen-data
-
- if use bindist; then
- # We built libffmpeg as a component library, but we can't distribute it
- # with proprietary codec support. Remove it and make a symlink to the requested
- # system library.
- rm -f out/Release/libffmpeg.so \
- || die "Failed to remove bundled libffmpeg.so (with proprietary codecs)"
- # symlink the libffmpeg.so from either ffmpeg-chromium or ffmpeg[chromium].
- einfo "Creating symlink to libffmpeg.so from $(usex ffmpeg-chromium ffmpeg-chromium ffmpeg[chromium])..."
- dosym ../chromium/libffmpeg.so$(usex ffmpeg-chromium .${PV%%\.*} "") \
- /usr/$(get_libdir)/ungoogled-chromium-browser/libffmpeg.so
- fi
-
- (
- shopt -s nullglob
- local files=(out/Release/*.so out/Release/*.so.[0-9])
- [[ ${#files[@]} -gt 0 ]] && doins "${files[@]}"
- )
-
- if ! use system-icu && ! use headless; then
- doins out/Release/icudtl.dat
- fi
-
- doins -r out/Release/locales
- #doins -r out/Release/MEIPreload
-
- # Install vk_swiftshader_icd.json; bug #827861
- doins out/Release/vk_swiftshader_icd.json
-
- if [[ -d out/Release/swiftshader ]]; then
- insinto "${CHROMIUM_HOME}/swiftshader"
- doins out/Release/swiftshader/*.so
- fi
-
- use widevine && dosym WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so "${CHROMIUM_HOME}/libwidevinecdm.so"
-
- # Install icons
- local branding size
- for size in 16 24 32 48 64 128 256 ; do
- case ${size} in
- 16|32) branding="chrome/app/theme/default_100_percent/chromium" ;;
- *) branding="chrome/app/theme/chromium" ;;
- esac
- newicon -s ${size} "${branding}/product_logo_${size}.png" \
- ungoogled-chromium-browser${browser_suffix}.png
- done
-
- # Install desktop entry
- domenu out/Release/ungoogled-chromium-browser${browser_suffix}.desktop
-
- # Install GNOME default application entry (bug #303100).
- insinto /usr/share/gnome-control-center/default-apps
- doins out/Release/ungoogled-chromium-browser${browser_suffix}.xml
-
- # Install AppStream metadata
- insinto /usr/share/appdata
- doins out/Release/ungoogled-chromium-browser${browser_suffix}.appdata.xml
-
- # Install manpage; bug #684550
- doman out/Release/ungoogled-chromium-browser${browser_suffix}.1
- dosym ungoogled-chromium-browser${browser_suffix}.1 /usr/share/man/man1/ungoogled-chromium${browser_suffix}.1
-
- readme.gentoo_create_doc
-}
-
-pkg_postrm() {
- xdg_icon_cache_update
- xdg_desktop_database_update
-}
-
-pkg_postinst() {
- xdg_icon_cache_update
- xdg_desktop_database_update
- readme.gentoo_print_elog
-
- if use !headless && [[ -z "${REPLACING_VERSIONS}" ]]; then
- if use vaapi; then
- elog "Hardware-accelerated video decoding configuration:"
- elog
- elog "Chromium supports multiple backends for hardware acceleration. To enable one,"
- elog " Add to CHROMIUM_FLAGS in /etc/chromium/default:"
- elog
- elog "1. VA-API with OpenGL (recommended for most users):"
- elog " --enable-features=AcceleratedVideoDecodeLinuxGL"
- elog " VaapiVideoDecoder may need to be added as well, but try without first."
- elog
- if use wayland; then
- elog "2. Enhanced Wayland/EGL performance:"
- elog " --enable-features=AcceleratedVideoDecodeLinuxGL,AcceleratedVideoDecodeLinuxZeroCopyGL"
- elog
- fi
- if use X; then
- elog "$(usex wayland "3" "2"). VA-API with Vulkan:"
- elog " --enable-features=VaapiVideoDecoder,VaapiIgnoreDriverChecks,Vulkan,DefaultANGLEVulkan,VulkanFromANGLE"
- elog
- if use wayland; then
- elog " NOTE: Vulkan acceleration requires X11 and will not work under Wayland sessions."
- elog " Use OpenGL-based acceleration instead when running under Wayland."
- elog
- fi
- fi
- elog "Additional options:"
- elog " To enable hardware-accelerated encoding (if supported)"
- elog " add 'AcceleratedVideoEncoder' to your feature list"
- elog " VaapiIgnoreDriverChecks bypasses driver compatibility checks"
- elog " (may be needed for newer/unsupported hardware)"
- elog
- else
- elog "This Chromium build was compiled without VA-API support, which provides"
- elog "hardware-accelerated video decoding."
- fi
- if use screencast; then
- elog "Screencast is disabled by default at runtime. Either enable it"
- elog "by navigating to chrome://flags/#enable-webrtc-pipewire-capturer"
- elog "inside Chromium or add --enable-features=WebRTCPipeWireCapturer"
- elog "to CHROMIUM_FLAGS in /etc/chromium/default."
- elog
- elog "Additional setup may be required for screencasting to work."
- elog "See issue: https://github.com/PF4Public/gentoo-overlay/issues/314"
- fi
- if use gtk4; then
- elog "Chromium prefers GTK3 over GTK4 at runtime. To override this"
- elog "behaviour you need to pass --gtk-version=4, e.g. by adding it"
- elog "to CHROMIUM_FLAGS in /etc/chromium/default."
- fi
- if use widevine; then
- elog "widevine requires binary plugins, which are distributed separately"
- elog "Make sure you have www-plugins/chrome-binary-plugins installed"
- fi
- fi
-
- if systemd_is_booted && ! [[ -f "/etc/machine-id" ]]; then
- ewarn "The lack of an '/etc/machine-id' file on this system booted with systemd"
- ewarn "indicates that the Gentoo handbook was not followed to completion."
- ewarn ""
- ewarn "Chromium is known to behave unpredictably with this system configuration;"
- ewarn "please complete the configuration of this system before logging any bugs."
- fi
-
- # Stable slot doesn't change profile directory, and it's vanishingly unlikely that users will downgrade from dev.
- if [[ -n "${REPLACING_VERSIONS}" ]]; then
- local replacing_non_slotted=false
- # there could be more than one PVR
- for version in ${REPLACING_VERSIONS}; do
- if ver_test "${version}" -le "145.0.7632.116"; then
- replacing_non_slotted=true
- break
- fi
- done
- if ${replacing_non_slotted}; then
- ewarn "This version of Chromium has replaced a non-slotted ebuild."
- if [[ ${SLOT} != "stable" ]]; then
- ewarn "This channel has its own profile directory, so your existing profile will not be used."
- ewarn "To use your existing profile, either copy or move it to the new location."
- ewarn "See https://wiki.gentoo.org/wiki/Chromium#Profile_Directories for more information."
- ewarn ""
- fi
- ewarn "Any existing Progressive Web Apps (PWAs) will need to be reinstalled,"
- ewarn "or have the path in the desktop files updated to point to the new wrapper script."
- fi
- fi
-}
-
-eapply_wrapper () {
- if [ ! -z "${NODIE}" ]; then
- nonfatal eapply "$@"
- else
- eapply "$@"
- fi
-}
-
-git_wrapper () {
- if [ ! -z "${NODIE}" ]; then
- git "$@"
- else
- git "$@" || die
- fi
-}
-
-filter_wrapper () {
- einfo "Applying ${i##*/}"
- #? fuzz factor of 3 is OK?
- if [ ! -z "${NODIE}" ]; then
- filterdiff -p1 "${@:2}" < "$1" | patch -F 3 -p1
- else
- filterdiff -p1 "${@:2}" < "$1" | patch -F 3 -p1 || die
- fi
-}
diff --git a/www-client/ungoogled-chromium/ungoogled-chromium-152.0.7977.82_p1.ebuild b/www-client/ungoogled-chromium/ungoogled-chromium-152.0.7977.82_p1.ebuild
deleted file mode 100644
index cf5169391779..000000000000
--- a/www-client/ungoogled-chromium/ungoogled-chromium-152.0.7977.82_p1.ebuild
+++ /dev/null
@@ -1,2622 +0,0 @@
-# Copyright 2009-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-# Use following environment variables to customise the build
-# EXTRA_GN — pass extra options to gn
-# NINJAOPTS="-k0 -j8" useful to populate ccache even if ebuild is still failing
-# UGC_SKIP_PATCHES — space-separated list of patches to skip
-# UGC_KEEP_BINARIES — space-separated list of binaries to keep
-# UGC_SKIP_SUBSTITUTION — space-separated list of files to skip domain substitution
-
-# USE=bundled-toolchain is intended for users who want to use the same toolchain
-# as the upstream releases. It's also a good fallback in case we fall behind
-# and need to get a release out quickly (less likely with `dev` in-tree).
-# We can't rely on it as a default since the toolchain is only shipped for x86-64;
-# other architectures will need to use system toolchain.
-
-# Since m133 we are using CI-generated tarballs from
-# https://github.com/chromium-linux-tarballs/chromium-tarballs/
-
-# These are bit-for-bit identical to the official releases, but are built
-# using an external CI system that we have some control over, in case
-# issues pop up again with official tarball generation.
-
-GN_MIN_VER=0.2374
-# chromium-tools/get-chromium-toolchain-strings.py (or just use Chromicler)
-# Node for M145+ should be 24.12.0 but that's not packaged in Gentoo yet. See #969145
-TEST_FONT="9c07d19d9c5ee1ff94f717e6fb17e0c8c354e6f9"
-BUNDLED_CLANG_VER="llvmorg-23-init-19482-g53d18800-1"
-BUNDLED_RUST_VER="b998449636a48e2c4a362809085b600a0174e1f2-2"
-RUST_SHORT_HASH=${BUNDLED_RUST_VER:0:10}-${BUNDLED_RUST_VER##*-}
-NODE_VER="24.12.0"
-GO_MIN_VER="1.25.0"
-ESBUILD_VER="0.25.1"
-ROLLUP_VER="4.57.1" # currently manual.
-
-CHROMIUM_LANGS="af am ar as az be bg bn bs ca cs cy da de el en-GB es es-419 et eu fa fi fil
- fr fr-CA gl gu he hi hr hu hy id is it ja ka kk km kn ko ky lo lt lv mk ml mn mr ms my
- nb ne nl or pa pl pt-BR pt-PT ro ru si sk sl sq sr sr-Latn sv sw ta te th tr uk ur uz
- vi zh-CN zh-HK zh-TW zu"
-
-#UGC_COMMIT_ID="cacf0f0fd2446a837528c54df1880b75874b9580"
-# UGC_PR_COMMITS=(
-# c917e096342e5b90eeea91ab1f8516447c8756cf
-# 5794e9d12bf82620d5f24505798fecb45ca5a22d
-# )
-
-CROMITE_COMMIT_ID="69e841fd35cd92ce5fa1a336791c7989809e0f17"
-
-declare -A CHROMIUM_COMMITS=(
- # ["27f8690db999f6e56f0af7a9ea3d28a019ed72ca"]="." #152+
- ["-cf94ed446320d35c8613ed9b3ffb6e6a61bfcb5f"]="." # ffmpeg 9
- # ["-bf6be9310a07b981edf81e0ac9b89dead09be35c"]="." # ffmpeg 9
- ["-c72c7b0971e3e31974b0adea0dac42278e22e3b0"]="third_party/devtools-frontend/src" # need gn >= 2459
-# # ["-37c28a19804e47a68eabf3cf882a310689fc325b"]="." #disable style check for cromite
-# # ["cd5a0df905a28faa89ff2a4ab44f893f84dc4487"]="net/third_party/quiche/src"
-)
-
-LLVM_COMPAT=( 21 22 23 )
-PYTHON_COMPAT=( python3_{13..14} )
-PYTHON_REQ_USE="xml(+)"
-RUST_MIN_VER=1.91.0
-RUST_NEEDS_LLVM="yes please"
-RUST_OPTIONAL="yes" # Not actually optional, but we don't need system Rust (or LLVM) with USE=bundled-toolchain
-RUST_REQ_USE="rustfmt" # Upstream run rustfmt on bindgen output, so we need it to be available.
-
-inherit check-reqs chromium-2 desktop flag-o-matic llvm-r1 multiprocessing ninja-utils pax-utils
-inherit python-any-r1 readme.gentoo-r1 rust systemd toolchain-funcs xdg-utils
-
-DESCRIPTION="Modifications to Chromium for removing Google integration and enhancing privacy"
-HOMEPAGE="https://github.com/ungoogled-software/ungoogled-chromium"
-PPC64_HASH="7aae8a84e327fc2078ce1625c9c70bfda77d626f"
-PATCH_V="${PV%%\.*}"
-COPIUM_COMMIT="3c7e56fb4523b43b47595bb3a22f77178fc76293"
-SRC_URI="https://commondatastorage.googleapis.com/chromium-browser-official/chromium-${PV/_*}-lite.tar.xz
- https://deps.gentoo.zip/www-client/chromium/rollup-wasm-node-${ROLLUP_VER}.tgz
- https://gitlab.com/Matt.Jolly/chromium-patches/-/archive/${PATCH_V}/chromium-patches-${PATCH_V}.tar.bz2
- !bundled-toolchain? (
- https://codeberg.org/selfisekai/copium/archive/${COPIUM_COMMIT}.tar.gz
- -> chromium-patches-copium-${COPIUM_COMMIT:0:10}.tar.gz
- )
- bundled-toolchain? (
- https://commondatastorage.googleapis.com/chromium-browser-clang/Linux_x64/clang-${BUNDLED_CLANG_VER}.tar.xz
- -> chromium-clang-${BUNDLED_CLANG_VER}.tar.xz
- https://commondatastorage.googleapis.com/chromium-browser-clang/Linux_x64/rust-toolchain-${BUNDLED_RUST_VER}-${BUNDLED_CLANG_VER%-*}.tar.xz
- -> chromium-rust-toolchain-${RUST_SHORT_HASH}-${BUNDLED_CLANG_VER%-*}.tar.xz
- )
- test? (
- https://chromium-fonts.storage.googleapis.com/${TEST_FONT} -> chromium-testfonts-${TEST_FONT:0:10}.tar.gz
- )
- ppc64? (
- https://gitlab.raptorengineering.com/raptor-engineering-public/chromium/openpower-patches/-/archive/${PPC64_HASH}/openpower-patches-${PPC64_HASH}.tar.bz2 -> chromium-openpower-${PPC64_HASH:0:10}.tar.bz2
- )
-"
-
-# Gentoo tarball:
-# https://chromium-tarballs.distfiles.gentoo.org/chromium-${PV/_*}.tar.xz -> chromium-${PV/_*}-gentoo.tar.xz
-
-# chromium-linux-tarballs
-# https://github.com/chromium-linux-tarballs/chromium-tarballs/releases/download/${PV/_*}/chromium-${PV/_*}-linux.tar.xz
-
-# Official tarball:
-# https://commondatastorage.googleapis.com/chromium-browser-official/chromium-${PV/_*}${LITE_TARBALL:+-lite}.tar.xz
-
-# https://gitweb.gentoo.org/proj/chromium-tools.git/tree/get-chromium-licences.py @ 145.0.7632.76
-LICENSE="Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD BSD-2 Base64 Boost-1.0 CC-BY-3.0 CC-BY-4.0 Clear-BSD FFT2D FTL"
-LICENSE+=" IJG ISC LGPL-2 LGPL-2.1 MIT MPL-1.1 MPL-2.0 Ms-PL PSF-2 SGI-B-2.0 SSLeay SunSoft Unicode-3.0"
-LICENSE+=" Unicode-DFS-2015 Unlicense UoI-NCSA ZLIB libtiff openssl"
-LICENSE+=" cromite? ( GPL-3 )"
-
-SLOT="stable"
-KEYWORDS="amd64 ~arm64 ~ppc64 ~x86"
-
-IUSE_SYSTEM_LIBS="abseil-cpp av1 brotli crc32c double-conversion ffmpeg +harfbuzz icu jsoncpp +libusb libvpx +openh264 openjpeg re2 snappy woff2 +zstd"
-IUSE="+X bindist bluetooth bundled-toolchain cfi convert-dict cups custom-cflags debug ffmpeg-chromium enable-driver gtk4 hangouts headless kerberos +libcxx nvidia +official optimize-thinlto optimize-webui override-data-dir pax-kernel pgo"
-IUSE+=" +proprietary-codecs pulseaudio qt6 screencast selinux test thinlto cromite vaapi wayland widevine cpu_flags_ppc_vsx3"
-RESTRICT="
- !bindist? ( bindist )
- !test? ( test )
- arm64? ( test )
- !system-ffmpeg? ( proprietary-codecs? ( bindist ) )
- !system-openh264? ( bindist )
- cromite? ( bindist )"
-
-REQUIRED_USE="
- !headless? ( || ( X wayland ) )
- screencast? ( wayland )
- ffmpeg-chromium? ( bindist proprietary-codecs )
- optimize-thinlto? ( thinlto )
- cfi? ( thinlto )
- x86? ( !thinlto !widevine )
- debug? ( !official )
- vaapi? ( !system-av1 !system-libvpx )
-"
-
-UGC_PV="${PV/_p/-}"
-UGC_PF="${PN}-${UGC_PV}"
-UGC_URL="https://github.com/ungoogled-software/${PN}/archive/"
-
-if [ -z "$UGC_COMMIT_ID" ]; then
- UGC_URL="${UGC_URL}${UGC_PV}.tar.gz -> ${UGC_PF}.tar.gz"
- UGC_WD="${WORKDIR}/${UGC_PF}"
-else
- UGC_URL="${UGC_URL}${UGC_COMMIT_ID}.tar.gz -> ${PN}-${UGC_COMMIT_ID}.tar.gz"
- UGC_WD="${WORKDIR}/ungoogled-chromium-${UGC_COMMIT_ID}"
-fi
-
-SRC_URI+="${UGC_URL}
-"
-
-if [ ! -z "${UGC_PR_COMMITS[*]}" ]; then
- for i in "${UGC_PR_COMMITS[@]}"; do
- SRC_URI+="https://github.com/ungoogled-software/${PN}/commit/$i.patch?full_index=true -> ${PN}-$i.patch
- "
- done
-fi
-
-if [ ! -z "${CHROMIUM_COMMITS[*]}" ]; then
- # for i in "${CHROMIUM_COMMITS[@]}"; do
- for i in "${!CHROMIUM_COMMITS[@]}"; do
- if [[ ${CHROMIUM_COMMITS[$i]} =~ webrtc ]]; then
- #TODO: is it safe to use this mirror?
- SRC_URI+="https://github.com/webrtc-mirror/webrtc/commit/${i/-}.patch?full_index=true -> webrtc-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ angle ]]; then
- SRC_URI+="https://github.com/google/angle/commit/${i/-}.patch?full_index=true -> angle-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ quiche ]]; then
- SRC_URI+="https://github.com/google/quiche/commit/${i/-}.patch?full_index=true -> quiche-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ dawn ]]; then
- SRC_URI+="https://github.com/google/dawn/commit/${i/-}.patch?full_index=true -> dawn-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ perfetto ]]; then
- SRC_URI+="https://github.com/google/perfetto/commit/${i/-}.patch?full_index=true -> perfetto-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ink ]]; then
- SRC_URI+="https://github.com/google/ink/commit/${i/-}.patch?full_index=true -> ink-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ vulkan-utility-libraries ]]; then
- SRC_URI+="https://github.com/KhronosGroup/Vulkan-Utility-Libraries/commit/${i/-}.patch?full_index=true -> vulkan-utility-libraries-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ruy ]]; then
- SRC_URI+="https://github.com/google/ruy/commit/${i/-}.patch?full_index=true -> ruy-${i/-}.patch
- "
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ devtools-frontend ]]; then
- SRC_URI+="https://github.com/ChromeDevTools/devtools-frontend/commit/${i/-}.patch?full_index=true -> devtools-frontend-${i/-}.patch
- "
- else
- SRC_URI+="https://github.com/chromium/chromium/commit/${i/-}.patch?full_index=true -> chromium-${i/-}.patch
- "
- fi
- done
-fi
-
-SRC_URI+="cromite? ( https://github.com/uazo/cromite/archive/${CROMITE_COMMIT_ID}.tar.gz -> cromite-${CROMITE_COMMIT_ID}.tar.gz )
-"
-
-for i in ${IUSE_SYSTEM_LIBS}; do
- [[ $i =~ ^(\+)?(.*)$ ]]
- IUSE+=" ${BASH_REMATCH[1]}system-${BASH_REMATCH[2]}"
-done
-
-COMMON_X_DEPEND="
- x11-libs/libXcomposite:=
- x11-libs/libXcursor:=
- x11-libs/libXdamage:=
- x11-libs/libXfixes:=
- >=x11-libs/libXi-1.6.0:=
- x11-libs/libXrandr:=
- x11-libs/libXrender:=
- x11-libs/libXtst:=
- x11-libs/libxshmfence:=
-"
-
-# sys-libs/zlib: https://bugs.gentoo.org/930365; -ng is not compatible.
-# We _could_ use the bundled minizip, but that's against policy.
-COMMON_SNAPSHOT_DEPEND="
- system-icu? ( >=dev-libs/icu-78:= )
- system-abseil-cpp? ( >=dev-cpp/abseil-cpp-20260107.0 )
- system-brotli? ( >=app-arch/brotli-9999 )
- system-crc32c? ( dev-libs/crc32c )
- system-double-conversion? ( dev-libs/double-conversion )
- system-woff2? ( media-libs/woff2 )
- system-snappy? ( app-arch/snappy )
- system-jsoncpp? ( dev-libs/jsoncpp )
- system-openjpeg? ( media-libs/openjpeg:2= )
- system-re2? ( >=dev-libs/re2-0.2019.08.01:= )
- system-libvpx? ( >=media-libs/libvpx-1.13.0:=[postproc] )
- system-libusb? ( virtual/libusb:1 )
- cromite? ( dev-util/patchutils )
- >=dev-libs/libxml2-2.12.4:=[icu]
- dev-libs/nspr:=
- >=dev-libs/nss-3.26:=
- dev-libs/libxslt:=
- media-libs/fontconfig:=
- >=media-libs/freetype-2.11.0-r1:=
- system-harfbuzz? ( >=media-libs/harfbuzz-3:0=[icu(-)] )
- media-libs/libjpeg-turbo:=
- media-libs/libpng:=
- system-zstd? ( >=app-arch/zstd-1.5.5:= )
- >=media-libs/libwebp-0.4.0:=
- media-libs/mesa:=[gbm(+)]
- >=media-libs/openh264-2.6.0:=
- system-av1? (
- >=media-libs/dav1d-1.0.0:=
- >=media-libs/libaom-3.7.0:=
- )
- sys-libs/zlib:=
- !headless? (
- dev-libs/glib:2
- >=media-libs/alsa-lib-1.0.19:=
- media-video/pipewire:=
- pulseaudio? (
- || (
- media-libs/libpulse
- >=media-sound/apulse-0.1.9
- )
- )
- sys-apps/pciutils:=
- kerberos? ( virtual/krb5 )
- vaapi? ( >=media-libs/libva-2.7:=[X?,wayland?] )
- X? (
- x11-base/xorg-proto:=
- x11-libs/libX11:=
- x11-libs/libxcb:=
- x11-libs/libXext:=
- )
- x11-libs/libxkbcommon:=
- wayland? (
- screencast? ( media-video/pipewire:= )
- dev-libs/libffi:=
- dev-libs/wayland:=
- screencast? (
- media-video/pipewire:=
- || (
- sys-apps/xdg-desktop-portal-gnome
- sys-apps/xdg-desktop-portal-gtk
- kde-plasma/xdg-desktop-portal-kde
- gui-libs/xdg-desktop-portal-lxqt
- gui-libs/xdg-desktop-portal-wlr
- )
- )
- )
- )
-"
-
-COMMON_DEPEND="
- ${COMMON_SNAPSHOT_DEPEND}
- app-arch/bzip2:=
- dev-libs/expat:=
- system-ffmpeg? (
- >=media-video/ffmpeg-6.1:=
- >=media-libs/opus-1.3.1:=
- )
- net-misc/curl[ssl]
- sys-apps/dbus:=
- media-libs/flac:=
- sys-libs/zlib:=[minizip]
- !headless? (
- >=app-accessibility/at-spi2-core-2.46.0:2
- media-libs/mesa:=[X?,wayland?]
- virtual/udev
- x11-libs/cairo:=
- x11-libs/gdk-pixbuf:2
- x11-libs/pango:=
- cups? ( >=net-print/cups-1.3.11:= )
- qt6? ( dev-qt/qtbase:6[gui,widgets] )
- X? ( ${COMMON_X_DEPEND} )
- )
-"
-RDEPEND="${COMMON_DEPEND}
- !www-client/ungoogled-chromium:0
- >=www-client/chromium-common-2
- !headless? (
- || (
- x11-libs/gtk+:3[X?,wayland?]
- gui-libs/gtk:4[X?,wayland?]
- )
- qt6? ( dev-qt/qtbase:6[X?,wayland?] )
- )
- virtual/ttf-fonts
- selinux? ( sec-policy/selinux-chromium )
- bindist? (
- ffmpeg-chromium? ( media-video/ffmpeg-chromium:${PV%%\.*} )
- )
- !override-data-dir? (
- !www-client/chromium:${SLOT}
- !www-client/cromite:${SLOT}[-override-data-dir]
- )
-"
-# For M149+ pipewire is a mandatory build-time dependency, but it's optional at runtime for most configurations.
-DEPEND="${COMMON_DEPEND}
- !headless? (
- media-video/pipewire
- gtk4? ( gui-libs/gtk:4[X?,wayland?] )
- !gtk4? ( x11-libs/gtk+:3[X?,wayland?] )
- )
-"
-
- # pgo? ( >=llvm-core/clang-22.0.0_pre20260106 >=llvm-core/lld-22.0.0_pre20260106 )
-BDEPEND="
- ${COMMON_SNAPSHOT_DEPEND}
- ${PYTHON_DEPS}
- $(python_gen_any_dep '
- dev-python/setuptools[${PYTHON_USEDEP}]
- ')
- >=app-arch/gzip-1.7
- !headless? (
- qt6? ( dev-qt/qtbase:6 )
- )
- !bundled-toolchain? ( $(llvm_gen_dep '
- llvm-core/clang:${LLVM_SLOT}
- llvm-core/llvm:${LLVM_SLOT}
- llvm-core/lld:${LLVM_SLOT}
- cfi? ( llvm-runtimes/clang-runtime:${LLVM_SLOT}[sanitize] )
- official? (
- !ppc64? ( llvm-runtimes/compiler-rt-sanitizers:${LLVM_SLOT}[cfi] )
- ) ')
- ${RUST_DEPEND}
- )
- >=dev-util/bindgen-0.72.1
- >=dev-build/gn-${GN_MIN_VER}
- >=dev-lang/go-${GO_MIN_VER}
- app-alternatives/ninja
- dev-lang/perl
- >=dev-util/gperf-3.2
- dev-util/esbuild:${ESBUILD_VER}
- dev-vcs/git
- >=net-libs/nodejs-${NODE_VER}[inspector]
- sys-apps/hwdata
- >=sys-devel/bison-2.4.3
- sys-devel/flex
- virtual/pkgconfig
- x11-misc/xdg-utils
-"
-
-if ! has chromium_pkg_die ${EBUILD_DEATH_HOOKS}; then
- EBUILD_DEATH_HOOKS+=" chromium_pkg_die";
-fi
-
-DISABLE_AUTOFORMATTING="yes"
-DOC_CONTENTS="
-Some web pages may require additional fonts to display properly.
-Try installing some of the following packages if some characters
-are not displayed properly:
-- media-fonts/arphicfonts
-- media-fonts/droid
-- media-fonts/ipamonafont
-- media-fonts/noto
-- media-fonts/ja-ipafonts
-- media-fonts/takao-fonts
-- media-fonts/wqy-microhei
-- media-fonts/wqy-zenhei
-
-To fix broken icons on the Downloads page, you should install an icon
-theme that covers the appropriate MIME types, and configure this as your
-GTK+ icon theme.
-
-For native file dialogs in KDE, install kde-apps/kdialog.
-
-To make password storage work with your desktop environment you may
-have install one of the supported credentials management applications:
-- app-crypt/libsecret (GNOME)
-- kde-frameworks/kwallet (KDE)
-If you have one of above packages installed, but don't want to use
-them in Chromium, then add --password-store=basic to CHROMIUM_FLAGS
-in /etc/chromium/default.
-"
-
-S="${WORKDIR}/chromium-${PV/_*}"
-
-python_check_deps() {
- python_has_version "dev-python/setuptools[${PYTHON_USEDEP}]"
-}
-
-pre_build_checks() {
- # Check build requirements: bugs #471810, #541816, #914220
- # We're going to start doing maths here on the size of an unpacked source tarball,
- # this should make updates easier as chromium continues to balloon in size.
- # xz -l /var/cache/distfiles/chromium-${PV}*.tar.xz
- local base_disk=9 # Round up
- use test && base_disk=$((base_disk + 5))
- local extra_disk=1 # Always include a little extra space
- local memory=4
- tc-is-cross-compiler && extra_disk=$((extra_disk * 2))
- if tc-is-lto || use pgo; then
- memory=$((memory * 2 + 1))
- tc-is-cross-compiler && extra_disk=$((extra_disk * 2)) # Double the requirements
- use pgo && extra_disk=$((extra_disk + 4))
- fi
- if is-flagq '-g?(gdb)?([1-9])'; then
- if use custom-cflags; then
- extra_disk=$((extra_disk + 5))
- fi
- memory=$((memory * 2))
- fi
- local CHECKREQS_MEMORY="${memory}G"
- local CHECKREQS_DISK_BUILD="$((base_disk + extra_disk))G"
- check-reqs_${EBUILD_PHASE_FUNC}
-}
-
-pkg_pretend() {
- if [[ ${MERGE_TYPE} != binary ]]; then
- # The pre_build_checks are all about compilation resources, no need to run it for a binpkg
- pre_build_checks
- fi
-
- if use headless; then
- local headless_unused_flags=("cups" "kerberos" "pulseaudio" "qt6" "vaapi" "wayland")
- for myiuse in ${headless_unused_flags[@]}; do
- use ${myiuse} && ewarn "Ignoring USE=${myiuse}, USE=headless is set."
- done
- fi
-
- if ! use bindist && use ffmpeg-chromium; then
- ewarn "Ignoring USE=ffmpeg-chromium, USE=bindist is not set."
- fi
- if use libcxx; then
- ewarn
- ewarn "Building with libcxx, please be aware that system-*"
- ewarn "and some other c++ dependencies need to be compiled"
- ewarn "with the same c++ library as ungoogled-chromium itself"
- ewarn "dev-libs/jsoncpp is most problematic, see #58 #49 #119 for details"
- ewarn "Simplest solution would be to disable corresponding system-* flags"
- ewarn
- fi
- if use cfi; then
- ewarn
- ewarn "Building with cfi is only possible if building with -stdlib=libc++"
- ewarn "Make sure all dependencies are also built this way, see #40"
- ewarn
- fi
- if use cromite; then
- ewarn
- ewarn "Cromite patches are very experimental and unstable"
- ewarn "Please consider testing them and giving feedback upstream:"
- ewarn "https://github.com/uazo/cromite/issues"
- ewarn "Not all patches are applied, let me know if others should be considered too"
- ewarn
- fi
-}
-
-pkg_setup() {
- if [[ ${MERGE_TYPE} != binary ]]; then
- # The pre_build_checks are all about compilation resources, no need to run it for a binpkg
- pre_build_checks
-
- # We haven't massaged any CFLAGS yet, so we want to do this before we force CC/CXX to prevent warnings.
- local want_lto="false"
- tc-is-lto && want_lto="true"
-
- # The linux:unbundle toolchain in GN grabs CC, CXX, CPP (etc) from the environment
- # We'll set these to clang here then use llvm-utils functions to very explicitly set these
- # to a sane value.
- # This is effectively the 'force-clang' path if GCC support is re-added.
- if use !bundled-toolchain; then
- llvm-r1_pkg_setup
- rust_pkg_setup
-
- if tc-ld-is-mold; then
- ewarn "Mold is currently not supported, it will not be used"
- fi
-
- # Forcing clang; respect llvm_slot_x to enable selection of impl via LLVM_COMPAT
- AR=llvm-ar
- CPP="${CHOST}-clang++-${LLVM_SLOT} -E"
- NM=llvm-nm
- CC="${CHOST}-clang-${LLVM_SLOT}"
- CXX="${CHOST}-clang++-${LLVM_SLOT}"
- fi
-
- # LTO in Chromium means LLVM ThinLTO, if GCC support is re-added
- # We'll need to handle that here too.
- use_lto="false"
- local lto_usable="true"
- if [[ "$want_lto" == "true" ]]; then
- if use arm64 && [[ "${LLVM_SLOT}" -lt 22 ]]; then
- einfo "LTO is broken with LLVM 21 on arm64, ignoring CFLAGS."
- lto_usable="false"
- else
- use_lto="true"
- fi
- # We can rely on GN to do this for us; without this builds
- # take significantly longer with LTO enabled.
- filter-lto
- fi
-
- if [[ "$use_lto" == "false" ]] && use official && [[ "$lto_usable" == "true" ]]; then
- einfo "USE=official selected and LTO not detected."
- einfo "It is _highly_ recommended that LTO be enabled for performance reasons"
- einfo "and to be consistent with the upstream \"official\" build optimisations."
- fi
-
- if [[ "$use_lto" == "false" ]] && use test; then
- die "Tests require CFI which requires LTO"
- fi
-
- export use_lto
-
- if tc-is-cross-compiler; then
- use pgo && die "The pgo USE flag cannot be used when cross-compiling"
- CPP="${CBUILD}-clang++-${LLVM_SLOT} -E"
- fi
-
- # Sanity checks for development convenience
- if ver_test $(gn --version || die) -lt ${GN_MIN_VER}; then
- die "dev-build/gn >= ${GN_MIN_VER} is required to build this Chromium"
- fi
-
- # Sometimes, when adding a new LLVM slot, devs (me) forget to install an appropriate lld.
- if tc-ld-is-lld; then
- local lld_ver=$(ld.lld --version | awk '{split($2,a,"."); print a[1]}' || die "Failed to check lld version")
- if [[ ${lld_ver} -lt ${LLVM_SLOT} ]]; then
- die "Your lld version (${lld_ver}) is too old for the selected LLVM slot (${LLVM_SLOT}). Please install a newer lld or select an older LLVM slot."
- fi
- fi
- fi
-
- chromium_suid_sandbox_check_kernel_config
-}
-
-src_unpack() {
- # # Here be dragons!
- # local XCLD="--exclude=chromium-${PV/_*}/third_party/instrumented_libs \
- # --exclude=chromium-${PV/_*}/third_party/llvm \
- # --exclude=chromium-${PV/_*}/third_party/llvm-build \
- # --exclude=chromium-${PV/_*}/third_party/node/linux \
- # --exclude=chromium-${PV/_*}/third_party/rust-src \
- # --exclude=chromium-${PV/_*}/third_party/rust-toolchain \
- # --exclude=chromium-${PV/_*}/build/linux/debian_bullseye_i386-sysroot \
- # --exclude=chromium-${PV/_*}/build/linux/debian_bullseye_amd64-sysroot \
- # --exclude=chromium-${PV/_*}/third_party/angle/third_party/VK-GL-CTS \
- # "
-
- # if ! use libcxx ; then
- # XCLD+=" --exclude=chromium-${PV/_*}/third_party/libc++"
- # fi
-
- # if ! use pgo ; then
- # XCLD+=" --exclude=chromium-${PV/_*}/chrome/build/pgo_profiles"
- # fi
-
- # einfo "Unpacking chromium-${PV/_*}.tar.xz to ${WORKDIR}"
- # # Gentoo tarball:
- # # tar ${XCLD} -xf "${DISTDIR}/chromium-${PV/_*}-gentoo.tar.xz" -C "${WORKDIR}" || die
- # tar ${XCLD} -xf "${DISTDIR}/chromium-${PV/_*}${LITE_TARBALL:+-lite}.tar.xz" -C "${WORKDIR}" || die
-
- # unpack ${UGC_URL#*->}
- # # unpack chromium-patches-${PATCH_V}.tar.bz2
- # # Warned you!
-
- unpack chromium-${PV/_*}-lite.tar.xz
- unpack chromium-patches-${PATCH_V}.tar.bz2
- # These should only be required when we're not using the official toolchain
- if use !bundled-toolchain; then
- unpack chromium-patches-copium-${COPIUM_COMMIT:0:10}.tar.gz
- fi
-
- if use test; then
- # This just contains a bunch of font files that need to be unpacked (or moved) to the correct location.
- local testfonts_dir="${WORKDIR}/chromium-${PV/_*}/third_party/test_fonts/test_fonts"
- local testfonts_tar="${DISTDIR}/chromium-testfonts-${TEST_FONT:0:10}.tar.gz"
- einfo "Unpacking test fonts ..."
- tar xf "${testfonts_tar}" -C "${testfonts_dir}" || die "Failed to unpack testfonts"
- fi
-
- # We need to manually unpack this since M126 else we'd unpack one toolchain over the other.
- # Since we're doing that anyway let's unpack to sensible locations to make symlink creation easier.
- if use bundled-toolchain; then
- einfo "Unpacking bundled Clang ..."
- mkdir -p "${WORKDIR}"/clang || die "Failed to create clang directory"
- tar xf "${DISTDIR}/chromium-clang-${BUNDLED_CLANG_VER}.tar.xz" -C "${WORKDIR}/clang" || die "Failed to unpack Clang"
- einfo "Unpacking bundled Rust ..."
- local rust_dir="${WORKDIR}/rust-toolchain"
- mkdir -p "${rust_dir}" || die "Failed to create rust toolchain directory"
- tar xf "${DISTDIR}/chromium-rust-toolchain-${RUST_SHORT_HASH}-${BUNDLED_CLANG_VER%-*}.tar.xz" -C "${rust_dir}" ||
- die "Failed to unpack Rust"
- fi
-
- if use ppc64; then
- unpack chromium-openpower-${PPC64_HASH:0:10}.tar.bz2
- fi
-
- # This is a dirty hack, but we need rollup to build successfully and it's proving to be challenging
- # to build locally due to deps
- unpack rollup-wasm-node-${ROLLUP_VER}.tgz
-
- if use cromite; then
- unpack cromite-${CROMITE_COMMIT_ID}.tar.gz
- fi
-
- unpack ${UGC_URL#*->}
-}
-
-remove_compiler_builtins() {
- # We can't use the bundled compiler builtins with the system toolchain
- # We used to `grep` then `sed`, but it was indirect. Combining the two into a single
- # `awk` command is more efficient and lets us document the logic more clearly.
-
- local pattern=' configs += [ "//build/config/clang:compiler_builtins" ]'
- local target='build/config/compiler/BUILD.gn'
-
- local tmpfile
- tmpfile=$(mktemp) || die "Failed to create temporary file."
-
- if awk -v pat="${pattern}" '
- BEGIN {
- match_found = 0
- }
-
- # If the delete countdown is active, decrement it and skip to the next line.
- d > 0 { d--; next }
-
- # If the current line matches the pattern...
- $0 == pat {
- match_found = 1 # ...set our flag to true.
- d = 2 # Set delete counter for this line and the next two.
- prev = "" # Clear the buffered previous line so it is not printed.
- next
- }
-
- # For any other line, print the buffered previous line.
- NR > 1 { print prev }
-
- # Buffer the current line to be printed on the next cycle.
- { prev = $0 }
-
- END {
- # Print the last line if it was not part of a deleted block.
- if (d == 0) { print prev }
-
- # If the pattern was never found, exit with a failure code.
- if (match_found == 0) {
- exit 1
- }
- }
- ' "${target}" > "${tmpfile}"; then
- # AWK SUCCEEDED (exit code 0): The pattern was found and edited.
- # This is to avoid gawk's `-i inplace` option which users complain about.
- mv "${tmpfile}" "${target}"
- else
- # AWK FAILED (exit code 1): The pattern was not found.
- rm -f "${tmpfile}"
- die "Awk patch failed: Pattern not found in ${target}."
- fi
-}
-
-src_prepare() {
- # Calling this here supports resumption via FEATURES=keepwork
- python_setup
-
- # We'll fill this in as we go. Patches go in chromium-patches.
- local PATCHES=()
-
- rm "${WORKDIR}/chromium-patches-${PATCH_V}/common/cr131-unbundle-icu-target.patch"
- if ver_test "${RUST_SLOT}" -ge "1.95.0"; then
- sed -i '/SupportedLaneCount/d' third_party/rust/chromium_crates_io/vendor/bytemuck-v1/src/zeroable.rs || die
- sed -i '/SupportedLaneCount/d' third_party/rust/chromium_crates_io/vendor/bytemuck-v1/src/pod.rs || die
- fi
-
- sed -i '/no-lifetime-safety-inference/d' third_party/dawn/src/utils/BUILD.gn || die
- sed -i '/no-experimental-lifetime-safety-tu-analysis/d' third_party/dawn/src/utils/BUILD.gn || die
-
- PATCHES+=(
- "${WORKDIR}/chromium-patches-${PATCH_V}/common/"
- "${FILESDIR}/restore-x86-r4.patch"
- "${FILESDIR}/chromium-151-cbor-fix.patch"
- "${FILESDIR}/chromium-152-ffmpeg-fix.patch"
- "${FILESDIR}/chromium-152-unbundle-minizip-undo-unicode.patch"
- )
-
- # So many fontconfig magic numbers to cover
- # TODO: once upstream roll to 2.18.2+ set that as our minimum and remove this logic.
- # <=2.17.1 -> 9
- # >2.17.1 && <2.18.2 -> 11
- # >=2.18.2 -> 12
- local fontconfig_cache_magic=9
- if has_version ">=media-libs/fontconfig-2.18.2"; then
- fontconfig_cache_magic=12
- elif has_version ">media-libs/fontconfig-2.17.1"; then
- fontconfig_cache_magic=11
- fi
-
- sed -E -i \
- -e "s#(fb5c91b2895aa445d23aebf7f9e2189c-le64\.cache-)(9|10|11|12)#\1${fontconfig_cache_magic}#g" \
- third_party/test_fonts/fontconfig/BUILD.gn || die "Failed to set fontconfig cache magic in BUILD.gn"
-
- #cp -f ${WORKDIR}/chromium-patches-${PATCH_V}/*-compiler.patch "${T}/compiler.patch"
- ##cp -f ${FILESDIR}/chromium-147-compiler.patch "${T}/compiler.patch"
- #if ! use custom-cflags; then #See #25 #92
- # sed -i '/default_stack_frames/Q' "${T}/compiler.patch" || die
- #fi
-
- sed -E -i \
- -e "s#(kCacheKey \+ \"/-le64\.cache-)(9|10|11|12)(\")#\1${fontconfig_cache_magic}\3#g" \
- -e "s#(kCacheKey \+ \"-le64\.cache-)(9|10|11|12)(\")#\1${fontconfig_cache_magic}\3#g" \
- third_party/test_fonts/fontconfig/generate_fontconfig_caches.cc || \
- die "Failed to set fontconfig cache magic in generate_fontconfig_caches.cc"
-
- if use bundled-toolchain; then
- # We need to symlink the toolchain into the expected location
- einfo "Symlinking Clang toolchain to expected location ..."
- mkdir -p third_party/llvm-build/ || die "Failed to create llvm-build directory"
- # the 'Chromium Linux Tarballs' seem to already have 'Release+Asserts/{lib,bin}'; not sure if this is an
- # upstream change - we're using the same scripts to build, theoretically. We'll still attempt to create
- # llvm-build, but we'll rm Release+Asserts and symlink directly.
- if [[ -d third_party/llvm-build/Release+Asserts ]]; then
- rm -r third_party/llvm-build/Release+Asserts || die "Failed to remove third_party/llvm-build/Release+Asserts"
- fi
- ln -s "${WORKDIR}"/clang third_party/llvm-build/Release+Asserts || die "Failed to bundle Clang"
- einfo "Symlinking Rust toolchain to expected location ..."
- # As above, so below
- if [[ -d third_party/rust-toolchain ]]; then
- rm -r third_party/rust-toolchain || die "Failed to remove third_party/rust-toolchain"
- fi
- ln -s "${WORKDIR}"/rust-toolchain third_party/rust-toolchain || die "Failed to bundle rust"
- cp "${WORKDIR}"/rust-toolchain/VERSION \
- "${WORKDIR}"/rust-toolchain/INSTALLED_VERSION || die "Failed to set rust version"
- else
- # We don't need our toolchain patches if we're using the official toolchain
-
- # Copium patches go here.
- PATCHES+=(
- "${WORKDIR}/copium/cr143-libsync-__BEGIN_DECLS.patch"
- )
-
- # Automate conditional application of chromium-patches
- # The directory structure is expected to be something like:
- # chromium-patches-145/
- # ├── toolchain/
- # │ ├── cr123-foo.patch
- # │ └── cr135-bar.patch
- # ├── llvm/
- # │ ├── cr144-baz.patch
- # │ └── lt-23/
- # │ └── cr145-bleeding-edge-llvm-feature.patch
- # Where `lt-23` means "apply this patch if the LLVM version is less than 23".
- # Only categories in `slot_map` will be checked for version constraints.
- shopt -s nullglob
- local -A slot_map=( [llvm]="${LLVM_SLOT}" [rust]="${RUST_SLOT}" )
-
- for category in "${WORKDIR}/chromium-patches-${PATCH_V}"/*/; do
- local category_name="${category%/}"
- category_name="${category_name##*/}"
-
- # Skip arch-specific categories
- if [[ "${category_name}" == "ppc64le" ]]; then
- use ppc64 || continue
- fi
-
- # We applied common patches above, no need to apply them again here
- [[ "${category_name}" == "common" ]] && continue
-
- # Unconditional patches for this category
- local category_patches=( "${category}"*.patch )
- [[ ${#category_patches[@]} -gt 0 ]] && PATCHES+=( "${category}" )
-
- # Version-constrained subdirectories (e.g., llvm/lt-23/)
- for constraint_dir in "${category}"*/; do
- local dir_name="${constraint_dir%/}"
- dir_name="${dir_name##*/}"
- if [[ "${dir_name}" =~ ^lt-(.*)$ && -v slot_map[${category_name}] ]]; then
- ver_test "${slot_map[${category_name}]}" -lt "${BASH_REMATCH[1]}" &&
- PATCHES+=( "${constraint_dir}" )
- fi
- done
- done
-
- shopt -u nullglob
-
- # Strictly speaking this doesn't need to be gated (no bundled toolchain for ppc64); it keeps the logic together
- if use ppc64; then
- local patchset_dir="${WORKDIR}/openpower-patches-${PPC64_HASH}/patches"
- # patch causes build errors on 4K page systems (https://bugs.gentoo.org/show_bug.cgi?id=940304)
- local page_size_patch="ppc64le/third_party/use-sysconf-page-size-on-ppc64.patch"
- local isa_3_patch="ppc64le/core/baseline-isa-3-0.patch"
- # Apply the OpenPOWER patches (check for page size and isa 3.0)
- openpower_patches=( $(grep -E "^ppc64le|^upstream" "${patchset_dir}/series" | grep -v "${page_size_patch}" |
- grep -v "${isa_3_patch}" || die) )
- for patch in "${openpower_patches[@]}"; do
- PATCHES+=( "${patchset_dir}/${patch}" )
- done
- if [[ $(getconf PAGESIZE) == 65536 ]]; then
- PATCHES+=( "${patchset_dir}/${page_size_patch}" )
- fi
- # We use vsx3 as a proxy for 'want isa3.0' (POWER9)
- if use cpu_flags_ppc_vsx3 ; then
- PATCHES+=( "${patchset_dir}/${isa_3_patch}" )
- fi
- fi
-
- remove_compiler_builtins
-
- # We can't rely on the eselect'd Rust to actually include rustfmt, so we'll point to the selected slot specifically.
- local suffix=""
- if [[ "${RUST_TYPE}" == "binary" ]]; then
- suffix="-bin-${RUST_SLOT}"
- else
- suffix="-${RUST_SLOT}"
- fi
- sed -i "s|/bin/rustfmt|/bin/rustfmt${suffix}|g" build/rust/rust_bindgen_generator.gni ||
- die "Failed to update rustfmt path"
-
- fi
-
- # Do this before we apply patches since (e.g.) ppc64 needs to patch rollup and it's easier in ${S}
- einfo "Moving rollup wasm-node package into place ..."
- mkdir -p third_party/devtools-frontend/src/node_modules/@rollup/wasm-node ||
- die "Failed to create node_modules/@rollup/wasm-node"
- mv "${WORKDIR}"/package/* third_party/devtools-frontend/src/node_modules/@rollup/wasm-node ||
- die "Failed to move rollup package"
-
- if [ ! -z "${CHROMIUM_COMMITS[*]}" ]; then
- # for i in "${CHROMIUM_COMMITS[@]}"; do
- for i in "${!CHROMIUM_COMMITS[@]}"; do
- if [[ ${CHROMIUM_COMMITS[$i]} =~ webrtc ]]; then
- patch_prefix="webrtc"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ angle ]]; then
- patch_prefix="angle"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ quiche ]]; then
- patch_prefix="quiche"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ dawn ]]; then
- patch_prefix="dawn"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ perfetto ]]; then
- patch_prefix="perfetto"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ink ]]; then
- patch_prefix="ink"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ vulkan-utility-libraries ]]; then
- patch_prefix="vulkan-utility-libraries"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ ruy ]]; then
- patch_prefix="ruy"
- elif [[ ${CHROMIUM_COMMITS[$i]} =~ devtools-frontend ]]; then
- patch_prefix="devtools-frontend"
- else
- patch_prefix="chromium"
- fi
- pushd "${CHROMIUM_COMMITS[$i]}" > /dev/null || die
- if [[ $i = -* ]]; then
- einfo "Reverting ${patch_prefix}-${i/-}.patch"
- git_wrapper apply -R --exclude="*unittest.cc" --exclude="DEPS" \
- -p1 < "${DISTDIR}/${patch_prefix}-${i/-}.patch"
- else
- einfo "Applying ${patch_prefix}-${i/-}.patch"
- git_wrapper apply --exclude="*unittest.cc" --exclude="DEPS" \
- -p1 < "${DISTDIR}/${patch_prefix}-${i/-}.patch"
- fi
- popd > /dev/null || die
- done
- fi
-
- if ! use bluetooth ; then
- PATCHES+=(
- "${FILESDIR}/disable-bluez-r7.patch"
- )
- fi
-
- if use convert-dict ; then
- PATCHES+=(
- "${FILESDIR}/chromium-ucf-dict-utility-r3.patch"
- )
- fi
-
- if ! use libcxx ; then
- PATCHES+=(
- "${FILESDIR}/fix-wayland-oncecallback-copy.patch"
- )
- fi
-
- if use system-ffmpeg; then
- PATCHES+=(
- "${FILESDIR}/chromium-141-opus-mp3.patch"
- "${FILESDIR}/chromium-135-hevc.patch"
- )
- sed -i "\!AVFMT_FLAG_NOH264PARSE!d" media/filters/ffmpeg_glue.cc || die
- ewarn "You need to expose \"av_stream_get_first_dts\" in ffmpeg via user patch"
- fi
-
- if use system-av1; then
- PATCHES+=(
- "${FILESDIR}/chromium-system-av1.patch"
- )
- fi
-
- if use system-libvpx; then
- PATCHES+=(
- "${FILESDIR}/chromium-system-libvpx.patch"
- )
- fi
-
- if use system-openjpeg ; then
- PATCHES+=(
- "${FILESDIR}/chromium-system-openjpeg-r4.patch"
- )
- fi
-
- # if use x86 ; then
- # #* Fixes a segfault in transport_security_state_generator
- # PATCHES+=(
- # "${FILESDIR}/fix-segfault-x86.patch"
- # )
- # fi
-
- # Testing all patches when NODIE is defined
- if [ ! -z "${NODIE}" ]; then
- for i in "${PATCHES[@]}"; do
- eapply_wrapper "$i"
- done
- nonfatal eapply_user
- else
- default
- fi
-
- if use cromite ; then
- BR_PA_PATH="${WORKDIR}/cromite-${CROMITE_COMMIT_ID}/build/patches"
-
- sed -i '/b\/components\/components_strings\.grd/,+10d' "${BR_PA_PATH}/Add-cromite-flags-support.patch" || die
- sed -i '/b\/chrome\/android\/java\/res\/xml\/privacy_preferences\.xml/,+13d' "${BR_PA_PATH}/Add-cromite-flags-support.patch" || die
- sed -i '/b\/android_webview\/support_library\/java\/src\/org\/chromium\/support_lib_glue/,+11d' "${BR_PA_PATH}/Client-hints-overrides.patch" || die
- sed -i '/webapps_strings.grdp" \/>/{s++webapps_strings.grdp" /><part file="cromite_components_strings_grd/placeholder.txt"/>+;h};${x;/./{x;q0};x;q1}' \
- components/components_strings.grd || die
-
- sed -i 's/absl::/std::/' "${BR_PA_PATH}/Add-a-proxy-configuration-page.patch" || die
-
- filterdiff -p1 "${BR_PA_PATH}/JIT-site-settings.patch" --exclude="content/browser/renderer_host/render_process_host_impl.cc" \
- > "${BR_PA_PATH}/JIT-site-settings.patch1"
- mv -f "${BR_PA_PATH}/JIT-site-settings.patch1" "${BR_PA_PATH}/JIT-site-settings.patch"
-
- BROMITE_PATCHES=(
- "${BR_PA_PATH}/bromite-build-utils.patch"
- "${BR_PA_PATH}/Battery-API-return-nothing.patch"
- "${BR_PA_PATH}/Multiple-fingerprinting-mitigations.patch"
- "${BR_PA_PATH}/Add-flag-to-configure-maximum-connections-per-host.patch"
- "${BR_PA_PATH}/Add-a-proxy-configuration-page.patch"
- "${BR_PA_PATH}/Enable-StrictOriginIsolation-and-SitePerProcess.patch"
- "${BR_PA_PATH}/Disable-requests-for-single-word-Omnibar-searches.patch"
- "${BR_PA_PATH}/Reduce-HTTP-headers-in-DoH-requests-to-bare-minimum.patch"
- "${BR_PA_PATH}/Client-hints-overrides.patch"
- "${BR_PA_PATH}/Disable-idle-detection.patch"
- "${BR_PA_PATH}/Disable-TLS-resumption.patch"
- "${BR_PA_PATH}/Remove-navigator.connection-info.patch"
-
- "${BR_PA_PATH}/AudioBuffer-AnalyserNode-fp-mitigations.patch"
- "${BR_PA_PATH}/Fonts-fingerprinting-mitigation.patch"
- "${BR_PA_PATH}/Content-settings-infrastructure.patch"
- "${BR_PA_PATH}/Add-autoplay-site-setting.patch"
- "${BR_PA_PATH}/Site-setting-for-images.patch"
- "${BR_PA_PATH}/JIT-site-settings.patch"
- "${BR_PA_PATH}/Add-webGL-site-setting.patch"
- "${BR_PA_PATH}/Add-webRTC-site-settings.patch"
- "${BR_PA_PATH}/Show-site-settings-for-cookies-javascript-and-ads.patch"
- "${BR_PA_PATH}/Viewport-Protection-flag.patch"
- "${BR_PA_PATH}/Revert-remove-allowscript-content-setting-secondary-url.patch"
- "${BR_PA_PATH}/Timezone-customization.patch"
- "${BR_PA_PATH}/Disable-speechSynthesis-getVoices-API.patch"
- "${BR_PA_PATH}/Remove-support-for-device-memory-and-cpu-recovery.patch"
- "${BR_PA_PATH}/Disable-Feeback-Collector.patch"
- "${BR_PA_PATH}/Disable-remote-altsvc-for-h3-connections.patch"
- "${BR_PA_PATH}/Add-cromite-flags-support.patch"
- "${BR_PA_PATH}/Enables-deactivation-of-the-js-debugger-statement.patch"
- )
- for i in "${BROMITE_PATCHES[@]}"; do
- if [[ "$i" =~ "Add-autoplay-site-setting.patch" ]] ||
- [[ "$i" =~ "JIT-site-settings.patch" ]] ||
- [[ "$i" =~ "Site-setting-for-images.patch" ]]; then
- einfo "Git binary patch: ${i##*/}"
- git_wrapper apply -p1 < "$i"
- else
- filter_wrapper "$i" --exclude="chrome/android/*"
- fi
- done
-
- #! conflicting patches
- sed -i '/browser_features.cc/,+17d' \
- "${UGC_WD}/patches/extra/ungoogled-chromium/add-flag-to-clear-data-on-exit.patch" || die
- sed -i 's$} // namespace features$BASE_FEATURE(kClearDataOnExit, "ClearDataOnExit", base::FEATURE_DISABLED_BY_DEFAULT);}$' \
- chrome/browser/browser_features.cc || die
- sed -i 's$} // namespace features$BASE_DECLARE_FEATURE(kClearDataOnExit);}$' \
- chrome/browser/browser_features.h || die
- sed -i 's$kChromeUIAboutHost,$kChromeUIAboutHost,"ungoogled-first-run",$' \
- chrome/common/webui_url_constants.cc || die
- sed -i '/chrome\/common\/webui_url_constants.cc/Q' \
- "${UGC_WD}/patches/extra/ungoogled-chromium/first-run-page.patch" || die
-
- #! normalise paths in py
- sed -i 's$os.path.dirname(include_file)$os.path.abspath(os.path.dirname(include_file))$' \
- build/bromite/gyp/cpp_bromite_include.py || die
- fi
-
- # if [[ ${LLVM_SLOT} == "19" ]]; then
- # # Upstream now hard depend on a feature that was added in LLVM 20.1, but we don't want to stabilise that yet.
- # # Do the temp file shuffle in case someone is using something other than `gawk`
- # {
- # awk '/config\("clang_warning_suppression"\) \{/ { print $0 " }"; sub(/clang/, "xclang"); print; next }
- # { print }' build/config/compiler/BUILD.gn > "${T}/build.gn" && \
- # mv "${T}/build.gn" build/config/compiler/BUILD.gn
- # } || die "Unable to disable warning suppression"
- # fi
-
- ## Not included in -lite tarballs, but we should check for it anyway.
- #if [[ -f third_party/node/linux/node-linux-x64/bin/node ]]; then
- # rm third_party/node/linux/node-linux-x64/bin/node || die
- #else
- # mkdir -p third_party/node/linux/node-linux-x64/bin || die
- #fi
- #ln -s "${EPREFIX}"/usr/bin/node third_party/node/linux/node-linux-x64/bin/node || die
-
- cp "${FILESDIR}/libusb.gn" build/linux/unbundle || die
- sed -i '/^REPLACEMENTS.*$/{s++REPLACEMENTS = {"libusb":"third_party/libusb/BUILD.gn",+;h};${x;/./{x;q0};x;q1}' \
- build/linux/unbundle/replace_gn_files.py || die
- sed -i '/^.*deps.*third_party\/jsoncpp.*$/{s++public_deps \+= [ "//third_party/jsoncpp" ]+;h};${x;/./{x;q0};x;q1}' \
- third_party/webrtc/rtc_base/BUILD.gn || die
-
- if use override-data-dir; then
- sed -i '/"chromium";/{s++"ungoogled-chromium";+;h};${x;/./{x;q0};x;q1}' \
- chrome/common/chrome_paths_linux.cc || die
- fi
-
- if use system-abseil-cpp; then
- eapply_wrapper "${FILESDIR}/chromium-147-system-abseil.patch"
-
- #! SFINAE mangling incompatibility between clang and gcc:
- #! https://github.com/llvm/llvm-project/issues/85656
- #! gcc: _ZN4absl12lts_202601074CordC1INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELi0EEEOT_
- #! clang: _ZN4absl12lts_202601074CordC1INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEETnNSt9enable_ifIXsr3std7is_sameIT_S8_EE5valueEiE4typeELi0EEEOSA_
- #! So, either this:
- eapply_wrapper "${FILESDIR}/chromium-141-system-abseil-cord.patch"
- #! or build with -fclang-abi-compat=17
-
- # cp -f /usr/include/absl/base/options.h third_party/abseil-cpp/absl/base/options.h
- # sed -i '/^#define ABSL_OPTION_USE_STD_ORDERING.*$/{s++#define ABSL_OPTION_USE_STD_ORDERING 1+;h};${x;/./{x;q0};x;q1}' \
- # third_party/abseil-cpp/absl/base/options.h || die
- fi
-
- #* Applying UGC PRs here
- if [ ! -z "${UGC_PR_COMMITS[*]}" ]; then
- pushd "${UGC_WD}" >/dev/null
- for i in "${UGC_PR_COMMITS[@]}"; do
- eapply_wrapper "${DISTDIR}/${PN}-$i.patch"
- done
- popd >/dev/null
- fi
-
- # From here we adapt ungoogled-chromium's patches to our needs
- local ugc_pruning_list="${UGC_WD}/pruning.list"
- local ugc_patch_series="${UGC_WD}/patches/series"
- local ugc_substitution_list="${UGC_WD}/domain_substitution.list"
-
- local ugc_unneeded=(
- # GN bootstrap
- extra/debian/gn/parallel
- # following Gentoo's Chromium
- core/ungoogled-chromium/build-with-wasm-rollup
- )
-
- if use cromite ; then
- einfo "Using fingerprinting patches from Cromite instead"
- ugc_unneeded+=(
- extra/bromite/fingerprinting-flags-client-rects-and-measuretext
- extra/bromite/flag-max-connections-per-host
- extra/bromite/flag-fingerprinting-canvas-image-data-noise
- extra/ungoogled-chromium/add-components-ungoogled
- extra/ungoogled-chromium/remove-pac-size-limit
- )
- fi
-
- # #* Temporary fix
- # sed -i "\!ios/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/icu/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/libjpeg_turbo/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/snappy/!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/closure_compiler/!d" "${ugc_pruning_list}" || die
-
- # #* Didn't unpack them at the first place
- # sed -i "\!build/linux/debian_bullseye_i386-sysroot!d" "${ugc_pruning_list}" || die
- # sed -i "\!build/linux/debian_bullseye_amd64-sysroot!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/llvm-build!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/node/linux!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/rust-src!d" "${ugc_pruning_list}" || die
- # sed -i "\!third_party/rust-toolchain!d" "${ugc_pruning_list}" || die
- # if ! use libcxx ; then
- # sed -i "\!third_party/libc!d" "${ugc_pruning_list}" || die
- # fi
- sed -i "s|debug('files|error('files|" \
- "${UGC_WD}/utils/prune_binaries.py" || die
- sed -i "\!third_party/node/linux!d" \
- "${UGC_WD}/utils/prune_binaries.py" || die
-
- local ugc_p ugc_dir
- for p in "${ugc_unneeded[@]}"; do
- einfo "Removing ${p}.patch"
- sed -i "\!${p}.patch!d" "${ugc_patch_series}" || die
- done
-
- if [ ! -z "${UGC_SKIP_PATCHES}" ]; then
- for p in ${UGC_SKIP_PATCHES}; do
- ewarn "Removing ${p}"
- sed -i "\!${p}!d" "${ugc_patch_series}" || die
- done
- fi
-
- if [ ! -z "${UGC_KEEP_BINARIES}" ]; then
- for p in ${UGC_KEEP_BINARIES}; do
- ewarn "Keeping binary ${p}"
- sed -i "\!${p}!d" "${ugc_pruning_list}" || die
- done
- fi
-
- if [ ! -z "${UGC_SKIP_SUBSTITUTION}" ]; then
- for p in ${UGC_SKIP_SUBSTITUTION}; do
- ewarn "No substitutions in ${p}"
- sed -i "\!${p}!d" "${ugc_substitution_list}" || die
- done
- fi
-
- ebegin "Pruning binaries"
- "${UGC_WD}/utils/prune_binaries.py" -q . "${UGC_WD}/pruning.list"
- eend $? || die
-
- ebegin "Applying ungoogled-chromium patches"
- "${UGC_WD}/utils/patches.py" -q apply . "${UGC_WD}/patches"
- eend $? || die
-
- ebegin "Applying domain substitution"
- "${UGC_WD}/utils/domain_substitution.py" -q apply -r "${UGC_WD}/domain_regex.list" -f "${UGC_WD}/domain_substitution.list" .
- eend $? || die
-
- # Sanity check esbuild version before we start removing files.
- # We _could_ patch the version check out - in theory esbuild upstream are being super conservative after
- # arch(AUR) packaged an `esbuild` binary and set ESBUILD_BINARY_PATH=/usr/bin/esbuild, causing much breakage,
- # but this is fine too and exactly matches what upstream are expecting.
- # https://github.com/evanw/esbuild/issues/2894
- local esbuild_js="${S}/third_party/devtools-frontend/src/node_modules/esbuild/lib/main.js"
- local found
- found=$(awk -F'"' '/if \(binaryVersion !==/ {print $2}' "${esbuild_js}")
- if [[ "${found}" != "${ESBUILD_VER}" ]]; then
- die "esbuild version mismatch: expected ${ESBUILD_VER}, found ${found}"
- fi
-
- elog "Removing bundled binaries from source tree ..."
- # Purge bundled ELF files: These are non-portable and will cause issues if used instead of system versions.
- # Use `--wasm` to also remove WebAssembly binaries, if desired - they're portable so shouldn't break builds.
- ${EPYTHON} "${FILESDIR}/bin-finder.py" --elf "${S}" | awk '{print $1}' | xargs rm -f ||
- die "Failed to remove bundled binaries"
-
- # And now we restore any that we actually need, from the host system
- local esbuild_path="${S}/third_party/devtools-frontend/src/third_party/esbuild"
- local -A restore_list=(
- ["/usr/bin/esbuild-${ESBUILD_VER}"]="${esbuild_path}/esbuild"
- ["/usr/bin/gperf"]="${S}/third_party/gperf/cipd/bin/gperf"
- ["/usr/bin/node"]="${S}/third_party/node/linux/node-linux-x64/bin/node"
- )
-
- for src in "${!restore_list[@]}"; do
- dst="${restore_list[${src}]}"
- if [[ -f "${src}" ]]; then
- einfo "Symlinking ${src} ..."
- # Make sure the parent dir exists; some tarballs don't include (e.g.) node's bindir
- mkdir -p "$(dirname "${dst}")" || die "Failed to create directory for ${dst}"
- ln -s "${src}" "${dst}" || die "Failed to symlink ${dst} from ${src}"
- if [[ ! -L "${dst}" || "$(readlink -f "${dst}")" != "${src}" ]]; then
- die "Symlink verification failed for ${dst} -> ${src}"
- fi
- else
- die "Expected to find ${src} to restore ${dst}, but it does not exist."
- fi
- done
-
- # adjust python interpreter version
- sed -i -e "s|\(^script_executable = \).*|\1\"${EPYTHON}\"|g" .gn || die
-
- # Use the system copy of hwdata's usb.ids
- sed 's|//third_party/usb_ids/src/usb.ids|/usr/share/hwdata/usb.ids|g' \
- -i services/device/public/cpp/usb/BUILD.gn || die "Failed to set system usb.ids path"
-
- # remove_bundled_libraries.py walks the source tree and looks for paths containing the substring 'third_party'
- # whitelist matches use the right-most matching path component, so we need to whitelist from that point down.
- local keeplibs=(
- base/third_party/cityhash
- )
- use system-double-conversion || keeplibs+=(
- base/third_party/double_conversion
- )
- keeplibs+=(
- base/third_party/icu
- base/third_party/nspr
- base/third_party/superfasthash
- base/third_party/symbolize
- base/third_party/xdg_user_dirs
- buildtools/third_party/libc++
- buildtools/third_party/libc++abi
- )
- use cromite && keeplibs+=(
- cromite_flags/third_party
- )
- keeplibs+=(
- net/third_party/mozilla_security_manager
- net/third_party/quic
- net/third_party/uri_template
- )
- use system-abseil-cpp || keeplibs+=(
- third_party/abseil-cpp
- )
- keeplibs+=(
- third_party/angle
- third_party/angle/src/common/third_party/xxhash
- third_party/angle/src/third_party/ceval
- )
- use nvidia || keeplibs+=(
- third_party/angle/src/third_party/libXNVCtrl
- )
- keeplibs+=(
- third_party/angle/src/third_party/volk
- third_party/anonymous_tokens
- third_party/apple_apsl
- third_party/axe-core
- third_party/bidimapper
- third_party/blink
- third_party/boringssl
- third_party/boringssl/src/third_party/fiat
- third_party/breakpad
- third_party/breakpad/breakpad/src/third_party/curl
- )
- use system-brotli || keeplibs+=(
- third_party/brotli
- )
- keeplibs+=(
- third_party/catapult
- third_party/catapult/common/py_vulcanize/third_party/rcssmin
- third_party/catapult/common/py_vulcanize/third_party/rjsmin
- third_party/catapult/third_party/beautifulsoup4-4.9.3
- third_party/catapult/third_party/html5lib-1.1
- third_party/catapult/third_party/polymer
- third_party/catapult/third_party/six
- third_party/catapult/third_party/typ
- third_party/catapult/tracing/third_party/d3
- third_party/catapult/tracing/third_party/gl-matrix
- third_party/catapult/tracing/third_party/jpeg-js
- third_party/catapult/tracing/third_party/jszip
- third_party/catapult/tracing/third_party/mannwhitneyu
- third_party/catapult/tracing/third_party/oboe
- third_party/catapult/tracing/third_party/pako
- third_party/ced
- third_party/cld_3
- third_party/closure_compiler
- )
- use libcxx && keeplibs+=(
- third_party/compiler-rt
- )
- keeplibs+=(
- third_party/content_analysis_sdk
- third_party/cpuinfo
- third_party/crabbyavif
- third_party/crashpad
- third_party/crashpad/crashpad/third_party/lss
- third_party/crashpad/crashpad/third_party/zlib
- )
- use system-crc32c || keeplibs+=(
- third_party/crc32c
- )
- keeplibs+=(
- third_party/cros_system_api
- third_party/d3
- third_party/dawn
- third_party/dawn/third_party/gn/webgpu-cts
- third_party/dawn/third_party/OpenGL-Registry
- third_party/dawn/third_party/renderdoc
- third_party/dawn/third_party/webgpu-headers
- third_party/depot_tools
- third_party/devscripts
- third_party/devtools-frontend
- third_party/devtools-frontend/src/front_end/third_party/acorn
- third_party/devtools-frontend/src/front_end/third_party/additional_readme_paths.json
- third_party/devtools-frontend/src/front_end/third_party/axe-core
- third_party/devtools-frontend/src/front_end/third_party/chromium
- third_party/devtools-frontend/src/front_end/third_party/codemirror
- third_party/devtools-frontend/src/front_end/third_party/csp_evaluator
- third_party/devtools-frontend/src/front_end/third_party/diff
- third_party/devtools-frontend/src/front_end/third_party/i18n
- third_party/devtools-frontend/src/front_end/third_party/intl-messageformat
- third_party/devtools-frontend/src/front_end/third_party/json5
- third_party/devtools-frontend/src/front_end/third_party/legacy-javascript
- third_party/devtools-frontend/src/front_end/third_party/lighthouse
- third_party/devtools-frontend/src/front_end/third_party/lit
- third_party/devtools-frontend/src/front_end/third_party/marked
- third_party/devtools-frontend/src/front_end/third_party/puppeteer
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/third_party/mitt
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/third_party/parsel-js
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/third_party/rxjs
- third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/third_party/urlpattern-polyfill
- third_party/devtools-frontend/src/front_end/third_party/source-map-scopes-codec
- third_party/devtools-frontend/src/front_end/third_party/third-party-web
- third_party/devtools-frontend/src/front_end/third_party/vscode.web-custom-data
- third_party/devtools-frontend/src/front_end/third_party/wasmparser
- third_party/devtools-frontend/src/front_end/third_party/web-vitals
- third_party/devtools-frontend/src/third_party
- third_party/dom_distiller_js
- third_party/dragonbox
- third_party/eigen3
- third_party/emoji-segmenter
- third_party/farmhash
- third_party/fast_float
- third_party/fdlibm
- third_party/federated_compute/chromium/fcp/confidentialcompute
- third_party/federated_compute/chromium/fcp/protos
- third_party/federated_compute/chromium/fcp/secagg
- third_party/federated_compute/chromium/fcp/client
- third_party/federated_compute/src/fcp/base
- third_party/federated_compute/src/fcp/confidentialcompute
- third_party/federated_compute/src/fcp/protos
- third_party/federated_compute/src/fcp/client
- third_party/federated_compute/src/fcp/secagg
- third_party/federated_compute/third_party/googleapis/src/google
- third_party/federated_compute/third_party/tensorflow-federated
- third_party/federated_compute/third_party/protodatastore-cpp
- third_party/fft2d
- third_party/flatbuffers
- third_party/fp16
- third_party/freetype
- third_party/fusejs
- third_party/fxdiv
- third_party/gemmlowp
- third_party/google_input_tools
- third_party/google_input_tools/third_party/closure_library
- third_party/google_input_tools/third_party/closure_library/third_party/closure
- third_party/googletest
- third_party/gperf # We symlink system gperf, but this will purge the symlink since we tidy up afterwards.
- third_party/highway
- third_party/hunspell
- third_party/hyphenation-patterns
- third_party/ink/src/ink/brush
- third_party/ink/src/ink/color
- third_party/ink/src/ink/geometry
- third_party/ink/src/ink/rendering
- third_party/ink/src/ink/rendering/skia/common_internal
- third_party/ink/src/ink/rendering/skia/native
- third_party/ink/src/ink/rendering/skia/native/internal
- third_party/ink/src/ink/strokes
- third_party/ink/src/ink/types
- third_party/inspector_protocol
- third_party/ipcz
- third_party/jinja2
- )
- use system-jsoncpp || keeplibs+=(
- third_party/jsoncpp
- )
- keeplibs+=(
- third_party/khronos
- third_party/lens_server_proto
- third_party/leveldatabase
- third_party/libaddressinput
- third_party/libdrm
- third_party/libgav1
- third_party/libjingle
- third_party/libpfm4
- third_party/libphonenumber
- third_party/libpng
- third_party/libsecret
- third_party/libsrtp
- third_party/libsync
- third_party/libtess2/libtess2
- third_party/libtess2/src/Include
- third_party/libtess2/src/Source
- third_party/liburlpattern
- )
- use system-libusb || keeplibs+=(
- third_party/libusb
- )
- keeplibs+=(
- third_party/libva_protected_content
- )
- use system-libvpx || keeplibs+=(
- third_party/libvpx
- third_party/libvpx/source/libvpx/third_party/x86inc
- )
- keeplibs+=(
- third_party/libwebm
- third_party/libx11
- third_party/libxcb-keysyms
- third_party/libxml/chromium
- third_party/libyuv
- third_party/libzip
- third_party/lit
- )
- use libcxx && keeplibs+=(
- third_party/llvm-libc
- third_party/llvm-libc/src/shared/
- )
- keeplibs+=(
- third_party/lottie
- third_party/lss
- third_party/lzma_sdk
- third_party/mako
- third_party/markupsafe
- third_party/material_color_utilities
- third_party/metrics_proto
- third_party/minigbm
- third_party/ml_dtypes
- third_party/modp_b64
- third_party/nasm
- third_party/nearby
- third_party/neon_2_sse
- third_party/node
- third_party/oak/chromium/proto
- third_party/oak/chromium/proto/attestation
- third_party/omnibox_proto
- third_party/one_euro_filter
- third_party/openscreen
- third_party/openscreen/src/third_party/
- third_party/openscreen/src/third_party/tinycbor/src/src
- third_party/ots
- third_party/pdfium
- third_party/pdfium/third_party/agg23
- third_party/pdfium/third_party/bigint
- third_party/pdfium/third_party/freetype
- third_party/pdfium/third_party/lcms
- )
- use system-openjpeg || keeplibs+=(
- third_party/pdfium/third_party/libopenjpeg
- )
- keeplibs+=(
- third_party/pdfium/third_party/libtiff
- third_party/perfetto
- third_party/perfetto/protos/third_party/android
- third_party/perfetto/protos/third_party/chromium
- third_party/perfetto/protos/third_party/pprof
- third_party/perfetto/protos/third_party/primes
- third_party/perfetto/protos/third_party/simpleperf
- third_party/pffft
- third_party/ply
- third_party/polymer
- third_party/private_membership
- third_party/private-join-and-compute
- third_party/protobuf
- third_party/protobuf/third_party/utf8_range
- third_party/pthreadpool
- third_party/puffin
- third_party/pyjson5
- third_party/pyyaml
- third_party/rapidhash
- third_party/readability
- third_party/rnnoise
- third_party/rust
- third_party/ruy
- third_party/s2cellid
- third_party/search_engines_data
- third_party/securemessage
- third_party/selenium-atoms
- third_party/sentencepiece
- third_party/sentencepiece/src/third_party/darts_clone
- third_party/shell-encryption
- third_party/simdutf
- third_party/simplejson
- third_party/six
- third_party/skia
- third_party/skia/include/third_party/vulkan
- third_party/smhasher
- )
- use system-snappy || keeplibs+=(
- third_party/snappy
- )
- keeplibs+=(
- third_party/spirv-headers
- third_party/spirv-tools
- third_party/sqlite
- third_party/swiftshader
- third_party/swiftshader/third_party/astc-encoder
- third_party/swiftshader/third_party/llvm-subzero
- third_party/swiftshader/third_party/marl
- third_party/swiftshader/third_party/SPIRV-Headers/include/spirv
- third_party/swiftshader/third_party/SPIRV-Tools
- third_party/swiftshader/third_party/subzero
- third_party/tensorflow_models
- third_party/tensorflow-text
- third_party/tflite
- third_party/tflite/src/third_party/fft2d
- third_party/tflite/src/third_party/xla/third_party/tsl
- third_party/tflite/src/third_party/xla/xla/tsl/framework
- third_party/tflite/src/third_party/xla/xla/tsl/lib/random
- third_party/tflite/src/third_party/xla/xla/tsl/platform
- third_party/tflite/src/third_party/xla/xla/tsl/protobuf
- third_party/tflite/src/third_party/xla/xla/tsl/util
- third_party/ukey2
- third_party/utf
- third_party/vulkan
- third_party/wayland
- third_party/webdriver
- third_party/webgpu-cts
- third_party/webrtc
- third_party/webrtc/common_audio/third_party/ooura
- third_party/webrtc/common_audio/third_party/spl_sqrt_floor
- third_party/webrtc/modules/third_party/fft
- third_party/webrtc/modules/third_party/g711
- third_party/webrtc/modules/third_party/g722
- third_party/widevine
- )
- use system-woff2 || keeplibs+=(
- third_party/woff2
- )
- keeplibs+=(
- third_party/wuffs
- third_party/x11proto
- third_party/xcbproto
- third_party/xnnpack
- third_party/zlib/google
- third_party/zxcvbn-cpp
- url/third_party/mozilla
- v8/third_party/inspector_protocol
- v8/third_party/rapidhash-v8
- v8/third_party/siphash
- v8/third_party/utf8-decoder
- v8/third_party/v8
- v8/third_party/valgrind
-
- # gyp -> gn leftovers
- third_party/speech-dispatcher
- third_party/usb_ids
- )
-
- if use test; then
- keeplibs+=(
- third_party/breakpad/breakpad/src/processor
- third_party/fuzztest
- third_party/google_benchmark/src/include/benchmark
- third_party/google_benchmark/src/src
- third_party/test_fonts
- third_party/test_fonts/fontconfig
- third_party/test_fonts/test_fonts
- )
- fi
-
- # USE=system-*
- if ! use system-harfbuzz; then
- keeplibs+=( third_party/harfbuzz )
- fi
-
- if ! use system-ffmpeg; then
- keeplibs+=( third_party/ffmpeg third_party/opus )
- fi
-
- if ! use system-icu; then
- keeplibs+=( third_party/icu )
- fi
-
- if ! use system-zstd; then
- keeplibs+=( third_party/zstd )
- fi
-
- if ! use system-av1; then
- keeplibs+=(
- third_party/dav1d
- third_party/libaom
- third_party/libaom/source/libaom/third_party/fastfeat
- third_party/libaom/source/libaom/third_party/vector
- third_party/libaom/source/libaom/third_party/x86inc
- )
- fi
-
- if use libcxx; then
- keeplibs+=(
- third_party/libc++
- third_party/llvm-libc
- )
- fi
-
- if ! use system-openh264; then
- keeplibs+=( third_party/openh264 )
- fi
-
- if ! use system-re2; then
- keeplibs+=( third_party/re2 )
- fi
-
- # Arch-specific
- if use arm64 || use ppc64 ; then
- keeplibs+=( third_party/swiftshader/third_party/llvm-10.0 )
- fi
- # we need to generate ppc64 stuff because upstream does not ship it yet
- # it has to be done before unbundling.
- if use ppc64; then
- pushd third_party/libvpx >/dev/null || die
- mkdir -p source/config/linux/ppc64 || die
- # requires git and clang, bug #832803
- # Revert https://chromium.googlesource.com/chromium/src/+/b463d0f40b08b4e896e7f458d89ae58ce2a27165%5E%21/third_party/libvpx/generate_gni.sh
- # and https://chromium.googlesource.com/chromium/src/+/71ebcbce867dd31da5f8b405a28fcb0de0657d91%5E%21/third_party/libvpx/generate_gni.sh
- # since we're not in a git repo
- sed -i -e "s|^update_readme||g; s|clang-format|${EPREFIX}/bin/true|g; /^git -C/d; /git cl/d; /cd \$BASE_DIR\/\$LIBVPX_SRC_DIR/ign format --in-place \$BASE_DIR\/BUILD.gn\ngn format --in-place \$BASE_DIR\/libvpx_srcs.gni" \
- generate_gni.sh || die
- ./generate_gni.sh || die
- popd >/dev/null || die
-
- pushd third_party/ffmpeg >/dev/null || die
- cp libavcodec/ppc/h264dsp.c libavcodec/ppc/h264dsp_ppc.c || die
- cp libavcodec/ppc/h264qpel.c libavcodec/ppc/h264qpel_ppc.c || die
- popd >/dev/null || die
- fi
-
- # Sanity check keeplibs, on major version bumps it is often necessary to update this list
- # and this enables us to hit them all at once.
- # There are some entries that need to be whitelisted (TODO: Why? The file is understandable, the rest seem odd)
- whitelist_libs=(
- net/third_party/quic
- third_party/devtools-frontend/src/front_end/third_party/additional_readme_paths.json
- third_party/libjingle
- third_party/mesa
- third_party/skia/third_party/vulkan
- third_party/vulkan
- )
- local not_found_libs=()
- for lib in "${keeplibs[@]}"; do
- if [[ ! -d "${lib}" ]] && ! has "${lib}" "${whitelist_libs[@]}"; then
- not_found_libs+=( "${lib}" )
- fi
- done
-
- if [[ ${#not_found_libs[@]} -gt 0 ]]; then
- ewarn "The following \`keeplibs\` directories were not found in the source tree:"
- for lib in "${not_found_libs[@]}"; do
- ewarn " ${lib}"
- done
- fi
-
- keeplibs+=( third_party/ungoogled )
-
- # Remove most bundled libraries. Some are still needed.
- einfo "Unbundling third-party libraries ..."
- build/linux/unbundle/remove_bundled_libraries.py "${keeplibs[@]}" --do-remove || die
-
- # Interferes with our bundled clang path; we don't want stripped binaries anyway.
- sed -i -e 's|${clang_base_path}/bin/llvm-strip|/bin/true|g' \
- -e 's|${clang_base_path}/bin/llvm-objcopy|/bin/true|g' \
- build/linux/strip_binary.gni || die
-}
-
-src_configure() {
- # Calling this here supports resumption via FEATURES=keepwork
- python_setup
-
- # 974899: sometimes people try to build with a non-Unicode locale and python gets very upset
- python_export_utf8_locale || die "Chromium builds require a UTF-8 locale."
-
- # Bug 491582.
- export TMPDIR="${WORKDIR}/temp"
- mkdir -p -m 755 "${TMPDIR}" || die
-
- # https://bugs.gentoo.org/654216
- addpredict /dev/dri/ #nowarn
-
- # Use system-provided libraries.
- # TODO: freetype -- remove sources (https://bugs.chromium.org/p/pdfium/issues/detail?id=733).
- # TODO: use_system_hunspell (upstream changes needed).
- # TODO: use_system_protobuf (bug #525560).
- # TODO: use_system_sqlite (http://crbug.com/22208).
-
- # libevent: https://bugs.gentoo.org/593458
- local gn_system_libraries=(
- flac
- fontconfig
- freetype
- libjpeg
- libwebp
- libxml
- libxslt
- zlib
- )
- if use system-abseil-cpp; then
- gn_system_libraries+=(
- absl_algorithm
- absl_base
- absl_cleanup
- absl_container
- absl_crc
- absl_debugging
- absl_flags
- absl_functional
- absl_hash
- absl_log
- absl_log_internal
- absl_memory
- absl_meta
- absl_numeric
- absl_random
- absl_status
- absl_strings
- absl_synchronization
- absl_time
- absl_types
- absl_utility
- )
- fi
- if use system-brotli; then
- gn_system_libraries+=( brotli )
- fi
- if use system-crc32c; then
- gn_system_libraries+=( crc32c )
- fi
- if use system-double-conversion; then
- gn_system_libraries+=( double-conversion )
- fi
- if use system-woff2; then
- gn_system_libraries+=( woff2 )
- fi
- if use nvidia; then
- gn_system_libraries+=( libXNVCtrl )
- fi
- if use system-ffmpeg; then
- gn_system_libraries+=( ffmpeg opus )
- fi
- if use system-jsoncpp; then
- gn_system_libraries+=( jsoncpp )
- fi
- if use system-icu; then
- gn_system_libraries+=( icu )
- fi
- if use system-zstd; then
- gn_system_libraries+=( zstd )
- fi
- if use system-av1; then
- gn_system_libraries+=( dav1d libaom )
- fi
- if use system-libusb; then
- gn_system_libraries+=( libusb )
- fi
- if use system-libvpx; then
- gn_system_libraries+=( libvpx )
- fi
- use system-openh264 && gn_system_libraries+=(
- openh264
- )
- use system-re2 && gn_system_libraries+=(
- re2
- )
- use system-snappy && gn_system_libraries+=(
- snappy
- )
-
- build/linux/unbundle/replace_gn_files.py --system-libraries "${gn_system_libraries[@]}" ||
- die "Failed to replace GN files for system libraries"
-
- # TODO 131: The above call clobbers `enable_freetype = true` in the freetype gni file
- # drop the last line, then append the freetype line and a new curly brace to end the block
- local freetype_gni="build/config/freetype/freetype.gni"
- sed -i -e '$d' ${freetype_gni} || die
- echo " enable_freetype = true" >> ${freetype_gni} || die
- echo "}" >> ${freetype_gni} || die
-
- if use !custom-cflags; then
- replace-flags "-Os" "-O2"
- strip-flags
- # Debug info section overflows without component build
- # Prevent linker from running out of address space, bug #471810 .
- filter-flags "-g*"
- # 949123: Several multimedia components explicitly build with specific CFLAGS and
- # use runtime detection to enable optimisations; unfortunately any of our CFLAGS are suffixed
- # to the end of the command line, which causes build failures.
- fi
- # Since M150 `skia` will begin breaking for x86_64 due to compilation of `avx512` code paths;
- # we need to filter these for all arches.
- filter-flags "-march*" "-mtune*" "-mcpu*"
-
- # We don't use the same clang version as upstream, and with -Werror
- # we need to make sure that we don't get superfluous warnings.
- append-flags -Wno-unknown-warning-option
- if tc-is-cross-compiler; then # can you cross-compile with the bundled toolchain?
- export BUILD_CXXFLAGS+=" -Wno-unknown-warning-option"
- export BUILD_CFLAGS+=" -Wno-unknown-warning-option"
- fi
-
- # Start building our GN options
- local myconf_gn=() # Tip: strings must be quoted, bools or numbers are fine
-
- if use !bundled-toolchain; then
- # We already forced the "correct" clang via pkg_setup
-
- if tc-is-cross-compiler; then
- CC="${CC} -target ${CHOST} --sysroot ${ESYSROOT}"
- CXX="${CXX} -target ${CHOST} --sysroot ${ESYSROOT}"
- BUILD_AR=${AR}
- BUILD_CC=${CC}
- BUILD_CXX=${CXX}
- BUILD_NM=${NM}
- fi
-
- # Make sure the build system will use the right tools, bug #340795.
- tc-export AR CC CXX NM
-
- strip-unsupported-flags
- append-ldflags -Wl,--undefined-version # https://bugs.gentoo.org/918897#c32
-
- myconf_gn+=(
- "is_clang=true"
- "clang_use_chrome_plugins=false"
- "use_clang_modules=false" # M141 enables this for the linux platform by default.
- 'custom_toolchain="//build/toolchain/linux/unbundle:default"'
- # From M127 we need to provide a location for libclang and the clang resource dir so that bindgen can find them
- "bindgen_libclang_path=\"$(get_llvm_prefix)/$(get_libdir)\""
- "bindgen_clang_resource_dir=\"${EPREFIX}/usr/lib/clang/${LLVM_SLOT}/include\""
- "bindgen_extra_clang_args=[\"-I${EPREFIX}/usr/lib/clang/${LLVM_SLOT}/include\"]"
- "clang_base_path=\"${EPREFIX}/usr/lib/clang/${LLVM_SLOT}/\""
- "rust_bindgen_root=\"${EPREFIX}/usr/\""
- "rust_sysroot_absolute=\"$(get_rust_prefix)\""
- "rustc_version=\"${RUST_SLOT}\""
- )
-
- # Currently disabled, runtime issues with mold
- #if tc-ld-is-mold; then
- # myconf_gn+=(
- # "use_mold=true"
- # "use_lld=false"
- # "linker_path=\"${EPREFIX}/usr/bin/mold\""
- # )
- #else
- myconf_gn+=( "use_lld=true" )
- #fi
-
- if [[ ${LLVM_SLOT} -lt 23 ]]; then
- # Workaround for -fsanitize-ignore-for-ubsan-feature (added in LLVM 23)
- myconf_gn+=( 'clang_has_ubsan_feature_ignore=false' )
- fi
-
- if ! tc-is-cross-compiler; then
- myconf_gn+=( 'host_toolchain="//build/toolchain/linux/unbundle:default"' )
- else
- tc-export BUILD_{AR,CC,CXX,NM}
- myconf_gn+=(
- 'host_toolchain="//build/toolchain/linux/unbundle:host"'
- 'v8_snapshot_toolchain="//build/toolchain/linux/unbundle:host"'
- "host_pkg_config=\"$(tc-getBUILD_PKG_CONFIG)\""
- "pkg_config=\"$(tc-getPKG_CONFIG)\""
- )
-
- # setup cups-config, build system only uses --libs option
- if use cups; then
- mkdir "${T}/cups-config" || die
- cp "${ESYSROOT}/usr/bin/${CHOST}-cups-config" "${T}/cups-config/cups-config" || die
- export PATH="${PATH}:${T}/cups-config"
- fi
-
- # Don't inherit PKG_CONFIG_PATH from environment
- local -x PKG_CONFIG_PATH=
- fi
-
- fi # !bundled-toolchain
-
- local myarch
- myarch="$(tc-arch)"
- case ${myarch} in
- amd64)
- # Bug 530248, 544702, 546984, 853646.
- use !custom-cflags && filter-flags -mno-mmx -mno-sse2 -mno-ssse3 -mno-sse4.1 \
- -mno-avx -mno-avx2 -mno-fma -mno-fma4 -mno-xop -mno-sse4a
- myconf_gn+=( 'target_cpu="x64"' )
- ;;
- x86)
- # Bug 530248, 544702, 546984, 853646.
- use !custom-cflags && filter-flags -mno-mmx -mno-sse2 -mno-ssse3 -mno-sse4.1 \
- -mno-avx -mno-avx2 -mno-fma -mno-fma4 -mno-xop -mno-sse4a
- myconf_gn+=( 'target_cpu="x86"' )
- ;;
- arm64)
- myconf_gn+=( 'target_cpu="arm64"' )
- ;;
- ppc64)
- myconf_gn+=( 'target_cpu="ppc64"' )
- ;;
- *)
- die "Failed to determine target arch, got '${myarch}'."
- ;;
- esac
-
- # Common options
-
- myconf_gn+=(
- # Disable code formating of generated files
- "blink_enable_generated_code_formatting=false"
- # enable DCHECK with USE=debug only, increases chrome binary size by 30%, bug #811138.
- # DCHECK is fatal by default, make it configurable at runtime, #bug 807881.
- "dcheck_always_on=$(usex debug true false)"
- "dcheck_is_configurable=$(usex debug true false)"
- # Chromium builds provided by Linux distros should disable the testing config
- "disable_fieldtrial_testing_config=true"
- # Custom patch: Enable building Chromium as individual channels (e.g. stable, beta, dev) that
- # use different profile directories, desktop entries, etc. This enables slotting the ebuild.
- "enable_channel_branding=true"
- # 131 began laying the groundwork for replacing freetype with
- # "Rust-based Fontations set of libraries plus Skia path rendering"
- # We now need to opt-in
- "enable_freetype=true"
- "enable_hangout_services_extension=$(usex hangouts true false)"
- # Don't need nocompile checks and GN crashes with our config (verify with modern GN)
- "enable_nocompile_tests=false"
- # pseudolocales are only used for testing
- "enable_pseudolocales=false"
- "enable_widevine=$(usex widevine true false)"
- # Disable fatal linker warnings, bug 506268.
- "fatal_linker_warnings=false"
- # Component build isn't generally intended for use by end users. It's mostly useful
- # for development and debugging.
- "is_component_build=false"
- # GN needs explicit config for Debug/Release as opposed to inferring it from build directory.
- "is_debug=false"
- "is_official_build=$(usex official true false)"
- # Enable ozone wayland and/or headless support
- "ozone_auto_platforms=false"
- "ozone_platform_headless=true"
- # Enables building without non-free unRAR licence
- "safe_browsing_use_unrar=false"
- # "thin_lto_enable_optimizations=${use_lto}"
- "treat_warnings_as_errors=false"
- # Use in-tree libc++ (buildtools/third_party/libc++ and buildtools/third_party/libc++abi)
- # instead of the system C++ library for C++ standard library support.
- # default: true, but let's be explicit (forced since 120 ; USE removed 127).
- "use_custom_libcxx=true"
- # Enable ozone wayland and/or headless support
- "use_ozone=true"
- # The sysroot is the oldest debian image that chromium supports, we don't need it
- "use_sysroot=false"
- # See dependency logic in third_party/BUILD.gn
- "use_system_harfbuzz=$(usex system-harfbuzz true false)"
- # "use_thin_lto=${use_lto}"
- # Only enabled for clang, but gcc has endian macros too
- "v8_use_libm_trig_functions=true"
- # use system go
- "tint_use_system_go=true"
- )
-
- myconf_gn+=( "enable_iterator_debugging=$(usex debug true false)" )
-
- if use debug; then
- myconf_gn+=(
- "symbol_level=2"
- "blink_symbol_level=2"
- "v8_symbol_level=2"
- )
- else
- myconf_gn+=(
- "symbol_level=0"
- "blink_symbol_level=0"
- "v8_symbol_level=0"
- )
- fi
-
- if use bindist ; then
- myconf_gn+=(
- # If this is set to false Chromium won't be able to load any proprietary codecs
- # even if provided with an ffmpeg capable of h264/aac decoding
- "proprietary_codecs=true"
- 'ffmpeg_branding="Chrome"'
- # build ffmpeg as an external component (libffmpeg.so) that we can remove / substitute
- "is_component_ffmpeg=true"
- )
- else
- myconf_gn+=(
- "proprietary_codecs=$(usex proprietary-codecs true false)"
- "ffmpeg_branding=\"$(usex proprietary-codecs Chrome Chromium)\""
- )
- fi
-
- if use headless; then
- myconf_gn+=(
- "enable_print_preview=false"
- "enable_remoting=false"
- 'ozone_platform="headless"'
- "rtc_use_pipewire=false"
- "use_alsa=false"
- "use_cups=false"
- "use_gio=false"
- "use_glib=false"
- "use_gtk=false"
- "use_kerberos=false"
- "use_libpci=false"
- "use_pangocairo=false"
- "use_pulseaudio=false"
- "use_qt5=false"
- "use_qt6=false"
- "use_udev=false"
- "use_vaapi=false"
- "use_xkbcommon=false"
- )
- else
- myconf_gn+=(
- "gtk_version=$(usex gtk4 4 3)"
- # link pulseaudio directly (DT_NEEDED) instead of using dlopen.
- # helps with automated detection of ABI mismatches and prevents silent errors.
- "link_pulseaudio=$(usex pulseaudio true false)"
- "ozone_platform_wayland=$(usex wayland true false)"
- "ozone_platform_x11=$(usex X true false)"
- "ozone_platform=\"$(usex wayland wayland x11)\""
- "rtc_use_pipewire=$(usex screencast true false)"
- # As above - link directly instead of dlopening
- "rtc_link_pipewire=$(usex screencast true false)"
- "use_cups=$(usex cups true false)"
- "use_kerberos=$(usex kerberos true false)"
- "use_pulseaudio=$(usex pulseaudio true false)"
- "use_qt5=false"
- "use_system_libffi=$(usex wayland true false)"
- "use_system_minigbm=true"
- "use_vaapi=$(usex vaapi true false)"
- "use_xkbcommon=true"
- )
- if use qt6; then
- local cbuild_libdir
- cbuild_libdir="$(get_libdir)"
- if tc-is-cross-compiler; then
- # Hack to workaround get_libdir not being able to handle CBUILD, bug #794181
- cbuild_libdir="$($(tc-getBUILD_PKG_CONFIG) --keep-system-libs --libs-only-L libxslt)"
- cbuild_libdir="${cbuild_libdir:2}"
- cbuild_libdir="${cbuild_libdir/% }"
- fi
- myconf_gn+=(
- "use_qt6=true"
- "moc_qt6_path=\"${EPREFIX}/usr/${cbuild_libdir}/qt6/libexec\""
- )
- else
- myconf_gn+=( "use_qt6=false" )
- fi
- fi
-
- # Explicitly disable ICU data file support for system-icu/headless builds.
- if use system-icu || use headless; then
- myconf_gn+=( "icu_use_data_file=false" )
- fi
-
- if use official; then
- # Allow building against system libraries in official builds
- sed -i 's/OFFICIAL_BUILD/GOOGLE_CHROME_BUILD/' \
- tools/generate_shim_headers/generate_shim_headers.py || die
- # Don't add symbols to build
- myconf_gn+=( "symbol_level=0" )
- fi
-
- if use pgo; then
- myconf_gn+=(
- "chrome_pgo_phase=2"
- "v8_enable_builtins_optimization=true"
- )
- else
- myconf_gn+=( "chrome_pgo_phase=0" )
- fi
-
- # Odds and ends
-
- # skipping typecheck is only supported on amd64, bug #876157
- if ! use amd64; then
- myconf_gn+=( "devtools_skip_typecheck=false" )
- fi
-
- # Disable external code space for V8 for ppc64. It is disabled for ppc64
- # by default, but cross-compiling on amd64 enables it again.
- if tc-is-cross-compiler && use ppc64; then
- myconf_gn+=( "v8_enable_external_code_space=false" )
- fi
-
- # This determines whether or not GN uses the bundled libcxx
- if use libcxx; then
- myconf_gn+=( "use_custom_libcxx=true" )
- else
- myconf_gn+=(
- "use_custom_libcxx=false"
- "use_llvm_libatomic=false"
- )
- append-cppflags -U_GLIBCXX_ASSERTIONS #See #318
- fi
-
- myconf_gn+=( "use_bluez=$(usex bluetooth true false)" )
-
- myconf_gn+=( "is_cfi=$(usex cfi true false)" )
-
- if use cfi; then
- myconf_gn+=(
- "use_cfi_icall=true"
- "use_cfi_cast=true"
- )
- fi
-
- myconf_gn+=(
- "optimize_webui=$(usex optimize-webui true false)"
- "use_system_freetype=$(usex system-harfbuzz true false)"
- "use_system_libopenjpeg2=$(usex system-openjpeg true false)"
- "enable_pdf=true"
- "use_system_lcms2=true"
- "enable_print_preview=true"
- "use_thin_lto=$(usex thinlto true false)"
- "thin_lto_enable_optimizations=$(usex optimize-thinlto true false)"
-
- # Ungoogled flags
- "enable_mdns=false"
- "enable_mse_mpeg2ts_stream_parser=$(usex proprietary-codecs true false)"
- "enable_remoting=false"
- "enable_reporting=false"
- "enable_service_discovery=false"
- "exclude_unwind_tables=true"
- "google_api_key=\"\""
- "google_default_client_id=\"\""
- "google_default_client_secret=\"\""
- "safe_browsing_mode=0"
- "use_official_google_api_keys=false"
- "use_unofficial_version_number=false"
-
- # "enable_swiftshader=false"
-
- # Additional flags
- # "perfetto_use_system_zlib=true"
- # "use_system_zlib=true"
- # "use_system_libjpeg=true"
- # "rtc_build_examples=false"
- # "enable_chromium_prelude=false"
- # "enable_updater=false"
- # "enable_update_notifications=false"
- # "enable_constraints=false"
- # "rtc_rusty_base64=false"
- # "v8_enable_temporal_support=false"
- # "media_use_symphonia=false"
- # "pdf_enable_rust_png=false"
- # "skia_use_libpng_encode=true"
- # "skia_use_libpng_decode=true"
- # "skia_use_rust_png_decode=false"
- # "skia_use_rust_png_encode=false"
- # "enable_jxl_decoder=false"
- )
-
- if use amd64 || use arm64; then
- myconf_gn+=(
- "v8_drumbrake_bounds_checks=true"
- # "v8_enable_drumbrake=true"
- )
- fi
-
- if use thinlto; then
- # We need to change the default value of import-instr-limit in
- # LLVM to limit the text size increase. The default value is
- # 100, and we change it to 30 to reduce the text size increase
- # from 25% to 10%. The performance number of page_cycler is the
- # same on two of the thinLTO configurations, we got 1% slowdown
- # on speedometer when changing import-instr-limit from 100 to 30.
- # append-ldflags "-Wl,-plugin-opt,-import-instr-limit=30"
- sed -i '/import_instr_limit = 5/{s++import_instr_limit = 30+;h};${x;/./{x;q0};x;q1}' \
- build/config/compiler/BUILD.gn || die
-
- append-ldflags "-Wl,--thinlto-jobs=$(makeopts_jobs)"
- fi
-
- # Facilitate deterministic builds (taken from build/config/compiler/BUILD.gn)
- append-cflags -Wno-builtin-macro-redefined
- append-cxxflags -Wno-builtin-macro-redefined
- append-cppflags "-D__DATE__= -D__TIME__= -D__TIMESTAMP__="
-
- local flags
- einfo "Building with the following compiler settings:"
- for flags in C{C,XX} AR NM RANLIB {C,CXX,CPP,LD}FLAGS \
- EXTRA_GN UGC_{SKIP_{PATCHES,SUBSTITUTION},KEEP_BINARIES} ; do
- einfo " ${flags} = \"${!flags}\""
- done
-
- # Since we build from tarballs, we need to set the channel here so that it can be used in the build.
- export CHROME_VERSION_EXTRA="${SLOT}"
-
- einfo "Configuring Chromium ..."
- # add a `-v` here if gn `hangs` to see which file it's getting stuck on.
- set -- gn gen --args="${myconf_gn[*]}${EXTRA_GN:+ ${EXTRA_GN}}" out/Release
- echo "$@"
- "$@" || die "Failed to configure Chromium"
-
- # The "if" below should not be executed unless testing
- if [ ! -z "${NODIE}" ]; then
- # List all args
- # gn args --list out/Release
-
- # Quick compiler check
- eninja -C out/Release protoc torque
- fi
-}
-
-src_compile() {
- # Final link uses lots of file descriptors.
- ulimit -n 2048
-
- # Calling this here supports resumption via FEATURES=keepwork
- python_setup
-
- # I hate doing this but upstream Rust have yet to come up with a better solution for
- # us poor packagers. Required for Split LTO units, which are required for CFI.
- export RUSTC_BOOTSTRAP=1
-
- # Don't inherit PYTHONPATH from environment, bug #789021, #812689
- local -x PYTHONPATH=
-
- # Build mksnapshot and pax-mark it.
- if use pax-kernel; then
- local x
- for x in mksnapshot v8_context_snapshot_generator code_cache_generator; do
- if tc-is-cross-compiler; then
- eninja -C out/Release "host/${x}"
- pax-mark m "out/Release/host/${x}"
- else
- eninja -C out/Release "${x}"
- pax-mark m "out/Release/${x}"
- fi
- done
- fi
-
- # Even though ninja autodetects number of CPUs, we respect
- # user's options, for debugging with -j 1 or any other reason.
- eninja -C out/Release chrome chrome_sandbox $(use test && echo "base_unittests")
-
- pax-mark m out/Release/chrome
-
- # This codepath does minimal patching, so we're at the mercy of upstream
- # CFLAGS. This is fine - we're not intending to force this on users
- # and we do a lot of flag 'management' anyway.
- if use bundled-toolchain; then
- QA_FLAGS_IGNORED="
- usr/lib64/chromium-browser/chrome
- usr/lib64/chromium-browser/chrome-sandbox
- usr/lib64/chromium-browser/chromedriver
- usr/lib64/chromium-browser/chrome_crashpad_handler
- usr/lib64/chromium-browser/libEGL.so
- usr/lib64/chromium-browser/libGLESv2.so
- usr/lib64/chromium-browser/libVkICD_mock_icd.so
- usr/lib64/chromium-browser/libVkLayer_khronos_validation.so
- usr/lib64/chromium-browser/libqt6_shim.so
- usr/lib64/chromium-browser/libvk_swiftshader.so
- usr/lib64/chromium-browser/libvulkan.so.1
- "
- fi
-
- use convert-dict && eninja -C out/Release convert_dict
-
- use enable-driver && eninja -C out/Release chromedriver
- #use suid && eninja -C out/Release chrome_sandbox
-
- # use enable-driver && mv out/Release/chromedriver{.unstripped,}
-
- rm -f out/Release/locales/*.pak.info || die
-
- # Generate support files (desktop file, manpage, etc.) See: #684550 #706786 #968958
- ${EPYTHON} "${FILESDIR}/generate-support-files.py" \
- --installdir "/usr/$(get_libdir)/ungoogled-chromium-browser" \
- --channel "${SLOT}" ||
- die "Failed to generate support files"
-}
-
-src_test() {
- # Tests may be flaky with usersandbox, and the test runner executes significantly faster without.
- # If you seem to be excluding too many tests for a particular milestone: comment them out, reboot, and
- # run the tests again. If that doesn't help, try FEATURES="-usersandbox" and send it because obviously the
- # chromium gods are not smiling upon you today. Do some runtime testing, obvs.
- local skip_tests=(
- # Wildcard exclusions (if all tests in a test suite are broken)
- 'AlternateTestParams/PartitionAllocDeathTest.RepeatedAllocReturnNullDirect/*'
- 'AlternateTestParams/PartitionAllocDeathTest.RepeatedReallocReturnNullDirect/*'
- 'AlternateTestParams/PartitionAllocTest.*' # 200+ tests, >= 1 crashes entire test runner with usersandbox.
- 'CheckExitCodeAfterSignalHandlerDeathTest.*'
- 'CriticalProcessAndThreadSpotChecks/HangWatcherAnyCriticalThreadTests.*'
- 'LazyThreadPoolTaskRunnerEnvironmentTest.*' # M142
- 'ToolsSanityTest.BadVirtualCall*'
- # Since 151.0.7922.137
- 'CheckDeathTest.*'
- 'EnumSetDeathTest.*'
- 'OptionalRefDeathTest.*'
- 'RawRefDeathTest.*'
- 'AlternateTestParams/PartitionAllocDeathTest.CheckTriggered*'
- 'CallbackHelpersTest.*'
- 'SafeRefTest.*'
- 'SpanTest.*'
- 'WeakValueTableTest.*'
- 'PlatformSharedMemoryRegionTest.*'
- 'RefCountedOverflowTest.*'
- 'SingleThreadTaskRunnerCurrentDefaultHandleTest.*'
- 'TestFutureDeathTest.*'
- 'WeakPtrDeathTest.*'
- 'SafeRefDeathTest.*'
- 'LinkedListDeathTest.*'
- 'BindDeathTest.*'
- 'ReallocProtectedIteratorDeathTest.*'
- 'PASpanTest.*'
- 'BackupRefPtrTest.*'
- 'All/Base64Test.Overflow*'
- 'ValuesTest.*'
- 'TaskEnvironmentTest.*'
- 'CheckedObserverListTest.*'
- 'MemoryConsumerRegistryTest.*'
- ProtectedMemoryDeathTest.FailsIfDefinedOutsideOfProtectMemoryRegion
- StructuredSharedMemoryDeathTest.DuplicateRegion
- CheckedContiguousIteratorDeathTest.OutOfBounds
- HeapArrayDeathTest.TakeFirstWithOverSize
- CallbackDeathTest.RunNullCallbackChecks
- ObserverListThreadSafeDeathTest.CrossThreadRemovalRestricted
- SequencedTaskRunnerCurrentDefaultHandleDeathTest.OverrideWithNull
- TestFutureWithoutTaskEnvironmentDeathTest.WaitShouldDcheckWithoutTaskEnvironment
- ScopedThreadPriorityDeathTest.NoRealTime
- ReallocProtectedIteratorDeathTest.StringReallocCrashes
- BarrierCallbackTest.ErrorToCallCallbackWithZeroCallbacks
- BarrierClosureTest.ChecksIfCalledForZeroClosures
- SupportsUserDataTest.ReentrantSetUserDataDuringRemoval
- TimeBase.AddSubInfinities
- LibcppHardeningTest.Assertions
- IDMapTest.RemovedValueHandling
- MultiMemoryConsumerTest.DuplicateInterventionsCheck
- PersistentMemoryAllocatorTest.DelayedAllocationTest
- SequenceCheckerTest.MoveOffSequenceBanned
- ThreadCheckerTest.MoveOffThreadBanned
- TokenType.TokenFromNullUnguessableToken
- ZipTest.CheckForIterationPastTheEnd
- MemoryConsumerTraitsTest.ActiveConsumerWithPassiveTraitsFails
- SingleThreadTaskRunnerMainThreadDefaultHandleTest.Basic
-
- # requires en-us locale
- SysStrings.SysNativeMBAndWide
- SysStrings.SysNativeMBToWide
- SysStrings.SysWideToNativeMB
- # Specific test cases
- CancelableEventTest.BothCancelFailureAndSucceedOccurUnderContention
- FilePathTest.FromUTF8Unsafe_And_AsUTF8Unsafe
- HistogramTesterTest.PumaTestUniqueSample
- ImmediateCrashTest.ExpectedOpcodeSequence # M150
- PathServiceTest.CheckedGetFailure
- PlatformThreadTest.CanChangeThreadType
- RawPtrTest.SetLookupUsesGetForComparison # M146 ; also broken for alpine in M144.
- RustLogIntegrationTest.CheckAllSeverity
- StackCanary.ChangingStackCanaryCrashesOnReturn
- StackTraceDeathTest.StackDumpSignalHandlerIsMallocFree
- TestLauncherTools.TruncateSnippetFocusedMatchesFatalMessagesTest
- ThreadPoolEnvironmentConfig.CanUseBackgroundPriorityForWorker
- DriveInfoTest.GetFileDriveInfo
-
- )
- local test_filter="-$(IFS=:; printf '%s' "${skip_tests[*]}")"
- # test-launcher-bot-mode enables parallelism and plain output
- # Check individual tests with --gtest_filter=<test you want> --single-process-tests
- ./out/Release/base_unittests --test-launcher-bot-mode \
- --test-launcher-jobs="$(get_makeopts_jobs)" \
- --gtest_filter="${test_filter}" || die "Tests failed!"
-}
-
-src_install() {
- local browser_suffix
- if [[ "${SLOT}" != "stable" ]]; then
- browser_suffix="-${SLOT}"
- else
- browser_suffix=""
- fi
- local CHROMIUM_HOME="/usr/$(get_libdir)/ungoogled-chromium-browser${browser_suffix}"
- exeinto "${CHROMIUM_HOME}"
- doexe out/Release/chrome
-
- #newexe out/Release/chrome_sandbox chrome-sandbox
- #fperms 4755 "${CHROMIUM_HOME}/chrome-sandbox"
-
- use enable-driver && doexe out/Release/chromedriver
-
- #* https://github.com/ungoogled-software/ungoogled-chromium/pull/3563
- doexe out/Release/chrome_crashpad_handler
-
- if use convert-dict; then
- newexe "${FILESDIR}/update-dicts.sh" update-dicts.sh
- doexe out/Release/convert_dict
- fi
-
- ozone_auto_session () {
- use X && use wayland && ! use headless && echo true || echo false
- }
-
- cat <<- EOF > "${D}${CHROMIUM_HOME}/chromium-launcher.sh" || die
- #!/bin/bash
- # Wrapper to launch slotted Chromium via the chromium-common launcher script.
- export CHROME_DESKTOP="ungoogled-chromium-browser${browser_suffix}.desktop"
- export CHROME_EXEC_NAME="ungoogled-chromium-browser${browser_suffix}"
- export CHROME_VERSION_EXTRA="${SLOT}"
- export CHROME_WRAPPER="\$(readlink -f "\$0")"
- export OZONE_AUTO_SESSION=$(ozone_auto_session)
-
- exec /usr/libexec/chromium/chromium-launcher.sh "\$@"
- EOF
-
- chmod 755 "${D}${CHROMIUM_HOME}/chromium-launcher.sh" || die
-
- # It is important that we name the target "chromium-browser",
- # xdg-utils expect it; bug #355517.
- dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/ungoogled-chromium-browser${browser_suffix}
- # keep the old symlink around for consistency
- dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/ungoogled-chromium${browser_suffix}
-
- use enable-driver && dosym "${CHROMIUM_HOME}/chromedriver" /usr/bin/ungoogled-chromedriver${browser_suffix}
-
- pushd out/Release/locales > /dev/null || die
- chromium_remove_language_paks
- popd > /dev/null || die
-
- insinto "${CHROMIUM_HOME}"
- doins out/Release/*.bin
- doins out/Release/*.pak
- doins -r out/Release/hyphen-data
-
- if use bindist; then
- # We built libffmpeg as a component library, but we can't distribute it
- # with proprietary codec support. Remove it and make a symlink to the requested
- # system library.
- rm -f out/Release/libffmpeg.so \
- || die "Failed to remove bundled libffmpeg.so (with proprietary codecs)"
- # symlink the libffmpeg.so from either ffmpeg-chromium or ffmpeg[chromium].
- einfo "Creating symlink to libffmpeg.so from $(usex ffmpeg-chromium ffmpeg-chromium ffmpeg[chromium])..."
- dosym ../chromium/libffmpeg.so$(usex ffmpeg-chromium .${PV%%\.*} "") \
- /usr/$(get_libdir)/ungoogled-chromium-browser/libffmpeg.so
- fi
-
- (
- shopt -s nullglob
- local files=(out/Release/*.so out/Release/*.so.[0-9])
- [[ ${#files[@]} -gt 0 ]] && doins "${files[@]}"
- )
-
- if ! use system-icu && ! use headless; then
- doins out/Release/icudtl.dat
- fi
-
- doins -r out/Release/locales
- #doins -r out/Release/MEIPreload
-
- # Install vk_swiftshader_icd.json; bug #827861
- doins out/Release/vk_swiftshader_icd.json
-
- if [[ -d out/Release/swiftshader ]]; then
- insinto "${CHROMIUM_HOME}/swiftshader"
- doins out/Release/swiftshader/*.so
- fi
-
- use widevine && dosym WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so "${CHROMIUM_HOME}/libwidevinecdm.so"
-
- # Install icons
- local branding size
- for size in 16 24 32 48 64 128 256 ; do
- case ${size} in
- 16|32) branding="chrome/app/theme/default_100_percent/chromium" ;;
- *) branding="chrome/app/theme/chromium" ;;
- esac
- newicon -s ${size} "${branding}/product_logo_${size}.png" \
- ungoogled-chromium-browser${browser_suffix}.png
- done
-
- # Install desktop entry
- domenu out/Release/ungoogled-chromium-browser${browser_suffix}.desktop
-
- # Install GNOME default application entry (bug #303100).
- insinto /usr/share/gnome-control-center/default-apps
- doins out/Release/ungoogled-chromium-browser${browser_suffix}.xml
-
- # Install AppStream metadata
- insinto /usr/share/appdata
- doins out/Release/ungoogled-chromium-browser${browser_suffix}.appdata.xml
-
- # Install manpage; bug #684550
- doman out/Release/ungoogled-chromium-browser${browser_suffix}.1
- dosym ungoogled-chromium-browser${browser_suffix}.1 /usr/share/man/man1/ungoogled-chromium${browser_suffix}.1
-
- readme.gentoo_create_doc
-}
-
-pkg_postrm() {
- xdg_icon_cache_update
- xdg_desktop_database_update
-}
-
-pkg_postinst() {
- xdg_icon_cache_update
- xdg_desktop_database_update
- readme.gentoo_print_elog
-
- if use !headless && [[ -z "${REPLACING_VERSIONS}" ]]; then
- if use vaapi; then
- elog "Hardware-accelerated video decoding configuration:"
- elog
- elog "Chromium supports multiple backends for hardware acceleration. To enable one,"
- elog " Add to CHROMIUM_FLAGS in /etc/chromium/default:"
- elog
- elog "1. VA-API with OpenGL (recommended for most users):"
- elog " --enable-features=AcceleratedVideoDecodeLinuxGL"
- elog " VaapiVideoDecoder may need to be added as well, but try without first."
- elog
- if use wayland; then
- elog "2. Enhanced Wayland/EGL performance:"
- elog " --enable-features=AcceleratedVideoDecodeLinuxGL,AcceleratedVideoDecodeLinuxZeroCopyGL"
- elog
- fi
- if use X; then
- elog "$(usex wayland "3" "2"). VA-API with Vulkan:"
- elog " --enable-features=VaapiVideoDecoder,VaapiIgnoreDriverChecks,Vulkan,DefaultANGLEVulkan,VulkanFromANGLE"
- elog
- if use wayland; then
- elog " NOTE: Vulkan acceleration requires X11 and will not work under Wayland sessions."
- elog " Use OpenGL-based acceleration instead when running under Wayland."
- elog
- fi
- fi
- elog "Additional options:"
- elog " To enable hardware-accelerated encoding (if supported)"
- elog " add 'AcceleratedVideoEncoder' to your feature list"
- elog " VaapiIgnoreDriverChecks bypasses driver compatibility checks"
- elog " (may be needed for newer/unsupported hardware)"
- elog
- else
- elog "This Chromium build was compiled without VA-API support, which provides"
- elog "hardware-accelerated video decoding."
- fi
- if use screencast; then
- elog "Screencast is disabled by default at runtime. Either enable it"
- elog "by navigating to chrome://flags/#enable-webrtc-pipewire-capturer"
- elog "inside Chromium or add --enable-features=WebRTCPipeWireCapturer"
- elog "to CHROMIUM_FLAGS in /etc/chromium/default."
- elog
- elog "Additional setup may be required for screencasting to work."
- elog "See issue: https://github.com/PF4Public/gentoo-overlay/issues/314"
- fi
- if use gtk4; then
- elog "Chromium prefers GTK3 over GTK4 at runtime. To override this"
- elog "behaviour you need to pass --gtk-version=4, e.g. by adding it"
- elog "to CHROMIUM_FLAGS in /etc/chromium/default."
- fi
- if use widevine; then
- elog "widevine requires binary plugins, which are distributed separately"
- elog "Make sure you have www-plugins/chrome-binary-plugins installed"
- fi
- fi
-
- if systemd_is_booted && ! [[ -f "/etc/machine-id" ]]; then
- ewarn "The lack of an '/etc/machine-id' file on this system booted with systemd"
- ewarn "indicates that the Gentoo handbook was not followed to completion."
- ewarn ""
- ewarn "Chromium is known to behave unpredictably with this system configuration;"
- ewarn "please complete the configuration of this system before logging any bugs."
- fi
-
- # Stable slot doesn't change profile directory, and it's vanishingly unlikely that users will downgrade from dev.
- if [[ -n "${REPLACING_VERSIONS}" ]]; then
- local replacing_non_slotted=false
- # there could be more than one PVR
- for version in ${REPLACING_VERSIONS}; do
- if ver_test "${version}" -le "145.0.7632.116"; then
- replacing_non_slotted=true
- break
- fi
- done
- if ${replacing_non_slotted}; then
- ewarn "This version of Chromium has replaced a non-slotted ebuild."
- if [[ ${SLOT} != "stable" ]]; then
- ewarn "This channel has its own profile directory, so your existing profile will not be used."
- ewarn "To use your existing profile, either copy or move it to the new location."
- ewarn "See https://wiki.gentoo.org/wiki/Chromium#Profile_Directories for more information."
- ewarn ""
- fi
- ewarn "Any existing Progressive Web Apps (PWAs) will need to be reinstalled,"
- ewarn "or have the path in the desktop files updated to point to the new wrapper script."
- fi
- fi
-}
-
-eapply_wrapper () {
- if [ ! -z "${NODIE}" ]; then
- nonfatal eapply "$@"
- else
- eapply "$@"
- fi
-}
-
-git_wrapper () {
- if [ ! -z "${NODIE}" ]; then
- git "$@"
- else
- git "$@" || die
- fi
-}
-
-filter_wrapper () {
- einfo "Applying ${i##*/}"
- #? fuzz factor of 3 is OK?
- if [ ! -z "${NODIE}" ]; then
- filterdiff -p1 "${@:2}" < "$1" | patch -F 3 -p1
- else
- filterdiff -p1 "${@:2}" < "$1" | patch -F 3 -p1 || die
- fi
-}
diff --git a/www-client/ungoogled-chromium/ungoogled-chromium-153.0.8010.36_p1.ebuild b/www-client/ungoogled-chromium/ungoogled-chromium-153.0.8010.36_p1.ebuild
index 4c4b6a38d413..4b3ef79da830 100644
--- a/www-client/ungoogled-chromium/ungoogled-chromium-153.0.8010.36_p1.ebuild
+++ b/www-client/ungoogled-chromium/ungoogled-chromium-153.0.8010.36_p1.ebuild
@@ -110,8 +110,8 @@ LICENSE+=" IJG ISC LGPL-2 LGPL-2.1 MIT MPL-1.1 MPL-2.0 Ms-PL PSF-2 SGI-B-2.0 SSL
LICENSE+=" Unicode-DFS-2015 Unlicense UoI-NCSA ZLIB libtiff openssl"
LICENSE+=" cromite? ( GPL-3 )"
-SLOT="beta"
-KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
+SLOT="stable"
+KEYWORDS="amd64 ~arm64 ~ppc64 ~x86"
IUSE_SYSTEM_LIBS="abseil-cpp av1 brotli crc32c double-conversion ffmpeg +harfbuzz icu jsoncpp +libusb libvpx +openh264 openjpeg re2 snappy woff2 +zstd"
IUSE="+X bindist bluetooth bundled-toolchain cfi convert-dict cups custom-cflags debug ffmpeg-chromium enable-driver gtk4 hangouts headless kerberos +libcxx nvidia +official optimize-thinlto optimize-webui override-data-dir pax-kernel pgo"
diff --git a/www-client/ungoogled-chromium/ungoogled-chromium-152.0.7977.75_p1.ebuild b/www-client/ungoogled-chromium/ungoogled-chromium-153.0.8010.52_p1.ebuild
index cf5169391779..0551e2a407d6 100644
--- a/www-client/ungoogled-chromium/ungoogled-chromium-152.0.7977.75_p1.ebuild
+++ b/www-client/ungoogled-chromium/ungoogled-chromium-153.0.8010.52_p1.ebuild
@@ -46,13 +46,13 @@ CHROMIUM_LANGS="af am ar as az be bg bn bs ca cs cy da de el en-GB es es-419 et
# 5794e9d12bf82620d5f24505798fecb45ca5a22d
# )
-CROMITE_COMMIT_ID="69e841fd35cd92ce5fa1a336791c7989809e0f17"
+CROMITE_COMMIT_ID="49c23e54e61a84486bb6581cccf6d51ada75999b"
declare -A CHROMIUM_COMMITS=(
# ["27f8690db999f6e56f0af7a9ea3d28a019ed72ca"]="." #152+
["-cf94ed446320d35c8613ed9b3ffb6e6a61bfcb5f"]="." # ffmpeg 9
# ["-bf6be9310a07b981edf81e0ac9b89dead09be35c"]="." # ffmpeg 9
- ["-c72c7b0971e3e31974b0adea0dac42278e22e3b0"]="third_party/devtools-frontend/src" # need gn >= 2459
+ # ["-c72c7b0971e3e31974b0adea0dac42278e22e3b0"]="third_party/devtools-frontend/src" # need gn >= 2459
# # ["-37c28a19804e47a68eabf3cf882a310689fc325b"]="." #disable style check for cromite
# # ["cd5a0df905a28faa89ff2a4ab44f893f84dc4487"]="net/third_party/quiche/src"
)
@@ -71,9 +71,10 @@ inherit python-any-r1 readme.gentoo-r1 rust systemd toolchain-funcs xdg-utils
DESCRIPTION="Modifications to Chromium for removing Google integration and enhancing privacy"
HOMEPAGE="https://github.com/ungoogled-software/ungoogled-chromium"
PPC64_HASH="7aae8a84e327fc2078ce1625c9c70bfda77d626f"
-PATCH_V="${PV%%\.*}"
+PATCH_V="152"
+# PATCH_V="${PV%%\.*}"
COPIUM_COMMIT="3c7e56fb4523b43b47595bb3a22f77178fc76293"
-SRC_URI="https://commondatastorage.googleapis.com/chromium-browser-official/chromium-${PV/_*}-lite.tar.xz
+SRC_URI="!gclient? ( https://github.com/chromium-linux-tarballs/chromium-tarballs/releases/download/${PV/_*}/chromium-${PV/_*}-linux.tar.xz )
https://deps.gentoo.zip/www-client/chromium/rollup-wasm-node-${ROLLUP_VER}.tgz
https://gitlab.com/Matt.Jolly/chromium-patches/-/archive/${PATCH_V}/chromium-patches-${PATCH_V}.tar.bz2
!bundled-toolchain? (
@@ -101,7 +102,7 @@ SRC_URI="https://commondatastorage.googleapis.com/chromium-browser-official/chro
# https://github.com/chromium-linux-tarballs/chromium-tarballs/releases/download/${PV/_*}/chromium-${PV/_*}-linux.tar.xz
# Official tarball:
-# https://commondatastorage.googleapis.com/chromium-browser-official/chromium-${PV/_*}${LITE_TARBALL:+-lite}.tar.xz
+# https://commondatastorage.googleapis.com/chromium-browser-official/chromium-${PV/_*}-lite.tar.xz
# https://gitweb.gentoo.org/proj/chromium-tools.git/tree/get-chromium-licences.py @ 145.0.7632.76
LICENSE="Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD BSD-2 Base64 Boost-1.0 CC-BY-3.0 CC-BY-4.0 Clear-BSD FFT2D FTL"
@@ -109,12 +110,12 @@ LICENSE+=" IJG ISC LGPL-2 LGPL-2.1 MIT MPL-1.1 MPL-2.0 Ms-PL PSF-2 SGI-B-2.0 SSL
LICENSE+=" Unicode-DFS-2015 Unlicense UoI-NCSA ZLIB libtiff openssl"
LICENSE+=" cromite? ( GPL-3 )"
-SLOT="stable"
-KEYWORDS="amd64 ~arm64 ~ppc64 ~x86"
+SLOT="beta"
+KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
IUSE_SYSTEM_LIBS="abseil-cpp av1 brotli crc32c double-conversion ffmpeg +harfbuzz icu jsoncpp +libusb libvpx +openh264 openjpeg re2 snappy woff2 +zstd"
IUSE="+X bindist bluetooth bundled-toolchain cfi convert-dict cups custom-cflags debug ffmpeg-chromium enable-driver gtk4 hangouts headless kerberos +libcxx nvidia +official optimize-thinlto optimize-webui override-data-dir pax-kernel pgo"
-IUSE+=" +proprietary-codecs pulseaudio qt6 screencast selinux test thinlto cromite vaapi wayland widevine cpu_flags_ppc_vsx3"
+IUSE+=" +proprietary-codecs pulseaudio qt6 screencast selinux test thinlto cromite gclient vaapi wayland widevine cpu_flags_ppc_vsx3"
RESTRICT="
!bindist? ( bindist )
!test? ( test )
@@ -327,6 +328,7 @@ RDEPEND="${COMMON_DEPEND}
)
!override-data-dir? (
!www-client/chromium:${SLOT}
+ !www-client/cromite-bin
!www-client/cromite:${SLOT}[-override-data-dir]
)
"
@@ -363,6 +365,7 @@ BDEPEND="
>=dev-util/bindgen-0.72.1
>=dev-build/gn-${GN_MIN_VER}
>=dev-lang/go-${GO_MIN_VER}
+ dev-lang/typescript
app-alternatives/ninja
dev-lang/perl
>=dev-util/gperf-3.2
@@ -380,6 +383,36 @@ if ! has chromium_pkg_die ${EBUILD_DEATH_HOOKS}; then
EBUILD_DEATH_HOOKS+=" chromium_pkg_die";
fi
+# USE=gclient fetches the chromium sources with gclient instead of
+# using the source tarball (see SRC_URI). The tree is synced to the
+# official build tag of this release and the git mirror cache
+# is kept in GCLIENT_STORE_DIR (default ${DISTDIR}/gclient-src).
+#
+# gclient-r1 is inherited unconditionally so that the ebuild's
+# INHERITED metadata stays deterministic (a USE-conditional inherit
+# trips portage's "inherited illegally" QA check); with USE=-gclient
+# it is dormant and src_unpack uses the tarball instead. It must come
+# after the BDEPEND assignment above, since the eclass appends to it.
+GC_SOLUTION_URI="https://chromium.googlesource.com/chromium/src"
+GC_REVISION="${PV/_*}"
+# tag-pinned, so the ebuild is not live
+GC_LIVE=0
+# match the tarball layout: ${WORKDIR}/chromium-${PV/_*}
+GC_CHECKOUT_DIR="${WORKDIR}"
+GC_SOLUTION_NAME="chromium-${PV/_*}"
+# the DEPS hooks bootstrap things the build needs (node, rust crates)
+GC_DEPS_ACTIONS=1
+# the toolchain always comes from the SRC_URI tarballs (bundled-toolchain)
+# or from the system (!bundled-toolchain), so the bundled-clang CIPD dep
+# is never used and can be skipped
+GC_EXTRA_FLAGS="--ignore-dep-type cipd"
+# gclient sync runs during src_unpack, which needs network access. Under
+# FEATURES=network-sandbox portage only grants network in src_unpack to
+# live ebuilds (which is how git-r3 gets it); this ebuild is tag-pinned,
+# so the property is only active in the mode that actually fetches.
+PROPERTIES+=" gclient? ( live )"
+inherit gclient-r1
+
DISABLE_AUTOFORMATTING="yes"
DOC_CONTENTS="
Some web pages may require additional fonts to display properly.
@@ -480,6 +513,14 @@ pkg_pretend() {
ewarn "Not all patches are applied, let me know if others should be considered too"
ewarn
fi
+ if use pgo; then
+ eerror
+ eerror "pgo requires llvm slot 23, but there is no corresponding rust slot yet"
+ eerror
+ if [ -z "${NODIE}" ]; then
+ die "Build will fail with pgo"
+ fi
+ fi
}
pkg_setup() {
@@ -591,7 +632,14 @@ src_unpack() {
# # unpack chromium-patches-${PATCH_V}.tar.bz2
# # Warned you!
- unpack chromium-${PV/_*}-lite.tar.xz
+ if use gclient; then
+ # populates the git mirror cache in GCLIENT_STORE_DIR and checks
+ # out the sources to ${GC_SOLUTION_DIR} (= ${S})
+ gclient-r1_src_unpack
+ else
+ unpack chromium-${PV/_*}-linux.tar.xz
+ # unpack chromium-${PV/_*}-lite.tar.xz
+ fi
unpack chromium-patches-${PATCH_V}.tar.bz2
# These should only be required when we're not using the official toolchain
if use !bundled-toolchain; then
@@ -695,20 +743,26 @@ src_prepare() {
local PATCHES=()
rm "${WORKDIR}/chromium-patches-${PATCH_V}/common/cr131-unbundle-icu-target.patch"
+ rm "${WORKDIR}/chromium-patches-${PATCH_V}/toolchain/cr152-fix-rust-2-oxidize-harder.patch"
+ rm "${WORKDIR}/chromium-patches-${PATCH_V}/common/cr152-revert-to-rollup-wasm.patch"
+
if ver_test "${RUST_SLOT}" -ge "1.95.0"; then
sed -i '/SupportedLaneCount/d' third_party/rust/chromium_crates_io/vendor/bytemuck-v1/src/zeroable.rs || die
sed -i '/SupportedLaneCount/d' third_party/rust/chromium_crates_io/vendor/bytemuck-v1/src/pod.rs || die
fi
- sed -i '/no-lifetime-safety-inference/d' third_party/dawn/src/utils/BUILD.gn || die
- sed -i '/no-experimental-lifetime-safety-tu-analysis/d' third_party/dawn/src/utils/BUILD.gn || die
+ # sed -i '/no-lifetime-safety-inference/d' third_party/dawn/src/utils/BUILD.gn || die
+ # sed -i '/no-experimental-lifetime-safety-tu-analysis/d' third_party/dawn/src/utils/BUILD.gn || die
PATCHES+=(
"${WORKDIR}/chromium-patches-${PATCH_V}/common/"
"${FILESDIR}/restore-x86-r4.patch"
- "${FILESDIR}/chromium-151-cbor-fix.patch"
"${FILESDIR}/chromium-152-ffmpeg-fix.patch"
"${FILESDIR}/chromium-152-unbundle-minizip-undo-unicode.patch"
+ "${FILESDIR}/chromium-153-revert-to-rollup-wasm.patch"
+ "${FILESDIR}/chromium-153-fix-devtools.patch"
+ "${FILESDIR}/chromium-153-cbor-fix.patch"
+ "${FILESDIR}/chromium-153-system-typescript.patch"
)
# So many fontconfig magic numbers to cover
@@ -912,6 +966,7 @@ src_prepare() {
PATCHES+=(
"${FILESDIR}/chromium-141-opus-mp3.patch"
"${FILESDIR}/chromium-135-hevc.patch"
+ "${FILESDIR}/chromium-153-fix-iamf.patch"
)
sed -i "\!AVFMT_FLAG_NOH264PARSE!d" media/filters/ffmpeg_glue.cc || die
ewarn "You need to expose \"av_stream_get_first_dts\" in ffmpeg via user patch"
@@ -991,6 +1046,7 @@ src_prepare() {
"${BR_PA_PATH}/Add-webRTC-site-settings.patch"
"${BR_PA_PATH}/Show-site-settings-for-cookies-javascript-and-ads.patch"
"${BR_PA_PATH}/Viewport-Protection-flag.patch"
+ "${BR_PA_PATH}/Protect-keyboard-geometry-on-Android.patch"
"${BR_PA_PATH}/Revert-remove-allowscript-content-setting-secondary-url.patch"
"${BR_PA_PATH}/Timezone-customization.patch"
"${BR_PA_PATH}/Disable-speechSynthesis-getVoices-API.patch"
@@ -1369,6 +1425,7 @@ src_prepare() {
third_party/highway
third_party/hunspell
third_party/hyphenation-patterns
+ third_party/iamf_tools
third_party/ink/src/ink/brush
third_party/ink/src/ink/color
third_party/ink/src/ink/geometry
@@ -1671,6 +1728,10 @@ src_prepare() {
sed -i -e 's|${clang_base_path}/bin/llvm-strip|/bin/true|g' \
-e 's|${clang_base_path}/bin/llvm-objcopy|/bin/true|g' \
build/linux/strip_binary.gni || die
+
+ #! Fix for a phony target
+ mkdir -p third_party/rust-toolchain/bin
+ touch third_party/rust-toolchain/bin/rustc
}
src_configure() {
diff --git a/x11-wm/leftwm/Manifest b/x11-wm/leftwm/Manifest
index 29d9a1ce4633..dd3ea11d706f 100644
--- a/x11-wm/leftwm/Manifest
+++ b/x11-wm/leftwm/Manifest
@@ -1,284 +1,254 @@
-DIST addr2line-0.21.0.crate 40807 BLAKE2B 9796b9a1177a299797902b7f64247d81d63d3f7e0dcc1256990628e84c5f92e3094ee8d753d9b72187b9aaa73b7ca67c0217899f2226ebd1076f8d25b458475b SHA512 afde7660dda30dee240e79df1fb5b92d4572520bf17a134ef3765e2a077af9e13713952d52e27fae420109b40f6e24dbce1056687dbcbead858ffc21cc7dc69b
DIST addr2line-0.24.2.crate 39015 BLAKE2B 57186d6b957542cd71a0aa19f1355dfaabe6efa19b853c42f306494728b03d1e3183efdb2d2c7734a3e2347cd83a985d004f50c097e06b7520bd152310532e9b SHA512 39cbec3c920ffc0f37584afb55e1cfe4f182e4415319a4e9bfe842360f102f7b9315f6171c0cf71ba0337123903e604096cd573fe98698a26c8eebc2376d965b
-DIST adler-1.0.2.crate 12778 BLAKE2B a1dc17786adae945ac09d3525e609ed944e6465690787bbb831a1b9d53793cba1989793d0a5606d5d23ee20d36457923d451b1b3530c9ec7072a487aa3e55bbd SHA512 7ab190d31890fc05b0b55d8e2c6527a505e06793d5496be0b3831e0513412f9ba97f8148f6f68ed0770fa9cd980a5092d885e058becf1d5506b7c74b82674aa1
DIST adler2-2.0.0.crate 13529 BLAKE2B ec575b0bf12e321399ac3a1d59fce4ddbeabcc60cb3d7c2f362cce23eb29b4ea836451372d6d88552a4435ae29bb41d6230d55f625a4359eace680b9b771d0ad SHA512 12d12579ad617cf1a94cf95ab9d3f5db566c3b2de4bd5735eccd83c668fdad0eff134c996b73c46cbb9f932837682043878b8cc4764191625e9f93ccffcce423
-DIST aho-corasick-1.1.2.crate 183136 BLAKE2B 2d4306d8968061b9f7e50190be6a92b3f668169ba1b9f9691de08a57c96185f7a4288d20c64cb8488a260eb18d3ed4b0e8358b0cca47aa44759b2e448049cbaa SHA512 61ef5092673ab5a60bec4e92df28a91fe6171ba59d5829ffe41fc55aff3bfb755533a4ad53dc7bf827a0b789fcce593b17e69d1fcfb3694f06ed3b1bd535d40c
DIST aho-corasick-1.1.3.crate 183311 BLAKE2B 8dfcbba0b9d94e55eae739b16f5c6474baa43ee7854c5ca792f426a9f46fb0eece79cd493b804e51449181bcad338b96819fe977c02c9907654d713e26b9f830 SHA512 ba422a54688c4678fcf16e34fdf3ed06c333e6e3fc8b75af9272a215add494d43ebaef319021134b61327fd5d3572aec0dc655b714ffb3bc71ba3c265c9ebb69
+DIST aho-corasick-1.1.5.crate 184315 BLAKE2B be0ca3cb1bd0d43d06e4d035b18068ad6cf167832ac4447dba8243d2241de3fe62cb7eeb2b03afa48ca31f415ee3b56afc541e7b4e0ccfc8768952a4f8ea89d0 SHA512 324012ebcb573740ce56c7ef217dcf2bb849d0040e022dcc39aa8a46750088a2c26271016bfb6b1bf7a558d0c4bcefc004811bd8f0afd7fd000dce9bf0206643
DIST anstream-0.6.18.crate 29681 BLAKE2B b6f72cda084b38f1e1cfe60de2562e8d62ebbc352176bdf668a2d6be09349bec46d291cd475e8af814ce66def44d95cb98c325761150130752284a82d8a84f21 SHA512 5149977d6f7b5e9cf6350f1ef130caa3ff46c7e78976358452a185ce196cdd77fee48a3a9838f434ae6ea9c15b19f6bfbab156edf819f81179d6774318f08963
-DIST anstream-0.6.4.crate 20593 BLAKE2B 2b617c45d351e01222fc50f52551e57b4a8b0ecf84c6ddf44336c7c9d3b9dde15232b1c4f664d567849295bf8f03612b73ded56f1b3937392eb7718f1e0446c3 SHA512 0b983d626c53d1edc184f04cbd2c004eb9c40d14486b23cce86ebf50cbd3d916d32cb0423ae1d67c2b83b966690090af740538538ef846c0b126c686a1ebe159
DIST anstyle-1.0.10.crate 15725 BLAKE2B 36e656bd8f9c584f11fda5cfe0c2e24e8426b9e1b602aad34ed118ae6950a55440e292d2e0ff7615f5e4f466fd06f07536be198a59506a587d40cb0c4ede4f80 SHA512 621e7a89fad13db985f07375d316cf8efba57fd44ae18628a8049a65aefbaef27949f99317872e91e0922bb089a00234055199ea3167f80ae03d00ada4f75dea
-DIST anstyle-1.0.4.crate 13998 BLAKE2B fb501700855709e53438461c2f4b48d869613e7bb3bb700db8bd0d95082876d3782dc2cfe3ce110bb4a206994de56afe0e90fe89f9ccd07c60fe1c652123ba59 SHA512 671c6f57106198bcfc2f9000aacba98fabacfadfce2329dfe8d0e0a2af9404da483d7a844ca2b08e1fc0249371f574c13d0082c9f7a4ed90ff581308257a52d3
-DIST anstyle-parse-0.2.2.crate 24696 BLAKE2B 979daa24ccc3ea484445216bddc190f148f0ad83b95c997c1becbadfb641b67834980c413bcf5b7ddc2c6883d5e071a9636fbb44f79680ac42f8b73a797e466a SHA512 28039806f87c2bd8266cea834975939b79fdf0cc95a029654806655c0662520aa497d84eefadcd9edce204986e60b62678e76a09cdb38bcc50c91e9d05c4bee9
+DIST anstyle-1.0.14.crate 17787 BLAKE2B ebb3b3986c06628ebfe71665216de68f123840093013fa16c030c25e22ff0731cdcd7161737635c532d45ad0307a1b7f951859a40dbe1c812b3e905550b33b90 SHA512 2e7bbaf0794d209f0f19fb8709214c1b1109c27e14d91a8adc232a9bdfe76e653b2b86e341d71f63903e034c81f6ed63ffe7f123f6d631c0f8d41b56d70037b9
DIST anstyle-parse-0.2.6.crate 22343 BLAKE2B 85eba405dc5cf806283cf442984e86583dfe6c681f849eb7a347b7b67bd2b6f692e84fc9b5bd86486633cb2f05960ec16e8778300df114ae6676da43442db9bb SHA512 e28c9818afcda0e9b84c205d9c6697ce64cb06c21df2c3666869c07d66893105d9c5e96a27fcf2410a09f6af00735252e22b5c7d8c6cb3f68c4a8f376c49d396
-DIST anstyle-query-1.0.0.crate 8620 BLAKE2B 2d296b5066fd6284a2410923215571e6df650c5ef892d6de7a7088a0996ca30608797feabc84f3c325ff4d07001dac80ac5067d2a9c9d15d9ba59a276b399f53 SHA512 2781be5c82293b7ae338ec5046fbeb130de9eb2dbf2e4dfaa73ca5233032e1e52c133e141b02f33d4bc36d996a0a3f680ac82d42d614a5305005f60547133c7a
DIST anstyle-query-1.1.2.crate 9969 BLAKE2B 179b8dd6dd709c2ca67f4eb5c9a502b2867cb6744a39f824c4fdebedc67c6c3e07d107c7d817e2ffb589d13b7ed4900cf9653ddc0a43663217042ee92ce8c9da SHA512 26069d936c4b1fb09bc65cda0253fe9be8fa4e96c0821f980c772602b4e9230035ec8c9d092ef95e0a0354ac559f8d25f57a14c34086d4d241b5fba688951837
-DIST anstyle-wincon-3.0.1.crate 11279 BLAKE2B 593de9443b4c612526550285a6c156db26a233815e77a748597c6eea509ae511f41eb8ee736010f8be853695c9f1d94b034a77190e612f0a00bf00385d66ced2 SHA512 75ab14081b09e031ee0f559538976f39092aaeb6f561a56de83d12911cc2b45e28eec21068792c86a61e344021921ab55e7139ca79acec78e7d4a796dfa42a2e
DIST anstyle-wincon-3.0.7.crate 12400 BLAKE2B 2023529aa12ebe1b7073a88180ac7491fbba7e8556ba20061bec22b1db9d0f3da058faa5bd7f499d8e5da18422dec7e7648f3b4acd7b4a2d2064824f1b881259 SHA512 782440c1093235ad481f0b854f5a3d3acb7908d2e5ddbd4143139b8bfd0faaf2f9816c1034e760d9261a233e6d645098cd5a594064f190662908eaf79972c903
-DIST anyhow-1.0.75.crate 43901 BLAKE2B 6353557d7ec2cbfdd001c039fad62c95fea9e02b113149f726fd14bb36b31e637e8609dd5ee20a900e9c11bb783d9958d664b31ba7c467382fa7f51d477ad3aa SHA512 190d6be8ede0af9808210db53e4dc31ce69b126a26b0357220c4705a11e83cab2c2c09c59964a35794f3c434f717eaa6bb669e9e8f16012535c14246b17e8d40
+DIST anyhow-1.0.104.crate 48819 BLAKE2B b74402bcb5c566403e7f768a8a240755997ba3cc2093e132b79b7a6ec17ffcce1aad44ad0d96a451d2ae7bdf5cef655762548dd30ed3121f7b6f3e65bb98d461 SHA512 5de699d3fffa67fad1be5cb632de87c8e8ca026e480ace9eece3065e879c7996ddfd5e11b9a0b0ce002a880616e6de1de71ee73b268660cf30525bdf3ea86ea4
DIST anyhow-1.0.95.crate 52155 BLAKE2B fc9cebdfae0afed86f2dfb7faf62f5a108000895317dd0cab9c83d6e48c891558fc3a1d8b9940b623b4c6fd861631a0f0344a9915517a9bc39dbfbe48ec6b45b SHA512 8c5c176381c3e861c3c4451f7cd3d9e2447c0a55735ececfd3199288d65d36dc5fdc4a19a0798f62a0b9d6ca2c155a616c7eab8bcd53e6ece743aed57ec3d0fa
DIST anymap2-0.13.0.crate 17337 BLAKE2B 6f7f2c157a908bafadb96b86d7c064aed5cfa144b4d7776acd110c7ff676865ba64aefc17a5908851a5b1b850bfa48b162b877ddc90969de97cd0adbe3123736 SHA512 005032261274a5fed2aebeb0ae3b6998f184899c426d649d6bef9cbf135762321b13b7941dfab3a9577936676469a5bcd324d36824f6c6d81408012ebf3a6510
-DIST autocfg-1.1.0.crate 13272 BLAKE2B 7724055c337d562103f191f4e36cab469e578f0c51cc24d33624dea155d108a07578703766341fd6a4cc1ef52acda406e7dba1650d59115f18261281e5b40203 SHA512 df972c09abbdc0b6cb6bb55b1e29c7fed706ece38a62613d9e275bac46a19574a7f96f0152cccb0239efea04ee90083a146b58b15307696c4c81878cd12de28f
DIST autocfg-1.4.0.crate 17712 BLAKE2B 7f7300439899be03d001dd32b7e797bc4b9a58103081b6f7353c4b5897813cedf870b3fb1fa25d320a75326b334b44d8287e8603de34fc560d0b567143915cc6 SHA512 3b5e7c30bc73e105e4bfcab584c24fc4016db41fac9c356c6649fd841051704bbe8848e09546eb50d7c1f18ea8ce1cb72fbc268a620d5c609b3472114b5be73c
-DIST backtrace-0.3.69.crate 77299 BLAKE2B 594358f1d9171fc369f50cacffab03b8a10a8fe3da5b915611cb74b0dbad0e048c7dc79c53569d89827db583e0f61fb7269147b6258781a1599a811e642414a8 SHA512 6e86de53e1c5003ef68b6a85479cde1e70bf416bdc50e6e32ead9f9f070fa30ad46de22574041c844ddfeabd5d15de01ef746f19f8cb7f257c491ef0bf071244
DIST backtrace-0.3.74.crate 88516 BLAKE2B 594b537f3860560bc790d04d72a91ea25bbf5f2494b9c43377129a8021c02d9c16471a223e518889775a816c45513b14bf097c453846b62302a58b59753a5fcb SHA512 00cb2be0626f0bf6ec8b8f525bb129d3ac74c386c5e46ee0f343edb78c863222521f8132876057a5a1facacf40792dea51f2f20e986b35f3a85bca3dcf5c1520
-DIST base64-0.21.5.crate 77134 BLAKE2B 901cf92d7dd8af2bbb789ffbe60972c1fd295b16690ecebbcb500e4613afa057ab2b294bbafdcaa4007f46412825260a0711d89e55664418a503dde02c8afd1a SHA512 40b1d8470a932c8b7f31717e33bf26742c1bf920caae639b8a992f77e64d5e6d287569742c1348daa25b7325f8ca8d8a312754a743dab3932181f37149d91b16
DIST base64-0.21.7.crate 82576 BLAKE2B 25cc8761c14220981ff4ed332058f6179948080cbfa2b225ec1d1602e4af14cd470c969e8b7049117e6fc51a5a24e06b1d27bab844486ecb76409d12e0581d5d SHA512 c6986d88dd9aa081d914f35b4174be4ba874848657ac4b5e63b9b45af765d973289c548ccb5a01584edfc0d8d79ff5be25b51365295d6e7a311bd7f0ae3c0cb9
-DIST bitflags-1.3.2.crate 23021 BLAKE2B eb990bb27b2bdeb66fd7212ce582cb36e1c616debbac85df642d0c82b25439e6bf9b1e811fac76b59e58ea3c1bbea6170d03a61e8f9a395e4334a0e2e2987eda SHA512 3c698f757b5cc62f815f9a1cce365c3d2dd88e4db71f331dff8bba86c2865f755b81cb4c9bfc59bd86b7643b0943f9e09a7c4f8ad75eb2ab0e714803d0129f62
-DIST bitflags-2.4.1.crate 37043 BLAKE2B f61c45b142265e9c2944c7054e01704de47510735e9ee5351cd02b98676cc4eb42d68b1fc4849ad5f54654617a74f20cb533b4207c2fe76516b724ba9318b414 SHA512 d3fd7abc95acc1cb5bf16d6acc12dbb8eadd250f069268df13c2e8dc3d5f5c15a929cd17ca931c77393b64dce0516ef8674c469789ed32d78e315b5faada062b
+DIST bitflags-2.13.2.crate 51678 BLAKE2B 8bbeb87f475eae13e691f12d3cf34f865dffbbaf44e400f99a406b487b59be9b08b3de07e7a3bfcf2a5d04d3ffd9af23386317e964d062973347279bd738ef25 SHA512 362553b15e7f09d30f9aca4c1f991f040c446aea4ae36f46ec9ea460a0cd2b98052fca4b56d2ef48147cf1c73f3f8782cb579aeadfbfdd2a22b55cd4b096022b
DIST bitflags-2.8.0.crate 47482 BLAKE2B cfa5dac5bb9fda57a5887773399d2507e83ed30fb0c5a332c48905f912c9b8d3c5e6493a9626a73459cb67d63973efff719ab4153a14e774ff4a632c96872ca2 SHA512 f1bc02c858432b0e1fc3b10f239c5886e51d620d55a75521bdf35c8e8f6b6cf8db97e90e08eb2e96715a2c5b28858af305eb266f1ce0c90f9d3945d6d9bdda8b
DIST block-buffer-0.10.4.crate 10538 BLAKE2B d819c4f9c4be85868e8b105fb7e479d2e58d3ed85c3339bd677a3e111f85cb1ff624a54d7802ab79a6e1d9221115f66388568340480fe83eae1cb448f19f5b11 SHA512 b7d436d8e627e16e6ddc300ee8f706a6cef28ff6f09eff848eedee46f84bdcd03601303c92ab8996042e55922866a59259948177c0a4496eed723523e77f6fdb
+DIST bstr-1.13.1.crate 356631 BLAKE2B 074f90244aa6b2914506779636463fb1d418b38213da6a438d4aaf40eebfe6c334884c99eb8ad6da1d9ddb8cf5ffb289bb21ac8cbc4dc75957a9b830ce184b82 SHA512 81ef4fbf5a371c47b933d5405cfe23a826683af76607baf4972c1e6a2b23308f73ce4309f2f7eecefd58e1773af0e9c943d7407095724b75f2695cb17d35a653
DIST bytes-1.10.0.crate 76656 BLAKE2B 2f10cc49184de42dac9073264a4e981ae132760bbbc84cab9b5d00462a7b925ff2c1c00aa2284c34875148a025794e5f4eb63e17b117e27e89504299d8921406 SHA512 ee02d6c0ae18e75ac3a44f949f3891b98865bae5594b25a866b619c42fb574b5249e4e936972373845030c27cd94d2bfcc14885f9f92ef23bf059ad7fc8fbb2b
-DIST bytes-1.5.0.crate 58909 BLAKE2B 2931f19e813eff73be407677622fa29e45f9b49434d5b3a04104b56563fc0e941fd8c5f996258a1aa660000ef014668d70b683b751af8e48d28d0aea76890c92 SHA512 6654cf41d8f0d7e19b05fd95044b9a3bfccd81f469c797c6aa763a4dd29e1b34064bed2e094548d147045cca7bc4706059de5bcf9f6579189e6068fbbf1c29a3
-DIST cc-1.0.83.crate 68343 BLAKE2B 33245b33fa845ea2f36da36e3830ec835f937e4319865b357ee9d5ea29a0f9f8392eadb38bf1d95e3c15ed201e561acaa87aedcef744f8db3dabff87a96c7f02 SHA512 742a248c3a7547bb220a0b9c97b67a831fab9b4ac21daa08c85a3966b9fe576088def33e16132fcabec9a2828a6fc437088bb045bfc98b2cea829df6742565a7
+DIST bytes-1.12.1.crate 75667 BLAKE2B 7d55894cac09ca8aaebf352e3e524d6a7f53f3f72f6944b8725c6972e944e27eef7e7f57dac432a3b89ceb8b01546e398771a297d0384f89cac5a4ea3a157a96 SHA512 1c548cfd8d65eeb84342c4678d0591470cf6ca80fc3f549313d2c937d7549de6ec2ec15e7def761c246870d81a55607c38faaad0d28f9701e408cda04f7152de
DIST cfg-if-1.0.0.crate 7934 BLAKE2B e99a5589c11d79d77a4537b34ce0a45d37b981c123b79b807cea836c89fc3926d693458893baca2882448d3d44e3f64e06141f6d916b748daa10b8cc1ae16d1b SHA512 0fb16a8882fd30e86b62c5143b1cb18ab564e84e75bd1f28fd12f24ffdc4a42e0d2e012a99abb606c12efe3c11061ff5bf8e24ab053e550ae083f7d90f6576ff
+DIST cfg-if-1.0.5.crate 9578 BLAKE2B 34d99ee8193178424c3fe35b33990a621d88a5ce94e9166357a3a8b49fc73ad489f56dc52af5a21aa85a416b575db4e93819f3057e44022fcd6bc4fdedc2a8df SHA512 5f93906e4703366f5b064f44c5d834cd402240a7b48cd8f72a40bf198430501f5939507c8ec5235affbdb5004ab6fd13a5680f7716544c6ecc6ae9c19512d75d
DIST cfg_aliases-0.2.1.crate 6355 BLAKE2B a758d9c88527f0e6e7cfd6d4c83eda1bcb4d6e2438189fe08e8ecbcaa78d56afc5a4873f3b82bf7da96afd690b44cdf1e44466b6da0f37c358b340481017103e SHA512 74969d12d5d24002a29e08d52e30fbce014dd481a7c35ee0162e69333c5f2d7755f3b02439b31522e12444cf1ac8e65880ce33fe6778dac03757e362cbf8a72c
-DIST clap-4.4.8.crate 54609 BLAKE2B a975094e91d9aa9ccde5e79d6b46fad451dd80a1765a116a3c94e3523bc0383e51a5ce7383021b10776654e1252eb08302d9a5761bca903b154e1a0a1f5164e5 SHA512 579cee9b0b582d23c3b78fffcbef4c33ce47a67f511276922daee838aa5ad26134ba81a454bfdfb72d7e23df69b78227f0b60e57d2ca7455402d37dbbf099dbc
+DIST cfg_aliases-0.2.2.crate 6527 BLAKE2B 4e0899cfdd5a733df2b66ae16b9f4b427ca106cf68c566e46939b7207dbde153967f0fca7b2277b6ee1d0802deb1703022d946be80d32c9eb0286222bab3237a SHA512 20d2f19d63f5ffd82e289ca4832310ca86d1bba9d626e82f8c29c80dde566f2d895c9d1c08524c954575529556d1d6f466217da69d726c55f779e097216632d1
DIST clap-4.5.28.crate 56073 BLAKE2B 3ac81e50fd02867a9aa57d2d12f37ddc65ecccd88f5ca8ff0946da006acaec62d992303d8bf2c9994a6efc840ef4308b65b1b8846160488672abee12c634a0e3 SHA512 1132d3ef822ec6122e5c8f96f9e04d281d769bfd724df3486a2bdb7fba7fe5da5cfe50a6049af18167d84a7912b59996ad04cf6db73f6aa026d43854550cfa6c
-DIST clap_builder-4.4.8.crate 163164 BLAKE2B 1d7ea3e3bedbe44f8bfb80014bc8de1057749b3e94506a83c3da6e475a67e44911bcdc6f08c3af02fb908059a745dcc2268d03fbb58d010841a2bf41645356d4 SHA512 83a3a4c81bcfd769a787b4f91b29488e65cb3d4e9e5160ab7b7289e5860a7d4058aa08077b62b9e8d10e4c1cc7c949439b677444d94c8ae00a7bebb2e0e8af8b
+DIST clap-4.6.7.crate 65831 BLAKE2B e4ae6a0985c452c2840711eff47611724485533f9ebe687b25f571d23a492d05f41adf520a75e5a2c364a18e3e1a8d3d90dba19409a197842d249a8ba78f17f0 SHA512 461ba233b8d6fcbba51b74a3954bd0c83cf4a29809f8cf73a56927a04b63e973506d42eab19db83ac2ecc4a381c265569665a7d8b81dd6753ecaa544095e6f2f
DIST clap_builder-4.5.27.crate 168024 BLAKE2B 3d9a1c38974eb6b78649c37122780e3a5960084fd52612951e5b2419535d749db37bb01067cd7acf2ae7864fbfdbbcfdeedad58814904c19105834a4b949bef9 SHA512 77b0e968361bd348b95b5b2993d5d1a3a4f3dda5fa790598bcb5edd201e7ad487a9ed87f551d40c30343e3e0a30942273c07c7becc12b4b67ddf7395488d8265
-DIST clap_lex-0.6.0.crate 12272 BLAKE2B 22aa04997fffa15a2efc7013ae27fd223c3247cd31f8fe96aafb4e87e3224f075e887df10a95a2da80b468d4e16088ae9f171ba6551c0ae06d77bf3b8920ff9d SHA512 3651aa5e27ed35b6b75b1d25fd9c20c26a2a6039116e54d84c51469087732a4f0fd71754326456b367e341b017d03749e9a6774cb7b62250ca8745f5af46574e
+DIST clap_builder-4.6.7.crate 171709 BLAKE2B e0d4735f1b0d70a3f83af1555e06023a165e6dd0995e72f70d5df8a5bc2fcc2b1b4515c3257c319d983479b44925d3a3fb8253b6d928bf66e7bef99315d6b505 SHA512 b86750b56cae3f23fbece3b56a18b9c17f49b4564ffc0e3cc0d7f0af921a335f5c96f2ccb602032ca692d896d76ed2a47d72a0f10325861e69335ba8cf43eeaa
DIST clap_lex-0.7.4.crate 12858 BLAKE2B a5ecd50cc503157dd69746f3b6e9c288e0fe4f6d5d82271499f657134fd401fbe076255e2be6a23ed0b69daf3941c6429dad8b288223b0ad390a2c435575cdd1 SHA512 a2566868f4619679d3b74b70592ffa6a04b13e38e3196c56bb1dae8bea0c711bddbccd778d2aba3cc0ee074c9b1cc0335222818f0d47fb3cc8109cbc35bb992e
-DIST colorchoice-1.0.0.crate 6857 BLAKE2B a0818be1299717461ffc1bcfb6fc53a0b3b645aa8c45fb72e045cf2d876fa207948610e58d6a837aad24838ea9616e80b0558ca3eae03fdf9bc4c03a8e5ba52f SHA512 53363f2889cd8e8a3b3ed10c48356896c0daa72f3c12c9c7804707ab0dbc07c0e34ef52fa4f0fb1647311ce5913168c1bf62c2407ff86a33f765a9e6fccad551
+DIST clap_lex-1.1.1.crate 13572 BLAKE2B 9903f72059f27fc7cfa9cba6165a78f2efcfd413bae1c582364b85aa6f850d94c91bc1c5e200e4e4dd82a6aa1731c8cfb68c0385e95533cc077c0b63486996e5 SHA512 416d1f428e8fd275b6da84c77350b405c584883a96bde775a489782dfa3df2968a9988d528dbf05fa8acbe4cbda929f5a268e48e7c26b5563c63decc83fb114f
DIST colorchoice-1.0.3.crate 7923 BLAKE2B 7055fe61677143f0d4445ed5f6be2cbc284c155aa6ceac04df6f3fa2563a225e440ba708bf40e298ad09775ab7c7e1842b5f6dd78422b06dbd1250908e3227ee SHA512 fc26696189d3935d5510a1237504339c1f354d03ffd3b4e830b7080335aa778bc72787ac5fa9a67a731b9bde2788da778d497f2ef97ec68bdec5145fedf4cd14
-DIST const_format-0.2.32.crate 77317 BLAKE2B 69b87c1d9dd81f5f92fe7cbc09dea126d386adb2cfb359ed9a906af554fe9b4083d49b87558e019777aff4d93e52babbf39e5d9934ce7163435168656ddb11a1 SHA512 05f883696902f13bb78278e0c202c092fe232cfab7a33c078a16b5f67825a85dede0b6bbb2969dad685977f67098c468916c7fb1d9c5c65bf7fee0a5f8329091
DIST const_format-0.2.34.crate 78068 BLAKE2B f077577c32c62727ab2a3754719926728cf1b63712f0e18971bf7946912d165fee6dab05aa70c335caf39e9cf21929bc3bb6f1ff977123dec11080ce6ff91e32 SHA512 4482e1262dc47460aed17cc3475ec198a875202e5719d3554b69631029e4045d0ee0588a973fc4929f4798ecb92d1763c4bb9d1be09b5f99642eb9a6451586af
-DIST const_format_proc_macros-0.2.32.crate 24389 BLAKE2B fdb8dad234c45a2fb179c41573765dc0495ffd7268e325403ee9e56b80e68999bd886e22c414c6591ff6be798ae1c172b671d167a7e3ceb853185613f1e4c1c1 SHA512 01b4fb82eb8e3c59a80bb4a819db9218c25d57e947eee6e8a7e4bcc9339c423a2f028fac0959f3781da5e20d7012d2264f05751661b0df7f7011701da124ad0e
DIST const_format_proc_macros-0.2.34.crate 24396 BLAKE2B b7826f28e02937dfc13a80e6790b0f7e00f6c2be02d4cfd6c0a34ec2a42217189f4a9f0feea1927a135ba5f07c6e11eaf71d402ad25d976a5106f4f1cee7dd93 SHA512 f42887fba0d5ce2e15b18381cceb711a661e8da6267ef7dd0ee636135daf14759f04b32d9b8628c5ec63acb3acdc5a2c101c34039147d55ec90fa5c956ed807f
-DIST cpufeatures-0.2.11.crate 12727 BLAKE2B 5b91dffb779e437606db9b75d2b05c2de19069575a8272112e9a0389f5bd8de0f753cd90330b5a5bb6a3f84c9e794e96328664557db31c43853ba43097229efc SHA512 af179e269a4d5f48b50134a5e98ac541a9a0d6aa34f13fb8fd9ce8d5092352e1b322437254449ecb1bce608d8558b1cca2c79232ac1327efd887193bd1d36031
DIST cpufeatures-0.2.17.crate 13466 BLAKE2B c6392b635542a6fe29958fabe7ce725354a31e24f6f144718553218247881013f56659d2efc671d47394294373db2d4ff8f45c7cb520ac22f2ee5c462858a1dc SHA512 9ae64656a21cfdd0528d87ba95f6213860bf72ccdf866019e65ed6662633e73490f92c42c80125559b3dbb7822090b5faa8ea564c562e04041232809ec2f58a2
DIST crossbeam-channel-0.5.14.crate 92728 BLAKE2B 0da1bb0f0dc6f35c4ce8d4bb058d61b7c3ff4854f71b58968edc691c1d7016ec845f27e2fffa34835e86f19fdf4507275b013946b2fe3135dfa83d328ecb5199 SHA512 ab3448f7adeccab3c1d988746c3db1fc1e8854a53f7b5cad63fb7874e5b6f5663d34541d4c5383472db56a7c8b272fddfc78ea2ac1792a18d6c8230dfbabad45
-DIST crossbeam-channel-0.5.8.crate 90455 BLAKE2B 017132056f1b40e55fbc7a09b75509d72b0a6123a0e5ea5d6104fe822f73b3ccce670d711d3b84b5ce743dcab5f10445297a6701b71213b77c0d56e2c3fd7160 SHA512 47677d6fe63050c51393e4a0537a3c65d7055c9eae118ebe60c5d716b4f47f23c2b1947b1e1b66bfb34a57c4db3a44631d323e996dd545565fe4f58c25863ff4
-DIST crossbeam-utils-0.8.16.crate 42508 BLAKE2B dfaf9e7cade2cb5a2de90dc622e58a69c5b28fe9f69d3cbb945431683cf48fb409565190e3414a815563afb12631d990476919890fc482ce6b5792fdc25536a7 SHA512 4b8d599a8b93015eea2fd404cdf1526fbb94662fffc7c64d2f0659aeef349e4ad682f61b2b85d075c7f3fbbc4d8106cd7caf6e65dae117ba982f31262df3f831
+DIST crossbeam-channel-0.5.17.crate 94171 BLAKE2B 5ce8af3ec1d0054e78e9754acd722cb5c50e07717643b0a9ee3688199dd3b8c1cff2d11f5a9d3623a6e3e10f919f70543643071d4fa6d7e9fed5829059f493b2 SHA512 89989b834d532f85cc66296d98f2f678d9ec8d0b7b6508cb0462f46d3f7e5839a3c43230a9cf540827c2d130bef4f7f8d050debfbf53daf12cf252e8a8713c05
DIST crossbeam-utils-0.8.21.crate 42691 BLAKE2B cd9015c41f532eb3c90101603f32d383f01e6880718b727d6d1fe46872ae276cda685e1b548cf77dd22bb1a05f0d4c4982332c2bde90e1743dbd7f51919022a7 SHA512 6f4aa7ca10c20da291c4714b56ceb1fab1c06b03b2f4e28e474e9aeb95ab6615a25462dc7819713652c3b5f6a06fa0f24ebc92c533fcf35dfcf2655857d975f8
+DIST crossbeam-utils-0.8.23.crate 47174 BLAKE2B 1a5ec35d66494cd04c1d35f13c95e5ef34e19597946882fe8baab13eca3da89bb6089c6c11f61d14214f4d1d54a3b6a81277f45460d120b61eff647bb3e436a6 SHA512 b6116e4440aa8e0012a3c67fba141ad76fb820fa56f4a76914da2c531b5c1dcd9bb7d8808f41379c67e2abdbf73268101fd6021d95cbcf9f1aee82e10aa5f18e
DIST crypto-common-0.1.6.crate 8760 BLAKE2B f2422bfb89c15d47a8f91c8f6695e05eb56990a922e3cdf3d426044736f9932324c0d899a151a6df4d6683e6a6b21659c657d3988734014c02cd854bb4b924e7 SHA512 471dbc43f517089d2cfe0868e29510c6ca579875b3bb5d013c70796db969b609b6c4bb35c9a07b9a2917012dc5708b717d48e317a20038adbe7e7039bf3ada6f
DIST deranged-0.3.11.crate 18043 BLAKE2B 738d5a88732e227bb0e0d33c04ab8248a699c7c499100666ffcd78673d1f38ad2d740222ab405e3eaa7a0a6f4596cfef90bd581a1baf77c954dca830c22e74f9 SHA512 48485666d3e50eb7976e91bed36bddbaea80fac4ac664723130069bd7d17893b6d1a2b82a4c3dd61677162e4305ba5ea8aec7bc2793d1b8b92dd1666c204fc43
-DIST deranged-0.3.9.crate 17080 BLAKE2B a1441d629cb5d8ed75c49c25a42c144ecf5f6d060612b01bc2c78cde577f59fc3aed35b8b5629be50433244975fb4f98004ea99bad1177862d15c8695951dda1 SHA512 63abb2a6aaa770596caf96672c764e2f65b867653f9cd3fc268b4d2137afee7b3fc0618d83ab29c80c313e03455fb717a5015cfb33a69f95adeeddce723003fd
+DIST deranged-0.5.8.crate 26885 BLAKE2B 72b9b2025009a0c69a6678f079415937c39c4a4ad307eb8dbed1f8d2d6e125f0ef4e422b65a7d08c2b1043814acafc0c6a0e81b024fd8736930eb29793e000f1 SHA512 cba9189672275a2d46d61ec04ce8d08ed314d7dcd7671029f3d7099106e112879eddcbeed23b8e167467abc9e1f5211786b5a91a7b2c41720badc601e21a17ac
DIST digest-0.10.7.crate 19557 BLAKE2B 61e69d78cb8d6850ae26ad7ff2d52dd6dce820d8c621230def11cc0e8aa6d883a6e1b25340fb45748db52a8ccf3c8d36a8aa0c8cdf4d4eeb4e3f870d86abe09a SHA512 0dd8c012468ab9011b89413ea4d3647d95b1f683b020a0e6274c95ed5148638b56fef19cd9044c837ad53715b582b88eed277fe96e917c27c5d7abdbf7c3794c
DIST dirs-5.0.1.crate 12255 BLAKE2B eadd38e85211ed5aee7fab964e90342273320644c36262aa7b436e493512851a4751a09d22aa8bae0495f4b22df6e7395d13715ca8b8c6196107b1be03af9328 SHA512 cfc329518e85a25c296521b9aeb6e5d5f60b4525aa786ebfa8b9f198446a1ff5892160d1bb4790d7f3fc4a0abdb5921b2e4896e271a3fc3a3225897313b77bd1
+DIST dirs-6.0.0.crate 14190 BLAKE2B e214cf0c4669fa149d1e3eda1f6ba5b10a4a4b7d13a9050e63c13a4b605aae5d545bb711fb659312dabad26028f190853764acf74c1f6f31014e57c0a53a2281 SHA512 f29f0f932aa627bada67db5bd9d2661b5fb3b18d07030f5d88da28de7049eb872a2f35756cf29c094aacbc2429a3a333b54fb94d70e470288d3ca091cf6d4aa8
+DIST dirs-7.0.0.crate 13798 BLAKE2B 688a0645625d7452d16176a67aa4c4d7cb14375a5a7040e77e10a5d7d61ad394532b0bafa544f7465a9055d2a59cfc8aa628d4bbfa866c5499ccc4b2b0238508 SHA512 d20133106a2ec405c576d64daab789ade72dbc87c179f62852bb1fa037f90dd46e211fd1006d4fcf0dac9ef8842d78a736b024dd228034727005bf7cfa9c992e
DIST dirs-next-2.0.0.crate 11689 BLAKE2B f5022bc51dd50bad4ad0fd05b159a4117aca47afbea66dc42c8306ca58f3a550165afbcf9f5f721ef5ad8d357eaff305c6f6e42789354a910d5f1d05d3b7b7c6 SHA512 6ccb732da8ccf7bf35952c22a3b0caa8238319feb0a6cd3b0957e6be12548a2ce507c69cb6d3cbd2adfb37e13e6521c6229da5999edb0e47a292a41c3ea1a766
DIST dirs-sys-0.4.1.crate 10719 BLAKE2B 30334f2192698d7d03bd4e8bc8a682482da7d13baacb8547a132f55019d3727ac35579926ba4367fe0a5b7fa917945abc03e010cb7363683753c87440581df42 SHA512 53c7c8bc76d7211d08a0e6b25caaed12eeb7283cb4b352c12311db3c796794330943259a08e48ff9d3a280917920a088e5aede32677a4b2f9f819c2dca6adb9a
+DIST dirs-sys-0.5.0.crate 10157 BLAKE2B 0808bd5c7bfaceef00d62476ff459a8f3ab19fdd4d3a860b04698e51c390285ab8f01690fdec7faf01ccee5734b28c44e50a4358f30de1193a0d54ae5c6622c3 SHA512 c2ca362ad04e92c929e2cea4db359de689e512b7c76246c408f40d10f1d47c5dbbd49238e67edc0a251bd642ee292cae88992e5755035c632baec36cd77c10b2
DIST dirs-sys-next-0.1.2.crate 10681 BLAKE2B 71431533dbfd6016cc309c14a842ac8d43577abe768e69bd2caaf7d19d743f3ca95b9b0be1747077282089c64485f3d4e24bec8e56d4d883f25e494d328fbf3a SHA512 b3c40a8e93d4f9f4a890718076e14779aedd67a79da61b466788268c1eaea19aa493f043a7e410f5023a23d5509e639a6fc6681fbee30e252a601091cfffa2d5
-DIST doc-comment-0.3.3.crate 4123 BLAKE2B a82d1c1a7a90af6e111b5e684a1298d7eac5fd8e4bf7d5baf6c7403d26b609958716d57e51122fe7ad7626fe00a2d824dcfef3cc2fd7679fdb7b5099603de1cd SHA512 e98ff9646a3612bd41bb6f278e7b6e9a0c58747f8b82524da814cf51b7f06c76ad4d65b502ac5740e818744abb295f78f15f8262d0b50ced1523f6d1a26939ba
DIST either-1.13.0.crate 19169 BLAKE2B d6223c76421babf163a694aa513fe07adcf4cea329872c02f5af5956e89b2c353a899f5708e5a2924e5a92d871ba748490350ba30c17dcd78dd4379e229f6e11 SHA512 72e803079bae621d282136ab1e423ba71415bf12038b6f386f294cae68a67ad9ff16e4fdf4344eb3fee4418e853f9cac344c248f6befa3006d1c954668b36322
-DIST either-1.9.0.crate 16660 BLAKE2B ad61038bfacb16f678fff5dd9ccf8f345e1bef18bd7aa0aa9c99d44abf8428939362f32fc8dbb1b60ac56016e0096201071d0bf8c0431b660605d0dfa97da466 SHA512 4978d50842386f51e31a47ad037d5e491106a668bc701bb833e6ec3998afe3ebd80efddc47756b2f300f534b39b26fc01386dc878d3b02cc8c1fec6a474c2177
+DIST either-1.18.0.crate 22357 BLAKE2B cef6eabc788d34cf10ee2dc7f18b220e485dd387588b971f4375ed109265f32f29e75ba99ccb78b81b80359b02d7836ef3108c55adcd04a3fa01308bb0a9e905 SHA512 b74a704e39869ff7231d47d3e2fefffc52cbdc7da5ef8fbbef0b9b032b67cf91b99330c6134a76ebdf38af9c93ac857ff35376d5fb350ec407e8957684e51535
DIST equivalent-1.0.1.crate 6615 BLAKE2B 302d78069d9df05e78b53f0488a9e4eb98fa2bc1e21893dc8a0acf2234347ba7c4df4b9d6b380ae77d8ffb1074b9c790460fe2dae47318aa1c4fe4208244540a SHA512 b2bc60e804c1b02c461dcefcfd60fc37145af710d183ebe65f9a4d63f2b2072d23193f98dc550a9213c7fdc6a2a837af23b04a89294ebbb681a4aaf5d5031140
DIST errno-0.3.10.crate 11824 BLAKE2B f9976b538868daba3cd2d47ff2fdcda16b4a436ca767f865f23d1139e7f232aba263dd4aa38d573442c762999c8a8beab8a4a8c10649d21b49090fa65ced1ec7 SHA512 fa4b9a368f254cd90c6f69f6883af4c579829a6da6f31481a1b527ac9602c8ffcb5e9518cdc32c39b5589c151a20e75a7300c8a907d178346185ecc6e8749f3f
-DIST errno-0.3.7.crate 10712 BLAKE2B 1ac3a3084673791fc31e228ea3f49d334eea106f1bb6de3f9548882167d8982153e0d9cd9dbb4bde68fb9a12ea8eced99a4a128c507fe8a6ca90caf849cda1dd SHA512 ba4cd3919fefff84bd5ae473392ecdbaaec52ccaa9d1d93ae06ea5962523054d0fa1c5866787e36114a00d449a60df811a110f89c923a6acf7430d3668c2f54e
-DIST fastrand-2.0.1.crate 14664 BLAKE2B 7a5812153500170dcc53ca8d66384fef46eeb5a8f970be43863f22f82bf427672d07cb053f4e04b0fea358ca89178399871235680f57223b8561c07b8d21cf13 SHA512 79a1e1b3f39264f037def236afbd87b732f5e0a2154b1d9e721b3c7990c52be45138320e2571fe628f482e0da7e3cf867abb745e3c277b19015fc031fd4410d9
+DIST errno-0.3.14.crate 12002 BLAKE2B 57fd842a717086ffdcfa5102a8c52bf8210672820366d78aadb6f159055917477e6771e9fbda88787278bf3a116bc7253dcb705b601e54038a93a1820c3c287a SHA512 1de95c9806323d63e7cc95111e67b3ba1ee4b9d47b70cec33485194574d6b584d22ff877dfbc244317822721291d537d9509ae5e46f1b45169cb478a78322366
DIST fastrand-2.3.0.crate 15076 BLAKE2B 15c9a1c4f64d94c4bfd38ae139c6fe19b6b621a495c1b57209edd6d76d978eaf018ba77f356b5086c3f462a6de044fb5e3b172fc288309569911a17ec39951bc SHA512 267fecbb7459c8840f03425733d278dd6c4e7637b85b99552877117ed5e8015e094d86aa95841f77064136b7f382276c3cb2c2bef7b2881d272f4aa57c5cf947
-DIST futures-0.3.29.crate 53624 BLAKE2B 365ca3a09175cef1cb9314abfe25b6671205450fca77257cbf11ac156e5d805712783cb6aa1b856487b04fe3c410eb93e0fee2f69aed1c43245905ef17d170ef SHA512 08d96848a0bc20f3ed3e4d1aad923b8ca3a90f82904bb2f901595b02dfb70e9dfd4bf46eda6bbc48796a4e4ead37f68e4f7226b0f18d715e23746dcbd2613830
+DIST fastrand-2.5.0.crate 20782 BLAKE2B 6c32deb12c2e946e8eff86a0bafc5a9c4b6ecbd3d0faa10b68fca876638766cbc4b866dfaf52014bb4a1cfe6b58189e8cbfbe2495e9cfda58f90ecbf0f821e68 SHA512 0c7369840393fbd8fe8c6fa94d47ddc8e8c709270d20c9ce81c3902ea6dc9cfaa5ee0cf2e9b5b865453748283545e206264446d905550c838c052534a6088ddd
DIST futures-0.3.31.crate 54953 BLAKE2B 4b91470d3c85b9260c734dc6be8c985f78491b599d2a6ec0d1e824b82f684cd030be6f64179f7aa7c1d1fbc7cf0c5a1bc5bd045123b73461f490d7c2b9011f9a SHA512 a08d23cdac9e162d0e6ae72bd792201ff4e13d7ade6b498cc597149b3df2062b06814804c0750d941d8b5be5d2ab4cfebbe2d08a98d875d2092bf25e6e71a51d
-DIST futures-channel-0.3.29.crate 32432 BLAKE2B fa89fb7bb14e5d23e19636de6116fcad23668e320a4c75409ef232f83d473e3c6db89a44b640cae969a0a7210df6ad6e5f7886e284481e0c2a816ef01e0c3d93 SHA512 f04574f9e88b5d56570ae0aeab082c6c1e4382e1594d83646c1899416e7403bdd7537282bdb20146b5df4fe24b550dcf35c497af04c2210575413d6c8018dff0
+DIST futures-0.3.34.crate 61966 BLAKE2B 6ed5d8cb22f8649a21a56def716e4dff740507373c79a7f43f8144fa5d1c4924e78adefc8fd3d360fa46a542eb0c1eb076539d32468caadb3b89c8f31b35a5f0 SHA512 e63851965939e666a825663c9a86bdae5f914e81f8675b2e1a2275e049e5ec5efd52710f13032ecf2c31dd044d5aeeb46b1e4e03e4e1d5e6faa75067df1f1624
DIST futures-channel-0.3.31.crate 31971 BLAKE2B 2a59ebb73f998ec307bef01e997bf2922556d6dea10e2e6e8da9e1b4cd05a8bcfeef01bc1cc57d79c39bbd98b8a0d26871dca5c7641a9d4e9c2bacbb3feb4eeb SHA512 87e49e661cb12c1e03a07d3c94ca9bf5954344a51fa11639a118f5a49877c883387343af54639ad80e7196062a77fa7c9b9aff9804fb1e6ea3d0eb09efc53c69
-DIST futures-core-0.3.29.crate 14808 BLAKE2B f1ebfc7c1c7a8a212ed7e6c5c72d973f7dafe8b4635c8d42070d6842bd4920fd39775195571dec2f6395c5002d8ac02af889581fdbf878a45e0eb27dc6c5f0b9 SHA512 ae10dc9c1473e4625bee4db902ab3833bb047bd159a40e4fc4cfdc3a266d1ab99e85aa3db4f8dd867e08926d8dc733760b3258884ab890db1fd69f1520715592
+DIST futures-channel-0.3.34.crate 33165 BLAKE2B a28cb51ce81e45d2fce112afd9711f410ca6679549b069cf42ef1db8b8e00e5b36d2cead4dea40276034ebbb7804367aeec8d24c720534ba07c9e435765d1bab SHA512 9fb24f58565bdf345f3efe1f61764da9e5df44f7949ce53c1de5e4d6d82d272e04e01b6bb3358c947d312a5a808287a18befda357adea2899337e939c26d9a19
DIST futures-core-0.3.31.crate 14318 BLAKE2B 613d16e4f18547e45ed0dd56a7b908306393e479c379ff64f358844eacb1f8d37008ffbbfe6b1a4ed184e501ee9214db149d9cca31651b7d353ab4a99c8f5ee1 SHA512 d2f4c2476c4f480f724a880ee16566fcdd545579d3cacd2f16745812eed9ac4a7a88d59d4a38b163ef466c6f6b612b9cb06308a09d52256506a8a90e358db935
-DIST futures-executor-0.3.29.crate 17745 BLAKE2B 4bc4ee76b767285ea121f6edd3d5230f5de12724b9bd9f80341249b1feda6ff845ca6e847639906565c17f7dedb8bd726c0e531071fbadeae91e4a1a7d42c8a4 SHA512 df3220201247d4ae085a970c34e4c3dc7f546f4ff38fa817e4eef55743127a5ca6bcdfc35dd7f5f47c5e2dff32120483e14dee466080db04e93244fb5a5024ae
+DIST futures-core-0.3.34.crate 14692 BLAKE2B bcec84e12b7979d5e10c8fec533d7eb8a49ba299461d4268ce77925f647bea4722312e59d001f5d5e779b376728f06d89ea5adb531cb672ab3ccdf897ebc0087 SHA512 05ac009da05e0d4cc41866a1ef95f7a3da03d037ac62dddc0df59c24cd3fb2d164982c95062f810982c3ed39e7130560ab58ea815db4235bb69c8809ba8e5566
DIST futures-executor-0.3.31.crate 17965 BLAKE2B e111467391cc99d1b6a1f5fd3aafdb86922a2d2d9e360112402d68489577527aa35f4f65e6c0dc8f48372927e6d7a6a4a97c7b9525c369cb14e34ca2dafbe64c SHA512 337e70bd3a3bd3075b51e2afe8f157902ebe486696587cc2706b6a5770478ee2ee4216aa9e155e9821ed1d02ba437cdd3abd0c05aa960378ea192e2ed39af564
-DIST futures-io-0.3.29.crate 8908 BLAKE2B 909bd5dadadbf726dba3943dcec930c7409e20d8d324a52444f4145f5972e30ee4b1e48b7c2d9982fbea62ed5f3288e68e8920e99cf83d7cb81b9de1e8d81246 SHA512 869862f8728d94f0f0e71f9b24d0bd26b8bcafe70a80dd1dde4cefce73d91dc0cca80fb22e891f66024a77dcf28e8858e815bd436eb17d4c3119a7e68fefbaec
DIST futures-io-0.3.31.crate 9047 BLAKE2B 667e62b50be304b68b8437d93b734a0e2433d88a3b410010ed0b04eb2bbfbc9984454c3f0a591f720c9983582c6421d7f870f0733c31337c4c518112f52aea54 SHA512 16d21388f7ca083d2c618ec140cb2c0807ca621b8c338698c367d862b99133ec9edda828f051f3f666472c929e7bf7a5cb334fcf167109c7c392c5cc60b54fdf
-DIST futures-macro-0.3.29.crate 11278 BLAKE2B 025cca67a95da0399592b0b2cbb5e47ef3685cfe21c074b4fb807f13dc4644fbd9984b92e6a240deabd7de9074cae6cf3a0b64b37045974ed9d223dfeb24a726 SHA512 0134430d604bffc5066ad826cd14656fba24a9e412f65b4053412103bf3df7934474a0eb63e773b3de0cca8b57b6dd196229f57fb665241b583c961b79129560
+DIST futures-io-0.3.34.crate 9189 BLAKE2B 41958b790d4cae75969e561726437428132c39df0de904a359f362416af927240ce85505b1abd3c94f097a8a9bc4696efd5c8d992ad4e0e1bdcec9a5a4469802 SHA512 d7dd8c610359a6edc11768d1183f38832047f3cb74eea3ee99a196fe3b58e170932b2526f906faea0af73c3e3c4d5379b1269bab20466bad435c99f7e5c076fa
DIST futures-macro-0.3.31.crate 11341 BLAKE2B d91ace97b854cbfeba1df90468fabf6313721ef72bb408ca6bee1c110b0162fe91da18d371b628513644f9d3956540d93c3e13bc9917550338f797967acc3967 SHA512 26c45dd8c037831ce3c41a326ddfd581784c2e7aa2805ca4d93b91e439f4d8c078293cd328bcd66d0283cbd5a14724bc624ec607c343d15193b00bd644b86166
-DIST futures-sink-0.3.29.crate 7853 BLAKE2B 2c5dc852006b364be92e59a9adcc200bc0966cb2ded763e4d5bc3658071a8417d8c5c74ea2f2a96ab9a111602ed94b8cb72356d851178ca634583f172cb77041 SHA512 20f6a790dd83ed4db54911160254cb33c7a7fd93298df7b3dfc6f1da50c6402bdb17ccb5fc03bc9ad315c277e3dcfe4b3648fde5ace09d90f84d11febd6a0d9e
DIST futures-sink-0.3.31.crate 7958 BLAKE2B 7d42180cfe19ae42e2ff486d83ed46f3aaa4b333256d4c30c5a2ce0e0d0b05ae93516b029e6d07105b4296bf23ba29e6fcce19f0e38ecf59b53c6ec9cfe2e188 SHA512 79a57dbee5cfe98f2c003bd463d252648743f70d13e2054af072978b758c7cb8e5fb652fd2f36c760df358ad23d2893cef24ca6ae3df44def28f1d39bcf348a9
-DIST futures-task-0.3.29.crate 11853 BLAKE2B 050df023d7942207ea11cbe5e1cb5316a255763948b0c07d479828a3245ca34b82a71d1854ddbb13e01e853bd4ce424b319b2182346c36122d0246649390961e SHA512 6f8da7141899cceaa498c857a81c69330c093cf518e101dc53ee1e37123fae918536fcb1dde038e06c08f05c5f378a50970265a35229fb31c2377146cf94be39
+DIST futures-sink-0.3.34.crate 8107 BLAKE2B 3993bc6a59b76c6c280f5569229852402b7c68cc7acc6452004acc4b66ec680bb36ce43a49ecceca9127f068f71b514e7bf2b37fb8d3604c42747960c78dd3cd SHA512 cd1579b386bafeb1f3f698ec9003b101f636dddd67e458c5162b58f0041de877447d69ec3594cc7d8cbd795ccaf96c4bc4a8a10e41a88309d6dd99d7f0b86be6
DIST futures-task-0.3.31.crate 11217 BLAKE2B 8c0e0aa0aa14bfc28e668af00a3fcc2532950ca865a9f3935717a4a3770cb60477cd8f4cd080675379315b649fbdc5fee9dce49502f0f24f44db481a24c884bf SHA512 4872fd2f24b07c626efc6fd76c01b44d56efecb9697f972d0877307b38d3ccb06277ff029df38981470ba1f8ac5f93086123ab3af44d3c49bd9c10b6c9158a81
-DIST futures-util-0.3.29.crate 160207 BLAKE2B 2f545d3387d5ca21c13bc157eb219ef767b7b0c9957329f3ccf247e6402295f5384e01121a1e1ed062223568f6d7db13602b38878a280f19d26c26cf184508d7 SHA512 48fae22d9b5f38aa85b423ade3022dc693775aad5c3e6988d35e4d529b9395c0f35ceeb394492e0f3ec96719cc3f3fe4ed3811df045b840b63231921e42fd65a
+DIST futures-task-0.3.34.crate 11376 BLAKE2B 6365acd677c141312a1211b95726d3834307797ddaed85df01892f0493bc2e28585a07aea7ed742f28592cc0b1906235b65bdf826276020f6731e2705b68e3e3 SHA512 84d31a3391ad47f4c5306f37e09ab32975967253c65af251f8a45daf9363e6dd95437b7ab0ff68160d34adebf2d09f49449d184d627b8f6548ef02c9155c7db3
DIST futures-util-0.3.31.crate 162124 BLAKE2B 69ca647a261fe24f90a4221d8629169a8dc7eff9dd1c4e07cc700a52a8609ce9b8aa3974b9b09e1ee64d0121d7bcb3efeee6fc15983347aaa0b0b23b068afc34 SHA512 429b1de584546b931b17d475aacbdb0c14824a57d960c44e615aa808e8c0f9c126473e313a7150b3de87ea91b7eebebb1041509f61b3493fee8a9cd2c75c4df3
+DIST futures-util-0.3.34.crate 169782 BLAKE2B b71f64120f7cb304ddf8d6899ac3da21654ad0ef30803979b3c3583e5cb4f6484edbb411a5cb0c8fef33ec595aceee490dfc98ae0d8211faf90b1b57ceac7d91 SHA512 c5e6213da3767bd645cf27d91e5f8ae14040079e11ed30fc9332b404f058491687dbcf0a8fbfb3511ed463139db7879785bed0129e99de1fde6ee10c21aeb2aa
DIST generic-array-0.14.7.crate 15950 BLAKE2B e74c785e3127095625951da192a018281ea9976aaeb11019f9088c3f27748c5fed1ef25d577150864486dc48b5138d6892e42f99979339f711a66fc70756c82b SHA512 363a7b04e4102f9ca63d429721c1ada6272be6bf0a2e97da681faf76381f73f0e3acb86623b9ce2dae441de9fda704088391779b9769ec02b3c8c9f9f35f897d
DIST gethostname-0.4.3.crate 9336 BLAKE2B 12be5fdca0b6e3788cf3d67a4a80f283d240611b4fd37b6d1c37eb2503e4a7025b17bbb70adf421ac840d8f952434bdedf4691f31362780a267e21e8c4d3a006 SHA512 8c5dc404132f2ecf9bf82d8b89cbd698b4cb6d43141c47a60b95401da2e8c314347ab0a0ad5fba50cf98f01a621faa68293cb78f48977d3ddfe6e6f21926abf7
-DIST getrandom-0.2.11.crate 35391 BLAKE2B cc3af20769f8effebcd6fe4f48bb762211f78cfad016b796ce4b6b83a25d0a758ecee4352af18ef97e84c17fb4efb0c7bf113b53d2dd30eaa32067fed97978fa SHA512 2230c219e1080b4b13f207bdfd54b1acff37d9e5fec5263ec9952df9c0279939b231c722b54524deab85002caf1047a471f3fba8090428d918e99d53edf82345
+DIST gethostname-1.1.0.crate 9865 BLAKE2B 40c9385364ebda2a61217fab5b213b6f6208916ef80f38385f6873ff55b390ed8a8b0be8810fe2c2aaaef978053cb55d2593edf15269615d42db2a95383df152 SHA512 6b877cb492777bd6646422586ca49fd691e37cc58b79891b976aac1079bc757367ceba81bd2a67ad1606294458851f6b37f25b1827eb29c57f4f687dc3852ba0
DIST getrandom-0.2.15.crate 37163 BLAKE2B 7d534e799a4711d01c6553b8c9422dbf01e384a850fb0f7cd76e444628f2b96d28d0f5e8dae042f8081a2bf9340f57c558be50a6f22ed5fa6b0301a15898fb35 SHA512 04789a53d3f4a84862e1e8b2113641af67e471b468de1222470d5e6cef0015232463a2cf3c3518dc2a533b3983b175a7c8922da00665bcf71c1e4e279b67e6fb
DIST getrandom-0.3.1.crate 42449 BLAKE2B dd70e0abfd27a7c363ce1b91746ef7568edf1d176d5575201623b6403f3a503b5d8503d10ba01d055f9de61cd8092729d34ac8f0f4f9fc6ad79b9fce926720d1 SHA512 431682efdc2ba82114e173925b99e1059d4915ebec6b0432d4a7683e56ccff7b4b45b9ee9cf5d0ee53067d5ae1ba733524c18577379c8414c385189718fbbcfe
-DIST gimli-0.28.0.crate 269277 BLAKE2B 4d651d9f71b826d06b3089cb09933f30d785801b8072228c9a5c9ed2011172c679e86205dd507cb1866634238b20721773e60410bd25fbcc5c3421c72ba565be SHA512 a5a861c7398ec655635a39c3a421ca5c9effb03f4980a000c342b81b9bf229481639a8a62c4396508a9800ec9d313317036a8e4e7da3add5adeca596f1c09d51
DIST gimli-0.31.1.crate 279515 BLAKE2B c8924ce351af5b8f96ef757a189f7a9be14533c024d496c62037cd4eda790b3f6282cd3013ba82ecc83082acab1b60ea80b83e0fd5f8eeb381fd7f9df88ce0ee SHA512 b9c8c11547dc7420fe936b9f32a4f5ccf3bb68d1d9f39dedffd40d631360f6e032e719d858668826f1099b8a262e8096aa7ae1f6d7d3d7aaf47934d832715949
-DIST git-version-0.3.8.crate 2839 BLAKE2B 2f6c2c00315493d1c62af37dc5ba09c90a0ea0937ed347f8f6ffe4c4a47dd299e0adb5984dc512a8971ce493431e4ed6ce6b9637e833a5b55aed6958780f05ef SHA512 62b6cc372df0124e5c889440f2d94703f9ef0ee4dfd0b63be0b159eb1794bf257bb58f76daa1b055928431313d535b84686bd1ffedf398cc54402e2b5b7a84ae
DIST git-version-0.3.9.crate 3087 BLAKE2B c7a7c1b0d47eae8aad9770b61f487c6410e5b27a94edadcfea8213cbe6640c73a14ed2a6c90f36d9bb833e364a996fb836b1eabe3ada44f7cd64766efa908421 SHA512 1d44b4f15338b5a415683e5d8d695a192749eff0c63fd79b2cf5d4ca4142b296bc9154c02cfa381dd7062db0a9c652d06a24a027a447a453107e19bcb8047396
-DIST git-version-macro-0.3.8.crate 4686 BLAKE2B b89b85ea228f2ac25852295fadc6f7b507ec1f34b911041219287015ab44212fc36d518fab219c8c43ac2067f0efa363deb7c0b4e41f6b0343f59803ac162639 SHA512 694926da33313332860dfc107a8cd134f639fc2252876910bc79de5288db85ff621470e78beb2cf95ddd583c2c8525d744cf53e23763249a3a4747497909e68c
DIST git-version-macro-0.3.9.crate 5622 BLAKE2B 8362e1c187a97bc9fa3e18f1f01d45b791a9a85d04818d375c06feb9ed01fd265cdd51fd60251e8c66c5cf878cc14be101002dc2a79e7e3489a7112bc86a6d6f SHA512 e0b1d8ef1bf2c9b5c981a4c0f6a6610a04d1552ad5eca493357f392dfdb5ebc651f1846d5ba1d847208956f5e364972851de83ddd440a855df5f8b4891ba2f5d
-DIST hashbrown-0.14.2.crate 140080 BLAKE2B 4a9fc89d77940d116d781ac6ca2a07a8ba3146fed54bd5d304d5ccb7722d27c053bbd83ec5ef897f1a25db50f838b73421677fd92be5d534a91909a7ad390d3b SHA512 a611359ccc8d859a72e812b94123ff162f5653caa1839c5f5e3269ed18b5fe2b2c7b15b4f03ae8076a622d08090a90e747d8cbcdfce9cf7f317592f1a3695351
DIST hashbrown-0.15.2.crate 138478 BLAKE2B 453888ce68b10cd6e93d787986603fceb29b83fe2dc417e7e57316b9e0060d0bba51ec7fb71d46a038662c99f60deac8237a8f349297208d1d223bcc13f0d0ea SHA512 d6fc0613623f9313533dfcab1240e97f652f78f05baa21419f7edb2eff030c4a2c5f426d3eaae747923cffdd8aa9cc2648340e5fc229395b5eacc6fae087c8cd
-DIST hermit-abi-0.3.3.crate 14253 BLAKE2B 9ed8b40a1cc894addcba2a45562d74359ba55156e2c3a547afce139324b1345df2f158f58978ccd7d343fac5e5d2cda86e2e0a9dafc77af36d4cd8aa0a6d4c03 SHA512 eb162d085e8e0db72571aca925fdb6094d1e5d091766dd62d6a116957459bfadc8d51f1acc67f4da3cf6a8802c0ff445f3ad2516c1df8fcdca0b751632e150a1
-DIST indexmap-2.1.0.crate 68224 BLAKE2B 9d833570cbb63ecae138ca234b998bd0e5b11b1a7e3d5ef4a21212bb32d0998395f1fc609f66860bdbab198081687630f583f5a2e495fac1afa40ff48bee8a0f SHA512 9d303eef918b9264b9fe326cc1d71f4095f7ed5639ed8696efa3e9be65dff2c50ada4495409e109e7718997db51ae1fd865cf8e88978107d7823faba14380600
DIST indexmap-2.7.1.crate 88644 BLAKE2B eab47b5a8322ea4ea038884e70a67dbfa40293eb71c125d0ccf117af9153c19268c5fd9efd7f0be4a773a04bef961bac90ab3269ad42b565e5ce6db5a6d49daf SHA512 225703f74a734da1ad464895192f07c83068b36129f69a9e87608134f250d3a19b95fdb21dcda6c44cb0204bc4ad69bfbba24d94c83b439000ab4b9ffec74abe
-DIST inventory-0.3.13.crate 13963 BLAKE2B 402e6b03e28aedb33d23f50b9717afe273f65dbeb60ec92c332fe8922a36efb57460738b20c1d4174fb35e1a192ef200cc991982d7c4df9654cf9d5eb4096a92 SHA512 e49e1346c7b1bf34b40a0d24ad45c818ab2a1da677a8a6eb0a569876b32b77d3b75c37fc85fc89fc3209d208a3928662836261b3fe1f2c4a978de7203070d915
DIST inventory-0.3.19.crate 16388 BLAKE2B 529c87a2dba242e4eca548127ec3dc8f92f586ae9c7af4df97d4ad563fea8d509c41cb2eb21f6b181285b22c7d1c63f5fae41f59099d5f4d52307c9c97391a49 SHA512 c2ab382cf3b990e192e16929f65fef19784dd0fbb9c233817ccb6b6619f41e1b3fb5c5908a368abf2f8f920688d1d5995e3b10a42c2cd338c102b714d34fb3fd
+DIST inventory-0.3.24.crate 16226 BLAKE2B 827bde710ffeb5350b78a2dd734babb9de98826e08d8fb35c21740712f0bcd85483385a64cae64fc5234b0b81426df553d117e50d6abf275e2294afc30b3fe80 SHA512 fed692b12e07cb5163d0fc36cd724baa2249999204f5afb758c1d62d8a4a188a8ccbcf1dd949173c694d6efcfb7b644aa88588f92cec5eedba1016a84aa6382f
DIST is_terminal_polyfill-1.70.1.crate 7492 BLAKE2B fa663f858ab8e5fd56202d731b572bfdd4ab0e8262100424e27360a9ffd2820182bc57d6718a305ef82d04c3798111841c0d9f9dcfe219765c0f63edb560dc1e SHA512 4730fa09401cb4e69c92b38b2b43afd74699c61f5bd7b37605efbc0c08ca7a1318d43e4a844e46e0f84f83f42432f01e33771be2b18eb5977702ab9f894837e1
-DIST itertools-0.10.5.crate 115354 BLAKE2B f24734bdfedf1dba48554e39b43669efcd4a43656eeb2c511096060daeaf049e1ad3eab232e757057750ce94aabad9fc8a0cf29a997edc6c4b167301c3443391 SHA512 d03c3cfba9841776913bbb6daad0c8945830c155f32ae4b48872e0f937c75a443f0ac9a0355f43b359ff75232f38b15f4f6d446b4be30b00b4209cf66ef770c3
DIST itertools-0.14.0.crate 152715 BLAKE2B 3c075b735a6ae4b66980b1f7ca0ccf4237286b140268ea179e4ac01b1349105da227f03ea9ea721d3e762c3cf8b736cc48b6902148eae73addd864b9c79aa219 SHA512 bb168e21281ef3e43f9c93a079fc1938d79b6db2366fe17e26a90f7ce6fa55df73e54a06334cdb2a7b208b0a64473b5af9de76827a9ecb49378a5f9073d2e645
DIST itoa-1.0.14.crate 11210 BLAKE2B b2d33dc384757963eab3ae7d80bb672d828a549967986e3af8c70fe71a0ad46c4a278da2db4dfccef99e804e6cd4934067e97c0697a33ac3302cafbc46eeb416 SHA512 ea2d38df373652ddacccd11e610dfdad4e3ae7f0d476514e6ac58092733c817bd834e8cd88c3bc4178dd5a646ba628ae626195e0aa407e8534ae3c2a7b049987
-DIST itoa-1.0.9.crate 10492 BLAKE2B 0d5acef9ae72d3f4b5a387d231952e6025def69da81d38269b4882bc534be7acadc073e526fd8bebdca898a98b2c741735c541e0b6a35ed0f8f8799b906b65b1 SHA512 95f7906edb7d6a2690389167f8c4d01bc37827205bca87d527f2eb33722419ed2f2e8afaa559cc5a0a7e7fac76515c9c44c71c42b536aa34b0e2858c40946b6d
-DIST kstring-2.0.0.crate 22063 BLAKE2B 71e58489a167d57326ce974c8e05dd4d2e18f7fa142249aea86594b56b83d566e14fdd79b7202a20ca9dc9e0911f7f873454925fed642d51241e6fc920775831 SHA512 17cf8f86f0a1df9de75ded552c4bfb9f7f0567802c83c0a8fa71625aa33cc537b498c3a247716a7b91b01c609a3722233d6316322210aa44850fd564ca16f624
+DIST itoa-1.0.18.crate 15935 BLAKE2B 8e41446056ccd94979f6f5a8fe8c48d6c47abaab99a41715cca31816f859b56e0cbacb998f300b62be8b719a6470f8a087f1439b72f2f6662d1cdd3d552ede5b SHA512 8dbad156e2863c28e2b380901a92414ef00e39f1fcdb06d91a0f3fb73108c2f7f36b699ccd93287808c24c29cca7f1783d48d5ca95f2173502963c0abcb2d09c
DIST kstring-2.0.2.crate 23044 BLAKE2B d61488bb67b0fbca7f655415b6147dfe003d6df9f746a836c4a29797af2627b2480fa0d4832a8121a04eb23d8623dbe37621a000661a45afc92013e04ac76dec SHA512 b0af4555a20ec30ea4ed03c2bed77b403446ec2dc5eac8064a9629b10f6e961f428d6be65ca1c107a19bee942930fbc08522647401106167feb4856eeb03bdea
-DIST lazy_static-1.4.0.crate 10443 BLAKE2B 25b2e61bbac48f0dcbc79c81d7bf01f2403d8269ecb6be3ea6147bd00f7a588df15a91f44dfc18ada19b21faa71de4637c7d493a8628cbecd0e547d74e616a23 SHA512 e124c0521ec7c950f3c4a066821918da7a9c6e711115d98009ae7c351928fdddead852e7596fea5937a9c30e4e4ce8eee7099b20248b5d6e3b2494b6a6d88cb8
DIST lazy_static-1.5.0.crate 14025 BLAKE2B df29e0e3d1c061815bdd608b41074436024dc407d454f32517705ab04b2fe06075e310086c5e4961df0b4885e91021589d0bca2c1cbe6f0aeffa3ff1b3fd4637 SHA512 6d2f9887cd7f34f019644e42f02f2bf0111accd73aeaa60973ba0b039b6774670debece1ea9a6978e923208ef5d3ab7326473ee3560c078817f0f7ab8ed0f65f
-DIST lefthk-core-0.2.0.crate 21133 BLAKE2B ee1f6213df0469022699916e76d59139028d0df8637e14db10c14645d3f573cdaac4e3a417f5fa0c51f78c3f6b98c542ba3399906461b4ced28a169cd76f4c3a SHA512 589a3660f422ae0ec70a2917212531c6d802c9f003b84ef92c01b369dbf719906c31d176c2f65b6388359cea54173fe8473a667d1d45774203519cdd39f2f307
DIST lefthk-core-0.2.2.crate 21302 BLAKE2B 1ca62891a23264be9f39e34691a844de43caefa715efc5d5519649b4deaa6e5f37a7bfe4525f61adbed448e0377e5c91f5e4e1da215086a12e15936e7a624aba SHA512 c0410c99a3faaf38484c5df568f922e7f8afc87d7c22630b5bf4acd8537f201a6a8fda275d3ed865bc894a8e39a7c863e172aec8010e61610cd8c2c32ccaa9de
-DIST leftwm-0.5.1.tar.gz 9981655 BLAKE2B be359144f4c082ad1abca6b09719da9bb1209f02029c769feb4949cf73cadea99b9d0602fd36083027b1ba5346158628948c2259fe6dfcc7149c5502ff22ec34 SHA512 86ee6934d1d5fc4152aaf264d7fcfe847d087fdf78adb1572acbbcb5611097173e96f964c26ad40666a22d3415c691c4d23b9f0e4fb3fbab94e6411c2707e409
+DIST lefthk-core-0.3.2.crate 25569 BLAKE2B a837bafeae9f490bc581543a20e2cf699a32cf54423333ec7d7d820f1ea52f054892436b8d0a3cbea7302ee2338a0362e0362e3547b82d5be00f2ad0b3e7a337 SHA512 408da2e1baaabb7c9a2d454e41337379b62fc3221df68b0ace9f1d4e43263e1f882a9cfb6913ec0dca838c24d1ba8da0423268cf304075433e7fcfa326104c34
DIST leftwm-0.5.4.tar.gz 10010751 BLAKE2B ba4b3f54f1728c3618e0cadabd07fe1b79d5947c0c07a7a257409b3bef240273c9fdcd1359c6ce87e4e571838de0e7c1ffa1cc3fd87bca5eae8b696eb9829e7a SHA512 ee06d1cd14fdaa841ff627f7e56327f8e2e6f01069970876e7a529a869ff198b3524ed2d171ebb9894252b7c40d6b3abee94245e951279c8d79084443b8c9e2c
-DIST leftwm-layouts-0.8.4.crate 20365 BLAKE2B d71fec8f9f6d0a13d4d5e70895b96af73b4d1a5364a9ddbb651d64569a2b1c8d97fc54affabac1ff5a384d4c18eb3d652d2e93aca4c25c728d7701904012bc86 SHA512 8dfd3e6542a1243d2a11cb8d4d5f53689e65ec6c479b57c819d0039cdccae399d76963d80edb3b2e606af53cb00d07624a63e32abe543f81daf31d5b4a2d41c2
+DIST leftwm-0.5.5.tar.gz 10015800 BLAKE2B 2dcae86e15c71283cc4f862ea696851439e7c4ea2a51a7e33ed96bd6718083351f222a5aa55be5ee0bf714d35426996d105f595f13e5d66f29191bc50bafad25 SHA512 9d0ed371fb87f4460ef6c9b3c74ad16b311158c584c588105a1de38832e35cf4628f12f2f45bc7692b81f59dd5ebacbf3416e5e840266264355ae940d0932b72
DIST leftwm-layouts-0.9.1.crate 22269 BLAKE2B aa3e6360f61fbbc53c296e8b5bcddbfa32d7649039dd22ba0a0e12090de2fe90e1f4b022b2fcd2894c8494b8c19fe8f5763eda10b8cb2dbd255c6f41e353f6aa SHA512 b2289f7e2a27b5fa8af5792805601db7685820c261ae8f6e747a86012bdd84a5d79222b90808c1885a81dd06d3619264c40c787185730e0733e1e2a0a1cc7a3c
-DIST libc-0.2.150.crate 719359 BLAKE2B d08e17fb29992c76337bb5862cbc1cdaf7b9d7749cd65021f145fcf49fa7954d6251c8c2f3c9a796b46283c3bc014bccfd259ea52824459841911ad847fd7f5a SHA512 7ae8fe6a1db38ac6d951c0b4880d25a02f064f5e61d6057c20f7208dec8395d58efd085e41857bcf5f4da2b014d2952dc4ddaf18ac4acd3a23675bb659e70385
DIST libc-0.2.169.crate 757901 BLAKE2B 1012cf93d8975aa20fc3f2332e253426ff66be6aed63ace5292cc8568ee419b0f1a4b5b39ddbb78d9c2dfd8d72eb0d068c98faa229ab55556da5e674429f0e97 SHA512 c4566330a7967efc211edf31a23647d1a33aa51fc25aa4e9337716748c8fd4be0ae63679220ff2cf6e892f37d03bc5264c55e8f082eb82574a6ec1fa8e5e45ce
-DIST libredox-0.0.1.crate 4212 BLAKE2B fecbb90e2842a69f3967bb2a09b0181dce1720b60c5d762a334a279b52c00a9b4b52de72c6484603981c0c3e1cd8e173ef5e15fa290ce8b8888739204956be92 SHA512 31a9234201f5128f1519e108f7424d1740a67699828265cc725304a70f6a51e139f1d0c0e626b487857a7b421f25ad93e81b95b65cf0d3e0ad912388deecfb41
+DIST libc-0.2.189.crate 851502 BLAKE2B 05155a249c6880ca96a19bbb7569d4ca7530f544504e4ccb48db1ebca0b70d84e99c6b9532adb9dfbb3d4d1187eca22698a6b2ba6ae40bebf5d6eafdae86c71d SHA512 0cf621171ed4e6bbfeb71fb582ebf037d62ab481bc406ca2fb766bd4a8416f220a189325a0d3cb3e3cb39d80e09312516ca6335fad71b329c5fccddabedf4110
+DIST libredox-0.1.24.crate 10567 BLAKE2B ac6f5e8ba0ff416f03c36569bc0d1532d6693cc6df617aaff886650b29b3683cd2edbf6cd57e356cdd6a724a5a0fa4382835f8ab694554d39fc68f00b24df6fb SHA512 cb2ae367b2b3706fee529898f294cd8cb50a0008796f499f88d8f81baf6fdb0bb1661b6dce564c0be5597afef3183ecc37295f70c47c2ce1e1237813e5da763c
DIST libredox-0.1.3.crate 6068 BLAKE2B cf09f261d3a945d290ecaaa724903e0042d66eca46dde8a40c261ccb1e82c0d6b9926898eadafc6313fdb9f19cde56377b8a9179935482559c4b9707e327511a SHA512 c62142fdca92388664eef83fc89b8607e2df318cbadff6edf9e3d927837853d5cfeb54445299a82054a0ca81853b0a33536966ab26f1f2e0fa43b39aaaf67c49
-DIST linux-raw-sys-0.4.11.crate 1413981 BLAKE2B 45172cc348e758bf87831b47d2d52ea43e781a738a59654dffc04cd5f1726efdd8d1e2376cdc247019b64d82d756f4739815422c353f54f081a2c539df02b5f4 SHA512 befe18ab06e5248ee89f0cb8fbc192a5564c15c9873672fea62754322d3c197563d9133b839d5222e6baa522ec1fafc48176ee605ec7954c5d93e52dfb6d9772
+DIST linux-raw-sys-0.12.1.crate 3006116 BLAKE2B e23efa27e6052034d41b2149f90d1ee7d6b905808605296ebed66f5fff210c4c18c51ee9c363bd0b93c8e17bc3b70857b594aaf51d44492051291c0e008f8cef SHA512 5cfe8f7e88a2125dda56a3f7a7213fb41cbdb51ddf4f7e44deec21f5b7aa05530e04f67d1b89b9d99d9fb204f27167d8c0e104e6ee6e62a780bcaa679155bb54
DIST linux-raw-sys-0.4.15.crate 2150898 BLAKE2B d1936eb74377d9bfddccef3830b56eb716c38ea3cb7e13b73325dfd00f9fc0df74bae49e4214dd7f27c257403b8b12cd1ef332d53336279d13f7e9497caf4135 SHA512 b5c39181fb6b901abddd8b2e7b449142e2e5691cddadb8e6b74ddc3b53076b1d410522cfa45af68dd18befd24ff12313c2494cf2cb0cf142e2228bfe42014309
DIST liquid-0.26.11.crate 24579 BLAKE2B 09fefdddce5827d43c46c9843f0a5dfe85fa85baba14a15ac5de4758f47490b172bd67d9638bf9a9fc16cadc021d79d43bdaf0232bc60d2b7a8fd7817547fdb4 SHA512 df8ac24bcf599af0b4bdaf279a758784220a7215558833b53d3f239f8a9593e1f079397d4f1fc90e08afba5f8c4850dd1606d7fca8f92b3b421c67fe463ed0ed
-DIST liquid-0.26.4.crate 14508 BLAKE2B 9102be6451f99a1e824d42f4f891a03f7c1b622a363c353aeb31312501bb1b21908ed5b8ad9741a72fcc56e7ac2856aac3e9af07b339c57a83171a98430ea9bc SHA512 0b616b7e5ed8a69c47bb8dc8fcb6323c640a5d826b533c838e49b493b067a323a1f7ed0faa06cb0a7d1828d48ba4469fc5ebc44682d2ec86a7848f7204b594fa
DIST liquid-core-0.26.11.crate 71914 BLAKE2B 9ba4cdefc018a6fb776d79b2938cc56af6f3afd4c4d797a2af50e73176b30abd0d2517cf5fb21443d7002e3200049f873c23fda69c4019fb17beff3d04a1ebd5 SHA512 dc1cc36d7118b54b90606b2399f501840b0d7e6b017bc98fad8847a7146b3a4f1b286113c0337ce6803a8c6e4216266dc9677bfd4fdc537c75657484fd452ee9
-DIST liquid-core-0.26.4.crate 66730 BLAKE2B 2195640f7fd66ce5ad60c49085d36d12a0b6f6af275efb245506742d6c7b1b9c8a56ea596e6947fac0926ecfd016f1de7132dafc58d1e4b23a106f100eb7c334 SHA512 b09dab1d5abf8c8f02bca382af51d4d58e2df0cbc93df09b9df784b0e55a2abbc50d01a761e92b56b9c2585e92092286aaa6917c80139fbc607f2ac453d9b404
DIST liquid-derive-0.26.10.crate 20861 BLAKE2B 851fe12ca7c492267321dde6afba6e284a5a880857286d8f8fee0b96e3c2cb8b91428d1097b9502899bfcabc15becfd7b03f86278ee61aa6a5c830c22d9dc69e SHA512 c657cd16790112cff561db3e51352a5a817887bfc58b1969d93d869be4f50b03b883540393bd412a8004014d88437498f2c8babd3e492d73543e6de1bfbb7c7a
-DIST liquid-derive-0.26.4.crate 19316 BLAKE2B 46fbdf2e8cdff0e750468f0bce2b756337293d45b957a7db068ba529b748b9018d576933c3d25d42690743400120955b8a38fe9ce4df51b1c8cf082872cae7da SHA512 ed783d87a42ef61bf498e6ed98c768444e464397ac7b1dec965594fd324c35c12ff4d2c471af2f1f7584f238dd9409352b56e43240b7b99b08d856102b856496
DIST liquid-lib-0.26.11.crate 45381 BLAKE2B 1f64b86530ddd37fc42261b8a86b4c391c6a6a5aadce05066bd6012812e160e8bdda6a4491d6aeb58b6e80fd91206bbefdbd33ef92cde33aa10bdfdd2973ddf1 SHA512 246c9d32c7f24434d1c24bbf5dfd026c3fd637049a4ac9a2bff47dd2b308f01c13e3adec023aa34d7cec1072bc08f4286d3e58a904b0694e99ec047bd792ce2d
-DIST liquid-lib-0.26.4.crate 40101 BLAKE2B 2c4451e576be92adbf78a8d9215e4493ac4f7dcfd2e54bb0c3f03157b7d30282892ba8dbd4eb51e2b0c092e79f8d967fd3f679839bc8fcea289f7e8ea2ed0e57 SHA512 f25ba38b93a95d2584844cec9415e9f1a163993afff4ed8445612bd9359ad8e4d94fc9def0a78130a527575e8b1c58c0a7f4a2a3745bb3df41ca8383193fd9b1
-DIST log-0.4.20.crate 38307 BLAKE2B cb9c9a401b49bd68c18d5e42f2ed94446f1aeb184caa23cefacad4ce54a2a357143af54a5595c45d6f3c3d20b054c451d9e6ccdc09c19cca99ffffdaf8bbfc72 SHA512 8661b0c71d3b7fc0d679aa3d7f06910e6d3da1c53862aa06526000e1bcaa0b0b068415a1a9ab317c318f00d15346dba8a4f5d2a60d8850790bed9cfaaf757b3e
DIST log-0.4.25.crate 44876 BLAKE2B ab9433934d16edca42b38f559c3c87f949c4540fc422e6d65c75aedd5055c7a4935ac0f735e7ef5c901a7443e70d60be77079a104dc61a3955b0c900162b3967 SHA512 b420404c82aeb04219e9f63505d60b8853cad44d1de0bec0750715baae21afae806bd4f741bb8964dd39bb5d1e0f5be41bc38d76773bdfd5e920d30533146231
+DIST log-0.4.34.crate 53395 BLAKE2B c79adc36efcefc23b0d4419364e4f6e31850afe766081283b97b9b8fe1c99159b275aaea6a06ad4b57bb0ea0f440b72e88aeac8425d316009ade570b8e027baa SHA512 6f51dc492f808262a67b28a1a80055aee15eb9437d0b0e21e0478cb94db358f751a61172f0c303d94fa949a1874e3f25bd7bc29d9724e3d43849a9f3f4b55d6e
DIST matchers-0.1.0.crate 6948 BLAKE2B ec3a5d01d2fedbb4dbf5bb185afbb9401410463a61f51674e0df6a571db352b2bbabfb99cdbdcfb4e511ae783165bf0258f5163f240a229b9087f9edbd0df41a SHA512 84214c1a84952d85631aa1ab5115df7cda223ac64e2acf055b6129ba1aa26ddc87615a8b51ca890ce3fee0419053fa7fe1599ae128f1d211b58c07b0c4af3b19
-DIST memchr-2.6.4.crate 94439 BLAKE2B d1136f7105a33565214fdeecdc5a95e74d7fc7cf45997f81bf3cf389f3015fa561ab326433ddcff2db0b7259246eb6d26fc7b4e3c90c3af8b9b7ed7e8ec56ba0 SHA512 1065a67e04ec9210c70e430288e0a8d39f36ce6414722099553e99112ea2f8f710eae44bf39f8775b9850e6c8a50e634a1b1b084a8eb4f6b2eae6697dcf5b5f4
+DIST matchers-0.2.0.crate 7075 BLAKE2B 0aa33946aa11908019ef4b189e54d3d1e8e4887175211d494301393defd85f8e877fa11b82bc09bf5e71188f1d3c3643e0982aab2afa452bee9232b41f4d942b SHA512 d75be87dd3954b62e67b34021fbc318204eebd192f0f9b5f3de29e477550e2e2198697e7b22b9588279a98a49690cb4d885e5eca49600d70efce8adaeae46d53
DIST memchr-2.7.4.crate 96670 BLAKE2B da38114beca670467c3e1fbf4e415af6f22d52e3223715d52e181babb89b872b46511563985bcc16d7ff4e82f812c6e83ad904b0fe2501b14445119dfa8240e6 SHA512 8d0e8b9c30208897d4b1b920f1bdcccd0c2b75d92a06abe4a1b2407938768abb6487d63de56c6a80419798fe69517210643dfaf11f5f5540185f0eccf220adb2
-DIST miniz_oxide-0.7.1.crate 55194 BLAKE2B 56afbe0c0b3eca98105ae2d507493f365353cce29a6b04910ff26bc75899400fdbd067756cbda7b3d86f047fb8f3d737de00043a4a7348a813cc43e45824e33f SHA512 5eb6ffe34a866403273ff0267ff7838aeb50722ca57a03d5a1d842a5f19a3b4af570b133a3b9d64d78eafe49e4b9732b92dd63fd9c6b0ce59b3295daf10f6a3c
+DIST memchr-2.8.3.crate 99165 BLAKE2B 46e5fb49dbc9db3ab2f9a3f77d9e45f1a7dfc99f7bf0350a83e9a56599cbbc4fa6e4738407e177304d595b03727c9cc86969bbfe4e7b8ff5efda44a6c8861bc6 SHA512 2965717bb9e0451c8fcb3d81f509898918491a7b72a894bec5a0d48619cf24db4378e28c6f71f22dbb0f47f1e96662cd86adb0cf1ffad81a7efc2a973fbcd62f
DIST miniz_oxide-0.8.3.crate 61827 BLAKE2B ae8626de8711a8b7c2bce52d2e226a3e973ba6919ed33904883ae6287f848fcf40642afdb9ad71bba19db181fe9ea354c85cd81c1dad889588d5df8fcc99b9f2 SHA512 b79cd67a477851b18ed87c887bfd9f40f97059eb3fedbdc3a52eac66b5fcea42cae833eea39fd62becdb057b337f91d27f2087a407d02770feeaea934c0b1e1c
-DIST mio-0.8.9.crate 102227 BLAKE2B d21e886817c57adf6ff255c26c82f6a7eda3a036a78b75f676710307e9fe338756c87a290a9dc42dd536e4c9bec680589424d6d199db7e2bc2498b5634abd30a SHA512 a078b1db6140d77452c24647aa91ec6563d00bc3516fb44c34b79797fdc953493cf844f1ab84d226582e9d61c383f4a743fd93853d71e362fb9dfc8dc6529808
DIST mio-1.0.3.crate 103703 BLAKE2B 0d2360e4ef45f37104208a31e9aa467d6db041dfeb97403a010a36e1e1427f51d97f8408948c75c0084e6c118f058267bfe87d36e7911cb37366f2b1ac6eb693 SHA512 2142edc7e9378fc3437110c85ba2cee9c9683e87034cd44275d2c389645979db53fbbc29fec304f1d8c8f0464ae17d2a5db1aa9215d696fa0282f5069700b1e2
-DIST nix-0.27.1.crate 286494 BLAKE2B 63fbe347360ad4b7a86f30bf2f1b27ff1ec581145a90c34160f4d143e9c297a34a2ee72e9de3a48bd3418657fbc9bafd09b704ec15a42b16b3a4187d5304ce77 SHA512 7b35a0f87427eb1b5e1480d7daedafea4609b7f3a4fcf48ca99bdbc2f150865996539f2c51c7ae6a6a13169614681fc838efb306994b020d44b45735a7380010
+DIST mio-1.2.3.crate 110455 BLAKE2B 6b9352bba5f7b8ac5e2e3434ba8283f26f8ce45471b544616b125d21f9fb4c5e88778d5b9f5642d47fba9840b006ef3ef0cf53cf347c6cad599ee77055022045 SHA512 5b5bcff74dc9b1d7ad2d322d5237be4bc323ad915fb20a1a6e4814c809888d6e0c37d3e89d5586fff1dde628b9780e03c04748eefb29f6091df6bdc2f60adfc5
DIST nix-0.29.0.crate 318248 BLAKE2B 3a13a88375a359cf77b28d7f77f47f178bd31ef74b7627b6701bc6fc601024706be4e9ac1a076c7cba26b64d3bac4de17aab45fe3c045aa7a36e2d9232e872ca SHA512 86c05084aa0e6238f8d48df0f5ce6e6d7661b589f4f3fbdad43387c59c0d6afafea4badf25d31db1611615de19a0b9ef18ce614846b79a47cad4e2c9367dbe7f
+DIST nix-0.31.3.crate 347476 BLAKE2B 36668bf2510dec6047003f9aadad9144b95718685865fb5a0907d75fbea3b4fda69879352e8c371f4ba9887266f2790a51fde504f018001de7050cee19004e39 SHA512 199e8f56355ab115c86a3e166c9cf53b4656a39b4643de69b34658ea74a6d91a94c08bd4d8a06a0e4dceb4cd014ea8df326c12d20b9bdae06030910cdd583643
DIST nu-ansi-term-0.46.0.crate 24311 BLAKE2B d2e678e0eab5ad48534e686b1a4af344996d1b07a0fa40839072df3061bd7e5bc9341363403ea3ef8d19c7725ba3b7a8ed540c63e2209123b1b93f69418288b6 SHA512 b4f37786dc85e0596e2b7b261a5a9fe0265bf1651c39efb358dd649b926b12c3093f307b98bf0c4df3899f0a7cb1854f2596bd5c3e22fbbef42f912ab2eb5043
DIST num-conv-0.1.0.crate 7444 BLAKE2B 4f5c4695006aa3ae77aaf5c55999a07d8ddfab294584fe10d73eb6abbb3f551846646156581599f966a28c74d80d3ac4373c49d2099991f7ed9edb56d36feec4 SHA512 7884c0c6599c66e40b9a79435e1bbcec60aa7e68b59686922dfab19ccbcac6a6e54f208cfb3d5a8a12e86e4dd67e09977d60b69ef6940e308a28256733f36100
-DIST num-traits-0.2.17.crate 50190 BLAKE2B a549ef00c749dc7f276c4817477d1f9dab70cba01b6a3afa5743f16f16353bc50d992d7446a54859cf750a410d66c8cd3440708a6b91fd89d3b8889f8fff1668 SHA512 4d47d3e2f5a31019e038e609897cb0cef1ba061b35cee7e2a02e65179dcdd4960bd5b9bc759b5c013d699b3fbd9b014940a15e36658f7d4fd12cb0c7841c5b4e
-DIST num_cpus-1.16.0.crate 15713 BLAKE2B 11b432fc7c7496d48918f09ed0954e0f1d0845596301266321293b374392898853fb7c313a0b0fd9d22d9dbfe3ccc5cc1e38f38407c89b2e5906eb76caa6ad68 SHA512 a75863afc4a563e63c64d06471c7921615355d98011ea9497b1f1a7dac2bdfc876509136018e8062ac38575ccf476a196d1fd9231e09e90017333bbf2df4615d
-DIST num_threads-0.1.6.crate 7334 BLAKE2B 416efdf395b0299b6b01e1508823afdda08cf67ca54e1d644fc5accbb0490945a492a34bc5ba70c3e838e6405d17ddce164ef87468bd9da27097de8994ad9577 SHA512 b2d9897e29e59353379b6372a629fc7f9afc89f777b4410eaeac7b4729527948a8dbecb175f056899f9076693ef855cc0d40e725cc54f28af588fbac5f7ce3b6
+DIST num-conv-0.2.2.crate 7441 BLAKE2B 6aba203f7f766894f4994ab581de4a58c43596254effa252aaedd3f819c651ca1502fca67ab86465eae78e2a0408c5b46c8f6aa4042cf7680c84c16d11fda779 SHA512 fff59f26558acb931a2e767b13c31df04078b6e46629c95480df710e7900094c09c5d69672cb50b1444a628c99cecdfdbfab78d728d02bdb803326bda25deaba
DIST num_threads-0.1.7.crate 7455 BLAKE2B 282514d1c6ebe67ab2c30f91efd5b6c8880baa078265e22d5d7200eca4f96702aad8b537ba772e5d4e680a6e90fa6919fecfcf37a060668b2a618bb01bbabf2a SHA512 60eecfe49c1afca8efa320c5f4d0cd794f6adf8924193682c903307f484ca0a1ddb56102a772232aca040f29651bbe26ddc1c4939e1f030e229d179837e06bda
-DIST object-0.32.1.crate 275463 BLAKE2B df88d37427c2741931ab0ef24a482755168c7348ccc280f8264e94e5f8548c608799868e0bc5984632ee02aa84313fc5e222b7cd7ebc6829729ea49544f13416 SHA512 5bfd3b8960fd80bb48691fdef35d7a9fc3d752a1cf5f29cb4e146a17d427e878d972d208e8aefe5015b3c62d065ed9a66f2f9f790b4743d1a4a3f9c0b8e581e3
DIST object-0.36.7.crate 329938 BLAKE2B 0b02cf2f44e99002909b38125edada1a259feae59fd0e5ef52001755b6878cac710c87c60fbafdbe405281e039f68572ea3d8093d16128899090fd70df7f2fa8 SHA512 dd69172349ecf51fd2351d32cc4453760ca1d15e854a1cf5ed99112032901a54b4645b24163b946deed11f81d3e3035e1a5afd8bff20f335dbd05eceab073478
-DIST once_cell-1.18.0.crate 32969 BLAKE2B a08d5beee50a7add28bd9e50b18709e7b34574f0f55f80909d5efb7ac5917e5f30bdcf3fb43ddd0a4f420a427390c7ffe1cc1c7191a3a1d939bc6e3139e6eef7 SHA512 9328968afdf3535b2d9e0113d75afa725259d76994ef2e1948ad7efa4ec8a65bac7cfdc31b749d5cd55ad4e28d2e28ac57b871e3067b89182453c7e2413a13b8
DIST once_cell-1.20.2.crate 33394 BLAKE2B 79dd394fcf1637adfef28b4159ec653c8b71d2bda0e0e36a940c04e3d87698f039dc30c97f26648ecf0d9742962f1f0a117568f7c705a8a3fc167085b0ca3e80 SHA512 bc6005bdab7a154c01e2203fb553a68695727475a9a882cf906d49c054ce886ad92cb491d380b6b9fe71a81b2fd690ce91c9a6cf8dfa8508470ac9acfc8a31c8
+DIST once_cell-1.21.4.crate 35010 BLAKE2B 9117ed1d478e626b7b7be2e3ff8b68a382b051112c7ca4425367bdae86977671f8b5c576131c82fb437740b6d98b72501f718f4172d39781decac2385e8fbd4d SHA512 af67669b0107f44268ba74c355200cb2ed1aab235a6989a8bc54323eb2c9a45677010f8672e7790edadd4c981e939436e0c3a099d33c06dce9c14fd5ede86155
DIST option-ext-0.2.0.crate 7345 BLAKE2B cbfc03e7c960fe3023512a4ad816d657b4f54f8ecbde9f9c4df4c5fee3b36b68ab463c67ad650778279e01c7ffaa63a0dacbd0c080c8c3d15b1611de0e71f92d SHA512 f8539f97b01af97e0b80fc96556002251befa60f8ddd19613311e62f9dc9834d71c22f5d8e7c53c4925046e38cdcf834c3c28042a4da862d6f6a21ddff8d8e56
+DIST os_str_bytes-6.6.1.crate 27643 BLAKE2B 8440a196a3d3d9c3a584562b6c2a1033f5606998e8851f8ccaeababe58022a42e65510e12ebdbcc7b24d0fcdcf111d68bf00d89b8665ad5cee49180db853789d SHA512 977c0fe9891c021914153d6a081c3789018fcd1830224f5c6768d0c75ac8ac4919638bb0a41949710fd5e699b162d9290a5379cc6251535a127e212f5b86932d
DIST overload-0.1.1.crate 24439 BLAKE2B acb2dfa6c6c22ea95cf58079f6ec56a2bb5e297a055ce717d40633b789b0d005be2bfd6616448cac61bd032e74aa6eed212f1677461907cea2f7f7cf536c157f SHA512 f79bc3321f45df5e3d0e5fa9c4e60524e4e28dd3729a09956766738adcf99ca42c187a01d48701ebe23d39aee00a19d4a07da798edc781b942e866b339613532
-DIST percent-encoding-2.3.0.crate 10196 BLAKE2B 155bb1aaf0db4d22179bbe24b2d312f3d507876436e8ce76dfb59775282c1136a6c2bf5672f4b6bc274e4535acc9e50497c3e20b77aa2490512755c9cc9e6c41 SHA512 54ba129b0f3b43627707be994a281cdb69d5a7bdbc91dfeaa0226cf2834adeff7d2597dca5d11dd48b5731e831acf1284497b251abfebc0618761f98fe3c01cd
DIST percent-encoding-2.3.1.crate 10235 BLAKE2B cf8e2fd7b359a05b7bdaf731f9ae84c7fe6f468a53482eb2db7f93dfdaab64ac812b3664899db260055a93449462e6d219c695942fc5b030517b197b4df9b95f SHA512 5951ea8315e52cf3acfbaa023cb9e13a136b114c54a7da0bd44619ae24cd2159d4a96469d7572a2fdabd94e19513a033387117d7ca81d0eb409fb383e4acda44
+DIST percent-encoding-2.3.2.crate 11583 BLAKE2B 58925243b23a6a1decc3d92c4ce17d06af5206844ad283b49e69e523ac0db2c36c3f4407af4104ab92c029c2581c228bdf416a054a2531191a9e912448ba4408 SHA512 495b4aac88a7a46420811671d6bd82817e4eb2fe51d5068d11c5b50d0d927895d54c855cb07d4f4ad5a2d42b22f9419ad0183c14781dbfa240804fd49761035a
DIST pest-2.7.15.crate 127895 BLAKE2B 6a0161a85c35e533f1c4992b842d6d1e8b83a0f39365280f6e156dacaf5a313c8a4dd24c241788200282fe0df8ab3372dbffe648b6326b3917dabff7b0ce7945 SHA512 a044c8e92bf63dca6522da1aecf714329278def96b037ebb38dd485d6063bb7b15ecf762fdfdecd2026136c42b6edd89702f624cde14b437161c372d6c3d87c3
-DIST pest-2.7.5.crate 117583 BLAKE2B 7ef658f2b970510a01c7059998080f25a410263bc2c117f7d4f8cb63ef45b48d8d15105dcddfe3fc05fbbc270c9cb64b9444935ff0ec8dbf028e1c8fc2e898b4 SHA512 2a195557fcad3b9a983e54bf31e6097b0506741d268b6fe2b76b018bcd5a91f15b26821ba1193ef2e75a99bbe130acb6e7a0bc66f9e3196587326c1a532f7532
+DIST pest-2.9.1.crate 135580 BLAKE2B f432fbfc5f86cf29379603584903c7846969931649b5f74a1048a87c89e37cab97b97e16a30d6fae5fe34c9b76e920fba2f6f76c193fa927ca3aed7c76c633ff SHA512 4edd5e7237e6db4dc2be5d2ff250f065c3bd71a1504cefbe0d380f9efffaccc243e49afd2a618cf1c122082de99444aea12e7bf66ac593884410a01199a39445
DIST pest_derive-2.7.15.crate 40745 BLAKE2B 6d1b81bc50a6a70e88cf5ef2f40adecbfd65702dacb7c8ae64f3d77bcb6c632f4cb17b0facd72e3bc60a12d758461acbbdc6d81b110faf8df6c764904bce970b SHA512 22cd53c1c9062db988dcf8645a6320f96219777fe35f9d8fe05f69df445d58a39157c029a93d5fc26781c5c44961afffb9bd959b3d4ecba2d4e17b23cc422250
-DIST pest_derive-2.7.5.crate 35415 BLAKE2B db328495a73e734de86c4e73110d0639d8ae19ef9c01ffcc93887b0744a58f4fcbdac905ae8f9b58b69a33e65699a27a491da8cec85a4769f0ac5389fd2d2fa0 SHA512 21fa27c5839484f8c47ac32d48fa6d3332273950aff9dd0e8b1cd6ee3e556be7dfc8ce8639a0266ccb1ca641c90ae7f6cf7d2c3e78b9ff82ab1262efecdb8db0
+DIST pest_derive-2.9.1.crate 20092 BLAKE2B 8caf5569cd7b1deb21609bb8b066ad7f1b2fc831a50fcabeb34f6cf1c4d3cb398178a8b96dc77b2dacc287655ef8ffe31260d30a0304d01ba006b3ca0b21b4f7 SHA512 2566c3a7ba8d07d3756ae4e6be958ef81a2879bec9611d4561bb6c86b1682e7d0f510e8d2934435da11b94abdc51308aecf4c3201255bd8dab73b46dad1565ce
DIST pest_generator-2.7.15.crate 18417 BLAKE2B 258d73a82601722a791801b2b0b8c676b9c793cf5e3f74bb39fc7cbbf3b2be247b839eef01ac4aebe98363a865bc19235c9b13cb06b3d1f383bf7b7a15c64b96 SHA512 98e0101900cb4fd0e22af2a214f380269de10b590078a7a9f03154ead159912abfec664e1f89c57aae38ca8b54a163da4302d2954713711bb133a9c2ced32f48
-DIST pest_generator-2.7.5.crate 17709 BLAKE2B e9b5d3423ce26f45b2e306b50adb7532cb082b644cd9ee8dfb20e9107513569379573515188d5246cf5589b89f9a5a306f9988c1f379e4533cce2e0b6e0fff26 SHA512 df9780762737b6bb106b6fa7bc7431caca26e5e054a2313ae7a65eb47ad3365b3d6d9081bd52246207c1919e86db050e6f46632ca608fc678cfb9c729416006a
+DIST pest_generator-2.9.1.crate 19425 BLAKE2B e48d71547c18f9f5bb9df016601de921041a77475b818a9aac38ddbc7ffe98f4b04a1c561b5b4398fba97f011c57ee1ef869d9f71a896dd569e790ef58f0d0d4 SHA512 8c22d11357f199afac5610a7501a1306d546523c2ee7f979932084824e1888e3d0f7e32c80ee6fa73d001e7ca04b5f9cf84a32f6217c2eb3e963fd60da1564ba
DIST pest_meta-2.7.15.crate 42121 BLAKE2B 7211276778d6f6017cf9273a5c181740808fb67782b59993158641a67a670d496d59f5702486d07fbdfb15eda225dff9ba7fa35c2235eba8e60d7111aee39b5b SHA512 dac3e599b280f2ad9d3d6c1362ca18e27929f15047ed9195a3cea1e1ecc03bab98355cb39de1c793764affe41b24f0efcb6660ad0c81f7a6c5201f402e4c6a64
-DIST pest_meta-2.7.5.crate 40969 BLAKE2B 79ea6680db97531d5ce65a36c33dc66c20b1edb3c1c320c8b717721314d4ddaed339fd911ee5a743499374ed6b274f47e578abafd471adb751542993e147b43d SHA512 91d1d46d2ab4f77a2674d76a35de51c3df9f1be9e7653e187ae0cd42e565d1976b440ec55f5e3935641a59cddb7eceb06009d42db9fe8385b875bd07de1d21f4
-DIST pin-project-lite-0.2.13.crate 29141 BLAKE2B c434a336716c9cdd16ebc297fed393e9106ef167a693c4aa0b12c681e03141b8ba3cdf64c310916cb7d5cc43cbbfcaaeb39bb5fb1e8b3efb9e94a3f72af914eb SHA512 7f12595d751d315de6c0d380e2f501b74154661eb676987d2cab6fdc956091a68c9cac658df45dbff73615e982e6ae2ea138c09ebb708cd6c351f0d18dbbdbee
+DIST pest_meta-2.9.1.crate 47453 BLAKE2B 653e2743d9554683de2b4a3ff28e9d9c56696b4d22f19a8b4c1098c6ff5401988ed06c587e2f39b69947b5a80f3ea63cae6c6a2ed369d4a98959df489d41b4a9 SHA512 7facce7c9d3964fce5914c1a158e98104a2541938e484f6363cf9689201b4cc79498436f8a5a4220cd68a0428687056d419fd72f66c8f8aeccafed0139a09336
DIST pin-project-lite-0.2.16.crate 30504 BLAKE2B efd0b426fcc6ea8852bce499fac61f9755a11c6a2999cbec514f093ba7b3f94b1f2d437ee9abb243e31f3838ac1c74491a212851d7798eb249e209b35e015332 SHA512 971adfe54cfed304647fd944c1c915e78b37eaf0de3a582fb984a5e91f1b7d4db2cf0f53a9a64b64427062d4b41c0a36baddef782411a76ae3be0f8ca45f0718
+DIST pin-project-lite-0.2.17.crate 31034 BLAKE2B 1d3bb970100c2a27c456bf771b4884f3c91c048310d27608161d3a02adf2f9cdddbc8674257c6b58c4ad6c0953e11cddf2fdf5813d95e5ab8425e71032556159 SHA512 0cff4338e3c7b71600fb41db013efe0d01b9cb3fdf95192dc16c5bea58a0f157207ef285ceb01b6b30956f9e751577c5d2a3803103f89a8a0cc6ea728d97a4df
DIST pin-utils-0.1.0.crate 7580 BLAKE2B 457e1287202f16d1873b24bf4f1de1828300128c4ba3131758e64f9784d36d47365f22d85493c3a85d854f0d8dbb4c6cef3a0f5b064014dc03943e58b7ba9178 SHA512 828422b8440cc82ac6b0743e0112fa7540d437aed457564999092b1462cd7672cd6b1f0201b67075431aeedd3d9c5127468a3dd028744109944f7f023c82fd70
-DIST pkg-config-0.3.27.crate 18838 BLAKE2B 1295eb4f08751b3663cb2c7c2753f29bf2ccd80f4e5856909fe10b6f006c37fb9672c9518b9b416546469faa18821512673a66543c0bd1e848bddabc456d0a90 SHA512 41e9b8d4fce6b8244c2ac8566318a001b481bd42a182f1a832c81ce93c6a023e18af03aa3500b134c30195219d35080433bdba69b2594e9665081debfbb4533a
DIST pkg-config-0.3.31.crate 20880 BLAKE2B ab7676e810751f89639b60ae70bdebe1d57edc76319f83077c3680049a701a26e72e8cc485fe77cdc4346fe3571d32c59e7384c8c86fef17e00d7d81df5daf43 SHA512 ac3e8062ee8831a4e4fc717b5247dc7f113da7bf6d64ec95cbca7875959a2afa1497bf81d9dfc27206b5fb10027a2509d51dd9ca1c10139d7b4c78128864fdf4
+DIST pkg-config-0.3.34.crate 21370 BLAKE2B ec02a21dcd793ed4e69ba6d8c761a6c4daa8a3f2c5eeeb7077f8babbc14dfd7c0c7eb088eb9f61730fc6eb0d3f1f6271b72077d380d7304e1153feef532f118a SHA512 b8c63db0782b888e4be96a48102ace87f3a1ca496290f958c7835bc8bc8a9f00a8a2ea384bcb21c184b58238a65fdef96304d5598cea6cc55aeaeab085bab49e
DIST powerfmt-0.2.0.crate 15165 BLAKE2B a3e1ce63f5866f75526eeb749bec6607e42cb495bbb953082cde7e98e6aa429ecaa41889d98ff7ed4cf5031258b4f7e0553ff8fc435b3b6f8b4ef2b6d53d9b61 SHA512 0623f92e4d6ab284b3f6dae58220d79d9185df4a738999d68040c50d72fe0380d70358cb622f079c629bab53bb03c6e085e165d5bddfbeea84245864fed90029
-DIST proc-macro2-1.0.69.crate 44271 BLAKE2B 9d1531a0b123e6238363d574bee03ad050454b65710b9800c12597f3a9ae2f9bf50c617da0472b7ac0b549afaca19c546ccd6519e648598500efda9c0db2ef6d SHA512 d197cbe9b6100c3193a01fd7dd6b4e49d440290012ababb5d9f139409f0afe816f213d67a03abeb1f3227228e0a1f2446d1dc0a2775363a15d1237c38b45d6a1
+DIST proc-macro2-1.0.107.crate 59588 BLAKE2B 91df0c573e3e1f09c1aeedcad0381cf18186d72c3d50b077b1d232fbb67d1c87ed09f3c6dc515140041c2dab5ce7706042c8235b93099df7d1c962d4a3a99160 SHA512 c109d5509624a57156e0eae22a3aec89a1a163623e8b4e376a13d872a46e4bf6855ee3cd4428c07cdf5c22f2284b6ce755f9cc7e075480e4587ce4f2d40fa903
DIST proc-macro2-1.0.93.crate 52388 BLAKE2B dae4493215b88f68cc485bc0ae80f0a48ebad68e0260839b1c367832d1ab778197bf040647b3fe36cfe9d5f7a496e05cd71b5914f531eb129c2d458d5f0be896 SHA512 1ae650e390e4f1b18d05f42d2ffcd025cabf72568a326cd85496c722600108b0aa0ab0161b39fcc931b8b302427f678650e703f4db57aa1a60f1751db881dc6c
-DIST quote-1.0.33.crate 28090 BLAKE2B 77c4b166f1200e1ee2ab94a5014acd334c1fe4b7d72851d73768d491c56c6779a0882a304c1f30c88732a6168351f0f786b10516ae537cff993892a749175848 SHA512 c1e76c3c017e8554eebe309f8167fd56fce931981c06798aa85a0cc6d64a9cba6ab103f5a1324e69c6f9ca5dc47a8e31ff2e847850542748697afcd265b5939c
DIST quote-1.0.38.crate 31252 BLAKE2B a3836efbe5c21dec70c684002b47b8fc7cef643c82ee903b537a48bc0707a28106c4b33d98e60ff81e04c7520f7404b1dc4d49446e8d91dded517e476c36e1c2 SHA512 530c47c5e6372b508bf5b2b88a138408a7afa5ef52c47280ed20eccf39f8e97dfc1e0a18c1bd5472efcdc49a7a1e69566333a0a1b4c0b4f0e11e6a7a85bfe8af
-DIST redox_syscall-0.4.1.crate 24858 BLAKE2B c3301137a0b84e03b09d28dfa377ab3bea74d574a08cee21d35713b278d8b5b30ca2a1d73a0981baeb4644cbb88c86c8eb15ab3bb2692e38b93e6b35fab4e0da SHA512 073ed9d96090cf46eab9877742277a013c62d8da86d9caf2310b4fa868af306511936553579e01309f27067d344226cc8dc5e3aef01d9b900da2febd33848f8d
-DIST redox_users-0.4.4.crate 15438 BLAKE2B 5f44e9ef20f1a6c8b22239838f8f6a6648dbebd5b4386b3a2c417e39add8c4a0dc32e4369b8bb4e0ea17678140f596b9bc981b1d56f06de6a38a503600420481 SHA512 7c208116d1171b1f52f22aedcf8ad00076a3d1f062f4018f4a9f5fb2c38d7ed83258589062d1559f64e43f3e2a9ddf789799f57cf87a49ad8a37463ea09aa269
+DIST quote-1.0.47.crate 31622 BLAKE2B d912f17bdb5f2db29f5349e976e12da52db9d2197dd9900cb00e907d1e9b06ab177e9b020c1d53f6a6cd087e3a973aed5af63eac282da77792b2a6d6e1b35b07 SHA512 544f4324d425ae011905e0d1b52e367d4660bc34457b2f802af94e1def1e6c4e39ffba3beeb40d75753967d15b6dccce18fea273e7f3d46b63d5c89898d19441
DIST redox_users-0.4.6.crate 15585 BLAKE2B 1d60d0b7781395ff271d79264910d24fb021cd8ef612714265abae25b26ac158d48f542f1e73701bf5b99bd67546a7b878e4a14e40cdbd478b35bcc8b4778f5f SHA512 719d63fec42bad3cbed39deb9242ce1daf3f391bccafa8121f63198120371f112d78b0da8d66458519e946581511004983f04b0a697071f22294ac7c831120c9
-DIST regex-1.10.2.crate 252839 BLAKE2B 4be7bede72d41634c52eea25566fb13337a84a055aae6fb73d3b18ab9168085ed04ffbfd5b6f87c2f85c9922893b9c9a253a8c874eae9185b2100850443b1517 SHA512 e594f70cc540586e4039e7b905ede9e507757b531f22a94aae185e47732ae0d54bceb2c6aceb815819a9652c01ccf697798d372631f2f864c04ca2eec59759d3
+DIST redox_users-0.5.3.crate 17311 BLAKE2B 93f1f116a2edebf743a57b652c7dfdd30404b4cb55d41cd56b62a959c0372c122aae011f692fbe7ff0dff649e557752577e36299616c6a642d1423186c621112 SHA512 85bb7fa22e402252b3e2fbcab9ed3c12a00cd92bc3c0c0868bcd9cd8c4e32e462c10f7aebcfd9f366b9d92c97a2f033929346199990caebf2dd47f4f4f4a3549
DIST regex-1.11.1.crate 254170 BLAKE2B 5cf41012fc2ba8a006c0eb4a922cbbf1614bf300be361c9e2d98956a9a5e9b140e37bea09132fab7bfb633d4439158723624bcf45e8c619c4061b399253c1b82 SHA512 d065f6dc405771518260425f39a5eaaf8cab62e78c91ceed3b3994a9a121674d2484cadaaf816bdad89c87a40550d57b66a3d9de6618a7119a658301ce7e67d8
+DIST regex-1.13.1.crate 157118 BLAKE2B 8dc2137c2c7305a8696d6925a462c0ed7d1068cebbfe5cb3d738e2f7ecd0b3de5e535545510811af65abb381190b9dc58786f0d3645da7cd7e529e4fabb3d65a SHA512 90739303281da8a468255dde08988ccd99b21ee19df5cd3a6e802c2213d9f06b9d5001a045a76230a313aa7c62909d2cc38940512ccf5d8a4193781f05bd73fd
DIST regex-automata-0.1.10.crate 114533 BLAKE2B 0e357229f6825f14339b1d7c40730b83e62bba12115d01ed20313320766e769a653a2fcd2c9d19af51a82c38e9e42c1a31d005e1f44f5b6fbb3ead7c9c74027f SHA512 56d64da361afce82c6cb49e70b99ce1fca3e1969c54bba5f9971db135f8544c65f49feb8827789947b3d1dcefc9c49a7a434a7ffe0d09c5900345a1733723c5f
-DIST regex-automata-0.4.3.crate 617011 BLAKE2B e685724eb037411c1a73d6d355c76e9e32c40f1c9029acaf86477796d3f5ad092b0c5619f4df2fc1ce34243f2ad8af147aa31f83a435e5b5adf55b4c9c8a9359 SHA512 4fc82fe3556f829956c3172447589555ef286fd66ee9a445cbdcdbe57970655e35b6eb0895ba02c344d826609257e0c95d3f7f51858aa260103bed7b08d8c1a8
+DIST regex-automata-0.4.18.crate 628707 BLAKE2B a3a9320801319eb6312fa5c90b727a847cfb520a823a1d5a85f23bc07afa81e9e02693642b1c9345d80ea51946131681f048580e2e7a4b27869dc258706d7042 SHA512 8bab8d044b771079a73197796817d31b6e014c56de0c4c02863469186c2123a6b0309a39cf7080073c154cd3f84e936479ab62f256bd92fea9c7501871db73b3
DIST regex-automata-0.4.9.crate 618525 BLAKE2B ee3fc41c8c445be4c1aa3e5b19a3e61efd641b1a24e7a1ed55f837c1fba9c816272cb4645c13232b66b170bc7c413802928beb22e3891500141ad4ede65b60b0 SHA512 40bde0ec91cc27bc0c3fa237a37ecee5a1f023dbe006a999c5888f8f578ee2c4c64d9edfe1827546cea8e92ca3c10f8b4d494d81f3d0422b40d90bca9cf598d2
DIST regex-syntax-0.6.29.crate 299752 BLAKE2B 2408ebfe5f0dd6578c33f18e8ea9a0a7a84388420c5b67adcaedde477f3f67fb3e39ba9fab1f6892c7ae7fff754c4aca51314601529cabc6a8fc43af38a11f88 SHA512 28a58950d15df1f0ac4ff4185c05b535e8f5bf0b75f79fad24e40e17a02570d1c9bd9cfc919eed8756a1069bc489c5fdccfd04f6b8266c83e3412b7b4bdc262e
-DIST regex-syntax-0.8.2.crate 347228 BLAKE2B 211fd1c35ad0f28874d4b4d276e0fb0a27e5a1608f2f16ba2333641b154624e378419daf8d1c955f21ff5f40f6d49c89569b7e11ea5649850846d0fe447a675c SHA512 301dde555f300298f2594490ccd8b92033e4917fe9b8671b8a97db6c827793c73969be85a92999964dcaf3177edda51abeb576811ad6cab9772964dc0a77e728
+DIST regex-syntax-0.8.11.crate 359055 BLAKE2B 5e1cad4cb361ad8231c3bf1d3956658de9d69d4e44120ef5add19d86fe8e1e07e6445db7bb4f532a2313250907c61bc8d4873b0749b1187c367eeecd8c0edfba SHA512 8bf74e8798d935392212e20c249a8bc4a82e8e440cdd65418a403691b33374d28220bafebbddfbf742a3d7070a1fc0fbf6cfffafc585032de1ff082184b67d12
DIST regex-syntax-0.8.5.crate 357541 BLAKE2B fc6d125f7a8574c37d81c75cbfd447cbcff736f2d9991b19814ffc1a414ebc5b76e84fb8fd36c983b38e8e391d165cdd9047832b0d9100f0e1ba7085484b7db5 SHA512 549d8d130fea9ec0d5806126f57f31d433f50e9328c5532ad417c44bb5488ec0d20acb0983dbe54dabaa0b453cbea4533cf7baac7144df119e8f78dfe55c5ab8
+DIST ron-0.12.2.crate 127767 BLAKE2B 73601284abe1bf1751f1d0a056a9610b9d8f4532f48bc53444b842f847aa56fff3d7b0cf00aba1084983914a4cbfe2412c4154cbd591773afb09e91322910e3f SHA512 24d9c58ace68fcaabe948f8c53872d40c3a5a844bdd20f6557013456c9155b10429f0087b1deb71edc0982ebc1207c0fb6bb4a57d9e3ea532a9f2e396996177e
DIST ron-0.8.1.crate 63251 BLAKE2B 9d9724cff8df112c1590c0e66e897a277a7bf8a180849db4e8834151fb53639d424e19124cc9f3a5c4f977d49c824686c73f337e9ef0f0355acae2b1b43a4d14 SHA512 d0d9eb18632c2458dd3e8fa8ff365a818e5214c88a19c11421c208c31ebd75236bb20fd74ea84942f8e71bfbb02d660f965dd1447318b5372bd16d45d11fb920
-DIST rustc-demangle-0.1.23.crate 28970 BLAKE2B 611d2e41a8a9799db2f8bcb8fc8fefcda361d055a417d2bfaaf2dedcce9d6f388c69d905a28c65e6691b4d408d7922ccdc97ce524c87c3cccb8467e314bc87b9 SHA512 8cd29800254b1305ad50f1fc008838c52d9659f97a51a68e9f2bd6d0a60126f3ebdd1c79760f96445b3bf998d0773526ddf663b174acca81babdc0b423247247
DIST rustc-demangle-0.1.24.crate 29047 BLAKE2B 8248b014eedb26cdc0b748544ba91b9aae9c992a6f93b4d3ac256b78f691d572f8885a3575492ea556698a241d2759743968293079ca02bb6a5f318b0ed66dd4 SHA512 eb897c35300b87766e6105917a907fca1c5b1f7691fc03c6c1aaf38075ac883a73d1eb54a245d13ba59c7b0f0333d6543e23fc1b1c542fbbd5c750a84660b9e8
-DIST rustix-0.38.24.crate 362601 BLAKE2B 0f0f6b756c2165be8e4de422f807c41ca6bcc2e0453e5874619f9899684bc91b527d2fefae7f2bb7d83f9d2d58ab679fbafbb73955a740701388391d0551cf8a SHA512 ffdad60074692e29d20ce9550737f09cc104bb7343ecda12a4955316889082949b7f35fb566d593ee908ff22f007abcbd498fd95bc702aa965ceca922d76d483
DIST rustix-0.38.44.crate 379347 BLAKE2B 780efaa7c9e7fb78782c552345ead692e4dc87a6e68fe9c972097ed4ef9066b54633c565d4f1b4752e08a1ceceef15ed5d8c11286c7cf17d971648ac5f9d399f SHA512 b7e66a27c9188eff307aa9912852706f686864852a97af0696ac5fc5dccdf2e4d22a69266fa74ac71aa123e2831f24b898b7ee9121850d65cfb56e12bd647d8f
+DIST rustix-1.1.5.crate 425681 BLAKE2B 89bb51007ef46a0f9f10af95fb2486b810bb238ca7f876047dea4c43b444785ae5a32b1447212f18f207b53c7b8a61cd213b338342300b8399b300af65ea295a SHA512 ec72cb0c867b7d184c06e45def67b1e333a5d4b6ae3b3cbce620afd844f3765460832ce907786359b75279b8ea6cfbdae350a8dd197d58eaffff71a3b2e2e08d
DIST rustversion-1.0.19.crate 20616 BLAKE2B 025944fe053ef928f26affb890ef6a563b0e63cf6acc0ce7bd4ff104541f819bbda48ebb59fd8a677e44ca1ea21f4a18c209adf2004c9ad79604dfbeca43b5fb SHA512 45b959aea8155ee47c51aa1d87c6c344b5f4b20199a2646ca30bdabe1c2458b014be91fe0c48c29c2261ad9e5de6df7eef7ddead1682e584d4a906c17984baab
-DIST ryu-1.0.15.crate 46906 BLAKE2B 6d6949e43aaa27fba0ec6002fa11ba859af8d867f87c90d88413267186abbf6302b817985bca3d577ab3fab2e319e11756f144473a16330dfd8fc7b604cdc4b3 SHA512 4655b5647f919082a9b84b889539ae7fb23a1201057cf280efe79c58cb5f040864efb7812cda5021bf6d34838a15d173ac8bdb0fb9fa2dba85173d3efa5a826b
+DIST rustversion-1.0.23.crate 21013 BLAKE2B 80c4938e8663b095668809e4c81f4621582c4951b8b42eecbecedf5577e7555bf80944b6753101f5f87bba6f9856781e402ffd952600820b1c5830a181066798 SHA512 95baec2c1d8475661677ea35a724c392ed10b1151a1f4522b44133c6d691824bf4a42327ebc9d631a1f64f944dc721843e0aa0e19354fc4fab89aa048f1c68f5
DIST ryu-1.0.19.crate 48770 BLAKE2B 588ca156238ff7285edc90d62c41991f6ec6b732656ef874c4bd5723350d2db19eeae844fa8998123a26b34a7feba0ad897731d73cb4daa88a24a3587b860dbd SHA512 b80d07d609237e13ce1f8cbef5b16738308c540800c7ec18387aec876fb2204029754f20f1f273a0ea07f54dfbaa4595fd0a90044d09f124c1c99e46f1005a99
-DIST serde-1.0.192.crate 76866 BLAKE2B 4920089921e23bbc9180d413cff34277683db1881d7e65c5fd9dc8bad2beae954d2429c9c2049b3e98bc04314ef059e59562c936d6c767681e75b84aa0a2a468 SHA512 b34cea6034a14a6785b3023d0a1c2cb5b1c2756c28f02ea20ba62a657ba54e9d04096a54c4fdde3ff4094913dba46c99713828de4287186bf9dd3f7d89dda0c3
DIST serde-1.0.217.crate 79019 BLAKE2B a0aacff795d34583365ddd469fa14c58a6cccf8afbb248210aaff3134c7ce6e34b3d03f437326d7c01b3e78f82a5d19c37ed9fa4372970d8b2793f2889288e1c SHA512 f97b3b54b9e99c9a027390405cc054c3072f49c92803a4ed5f5f69e76a179deda9d77993b645b3581437085912d881da88d0451b9e0da423c64033a23fdd8054
-DIST serde_derive-1.0.192.crate 55690 BLAKE2B 1e9706fdf38880989cf907c36d1f72b5b211fc6f263a4ee35d5f7106aea0a792fd79a3361d09f831e06ce0a43680647952a8478bd1001f617d2571be428b5516 SHA512 67ad208291c8d7063adce4bface5d963488c43a326e77a89970f86f65e8f77856e173d134718f64eb80dce67283df1951022c12300dea0b4d9570fb7f637643a
+DIST serde-1.0.229.crate 83669 BLAKE2B 7f54b013f2273865493684c7c8d7d272ffbef903a1242fd81808c69b23444acd96ec0ebc43955cace91107331ac74f5e60c770464ce5b5cca92c383a810f757d SHA512 589b7523ecb57fe2003cbc4eb36adb07f663ce9c8620a7880a63630360c3d36e77388a270878493df0c383c1266ff855aebce424227a1c9da42f0fe4adaeeb30
+DIST serde_core-1.0.229.crate 63100 BLAKE2B 3126a7f8915a142f49a403dfc3b54341f67af7e533d94981e4b13450eb9c8d0befda14c91d4ed05a288a3b71b68430d8d5ec3263db6c146ce697046657b719ad SHA512 23122dd8663f6b4cecc8e6affe8b7a010abdd31428461c033a5db330bb7c2872c8a7e91ce0884923b640bea801a64044fff6ef532b260c05f31cb426b2518e66
DIST serde_derive-1.0.217.crate 57749 BLAKE2B 63b4930122d80d64492ba2718630513012202e42bbaa74510729ee66a0e72b8a1ad123784b479697ba562db43868f4bddfdf5e94bb3d744cd68a547471ba40aa SHA512 31020f4533d04b31ae125580a3c5093fad36438d324e2d9b063923aa8c125c654102ae7fbc3b3df892bb41db6b321962a23e0a37950e080055d715d15b18af76
-DIST serde_json-1.0.108.crate 146476 BLAKE2B 9c0ceae5566a4e0ce7a6264939862f9dd920bb47d18acebb179798b036c376d97a4e9b0717092903ab90cfbf6fb73d37518e3cc25f3217af010296f5644de396 SHA512 7d8d1b74515388d99983ffbc5696cba022305cf4c797d3ff5d2959fc8fc8f4ce01cc4c9e7ccae7097b06b5acf5307027f6b7315df1fd8f58e681cc5968e79fb6
+DIST serde_derive-1.0.229.crate 59864 BLAKE2B 28ab7ec0616bff52dbee3e05724b85db0fd70ae9bbb1b8f5124dfc9c923f12547e467a0b838ef57fdbd526d81c2718b2b8e7e75aa54f8e4ecace491362888968 SHA512 6ff319ba98b7631aede0c985cd47026d4795139beee9d53e5b00ccf0a7f6542e446b094821044fee852c7ff31c3721b964fa9425d15685714ed8f57534070e9d
DIST serde_json-1.0.138.crate 154769 BLAKE2B 42f146a688dda70f3afad1a6ff989823f2e2cf4037c2a4d019b87155c7e37d86f649f2a54b373b787ac9021e42ac3be5fc27ea975b62e08865802afb993196bc SHA512 31678f1289301d65a088b305726c4fa6b5cd17b01527abc8dd7fc09720c98b2e86bebd5b20d7e9e7b7e41c42829db3a7e705172eca20d0c333e6c09131e1fe09
-DIST serde_spanned-0.6.4.crate 7756 BLAKE2B 58b8bfa3b39368f4bec795bf1bf1b0e19554efa9cbf44a8f5deaef79c926c8cafb4eabd6230b56acd77c75b924b8642a141e3f7827a5fea16633edb764b54124 SHA512 10a71df5cf84abd5c658de0321a4813ce582735fa5cc349694d979acd8c8228fcf69b3c65bba803d706089b49b053c15a8b1c4fc4c19a586596b8cc58cc2ce04
+DIST serde_json-1.0.151.crate 156556 BLAKE2B 3d9744a6d247000a03585ac59dbda46e804746a8ee5e912744d06c9a82828d9c3997bfa61876955896df732b219db4628f99aec669eb2f25459f2f37f7d5ede2 SHA512 351407187b98416a57d4d9b380cfdfd28acb10af0b3e9b9eaac3a4810ed4b58bc3572d97dc7cb4a45b0284466787ca82952ca6659fb37fb23afac40da0d4f315
DIST serde_spanned-0.6.8.crate 9330 BLAKE2B 630bb2cabd74e8d9736e315ac57c4d2c5c4f72264aab35ecc8e0040cb4186885722051a9f7b8a9006fd121fe58428cbb151e5cf541e7de30b6528c84e968f7ac SHA512 2343a2fda35ff57ed8ff7d8eeadd651821fce7e22f91c2d5797c6af7db9e009b7d637382f6f390c17911912865a5aea1ce87a86fbe36f4b6aeccb065a4c8942d
DIST sha2-0.10.8.crate 26357 BLAKE2B 1d01b381223a931dc631ad3a1191f5378b1d2f3f9f20474c5f020e366624c73b08330ce8dc4bdd3e63b15f647276f533de655b545b77f70fbedc1a1846f44f0a SHA512 3be73133a6b7690e14acaead47914dc92395dca4191fb657a2ea186fefd0ccd94d12a1121d63a26027d9a9c62b775c53202473edc461587b9dcd75472af77785
DIST sharded-slab-0.1.7.crate 58227 BLAKE2B 9b4c4e4849ed324cf48c2b905f21139d1d65aa5ab13e7fb11817cac9a32ad09f8dbb1e50a93d40cafa0aba872792bc92f7bd2e219f62f80695409e949c07978b SHA512 3be7438d4a75debb14463477f34de6db1ac38abe958ada5d5dae7ae8d5993e245da69fcb989d91aaaffda5f2b085d4bcc88d10e07ec567b7f40a21437de6d4cb
DIST shellexpand-3.1.0.crate 25591 BLAKE2B ba395d9d98fed37979e97609689f909b264ddb44dae56ae4958da9a0e85aa382a00bbca42530cda2701e934233aa1d44509495235ba0512beb33a827cee5c9f0 SHA512 9b20074425db359cf92f29c52be91a3a58a91e6f3116b210913f24dc31b5371ef9d77fe46e7da39e42eac87fa4ccb8ebf9175d7bd5fe6b520d12b9d3b31cc65e
+DIST shellexpand-3.1.2.crate 26161 BLAKE2B e30e88b9fd0b62314664cf5a7ae93a648caf5a3edcfcf680378ced47de791bf04f77fed9b5296a241f6000de436a55d761ade701dbb8afc81ab5752f51ca9a12 SHA512 7af494875d469cbff41b0de99fed01b2ff13b9d9736cad591a93758b70e1a107e24d729d12a415cf63f9ddb4906b3d9f28d52e47eaf09d4a84a6f4b87bde8f6e
DIST signal-hook-0.3.17.crate 50296 BLAKE2B 5469a11485362b4a76f99c06071c69f6cc083bf4cceea93fce0b43385163ac3621b7a3c98d18ea1fb9e1439460ea37f470a29bfde9dea199e60a12b248be5d25 SHA512 045ac6268e504c5561d3884610a48c930dfd936086f793839f42602e92e4a8cef289955776e8eba8a5ca1a91b5f27ccb3724f49b32091f8f06c8bde984d82298
-DIST signal-hook-registry-1.4.1.crate 17987 BLAKE2B f1df8bba55c72a506b9210347f9dcac4d158948e73f6d1e60f43340ddfae368aff1bbb6a109af326af47246d9738d49f76d380c52208efc3c6f79ea0acd31f0b SHA512 e83acec2b0083967555f6c659dfaacc32d851a9485c9f6f4b4cf257742ae3ffba8c14708c75f1a5520e9d132ea9e21d6eb65aba492eec481e8492af8b798c5d1
+DIST signal-hook-0.4.4.crate 46945 BLAKE2B 705935c4716013d41f4ea487070e15d3eae682a635f7ad4b1cc10fd8a70c9437bb5877b83cbca054cf294605d87f311fb0a9b3d1c61052a45be35d76c1a5a7dd SHA512 0af5eb107c39397669c68808d27f58290a5652de43f71036ba8dff2355c20e6704f6fdb81af73f866551b8b5886400d6c49ea6461492e0d0f26b613fe0b272d2
DIST signal-hook-registry-1.4.2.crate 18064 BLAKE2B 7274d4c115678eae2640a709bf9d682ce867c1f6295a0c5f49e492f95dd1c457f20b56207a74221df1fd9d744b24c6260e28f705777e3c7d47b7bdd36f1d57fb SHA512 16362d232b1d301007c069198d7716848aa73d898ef92e050422b36c09001b4334390dc95a6650e5315377fd8960d4336e5ae869b0a305e8525e977b8327c508
+DIST signal-hook-registry-1.4.8.crate 21668 BLAKE2B abaed3ca8f07e1631aecaa4bfcc9dea94f2bcd2ab227c9e44d543663392d5e7c7b3beea4d0624ff48637d4fc7544a722ba3d4113d109a77ec1a3b3c0d06580c5 SHA512 6625d842e5040fb15c3a6a03994aabe8b3d0b752773805866858452fb03e5cab2663c89367caa15a34dc0ee7c2b830e302d9be664130c093bdbc17d7b61f045c
DIST slab-0.4.9.crate 17108 BLAKE2B 8e5288c4d00efa915e7be27b55f2204850968624f0d8101c091a357131106bceeea7a63c98007420c12f67893dd2228b15d3f23508108c3a0ceaa605474bc7a9 SHA512 b6b5423ae026472920f7c9a4abe0962314140a36dc562c0a9e3fa60725b2b8b7a8b343110d9d4c0e18fb318b0103e14c0ccbc9ae350d5563a5ac80c35f228c40
-DIST smallvec-1.11.2.crate 34801 BLAKE2B 58645e99db8f02db64d02c75860c7ea41836c427c03ee3b0b23365e73a406e4fd6ac312bf13fc5faef8bb6111c10fcfd5f839d5b3686e9b34d1626f8469fc327 SHA512 5cfb427c3b99b0dbd71f6154ed899abcde9d7d2992977ac7b2ef3a4c3ff51e4efafd133071a69609b4ed6cb269bdc26b79eb72e1988f10dfcaef8185d950cd1d
DIST smallvec-1.13.2.crate 35216 BLAKE2B 31a268aad595c06cdb078577a97b089dbea156a0df307a3e6aaaf4861bd9a680c5b11921da9dbdb1bcfe17d58c0cbede1ffe6bba3aef59b384fb1b9703c62d27 SHA512 a97c758b668e40ad9eb572e65feeae4954e09200a04ab92e26a13b48894381cd3a3d2571070c4b7a5e181182e1ede9688f990650342ec69ecfe1a264d234c679
-DIST socket2-0.5.5.crate 54863 BLAKE2B 4237b540dfaa96d3f8a8b9178519e5ea37b6b96480a2aed5287f462845231427a18f5add26756c7b03c18d4d4aa617a5a36c5462258ebd8be326e8fed1c48641 SHA512 afa8df546234d4e8f89289622448aa42d8c2ba74a0a3a4b13c0ff7bc30fa435a7d6d6e8c9e2a6933cfa23ebdfb4908c865e82c657611defbc16e1f1bf66f9f8c
DIST socket2-0.5.8.crate 56309 BLAKE2B 309e5a0e46d0b9debbbd6049a138e56b82df4fc0e9d1115745ed935eb40c81b004ad748844f641934e13b5b88773db5cc4a57fc9e61dc82b5322fa0232110864 SHA512 b7d03608a3d4cf3e2d1539b5a375412effcc96279e8f57668fa8cf67b3f0a3a6b611ea5e2e72f282460582954acbb5364320611f7798a11ec9e4833e53830b60
+DIST socket2-0.6.5.crate 60031 BLAKE2B 5e5e380338615d05d0a42901a05a5323e127919560cb6b5c0ca72645219d40f915724912f103ad4fcdd4a7b5653cf8151c9fee1904427775f19d4e617fbe947d SHA512 eb72b2cb7683cfde4ddc4f6efd64f859738ede22120d40b4498e7ec05bf53429f2c13612a33d8e69089122ede3382eb731d816d40beb0619fcf416dce7cb6575
DIST static_assertions-1.1.0.crate 18480 BLAKE2B 358dd5ac413d06f62da0388e2016c5fcb8ec68fd7dceb0dbbcb97665c032b7509b7e083c20701648b6a9174485f117c02682ae4bde7ef037e80a85cdf6a0c86e SHA512 46d0e35f77941dee6f60f574c130472248063dc38494c1c4f84f7c048244cc2a58a86fe17c0990e3f0f01406b75ed385a13d00058612b27cf0e867c8d31c92ee
-DIST strsim-0.10.0.crate 11355 BLAKE2B bcb25ad0a7284e24e4f17ebe0ccb621bdc4118e499b50b094d98aa7e8fcc0b96716c9953c3516ce7ea78309d41d424892ded595259696a5bbffdcb07802b5c2f SHA512 78b318532addfcf5c1ccc1e14539e258aab9d3cd893cc45d82342549bde838c177d90f13c560671f8f32929af47d0b467db35e6876bd7697d8b3f9e055aeeac1
DIST strsim-0.11.1.crate 14266 BLAKE2B 252a9ede4241b165525486aa8855dece37af77f5b28e0e1858c4a5d2047db9fa958328db10989234aad69463ab51b2303785ec056c63ea8c95bf95e111ddabf2 SHA512 0cebe0155a92640e56db9a599ae62078cbb32e1d2da8bfa67ed0e8f410a7558dfcf7b3c2720ff5913282e291ecf076aed9fe9bf84c8d44e814a642b1bed3335c
-DIST syn-2.0.39.crate 244129 BLAKE2B 2cff6626624d03f70f1662af45a8644c28a9f92e2dfe38999bef3ba4a4c1ce825ae598277e9cb7abd5585eebfb17b239effc8d0bbf1c6ac196499f0d288e5e01 SHA512 96cc347cfdb0f9ca0b6c7289279a1cad8fc401625783742292564f7ceca8237ced8d9a3f62069696f6132ed06092dff2baaf4be09ef53b21260d93785b0e27c3
+DIST symlink-0.1.0.crate 11943 BLAKE2B e034b790c2715f95bf56f18361085e3abfd9bfcbb1f3800df0e52d1445afbcc7b8b5f0f4681cc31bb8c5247967f0aa9a2ba12cf193a290edc6ee14e82b76d3ba SHA512 d5e5358678b9fc769cc1669a63163cb8000df4d73876a8a822a03a49ccf7c4171c10e5abf339b067f25d7f2fcf13d8e51dc648b11a76311950009f6fba122a21
+DIST syn-2.0.119.crate 307407 BLAKE2B 0be3bce1250db4818af7246a03352ab50faeca02b81126fd623bd473d7223693f43914e88e07baa0d7fa5473192e390406165f83e00dbff048c1ea373085eced SHA512 4f2493e334b71c2b0c467e19915d385942c10dc4c0142dd989dcfab9809dea552c45ac3da0b0039956a961f7aca2973c0845c6978e9dfe25c03fdc52dfb1dec0
DIST syn-2.0.98.crate 297807 BLAKE2B b17e2bb4f151fba26debb722bda8e8677dcc4f57f0e88bec214f8b06e9b15c48731ca3f63d1453a44f34845c9895b3519008ce6cfb69746486324d7a8e0e0c20 SHA512 792dc70249d55face151b5481b0ebabbd3d290de78cff8b5dad8bee08e5a932ee22e54ca5fc5980e0b218197d19822c3672e02eb92ca74c8ac1328081d4d2cbf
-DIST syslog-tracing-0.2.0.crate 7016 BLAKE2B 85e08b8ae12da06f11e8afd61a5c757f2514270497498436ec6395508ef1dc111ec0edafc66882f472e855d107ce87e3951fc8f652c848a296a39fd95a1185da SHA512 e47dce94edad50a9099ebe8bbd3293d35569f286da116d20c3f3e7576f50d8628f7a0da13c4cda772bf0b9f95dc44e535e76ecaa214ac898ac9031f5be4df1ec
+DIST syn-3.0.6.crate 313821 BLAKE2B 5c33c101bd1ccd35c0f906b924f5ab6400fc173335da7f83299d0a4fb551c4e29f2a3f11def321db1647d46754fe8afe05faf8d4a544ccba3cf8a009d9e8f5ed SHA512 9c0c411c7300471ce6f34f57c482020d2d93f2a191ded0533b4ec28f7b74510488006535f620434375bc9fe151b1589c8c72654a4ffd759ab9d9f0a52faabb7a
DIST syslog-tracing-0.3.1.crate 8133 BLAKE2B acaaa2a701dd12463e728792dc68a05d38a45db4ac8c57d087ba7963505cd5b7a6a3cfbd0867187fa35f86fc43bbd22ac04478aee7f84910c4e077f387899a4d SHA512 94de4a36f5d50e1adbb1f16798d43c51eeffb6649e759c0731dab04f4b357d5d692cef61a53ae5c7074d95f46f4103c91fbbdc08d365c53540d3806109467370
DIST tempfile-3.16.0.crate 38550 BLAKE2B 11702e6bc2ba2c400b52f14e53eb1df71ad523aa1507b4700eb64eb76d5f4688b0f889cf155c2e15ac68a3c68b27e1e202bb26439076e350b407e14b59467a80 SHA512 c9f95326e315178a1fd4b53fcb362b9b0c4cb120cc0700dd6c2862be8ea80c5a592e0f46e6b051144c0b0aab3f322151d5df1cbd6037bbe0067e0a8eed1204a4
-DIST tempfile-3.8.1.crate 32164 BLAKE2B abccff7939df8cd223a5a8ee61e5af7c35335f1cd61b3e72fed9a8565465c293e99938d57b50743141aace3cd20422ad5d3090507ed66561cb0155771fe0a5ec SHA512 b257bfb70793575d59ec4cf4b7492aff83dafb68b367a48594211f476a3b1d4800b69bddc405d8749d8b320c30cbe71be1261a60b4bbc862663b37a6c7d97a3a
-DIST thiserror-1.0.50.crate 19414 BLAKE2B a093f66ad191a8c4b15356f8d29578273b36f9f11b5843195eaa15b70bd4c8eaf6dffb631564386acf35a9ddf856e05055b419af52d4e008f582ae444f3dd5d2 SHA512 65605a9cfbc43447a50980739259a45d933f1eb315926dce909892f7162c79bd04bfcee7b38b5a9fa71b24fbe4416d050ae8e2443932577541513a23ebeeac46
+DIST tempfile-3.27.0.crate 44780 BLAKE2B 898b8b00613c4617271febdd54dd1e5f66aca54c1e4b60067e508c87c15fe32f0ce2d30b3dd630ecf7083b046d579f31064fa72de09067981c920f4aab86f2ba SHA512 bb20b9b0c5d3301ad05f73f1de538ae240366d9aefa25ca823ba40041a8a11b4a7361a6a9ec03871b14230d42038d7af6d0b652c8c471935b481a1628b59314a
DIST thiserror-1.0.69.crate 22198 BLAKE2B fdd8ca8c8ca78702377d0bf7b253440519018275b105db980d63229d0d44aa5c39a703e14aa6fe453c779b3c864d8044009dfef893d2a5294950f067656d7a80 SHA512 ef50d2867d965da1dfb29d26faf6de273b5fadf78f95313f6caf44d68bfc610b9bd4b7544200b05bb0861231cfc84e961007f8db83c7905244c492037fd31899
DIST thiserror-2.0.11.crate 28648 BLAKE2B 973126f9a9ca5f3118e830af11ddde4b26c905e13df89b2888b42facc4e48b3adea53b66405260f6291c3df7ddb85a93856841be3626b005040b3fd15502e2bd SHA512 ba0c3c2615bb9bfb07affa66ffeb2eeda43b16a974dc9a0482165a4a5a502a376e2fd6b569a228a08647de23d291e2c301dedf89d8caa79833b965a184dd5904
-DIST thiserror-impl-1.0.50.crate 15357 BLAKE2B 41309507014a2c628b7e91d250335070e4cca6c6c452c90ee7e6173bed049df83ca197b37c16537cf15415550919c248e0f6c798aead760e7bbcd25eab701d50 SHA512 8555e010f94390e93ba757bce9ef25d066ed542f23b843db431a66fbab722584ea0ce6c9d4b6f4d92cea3d91c190336abd567c4a0aa4a27893db25720c5b89c9
+DIST thiserror-2.0.20.crate 28969 BLAKE2B 08c3d1822d7f570ffd7ca21f8cf4e1f6de2c72ba7e69e136ed8bd8823e8eeb031a577b55471ef8efb8b92c41b6c080819363c6e03630a7ef9fb868548338261c SHA512 c58119059a2a204d96876b865744397b6b8a1835ddde4b4db1870b4dda28de0c583f700663723ba456d8ffa3b3aab423a28c945b8b97d13e66313d094f4a7e46
DIST thiserror-impl-1.0.69.crate 18365 BLAKE2B 51663251ea6ec99c59aec35fe73c5f9760809d6b6b7eaa8ecbc8f6939acdc4d0ebc11f9034d9204dde7bd689d5e8303ae0be86e298745e9ef96825bf73453a08 SHA512 579eb796c8885feb01d27638862823acd96c79440655bb444c3445ac00121852603396ce7439aed617c0a0ac69f62102167fde5845411c906997574a46d6d9e3
DIST thiserror-impl-2.0.11.crate 21067 BLAKE2B 33be76d7ab098eaeeaefb2ea5ef20a73221ac51b491d6339e1fff66e24118854f3640de43241e233c68be17804b90d22d75f1d60f7df274acef4647c871e0e17 SHA512 3fb76f16613064917d2b21f1bab06fd4dec9f40ad1f850aa78c5917854347cf9034a72d2091dc792ac06ce9ff9e29ed2bec3a4330b459abff379356e35c8f701
-DIST thread_local-1.1.7.crate 13585 BLAKE2B f497dbcdfaf7dbc8b4b0dd97f77ba93df15b63303e7894c9032c9822a5b8111e0a21db2fa8cfdce5a503f70959ac9cdf48c840b925bdd850dc15e8436ba72379 SHA512 3772452c2a349fb564d29bb06e13c8ae64807db27c3ee217fa04fd0e9847e94adeea582b82ffc2d9116f31ff478eb088550caf1346c263de49b55fa17b431c31
+DIST thiserror-impl-2.0.20.crate 21436 BLAKE2B 25ca3a4a226c9f85fdf83db1d45b4d82c392859ff64944f58e7453ee1a05afe029316d54dec7f4fc6cb303adcb892e51257628cd4f3906c8bde45c723eb7c44a SHA512 080fd52a0248094a4118fd27fb1155efbebd2d7a478fdd821bbdab85fae2a094fbfdada68425af506fc510acd711401e75b9321bcfbe8af0d75b46c2341d1768
+DIST thread_local-1.1.10.crate 16361 BLAKE2B e6b176cd63e218b2605376324c735274ce895fb25d951603cf5e0666f05c7820c19ef49dcec6350c4937a5cba98661be26a5b35259d6763e62bc179088676ec2 SHA512 b448c7c1379fd2d81a317102580b898370861b64418292af5b4a7c3b3f47affabc92f743bd58913e41a1def165e574ea4451f46aa74e71c5aaedaaaee6a5e367
DIST thread_local-1.1.8.crate 13962 BLAKE2B fce2feddaaebde42bdb83d814929868f06387a4fa25d5becc73ff0b983395aabe076268569c6a89e2d90ce6e68d2ebca7c3e0ba1c9159c61b32631ce39289a9f SHA512 6d7e3941f43c43ac091db5d1cf2a8a3892b54b0634d9200426eadeb82015566532f04b6040085dbdcb10580ac724b6ded8416931d764d795a5f923aced66c492
-DIST time-0.3.36.crate 119805 BLAKE2B d4da96368ab8565373d034edce261e0d8867036f2ba87e84b5e4a506a70ed3b62b93ba10734aecb39847e258cf7008b6ae57f92df8d0e5229cd3fec488d14caf SHA512 83da6e27691d1f0ef37ed276528e927686a06dab4811b6e29d625ef7a0f7c30fbb86896d74a2b087726e7a24a951b0a83aa1f5f22d711ead54f447d36ac47133
DIST time-0.3.37.crate 123257 BLAKE2B 5968d85182e3a945c194c0e405a3c771698472f4b4028a01870e8dedcfc5c10a32e167715c7c12626b46b9ddd758c72e0188b55e45c0396cbaa42a65920ae28e SHA512 6d007507f79c45a7408675b3223bbf83a133bbaf96429ae6a02b5db09acccf884bb8323dc6f3dd05e7ce87a78366a55bafa6c6ba31b04198a31026df4ef425e2
+DIST time-0.3.55.crate 279955 BLAKE2B 7efb15881122078e5d9c905935aab97114e0a0b981716e1d91c327568fe528c77bd8834f111862c57943084ece60d79427d749af6d2c8114b1ac72ea10293f11 SHA512 bdb98700d85e557c9d8af939c4cc7cf1bc9970359a6efa727962f31929569dc153f117c1604693d45d5d5af62a1176301600668f41f339ef0567bef3661a1fdb
DIST time-core-0.1.2.crate 7191 BLAKE2B c477ad3410ff29f3bf4a38fc6ac4a043d49b6d2bdf5cf309ffcd2eec3bb6e4c4b62156ee7f069f0b37ea31c163bc75ccbf35abc1db2833cdd4912135e60ddfc9 SHA512 3861724c23cb806829a01186deb5217ae8252c20af622975264e6670cff528f42155039e4937756a9eb312a5580ffab07949437d5504d684a0e70755046cac52
-DIST time-macros-0.2.18.crate 24361 BLAKE2B 09fa325be0b1a5b922285f035484b0de8e339306b49595c87f6374e46459d6777c6db4b12c1a0c6ea9795ae8c741188fbb81208d0499a651760b9f5089323fc7 SHA512 557786115add272290be8305ab79c44f5b4425b64eb698492fe300f15879d9e013c66933cae8aa8faad9c109e2917e7a0e43c8a5eed7f4b0f0fdad092089efe4
+DIST time-core-0.1.9.crate 10320 BLAKE2B 434739a629f70ae2571d715ce1705d83126d8ec22f84ebac35df4e912225d8236fb87d7f9f17f1146dda1c5eae64f2057d61e85d22372d8432e83e719bb7e964 SHA512 6ddd5d228fbb1303ee0ee8c59aec19f6bf0f8c481daa2567a4fec68ef79273e19b7ae23df8b331d87384e5e3cf0be0cafb5fcdeb1a6bb780c063f5cc8c95f4dd
DIST time-macros-0.2.19.crate 24268 BLAKE2B 18f0601f5307d310010bea20dc7171adc8600c5b2e6303dc9b38ebfbaa7fb59a029dddb627cf5a5b7fd2f7ed66186dbb5321cad0f90f3f85b6edcc901a8c2855 SHA512 c58aa596247a4cab720bef74ff43be44686db2da2978826a1f9b58c640113b5696efc2ae1746bf84042fdbb94bec42c7fc34f7ae6812478f55849a12a90dff5e
-DIST tokio-1.34.0.crate 736847 BLAKE2B de011340be791897f7aff72e80e4516379b666ab143dc58bc47f900b2276eb5ba5dda855534d649bbfa2735ea0581a12432207b7ebc040f5ddf0600779492448 SHA512 8749f5eb1a96bb13ffc6a431aafa618cc116a59be96700298ca52c7b129b48a087641f60e91c051f78dec61eafd9b5f1cb4de041e0a1abaab4509ffb81d02689
+DIST time-macros-0.2.32.crate 33664 BLAKE2B cccbb96eb036ca32ea1079fab5a21b75d21bd347c280e8ce1aaed390eff0610efa842d75a2bf4b4680f860c06c6b83ec31cb6f97bc5833f914470c04234d096d SHA512 873701a3ab753df8334a963d4693667e56b7f46bbd1f0371f9f76c89a6c2851aa640ff573225880c67141e2545e2d50de8d7a3492a9b44b786ee421d9b7cede3
DIST tokio-1.43.0.crate 817422 BLAKE2B 86d7b3c0488ac3a31e76a6846568c2c565d08ddafe265eeb28303bb2d57506afbd10a75490c834ee76d57dc45ccf7329a693fa3aa01fd7033e13495d82f74d9b SHA512 8a2681829afc3ffa6446eaff7463d52aa3351598639ef5d9af0633dc5425e7ff222a7e661f519c3383377cb46b40969ae8c38bedc77a9da92a871ba7d1c18a63
-DIST tokio-macros-2.2.0.crate 11520 BLAKE2B b688669f8bcb44967fe0d3db51fc5d5f86da3cd0c7eb7b5803feb250ea3444d134ecc7f79345f0b947cd3479a46659f3a158a04e0edaaa52deb8d343deac4761 SHA512 7e33fa62e0cf4b829638553a51f849242788d217264437444b3bf478fb40be26800d5cfd954b1bcdca1e5191b3c6c60879050f0f7e707461f7b090ae5025e0c6
+DIST tokio-1.53.1.crate 920101 BLAKE2B 6ab9ea2aab7e0ce7c60c4ef30abaef74c0aa32ee285e35ec90d4fe3d9465827af6736c16848e4f124b79fe07b48a910cb66bcf780dd6cc50e77a794643408110 SHA512 fa68c75c8a795ec6490eff7d57f585440d58776c2561a37796c4327c20474f2f9ec5a5073d410451301aca7f868e86f55bc0665778ddf7bcb3f065c3f345d592
DIST tokio-macros-2.5.0.crate 12617 BLAKE2B c30d0011173d246dc82a5c24ba97b0ed6b66bd8f19b0977e0305b03843b3611528fc5911b632d2c46bd22b8fd2e8488956bde0037c322a3ff8b7306e72cb9bdb SHA512 c1d24cbb8b3f500357e39f93cf139790e4bd3ad1657dd5d695f5e4f9a2a460cd63e8c1c32a36b64d3cadd7b6467e59ee34cd5b1548a99449d8e46c2db83e9ec4
+DIST tokio-macros-2.7.2.crate 16081 BLAKE2B c796b9af27e13ae1d944ea8ba3f9688568b5d58f763e087b9ffe1931eec6e0e717be485b3a7dcd08dff8309a03d58fa31b1883997e37b5d5385e9c11f0077955 SHA512 21dc60bdb05176704b08ed0bf3e474381ee3b6defc13fe7c5820fcc9e876ba7b4b1a915235c8a18f9be896c0917c284ba55c584647c6f30aaab527f947c03187
DIST toml-0.8.20.crate 51095 BLAKE2B 8e46bf5b667fa650883fba759efd1cc524fa758eaf1b9124f73121127cc72c0ebefaf64edaba6d249d7a9d0d81f75295d335f68e4e88d20949aba538a2aa71a5 SHA512 c842705270baea3e62e3b0535485f15af87e9a1b26dafb7945e1918e9fd59654b83316ace4ff837d84739d2dd1fddfafabc7d7b0c3ea1dcb9a07433a8cce72f1
-DIST toml-0.8.8.crate 50451 BLAKE2B 96d5411e8806c9021409ce232a11fd6d81269ef2f56b2a64d7217c9af8d0b31258b8c650e2bce9ca1d561a5fc58d1e556493d06199842a4d81884085622ae3c9 SHA512 6a583ce29d8179b480d29ca5e4624a4d6a8212cc741cd0c27c88ce46526f664a2f32eafd322b648f145f5ee5024d522a126f56befab5f1d68c32f2fb9866c7e5
-DIST toml_datetime-0.6.5.crate 10910 BLAKE2B 93a21ab2784e96ee2e6b56c7b4f733f6ac4c68c1e7d7dac3fbd8aceedb3580e25b4a9c7d9c3f9b5ed152560353b3e80906e37824956dc4ea90bc6f039768f6cb SHA512 502bdedbcbd2ac9fbaa5f4b51f2e409af185f3633f01f8845de5e3b007f2400215ddeb82ac588bc915ed5a5f9d7251ccf93fe2a57cd40fca2927f4c0966357e6
DIST toml_datetime-0.6.8.crate 12028 BLAKE2B 62113366771f22b437b2ed0d3bb2489ae9078cb589cfad2ad2e92c81ddbda48f689e5a573366eea4f54c2b3cbc6b37eaa8b442b6d935b631a992de4917268757 SHA512 d38b98db3b2d4eebd3001d88e2135b6fdbae63b200f7e900c6bb9c121dd3f170e557332bd26f237312c1cbef61666716b0cf550c2d730f86fa7cd9eb5f64a16f
-DIST toml_edit-0.21.0.crate 101265 BLAKE2B 8cf4fcd93fdc99082c3c43e6629348b67c1e2bb4a3605ea119816b4b3c473bb3b9bf9baed8b189a0dda6d92ff5f08ec58e3cce19fe2667bcdb2ca3dee88d06ec SHA512 6889b7c3b6679db874b9ef099e3bfbce75b7f15cf47860e542af42d449d0795113bf7dc84a7f2d394ee0fe037d7f4c0857c3eeba6902a8b42bb9cbfc96f0f324
DIST toml_edit-0.22.23.crate 106376 BLAKE2B d218ade72fcf2ced6f40eeb4d32dd616dc82d3bf9bf82492b4a0bb11c2448cf411bf15bc4f9193659aeab027f8652a5b3f3982a689d39ba384ce8d5ec6815447 SHA512 4a08e10910c6fa089a3c788aed3df222c70c5567e97128810fc0eb881ff88ba8db0e9bb6a1877f24ea6bc1b259769293440991147536bca61e5ba8eda6ce29ba
-DIST tracing-0.1.40.crate 79459 BLAKE2B 33693ee71564fe5925a63dca351e838dfd8612b4b1e49a33a70095e56ca63287c13c772661ace0e540d08c92942d7cbdc51ff2cce4f4b372164d9aa20ec05dee SHA512 5622188a45dddc0d6d3a8244a9b12db6221f4180944ce1019d18f4e613e4bd113dae5d45fb57dd0754f6e8e153b047cdf00c8f200782bb2b868bc2d423d99275
DIST tracing-0.1.41.crate 82448 BLAKE2B c056d938e001654e03efaec7a11eb8ecfbdfe9af2099271fcefa43f4f4683b40c59f7111fdf7f27df4da38bcbe94f1b2ac0abb6ec3d6e6a0d165b9fbb14da3a3 SHA512 dffb8d3a1375f1b9d5418550a46cb7b1d92b2cc8ffbccb430a38f7731547960775bb42798074186711847d256eee30fb3e74078b69cb36f28c07d9f231dbf96c
+DIST tracing-0.1.44.crate 463135 BLAKE2B 86054adc3043c73510bdd64973918dbcd4a8295dd007a4356e702d6dc90bca8b0f211df5e934b850d63618057fffa10215fb5d966340162117c110ff3e3e1c98 SHA512 383404a78c9bcb9dee947140082420673688dabc54eff334460222abddfc246b0256996ecb456d5b6325c029fcb2e641c95ff659a08366089b8b79784cb28869
DIST tracing-appender-0.2.3.crate 21964 BLAKE2B 7e2e9b759d876731984dd6c7b802fce18b8f233f6d659a220e5f1b338abe928b8f869d1479278eecac2899985d578db0f60dfeb80a1b8eb774265f21fff960d8 SHA512 c00f22d85a29209ec59377dd2f8c9bdfba84a5153ac84e1551266837e30fb931e76d93239a09bd4a27fabaf822bcbfd88d27787d923bc809493b7030b5cdfc02
-DIST tracing-attributes-0.1.27.crate 32241 BLAKE2B a20af0f50a90dcd64e5318e55779142da294ba18d1cd40059a8aa964fd3c92834e03ee563e41caaeef71a30e3f027e5c8d167d90e2844da79e0774b267e179b4 SHA512 7dc59f4234c3bf3434fb352baed2b81db4e931eeb3ed207c4a204e480da734be40847b167b808058d2807b5583815625bcd5153e2bbe79804cfa6f069a74ffa0
+DIST tracing-appender-0.2.5.crate 30794 BLAKE2B 6b6d820df60999a55a61e080e2e8a69dc21eff9fe45d7e513ff8a75a9773c4f975ca416bdd7180525409f90a07c73a0ee2552c7d702952df01c1c19c60b2e841 SHA512 a946a2a12f791b5d159ecb207cfaa0708cb6b66a28f6129cd5489b965a0afd0d00dba1cfe2c1a13e931b5a5d35ad8c63f61d19d2faeb0a65105fc2cfea04e6a3
DIST tracing-attributes-0.1.28.crate 33280 BLAKE2B 4f4bfab16ad8a296c9399125edfd4314d55ef58977d8a1f3e867618617feed898cd14766527c9b788d5fe3d3f8ee5bcca0e26dae79a2e6cf05366991ac23dc10 SHA512 4a3d5fd76efc414c86af0721aab9e9aa70fcd6b08eed4acee8c2af5af56fd665197aea612187c7f6022d1acf5567d5b9e72a7dcdcf25cc401135d875d95a99ed
-DIST tracing-core-0.1.32.crate 61221 BLAKE2B a7815c46af9852ce62498083103c6d359351f4d33609b4291330073b6abf4b63f5e1bb1a7dfed3bbf4d6913ad5217e96999416261af8a70609408a29109e4db6 SHA512 164f79cacfcca533a53b7dbbdc2015aaf851a16e00c72fbc4e5f515b6a6dedfa464e964810009b54f08cbcdc5a314e50245ac7b1b01a71fce4c63db135bf5521
+DIST tracing-attributes-0.1.31.crate 39733 BLAKE2B 5a345c85a36414241fa88bb44cfee5e07b33ad39416be0f05e35e0f17adeb99ef68cd1fcdbb7beed21c1efbeb2020a81a33f33b74c3486aba32bec175b5f9c9f SHA512 6954ce397903cfced12ef495d46885e8320233cb631116b0c35731c89c51d2cf2532c77ed02d9b708375b5555f3580a197dd63ad6899a32c87e34e2da2733bfa
DIST tracing-core-0.1.33.crate 63434 BLAKE2B bc36332ffe5f4c95ae2d12df43944bcf589746cdb923a39098e5f4007fd1f19d7c3bb115011ddc40c13e3ae0e5cfc9a59c49861824e99fed7430fd29479abacf SHA512 1c6f0cf3b7bd6c8f6316ed9ea0b315a619308de6cbf7e50e665a193cf8c3399b5227d4f145d83b10c7e01a2f9fbc83d16e108cf09b7fd6cef413aa5c1acf89ef
-DIST tracing-journald-0.3.0.crate 11592 BLAKE2B 5cf510c6b64bede0a6cbcf20a4224fcd838fc117d56befce60cd83e8bf1f6189c8df06460d82b4be14f6a7e083780ca705909801e0234ed95dcb4fa7cb1f9f48 SHA512 f51a48f8329f92a459511f64408a91067bcc7c91824effb4dacbb3712c553e7e5b0ef9d5a630dc2e1f373c453b352884a8fd67cf4ba7e96a559246b3a778e78e
+DIST tracing-core-0.1.36.crate 63967 BLAKE2B ed35889974aeca741414d425c874232c3d0722aea1740a68f1e2c8054b7dfc11d3c19de078a4a88a189d9a00afecf2eb5bb779a5ef0cffabee7fcfdc6387ecbf SHA512 7cecb6c2f1deeb6d23ab466c376e1c1300dd9226301c112deeb2483eea13f7bb514fe57ece707a8c67450245062060872dd4d7be390462008b369ca3dfc57dc6
DIST tracing-journald-0.3.1.crate 14416 BLAKE2B 34e7df26248ca1bf2f524851e7fbb95f6a4b7d2eb97fadec9d8dbe3d29852836638e40a113bfefcb27a4bdf1af25ee74150b064e0e20182566aed9693feed1dc SHA512 91e84cd4bccf31560228e08432827beba9bacd8f2b463c8c36c46927e1a3a4be665d32691a2ddb9db4540669b04b79e09920b0aae906f09f1c11ecc377a37b4c
+DIST tracing-journald-0.3.2.crate 16346 BLAKE2B 78b917b715df97d888585398c9dbd63a8ef422403e68a0bd9a44cd31797fc763c5845f724e954e42ccc3d4c46b45c17fcd21a345c17b459f13b5f03603dd6695 SHA512 78ed7f99f64ac3e3166f696d8ef28716089096f96edbb5aea5e91101c3a1f8dbfbbb33c7010c584f10e1baf110aff5ef091a19b90e77f3c93b4336a496b26f08
DIST tracing-log-0.2.0.crate 17561 BLAKE2B 701bdadd40f1343f3c4901bd8dd188f1dbc0afcdf50807bd0f6df7539635e239b5095696872103125a4d4cfec24af6336fce6f3931363dd5be4f53a09fa584f2 SHA512 0c1f060e8ffb9ff24cee7b85cc2d7d42c69b2f7623a7faecd7422b23b11ae8d5c7691e4635bae76861d444c369d9701ccb147904668023642b223e442e3c8285
-DIST tracing-subscriber-0.3.18.crate 196312 BLAKE2B bc2f04da63b0313d26073eb4a39b549ae37701e4dbf1fe06a2483279a03d9dde981f0efea6ceb5cd441ab313bfe7eaf812971c3ca60dfd4b5d9cf0d2eb7bacd4 SHA512 72f91855637aa476f03077d5f523cbc94989d40b12d7328167f88b081869ed096e6370450831f6cd5f0686cae5628f14eed4696c06a2ec75f56808b64445e0c1
DIST tracing-subscriber-0.3.19.crate 198345 BLAKE2B c7083168e62619c856b872570b85b44475edd687fb6d5c3334246622900fcbf4e4a8484c23362fbfb358d6d9f8088f7dbad2e2ed30954aebf76d1b57324b712b SHA512 840e35103f1152e94ef9138d0f03f157b296def538bab6c7464fa7d363aef7734feed196091782dd3aa9bf06c7dc181a2c37149a23f5be036f00c00b5200686c
+DIST tracing-subscriber-0.3.23.crate 213773 BLAKE2B c47dbb00620dfef7b629f5f39549040ba1a7fdb1e511bd57212234396be248c66baddd5b12cfee49bad8bd9aebe9d4e9dd663df7e4e0230047fc028f9c4decc9 SHA512 9d69512c39fe2a4d9f4e27f373e3c79d2b23dc6a8e10e8388c5bba87d6f80048edd1e70541fb4311b9708d53510a53dfe69f32c1e3e36ea85c6dfaafc2c01f74
+DIST typeid-1.0.3.crate 9006 BLAKE2B 98de768e71bf1c3fdd62b01e7a5c7976716a7ec983a96a5cc6a2dec52e6bcc61260b0508684ed45a2f7fd06fe6e263c9d7f0c29b1fef4a3e498a024fe5cbd1ea SHA512 3d15a6f554108b2fb9c08ee9679e34565d84efc1d34ffdb6e4a8eed8d3575ebb75176a56124d9554315c93b86a88d1cb619238c10685808376cf968d83b5bed0
DIST typenum-1.17.0.crate 42849 BLAKE2B a6d1162050679e2c4ab2467f3a77d301f6861882eb7c9749f31d047f383dd5bd2ed5846ad63eed99ccc04d6ac36cc697a305861e1d65880b4d2ef04ee0a79b94 SHA512 99773d5d9f850c0602db4bb67dd062b0ade6f086e155216f1bb2fb6569461ba7e1b7c2f2af81ea8833bc3bfcf3fe5033edecb7c438adae63f59d3e30cf63a508
-DIST ucd-trie-0.1.6.crate 45790 BLAKE2B a6d47c903be6094423d89b8ec3ca899d0a84df6dbd6e76632bb6c9b9f40ad9c216f8fa400310753d392f85072756b43ac3892e0a2c4d55f87ab6463002554823 SHA512 00d9732797029c16d84fe518b2d90de841b87b5ed6c3628b9f097f5340f1e50778749db18f22e4ecc513f53624806ddc3484e5cc9ebffdbb6c0c800bef817e95
DIST ucd-trie-0.1.7.crate 46795 BLAKE2B 1901b49ae246f0d9628b675d4320c1005707bf97d4c8b0ff99e916d198e31698fddfdb0551222f36b73b9ec7d9e648d679848841d81e975bb9ea69bd1e30aea7 SHA512 382a832e38654a9159ebb40a8e8bf6e7f2f3108940e5b9c388f3a1441848a241201e7e5cfb125e098f04f0b2893da231b8a0e5124270e774215374bff3c5445f
-DIST unicode-ident-1.0.12.crate 42168 BLAKE2B 4cede03c08758ccd6bf53a0d0057d7542dfdd0c93d342e89f3b90460be85518a9fd24958d8b1da2b5a09b5ddbee8a4263982194158e171c2bba3e394d88d6dac SHA512 bc1824e1e4452a40732fc69874d7e1a66f7803717a314790dcf48867eba34bc9441331ef031e386912e52c385645c25b6ed39d4f149973b5b97371b1b96b1920
DIST unicode-ident-1.0.16.crate 47684 BLAKE2B 0cdfea4b56bdfcb8288941f95a31e66f7922b7e1dfa8f5e6265f1051701d31bfbe6e0cefb0fbd33456e2fdff48f8da30580351309e19fbb5d2f2573c716965cc SHA512 9484a34a4e283f94e971fa9ec42528a62f2c056e702040da37dd9d9b794e16e14a408302d1ac26a850d0eadf0d0266d8ef5b80761490f7029240244a39878ec9
-DIST unicode-segmentation-1.10.1.crate 98416 BLAKE2B 4c391ad34c5f8a00096ce89793b15212555f2d8a367f3ae78f26a36c5897b69f3efcd280a1bd3eb3f61c87b8a26061804b1cd56e1c1500cbcd62e8bc74520014 SHA512 e96224bba73fe9a167bbf226bb13fe5bea085765a90f7232cb20b42f3c584242b7291aeba1eb8edbe2ae40e5bee2f4714f434324f79316b22e8437c77a50e86b
+DIST unicode-ident-1.0.26.crate 48425 BLAKE2B d615360eb4874b898657770cd8adcb39350e51dbc76a3109f5e0589a8017b89e19b13a49c0170643cd4988296482bdc293f22437d44f06a1e0af9b76b3a0fa1c SHA512 216d13c655e47dddf888fac997a6345bb7c6d1f0ab6b67ed06bfd9013a891fda8e9e8d71b763639957c15b951145ffd77243ee2056a20ed809d2cae48502c472
DIST unicode-segmentation-1.12.0.crate 106323 BLAKE2B 268b60aff6694434f05afb7e2b8187eeccdceb77460f8ce2ac0f84d470f8a4e03182ce3f7906177cd2f00f989273a7e69061a763006245f0876bf21b15076804 SHA512 55eebfe5e9972b39d7c0011d80eb5f517d636de37870999119a3d8f064f21f67b66a5ba9761d562738b05f220e21d56b5be7bbd9cc51662994e40dd67c38f946
-DIST unicode-xid-0.2.4.crate 15352 BLAKE2B 80c327b39f3b8f2cdb5747cde968cfa1efe7b65b6bee9136adc881fa19f66aa5b1010d9d08de55a61b322d665b5b0cb0395e9ac471f6333c40d8dca5d97e123c SHA512 e67bd1258e1961807d9d5fe583a89ab5b82b2a529ecd32cadfc79aa5331380eb4a2db9fd96b74c8eace47f2f29021587d69bcdbf79f7e2650e92a25f7839d03c
+DIST unicode-segmentation-1.13.3.crate 112325 BLAKE2B 4767480bbb171eb9f9cb026c4101c7db58f37ef3d0ba12233c612392b48e1c63efa61e66c321a4bf772dca214794906cfc82bafb87e59a755bb164b0b2304c45 SHA512 927f3d2662c40213c6d824c410e3559f180fba5736abdea566ad9f3ed357c5a82f84f63e7fb89c6b18dfba2903d2dc43663b79d0b9f7672a42926e0ba49c85d1
DIST unicode-xid-0.2.6.crate 15744 BLAKE2B b1bad25897717f6346f988d5a7c90c51fb842da113f19aa434a64add8f2e637258d9fab0f7b871fd2aac02e83c68359fc679b326232793cbc804523e2bff5056 SHA512 f68e78484479a5341b14d7e3391e691265851fa00feeca53af745479af6aa9b4ce3570456df785c8362043db9b04e2e57f9bad05d8305946f16af405bc611764
-DIST utf8parse-0.2.1.crate 13435 BLAKE2B a1c111d7ffc60690f2aaa86f034c66ba1abe4e126f1774a4377d41eba3269369862f57515af387ea785d69a8adf46338b5e53761b5ee6f4f4380473f4d9cab0a SHA512 51fba8f1e7eb74b7020fd831e30a67fc8353ac2ee07335c8c3374a5570ac8117f165f6905d4b7f0360095b7b5ed3e739001d02a8cc3c89195baf2cd679136050
DIST utf8parse-0.2.2.crate 13499 BLAKE2B 095b5d219ab8ff04c06fd6303e03d913ae36a57845f0b2ca3217a40e31a54cb0fb5ecedbde165d28f5f60f1553d8252986d7098fa83befc84a7cb20bf3b76144 SHA512 f3dbf78fe924f1dc3cf9498b6e43fb10174699463f31091a7a8136d8f31ec84fc00e80e3d8551b7e86257e8b3573cfddb56fc0de797fdb2cde0e962a8f239266
-DIST valuable-0.1.0.crate 27718 BLAKE2B ef5ded994c9a6dd302bed27f0d757447b0c86dfefa499c1ef0d25c3a6745ce61cfa2c926826534c9f605f9b89b4a19f91f06f94ae7c03f1ddc4c58fab3ae58bb SHA512 a97f65db1f1c5049a276dbb0e45e25c6fc6ce9d27ac1fcd77c945324cd8216ef60344065c79799ca04e338455e4f7422c44078eea32d5fc359dd0211ee7eb387
DIST valuable-0.1.1.crate 28679 BLAKE2B 33a68f81cb0448fa737fd7416f2dc1f0e4f171851692e5f759bc375ca8ffbe6eb53912823a59da44228029d379729b669e8213f00928c9b1a182c5d26c0de8bb SHA512 d8a4bffdc8a166d1ee11b87dd91cd68e5c898916b14db7039ad2faaad34f4bfef76f3fc3d17d6e7bf05e495778f7c9d5223fbf45331bd114f93fb6ec950eadbf
-DIST version_check-0.9.4.crate 14895 BLAKE2B fa1fa4008af165bfc1fdbe560488afd9d232cfafee94104fbcc4cbc52f234849bff9ddfa88109a1ac682f6d9c1d86b0459893d223f64e65adc08966aaf93dc89 SHA512 b172dc9a3759a4a683ffc39b9a40b03b9974b626a088217de87090466cef695226557c226cf3e469b2b25ee7297b7eb0d7719878cab42457f80146a81943c0c8
DIST version_check-0.9.5.crate 15554 BLAKE2B 131e75cc287518831e142430e2a39b48e4275874f4473780d47a27552294097aa1cddb65c385583e1022478f940b495eb43c24a8b1617b8ac5a24af3340c0d72 SHA512 d11d5a2240ab0c67ea69db56561ce202201edeef9a8e5eda3d9ae7ab7bb5752d8f343fe7f6536d8383de8d55f9024efa84f66a0c21e69563b7a38c4a628014db
DIST wasi-0.11.0+wasi-snapshot-preview1.crate 28131 BLAKE2B fe501889f25d65e2d032f885cc50c4f8bf7dd70fd5cbc438de349838370d8699e9627b0a4fc76030ea9fe6d508f41d0c9928a875fdbc47e73bfb17241cf7b155 SHA512 043500ab28cd9cb779475255da5d109ebab7fccca72b64873dc28d77bc5a157ba8d96b9e8f05223b5b36c7089bb7b4ba87657fc69bac16b78972f897294a865f
+DIST wasi-0.11.1+wasi-snapshot-preview1.crate 28477 BLAKE2B bcc773ba28cbe8d820e9e9fbb275fb4451bc7f39b3bd88bcd93850bf2bdb5300489bd8eca27489ccc5f6269b00f4e1b505ae3a33a35d708cd5a414ad307be149 SHA512 29e3c903763db2580a15f50db487c5e1d4e90763e48d90a5b3f681e468a24f9df1a01773bd1ffa0e3cd293dd8cb4d6fbabfaa63c0e13889c811a56f4554ada49
DIST wasi-0.13.3+wasi-0.2.2.crate 136754 BLAKE2B a17e2670caed033c1b2e2bd709a79c1dff5d0ff46b32e9d9b0faceac2b3350397e7bc6ce113a9275c400537121c9d853130b4bd546afbf0bcd248f4c69d8a708 SHA512 c0b0ce3c4d82ad7350e017fda565a69cf91186ebc41a1c5bc21a6e2fd2f0d8e7d90bcd60488074da6062ac1fa39c684ddd8ee1d8efd66e82eff36ddb16682abd
DIST winapi-0.3.9.crate 1200382 BLAKE2B cb5799749ccd935ea2d7068d953cecf19f543d9db7dc16ad4584bb7005373ada34937a3ced7225544d8bc765da599911c7a3190efefb3a25b7c1bb7123b4f673 SHA512 ff8b7b78065f3d8999ec03c725a0460ebc059771bf071c7a3df3f0ecd733edf3b0a2450024d4e24e1aedddaecd9038ce1376c0d8bbf45132068cf45cf4a53a97
DIST winapi-i686-pc-windows-gnu-0.4.0.crate 2918815 BLAKE2B 4d357e4d30f9552972170d65b9a5358b69c46a3e772fe05efc22f3d4ffc1caeeaad7aacdc7abd503a7ad0545f8bd7d22bf351dcb6df76f812fa4d45c34d65df0 SHA512 a672ccefd0730a8166fef1d4e39f9034d9ae426a3f5e28d1f4169fa5c5790767693f281d890e7804773b34acdb0ae1febac33cde8c50c0044a5a6152c7209ec2
DIST winapi-x86_64-pc-windows-gnu-0.4.0.crate 2947998 BLAKE2B 2ad1ea8b5fa07d544e910ccba043ae925269b76b26c9da356305b34b86741dd8b9aff0b9ffe3d562db4fcd7d7c46a11ce9e3168b782b1d89ae6881742b7ede82 SHA512 4a654af6a5d649dc87e00497245096b35a2894ae66f155cb62389902c3b93ddcc5cf7d0d8b9dd97b291d2d80bc686af2298e80abef6ac69883f4a54e79712513
+DIST windows-link-0.2.1.crate 6133 BLAKE2B d1ca714178e6fe12bb3b4caeed9a52a36890989e77ae2dcd6f2d18ae4a21fb8479d304cdff63bb0a5f28acf44eaf104821cff83cd66b3a0406a5f33a800e3641 SHA512 afb0c87beb8914fd9a3e52db6f2f64a840470b9751b66c83892c24cb1c46cda63fb16b1aeafcaa5a1fc7c5ba01da46be63e5227cc108dede8b0bd27785498a6b
DIST windows-sys-0.48.0.crate 2628884 BLAKE2B 551e900de4f67187ef034b60df9fd0e0d8f82a3100ef28e1eabd543ac129d882dc86ffcc1714071aba09e4cb2ae2d2f07ace1a32b99fd989ce525cf05991edab SHA512 bdf534bcf3face31e9ebe11427a911a53f89f4ff5eaea8cccd094e139bfe14b2aec602b1cab1df774794d999477439d9adc6b627a8e33c20334fc348ba2c47ed
DIST windows-sys-0.52.0.crate 2576877 BLAKE2B 69d6b560ccfc8f679e2678663ba606060d71fa28efa82c8aef8cceaa2c63b06f2052764d60163964f939649a26bbec6361ee4b094555e941fae92070db566980 SHA512 24ee0df246c2b456a4987a9124786a28acd358768cc7d1305bccd81bc5bb8822b81a03fb18d35174a520b911c6d9b685f81a34ab319fee13da3b985273584f03
DIST windows-sys-0.59.0.crate 2387323 BLAKE2B 3110c8cd2bc005f8c95cd038a8d574af648dc19788fe4485f977376f92e36b911b1a542d669a07ae9cd4ea72a884ab01ec78b8a2b5587456eb202452d1d8fa0d SHA512 d35e009e979633a1f3c8468cd038bd5c8c0381405165ce03497decd7d9edaaac485d704487e4a61d9aaf4e4d011b4248408912df6a0044d50e8457259867e061
+DIST windows-sys-0.61.2.crate 2517186 BLAKE2B f4eab0b365aa1df8a353d634da5081237bef0f7b69f02ffcaba232a688e59dfe877c47114de64c81e3cbb929c2fea1143ed6bda56ce935e66d871a993ac29106 SHA512 e6c8f61f0724dafca7821ee9b9c07237ccfee69be269be2fa7318eb48b151285ecf63e860aa1fe303639222fe11268e3773f37c2dd79f923029af58c645edb3f
DIST windows-targets-0.48.5.crate 6904 BLAKE2B 7396bb210f37bd51da86f39fca3425c8f6610721d5c4e94f9fafa0a8a8046303b3fcc6979146bcfaa32f4406d242a0455f6cbb220f84c6ff84650e755acf5223 SHA512 e079eeef255a046be7f8e6a31c14f7b230254ebcf05eed2944827bb3d2a0dc30940d87593cf544d5e7ef35f6312b99430efcfb01421d91b02bb9c4bef7d98709
DIST windows-targets-0.52.6.crate 6403 BLAKE2B eb98d0a8daeed5fe76e7fa8edb2743e2a3e77dfb9c4ea68605a6ab10532cb7cfc43bc1cea0180869445bd940be762a40136500e26b84ca88b5e0c502004c7a4c SHA512 d6d2dbd96096c6c396dba141a9817e377c35877f3b2fe58b2553280c7cfcb1ed6ee75bd4d62c9b882662de67ddaf0c1049b91530d29c94dd709c230e08eb895f
DIST windows_aarch64_gnullvm-0.48.5.crate 418492 BLAKE2B 5c6f7d73ad05740f0bac304ed1ef9b2ea63b0d6ca8f875552ae299a0b73b1557e8fe996f1c2b69be9f2df350c9288690f49ee62239a2896991364331d6c55462 SHA512 20158d31454488f6053d3ad7b97d7fc6eae6cf37e4ba0e50c28bd29b368505eed64199ae31104d5f97b66846be54e5ed25c0ad31ea850819205c573a31ac0996
@@ -296,10 +266,14 @@ DIST windows_x86_64_gnullvm-0.48.5.crate 418486 BLAKE2B 12a2199d434617c1df1a839e
DIST windows_x86_64_gnullvm-0.52.6.crate 435707 BLAKE2B ab77dccd06328cdb00175f41cdbc120594050a9678b7f9820444391fb50aada3911a91ea00f3a6db2b4fa1820fd23bc9a007dfbe65ad41417c26ee1137ef9b96 SHA512 67681f5859e249c56b0183181811f6212cc7008d6471dad78aecc7ebe3d027686b19210b8aa9014c554410f69f913d21ce2aca928eea905eab779bea26464cbd
DIST windows_x86_64_msvc-0.48.5.crate 798412 BLAKE2B 8abc0721e2fb337fe17c91d278947d36122d9045b839ba0cf3e690202d242265b676f23cc301da5f9d98c56ca4ecb76f7d6f072ee71bf986a1deca87020b90e5 SHA512 fa1c5cd14ca2ff0082e2504cf59d317dc4dc6f7138d35c12f95d4476a9c13d8b7f5537d0ee251eee7c99411ad31b22263171b7fbd391daa5d3ea3488ceaa61a0
DIST windows_x86_64_msvc-0.52.6.crate 832564 BLAKE2B 8e9a3044654c6de99a9153e7cacd575474e7a8a3d883c67b02132af5d3fc99d03cd5f7a4dd666a3947451d11218e6acc6eb5e2526f012481106cc13453839719 SHA512 21944cd8e3a481b514509e73ae3f62722fe7ed380d37ea0c25f8fbdeba79174dd52ff65d898838da5df4197894b74e00f45d47489418e978753b4e55c7e623e7
-DIST winnow-0.5.19.crate 147982 BLAKE2B 99b9625ee4c8b6236b1acfd29c267ac4d17c5f911e291d39f71f85a097222a4fbe48606c02acab6d70eccab710852782096bcda90ebe6cefb44ed9d48923ce0b SHA512 dee415c9e901d91d2a4646d1198c5b959c8e7a9ee5b3bfcb5c78159d57fc3905dda80e1c5b45a8a18e024a3e2394022772fecbdb8158ea1513a953c93f48d9a0
DIST winnow-0.7.1.crate 170986 BLAKE2B 0c68ef187c248b7a04fc86aca9ed87eaa1cbfbf7ba63c64f6aceb9398d57d8d3a250d23d581710d86b593dc816fdac89c3a95abf3c4fe6c830a9d488ab95d512 SHA512 640952229a81845fbc2e425c816298481dcd7c86ba237e7f3d7cfc4e38a590e62787f0a1468037314c40452df69070f7809291f084484ea5a1ebc5e5315e0899
DIST wit-bindgen-rt-0.33.0.crate 3357 BLAKE2B 7c5227e835eb405b681ba36a2472fb3330b9e44f8e9cef06ae5de326691d4e4535cfd09843241963572060f4ccb048aa088fb8692591f9253cd215f510969420 SHA512 fffae2da775fcb5066398aba5cd02119a07f5bb5ab2282c74f1665656de0278ba13352b8ccc6ff107677aec3ec5d401729158332f653e0a2e7b393d1aa018b8a
DIST x11-dl-2.21.0.crate 66823 BLAKE2B 83305b44ec89e765ecb2dc48fc3aa93bc67d30f12e9782348bca822ca636207e9a9c2b707ab33b6dfc7fadd2b2cdaa599480470eef7a29a15332e923413a7cce SHA512 b864b0865720a9b2afc6d986fb7ebe19734671433449897d7f00488e019f3781f417f8e3763f09fa0db100a1d0c7e709ea9ac43c6dd48775f3daf803ebaebee5
DIST x11rb-0.13.1.crate 223916 BLAKE2B 1663b0d4eb059924f9c2dbfa2fff01ee9c7a90bb6652d6e6a1519676e36ef7cca5fd079e39f45137350f595bca592ae9098b93877cdad9540131063379fad2ed SHA512 652f499857aff45053e2ffe1a2e3463323bcf3cf546482dcef4d2805e90a898a12f647da9181fcf02d7234bebdfc424f8a4e0e256dfd49aba4b643284308404f
+DIST x11rb-0.14.0.crate 219227 BLAKE2B 71716feb2069f65fe49ed9f90f188d176cc40129c8950c70ea8cbcd090a77950066f2ab674c200f1c9f91ec88a3f2a4e83e4e736bb106086e18e112795af8524 SHA512 a3f114f0c87203a9d5cc6c04bcd8ee13e9ae67392014964a9ebfca9951962291d0a373970925e6e3b82af2def03fb9a1eeab8c9c3b4a2d5bf81244159bd02f99
DIST x11rb-protocol-0.13.1.crate 508522 BLAKE2B abd88b4175e2fadebc44f232262b71261fac9b1289ee749d31fbd4a9d9c8ff426ccf9edef8eced4b41e4fba3401cd81d109fbf8aef1c99b4529f57910d000a8d SHA512 5c1a40fcbc77aa6e3357ac64af37958ac54aa3a78af354c1ea5f8e8b28f352c6e5d8b4762d8c4eb93fa8a1a122184b89c9b1c95a53d35b08819654dbd4cc4db0
+DIST x11rb-protocol-0.14.0.crate 513842 BLAKE2B d13e4b6608e7013382e74944b5c94d9933c689105ff59cca7812a43058dbf3edbb9da59defbf77a2741830766a8830f9d7d0c7287257a7ebc69bf84d1337599c SHA512 37464d65c2683755d53d8db5fedaa9b87543f99bd656f8d499f13f03aa5c042a4748e4876b956ca47556f79e4235e36217d50ab30b1a404b6d4530418f3343d5
+DIST xcursor-0.3.11.crate 8292 BLAKE2B 9498e6ec1a57eb0b53de026cc54f57777cf20ff19025ad0b7fdfd7d8b1ae8179a6929bed48581e8c576f9b326e23ed282943628367855099ba55ef47b7bb6424 SHA512 e477ab4765dbd243d537a1d37b8894146480512b649f2d857b7481ed11582abff473b6240aa62eb06ba46d5b30059f935e7e00b0977ed9d8412c9816f631e0db
DIST xdg-2.5.2.crate 14394 BLAKE2B 9d7ad2681ba450b73c66aefd8602a1d32e13e0ec751a368188b61000a5efb3fac943f6e5d6875f409aff6eddff3b2ba22631f71dcda4ea44dac080d551053f4a SHA512 12c7f42d2afd63d8d196511fa069519a0c495fc2555c87c059b96b46d7e2a2c51c31836c48fb329806d312a45a2fd67b4243793aa91e2139e2aa3f05230b2edd
+DIST xdg-3.0.0.crate 15821 BLAKE2B 73bea57b11a2e16abdd8c0c9e006dfcbae3098696e07784bd20516971263654a152a49e78711212b2d39159878a86cc8a8460ffaae0aec00fd16ed155140ea3f SHA512 466afe1f7c4271bc3b98841a1e24cfc929d88ad4d55773c9edaf6fee38b411ae3b6596399dd9a39a4491920af203b954f4ea942f73721d173fe4458e2b2e60a2
+DIST zmij-1.0.23.crate 28612 BLAKE2B 5b1fda50a365ae6bba79ed8444f15dd184d0ba0d7b993c8f119355029b5d7cf6a4fe5d9f36eec722221725ed747cad5108eb707ef14920670ffa45843edcbfec SHA512 12f8d9726b232b6be68cefbe294505debb7a98715c11b95d89682a596fe1a02d9d7b2a6cdba97f2e8d47fa947ffbce9506a18568f2cab749ca3d03121e5fb66d
diff --git a/x11-wm/leftwm/leftwm-0.5.1.ebuild b/x11-wm/leftwm/leftwm-0.5.1.ebuild
deleted file mode 100644
index 0edb1ee742ba..000000000000
--- a/x11-wm/leftwm/leftwm-0.5.1.ebuild
+++ /dev/null
@@ -1,228 +0,0 @@
-# Copyright 2023-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-CRATES="
- addr2line@0.21.0
- adler@1.0.2
- aho-corasick@1.1.2
- anstream@0.6.4
- anstyle-parse@0.2.2
- anstyle-query@1.0.0
- anstyle-wincon@3.0.1
- anstyle@1.0.4
- anyhow@1.0.75
- anymap2@0.13.0
- autocfg@1.1.0
- backtrace@0.3.69
- base64@0.21.5
- bitflags@1.3.2
- bitflags@2.4.1
- block-buffer@0.10.4
- bytes@1.5.0
- cc@1.0.83
- cfg-if@1.0.0
- clap@4.4.8
- clap_builder@4.4.8
- clap_lex@0.6.0
- colorchoice@1.0.0
- const_format@0.2.32
- const_format_proc_macros@0.2.32
- cpufeatures@0.2.11
- crossbeam-channel@0.5.8
- crossbeam-utils@0.8.16
- crypto-common@0.1.6
- deranged@0.3.9
- digest@0.10.7
- dirs-next@2.0.0
- dirs-sys-next@0.1.2
- dirs-sys@0.4.1
- dirs@5.0.1
- doc-comment@0.3.3
- either@1.9.0
- equivalent@1.0.1
- errno@0.3.7
- fastrand@2.0.1
- futures-channel@0.3.29
- futures-core@0.3.29
- futures-executor@0.3.29
- futures-io@0.3.29
- futures-macro@0.3.29
- futures-sink@0.3.29
- futures-task@0.3.29
- futures-util@0.3.29
- futures@0.3.29
- generic-array@0.14.7
- getrandom@0.2.11
- gimli@0.28.0
- git-version-macro@0.3.8
- git-version@0.3.8
- hashbrown@0.14.2
- hermit-abi@0.3.3
- indexmap@2.1.0
- inventory@0.3.13
- itertools@0.10.5
- itoa@1.0.9
- kstring@2.0.0
- lazy_static@1.4.0
- lefthk-core@0.2.0
- leftwm-layouts@0.8.4
- libc@0.2.150
- libredox@0.0.1
- linux-raw-sys@0.4.11
- liquid-core@0.26.4
- liquid-derive@0.26.4
- liquid-lib@0.26.4
- liquid@0.26.4
- log@0.4.20
- matchers@0.1.0
- memchr@2.6.4
- miniz_oxide@0.7.1
- mio@0.8.9
- nix@0.27.1
- nu-ansi-term@0.46.0
- num-conv@0.1.0
- num-traits@0.2.17
- num_cpus@1.16.0
- num_threads@0.1.6
- object@0.32.1
- once_cell@1.18.0
- option-ext@0.2.0
- overload@0.1.1
- percent-encoding@2.3.0
- pest@2.7.5
- pest_derive@2.7.5
- pest_generator@2.7.5
- pest_meta@2.7.5
- pin-project-lite@0.2.13
- pin-utils@0.1.0
- pkg-config@0.3.27
- powerfmt@0.2.0
- proc-macro2@1.0.69
- quote@1.0.33
- redox_syscall@0.4.1
- redox_users@0.4.4
- regex-automata@0.1.10
- regex-automata@0.4.3
- regex-syntax@0.6.29
- regex-syntax@0.8.2
- regex@1.10.2
- ron@0.8.1
- rustc-demangle@0.1.23
- rustix@0.38.24
- ryu@1.0.15
- serde@1.0.192
- serde_derive@1.0.192
- serde_json@1.0.108
- serde_spanned@0.6.4
- sha2@0.10.8
- sharded-slab@0.1.7
- shellexpand@3.1.0
- signal-hook-registry@1.4.1
- signal-hook@0.3.17
- slab@0.4.9
- smallvec@1.11.2
- socket2@0.5.5
- static_assertions@1.1.0
- strsim@0.10.0
- syn@2.0.39
- syslog-tracing@0.2.0
- tempfile@3.8.1
- thiserror-impl@1.0.50
- thiserror@1.0.50
- thread_local@1.1.7
- time-core@0.1.2
- time-macros@0.2.18
- time@0.3.36
- tokio-macros@2.2.0
- tokio@1.34.0
- toml@0.8.8
- toml_datetime@0.6.5
- toml_edit@0.21.0
- tracing-appender@0.2.3
- tracing-attributes@0.1.27
- tracing-core@0.1.32
- tracing-journald@0.3.0
- tracing-log@0.2.0
- tracing-subscriber@0.3.18
- tracing@0.1.40
- typenum@1.17.0
- ucd-trie@0.1.6
- unicode-ident@1.0.12
- unicode-segmentation@1.10.1
- unicode-xid@0.2.4
- utf8parse@0.2.1
- valuable@0.1.0
- version_check@0.9.4
- wasi@0.11.0+wasi-snapshot-preview1
- winapi-i686-pc-windows-gnu@0.4.0
- winapi-x86_64-pc-windows-gnu@0.4.0
- winapi@0.3.9
- windows-sys@0.48.0
- windows-targets@0.48.5
- windows_aarch64_gnullvm@0.48.5
- windows_aarch64_msvc@0.48.5
- windows_i686_gnu@0.48.5
- windows_i686_msvc@0.48.5
- windows_x86_64_gnu@0.48.5
- windows_x86_64_gnullvm@0.48.5
- windows_x86_64_msvc@0.48.5
- winnow@0.5.19
- x11-dl@2.21.0
- xdg@2.5.2
-"
-
-inherit cargo
-
-DESCRIPTION="A window manager for Adventurers"
-HOMEPAGE="https://github.com/leftwm/leftwm"
-SRC_URI="
- https://github.com/leftwm/leftwm/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz
- ${CARGO_CRATE_URIS}
-"
-
-LICENSE="MIT"
-# Dependent crate licenses
-LICENSE+="
- BSD-2 BSD MIT MPL-2.0 Unicode-DFS-2016 ZLIB
- || ( Apache-2.0 Boost-1.0 )
-"
-SLOT="0"
-KEYWORDS="~amd64"
-IUSE="+lefthk syslog systemd"
-
-DEPEND="
- x11-apps/xrandr
- x11-libs/libX11
- x11-libs/libXinerama
-"
-RDEPEND="${DEPEND}"
-
-PATCHES=(
- "${FILESDIR}/${P}-nolefthk.patch"
- # fix build with rust-1.80
- "${FILESDIR}/${P}-rust-1.80.patch"
-)
-
-QA_FLAGS_IGNORED="usr/bin/.*"
-
-src_configure() {
- local myfeatures=(
- $(usev lefthk)
- $(usev systemd journald-log)
- $(usev syslog sys-log)
- )
- cargo_src_configure --no-default-features
-}
-
-src_install() {
- dodoc README.md CHANGELOG.md
- doman leftwm/doc/leftwm.1
-
- insinto /usr/share/xsessions
- doins leftwm.desktop
-
- dobin "$(cargo_target_dir)"/leftwm{,-worker,-state,-check,-command}
- use lefthk && dobin "$(cargo_target_dir)"/leftwm-worker
-}
diff --git a/x11-wm/leftwm/leftwm-0.5.5.ebuild b/x11-wm/leftwm/leftwm-0.5.5.ebuild
new file mode 100644
index 000000000000..6686187879d4
--- /dev/null
+++ b/x11-wm/leftwm/leftwm-0.5.5.ebuild
@@ -0,0 +1,171 @@
+# Copyright 2023-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+CRATES="
+ aho-corasick@1.1.5
+ anstyle@1.0.14
+ anyhow@1.0.104
+ anymap2@0.13.0
+ bitflags@2.13.2
+ bstr@1.13.1
+ bytes@1.12.1
+ cfg-if@1.0.5
+ cfg_aliases@0.2.2
+ clap@4.6.7
+ clap_builder@4.6.7
+ clap_lex@1.1.1
+ crossbeam-channel@0.5.17
+ crossbeam-utils@0.8.23
+ deranged@0.5.8
+ dirs-sys@0.5.0
+ dirs@6.0.0
+ dirs@7.0.0
+ either@1.18.0
+ errno@0.3.14
+ fastrand@2.5.0
+ futures-channel@0.3.34
+ futures-core@0.3.34
+ futures-io@0.3.34
+ futures-sink@0.3.34
+ futures-task@0.3.34
+ futures-util@0.3.34
+ futures@0.3.34
+ gethostname@1.1.0
+ git-version-macro@0.3.9
+ git-version@0.3.9
+ inventory@0.3.24
+ itertools@0.14.0
+ itoa@1.0.18
+ kstring@2.0.2
+ lazy_static@1.5.0
+ lefthk-core@0.3.2
+ leftwm-layouts@0.9.1
+ libc@0.2.189
+ libredox@0.1.24
+ linux-raw-sys@0.12.1
+ liquid-core@0.26.11
+ liquid-derive@0.26.10
+ liquid-lib@0.26.11
+ liquid@0.26.11
+ log@0.4.34
+ matchers@0.2.0
+ memchr@2.8.3
+ mio@1.2.3
+ nix@0.31.3
+ num-conv@0.2.2
+ once_cell@1.21.4
+ option-ext@0.2.0
+ os_str_bytes@6.6.1
+ percent-encoding@2.3.2
+ pest@2.9.1
+ pest_derive@2.9.1
+ pest_generator@2.9.1
+ pest_meta@2.9.1
+ pin-project-lite@0.2.17
+ pkg-config@0.3.34
+ powerfmt@0.2.0
+ proc-macro2@1.0.107
+ quote@1.0.47
+ redox_users@0.5.3
+ regex-automata@0.4.18
+ regex-syntax@0.8.11
+ regex@1.13.1
+ ron@0.12.2
+ rustix@1.1.5
+ rustversion@1.0.23
+ serde@1.0.229
+ serde_core@1.0.229
+ serde_derive@1.0.229
+ serde_json@1.0.151
+ sharded-slab@0.1.7
+ shellexpand@3.1.2
+ signal-hook-registry@1.4.8
+ signal-hook@0.4.4
+ socket2@0.6.5
+ static_assertions@1.1.0
+ symlink@0.1.0
+ syn@2.0.119
+ syn@3.0.6
+ syslog-tracing@0.3.1
+ tempfile@3.27.0
+ thiserror-impl@2.0.20
+ thiserror@2.0.20
+ thread_local@1.1.10
+ time-core@0.1.9
+ time-macros@0.2.32
+ time@0.3.55
+ tokio-macros@2.7.2
+ tokio@1.53.1
+ tracing-appender@0.2.5
+ tracing-attributes@0.1.31
+ tracing-core@0.1.36
+ tracing-journald@0.3.2
+ tracing-subscriber@0.3.23
+ tracing@0.1.44
+ typeid@1.0.3
+ ucd-trie@0.1.7
+ unicode-ident@1.0.26
+ unicode-segmentation@1.13.3
+ valuable@0.1.1
+ wasi@0.11.1+wasi-snapshot-preview1
+ windows-link@0.2.1
+ windows-sys@0.61.2
+ x11-dl@2.21.0
+ x11rb-protocol@0.14.0
+ x11rb@0.14.0
+ xcursor@0.3.11
+ xdg@3.0.0
+ zmij@1.0.23
+"
+
+RUST_MIN_VER="1.88.0"
+
+inherit cargo
+
+DESCRIPTION="A window manager for Adventurers"
+HOMEPAGE="https://github.com/leftwm/leftwm"
+SRC_URI="
+ https://github.com/leftwm/leftwm/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz
+ ${CARGO_CRATE_URIS}
+"
+
+LICENSE="MIT"
+# Dependent crate licenses
+LICENSE+=" Apache-2.0 BSD-2 BSD MIT MPL-2.0 Unicode-3.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="+lefthk syslog systemd x11rb"
+
+DEPEND="
+ x11-apps/xrandr
+ x11-libs/libX11
+ x11-libs/libXinerama
+"
+RDEPEND="${DEPEND}"
+
+QA_FLAGS_IGNORED="usr/bin/.*"
+
+src_configure() {
+ local myfeatures=(
+ $(usev lefthk)
+ $(usev systemd journald-log)
+ $(usev syslog sys-log)
+ $(usev x11rb)
+ leftwm-watchdog
+ xlib
+ )
+ cargo_src_configure --no-default-features
+}
+
+src_install() {
+ dodoc -r README.md CHANGELOG.md
+ doman leftwm/doc/leftwm.1
+
+ insinto /usr/share/xsessions
+ doins leftwm.desktop
+
+ dobin "$(cargo_target_dir)"/leftwm{,-log,-worker,-state,-check,-command}
+ use lefthk && dobin "$(cargo_target_dir)"/lefthk-worker
+}