[arch-commits] Commit in chromium/repos/extra-x86_64 (14 files)

Evangelos Foutras foutrelis at gemini.archlinux.org
Thu Jan 20 13:19:54 UTC 2022


    Date: Thursday, January 20, 2022 @ 13:19:54
  Author: foutrelis
Revision: 434787

archrelease: copy trunk to extra-x86_64

Added:
  chromium/repos/extra-x86_64/PKGBUILD
    (from rev 434786, chromium/trunk/PKGBUILD)
  chromium/repos/extra-x86_64/chromium-93-ffmpeg-4.4.patch
    (from rev 434786, chromium/trunk/chromium-93-ffmpeg-4.4.patch)
  chromium/repos/extra-x86_64/sql-make-VirtualCursor-standard-layout-type.patch
    (from rev 434786, chromium/trunk/sql-make-VirtualCursor-standard-layout-type.patch)
  chromium/repos/extra-x86_64/unbundle-ffmpeg-av_stream_get_first_dts.patch
    (from rev 434786, chromium/trunk/unbundle-ffmpeg-av_stream_get_first_dts.patch)
  chromium/repos/extra-x86_64/unexpire-accelerated-video-decode-flag.patch
    (from rev 434786, chromium/trunk/unexpire-accelerated-video-decode-flag.patch)
  chromium/repos/extra-x86_64/use-oauth2-client-switches-as-default.patch
    (from rev 434786, chromium/trunk/use-oauth2-client-switches-as-default.patch)
Deleted:
  chromium/repos/extra-x86_64/PKGBUILD
  chromium/repos/extra-x86_64/chromium-93-ffmpeg-4.4.patch
  chromium/repos/extra-x86_64/fix-tag-dragging-in-KWin.patch
  chromium/repos/extra-x86_64/fix-tag-dragging-in-Mutter.patch
  chromium/repos/extra-x86_64/sql-make-VirtualCursor-standard-layout-type.patch
  chromium/repos/extra-x86_64/unbundle-ffmpeg-av_stream_get_first_dts.patch
  chromium/repos/extra-x86_64/unexpire-accelerated-video-decode-flag.patch
  chromium/repos/extra-x86_64/use-oauth2-client-switches-as-default.patch

---------------------------------------------------+
 PKGBUILD                                          |  552 +++++++++-----------
 chromium-93-ffmpeg-4.4.patch                      |   72 +-
 fix-tag-dragging-in-KWin.patch                    |   35 -
 fix-tag-dragging-in-Mutter.patch                  |   46 -
 sql-make-VirtualCursor-standard-layout-type.patch |  476 ++++++++---------
 unbundle-ffmpeg-av_stream_get_first_dts.patch     |   24 
 unexpire-accelerated-video-decode-flag.patch      |   22 
 use-oauth2-client-switches-as-default.patch       |   34 -
 8 files changed, 587 insertions(+), 674 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2022-01-20 13:19:40 UTC (rev 434786)
