[arch-commits] Commit in chromium/repos/extra-x86_64 (14 files)
Evangelos Foutras
foutrelis at gemini.archlinux.org
Sat Mar 26 06:50:19 UTC 2022
Date: Saturday, March 26, 2022 @ 06:50:19
Author: foutrelis
Revision: 440685
archrelease: copy trunk to extra-x86_64
Added:
chromium/repos/extra-x86_64/PKGBUILD
(from rev 440684, chromium/trunk/PKGBUILD)
chromium/repos/extra-x86_64/fix-build-break-with-system-libdrm.patch
(from rev 440684, chromium/trunk/fix-build-break-with-system-libdrm.patch)
chromium/repos/extra-x86_64/sandbox-build-if-glibc-2.34-dynamic-stack-size-is-en.patch
(from rev 440684, chromium/trunk/sandbox-build-if-glibc-2.34-dynamic-stack-size-is-en.patch)
chromium/repos/extra-x86_64/sql-make-VirtualCursor-standard-layout-type.patch
(from rev 440684, chromium/trunk/sql-make-VirtualCursor-standard-layout-type.patch)
chromium/repos/extra-x86_64/use-FT_Done_MM_Var-in-CFX_Font-AdjustMMParams.patch
(from rev 440684, chromium/trunk/use-FT_Done_MM_Var-in-CFX_Font-AdjustMMParams.patch)
chromium/repos/extra-x86_64/use-oauth2-client-switches-as-default.patch
(from rev 440684, chromium/trunk/use-oauth2-client-switches-as-default.patch)
chromium/repos/extra-x86_64/webcodecs-stop-using-AudioOpusEncoder.patch
(from rev 440684, chromium/trunk/webcodecs-stop-using-AudioOpusEncoder.patch)
Deleted:
chromium/repos/extra-x86_64/PKGBUILD
chromium/repos/extra-x86_64/fix-build-break-with-system-libdrm.patch
chromium/repos/extra-x86_64/sandbox-build-if-glibc-2.34-dynamic-stack-size-is-en.patch
chromium/repos/extra-x86_64/sql-make-VirtualCursor-standard-layout-type.patch
chromium/repos/extra-x86_64/use-FT_Done_MM_Var-in-CFX_Font-AdjustMMParams.patch
chromium/repos/extra-x86_64/use-oauth2-client-switches-as-default.patch
chromium/repos/extra-x86_64/webcodecs-stop-using-AudioOpusEncoder.patch
------------------------------------------------------------+
PKGBUILD | 534 +++++------
fix-build-break-with-system-libdrm.patch | 124 +-
sandbox-build-if-glibc-2.34-dynamic-stack-size-is-en.patch | 78 -
sql-make-VirtualCursor-standard-layout-type.patch | 476 ++++-----
use-FT_Done_MM_Var-in-CFX_Font-AdjustMMParams.patch | 142 +-
use-oauth2-client-switches-as-default.patch | 34
webcodecs-stop-using-AudioOpusEncoder.patch | 98 +-
7 files changed, 743 insertions(+), 743 deletions(-)
Deleted: PKGBUILD
===================================================================
--- PKGBUILD 2022-03-26 06:50:08 UTC (rev 440684)
+++ PKGBUILD 2022-03-26 06:50:19 UTC (rev 440685)
@@ -1,267 +0,0 @@
-# Maintainer: Evangelos Foutras <evangelos at foutrelis.com>
-# Contributor: Pierre Schmitz <pierre at archlinux.de>
-# Contributor: Jan "heftig" Steffens <jan.steffens at gmail.com>
-# Contributor: Daniel J Griffiths <ghost1227 at archlinux.us>
-
-pkgname=chromium
-pkgver=99.0.4844.82
-pkgrel=1
-_launcher_ver=8
-_gcc_patchset=3
-pkgdesc="A web browser built for speed, simplicity, and security"
-arch=('x86_64')
-url="https://www.chromium.org/Home"
-license=('BSD')
-depends=('gtk3' 'nss' 'alsa-lib' 'xdg-utils' 'libxss' 'libcups' 'libgcrypt'
- 'ttf-liberation' 'systemd' 'dbus' 'libpulse' 'pciutils' 'libva'
- 'desktop-file-utils' 'hicolor-icon-theme')
-makedepends=('python' 'gn' 'ninja' 'clang' 'lld' 'gperf' 'nodejs' 'pipewire'
- 'java-runtime-headless')
-optdepends=('pipewire: WebRTC desktop sharing under Wayland'
- 'kdialog: support for native dialogs in Plasma'
- 'org.freedesktop.secrets: password storage backend on GNOME / Xfce'
- 'kwallet: support for storing passwords in KWallet on Plasma')
-options=('debug' '!lto') # Chromium adds its own flags for ThinLTO
-source=(https://commondatastorage.googleapis.com/chromium-browser-official/$pkgname-$pkgver.tar.xz
- https://github.com/foutrelis/chromium-launcher/archive/v$_launcher_ver/chromium-launcher-$_launcher_ver.tar.gz
- https://github.com/stha09/chromium-patches/releases/download/chromium-${pkgver%%.*}-patchset-$_gcc_patchset/chromium-${pkgver%%.*}-patchset-$_gcc_patchset.tar.xz
- fix-build-break-with-system-libdrm.patch
- sandbox-build-if-glibc-2.34-dynamic-stack-size-is-en.patch
- webcodecs-stop-using-AudioOpusEncoder.patch
- use-FT_Done_MM_Var-in-CFX_Font-AdjustMMParams.patch
- sql-make-VirtualCursor-standard-layout-type.patch
- use-oauth2-client-switches-as-default.patch)
-sha256sums=('b8bb0bc1410de8b9d98889c79410726a4e78801d4e54ea23b23b7b4015c7d25c'
- '213e50f48b67feb4441078d50b0fd431df34323be15be97c55302d3fdac4483a'
- '9cd2570e92e9bfeff3faf0d5b56334535cb2313f99ab0d9019b74d18ae1c7d0a'
- 'edf4d973ff197409d319bb6fbbaa529e53bc62347d26b0733c45a116a1b23f37'
- 'f910be9370c880de6e1d61cc30383c069e421d7acf406166e4fbfad324fc7d61'
- '064daaa2b9d95b96ec04d8ddebf4af441f92263d123365b58fe73966866080af'
- '34bcb151c0bc51ada5aa7beda6e87356e0eaafa83a621e11e5803717adc39ffc'
- 'b94b2e88f63cfb7087486508b8139599c89f96d7a4181c61fec4b4e250ca327a'
- 'e393174d7695d0bafed69e868c5fbfecf07aa6969f3b64596d0bae8b067e1711')
-
-# Possible replacements are listed in build/linux/unbundle/replace_gn_files.py
-# Keys are the names in the above script; values are the dependencies in Arch
-declare -gA _system_libs=(
- [ffmpeg]=ffmpeg
- [flac]=flac
- [fontconfig]=fontconfig
- [freetype]=freetype2
- [harfbuzz-ng]=harfbuzz
- [icu]=icu
- [libdrm]=
- [libjpeg]=libjpeg
- [libpng]=libpng
- #[libvpx]=libvpx
- [libwebp]=libwebp
- [libxml]=libxml2
- [libxslt]=libxslt
- [opus]=opus
- [re2]=re2
- [snappy]=snappy
- [zlib]=minizip
-)
-_unwanted_bundled_libs=(
- $(printf "%s\n" ${!_system_libs[@]} | sed 's/^libjpeg$/&_turbo/')
-)
-depends+=(${_system_libs[@]})
-
-# Google API keys (see https://www.chromium.org/developers/how-tos/api-keys)
-# Note: These are for Arch Linux use ONLY. For your own distribution, please
-# get your own set of keys.
-#
-# Starting with Chromium 89 (2021-03-02) the OAuth2 credentials have been left
-# out: https://archlinux.org/news/chromium-losing-sync-support-in-early-march/
-_google_api_key=AIzaSyDwr302FpOSkGRpLlUpPThNTDPbXcIn_FM
-
-prepare() {
- cd "$srcdir/$pkgname-$pkgver"
-
- # Allow building against system libraries in official builds
- sed -i 's/OFFICIAL_BUILD/GOOGLE_CHROME_BUILD/' \
- tools/generate_shim_headers/generate_shim_headers.py
-
- # https://crbug.com/893950
- sed -i -e 's/\<xmlMalloc\>/malloc/' -e 's/\<xmlFree\>/free/' \
- third_party/blink/renderer/core/xml/*.cc \
- third_party/blink/renderer/core/xml/parser/xml_document_parser.cc \
- third_party/libxml/chromium/*.cc \
- third_party/maldoca/src/maldoca/ole/oss_utils.h
-
- # Use the --oauth2-client-id= and --oauth2-client-secret= switches for
- # setting GOOGLE_DEFAULT_CLIENT_ID and GOOGLE_DEFAULT_CLIENT_SECRET at
- # runtime -- this allows signing into Chromium without baked-in values
- patch -Np1 -i ../use-oauth2-client-switches-as-default.patch
-
- # Upstream fixes
- patch -Np1 -i ../fix-build-break-with-system-libdrm.patch
- patch -Np1 -i ../sandbox-build-if-glibc-2.34-dynamic-stack-size-is-en.patch
- patch -Np1 -i ../webcodecs-stop-using-AudioOpusEncoder.patch
- patch -Np1 -d third_party/pdfium <../use-FT_Done_MM_Var-in-CFX_Font-AdjustMMParams.patch
-
- # https://chromium-review.googlesource.com/c/chromium/src/+/2862724
- patch -Np1 -i ../sql-make-VirtualCursor-standard-layout-type.patch
-
- # Fixes for building with libstdc++ instead of libc++
- #patch -Np1 -i ../patches/
-
- # Link to system tools required by the build
- mkdir -p third_party/node/linux/node-linux-x64/bin
- ln -s /usr/bin/node third_party/node/linux/node-linux-x64/bin/
- ln -s /usr/bin/java third_party/jdk/current/bin/
-
- # Remove bundled libraries for which we will use the system copies; this
- # *should* do what the remove_bundled_libraries.py script does, with the
- # added benefit of not having to list all the remaining libraries
- local _lib
- for _lib in ${_unwanted_bundled_libs[@]}; do
- find "third_party/$_lib" -type f \
- \! -path "third_party/$_lib/chromium/*" \
- \! -path "third_party/$_lib/google/*" \
- \! -path "third_party/harfbuzz-ng/utils/hb_scoped.h" \
- \! -regex '.*\.\(gn\|gni\|isolate\)' \
- -delete
- done
-
- ./build/linux/unbundle/replace_gn_files.py \
- --system-libraries "${!_system_libs[@]}"
-}
-
-build() {
- make -C chromium-launcher-$_launcher_ver
-
- cd "$srcdir/$pkgname-$pkgver"
-
- export CC=clang
- export CXX=clang++
- export AR=ar
- export NM=nm
-
- local _flags=(
- 'custom_toolchain="//build/toolchain/linux/unbundle:default"'
- 'host_toolchain="//build/toolchain/linux/unbundle:default"'
- 'clang_use_chrome_plugins=false'
- 'is_official_build=true' # implies is_cfi=true on x86_64
- 'symbol_level=0' # sufficient for backtraces on x86(_64)
- 'treat_warnings_as_errors=false'
- 'disable_fieldtrial_testing_config=true'
- 'blink_enable_generated_code_formatting=false'
- 'ffmpeg_branding="Chrome"'
- 'proprietary_codecs=true'
- 'rtc_use_pipewire=true'
- 'link_pulseaudio=true'
- 'use_gnome_keyring=false'
- 'use_sysroot=false'
- 'use_custom_libcxx=false'
- 'enable_hangout_services_extension=true'
- 'enable_widevine=true'
- 'enable_nacl=false'
- "google_api_key=\"$_google_api_key\""
- )
-
- if [[ -n ${_system_libs[icu]+set} ]]; then
- _flags+=('icu_use_data_file=false')
- fi
-
- # Facilitate deterministic builds (taken from build/config/compiler/BUILD.gn)
- CFLAGS+=' -Wno-builtin-macro-redefined'
- CXXFLAGS+=' -Wno-builtin-macro-redefined'
- CPPFLAGS+=' -D__DATE__= -D__TIME__= -D__TIMESTAMP__='
-
- # Do not warn about unknown warning options
- CFLAGS+=' -Wno-unknown-warning-option'
- CXXFLAGS+=' -Wno-unknown-warning-option'
-
- # Let Chromium set its own symbol level
- CFLAGS=${CFLAGS/-g }
- CXXFLAGS=${CXXFLAGS/-g }
-
- # https://github.com/ungoogled-software/ungoogled-chromium-archlinux/issues/123
- CFLAGS=${CFLAGS/-fexceptions}
- CFLAGS=${CFLAGS/-fcf-protection}
- CXXFLAGS=${CXXFLAGS/-fexceptions}
- CXXFLAGS=${CXXFLAGS/-fcf-protection}
-
- # This appears to cause random segfaults when combined with ThinLTO
- # https://bugs.archlinux.org/task/73518
- CFLAGS=${CFLAGS/-fstack-clash-protection}
- CXXFLAGS=${CXXFLAGS/-fstack-clash-protection}
-
- # https://crbug.com/957519#c122
- CXXFLAGS=${CXXFLAGS/-Wp,-D_GLIBCXX_ASSERTIONS}
-
- gn gen out/Release --args="${_flags[*]}"
- ninja -C out/Release chrome chrome_sandbox chromedriver.unstripped
-}
-
-package() {
- cd chromium-launcher-$_launcher_ver
- make PREFIX=/usr DESTDIR="$pkgdir" install
- install -Dm644 LICENSE \
- "$pkgdir/usr/share/licenses/chromium/LICENSE.launcher"
-
- cd "$srcdir/$pkgname-$pkgver"
-
- install -D out/Release/chrome "$pkgdir/usr/lib/chromium/chromium"
- install -D out/Release/chromedriver.unstripped "$pkgdir/usr/bin/chromedriver"
- install -Dm4755 out/Release/chrome_sandbox "$pkgdir/usr/lib/chromium/chrome-sandbox"
-
- install -Dm644 chrome/installer/linux/common/desktop.template \
- "$pkgdir/usr/share/applications/chromium.desktop"
- install -Dm644 chrome/app/resources/manpage.1.in \
- "$pkgdir/usr/share/man/man1/chromium.1"
- sed -i \
- -e 's/@@MENUNAME@@/Chromium/g' \
- -e 's/@@PACKAGE@@/chromium/g' \
- -e 's/@@USR_BIN_SYMLINK_NAME@@/chromium/g' \
- "$pkgdir/usr/share/applications/chromium.desktop" \
- "$pkgdir/usr/share/man/man1/chromium.1"
-
- install -Dm644 chrome/installer/linux/common/chromium-browser/chromium-browser.appdata.xml \
- "$pkgdir/usr/share/metainfo/chromium.appdata.xml"
- sed -ni \
- -e 's/chromium-browser\.desktop/chromium.desktop/' \
- -e '/<update_contact>/d' \
- -e '/<p>/N;/<p>\n.*\(We invite\|Chromium supports Vorbis\)/,/<\/p>/d' \
- -e '/^<?xml/,$p' \
- "$pkgdir/usr/share/metainfo/chromium.appdata.xml"
-
- local toplevel_files=(
- chrome_100_percent.pak
- chrome_200_percent.pak
- chrome_crashpad_handler
- resources.pak
- v8_context_snapshot.bin
-
- # ANGLE
- libEGL.so
- libGLESv2.so
-
- # SwiftShader ICD
- libvk_swiftshader.so
- vk_swiftshader_icd.json
- )
-
- if [[ -z ${_system_libs[icu]+set} ]]; then
- toplevel_files+=(icudtl.dat)
- fi
-
- cp "${toplevel_files[@]/#/out/Release/}" "$pkgdir/usr/lib/chromium/"
- install -Dm644 -t "$pkgdir/usr/lib/chromium/locales" out/Release/locales/*.pak
- install -Dm755 -t "$pkgdir/usr/lib/chromium/swiftshader" out/Release/swiftshader/*.so
-
- for size in 24 48 64 128 256; do
- install -Dm644 "chrome/app/theme/chromium/product_logo_$size.png" \
- "$pkgdir/usr/share/icons/hicolor/${size}x${size}/apps/chromium.png"
- done
-
- for size in 16 32; do
- install -Dm644 "chrome/app/theme/default_100_percent/chromium/product_logo_$size.png" \
- "$pkgdir/usr/share/icons/hicolor/${size}x${size}/apps/chromium.png"
- done
-
- install -Dm644 LICENSE "$pkgdir/usr/share/licenses/chromium/LICENSE"
-}
-
-# vim:set ts=2 sw=2 et:
Copied: chromium/repos/extra-x86_64/PKGBUILD (from rev 440684, chromium/trunk/PKGBUILD)
===================================================================
--- PKGBUILD (rev 0)
+++ PKGBUILD 2022-03-26 06:50:19 UTC (rev 440685)
@@ -0,0 +1,267 @@
+# Maintainer: Evangelos Foutras <evangelos at foutrelis.com>
+# Contributor: Pierre Schmitz <pierre at archlinux.de>
+# Contributor: Jan "heftig" Steffens <jan.steffens at gmail.com>
+# Contributor: Daniel J Griffiths <ghost1227 at archlinux.us>
+
+pkgname=chromium
+pkgver=99.0.4844.84
+pkgrel=1
+_launcher_ver=8
+_gcc_patchset=3
+pkgdesc="A web browser built for speed, simplicity, and security"
+arch=('x86_64')
+url="https://www.chromium.org/Home"
+license=('BSD')
+depends=('gtk3' 'nss' 'alsa-lib' 'xdg-utils' 'libxss' 'libcups' 'libgcrypt'
+ 'ttf-liberation' 'systemd' 'dbus' 'libpulse' 'pciutils' 'libva'
+ 'desktop-file-utils' 'hicolor-icon-theme')
+makedepends=('python' 'gn' 'ninja' 'clang' 'lld' 'gperf' 'nodejs' 'pipewire'
+ 'java-runtime-headless')
+optdepends=('pipewire: WebRTC desktop sharing under Wayland'
+ 'kdialog: support for native dialogs in Plasma'
+ 'org.freedesktop.secrets: password storage backend on GNOME / Xfce'
+ 'kwallet: support for storing passwords in KWallet on Plasma')
+options=('debug' '!lto') # Chromium adds its own flags for ThinLTO
+source=(https://commondatastorage.googleapis.com/chromium-browser-official/$pkgname-$pkgver.tar.xz
+ https://github.com/foutrelis/chromium-launcher/archive/v$_launcher_ver/chromium-launcher-$_launcher_ver.tar.gz
+ https://github.com/stha09/chromium-patches/releases/download/chromium-${pkgver%%.*}-patchset-$_gcc_patchset/chromium-${pkgver%%.*}-patchset-$_gcc_patchset.tar.xz
+ fix-build-break-with-system-libdrm.patch
+ sandbox-build-if-glibc-2.34-dynamic-stack-size-is-en.patch
+ webcodecs-stop-using-AudioOpusEncoder.patch
+ use-FT_Done_MM_Var-in-CFX_Font-AdjustMMParams.patch
+ sql-make-VirtualCursor-standard-layout-type.patch
+ use-oauth2-client-switches-as-default.patch)
+sha256sums=('20ec184ed34bdc7e660ccf6c007b2db37007de423b3a5a51698a96aa29527515'
+ '213e50f48b67feb4441078d50b0fd431df34323be15be97c55302d3fdac4483a'
+ '9cd2570e92e9bfeff3faf0d5b56334535cb2313f99ab0d9019b74d18ae1c7d0a'
+ 'edf4d973ff197409d319bb6fbbaa529e53bc62347d26b0733c45a116a1b23f37'
+ 'f910be9370c880de6e1d61cc30383c069e421d7acf406166e4fbfad324fc7d61'
+ '064daaa2b9d95b96ec04d8ddebf4af441f92263d123365b58fe73966866080af'
+ '34bcb151c0bc51ada5aa7beda6e87356e0eaafa83a621e11e5803717adc39ffc'
+ 'b94b2e88f63cfb7087486508b8139599c89f96d7a4181c61fec4b4e250ca327a'
+ 'e393174d7695d0bafed69e868c5fbfecf07aa6969f3b64596d0bae8b067e1711')
+
+# Possible replacements are listed in build/linux/unbundle/replace_gn_files.py
+# Keys are the names in the above script; values are the dependencies in Arch
+declare -gA _system_libs=(
+ [ffmpeg]=ffmpeg
+ [flac]=flac
+ [fontconfig]=fontconfig
+ [freetype]=freetype2
+ [harfbuzz-ng]=harfbuzz
+ [icu]=icu
+ [libdrm]=
+ [libjpeg]=libjpeg
+ [libpng]=libpng
+ #[libvpx]=libvpx
+ [libwebp]=libwebp
+ [libxml]=libxml2
+ [libxslt]=libxslt
+ [opus]=opus
+ [re2]=re2
+ [snappy]=snappy
+ [zlib]=minizip
+)
+_unwanted_bundled_libs=(
+ $(printf "%s\n" ${!_system_libs[@]} | sed 's/^libjpeg$/&_turbo/')
+)
+depends+=(${_system_libs[@]})
+
+# Google API keys (see https://www.chromium.org/developers/how-tos/api-keys)
+# Note: These are for Arch Linux use ONLY. For your own distribution, please
+# get your own set of keys.
+#
+# Starting with Chromium 89 (2021-03-02) the OAuth2 credentials have been left
+# out: https://archlinux.org/news/chromium-losing-sync-support-in-early-march/
+_google_api_key=AIzaSyDwr302FpOSkGRpLlUpPThNTDPbXcIn_FM
+
+prepare() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ # Allow building against system libraries in official builds
+ sed -i 's/OFFICIAL_BUILD/GOOGLE_CHROME_BUILD/' \
+ tools/generate_shim_headers/generate_shim_headers.py
+
+ # https://crbug.com/893950
+ sed -i -e 's/\<xmlMalloc\>/malloc/' -e 's/\<xmlFree\>/free/' \
+ third_party/blink/renderer/core/xml/*.cc \
+ third_party/blink/renderer/core/xml/parser/xml_document_parser.cc \
+ third_party/libxml/chromium/*.cc \
+ third_party/maldoca/src/maldoca/ole/oss_utils.h
+
+ # Use the --oauth2-client-id= and --oauth2-client-secret= switches for
+ # setting GOOGLE_DEFAULT_CLIENT_ID and GOOGLE_DEFAULT_CLIENT_SECRET at
+ # runtime -- this allows signing into Chromium without baked-in values
+ patch -Np1 -i ../use-oauth2-client-switches-as-default.patch
+
+ # Upstream fixes
+ patch -Np1 -i ../fix-build-break-with-system-libdrm.patch
+ patch -Np1 -i ../sandbox-build-if-glibc-2.34-dynamic-stack-size-is-en.patch
+ patch -Np1 -i ../webcodecs-stop-using-AudioOpusEncoder.patch
+ patch -Np1 -d third_party/pdfium <../use-FT_Done_MM_Var-in-CFX_Font-AdjustMMParams.patch
+
+ # https://chromium-review.googlesource.com/c/chromium/src/+/2862724
+ patch -Np1 -i ../sql-make-VirtualCursor-standard-layout-type.patch
+
+ # Fixes for building with libstdc++ instead of libc++
+ #patch -Np1 -i ../patches/
+
+ # Link to system tools required by the build
+ mkdir -p third_party/node/linux/node-linux-x64/bin
+ ln -s /usr/bin/node third_party/node/linux/node-linux-x64/bin/
+ ln -s /usr/bin/java third_party/jdk/current/bin/
+
+ # Remove bundled libraries for which we will use the system copies; this
+ # *should* do what the remove_bundled_libraries.py script does, with the
+ # added benefit of not having to list all the remaining libraries
+ local _lib
+ for _lib in ${_unwanted_bundled_libs[@]}; do
+ find "third_party/$_lib" -type f \
+ \! -path "third_party/$_lib/chromium/*" \
+ \! -path "third_party/$_lib/google/*" \
+ \! -path "third_party/harfbuzz-ng/utils/hb_scoped.h" \
+ \! -regex '.*\.\(gn\|gni\|isolate\)' \
+ -delete
+ done
+
+ ./build/linux/unbundle/replace_gn_files.py \
+ --system-libraries "${!_system_libs[@]}"
+}
+
+build() {
+ make -C chromium-launcher-$_launcher_ver
+
+ cd "$srcdir/$pkgname-$pkgver"
+
+ export CC=clang
+ export CXX=clang++
+ export AR=ar
+ export NM=nm
+
+ local _flags=(
+ 'custom_toolchain="//build/toolchain/linux/unbundle:default"'
+ 'host_toolchain="//build/toolchain/linux/unbundle:default"'
+ 'clang_use_chrome_plugins=false'
+ 'is_official_build=true' # implies is_cfi=true on x86_64
+ 'symbol_level=0' # sufficient for backtraces on x86(_64)
+ 'treat_warnings_as_errors=false'
+ 'disable_fieldtrial_testing_config=true'
+ 'blink_enable_generated_code_formatting=false'
+ 'ffmpeg_branding="Chrome"'
+ 'proprietary_codecs=true'
+ 'rtc_use_pipewire=true'
+ 'link_pulseaudio=true'
+ 'use_gnome_keyring=false'
+ 'use_sysroot=false'
+ 'use_custom_libcxx=false'
+ 'enable_hangout_services_extension=true'
+ 'enable_widevine=true'
+ 'enable_nacl=false'
+ "google_api_key=\"$_google_api_key\""
+ )
+
+ if [[ -n ${_system_libs[icu]+set} ]]; then
+ _flags+=('icu_use_data_file=false')
+ fi
+
+ # Facilitate deterministic builds (taken from build/config/compiler/BUILD.gn)
+ CFLAGS+=' -Wno-builtin-macro-redefined'
+ CXXFLAGS+=' -Wno-builtin-macro-redefined'
+ CPPFLAGS+=' -D__DATE__= -D__TIME__= -D__TIMESTAMP__='
+
+ # Do not warn about unknown warning options
+ CFLAGS+=' -Wno-unknown-warning-option'
+ CXXFLAGS+=' -Wno-unknown-warning-option'
+
+ # Let Chromium set its own symbol level
+ CFLAGS=${CFLAGS/-g }
+ CXXFLAGS=${CXXFLAGS/-g }
+
+ # https://github.com/ungoogled-software/ungoogled-chromium-archlinux/issues/123
+ CFLAGS=${CFLAGS/-fexceptions}
+ CFLAGS=${CFLAGS/-fcf-protection}
+ CXXFLAGS=${CXXFLAGS/-fexceptions}
+ CXXFLAGS=${CXXFLAGS/-fcf-protection}
+
+ # This appears to cause random segfaults when combined with ThinLTO
+ # https://bugs.archlinux.org/task/73518
+ CFLAGS=${CFLAGS/-fstack-clash-protection}
+ CXXFLAGS=${CXXFLAGS/-fstack-clash-protection}
+
+ # https://crbug.com/957519#c122
+ CXXFLAGS=${CXXFLAGS/-Wp,-D_GLIBCXX_ASSERTIONS}
+
+ gn gen out/Release --args="${_flags[*]}"
+ ninja -C out/Release chrome chrome_sandbox chromedriver.unstripped
+}
+
+package() {
+ cd chromium-launcher-$_launcher_ver
+ make PREFIX=/usr DESTDIR="$pkgdir" install
+ install -Dm644 LICENSE \
+ "$pkgdir/usr/share/licenses/chromium/LICENSE.launcher"
+
+ cd "$srcdir/$pkgname-$pkgver"
+
+ install -D out/Release/chrome "$pkgdir/usr/lib/chromium/chromium"
+ install -D out/Release/chromedriver.unstripped "$pkgdir/usr/bin/chromedriver"
+ install -Dm4755 out/Release/chrome_sandbox "$pkgdir/usr/lib/chromium/chrome-sandbox"
+
+ install -Dm644 chrome/installer/linux/common/desktop.template \
+ "$pkgdir/usr/share/applications/chromium.desktop"
+ install -Dm644 chrome/app/resources/manpage.1.in \
+ "$pkgdir/usr/share/man/man1/chromium.1"
+ sed -i \
+ -e 's/@@MENUNAME@@/Chromium/g' \
+ -e 's/@@PACKAGE@@/chromium/g' \
+ -e 's/@@USR_BIN_SYMLINK_NAME@@/chromium/g' \
+ "$pkgdir/usr/share/applications/chromium.desktop" \
+ "$pkgdir/usr/share/man/man1/chromium.1"
+
+ install -Dm644 chrome/installer/linux/common/chromium-browser/chromium-browser.appdata.xml \
+ "$pkgdir/usr/share/metainfo/chromium.appdata.xml"
+ sed -ni \
+ -e 's/chromium-browser\.desktop/chromium.desktop/' \
+ -e '/<update_contact>/d' \
+ -e '/<p>/N;/<p>\n.*\(We invite\|Chromium supports Vorbis\)/,/<\/p>/d' \
+ -e '/^<?xml/,$p' \
+ "$pkgdir/usr/share/metainfo/chromium.appdata.xml"
+
+ local toplevel_files=(
+ chrome_100_percent.pak
+ chrome_200_percent.pak
+ chrome_crashpad_handler
+ resources.pak
+ v8_context_snapshot.bin
+
+ # ANGLE
+ libEGL.so
+ libGLESv2.so
+
+ # SwiftShader ICD
+ libvk_swiftshader.so
+ vk_swiftshader_icd.json
+ )
+
+ if [[ -z ${_system_libs[icu]+set} ]]; then
+ toplevel_files+=(icudtl.dat)
+ fi
+
+ cp "${toplevel_files[@]/#/out/Release/}" "$pkgdir/usr/lib/chromium/"
+ install -Dm644 -t "$pkgdir/usr/lib/chromium/locales" out/Release/locales/*.pak
+ install -Dm755 -t "$pkgdir/usr/lib/chromium/swiftshader" out/Release/swiftshader/*.so
+
+ for size in 24 48 64 128 256; do
+ install -Dm644 "chrome/app/theme/chromium/product_logo_$size.png" \
+ "$pkgdir/usr/share/icons/hicolor/${size}x${size}/apps/chromium.png"
+ done
+
+ for size in 16 32; do
+ install -Dm644 "chrome/app/theme/default_100_percent/chromium/product_logo_$size.png" \
+ "$pkgdir/usr/share/icons/hicolor/${size}x${size}/apps/chromium.png"
+ done
+
+ install -Dm644 LICENSE "$pkgdir/usr/share/licenses/chromium/LICENSE"
+}
+
+# vim:set ts=2 sw=2 et:
Deleted: fix-build-break-with-system-libdrm.patch
===================================================================
--- fix-build-break-with-system-libdrm.patch 2022-03-26 06:50:08 UTC (rev 440684)
+++ fix-build-break-with-system-libdrm.patch 2022-03-26 06:50:19 UTC (rev 440685)
@@ -1,62 +0,0 @@
-From 5b287e0be8d8d8475ec6ef81b16eaa61e19db078 Mon Sep 17 00:00:00 2001
-From: "Steinar H. Gunderson" <sesse at chromium.org>
-Date: Tue, 25 Jan 2022 19:14:53 +0000
-Subject: [PATCH] Fix build break with system libdrm.
-
-This patch is submitted on behalf of Andres Salomon
-<dilinger at queued.net> (on Cc). Also adding him to src/AUTHORS
-per policy, as he has signed the CLA.
-
-Original patch:
-https://salsa.debian.org/dilinger/chromium/-/commit/2333c2fb985ac1ef3d7331776a7833d965c63302
-
-Change-Id: I18bd60e2e80f2b9181e74ee7972c3f457ab33b10
-Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3401704
-Reviewed-by: Andres Calderon Jaramillo <andrescj at chromium.org>
-Commit-Queue: Steinar H Gunderson <sesse at chromium.org>
-Auto-Submit: Steinar H Gunderson <sesse at chromium.org>
-Cr-Commit-Position: refs/heads/main@{#963119}
----
- AUTHORS | 1 +
- media/gpu/chromeos/BUILD.gn | 1 +
- media/gpu/chromeos/video_decoder_pipeline.cc | 2 +-
- 3 files changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/AUTHORS b/AUTHORS
-index 0eba3de5065..50edd3f6b38 100644
---- a/AUTHORS
-+++ b/AUTHORS
-@@ -93,6 +93,7 @@ Andreas Papacharalampous <andreas at apap04.com>
- Andrei Borza <andrei.borza at gmail.com>
- Andrei Parvu <andrei.prv at gmail.com>
- Andrei Parvu <parvu at adobe.com>
-+Andres Salomon <dilinger at queued.net>
- Andreu Botella <andreu at andreubotella.com>
- Andrew Boyarshin <andrew.boyarshin at gmail.com>
- Andrew Brampton <me at bramp.net>
-diff --git a/media/gpu/chromeos/BUILD.gn b/media/gpu/chromeos/BUILD.gn
-index 7cb4c3ea39a..6fe21c15ecc 100644
---- a/media/gpu/chromeos/BUILD.gn
-+++ b/media/gpu/chromeos/BUILD.gn
-@@ -25,6 +25,7 @@ source_set("chromeos") {
-
- deps = [
- "//base",
-+ "//build/config/linux/libdrm",
- "//media",
- "//media/gpu:buildflags",
- "//media/gpu:command_buffer_helper",
-diff --git a/media/gpu/chromeos/video_decoder_pipeline.cc b/media/gpu/chromeos/video_decoder_pipeline.cc
-index d2f154ea0d8..416b9434a8d 100644
---- a/media/gpu/chromeos/video_decoder_pipeline.cc
-+++ b/media/gpu/chromeos/video_decoder_pipeline.cc
-@@ -28,8 +28,8 @@
- #include "third_party/abseil-cpp/absl/types/optional.h"
-
- #if BUILDFLAG(USE_VAAPI)
-+#include <drm_fourcc.h>
- #include "media/gpu/vaapi/vaapi_video_decoder.h"
--#include "third_party/libdrm/src/include/drm/drm_fourcc.h"
- #elif BUILDFLAG(USE_V4L2_CODEC)
- #include "media/gpu/v4l2/v4l2_video_decoder.h"
- #else
Copied: chromium/repos/extra-x86_64/fix-build-break-with-system-libdrm.patch (from rev 440684, chromium/trunk/fix-build-break-with-system-libdrm.patch)
===================================================================
--- fix-build-break-with-system-libdrm.patch (rev 0)
+++ fix-build-break-with-system-libdrm.patch 2022-03-26 06:50:19 UTC (rev 440685)
@@ -0,0 +1,62 @@
+From 5b287e0be8d8d8475ec6ef81b16eaa61e19db078 Mon Sep 17 00:00:00 2001
+From: "Steinar H. Gunderson" <sesse at chromium.org>
+Date: Tue, 25 Jan 2022 19:14:53 +0000
+Subject: [PATCH] Fix build break with system libdrm.
+
+This patch is submitted on behalf of Andres Salomon
+<dilinger at queued.net> (on Cc). Also adding him to src/AUTHORS
+per policy, as he has signed the CLA.
+
+Original patch:
+https://salsa.debian.org/dilinger/chromium/-/commit/2333c2fb985ac1ef3d7331776a7833d965c63302
+
+Change-Id: I18bd60e2e80f2b9181e74ee7972c3f457ab33b10
+Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3401704
+Reviewed-by: Andres Calderon Jaramillo <andrescj at chromium.org>
+Commit-Queue: Steinar H Gunderson <sesse at chromium.org>
+Auto-Submit: Steinar H Gunderson <sesse at chromium.org>
+Cr-Commit-Position: refs/heads/main@{#963119}
+---
+ AUTHORS | 1 +
+ media/gpu/chromeos/BUILD.gn | 1 +
+ media/gpu/chromeos/video_decoder_pipeline.cc | 2 +-
+ 3 files changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/AUTHORS b/AUTHORS
+index 0eba3de5065..50edd3f6b38 100644
+--- a/AUTHORS
++++ b/AUTHORS
+@@ -93,6 +93,7 @@ Andreas Papacharalampous <andreas at apap04.com>
+ Andrei Borza <andrei.borza at gmail.com>
+ Andrei Parvu <andrei.prv at gmail.com>
+ Andrei Parvu <parvu at adobe.com>
++Andres Salomon <dilinger at queued.net>
+ Andreu Botella <andreu at andreubotella.com>
+ Andrew Boyarshin <andrew.boyarshin at gmail.com>
+ Andrew Brampton <me at bramp.net>
+diff --git a/media/gpu/chromeos/BUILD.gn b/media/gpu/chromeos/BUILD.gn
+index 7cb4c3ea39a..6fe21c15ecc 100644
+--- a/media/gpu/chromeos/BUILD.gn
++++ b/media/gpu/chromeos/BUILD.gn
+@@ -25,6 +25,7 @@ source_set("chromeos") {
+
+ deps = [
+ "//base",
++ "//build/config/linux/libdrm",
+ "//media",
+ "//media/gpu:buildflags",
+ "//media/gpu:command_buffer_helper",
+diff --git a/media/gpu/chromeos/video_decoder_pipeline.cc b/media/gpu/chromeos/video_decoder_pipeline.cc
+index d2f154ea0d8..416b9434a8d 100644
+--- a/media/gpu/chromeos/video_decoder_pipeline.cc
++++ b/media/gpu/chromeos/video_decoder_pipeline.cc
+@@ -28,8 +28,8 @@
+ #include "third_party/abseil-cpp/absl/types/optional.h"
+
+ #if BUILDFLAG(USE_VAAPI)
++#include <drm_fourcc.h>
+ #include "media/gpu/vaapi/vaapi_video_decoder.h"
+-#include "third_party/libdrm/src/include/drm/drm_fourcc.h"
+ #elif BUILDFLAG(USE_V4L2_CODEC)
+ #include "media/gpu/v4l2/v4l2_video_decoder.h"
+ #else
Deleted: sandbox-build-if-glibc-2.34-dynamic-stack-size-is-en.patch
===================================================================
--- sandbox-build-if-glibc-2.34-dynamic-stack-size-is-en.patch 2022-03-26 06:50:08 UTC (rev 440684)
+++ sandbox-build-if-glibc-2.34-dynamic-stack-size-is-en.patch 2022-03-26 06:50:19 UTC (rev 440685)
@@ -1,39 +0,0 @@
-From 28ac6a15411d01301e171b8a8b0019abd57589b9 Mon Sep 17 00:00:00 2001
-From: Stephan Hartmann <stha09 at googlemail.com>
-Date: Mon, 7 Feb 2022 20:09:57 +0000
-Subject: [PATCH] sandbox: build if glibc 2.34+ dynamic stack size is enabled
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Compilation of sandbox fails when using dynamic stack size in glibc
-2.34 or newer. This is because the value is not a literal anymore but
-obtained through sysconf.
-
-To avoid this, use memset to put zeros in the buffer.
-
-Change-Id: Ia479e0f799b77a10a00197aaaa0500e62546f458
-Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3436947
-Reviewed-by: Jorge Lucangeli Obes <jorgelo at chromium.org>
-Commit-Queue: José Dapena Paz <jdapena at igalia.com>
-Cr-Commit-Position: refs/heads/main@{#967943}
----
- sandbox/linux/services/credentials.cc | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/sandbox/linux/services/credentials.cc b/sandbox/linux/services/credentials.cc
-index ca6b5954798..c933eafd163 100644
---- a/sandbox/linux/services/credentials.cc
-+++ b/sandbox/linux/services/credentials.cc
-@@ -100,7 +100,10 @@ bool ChrootToSafeEmptyDir() {
- // TODO(crbug.com/1247458) Broken in MSan builds after LLVM f1bb30a4956f.
- clone_flags |= CLONE_VM | CLONE_VFORK | CLONE_SETTLS;
-
-- char tls_buf[PTHREAD_STACK_MIN] = {0};
-+ // PTHREAD_STACK_MIN can be dynamic in glibc2.34+, so it is not possible to
-+ // zeroify tls_buf assigning { 0 }
-+ char tls_buf[PTHREAD_STACK_MIN];
-+ memset(tls_buf, 0, PTHREAD_STACK_MIN);
- tls = tls_buf;
- #endif
-
Copied: chromium/repos/extra-x86_64/sandbox-build-if-glibc-2.34-dynamic-stack-size-is-en.patch (from rev 440684, chromium/trunk/sandbox-build-if-glibc-2.34-dynamic-stack-size-is-en.patch)
===================================================================
--- sandbox-build-if-glibc-2.34-dynamic-stack-size-is-en.patch (rev 0)
+++ sandbox-build-if-glibc-2.34-dynamic-stack-size-is-en.patch 2022-03-26 06:50:19 UTC (rev 440685)
@@ -0,0 +1,39 @@
+From 28ac6a15411d01301e171b8a8b0019abd57589b9 Mon Sep 17 00:00:00 2001
+From: Stephan Hartmann <stha09 at googlemail.com>
+Date: Mon, 7 Feb 2022 20:09:57 +0000
+Subject: [PATCH] sandbox: build if glibc 2.34+ dynamic stack size is enabled
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Compilation of sandbox fails when using dynamic stack size in glibc
+2.34 or newer. This is because the value is not a literal anymore but
+obtained through sysconf.
+
+To avoid this, use memset to put zeros in the buffer.
+
+Change-Id: Ia479e0f799b77a10a00197aaaa0500e62546f458
+Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3436947
+Reviewed-by: Jorge Lucangeli Obes <jorgelo at chromium.org>
+Commit-Queue: José Dapena Paz <jdapena at igalia.com>
+Cr-Commit-Position: refs/heads/main@{#967943}
+---
+ sandbox/linux/services/credentials.cc | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/sandbox/linux/services/credentials.cc b/sandbox/linux/services/credentials.cc
+index ca6b5954798..c933eafd163 100644
+--- a/sandbox/linux/services/credentials.cc
++++ b/sandbox/linux/services/credentials.cc
+@@ -100,7 +100,10 @@ bool ChrootToSafeEmptyDir() {
+ // TODO(crbug.com/1247458) Broken in MSan builds after LLVM f1bb30a4956f.
+ clone_flags |= CLONE_VM | CLONE_VFORK | CLONE_SETTLS;
+
+- char tls_buf[PTHREAD_STACK_MIN] = {0};
++ // PTHREAD_STACK_MIN can be dynamic in glibc2.34+, so it is not possible to
++ // zeroify tls_buf assigning { 0 }
++ char tls_buf[PTHREAD_STACK_MIN];
++ memset(tls_buf, 0, PTHREAD_STACK_MIN);
+ tls = tls_buf;
+ #endif
+
Deleted: sql-make-VirtualCursor-standard-layout-type.patch
===================================================================
--- sql-make-VirtualCursor-standard-layout-type.patch 2022-03-26 06:50:08 UTC (rev 440684)
+++ sql-make-VirtualCursor-standard-layout-type.patch 2022-03-26 06:50:19 UTC (rev 440685)
@@ -1,238 +0,0 @@
-From 144479ad7b4287bee4067f95e4218f614798a865 Mon Sep 17 00:00:00 2001
-From: Stephan Hartmann <stha09 at googlemail.com>
-Date: Sun, 16 Jan 2022 19:15:26 +0000
-Subject: [PATCH] sql: make VirtualCursor standard layout type
-
-sql::recover::VirtualCursor needs to be a standard layout type, but
-has members of type std::unique_ptr. However, std::unique_ptr is not
-guaranteed to be standard layout. Compiling with clang combined with
-gcc-11 libstdc++ fails because of this.
-
-Bug: 1189788
-Change-Id: Ia6dc388cc5ef1c0f2afc75f8ca45b9f12687ca9c
----
- sql/recover_module/btree.cc | 18 ++++++++++++------
- sql/recover_module/btree.h | 21 +++++++++++++++------
- sql/recover_module/cursor.cc | 24 ++++++++++++------------
- sql/recover_module/cursor.h | 2 +-
- sql/recover_module/pager.cc | 5 ++---
- sql/recover_module/pager.h | 6 +++---
- 6 files changed, 45 insertions(+), 31 deletions(-)
-
-diff --git a/sql/recover_module/btree.cc b/sql/recover_module/btree.cc
-index cc9420e5c05..f12d8fa32a2 100644
---- a/sql/recover_module/btree.cc
-+++ b/sql/recover_module/btree.cc
-@@ -136,16 +136,22 @@ static_assert(std::is_trivially_destructible<LeafPageDecoder>::value,
- "Move the destructor to the .cc file if it's non-trival");
- #endif // !DCHECK_IS_ON()
-
--LeafPageDecoder::LeafPageDecoder(DatabasePageReader* db_reader) noexcept
-- : page_id_(db_reader->page_id()),
-- db_reader_(db_reader),
-- cell_count_(ComputeCellCount(db_reader)),
-- next_read_index_(0),
-- last_record_size_(0) {
-+LeafPageDecoder::LeafPageDecoder() noexcept = default;
-+
-+void LeafPageDecoder::Initialize(DatabasePageReader* db_reader) {
-+ page_id_ = db_reader->page_id();
-+ db_reader_ = db_reader;
-+ cell_count_ = ComputeCellCount(db_reader);
-+ next_read_index_ = 0;
-+ last_record_size_ = 0;
- DCHECK(IsOnValidPage(db_reader));
- DCHECK(DatabasePageReader::IsValidPageId(page_id_));
- }
-
-+void LeafPageDecoder::Reset() {
-+ db_reader_ = nullptr;
-+}
-+
- bool LeafPageDecoder::TryAdvance() {
- DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
- DCHECK(CanAdvance());
-diff --git a/sql/recover_module/btree.h b/sql/recover_module/btree.h
-index eaa087a5c52..df0e0c937c0 100644
---- a/sql/recover_module/btree.h
-+++ b/sql/recover_module/btree.h
-@@ -101,9 +101,7 @@ class LeafPageDecoder {
- public:
- // Creates a decoder for a DatabasePageReader's last read page.
- //
-- // |db_reader| must have been used to read an inner page of a table B-tree.
-- // |db_reader| must outlive this instance.
-- explicit LeafPageDecoder(DatabasePageReader* db_reader) noexcept;
-+ LeafPageDecoder() noexcept;
- ~LeafPageDecoder() noexcept = default;
-
- LeafPageDecoder(const LeafPageDecoder&) = delete;
-@@ -151,6 +149,17 @@ class LeafPageDecoder {
- // read as long as CanAdvance() returns true.
- bool TryAdvance();
-
-+ // Initialize with DatabasePageReader
-+ // |db_reader| must have been used to read an inner page of a table B-tree.
-+ // |db_reader| must outlive this instance.
-+ void Initialize(DatabasePageReader* db_reader);
-+
-+ // Reset internal DatabasePageReader
-+ void Reset();
-+
-+ // True if DatabasePageReader is valid
-+ bool IsValid() { return (db_reader_ != nullptr); }
-+
- // True if the given reader may point to an inner page in a table B-tree.
- //
- // The last ReadPage() call on |db_reader| must have succeeded.
-@@ -164,14 +173,14 @@ class LeafPageDecoder {
- static int ComputeCellCount(DatabasePageReader* db_reader);
-
- // The number of the B-tree page this reader is reading.
-- const int64_t page_id_;
-+ int64_t page_id_;
- // Used to read the tree page.
- //
- // Raw pointer usage is acceptable because this instance's owner is expected
- // to ensure that the DatabasePageReader outlives this.
-- DatabasePageReader* const db_reader_;
-+ DatabasePageReader* db_reader_;
- // Caches the ComputeCellCount() value for this reader's page.
-- const int cell_count_ = ComputeCellCount(db_reader_);
-+ int cell_count_;
-
- // The reader's cursor state.
- //
-diff --git a/sql/recover_module/cursor.cc b/sql/recover_module/cursor.cc
-index 4f827edf1b4..240de4999fe 100644
---- a/sql/recover_module/cursor.cc
-+++ b/sql/recover_module/cursor.cc
-@@ -28,7 +28,7 @@ VirtualCursor::~VirtualCursor() {
- int VirtualCursor::First() {
- DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
- inner_decoders_.clear();
-- leaf_decoder_ = nullptr;
-+ leaf_decoder_.Reset();
-
- AppendPageDecoder(table_->root_page_id());
- return Next();
-@@ -38,18 +38,18 @@ int VirtualCursor::Next() {
- DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
- record_reader_.Reset();
-
-- while (!inner_decoders_.empty() || leaf_decoder_.get()) {
-- if (leaf_decoder_.get()) {
-- if (!leaf_decoder_->CanAdvance()) {
-+ while (!inner_decoders_.empty() || leaf_decoder_.IsValid()) {
-+ if (leaf_decoder_.IsValid()) {
-+ if (!leaf_decoder_.CanAdvance()) {
- // The leaf has been exhausted. Remove it from the DFS stack.
-- leaf_decoder_ = nullptr;
-+ leaf_decoder_.Reset();
- continue;
- }
-- if (!leaf_decoder_->TryAdvance())
-+ if (!leaf_decoder_.TryAdvance())
- continue;
-
-- if (!payload_reader_.Initialize(leaf_decoder_->last_record_size(),
-- leaf_decoder_->last_record_offset())) {
-+ if (!payload_reader_.Initialize(leaf_decoder_.last_record_size(),
-+ leaf_decoder_.last_record_offset())) {
- continue;
- }
- if (!record_reader_.Initialize())
-@@ -101,13 +101,13 @@ int VirtualCursor::ReadColumn(int column_index,
- int64_t VirtualCursor::RowId() {
- DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
- DCHECK(record_reader_.IsInitialized());
-- DCHECK(leaf_decoder_.get());
-- return leaf_decoder_->last_record_rowid();
-+ DCHECK(leaf_decoder_.IsValid());
-+ return leaf_decoder_.last_record_rowid();
- }
-
- void VirtualCursor::AppendPageDecoder(int page_id) {
- DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
-- DCHECK(leaf_decoder_.get() == nullptr)
-+ DCHECK(!leaf_decoder_.IsValid())
- << __func__
- << " must only be called when the current path has no leaf decoder";
-
-@@ -115,7 +115,7 @@ void VirtualCursor::AppendPageDecoder(int page_id) {
- return;
-
- if (LeafPageDecoder::IsOnValidPage(&db_reader_)) {
-- leaf_decoder_ = std::make_unique<LeafPageDecoder>(&db_reader_);
-+ leaf_decoder_.Initialize(&db_reader_);
- return;
- }
-
-diff --git a/sql/recover_module/cursor.h b/sql/recover_module/cursor.h
-index 845b7852648..cc4e85f83f9 100644
---- a/sql/recover_module/cursor.h
-+++ b/sql/recover_module/cursor.h
-@@ -130,7 +130,7 @@ class VirtualCursor {
- std::vector<std::unique_ptr<InnerPageDecoder>> inner_decoders_;
-
- // Decodes the leaf page containing records.
-- std::unique_ptr<LeafPageDecoder> leaf_decoder_;
-+ LeafPageDecoder leaf_decoder_;
-
- SEQUENCE_CHECKER(sequence_checker_);
- };
-diff --git a/sql/recover_module/pager.cc b/sql/recover_module/pager.cc
-index 58e75de2704..69d98cef98d 100644
---- a/sql/recover_module/pager.cc
-+++ b/sql/recover_module/pager.cc
-@@ -23,8 +23,7 @@ static_assert(DatabasePageReader::kMaxPageId <= std::numeric_limits<int>::max(),
- "ints are not appropriate for representing page IDs");
-
- DatabasePageReader::DatabasePageReader(VirtualTable* table)
-- : page_data_(std::make_unique<uint8_t[]>(table->page_size())),
-- table_(table) {
-+ : page_data_(table->page_size()), table_(table) {
- DCHECK(table != nullptr);
- DCHECK(IsValidPageSize(table->page_size()));
- }
-@@ -58,7 +57,7 @@ int DatabasePageReader::ReadPage(int page_id) {
- "The |read_offset| computation above may overflow");
-
- int sqlite_status =
-- RawRead(sqlite_file, read_size, read_offset, page_data_.get());
-+ RawRead(sqlite_file, read_size, read_offset, page_data_.data());
-
- // |page_id_| needs to be set to kInvalidPageId if the read failed.
- // Otherwise, future ReadPage() calls with the previous |page_id_| value
-diff --git a/sql/recover_module/pager.h b/sql/recover_module/pager.h
-index 07cac3cb989..d08f0932fab 100644
---- a/sql/recover_module/pager.h
-+++ b/sql/recover_module/pager.h
-@@ -6,8 +6,8 @@
- #define SQL_RECOVER_MODULE_PAGER_H_
-
- #include <cstdint>
--#include <memory>
- #include <ostream>
-+#include <vector>
-
- #include "base/check_op.h"
- #include "base/memory/raw_ptr.h"
-@@ -72,7 +72,7 @@ class DatabasePageReader {
- DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
- DCHECK_NE(page_id_, kInvalidPageId)
- << "Successful ReadPage() required before accessing pager state";
-- return page_data_.get();
-+ return page_data_.data();
- }
-
- // The number of bytes in the page read by the last ReadPage() call.
-@@ -139,7 +139,7 @@ class DatabasePageReader {
- int page_id_ = kInvalidPageId;
- // Stores the bytes of the last page successfully read by ReadPage().
- // The content is undefined if the last call to ReadPage() did not succeed.
-- const std::unique_ptr<uint8_t[]> page_data_;
-+ std::vector<uint8_t> page_data_;
- // Raw pointer usage is acceptable because this instance's owner is expected
- // to ensure that the VirtualTable outlives this.
- const raw_ptr<VirtualTable> table_;
Copied: chromium/repos/extra-x86_64/sql-make-VirtualCursor-standard-layout-type.patch (from rev 440684, chromium/trunk/sql-make-VirtualCursor-standard-layout-type.patch)
===================================================================
--- sql-make-VirtualCursor-standard-layout-type.patch (rev 0)
+++ sql-make-VirtualCursor-standard-layout-type.patch 2022-03-26 06:50:19 UTC (rev 440685)
@@ -0,0 +1,238 @@
+From 144479ad7b4287bee4067f95e4218f614798a865 Mon Sep 17 00:00:00 2001
+From: Stephan Hartmann <stha09 at googlemail.com>
+Date: Sun, 16 Jan 2022 19:15:26 +0000
+Subject: [PATCH] sql: make VirtualCursor standard layout type
+
+sql::recover::VirtualCursor needs to be a standard layout type, but
+has members of type std::unique_ptr. However, std::unique_ptr is not
+guaranteed to be standard layout. Compiling with clang combined with
+gcc-11 libstdc++ fails because of this.
+
+Bug: 1189788
+Change-Id: Ia6dc388cc5ef1c0f2afc75f8ca45b9f12687ca9c
+---
+ sql/recover_module/btree.cc | 18 ++++++++++++------
+ sql/recover_module/btree.h | 21 +++++++++++++++------
+ sql/recover_module/cursor.cc | 24 ++++++++++++------------
+ sql/recover_module/cursor.h | 2 +-
+ sql/recover_module/pager.cc | 5 ++---
+ sql/recover_module/pager.h | 6 +++---
+ 6 files changed, 45 insertions(+), 31 deletions(-)
+
+diff --git a/sql/recover_module/btree.cc b/sql/recover_module/btree.cc
+index cc9420e5c05..f12d8fa32a2 100644
+--- a/sql/recover_module/btree.cc
++++ b/sql/recover_module/btree.cc
+@@ -136,16 +136,22 @@ static_assert(std::is_trivially_destructible<LeafPageDecoder>::value,
+ "Move the destructor to the .cc file if it's non-trival");
+ #endif // !DCHECK_IS_ON()
+
+-LeafPageDecoder::LeafPageDecoder(DatabasePageReader* db_reader) noexcept
+- : page_id_(db_reader->page_id()),
+- db_reader_(db_reader),
+- cell_count_(ComputeCellCount(db_reader)),
+- next_read_index_(0),
+- last_record_size_(0) {
++LeafPageDecoder::LeafPageDecoder() noexcept = default;
++
++void LeafPageDecoder::Initialize(DatabasePageReader* db_reader) {
++ page_id_ = db_reader->page_id();
++ db_reader_ = db_reader;
++ cell_count_ = ComputeCellCount(db_reader);
++ next_read_index_ = 0;
++ last_record_size_ = 0;
+ DCHECK(IsOnValidPage(db_reader));
+ DCHECK(DatabasePageReader::IsValidPageId(page_id_));
+ }
+
++void LeafPageDecoder::Reset() {
++ db_reader_ = nullptr;
++}
++
+ bool LeafPageDecoder::TryAdvance() {
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
+ DCHECK(CanAdvance());
+diff --git a/sql/recover_module/btree.h b/sql/recover_module/btree.h
+index eaa087a5c52..df0e0c937c0 100644
+--- a/sql/recover_module/btree.h
++++ b/sql/recover_module/btree.h
+@@ -101,9 +101,7 @@ class LeafPageDecoder {
+ public:
+ // Creates a decoder for a DatabasePageReader's last read page.
+ //
+- // |db_reader| must have been used to read an inner page of a table B-tree.
+- // |db_reader| must outlive this instance.
+- explicit LeafPageDecoder(DatabasePageReader* db_reader) noexcept;
++ LeafPageDecoder() noexcept;
+ ~LeafPageDecoder() noexcept = default;
+
+ LeafPageDecoder(const LeafPageDecoder&) = delete;
+@@ -151,6 +149,17 @@ class LeafPageDecoder {
+ // read as long as CanAdvance() returns true.
+ bool TryAdvance();
+
++ // Initialize with DatabasePageReader
++ // |db_reader| must have been used to read an inner page of a table B-tree.
++ // |db_reader| must outlive this instance.
++ void Initialize(DatabasePageReader* db_reader);
++
++ // Reset internal DatabasePageReader
++ void Reset();
++
++ // True if DatabasePageReader is valid
++ bool IsValid() { return (db_reader_ != nullptr); }
++
+ // True if the given reader may point to an inner page in a table B-tree.
+ //
+ // The last ReadPage() call on |db_reader| must have succeeded.
+@@ -164,14 +173,14 @@ class LeafPageDecoder {
+ static int ComputeCellCount(DatabasePageReader* db_reader);
+
+ // The number of the B-tree page this reader is reading.
+- const int64_t page_id_;
++ int64_t page_id_;
+ // Used to read the tree page.
+ //
+ // Raw pointer usage is acceptable because this instance's owner is expected
+ // to ensure that the DatabasePageReader outlives this.
+- DatabasePageReader* const db_reader_;
++ DatabasePageReader* db_reader_;
+ // Caches the ComputeCellCount() value for this reader's page.
+- const int cell_count_ = ComputeCellCount(db_reader_);
++ int cell_count_;
+
+ // The reader's cursor state.
+ //
+diff --git a/sql/recover_module/cursor.cc b/sql/recover_module/cursor.cc
+index 4f827edf1b4..240de4999fe 100644
+--- a/sql/recover_module/cursor.cc
++++ b/sql/recover_module/cursor.cc
+@@ -28,7 +28,7 @@ VirtualCursor::~VirtualCursor() {
+ int VirtualCursor::First() {
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
+ inner_decoders_.clear();
+- leaf_decoder_ = nullptr;
++ leaf_decoder_.Reset();
+
+ AppendPageDecoder(table_->root_page_id());
+ return Next();
+@@ -38,18 +38,18 @@ int VirtualCursor::Next() {
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
+ record_reader_.Reset();
+
+- while (!inner_decoders_.empty() || leaf_decoder_.get()) {
+- if (leaf_decoder_.get()) {
+- if (!leaf_decoder_->CanAdvance()) {
++ while (!inner_decoders_.empty() || leaf_decoder_.IsValid()) {
++ if (leaf_decoder_.IsValid()) {
++ if (!leaf_decoder_.CanAdvance()) {
+ // The leaf has been exhausted. Remove it from the DFS stack.
+- leaf_decoder_ = nullptr;
++ leaf_decoder_.Reset();
+ continue;
+ }
+- if (!leaf_decoder_->TryAdvance())
++ if (!leaf_decoder_.TryAdvance())
+ continue;
+
+- if (!payload_reader_.Initialize(leaf_decoder_->last_record_size(),
+- leaf_decoder_->last_record_offset())) {
++ if (!payload_reader_.Initialize(leaf_decoder_.last_record_size(),
++ leaf_decoder_.last_record_offset())) {
+ continue;
+ }
+ if (!record_reader_.Initialize())
+@@ -101,13 +101,13 @@ int VirtualCursor::ReadColumn(int column_index,
+ int64_t VirtualCursor::RowId() {
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
+ DCHECK(record_reader_.IsInitialized());
+- DCHECK(leaf_decoder_.get());
+- return leaf_decoder_->last_record_rowid();
++ DCHECK(leaf_decoder_.IsValid());
++ return leaf_decoder_.last_record_rowid();
+ }
+
+ void VirtualCursor::AppendPageDecoder(int page_id) {
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
+- DCHECK(leaf_decoder_.get() == nullptr)
++ DCHECK(!leaf_decoder_.IsValid())
+ << __func__
+ << " must only be called when the current path has no leaf decoder";
+
+@@ -115,7 +115,7 @@ void VirtualCursor::AppendPageDecoder(int page_id) {
+ return;
+
+ if (LeafPageDecoder::IsOnValidPage(&db_reader_)) {
+- leaf_decoder_ = std::make_unique<LeafPageDecoder>(&db_reader_);
++ leaf_decoder_.Initialize(&db_reader_);
+ return;
+ }
+
+diff --git a/sql/recover_module/cursor.h b/sql/recover_module/cursor.h
+index 845b7852648..cc4e85f83f9 100644
+--- a/sql/recover_module/cursor.h
++++ b/sql/recover_module/cursor.h
+@@ -130,7 +130,7 @@ class VirtualCursor {
+ std::vector<std::unique_ptr<InnerPageDecoder>> inner_decoders_;
+
+ // Decodes the leaf page containing records.
+- std::unique_ptr<LeafPageDecoder> leaf_decoder_;
++ LeafPageDecoder leaf_decoder_;
+
+ SEQUENCE_CHECKER(sequence_checker_);
+ };
+diff --git a/sql/recover_module/pager.cc b/sql/recover_module/pager.cc
+index 58e75de2704..69d98cef98d 100644
+--- a/sql/recover_module/pager.cc
++++ b/sql/recover_module/pager.cc
+@@ -23,8 +23,7 @@ static_assert(DatabasePageReader::kMaxPageId <= std::numeric_limits<int>::max(),
+ "ints are not appropriate for representing page IDs");
+
+ DatabasePageReader::DatabasePageReader(VirtualTable* table)
+- : page_data_(std::make_unique<uint8_t[]>(table->page_size())),
+- table_(table) {
++ : page_data_(table->page_size()), table_(table) {
+ DCHECK(table != nullptr);
+ DCHECK(IsValidPageSize(table->page_size()));
+ }
+@@ -58,7 +57,7 @@ int DatabasePageReader::ReadPage(int page_id) {
+ "The |read_offset| computation above may overflow");
+
+ int sqlite_status =
+- RawRead(sqlite_file, read_size, read_offset, page_data_.get());
++ RawRead(sqlite_file, read_size, read_offset, page_data_.data());
+
+ // |page_id_| needs to be set to kInvalidPageId if the read failed.
+ // Otherwise, future ReadPage() calls with the previous |page_id_| value
+diff --git a/sql/recover_module/pager.h b/sql/recover_module/pager.h
+index 07cac3cb989..d08f0932fab 100644
+--- a/sql/recover_module/pager.h
++++ b/sql/recover_module/pager.h
+@@ -6,8 +6,8 @@
+ #define SQL_RECOVER_MODULE_PAGER_H_
+
+ #include <cstdint>
+-#include <memory>
+ #include <ostream>
++#include <vector>
+
+ #include "base/check_op.h"
+ #include "base/memory/raw_ptr.h"
+@@ -72,7 +72,7 @@ class DatabasePageReader {
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
+ DCHECK_NE(page_id_, kInvalidPageId)
+ << "Successful ReadPage() required before accessing pager state";
+- return page_data_.get();
++ return page_data_.data();
+ }
+
+ // The number of bytes in the page read by the last ReadPage() call.
+@@ -139,7 +139,7 @@ class DatabasePageReader {
+ int page_id_ = kInvalidPageId;
+ // Stores the bytes of the last page successfully read by ReadPage().
+ // The content is undefined if the last call to ReadPage() did not succeed.
+- const std::unique_ptr<uint8_t[]> page_data_;
++ std::vector<uint8_t> page_data_;
+ // Raw pointer usage is acceptable because this instance's owner is expected
+ // to ensure that the VirtualTable outlives this.
+ const raw_ptr<VirtualTable> table_;
Deleted: use-FT_Done_MM_Var-in-CFX_Font-AdjustMMParams.patch
===================================================================
--- use-FT_Done_MM_Var-in-CFX_Font-AdjustMMParams.patch 2022-03-26 06:50:08 UTC (rev 440684)
+++ use-FT_Done_MM_Var-in-CFX_Font-AdjustMMParams.patch 2022-03-26 06:50:19 UTC (rev 440685)
@@ -1,71 +0,0 @@
-From ffeb67faf715475f6e463d65c368f556780adf19 Mon Sep 17 00:00:00 2001
-From: Lei Zhang <thestig at chromium.org>
-Date: Mon, 31 Jan 2022 22:42:35 +0000
-Subject: [PATCH] Use FT_Done_MM_Var() in CFX_Font::AdjustMMParams() when
- possible.
-
-When FreeType has FT_Done_MM_Var(), use that to free memory in
-CFX_Font::AdjustMMParams() to avoid mismatched alloc/free functions.
-
-Bug: pdfium:1400
-Change-Id: I044540893103921fc64cdd53fcd628cfebf2c9db
-Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/90130
-Reviewed-by: Nigi <nigi at chromium.org>
-Commit-Queue: Lei Zhang <thestig at chromium.org>
----
- core/fxge/cfx_font.cpp | 28 ++++++++++++++++++++++++++--
- 1 file changed, 26 insertions(+), 2 deletions(-)
-
-diff --git a/core/fxge/cfx_font.cpp b/core/fxge/cfx_font.cpp
-index c08fe9608..8b3a72700 100644
---- a/core/fxge/cfx_font.cpp
-+++ b/core/fxge/cfx_font.cpp
-@@ -44,6 +44,30 @@ struct OUTLINE_PARAMS {
- float m_CoordUnit;
- };
-
-+// TODO(crbug.com/pdfium/1400): When FT_Done_MM_Var() is more likely to be
-+// available to all users in the future, remove FreeMMVar() and use
-+// FT_Done_MM_Var() directly.
-+//
-+// Use weak symbols to check if FT_Done_MM_Var() is available at runtime.
-+#if !BUILDFLAG(IS_WIN)
-+extern "C" __attribute__((weak)) decltype(FT_Done_MM_Var) FT_Done_MM_Var;
-+#endif
-+
-+void FreeMMVar(FXFT_FaceRec* rec, FXFT_MM_VarPtr variation_desc) {
-+#if BUILDFLAG(IS_WIN)
-+ // Assume `use_system_freetype` GN var is never set on Windows.
-+ constexpr bool has_ft_done_mm_var_func = true;
-+#else
-+ static const bool has_ft_done_mm_var_func = !!FT_Done_MM_Var;
-+#endif
-+ if (has_ft_done_mm_var_func) {
-+ FT_Done_MM_Var(CFX_GEModule::Get()->GetFontMgr()->GetFTLibrary(),
-+ variation_desc);
-+ } else {
-+ FXFT_Free(rec, variation_desc);
-+ }
-+}
-+
- FX_RECT FXRectFromFTPos(FT_Pos left, FT_Pos top, FT_Pos right, FT_Pos bottom) {
- return FX_RECT(pdfium::base::checked_cast<int32_t>(left),
- pdfium::base::checked_cast<int32_t>(top),
-@@ -645,7 +669,7 @@ void CFX_Font::AdjustMMParams(int glyph_index,
- FT_Pos max_width = FXFT_Get_Glyph_HoriAdvance(m_Face->GetRec()) * 1000 /
- FXFT_Get_Face_UnitsPerEM(m_Face->GetRec());
- if (max_width == min_width) {
-- FXFT_Free(m_Face->GetRec(), pMasters);
-+ FreeMMVar(m_Face->GetRec(), pMasters);
- return;
- }
- FT_Pos param = min_param + (max_param - min_param) *
-@@ -653,7 +677,7 @@ void CFX_Font::AdjustMMParams(int glyph_index,
- (max_width - min_width);
- coords[1] = param;
- }
-- FXFT_Free(m_Face->GetRec(), pMasters);
-+ FreeMMVar(m_Face->GetRec(), pMasters);
- FT_Set_MM_Design_Coordinates(m_Face->GetRec(), 2, coords);
- }
-
Copied: chromium/repos/extra-x86_64/use-FT_Done_MM_Var-in-CFX_Font-AdjustMMParams.patch (from rev 440684, chromium/trunk/use-FT_Done_MM_Var-in-CFX_Font-AdjustMMParams.patch)
===================================================================
--- use-FT_Done_MM_Var-in-CFX_Font-AdjustMMParams.patch (rev 0)
+++ use-FT_Done_MM_Var-in-CFX_Font-AdjustMMParams.patch 2022-03-26 06:50:19 UTC (rev 440685)
@@ -0,0 +1,71 @@
+From ffeb67faf715475f6e463d65c368f556780adf19 Mon Sep 17 00:00:00 2001
+From: Lei Zhang <thestig at chromium.org>
+Date: Mon, 31 Jan 2022 22:42:35 +0000
+Subject: [PATCH] Use FT_Done_MM_Var() in CFX_Font::AdjustMMParams() when
+ possible.
+
+When FreeType has FT_Done_MM_Var(), use that to free memory in
+CFX_Font::AdjustMMParams() to avoid mismatched alloc/free functions.
+
+Bug: pdfium:1400
+Change-Id: I044540893103921fc64cdd53fcd628cfebf2c9db
+Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/90130
+Reviewed-by: Nigi <nigi at chromium.org>
+Commit-Queue: Lei Zhang <thestig at chromium.org>
+---
+ core/fxge/cfx_font.cpp | 28 ++++++++++++++++++++++++++--
+ 1 file changed, 26 insertions(+), 2 deletions(-)
+
+diff --git a/core/fxge/cfx_font.cpp b/core/fxge/cfx_font.cpp
+index c08fe9608..8b3a72700 100644
+--- a/core/fxge/cfx_font.cpp
++++ b/core/fxge/cfx_font.cpp
+@@ -44,6 +44,30 @@ struct OUTLINE_PARAMS {
+ float m_CoordUnit;
+ };
+
++// TODO(crbug.com/pdfium/1400): When FT_Done_MM_Var() is more likely to be
++// available to all users in the future, remove FreeMMVar() and use
++// FT_Done_MM_Var() directly.
++//
++// Use weak symbols to check if FT_Done_MM_Var() is available at runtime.
++#if !BUILDFLAG(IS_WIN)
++extern "C" __attribute__((weak)) decltype(FT_Done_MM_Var) FT_Done_MM_Var;
++#endif
++
++void FreeMMVar(FXFT_FaceRec* rec, FXFT_MM_VarPtr variation_desc) {
++#if BUILDFLAG(IS_WIN)
++ // Assume `use_system_freetype` GN var is never set on Windows.
++ constexpr bool has_ft_done_mm_var_func = true;
++#else
++ static const bool has_ft_done_mm_var_func = !!FT_Done_MM_Var;
++#endif
++ if (has_ft_done_mm_var_func) {
++ FT_Done_MM_Var(CFX_GEModule::Get()->GetFontMgr()->GetFTLibrary(),
++ variation_desc);
++ } else {
++ FXFT_Free(rec, variation_desc);
++ }
++}
++
+ FX_RECT FXRectFromFTPos(FT_Pos left, FT_Pos top, FT_Pos right, FT_Pos bottom) {
+ return FX_RECT(pdfium::base::checked_cast<int32_t>(left),
+ pdfium::base::checked_cast<int32_t>(top),
+@@ -645,7 +669,7 @@ void CFX_Font::AdjustMMParams(int glyph_index,
+ FT_Pos max_width = FXFT_Get_Glyph_HoriAdvance(m_Face->GetRec()) * 1000 /
+ FXFT_Get_Face_UnitsPerEM(m_Face->GetRec());
+ if (max_width == min_width) {
+- FXFT_Free(m_Face->GetRec(), pMasters);
++ FreeMMVar(m_Face->GetRec(), pMasters);
+ return;
+ }
+ FT_Pos param = min_param + (max_param - min_param) *
+@@ -653,7 +677,7 @@ void CFX_Font::AdjustMMParams(int glyph_index,
+ (max_width - min_width);
+ coords[1] = param;
+ }
+- FXFT_Free(m_Face->GetRec(), pMasters);
++ FreeMMVar(m_Face->GetRec(), pMasters);
+ FT_Set_MM_Design_Coordinates(m_Face->GetRec(), 2, coords);
+ }
+
Deleted: use-oauth2-client-switches-as-default.patch
===================================================================
--- use-oauth2-client-switches-as-default.patch 2022-03-26 06:50:08 UTC (rev 440684)
+++ use-oauth2-client-switches-as-default.patch 2022-03-26 06:50:19 UTC (rev 440685)
@@ -1,17 +0,0 @@
-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
Copied: chromium/repos/extra-x86_64/use-oauth2-client-switches-as-default.patch (from rev 440684, chromium/trunk/use-oauth2-client-switches-as-default.patch)
===================================================================
--- use-oauth2-client-switches-as-default.patch (rev 0)
+++ use-oauth2-client-switches-as-default.patch 2022-03-26 06:50:19 UTC (rev 440685)
@@ -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
Deleted: webcodecs-stop-using-AudioOpusEncoder.patch
===================================================================
--- webcodecs-stop-using-AudioOpusEncoder.patch 2022-03-26 06:50:08 UTC (rev 440684)
+++ webcodecs-stop-using-AudioOpusEncoder.patch 2022-03-26 06:50:19 UTC (rev 440685)
@@ -1,49 +0,0 @@
-From 3bd46cb9a51773f103ef52b39d6407740eb0d60a Mon Sep 17 00:00:00 2001
-From: Eugene Zemtsov <eugene at chromium.org>
-Date: Thu, 24 Feb 2022 23:17:20 +0000
-Subject: [PATCH] webcodecs: Stop using AudioOpusEncoder as backed for mojo
- audio encoder
-
-AudioOpusEncoder was only used here for testing. Let's not let it get
-comfortable. We'll use MF AAC encoder here when we have it. (Soon...)
-
-Bug: 1259883
-Change-Id: Ia1819395c8c8fd6d403d4b8558c12f9a1bf7e761
-Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3489449
-Commit-Queue: Eugene Zemtsov <eugene at chromium.org>
-Auto-Submit: Eugene Zemtsov <eugene at chromium.org>
-Reviewed-by: Dale Curtis <dalecurtis at chromium.org>
-Commit-Queue: Dale Curtis <dalecurtis at chromium.org>
-Cr-Commit-Position: refs/heads/main@{#974895}
----
- media/mojo/services/gpu_mojo_media_client.cc | 10 +---------
- 1 file changed, 1 insertion(+), 9 deletions(-)
-
-diff --git a/media/mojo/services/gpu_mojo_media_client.cc b/media/mojo/services/gpu_mojo_media_client.cc
-index 8f83a4d6cf6..40cdaff8d3a 100644
---- a/media/mojo/services/gpu_mojo_media_client.cc
-+++ b/media/mojo/services/gpu_mojo_media_client.cc
-@@ -13,7 +13,6 @@
- #include "build/chromeos_buildflags.h"
- #include "gpu/ipc/service/gpu_channel.h"
- #include "media/audio/audio_features.h"
--#include "media/audio/audio_opus_encoder.h"
- #include "media/base/audio_decoder.h"
- #include "media/base/cdm_factory.h"
- #include "media/base/media_switches.h"
-@@ -119,14 +118,7 @@ std::unique_ptr<AudioEncoder> GpuMojoMediaClient::CreateAudioEncoder(
- scoped_refptr<base::SequencedTaskRunner> task_runner) {
- if (!base::FeatureList::IsEnabled(features::kPlatformAudioEncoder))
- return nullptr;
-- // TODO(crbug.com/1259883) Right now Opus encoder is all we have, later on
-- // we'll create a real platform encoder here.
-- auto opus_encoder = std::make_unique<AudioOpusEncoder>();
-- auto encoding_runner = base::ThreadPool::CreateSequencedTaskRunner(
-- {base::TaskPriority::USER_BLOCKING});
-- return std::make_unique<OffloadingAudioEncoder>(std::move(opus_encoder),
-- std::move(encoding_runner),
-- std::move(task_runner));
-+ return nullptr;
- }
-
- VideoDecoderType GpuMojoMediaClient::GetDecoderImplementationType() {
Copied: chromium/repos/extra-x86_64/webcodecs-stop-using-AudioOpusEncoder.patch (from rev 440684, chromium/trunk/webcodecs-stop-using-AudioOpusEncoder.patch)
===================================================================
--- webcodecs-stop-using-AudioOpusEncoder.patch (rev 0)
+++ webcodecs-stop-using-AudioOpusEncoder.patch 2022-03-26 06:50:19 UTC (rev 440685)
@@ -0,0 +1,49 @@
+From 3bd46cb9a51773f103ef52b39d6407740eb0d60a Mon Sep 17 00:00:00 2001
+From: Eugene Zemtsov <eugene at chromium.org>
+Date: Thu, 24 Feb 2022 23:17:20 +0000
+Subject: [PATCH] webcodecs: Stop using AudioOpusEncoder as backed for mojo
+ audio encoder
+
+AudioOpusEncoder was only used here for testing. Let's not let it get
+comfortable. We'll use MF AAC encoder here when we have it. (Soon...)
+
+Bug: 1259883
+Change-Id: Ia1819395c8c8fd6d403d4b8558c12f9a1bf7e761
+Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3489449
+Commit-Queue: Eugene Zemtsov <eugene at chromium.org>
+Auto-Submit: Eugene Zemtsov <eugene at chromium.org>
+Reviewed-by: Dale Curtis <dalecurtis at chromium.org>
+Commit-Queue: Dale Curtis <dalecurtis at chromium.org>
+Cr-Commit-Position: refs/heads/main@{#974895}
+---
+ media/mojo/services/gpu_mojo_media_client.cc | 10 +---------
+ 1 file changed, 1 insertion(+), 9 deletions(-)
+
+diff --git a/media/mojo/services/gpu_mojo_media_client.cc b/media/mojo/services/gpu_mojo_media_client.cc
+index 8f83a4d6cf6..40cdaff8d3a 100644
+--- a/media/mojo/services/gpu_mojo_media_client.cc
++++ b/media/mojo/services/gpu_mojo_media_client.cc
+@@ -13,7 +13,6 @@
+ #include "build/chromeos_buildflags.h"
+ #include "gpu/ipc/service/gpu_channel.h"
+ #include "media/audio/audio_features.h"
+-#include "media/audio/audio_opus_encoder.h"
+ #include "media/base/audio_decoder.h"
+ #include "media/base/cdm_factory.h"
+ #include "media/base/media_switches.h"
+@@ -119,14 +118,7 @@ std::unique_ptr<AudioEncoder> GpuMojoMediaClient::CreateAudioEncoder(
+ scoped_refptr<base::SequencedTaskRunner> task_runner) {
+ if (!base::FeatureList::IsEnabled(features::kPlatformAudioEncoder))
+ return nullptr;
+- // TODO(crbug.com/1259883) Right now Opus encoder is all we have, later on
+- // we'll create a real platform encoder here.
+- auto opus_encoder = std::make_unique<AudioOpusEncoder>();
+- auto encoding_runner = base::ThreadPool::CreateSequencedTaskRunner(
+- {base::TaskPriority::USER_BLOCKING});
+- return std::make_unique<OffloadingAudioEncoder>(std::move(opus_encoder),
+- std::move(encoding_runner),
+- std::move(task_runner));
++ return nullptr;
+ }
+
+ VideoDecoderType GpuMojoMediaClient::GetDecoderImplementationType() {
More information about the arch-commits
mailing list