www-client/chromium: with arm widevine support

This commit is contained in:
Jared Allard 2024-02-24 16:21:48 -08:00
parent 3491041700
commit 0b752c6392
Signed by: jaredallard
SSH key fingerprint: SHA256:wyRyyv28jBYw8Yp/oABNPUYvbGd6hyZj23XVXEm5G/U
15 changed files with 1759 additions and 0 deletions

View file

@ -0,0 +1,7 @@
DIST chromium-122-clang.tar.xz 50107164 BLAKE2B 6b07470aa9a3606d27784c4abfd1577ead70cc2c310c2db47d486a64d93d9984d9b7737493a9c30ea7e0f0868291f3aac8058ba23f81f940469d23bafa260bf1 SHA512 a46a7869bff2e5edd34167751257453fd89eae92bd5e291c4408ff0234997b04fae3df7906f46d83f72da5c4f11199489a14d8a55251d0efc3c0ffc1c56d9e22
DIST chromium-122-rust.tar.xz 140507448 BLAKE2B cb00e65a617801b59a852d921ec1600f577a5a4d16a2df37d413de5cfa9d7274fd8e54d9bf8d21a94f93230e2a27a50f55a36d65e774daf38ba08ba292f52a45 SHA512 2cec9e9a84a494babe581aa900bc76babb3ba7c4622bf050537adf234644f054426eea87c01a037dc7e5f850dec55498d45e982ae334b8d6e99a85679c8aed79
DIST chromium-122.0.6261.57.tar.xz 3413129956 BLAKE2B afaf14fa77f65758bc0caefdd61261387c9f0fcdb862ca75cbe488aac7363c707d9541eaa9f5dbbfe4de1784c1cab1a0bbc40514a02d3ac1ad86a251609c4572 SHA512 71a221999a74054a637921f3dadc95eb51ccd8fa1161db423dd70c8aff097b54a4485c9e358875f24f57537389c9a2e9b7ddc82eaee40bca4d1f4a959eb40bbf
DIST chromium-patches-122-2.tar.bz2 5038 BLAKE2B fd104a7c1d81ecb9bf82da30a71916ff3d712ae710f1de8965cd0fb7395b6dced780f3a1af1ece8201dfe388fecff7b506cbb5cc5b32621895f37bb380cdc5aa SHA512 331401d324ca4b1b90a44019ba7d823f8461188bd19864216320bd97580d835ef3151da49c71aff695159440ed2b48fcec7afc1bcbc2c0f629cbbce7d80faf74
DIST chromium-ppc64le-gentoo-patches-1.tar.xz 5636 BLAKE2B 1d898939df023c59285b27bee552470483ea06375d1ee8d6947b89c5927c23cc7bfec6b49f3b376ece931d11a56f8e2a45791e0f92ad61974fc8c34c1082d89c SHA512 8a71cb007e47cda8e5fe5d185729389e65c48bd322c8ee8b3986bee8571427b959628f2666bda646a3f89ae64197c0957d3626845ff03461dbd5dee4c964d07c
DIST chromium-profiler-0.2.tar 259952640 BLAKE2B 5e82389fce00b267280d633b26551231c558b80f0c92cd7d60271095a3503365ab673e7a46dc5f74f8a82db1f21262cb24dcc0531d954bab5fb3b175dab3394d SHA512 9fa89a5ab728419683e7495ae676567480987d68a2d589f2aa97bfcbcf123f3c8f97f8bca5f65e5e3f6e41475535add473ded83b9c7a33bb4746a9d05b298a6c
DIST chromium_121.0.6167.85-1raptor0~deb12u1.debian.tar.xz 542644 BLAKE2B 298b383b8f311c55c42b75dbaf7d14e1af52e9934a78c9c1b7d6e7d8a5e415d1ef51fc488f0205e851113ca8bb9982707c78485939438d4ddc7c14d5945b5a2c SHA512 f2a8f460d45d1a2302c7958ac1e163276779e5fb76c2efbbd631a21d84a068926dffe064a37cf605bbb34780efc16e32de24ecc729e421ac851fb142c112185a

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,24 @@
From b412032d8f94674c59056d69087f28ad7e597a22 Mon Sep 17 00:00:00 2001
From: Kevin Mihelich <kevin@archlinuxarm.org>
Date: Thu, 18 Feb 2021 19:35:58 -0700
Subject: [PATCH 1/3] widevine support for arm
---
third_party/widevine/cdm/widevine.gni | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/third_party/widevine/cdm/widevine.gni b/third_party/widevine/cdm/widevine.gni
index 45e984205885f..3cf8c290728fd 100644
--- a/third_party/widevine/cdm/widevine.gni
+++ b/third_party/widevine/cdm/widevine.gni
@@ -26,7 +26,7 @@ if (is_chromeos && !is_chromeos_device) {
library_widevine_cdm_available =
(is_chromeos &&
(target_cpu == "x64" || target_cpu == "arm" || target_cpu == "arm64")) ||
- (target_os == "linux" && target_cpu == "x64") ||
+ (target_os == "linux" && (target_cpu == "x64" || target_cpu == "arm" || target_cpu == "arm64")) ||
(target_os == "mac" && (target_cpu == "x64" || target_cpu == "arm64")) ||
(target_os == "win" &&
(target_cpu == "x86" || target_cpu == "x64" || target_cpu == "arm64"))
--
2.39.1

View file

@ -0,0 +1,76 @@
diff --git a/components/media_router/common/providers/cast/channel/enum_table.h b/components/media_router/common/providers/cast/channel/enum_table.h
index 842553a..89de703 100644
--- a/components/media_router/common/providers/cast/channel/enum_table.h
+++ b/components/media_router/common/providers/cast/channel/enum_table.h
@@ -8,6 +8,7 @@
#include <cstdint>
#include <cstring>
#include <ostream>
+#include <vector>
#include "base/check_op.h"
#include "base/notreached.h"
@@ -187,7 +188,6 @@ class
inline constexpr GenericEnumTableEntry(int32_t value);
inline constexpr GenericEnumTableEntry(int32_t value, base::StringPiece str);
- GenericEnumTableEntry(const GenericEnumTableEntry&) = delete;
GenericEnumTableEntry& operator=(const GenericEnumTableEntry&) = delete;
private:
@@ -253,7 +253,6 @@ class EnumTable {
constexpr Entry(E value, base::StringPiece str)
: GenericEnumTableEntry(static_cast<int32_t>(value), str) {}
- Entry(const Entry&) = delete;
Entry& operator=(const Entry&) = delete;
};
@@ -312,15 +311,14 @@ class EnumTable {
if (is_sorted_) {
const std::size_t index = static_cast<std::size_t>(value);
if (ANALYZER_ASSUME_TRUE(index < data_.size())) {
- const auto& entry = data_.begin()[index];
+ const auto& entry = data_[index];
if (ANALYZER_ASSUME_TRUE(entry.has_str()))
return entry.str();
}
return absl::nullopt;
}
return GenericEnumTableEntry::FindByValue(
- reinterpret_cast<const GenericEnumTableEntry*>(data_.begin()),
- data_.size(), static_cast<int32_t>(value));
+ &data_[0], data_.size(), static_cast<int32_t>(value));
}
// This overload of GetString is designed for cases where the argument is a
@@ -348,8 +346,7 @@ class EnumTable {
// enum value directly.
absl::optional<E> GetEnum(base::StringPiece str) const {
auto* entry = GenericEnumTableEntry::FindByString(
- reinterpret_cast<const GenericEnumTableEntry*>(data_.begin()),
- data_.size(), str);
+ &data_[0], data_.size(), str);
return entry ? static_cast<E>(entry->value) : absl::optional<E>();
}
@@ -364,7 +361,7 @@ class EnumTable {
// Align the data on a cache line boundary.
alignas(64)
#endif
- std::initializer_list<Entry> data_;
+ const std::vector<Entry> data_;
bool is_sorted_;
constexpr EnumTable(std::initializer_list<Entry> data, bool is_sorted)
@@ -376,8 +373,8 @@ class EnumTable {
for (std::size_t i = 0; i < data.size(); i++) {
for (std::size_t j = i + 1; j < data.size(); j++) {
- const Entry& ei = data.begin()[i];
- const Entry& ej = data.begin()[j];
+ const Entry& ei = data[i];
+ const Entry& ej = data[j];
DCHECK(ei.value != ej.value)
<< "Found duplicate enum values at indices " << i << " and " << j;
DCHECK(!(ei.has_str() && ej.has_str() && ei.str() == ej.str()))

View file

@ -0,0 +1,10 @@
--- a/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_readonly_mem_file.cc
+++ b/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_readonly_mem_file.cc
@@ -19,7 +19,6 @@ limitations under the License.
#include <cstdio>
#include "absl/strings/string_view.h" // from @com_google_absl
-#include "third_party/zlib/contrib/minizip/ioapi.h"
namespace tflite {
namespace metadata {

View file

@ -0,0 +1,25 @@
https://chromium-review.googlesource.com/c/chromium/src/+/2959890
--- a/ui/views/animation/ink_drop_host.h
+++ b/ui/views/animation/ink_drop_host.h
@@ -238,6 +238,11 @@ class VIEWS_EXPORT InkDropHost {
// Used to observe View and inform the InkDrop of host-transform changes.
ViewLayerTransformObserver host_view_transform_observer_;
+ // Declared before |ink_drop_|, because InkDropImpl may call
+ // RemoveInkDropLayer on partly destructed InkDropHost. In
+ // that case |ink_drop_mask_| must be still valid.
+ std::unique_ptr<views::InkDropMask> ink_drop_mask_;
+
// Should not be accessed directly. Use GetInkDrop() instead.
std::unique_ptr<InkDrop> ink_drop_;
@@ -261,8 +266,6 @@ class VIEWS_EXPORT InkDropHost {
int ink_drop_small_corner_radius_ = 2;
int ink_drop_large_corner_radius_ = 4;
- std::unique_ptr<views::InkDropMask> ink_drop_mask_;
-
base::RepeatingCallback<std::unique_ptr<InkDrop>()> create_ink_drop_callback_;
base::RepeatingCallback<std::unique_ptr<InkDropRipple>()>
create_ink_drop_ripple_callback_;

View file

@ -0,0 +1,46 @@
From ae3ae3711784865bdc38bf119a6182a7b8dae91c Mon Sep 17 00:00:00 2001
From: Matt Jolly <Matt.Jolly@footclan.ninja>
Date: Sun, 17 Sep 2023 16:51:42 +1000
Subject: [PATCH] Add system-zstd
--- a/build/linux/unbundle/replace_gn_files.py
+++ b/build/linux/unbundle/replace_gn_files.py
@@ -74,6 +74,7 @@ REPLACEMENTS = {
#
'woff2': 'third_party/woff2/BUILD.gn',
'zlib': 'third_party/zlib/BUILD.gn',
+ 'zstd': 'third_party/zstd/BUILD.gn',
}
--- /dev/null
+++ b/build/linux/unbundle/zstd.gn
@@ -0,0 +1,25 @@
+import("//build/config/linux/pkg_config.gni")
+import("//build/shim_headers.gni")
+
+pkg_config("system_zstd") {
+ packages = [ "libzstd" ]
+}
+
+shim_headers("zstd_shim") {
+ root_path = "src/lib"
+ headers = [
+ "zdict.h",
+ "zstd.h",
+ "zstd_errors.h",
+ ]
+}
+
+source_set("zstd") {
+ deps = [ ":zstd_shim" ]
+ public_configs = [ ":system_zstd" ]
+}
+
+source_set("decompress") {
+ deps = [ ":zstd_shim" ]
+ public_configs = [ ":system_zstd" ]
+}
--
2.42.0

View file

@ -0,0 +1,23 @@
clang-16 does not get the types for an aggregate right and fails with narrowing error
--- a/third_party/zlib/google/zip_internal.cc
+++ b/third_party/zlib/google/zip_internal.cc
@@ -260,13 +260,12 @@ zip_fileinfo TimeToZipFileInfo(const base::Time& file_time) {
// It assumes that dates below 1980 are in the double digit format.
// Hence the fail safe option is to leave the date unset. Some programs
// might show the unset date as 1980-0-0 which is invalid.
- zip_info.tmz_date = {
- .tm_sec = static_cast<uInt>(file_time_parts.second),
- .tm_min = static_cast<uInt>(file_time_parts.minute),
- .tm_hour = static_cast<uInt>(file_time_parts.hour),
- .tm_mday = static_cast<uInt>(file_time_parts.day_of_month),
- .tm_mon = static_cast<uInt>(file_time_parts.month - 1),
- .tm_year = static_cast<uInt>(file_time_parts.year)};
+ zip_info.tmz_date.tm_sec = static_cast<uInt>(file_time_parts.second);
+ zip_info.tmz_date.tm_min = static_cast<uInt>(file_time_parts.minute);
+ zip_info.tmz_date.tm_hour = static_cast<uInt>(file_time_parts.hour);
+ zip_info.tmz_date.tm_mday = static_cast<uInt>(file_time_parts.day_of_month);
+ zip_info.tmz_date.tm_mon = static_cast<uInt>(file_time_parts.month - 1);
+ zip_info.tmz_date.tm_year = static_cast<uInt>(file_time_parts.year);
}
return zip_info;

View file

@ -0,0 +1,21 @@
https://bugs.gentoo.org/917645
(copied patch from qtwebengine:6 - https://bugs.gentoo.org/917633)
Quick fix for a static_assert failure with icu74. Still waiting
for a proper upstream fix and unknown if entirely right, but is
an extension of [1] (is now 48 rather than 43).
[1] https://crrev.com/e60b571faa3f14dd9119a6792dccf12f8bf80192
--- a/third_party/blink/renderer/platform/text/text_break_iterator.cc
+++ b/third_party/blink/renderer/platform/text/text_break_iterator.cc
@@ -161,7 +161,9 @@ static const unsigned char kAsciiLineBreakTable[][(kAsciiLineBreakTableLastChar
};
// clang-format on
-#if U_ICU_VERSION_MAJOR_NUM >= 58
+#if U_ICU_VERSION_MAJOR_NUM >= 74
+#define BA_LB_COUNT (U_LB_COUNT - 8)
+#elif U_ICU_VERSION_MAJOR_NUM >= 58
#define BA_LB_COUNT (U_LB_COUNT - 3)
#else
#define BA_LB_COUNT U_LB_COUNT

View file

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE default-apps SYSTEM "gnome-da-list.dtd">
<default-apps>
<web-browsers>
<web-browser>
<name>Chromium</name>
<executable>chromium-browser</executable>
<command>chromium-browser %s</command>
<icon-name>chromium-browser</icon-name>
<run-in-terminal>false</run-in-terminal>
</web-browser>
</web-browsers>
</default-apps>

View file

@ -0,0 +1,12 @@
--- a/build/toolchain/linux/unbundle/BUILD.gn
+++ b/build/toolchain/linux/unbundle/BUILD.gn
@@ -35,7 +35,7 @@ gcc_toolchain("host") {
extra_ldflags = getenv("BUILD_LDFLAGS")
toolchain_args = {
- current_cpu = current_cpu
- current_os = current_os
+ current_cpu = host_cpu
+ current_os = host_os
}
}

View file

@ -0,0 +1,59 @@
#!/bin/bash
# Allow the user to override command-line flags, bug #357629.
# This is based on Debian's chromium-browser package, and is intended
# to be consistent with Debian.
for f in /etc/chromium/*; do
[[ -f ${f} ]] && source "${f}"
done
# Prefer user defined CHROMIUM_USER_FLAGS (from env) over system
# default CHROMIUM_FLAGS (from /etc/chromium/default).
CHROMIUM_FLAGS=${CHROMIUM_USER_FLAGS:-"$CHROMIUM_FLAGS"}
# Let the wrapped binary know that it has been run through the wrapper
export CHROME_WRAPPER=$(readlink -f "$0")
PROGDIR=${CHROME_WRAPPER%/*}
case ":$PATH:" in
*:$PROGDIR:*)
# $PATH already contains $PROGDIR
;;
*)
# Append $PROGDIR to $PATH
export PATH="$PATH:$PROGDIR"
;;
esac
if [[ ${EUID} == 0 && -O ${XDG_CONFIG_HOME:-${HOME}} ]]; then
# Running as root with HOME owned by root.
# Pass --user-data-dir to work around upstream failsafe.
CHROMIUM_FLAGS="--user-data-dir=${XDG_CONFIG_HOME:-${HOME}/.config}/chromium
${CHROMIUM_FLAGS}"
fi
# Select session type and platform
if @@OZONE_AUTO_SESSION@@; then
platform=
if [[ ${XDG_SESSION_TYPE} == x11 ]]; then
platform=x11
elif [[ ${XDG_SESSION_TYPE} == wayland ]]; then
platform=wayland
else
if [[ -n ${WAYLAND_DISPLAY} ]]; then
platform=wayland
else
platform=x11
fi
fi
if ${DISABLE_OZONE_PLATFORM:-false}; then
platform=x11
fi
CHROMIUM_FLAGS="--ozone-platform=${platform} ${CHROMIUM_FLAGS}"
fi
# Set the .desktop file name
export CHROME_DESKTOP="chromium-browser-chromium.desktop"
exec -a "chromium-browser" "$PROGDIR/chrome" --extra-plugin-dir=/usr/lib/nsbrowser/plugins ${CHROMIUM_FLAGS} "$@"

View file

@ -0,0 +1,17 @@
diff -upr chromium-89.0.4389.58.orig/google_apis/google_api_keys.cc chromium-89.0.4389.58/google_apis/google_api_keys.cc
--- chromium-89.0.4389.58.orig/google_apis/google_api_keys.cc 2021-02-24 22:37:18.494007649 +0000
+++ chromium-89.0.4389.58/google_apis/google_api_keys.cc 2021-02-24 22:35:00.865777600 +0000
@@ -154,11 +154,11 @@ class APIKeyCache {
std::string default_client_id = CalculateKeyValue(
GOOGLE_DEFAULT_CLIENT_ID,
- STRINGIZE_NO_EXPANSION(GOOGLE_DEFAULT_CLIENT_ID), nullptr,
+ STRINGIZE_NO_EXPANSION(GOOGLE_DEFAULT_CLIENT_ID), ::switches::kOAuth2ClientID,
std::string(), environment.get(), command_line, gaia_config);
std::string default_client_secret = CalculateKeyValue(
GOOGLE_DEFAULT_CLIENT_SECRET,
- STRINGIZE_NO_EXPANSION(GOOGLE_DEFAULT_CLIENT_SECRET), nullptr,
+ STRINGIZE_NO_EXPANSION(GOOGLE_DEFAULT_CLIENT_SECRET), ::switches::kOAuth2ClientSecret,
std::string(), environment.get(), command_line, gaia_config);
// We currently only allow overriding the baked-in values for the

View file

@ -0,0 +1,5 @@
# Default settings for chromium. This file is sourced by /bin/bash from
# the chromium launcher.
# Options to pass to chromium.
#CHROMIUM_FLAGS=""

View file

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>chromium@gentoo.org</email>
<name>Chromium in Gentoo Project</name>
</maintainer>
<maintainer type="person">
<email>kangie@gentoo.org</email>
<name>Matt Jolly</name>
</maintainer>
<use>
<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="gtk4">Build with GTK4 headers.</flag>
<flag name="headless">Build Ozone only with headless backend, NOT RECOMMENDED for general use.</flag>
<flag name="hangouts">Enable support for Google Hangouts features such as screen sharing</flag>
<flag name="libcxx">Use bundled libc++ instead of libstdc++ for building.</flag>
<flag name="lto">Build with Link Time Optimizations (via clang's ThinLTO)</flag>
<flag name="official">Enable Official build instead of Developer build.</flag>
<flag name="pax-kernel">Allow building on a PaX-enabled kernel</flag>
<flag name="pgo">Build with Profile Guided Optimizations (2-stage compilation)</flag>
<flag name="proprietary-codecs">Enable codecs for patent-encumbered audio and video formats.</flag>
<flag name="system-harfbuzz">Use system <pkg>media-libs/harfbuzz</pkg> instead of the bundled library.</flag>
<flag name="system-icu">Use system <pkg>dev-libs/icu</pkg> instead of the bundled one</flag>
<flag name="system-png">Use system <pkg>media-libs/libpng</pkg> instead of the bundled library</flag>
<flag name="system-toolchain">Use system toolchain instead of the bundled one (if possible)</flag>
<flag name="system-zstd">Use system <pkg>app-arch/zstd</pkg> instead of the bundled one.</flag>
<flag name="widevine">Unsupported closed-source DRM capability (required by Netflix VOD)</flag>
</use>
<upstream>
<remote-id type="github">chromium/chromium</remote-id>
<remote-id type="gitlab">Matt.Jolly/chromium-patches</remote-id>
</upstream>
</pkgmetadata>