+++ PKGBUILD	2022-01-20 13:19:54 UTC (rev 434787)
@@ -1,279 +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=97.0.4692.71
-pkgrel=2
-_launcher_ver=8
-_gcc_patchset=4
-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=('!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-tag-dragging-in-KWin.patch
-        fix-tag-dragging-in-Mutter.patch
-        sql-make-VirtualCursor-standard-layout-type.patch
-        chromium-93-ffmpeg-4.4.patch
-        unbundle-ffmpeg-av_stream_get_first_dts.patch
-        unexpire-accelerated-video-decode-flag.patch
-        use-oauth2-client-switches-as-default.patch)
-sha256sums=('8ae189d44b782fe4d4942962260dbf5f753abf141148727d9fe82852778dfd7c'
-            '213e50f48b67feb4441078d50b0fd431df34323be15be97c55302d3fdac4483a'
-            '7af5c0a55a20c0fb496b2f4448d89203a83bb1914754d864460e55e68731ef0b'
-            '8dac06ef6e85ddb205b47bb7f1b8c3f73b67a8252dd2a81ed636964c517114ed'
-            '764dd0c1336881ff37c764f59f25f5830675b5db1388a74da5ddbe9642883692'
-            'dd317f85e5abfdcfc89c6f23f4c8edbcdebdd5e083dcec770e5da49ee647d150'
-            '1a9e074f417f8ffd78bcd6874d8e2e74a239905bf662f76a7755fa40dc476b57'
-            '1f0c1a7a1eb67d91765c9f28df815f58e1c6dc7b37d0acd4d68cac8e5515786c'
-            '2a97b26c3d6821b15ef4ef1369905c6fa3e9c8da4877eb9af4361452a425290b'
-            '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
-
-  # Fix build with older ffmpeg
-  patch -Np1 -i ../chromium-93-ffmpeg-4.4.patch
-
-  # Substitute the custom function 'av_stream_get_first_dts'; will need to
-  # switch to bundled ffmpeg when we're no longer using ffmpeg 4.4 in Arch
-  # Upstream commit that made first_dts internal causing Chromium to add a
-  # custom function: https://github.com/FFmpeg/FFmpeg/commit/591b88e6787c4
-  # https://crbug.com/1251779
-  patch -Np1 -i ../unbundle-ffmpeg-av_stream_get_first_dts.patch
-
-  # https://crbug.com/1207478
-  patch -Np0 -i ../unexpire-accelerated-video-decode-flag.patch
-
-  # Upstream fixes
-  patch -Np1 -i ../fix-tag-dragging-in-KWin.patch
-  patch -Np1 -i ../fix-tag-dragging-in-Mutter.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
-    '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
-
-  if check_option strip y; then
-    _flags+=('symbol_level=0')
-  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'
-
-  # 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
-  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
-}
-
-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 -Dm4755 out/Release/chrome_sandbox "$pkgdir/usr/lib/chromium/chrome-sandbox"
-  ln -s /usr/lib/chromium/chromedriver "$pkgdir/usr/bin/chromedriver"
-
-  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
-    chromedriver
-    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 434786, chromium/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2022-01-20 13:19:54 UTC (rev 434787)
@@ -0,0 +1,273 @@
+# 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=97.0.4692.99
+pkgrel=1
+_launcher_ver=8
+_gcc_patchset=4
+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=('!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
+        sql-make-VirtualCursor-standard-layout-type.patch
+        chromium-93-ffmpeg-4.4.patch
+        unbundle-ffmpeg-av_stream_get_first_dts.patch
+        unexpire-accelerated-video-decode-flag.patch
+        use-oauth2-client-switches-as-default.patch)
+sha256sums=('c91bae205705b367f2cfc1f72ce1ee99b2ceb5edfc584e15c60a6ab5ff01ecba'
+            '213e50f48b67feb4441078d50b0fd431df34323be15be97c55302d3fdac4483a'
+            '7af5c0a55a20c0fb496b2f4448d89203a83bb1914754d864460e55e68731ef0b'
+            'dd317f85e5abfdcfc89c6f23f4c8edbcdebdd5e083dcec770e5da49ee647d150'
+            '1a9e074f417f8ffd78bcd6874d8e2e74a239905bf662f76a7755fa40dc476b57'
+            '1f0c1a7a1eb67d91765c9f28df815f58e1c6dc7b37d0acd4d68cac8e5515786c'
+            '2a97b26c3d6821b15ef4ef1369905c6fa3e9c8da4877eb9af4361452a425290b'
+            '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
+
+  # Fix build with older ffmpeg
+  patch -Np1 -i ../chromium-93-ffmpeg-4.4.patch
+
+  # Substitute the custom function 'av_stream_get_first_dts'; will need to
+  # switch to bundled ffmpeg when we're no longer using ffmpeg 4.4 in Arch
+  # Upstream commit that made first_dts internal causing Chromium to add a
+  # custom function: https://github.com/FFmpeg/FFmpeg/commit/591b88e6787c4
+  # https://crbug.com/1251779
+  patch -Np1 -i ../unbundle-ffmpeg-av_stream_get_first_dts.patch
+
+  # https://crbug.com/1207478
+  patch -Np0 -i ../unexpire-accelerated-video-decode-flag.patch
+
+  # Upstream fixes
+
+  # 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
+    '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
+
+  if check_option strip y; then
+    _flags+=('symbol_level=0')
+  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'
+
+  # 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
+  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
+}
+
+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 -Dm4755 out/Release/chrome_sandbox "$pkgdir/usr/lib/chromium/chrome-sandbox"
+  ln -s /usr/lib/chromium/chromedriver "$pkgdir/usr/bin/chromedriver"
+
+  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
+    chromedriver
+    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: chromium-93-ffmpeg-4.4.patch
===================================================================
--- chromium-93-ffmpeg-4.4.patch	2022-01-20 13:19:40 UTC (rev 434786)
+++ chromium-93-ffmpeg-4.4.patch	2022-01-20 13:19:54 UTC (rev 434787)
@@ -1,36 +0,0 @@
-diff --git a/media/filters/ffmpeg_demuxer.cc b/media/filters/ffmpeg_demuxer.cc
-index ac4713b07268..492a9a37d096 100644
---- a/media/filters/ffmpeg_demuxer.cc
-+++ b/media/filters/ffmpeg_demuxer.cc
-@@ -427,11 +427,11 @@ void FFmpegDemuxerStream::EnqueuePacket(ScopedAVPacket packet) {
-   scoped_refptr<DecoderBuffer> buffer;
- 
-   if (type() == DemuxerStream::TEXT) {
--    size_t id_size = 0;
-+    int id_size = 0;
-     uint8_t* id_data = av_packet_get_side_data(
-         packet.get(), AV_PKT_DATA_WEBVTT_IDENTIFIER, &id_size);
- 
--    size_t settings_size = 0;
-+    int settings_size = 0;
-     uint8_t* settings_data = av_packet_get_side_data(
-         packet.get(), AV_PKT_DATA_WEBVTT_SETTINGS, &settings_size);
- 
-@@ -443,7 +443,7 @@ void FFmpegDemuxerStream::EnqueuePacket(ScopedAVPacket packet) {
-     buffer = DecoderBuffer::CopyFrom(packet->data, packet->size,
-                                      side_data.data(), side_data.size());
-   } else {
--    size_t side_data_size = 0;
-+    int side_data_size = 0;
-     uint8_t* side_data = av_packet_get_side_data(
-         packet.get(), AV_PKT_DATA_MATROSKA_BLOCKADDITIONAL, &side_data_size);
- 
-@@ -504,7 +504,7 @@ void FFmpegDemuxerStream::EnqueuePacket(ScopedAVPacket packet) {
-                                        packet->size - data_offset);
-     }
- 
--    size_t skip_samples_size = 0;
-+    int skip_samples_size = 0;
-     const uint32_t* skip_samples_ptr =
-         reinterpret_cast<const uint32_t*>(av_packet_get_side_data(
-             packet.get(), AV_PKT_DATA_SKIP_SAMPLES, &skip_samples_size));

Copied: chromium/repos/extra-x86_64/chromium-93-ffmpeg-4.4.patch (from rev 434786, chromium/trunk/chromium-93-ffmpeg-4.4.patch)
===================================================================
--- chromium-93-ffmpeg-4.4.patch	                        (rev 0)
+++ chromium-93-ffmpeg-4.4.patch	2022-01-20 13:19:54 UTC (rev 434787)
@@ -0,0 +1,36 @@
+diff --git a/media/filters/ffmpeg_demuxer.cc b/media/filters/ffmpeg_demuxer.cc
+index ac4713b07268..492a9a37d096 100644
+--- a/media/filters/ffmpeg_demuxer.cc
++++ b/media/filters/ffmpeg_demuxer.cc
+@@ -427,11 +427,11 @@ void FFmpegDemuxerStream::EnqueuePacket(ScopedAVPacket packet) {
+   scoped_refptr<DecoderBuffer> buffer;
+ 
+   if (type() == DemuxerStream::TEXT) {
+-    size_t id_size = 0;
++    int id_size = 0;
+     uint8_t* id_data = av_packet_get_side_data(
+         packet.get(), AV_PKT_DATA_WEBVTT_IDENTIFIER, &id_size);
+ 
+-    size_t settings_size = 0;
++    int settings_size = 0;
+     uint8_t* settings_data = av_packet_get_side_data(
+         packet.get(), AV_PKT_DATA_WEBVTT_SETTINGS, &settings_size);
+ 
+@@ -443,7 +443,7 @@ void FFmpegDemuxerStream::EnqueuePacket(ScopedAVPacket packet) {
+     buffer = DecoderBuffer::CopyFrom(packet->data, packet->size,
+                                      side_data.data(), side_data.size());
+   } else {
+-    size_t side_data_size = 0;
++    int side_data_size = 0;
+     uint8_t* side_data = av_packet_get_side_data(
+         packet.get(), AV_PKT_DATA_MATROSKA_BLOCKADDITIONAL, &side_data_size);
+ 
+@@ -504,7 +504,7 @@ void FFmpegDemuxerStream::EnqueuePacket(ScopedAVPacket packet) {
+                                        packet->size - data_offset);
+     }
+ 
+-    size_t skip_samples_size = 0;
++    int skip_samples_size = 0;
+     const uint32_t* skip_samples_ptr =
+         reinterpret_cast<const uint32_t*>(av_packet_get_side_data(
+             packet.get(), AV_PKT_DATA_SKIP_SAMPLES, &skip_samples_size));

Deleted: fix-tag-dragging-in-KWin.patch
===================================================================
--- fix-tag-dragging-in-KWin.patch	2022-01-20 13:19:40 UTC (rev 434786)
+++ fix-tag-dragging-in-KWin.patch	2022-01-20 13:19:54 UTC (rev 434787)
@@ -1,35 +0,0 @@
-From 52d0ad25ea695da44195e49f36e69fa81b55e670 Mon Sep 17 00:00:00 2001
-From: Tom Anderson <thomasanderson at chromium.org>
-Date: Wed, 5 Jan 2022 21:11:03 +0000
-Subject: [PATCH] [X11] Fix tag dragging in KWin
-
-R=sky
-
-Bug: 1279532
-Change-Id: Iac166803e2149eef234045d922b630f0019c8073
-Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3355376
-Auto-Submit: Thomas Anderson <thomasanderson at chromium.org>
-Reviewed-by: Scott Violet <sky at chromium.org>
-Commit-Queue: Thomas Anderson <thomasanderson at chromium.org>
-Cr-Commit-Position: refs/heads/main@{#955869}
----
- ui/platform_window/x11/x11_topmost_window_finder.cc | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/ui/platform_window/x11/x11_topmost_window_finder.cc b/ui/platform_window/x11/x11_topmost_window_finder.cc
-index 50e75e17f0a..2e16393487b 100644
---- a/ui/platform_window/x11/x11_topmost_window_finder.cc
-+++ b/ui/platform_window/x11/x11_topmost_window_finder.cc
-@@ -68,9 +68,9 @@ bool EnumerateAllWindows(ShouldStopIteratingCallback should_stop_iterating,
- 
- void EnumerateTopLevelWindows(
-     ui::ShouldStopIteratingCallback should_stop_iterating) {
--  // Some WMs parent 'top-level' windows in unnamed actual top-level windows
--  // (ion WM), so extend the search depth to all children of top-level windows.
--  const int kMaxSearchDepth = 1;
-+  // WMs may reparent toplevel windows inside their own containers, so extend
-+  // the search to all grandchildren of all toplevel windows.
-+  const int kMaxSearchDepth = 2;
-   ui::EnumerateAllWindows(should_stop_iterating, kMaxSearchDepth);
- }
- 

Deleted: fix-tag-dragging-in-Mutter.patch
===================================================================
--- fix-tag-dragging-in-Mutter.patch	2022-01-20 13:19:40 UTC (rev 434786)
+++ fix-tag-dragging-in-Mutter.patch	2022-01-20 13:19:54 UTC (rev 434787)
@@ -1,46 +0,0 @@
-From 3806f28918ea23291749ff4775339075a5f394e8 Mon Sep 17 00:00:00 2001
-From: Tom Anderson <thomasanderson at chromium.org>
-Date: Thu, 6 Jan 2022 00:59:40 +0000
-Subject: [PATCH] [X11] Fix tag dragging in Mutter
-
-We used to use a BFS to find the target window for tag dragging, but
-this causes windows underneath (like the window for the desktop
-wallpaper) to take precedence over nested windows.
-
-This CL switches to a DFS.
-
-R=sky
-
-Bug: 1279532
-Change-Id: Ib569e9270be60bcb4fff088517dfe295697608b0
-Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3355470
-Reviewed-by: Scott Violet <sky at chromium.org>
-Commit-Queue: Thomas Anderson <thomasanderson at chromium.org>
-Auto-Submit: Thomas Anderson <thomasanderson at chromium.org>
-Cr-Commit-Position: refs/heads/main@{#955976}
----
- ui/platform_window/x11/x11_topmost_window_finder.cc | 11 ++---------
- 1 file changed, 2 insertions(+), 9 deletions(-)
-
-diff --git a/ui/platform_window/x11/x11_topmost_window_finder.cc b/ui/platform_window/x11/x11_topmost_window_finder.cc
-index 2e16393487b..e20bf0abf0e 100644
---- a/ui/platform_window/x11/x11_topmost_window_finder.cc
-+++ b/ui/platform_window/x11/x11_topmost_window_finder.cc
-@@ -44,15 +44,8 @@ bool EnumerateChildren(ShouldStopIteratingCallback should_stop_iterating,
-   for (iter = windows.rbegin(); iter != windows.rend(); iter++) {
-     if (IsWindowNamed(*iter) && should_stop_iterating.Run(*iter))
-       return true;
--  }
--
--  // If we're at this point, we didn't find the window we're looking for at the
--  // current level, so we need to recurse to the next level.  We use a second
--  // loop because the recursion and call to XQueryTree are expensive and is only
--  // needed for a small number of cases.
--  if (++depth <= max_depth) {
--    for (iter = windows.rbegin(); iter != windows.rend(); iter++) {
--      if (EnumerateChildren(should_stop_iterating, *iter, max_depth, depth))
-+    if (depth < max_depth) {
-+      if (EnumerateChildren(should_stop_iterating, *iter, max_depth, depth + 1))
-         return true;
-     }
-   }

Deleted: sql-make-VirtualCursor-standard-layout-type.patch
===================================================================
--- sql-make-VirtualCursor-standard-layout-type.patch	2022-01-20 13:19:40 UTC (rev 434786)
+++ sql-make-VirtualCursor-standard-layout-type.patch	2022-01-20 13:19:54 UTC (rev 434787)
@@ -1,238 +0,0 @@
-From 80368f8ba7a8bab13440463a254888311efe3986 Mon Sep 17 00:00:00 2001
-From: Stephan Hartmann <stha09 at googlemail.com>
-Date: Tue, 4 May 2021 15:00:19 +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. Replace std::unique_ptr with
-raw pointers.
-
-Bug: 1189788
-Change-Id: Ia6dc388cc5ef1c0f2afc75f8ca45b9f12687ca9c
----
- sql/recover_module/btree.cc  | 21 +++++++++++++++------
- sql/recover_module/btree.h   | 17 +++++++++++++----
- sql/recover_module/cursor.cc | 24 ++++++++++++------------
- sql/recover_module/cursor.h  |  2 +-
- sql/recover_module/pager.cc  |  7 +++----
- sql/recover_module/pager.h   |  5 +++--
- 6 files changed, 47 insertions(+), 29 deletions(-)
-
-diff --git a/sql/recover_module/btree.cc b/sql/recover_module/btree.cc
-index 9ecaafe8a3..839318abf9 100644
---- a/sql/recover_module/btree.cc
-+++ b/sql/recover_module/btree.cc
-@@ -135,16 +135,25 @@ 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) {
-+void LeafPageDecoder::Initialize(DatabasePageReader* db_reader) {
-+  DCHECK(db_reader);
-   DCHECK(IsOnValidPage(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(DatabasePageReader::IsValidPageId(page_id_));
- }
- 
-+void LeafPageDecoder::Reset() {
-+  db_reader_ = nullptr;
-+  page_id_ = 0;
-+  cell_count_ = 0;
-+  next_read_index_ = 0;
-+  last_record_size_ = 0;
-+}
-+
- 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 d76d076bf6..33114b01fa 100644
---- a/sql/recover_module/btree.h
-+++ b/sql/recover_module/btree.h
-@@ -102,7 +102,7 @@ class LeafPageDecoder {
-   //
-   // |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;
-+  explicit LeafPageDecoder() noexcept = default;
-   ~LeafPageDecoder() noexcept = default;
- 
-   LeafPageDecoder(const LeafPageDecoder&) = delete;
-@@ -150,6 +150,15 @@ class LeafPageDecoder {
-   // read as long as CanAdvance() returns true.
-   bool TryAdvance();
- 
-+  // Initialize with DatabasePageReader
-+  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.
-@@ -163,14 +172,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 0029ff9295..42548bc4b5 100644
---- a/sql/recover_module/cursor.cc
-+++ b/sql/recover_module/cursor.cc
-@@ -26,7 +26,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();
-@@ -36,18 +36,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())
-@@ -99,13 +99,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";
- 
-@@ -113,7 +113,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 afcd6900e1..b15c31d425 100644
---- a/sql/recover_module/cursor.h
-+++ b/sql/recover_module/cursor.h
-@@ -129,7 +129,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 58e75de270..5fe96204e5 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_(table) {
-   DCHECK(table != nullptr);
-   DCHECK(IsValidPageSize(table->page_size()));
- }
-@@ -57,8 +56,8 @@ int DatabasePageReader::ReadPage(int page_id) {
-                     std::numeric_limits<int64_t>::max(),
-                 "The |read_offset| computation above may overflow");
- 
--  int sqlite_status =
--      RawRead(sqlite_file, read_size, read_offset, page_data_.get());
-+  int sqlite_status = RawRead(sqlite_file, read_size, read_offset,
-+                              const_cast<uint8_t*>(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 0e388ddc3b..99314e30ff 100644
---- a/sql/recover_module/pager.h
-+++ b/sql/recover_module/pager.h
-@@ -5,6 +5,7 @@
- #ifndef SQL_RECOVER_MODULE_PAGER_H_
- #define SQL_RECOVER_MODULE_PAGER_H_
- 
-+#include <array>
- #include <cstdint>
- #include <memory>
- 
-@@ -70,7 +71,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.
-@@ -137,7 +138,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_;
-+  const std::array<uint8_t, kMaxPageSize> page_data_;
-   // Raw pointer usage is acceptable because this instance's owner is expected
-   // to ensure that the VirtualTable outlives this.
-   VirtualTable* const table_;

Copied: chromium/repos/extra-x86_64/sql-make-VirtualCursor-standard-layout-type.patch (from rev 434786, 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-01-20 13:19:54 UTC (rev 434787)
@@ -0,0 +1,238 @@
+From 80368f8ba7a8bab13440463a254888311efe3986 Mon Sep 17 00:00:00 2001
+From: Stephan Hartmann <stha09 at googlemail.com>
+Date: Tue, 4 May 2021 15:00:19 +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. Replace std::unique_ptr with
+raw pointers.
+
+Bug: 1189788
+Change-Id: Ia6dc388cc5ef1c0f2afc75f8ca45b9f12687ca9c
+---
+ sql/recover_module/btree.cc  | 21 +++++++++++++++------
+ sql/recover_module/btree.h   | 17 +++++++++++++----
+ sql/recover_module/cursor.cc | 24 ++++++++++++------------
+ sql/recover_module/cursor.h  |  2 +-
+ sql/recover_module/pager.cc  |  7 +++----
+ sql/recover_module/pager.h   |  5 +++--
+ 6 files changed, 47 insertions(+), 29 deletions(-)
+
+diff --git a/sql/recover_module/btree.cc b/sql/recover_module/btree.cc
+index 9ecaafe8a3..839318abf9 100644
+--- a/sql/recover_module/btree.cc
++++ b/sql/recover_module/btree.cc
+@@ -135,16 +135,25 @@ 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) {
++void LeafPageDecoder::Initialize(DatabasePageReader* db_reader) {
++  DCHECK(db_reader);
+   DCHECK(IsOnValidPage(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(DatabasePageReader::IsValidPageId(page_id_));
+ }
+ 
++void LeafPageDecoder::Reset() {
++  db_reader_ = nullptr;
++  page_id_ = 0;
++  cell_count_ = 0;
++  next_read_index_ = 0;
++  last_record_size_ = 0;
++}
++
+ 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 d76d076bf6..33114b01fa 100644
+--- a/sql/recover_module/btree.h
++++ b/sql/recover_module/btree.h
+@@ -102,7 +102,7 @@ class LeafPageDecoder {
+   //
+   // |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;
++  explicit LeafPageDecoder() noexcept = default;
+   ~LeafPageDecoder() noexcept = default;
+ 
+   LeafPageDecoder(const LeafPageDecoder&) = delete;
+@@ -150,6 +150,15 @@ class LeafPageDecoder {
+   // read as long as CanAdvance() returns true.
+   bool TryAdvance();
+ 
++  // Initialize with DatabasePageReader
++  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.
+@@ -163,14 +172,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 0029ff9295..42548bc4b5 100644
+--- a/sql/recover_module/cursor.cc
++++ b/sql/recover_module/cursor.cc
+@@ -26,7 +26,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();
+@@ -36,18 +36,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())
+@@ -99,13 +99,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";
+ 
+@@ -113,7 +113,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 afcd6900e1..b15c31d425 100644
+--- a/sql/recover_module/cursor.h
++++ b/sql/recover_module/cursor.h
+@@ -129,7 +129,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 58e75de270..5fe96204e5 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_(table) {
+   DCHECK(table != nullptr);
+   DCHECK(IsValidPageSize(table->page_size()));
+ }
+@@ -57,8 +56,8 @@ int DatabasePageReader::ReadPage(int page_id) {
+                     std::numeric_limits<int64_t>::max(),
+                 "The |read_offset| computation above may overflow");
+ 
+-  int sqlite_status =
+-      RawRead(sqlite_file, read_size, read_offset, page_data_.get());
++  int sqlite_status = RawRead(sqlite_file, read_size, read_offset,
++                              const_cast<uint8_t*>(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 0e388ddc3b..99314e30ff 100644
+--- a/sql/recover_module/pager.h
++++ b/sql/recover_module/pager.h
+@@ -5,6 +5,7 @@
+ #ifndef SQL_RECOVER_MODULE_PAGER_H_
+ #define SQL_RECOVER_MODULE_PAGER_H_
+ 
++#include <array>
+ #include <cstdint>
+ #include <memory>
+ 
+@@ -70,7 +71,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.
+@@ -137,7 +138,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_;
++  const std::array<uint8_t, kMaxPageSize> page_data_;
+   // Raw pointer usage is acceptable because this instance's owner is expected
+   // to ensure that the VirtualTable outlives this.
+   VirtualTable* const table_;

Deleted: unbundle-ffmpeg-av_stream_get_first_dts.patch
===================================================================
--- unbundle-ffmpeg-av_stream_get_first_dts.patch	2022-01-20 13:19:40 UTC (rev 434786)
+++ unbundle-ffmpeg-av_stream_get_first_dts.patch	2022-01-20 13:19:54 UTC (rev 434787)
@@ -1,12 +0,0 @@
-diff --git a/build/linux/unbundle/ffmpeg.gn b/build/linux/unbundle/ffmpeg.gn
-index 16e20744706..6a079b32221 100644
---- a/build/linux/unbundle/ffmpeg.gn
-+++ b/build/linux/unbundle/ffmpeg.gn
-@@ -12,6 +12,7 @@ pkg_config("system_ffmpeg") {
-     "libavformat",
-     "libavutil",
-   ]
-+  defines = [ "av_stream_get_first_dts(stream)=stream->first_dts" ]
- }
- 
- buildflag_header("ffmpeg_features") {

Copied: chromium/repos/extra-x86_64/unbundle-ffmpeg-av_stream_get_first_dts.patch (from rev 434786, chromium/trunk/unbundle-ffmpeg-av_stream_get_first_dts.patch)
===================================================================
--- unbundle-ffmpeg-av_stream_get_first_dts.patch	                        (rev 0)
+++ unbundle-ffmpeg-av_stream_get_first_dts.patch	2022-01-20 13:19:54 UTC (rev 434787)
@@ -0,0 +1,12 @@
+diff --git a/build/linux/unbundle/ffmpeg.gn b/build/linux/unbundle/ffmpeg.gn
+index 16e20744706..6a079b32221 100644
+--- a/build/linux/unbundle/ffmpeg.gn
++++ b/build/linux/unbundle/ffmpeg.gn
+@@ -12,6 +12,7 @@ pkg_config("system_ffmpeg") {
+     "libavformat",
+     "libavutil",
+   ]
++  defines = [ "av_stream_get_first_dts(stream)=stream->first_dts" ]
+ }
+ 
+ buildflag_header("ffmpeg_features") {

Deleted: unexpire-accelerated-video-decode-flag.patch
===================================================================
--- unexpire-accelerated-video-decode-flag.patch	2022-01-20 13:19:40 UTC (rev 434786)
+++ unexpire-accelerated-video-decode-flag.patch	2022-01-20 13:19:54 UTC (rev 434787)
@@ -1,11 +0,0 @@
---- chrome/browser/flag-metadata.json.orig	2021-09-21 18:34:38.740426608 +0000
-+++ chrome/browser/flag-metadata.json	2021-09-21 18:35:09.392000797 +0000
-@@ -1285,7 +1285,7 @@
-   {
-     "name": "enable-accelerated-video-decode",
-     "owners": [ "media-dev at chromium.org" ],
--    "expiry_milestone": 93
-+    "expiry_milestone": 99
-   },
-   {
-     "name": "enable-accessibility-live-caption",

Copied: chromium/repos/extra-x86_64/unexpire-accelerated-video-decode-flag.patch (from rev 434786, chromium/trunk/unexpire-accelerated-video-decode-flag.patch)
===================================================================
--- unexpire-accelerated-video-decode-flag.patch	                        (rev 0)
+++ unexpire-accelerated-video-decode-flag.patch	2022-01-20 13:19:54 UTC (rev 434787)
@@ -0,0 +1,11 @@
+--- chrome/browser/flag-metadata.json.orig	2021-09-21 18:34:38.740426608 +0000
++++ chrome/browser/flag-metadata.json	2021-09-21 18:35:09.392000797 +0000
+@@ -1285,7 +1285,7 @@
+   {
+     "name": "enable-accelerated-video-decode",
+     "owners": [ "media-dev at chromium.org" ],
+-    "expiry_milestone": 93
++    "expiry_milestone": 99
+   },
+   {
+     "name": "enable-accessibility-live-caption",

Deleted: use-oauth2-client-switches-as-default.patch
===================================================================
--- use-oauth2-client-switches-as-default.patch	2022-01-20 13:19:40 UTC (rev 434786)
+++ use-oauth2-client-switches-as-default.patch	2022-01-20 13:19:54 UTC (rev 434787)
@@ -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 434786, 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-01-20 13:19:54 UTC (rev 434787)
@@ -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



More information about the arch-commits mailing list