Skip to content

Commit

Permalink
www-client/ungoogled-chromium: cromite
Browse files Browse the repository at this point in the history
  • Loading branch information
PF4Public committed Jan 27, 2024
1 parent 40730b3 commit c0a86fc
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 19 deletions.
1 change: 1 addition & 0 deletions www-client/ungoogled-chromium/Manifest
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ DIST chromium-patches-120.tar.bz2 8630 BLAKE2B aa815521d027036757e5316478c2974e1
DIST chromium-patches-121.tar.bz2 5861 BLAKE2B 450591b24933f8bd194865960dcb33dbcf4b560dfe384436ad26d780c6f815b615d419fcaf4b3507cf1ced5c0ab6be9381a5101d1ff1441a3a9425911560c07a SHA512 12f356ae5deafa553b9a709eb72ee7f761fd3f0bd36b9c7542433bbe7825e3dc98ba6639ca8be7fcd766df52c3b77c629c84da545351f5089d7c10343da45f48
DIST chromium-ppc64le-gentoo-patches-1.tar.xz 5636 BLAKE2B 1d898939df023c59285b27bee552470483ea06375d1ee8d6947b89c5927c23cc7bfec6b49f3b376ece931d11a56f8e2a45791e0f92ad61974fc8c34c1082d89c SHA512 8a71cb007e47cda8e5fe5d185729389e65c48bd322c8ee8b3986bee8571427b959628f2666bda646a3f89ae64197c0957d3626845ff03461dbd5dee4c964d07c
DIST chromium_118.0.5993.70-1raptor0~deb11u1.debian.tar.xz 1677024 BLAKE2B 82cdbb1c30ae333e0a821ca15fbdda902ea31c5072c3e70372dc6fbadf6837e8445c33e741f3820c0d174a91d90c3bd05e8d9aaad988c2605028a46e138e4279 SHA512 86da39eef033a51e9abb0fc096ea4688a4a956b675fee92d3ae0ca165d6ca406807320d6e03785e0f11cc98c49b860500387e75b6b4d4aa9a8d94c04c001ac39
DIST cromite-a2939070ae135da07dc1d3730f20a5b5dd68481c.tar.gz 39441567 BLAKE2B b73681dec3acb0625295dd0837fd4c4067543679010cdcb4cc715a8f9e8a6aa7ce9bc2430d4a2300333842c3e8ba451e736b9f843968c3953c791e5fa7ea718a SHA512 724b0bf829f700e60eb231baaea41cf401a7b5b24eb597e31dd4192d4c5b04423a8e1c5ecfe976d8c3a3439d5ee49471f494880e6aca1690bd70e86779727308
DIST cromite-dcbb3d0a3ba13fc2dcf1538fb5bdd2071c66234b.tar.gz 15333850 BLAKE2B 282afea4385ffd284187e2bbcc901174efd7b6e05076b2fa70446a480285b6968b09676fbb611e1128ea034780e8d98306fd5127bd17d0cac51695d3090b46e7 SHA512 37a711a255aae63384b43dc1c4f60612f7c35156fcc1b4d16334dc43f274c77d7a5a4b416e3cccbe279aff775122b05064aa7e41b752bb98c6b9bfc3bba72da0
DIST ungoogled-chromium-0d41e31bb75e6171a36f4797d3719fe7a99ceae7.tar.gz 665361 BLAKE2B 08b6e07f68fd0ffc56a163d7b7da3667a5069e8f29af05d0f314ece7a4043895308aa708b225a07c043423e3b9ef0cc998005d193122ab1a8f4e64760e38bec7 SHA512 a5c511c9c4a050202ab2b0a8e5fd4793da88dfabbaa3038a8f3ffd487ec3af307743a550e899a02716a76cc7ba1aaaf1cbf13b183154267100e3d0e41835c2df
DIST ungoogled-chromium-119.0.6045.199-1.tar.gz 660433 BLAKE2B 3461195e2af7d8d05d3f6fec5047d30beeec4183169a11cec406c3e82ca4ff63a6b5b0068d996f3c310692b0197fa3ef6d8be14c4accfc51d0cbfd7c708ae74b SHA512 a4bfe96dd38f544af26d27a56ff9a4ac55fcc8029f098c627d00a5f0960d73163d82af17ae470042a92d3d8daa939402210061cf4edbfa94d444cc29055e3b0a
Expand Down
1 change: 1 addition & 0 deletions www-client/ungoogled-chromium/metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
<flag name="cfi">Build with CFI (Control Flow Integrity) enabled. It requires "-stdlib=libc++", see #40 for more details.</flag>
<flag name="clang">Use Clang compiler instead of GCC</flag>
<flag name="convert-dict">Patch and build the convert_dict utility. The script will be installed into /usr/lib64/chromium-browser/update-dicts.sh. More info here: https://github.com/ungoogled-software/ungoogled-chromium/issues/188#issuecomment-444752907</flag>
<flag name="cromite">Apply also select patches from Cromite. Highly experimental! Please consider Cromite licensing terms when deciding if you're allowed to distribute binaries built with these patches.</flag>
<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="gtk4">Build with GTK4 headers</flag>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ SRC_URI="https://commondatastorage.googleapis.com/chromium-browser-official/chro
)
"

LICENSE="BSD uazo-bromite? ( GPL-3 )"
LICENSE="BSD cromite? ( GPL-3 )"
SLOT="0"
KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
IUSE_SYSTEM_LIBS="abseil-cpp av1 brotli crc32c double-conversion ffmpeg +harfbuzz +icu +jsoncpp +libevent +libusb libvpx +openh264 openjpeg +png re2 +snappy woff2 +zstd"
IUSE="+X bluetooth cfi +clang convert-dict cups cpu_flags_arm_neon custom-cflags debug enable-driver gtk4 hangouts headless hevc kerberos nvidia +official optimize-thinlto optimize-webui override-data-dir pax-kernel pgo +proprietary-codecs pulseaudio qt5 qt6 screencast selinux thinlto uazo-bromite vaapi wayland widevine"
IUSE="+X bluetooth cfi +clang convert-dict cups cpu_flags_arm_neon custom-cflags debug enable-driver gtk4 hangouts headless hevc kerberos nvidia +official optimize-thinlto optimize-webui override-data-dir pax-kernel pgo +proprietary-codecs pulseaudio qt5 qt6 screencast selinux thinlto cromite vaapi wayland widevine"
RESTRICT="
!system-ffmpeg? ( proprietary-codecs? ( bindist ) )
!system-openh264? ( bindist )
uazo-bromite? ( bindist )
cromite? ( bindist )
"
REQUIRED_USE="
thinlto? ( clang )
Expand All @@ -62,7 +62,7 @@ REQUIRED_USE="
# 5794e9d12bf82620d5f24505798fecb45ca5a22d
# )

UAZO_BROMITE_COMMIT_ID="dcbb3d0a3ba13fc2dcf1538fb5bdd2071c66234b"
CROMITE_COMMIT_ID="a2939070ae135da07dc1d3730f20a5b5dd68481c"

CHROMIUM_COMMITS=(
ea4397ee3a3b7b324eb1ef8c90c877ef9db226df
Expand Down Expand Up @@ -97,7 +97,7 @@ if [ ! -z "${CHROMIUM_COMMITS[*]}" ]; then
done
fi

SRC_URI+="uazo-bromite? ( https://github.com/uazo/cromite/archive/${UAZO_BROMITE_COMMIT_ID}.tar.gz -> cromite-${UAZO_BROMITE_COMMIT_ID}.tar.gz )
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
Expand Down Expand Up @@ -338,9 +338,9 @@ pkg_pretend() {
ewarn "Make sure all dependencies are also built this way, see #40"
ewarn
fi
if use uazo-bromite; then
if use cromite; then
ewarn
ewarn "uazo-bromite patches are very experimental and unstable"
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 any other are worthy of inclusion"
Expand Down Expand Up @@ -428,11 +428,11 @@ src_prepare() {
PATCHES+=( "${FILESDIR}/chromium-120-autofill-clang.patch" )
fi

if use uazo-bromite ; then
BR_PA_PATH="${WORKDIR}/cromite-${UAZO_BROMITE_COMMIT_ID}/build/patches"
if use cromite ; then
BR_PA_PATH="${WORKDIR}/cromite-${CROMITE_COMMIT_ID}/build/patches"

#! conflicting patches
sed -i '/kMediaFoundationClearKeyCdmPathForTesting/,+8d' "${BR_PA_PATH}/00Disable-speechSynthesis-getVoices-API.patch" || die
# #! conflicting patches
# sed -i '/kMediaFoundationClearKeyCdmPathForTesting/,+8d' "${BR_PA_PATH}/00Disable-speechSynthesis-getVoices-API.patch" || die

BROMITE_PATCHES=(
"${BR_PA_PATH}/Battery-API-return-nothing.patch"
Expand All @@ -450,7 +450,7 @@ src_prepare() {
"${BR_PA_PATH}/Remove-navigator.connection-info.patch"

"${BR_PA_PATH}/AudioBuffer-AnalyserNode-fp-mitigations.patch"
"${BR_PA_PATH}/00Fonts-fingerprinting-mitigation.patch"
"${BR_PA_PATH}/Fonts-fingerprinting-mitigation.patch"

"${BR_PA_PATH}/bromite-build-utils.patch"
"${BR_PA_PATH}/Content-settings-infrastructure.patch"
Expand All @@ -462,10 +462,10 @@ src_prepare() {
"${BR_PA_PATH}/Viewport-Protection-flag.patch"
"${BR_PA_PATH}/Viewport-Protection-Site-Setting.patch"
"${BR_PA_PATH}/Timezone-customization.patch"
"${BR_PA_PATH}/00Disable-speechSynthesis-getVoices-API.patch"
"${BR_PA_PATH}/00Remove-support-for-device-memory-and-cpu-recovery.patch"
"${BR_PA_PATH}/00Disable-Feeback-Collector.patch"
"${BR_PA_PATH}/00Disable-remote-altsvc-for-h3-connections.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"
)
for i in "${BROMITE_PATCHES[@]}"; do
if [[ "$i" =~ "Add-autoplay-site-setting.patch" ]] ||
Expand Down Expand Up @@ -549,8 +549,8 @@ src_prepare() {
extra/debian/gn/parallel
)

if use uazo-bromite ; then
einfo "Using bromite fingerprinting patches instead"
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
Expand Down Expand Up @@ -922,7 +922,7 @@ src_prepare() {
if use arm64 || use ppc64 ; then
keeplibs+=( third_party/swiftshader/third_party/llvm-10.0 )
fi
if use uazo-bromite ; then
if use cromite ; then
keeplibs+=( third_party/ungoogled )
fi
# we need to generate ppc64 stuff because upstream does not ship it yet
Expand Down

0 comments on commit c0a86fc

Please sign in to comment.