Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] chromium: update to 98.0.4758.80.
@ 2022-02-02 19:49 Duncaen
  2022-02-03 14:04 ` [PR PATCH] [Updated] " Duncaen
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Duncaen @ 2022-02-02 19:49 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 398 bytes --]

There is a new pull request by Duncaen against master on the void-packages repository

https://github.com/Duncaen/void-packages chromium-98
https://github.com/void-linux/void-packages/pull/35359

chromium: update to 98.0.4758.80.
[ci skip]

* [ ] x86_64
* [ ] x86_64-musl
* [ ] i686
* [ ] aarch64-musl

A patch file from https://github.com/void-linux/void-packages/pull/35359.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-chromium-98-35359.patch --]
[-- Type: text/x-diff, Size: 13956 bytes --]

From 9b9a0fbed1b4e25973dd8a5a2408290401c1ba86 Mon Sep 17 00:00:00 2001
From: Duncaen <duncaen@voidlinux.org>
Date: Wed, 2 Feb 2022 16:22:24 +0100
Subject: [PATCH] chromium: update to 98.0.4758.80.

---
 .../patches/chromium-system-nodejs.patch      | 18 ++---
 ...ngrade-duplicate-peer-error-to-dvlog.patch | 33 +++++++++
 .../fix-bits-stdint-intn-include.patch        | 11 ---
 .../fix-build-break-with-system-libdrm.patch  | 62 ++++++++++++++++
 ...ne_MM_Var-in-CFX_Font-AdjustMMParams.patch | 72 +++++++++++++++++++
 .../patches/xxx-ppc64le-support.patch         | 31 --------
 srcpkgs/chromium/template                     |  4 +-
 7 files changed, 178 insertions(+), 53 deletions(-)
 create mode 100644 srcpkgs/chromium/patches/downgrade-duplicate-peer-error-to-dvlog.patch
 delete mode 100644 srcpkgs/chromium/patches/fix-bits-stdint-intn-include.patch
 create mode 100644 srcpkgs/chromium/patches/fix-build-break-with-system-libdrm.patch
 create mode 100644 srcpkgs/chromium/patches/use-FT_Done_MM_Var-in-CFX_Font-AdjustMMParams.patch

diff --git a/srcpkgs/chromium/patches/chromium-system-nodejs.patch b/srcpkgs/chromium/patches/chromium-system-nodejs.patch
index eff56ba7602f..83e8b93b9fcf 100644
--- a/srcpkgs/chromium/patches/chromium-system-nodejs.patch
+++ b/srcpkgs/chromium/patches/chromium-system-nodejs.patch
@@ -1,20 +1,20 @@
---- a/third_party/node/node.py	2021-05-20 04:17:54.000000000 +0200
-+++ b/third_party/node/node.py	2021-05-20 04:17:54.000000000 +0200
-@@ -17,11 +17,12 @@
-   if platform.system() == 'Darwin' and platform.machine() == 'arm64':
-       return os.path.join(os_path.join(os_path.dirname(__file__), 'mac',
-                           'node-darwin-arm64', 'bin', 'node'))
+--- a/third_party/node/node.py
++++ b/third_party/node/node.py
+@@ -13,11 +13,12 @@
+ def GetBinaryPath():
+   darwin_name = ('node-darwin-arm64' if platform.machine() == 'arm64' else
+                  'node-darwin-x64')
 -  return os_path.join(os_path.dirname(__file__), *{
--    'Darwin': ('mac', 'node-darwin-x64', 'bin', 'node'),
+-    'Darwin': ('mac', darwin_name, 'bin', 'node'),
 -    'Linux': ('linux', 'node-linux-x64', 'bin', 'node'),
 -    'Windows': ('win', 'node.exe'),
 -  }[platform.system()])
-+  return "/usr/bin/node"
 +  #return os_path.join(os_path.dirname(__file__), *{
-+  #  'Darwin': ('mac', 'node-darwin-x64', 'bin', 'node'),
++  #  'Darwin': ('mac', darwin_name, 'bin', 'node'),
 +  #  'Linux': ('linux', 'node-linux-x64', 'bin', 'node'),
 +  #  'Windows': ('win', 'node.exe'),
 +  #}[platform.system()])
++  return "/usr/bin/node"
  
  
  def RunNode(cmd_parts, stdout=None):
diff --git a/srcpkgs/chromium/patches/downgrade-duplicate-peer-error-to-dvlog.patch b/srcpkgs/chromium/patches/downgrade-duplicate-peer-error-to-dvlog.patch
new file mode 100644
index 000000000000..e07127a473d0
--- /dev/null
+++ b/srcpkgs/chromium/patches/downgrade-duplicate-peer-error-to-dvlog.patch
@@ -0,0 +1,33 @@
+From 00604ca8ed6d669fb6cb3ae8bacd6028d5ef10ac Mon Sep 17 00:00:00 2001
+From: Stephen Roettger <sroettger@google.com>
+Date: Thu, 20 Jan 2022 10:04:04 +0000
+Subject: [PATCH] Downgrade duplicate peer error to dvlog
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Downgrading since this case can happen in non-error situations. There can be
+duplicate introductions in flight in which case we simply drop the second one.
+
+Change-Id: I2c51b177913ccd9634e9bb6343d468101d9735ed
+Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3398794
+Reviewed-by: Ken Rockot <rockot@google.com>
+Commit-Queue: Stephen Röttger <sroettger@google.com>
+Cr-Commit-Position: refs/heads/main@{#961389}
+---
+ mojo/core/node_controller.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/mojo/core/node_controller.cc b/mojo/core/node_controller.cc
+index 7cde7719687..81712676733 100644
+--- a/mojo/core/node_controller.cc
++++ b/mojo/core/node_controller.cc
+@@ -594,7 +594,7 @@ void NodeController::AddPeer(const ports::NodeName& name,
+     }
+ 
+     if (dropped_peers_.Contains(name) && !allow_name_reuse) {
+-      LOG(ERROR) << "Trying to re-add dropped peer " << name;
++      DVLOG(1) << "Trying to re-add dropped peer " << name;
+       return;
+     }
+ 
diff --git a/srcpkgs/chromium/patches/fix-bits-stdint-intn-include.patch b/srcpkgs/chromium/patches/fix-bits-stdint-intn-include.patch
deleted file mode 100644
index 978cd6a493d6..000000000000
--- a/srcpkgs/chromium/patches/fix-bits-stdint-intn-include.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/ui/ozone/platform/wayland/host/wayland_window.cc.orig
-+++ b/ui/ozone/platform/wayland/host/wayland_window.cc
-@@ -4,7 +4,7 @@
- 
- #include "ui/ozone/platform/wayland/host/wayland_window.h"
- 
--#include <bits/stdint-intn.h>
-+#include <stdint.h>
- #include <wayland-cursor.h>
- #include <algorithm>
- #include <memory>
diff --git a/srcpkgs/chromium/patches/fix-build-break-with-system-libdrm.patch b/srcpkgs/chromium/patches/fix-build-break-with-system-libdrm.patch
new file mode 100644
index 000000000000..fe8eee6d1e94
--- /dev/null
+++ b/srcpkgs/chromium/patches/fix-build-break-with-system-libdrm.patch
@@ -0,0 +1,62 @@
+From 5b287e0be8d8d8475ec6ef81b16eaa61e19db078 Mon Sep 17 00:00:00 2001
+From: "Steinar H. Gunderson" <sesse@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@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@chromium.org>
+Commit-Queue: Steinar H Gunderson <sesse@chromium.org>
+Auto-Submit: Steinar H Gunderson <sesse@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@apap04.com>
+ Andrei Borza <andrei.borza@gmail.com>
+ Andrei Parvu <andrei.prv@gmail.com>
+ Andrei Parvu <parvu@adobe.com>
++Andres Salomon <dilinger@queued.net>
+ Andreu Botella <andreu@andreubotella.com>
+ Andrew Boyarshin <andrew.boyarshin@gmail.com>
+ Andrew Brampton <me@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
diff --git a/srcpkgs/chromium/patches/use-FT_Done_MM_Var-in-CFX_Font-AdjustMMParams.patch b/srcpkgs/chromium/patches/use-FT_Done_MM_Var-in-CFX_Font-AdjustMMParams.patch
new file mode 100644
index 000000000000..9e3b07920f17
--- /dev/null
+++ b/srcpkgs/chromium/patches/use-FT_Done_MM_Var-in-CFX_Font-AdjustMMParams.patch
@@ -0,0 +1,72 @@
+From cb0aad687f34629a42053d600cf2947282cea2c0 Mon Sep 17 00:00:00 2001
+From: Lei Zhang <thestig@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@chromium.org>
+Commit-Queue: Lei Zhang <thestig@chromium.org>
+
+(cherry picked from commit ffeb67faf715475f6e463d65c368f556780adf19)
+---
+ 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 7a4e8eb24..0ef421fe7 100644
+--- a/third_party/pdfium/core/fxge/cfx_font.cpp
++++ b/third_party/pdfium/core/fxge/cfx_font.cpp
+@@ -43,6 +43,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 !defined(OS_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 defined(OS_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);
++  }
++}
++
+ #ifdef PDF_ENABLE_XFA
+ unsigned long FTStreamRead(FXFT_StreamRec* stream,
+                            unsigned long offset,
+@@ -640,14 +664,14 @@ void CFX_Font::AdjustMMParams(int glyph_index,
+     int 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;
+     }
+     int param = min_param + (max_param - min_param) * (dest_width - min_width) /
+                                 (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);
+ }
+ 
diff --git a/srcpkgs/chromium/patches/xxx-ppc64le-support.patch b/srcpkgs/chromium/patches/xxx-ppc64le-support.patch
index 2f66a144e269..e0ceb4c40842 100644
--- a/srcpkgs/chromium/patches/xxx-ppc64le-support.patch
+++ b/srcpkgs/chromium/patches/xxx-ppc64le-support.patch
@@ -1007,19 +1007,6 @@ index 2b78a0cc3..0a70f5ea5 100644
 +
  #endif  // SANDBOX_LINUX_SYSTEM_HEADERS_LINUX_SYSCALLS_H_
  
-diff --git a/sandbox/linux/system_headers/linux_ucontext.h b/sandbox/linux/system_headers/linux_ucontext.h
-index 22ce78027..a69b024c2 100644
---- a/sandbox/linux/system_headers/linux_ucontext.h
-+++ b/sandbox/linux/system_headers/linux_ucontext.h
-@@ -11,6 +11,8 @@
- #include "sandbox/linux/system_headers/arm_linux_ucontext.h"
- #elif defined(__i386__)
- #include "sandbox/linux/system_headers/i386_linux_ucontext.h"
-+#elif defined(__powerpc64__)
-+#include "sandbox/linux/system_headers/ppc64_linux_ucontext.h"
- #else
- #error "No support for your architecture in PNaCl header"
- #endif
 diff --git a/sandbox/linux/system_headers/ppc64_linux_syscalls.h b/sandbox/linux/system_headers/ppc64_linux_syscalls.h
 new file mode 100644
 index 000000000..ccacffe22
@@ -1038,24 +1025,6 @@ index 000000000..ccacffe22
 +//TODO: is it necessary to redefine syscall numbers for PPC64?
 +
 +#endif  // SANDBOX_LINUX_SYSTEM_HEADERS_PPC64_LINUX_SYSCALLS_H_
-diff --git a/sandbox/linux/system_headers/ppc64_linux_ucontext.h b/sandbox/linux/system_headers/ppc64_linux_ucontext.h
-new file mode 100644
-index 000000000..07728e087
---- /dev/null
-+++ b/sandbox/linux/system_headers/ppc64_linux_ucontext.h
-@@ -0,0 +1,12 @@
-+// Copyright 2014 The Chromium Authors. All rights reserved.
-+// Use of this source code is governed by a BSD-style license that can be
-+// found in the LICENSE file.
-+
-+#ifndef SANDBOX_LINUX_SYSTEM_HEADERS_PPC64_LINUX_UCONTEXT_H_
-+#define SANDBOX_LINUX_SYSTEM_HEADERS_PPC64_LINUX_UCONTEXT_H_
-+
-+#include <sys/ucontext.h>
-+
-+//TODO: is it necessary to redefine ucontext on PPC64?
-+
-+#endif  // SANDBOX_LINUX_SYSTEM_HEADERS_PPC64_LINUX_UCONTEXT_H_
 diff --git a/sandbox/policy/linux/bpf_renderer_policy_linux.cc b/sandbox/policy/linux/bpf_renderer_policy_linux.cc
 index 2588fc792..d455c4601 100644
 --- a/sandbox/policy/linux/bpf_renderer_policy_linux.cc
diff --git a/srcpkgs/chromium/template b/srcpkgs/chromium/template
index 453aabb5b08a..7b3031bf840f 100644
--- a/srcpkgs/chromium/template
+++ b/srcpkgs/chromium/template
@@ -1,7 +1,7 @@
 # Template file for 'chromium'
 pkgname=chromium
 # See https://chromiumdash.appspot.com/releases?platform=Linux for the latest version
-version=97.0.4692.99
+version=98.0.4758.80
 revision=1
 archs="i686* x86_64* aarch64* armv7l* ppc64le*"
 short_desc="Google's attempt at creating a safer, faster, and more stable browser"
@@ -9,7 +9,7 @@ maintainer="Duncaen <duncaen@voidlinux.org>"
 license="BSD-3-Clause"
 homepage="https://www.chromium.org/"
 distfiles="https://commondatastorage.googleapis.com/chromium-browser-official/${pkgname}-${version}.tar.xz"
-checksum=c91bae205705b367f2cfc1f72ce1ee99b2ceb5edfc584e15c60a6ab5ff01ecba
+checksum=c87266e20f860a32c48affc70a769368d1b876dbad768e3aa93ee3c335944171
 
 lib32disabled=yes
 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PR PATCH] [Updated] chromium: update to 98.0.4758.80.
  2022-02-02 19:49 [PR PATCH] chromium: update to 98.0.4758.80 Duncaen
@ 2022-02-03 14:04 ` Duncaen
  2022-02-04 13:39 ` Duncaen
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Duncaen @ 2022-02-03 14:04 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 403 bytes --]

There is an updated pull request by Duncaen against master on the void-packages repository

https://github.com/Duncaen/void-packages chromium-98
https://github.com/void-linux/void-packages/pull/35359

chromium: update to 98.0.4758.80.
[ci skip]

* [ ] x86_64
* [ ] x86_64-musl
* [ ] i686
* [ ] aarch64-musl

A patch file from https://github.com/void-linux/void-packages/pull/35359.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-chromium-98-35359.patch --]
[-- Type: text/x-diff, Size: 14739 bytes --]

From 602bd471969509232c0e10b22d1f1ef467765f1f Mon Sep 17 00:00:00 2001
From: Duncaen <duncaen@voidlinux.org>
Date: Wed, 2 Feb 2022 16:22:24 +0100
Subject: [PATCH] chromium: update to 98.0.4758.80.

---
 .../files/musl-patches/resolver.patch         |  4 +-
 .../patches/chromium-system-nodejs.patch      | 18 ++---
 ...ngrade-duplicate-peer-error-to-dvlog.patch | 33 +++++++++
 .../fix-bits-stdint-intn-include.patch        | 11 ---
 .../fix-build-break-with-system-libdrm.patch  | 62 ++++++++++++++++
 ...ne_MM_Var-in-CFX_Font-AdjustMMParams.patch | 72 +++++++++++++++++++
 .../patches/xxx-ppc64le-support.patch         | 31 --------
 srcpkgs/chromium/template                     |  4 +-
 8 files changed, 180 insertions(+), 55 deletions(-)
 create mode 100644 srcpkgs/chromium/patches/downgrade-duplicate-peer-error-to-dvlog.patch
 delete mode 100644 srcpkgs/chromium/patches/fix-bits-stdint-intn-include.patch
 create mode 100644 srcpkgs/chromium/patches/fix-build-break-with-system-libdrm.patch
 create mode 100644 srcpkgs/chromium/patches/use-FT_Done_MM_Var-in-CFX_Font-AdjustMMParams.patch

diff --git a/srcpkgs/chromium/files/musl-patches/resolver.patch b/srcpkgs/chromium/files/musl-patches/resolver.patch
index 3c2563b7824f..9de49bf328fb 100644
--- a/srcpkgs/chromium/files/musl-patches/resolver.patch
+++ b/srcpkgs/chromium/files/musl-patches/resolver.patch
@@ -30,8 +30,8 @@
    base::ScopedBlockingCall scoped_blocking_call(FROM_HERE,
                                                  base::BlockingType::WILL_BLOCK);
  
--#if defined(OS_POSIX) && !defined(OS_APPLE) && !defined(OS_OPENBSD) && \
--    !defined(OS_ANDROID) && !defined(OS_FUCHSIA)
+-#if defined(OS_POSIX) && \
+-    !(defined(OS_APPLE) || defined(OS_OPENBSD) || defined(OS_ANDROID))
 +#if defined(__GLIBC__)
    DnsReloaderMaybeReload();
  #endif
diff --git a/srcpkgs/chromium/patches/chromium-system-nodejs.patch b/srcpkgs/chromium/patches/chromium-system-nodejs.patch
index eff56ba7602f..83e8b93b9fcf 100644
--- a/srcpkgs/chromium/patches/chromium-system-nodejs.patch
+++ b/srcpkgs/chromium/patches/chromium-system-nodejs.patch
@@ -1,20 +1,20 @@
---- a/third_party/node/node.py	2021-05-20 04:17:54.000000000 +0200
-+++ b/third_party/node/node.py	2021-05-20 04:17:54.000000000 +0200
-@@ -17,11 +17,12 @@
-   if platform.system() == 'Darwin' and platform.machine() == 'arm64':
-       return os.path.join(os_path.join(os_path.dirname(__file__), 'mac',
-                           'node-darwin-arm64', 'bin', 'node'))
+--- a/third_party/node/node.py
++++ b/third_party/node/node.py
+@@ -13,11 +13,12 @@
+ def GetBinaryPath():
+   darwin_name = ('node-darwin-arm64' if platform.machine() == 'arm64' else
+                  'node-darwin-x64')
 -  return os_path.join(os_path.dirname(__file__), *{
--    'Darwin': ('mac', 'node-darwin-x64', 'bin', 'node'),
+-    'Darwin': ('mac', darwin_name, 'bin', 'node'),
 -    'Linux': ('linux', 'node-linux-x64', 'bin', 'node'),
 -    'Windows': ('win', 'node.exe'),
 -  }[platform.system()])
-+  return "/usr/bin/node"
 +  #return os_path.join(os_path.dirname(__file__), *{
-+  #  'Darwin': ('mac', 'node-darwin-x64', 'bin', 'node'),
++  #  'Darwin': ('mac', darwin_name, 'bin', 'node'),
 +  #  'Linux': ('linux', 'node-linux-x64', 'bin', 'node'),
 +  #  'Windows': ('win', 'node.exe'),
 +  #}[platform.system()])
++  return "/usr/bin/node"
  
  
  def RunNode(cmd_parts, stdout=None):
diff --git a/srcpkgs/chromium/patches/downgrade-duplicate-peer-error-to-dvlog.patch b/srcpkgs/chromium/patches/downgrade-duplicate-peer-error-to-dvlog.patch
new file mode 100644
index 000000000000..e07127a473d0
--- /dev/null
+++ b/srcpkgs/chromium/patches/downgrade-duplicate-peer-error-to-dvlog.patch
@@ -0,0 +1,33 @@
+From 00604ca8ed6d669fb6cb3ae8bacd6028d5ef10ac Mon Sep 17 00:00:00 2001
+From: Stephen Roettger <sroettger@google.com>
+Date: Thu, 20 Jan 2022 10:04:04 +0000
+Subject: [PATCH] Downgrade duplicate peer error to dvlog
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Downgrading since this case can happen in non-error situations. There can be
+duplicate introductions in flight in which case we simply drop the second one.
+
+Change-Id: I2c51b177913ccd9634e9bb6343d468101d9735ed
+Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3398794
+Reviewed-by: Ken Rockot <rockot@google.com>
+Commit-Queue: Stephen Röttger <sroettger@google.com>
+Cr-Commit-Position: refs/heads/main@{#961389}
+---
+ mojo/core/node_controller.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/mojo/core/node_controller.cc b/mojo/core/node_controller.cc
+index 7cde7719687..81712676733 100644
+--- a/mojo/core/node_controller.cc
++++ b/mojo/core/node_controller.cc
+@@ -594,7 +594,7 @@ void NodeController::AddPeer(const ports::NodeName& name,
+     }
+ 
+     if (dropped_peers_.Contains(name) && !allow_name_reuse) {
+-      LOG(ERROR) << "Trying to re-add dropped peer " << name;
++      DVLOG(1) << "Trying to re-add dropped peer " << name;
+       return;
+     }
+ 
diff --git a/srcpkgs/chromium/patches/fix-bits-stdint-intn-include.patch b/srcpkgs/chromium/patches/fix-bits-stdint-intn-include.patch
deleted file mode 100644
index 978cd6a493d6..000000000000
--- a/srcpkgs/chromium/patches/fix-bits-stdint-intn-include.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/ui/ozone/platform/wayland/host/wayland_window.cc.orig
-+++ b/ui/ozone/platform/wayland/host/wayland_window.cc
-@@ -4,7 +4,7 @@
- 
- #include "ui/ozone/platform/wayland/host/wayland_window.h"
- 
--#include <bits/stdint-intn.h>
-+#include <stdint.h>
- #include <wayland-cursor.h>
- #include <algorithm>
- #include <memory>
diff --git a/srcpkgs/chromium/patches/fix-build-break-with-system-libdrm.patch b/srcpkgs/chromium/patches/fix-build-break-with-system-libdrm.patch
new file mode 100644
index 000000000000..fe8eee6d1e94
--- /dev/null
+++ b/srcpkgs/chromium/patches/fix-build-break-with-system-libdrm.patch
@@ -0,0 +1,62 @@
+From 5b287e0be8d8d8475ec6ef81b16eaa61e19db078 Mon Sep 17 00:00:00 2001
+From: "Steinar H. Gunderson" <sesse@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@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@chromium.org>
+Commit-Queue: Steinar H Gunderson <sesse@chromium.org>
+Auto-Submit: Steinar H Gunderson <sesse@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@apap04.com>
+ Andrei Borza <andrei.borza@gmail.com>
+ Andrei Parvu <andrei.prv@gmail.com>
+ Andrei Parvu <parvu@adobe.com>
++Andres Salomon <dilinger@queued.net>
+ Andreu Botella <andreu@andreubotella.com>
+ Andrew Boyarshin <andrew.boyarshin@gmail.com>
+ Andrew Brampton <me@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
diff --git a/srcpkgs/chromium/patches/use-FT_Done_MM_Var-in-CFX_Font-AdjustMMParams.patch b/srcpkgs/chromium/patches/use-FT_Done_MM_Var-in-CFX_Font-AdjustMMParams.patch
new file mode 100644
index 000000000000..9e3b07920f17
--- /dev/null
+++ b/srcpkgs/chromium/patches/use-FT_Done_MM_Var-in-CFX_Font-AdjustMMParams.patch
@@ -0,0 +1,72 @@
+From cb0aad687f34629a42053d600cf2947282cea2c0 Mon Sep 17 00:00:00 2001
+From: Lei Zhang <thestig@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@chromium.org>
+Commit-Queue: Lei Zhang <thestig@chromium.org>
+
+(cherry picked from commit ffeb67faf715475f6e463d65c368f556780adf19)
+---
+ 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 7a4e8eb24..0ef421fe7 100644
+--- a/third_party/pdfium/core/fxge/cfx_font.cpp
++++ b/third_party/pdfium/core/fxge/cfx_font.cpp
+@@ -43,6 +43,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 !defined(OS_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 defined(OS_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);
++  }
++}
++
+ #ifdef PDF_ENABLE_XFA
+ unsigned long FTStreamRead(FXFT_StreamRec* stream,
+                            unsigned long offset,
+@@ -640,14 +664,14 @@ void CFX_Font::AdjustMMParams(int glyph_index,
+     int 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;
+     }
+     int param = min_param + (max_param - min_param) * (dest_width - min_width) /
+                                 (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);
+ }
+ 
diff --git a/srcpkgs/chromium/patches/xxx-ppc64le-support.patch b/srcpkgs/chromium/patches/xxx-ppc64le-support.patch
index 2f66a144e269..e0ceb4c40842 100644
--- a/srcpkgs/chromium/patches/xxx-ppc64le-support.patch
+++ b/srcpkgs/chromium/patches/xxx-ppc64le-support.patch
@@ -1007,19 +1007,6 @@ index 2b78a0cc3..0a70f5ea5 100644
 +
  #endif  // SANDBOX_LINUX_SYSTEM_HEADERS_LINUX_SYSCALLS_H_
  
-diff --git a/sandbox/linux/system_headers/linux_ucontext.h b/sandbox/linux/system_headers/linux_ucontext.h
-index 22ce78027..a69b024c2 100644
---- a/sandbox/linux/system_headers/linux_ucontext.h
-+++ b/sandbox/linux/system_headers/linux_ucontext.h
-@@ -11,6 +11,8 @@
- #include "sandbox/linux/system_headers/arm_linux_ucontext.h"
- #elif defined(__i386__)
- #include "sandbox/linux/system_headers/i386_linux_ucontext.h"
-+#elif defined(__powerpc64__)
-+#include "sandbox/linux/system_headers/ppc64_linux_ucontext.h"
- #else
- #error "No support for your architecture in PNaCl header"
- #endif
 diff --git a/sandbox/linux/system_headers/ppc64_linux_syscalls.h b/sandbox/linux/system_headers/ppc64_linux_syscalls.h
 new file mode 100644
 index 000000000..ccacffe22
@@ -1038,24 +1025,6 @@ index 000000000..ccacffe22
 +//TODO: is it necessary to redefine syscall numbers for PPC64?
 +
 +#endif  // SANDBOX_LINUX_SYSTEM_HEADERS_PPC64_LINUX_SYSCALLS_H_
-diff --git a/sandbox/linux/system_headers/ppc64_linux_ucontext.h b/sandbox/linux/system_headers/ppc64_linux_ucontext.h
-new file mode 100644
-index 000000000..07728e087
---- /dev/null
-+++ b/sandbox/linux/system_headers/ppc64_linux_ucontext.h
-@@ -0,0 +1,12 @@
-+// Copyright 2014 The Chromium Authors. All rights reserved.
-+// Use of this source code is governed by a BSD-style license that can be
-+// found in the LICENSE file.
-+
-+#ifndef SANDBOX_LINUX_SYSTEM_HEADERS_PPC64_LINUX_UCONTEXT_H_
-+#define SANDBOX_LINUX_SYSTEM_HEADERS_PPC64_LINUX_UCONTEXT_H_
-+
-+#include <sys/ucontext.h>
-+
-+//TODO: is it necessary to redefine ucontext on PPC64?
-+
-+#endif  // SANDBOX_LINUX_SYSTEM_HEADERS_PPC64_LINUX_UCONTEXT_H_
 diff --git a/sandbox/policy/linux/bpf_renderer_policy_linux.cc b/sandbox/policy/linux/bpf_renderer_policy_linux.cc
 index 2588fc792..d455c4601 100644
 --- a/sandbox/policy/linux/bpf_renderer_policy_linux.cc
diff --git a/srcpkgs/chromium/template b/srcpkgs/chromium/template
index 453aabb5b08a..7b3031bf840f 100644
--- a/srcpkgs/chromium/template
+++ b/srcpkgs/chromium/template
@@ -1,7 +1,7 @@
 # Template file for 'chromium'
 pkgname=chromium
 # See https://chromiumdash.appspot.com/releases?platform=Linux for the latest version
-version=97.0.4692.99
+version=98.0.4758.80
 revision=1
 archs="i686* x86_64* aarch64* armv7l* ppc64le*"
 short_desc="Google's attempt at creating a safer, faster, and more stable browser"
@@ -9,7 +9,7 @@ maintainer="Duncaen <duncaen@voidlinux.org>"
 license="BSD-3-Clause"
 homepage="https://www.chromium.org/"
 distfiles="https://commondatastorage.googleapis.com/chromium-browser-official/${pkgname}-${version}.tar.xz"
-checksum=c91bae205705b367f2cfc1f72ce1ee99b2ceb5edfc584e15c60a6ab5ff01ecba
+checksum=c87266e20f860a32c48affc70a769368d1b876dbad768e3aa93ee3c335944171
 
 lib32disabled=yes
 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PR PATCH] [Updated] chromium: update to 98.0.4758.80.
  2022-02-02 19:49 [PR PATCH] chromium: update to 98.0.4758.80 Duncaen
  2022-02-03 14:04 ` [PR PATCH] [Updated] " Duncaen
@ 2022-02-04 13:39 ` Duncaen
  2022-02-05  7:06 ` [PR PATCH] [Merged]: " q66
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Duncaen @ 2022-02-04 13:39 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 412 bytes --]

There is an updated pull request by Duncaen against master on the void-packages repository

https://github.com/Duncaen/void-packages chromium-98
https://github.com/void-linux/void-packages/pull/35359

chromium: update to 98.0.4758.80.
[ci skip]

* [x] x86_64 (tested)
* [x] x86_64-musl
* [x] i686
* [x] aarch64-musl

A patch file from https://github.com/void-linux/void-packages/pull/35359.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-chromium-98-35359.patch --]
[-- Type: text/x-diff, Size: 14739 bytes --]

From 5c191fe81f1684ae81f9f5890d1446c434023576 Mon Sep 17 00:00:00 2001
From: Duncaen <duncaen@voidlinux.org>
Date: Wed, 2 Feb 2022 16:22:24 +0100
Subject: [PATCH] chromium: update to 98.0.4758.80.

---
 .../files/musl-patches/resolver.patch         |  4 +-
 .../patches/chromium-system-nodejs.patch      | 18 ++---
 ...ngrade-duplicate-peer-error-to-dvlog.patch | 33 +++++++++
 .../fix-bits-stdint-intn-include.patch        | 11 ---
 .../fix-build-break-with-system-libdrm.patch  | 62 ++++++++++++++++
 ...ne_MM_Var-in-CFX_Font-AdjustMMParams.patch | 72 +++++++++++++++++++
 .../patches/xxx-ppc64le-support.patch         | 31 --------
 srcpkgs/chromium/template                     |  4 +-
 8 files changed, 180 insertions(+), 55 deletions(-)
 create mode 100644 srcpkgs/chromium/patches/downgrade-duplicate-peer-error-to-dvlog.patch
 delete mode 100644 srcpkgs/chromium/patches/fix-bits-stdint-intn-include.patch
 create mode 100644 srcpkgs/chromium/patches/fix-build-break-with-system-libdrm.patch
 create mode 100644 srcpkgs/chromium/patches/use-FT_Done_MM_Var-in-CFX_Font-AdjustMMParams.patch

diff --git a/srcpkgs/chromium/files/musl-patches/resolver.patch b/srcpkgs/chromium/files/musl-patches/resolver.patch
index 3c2563b7824f..9de49bf328fb 100644
--- a/srcpkgs/chromium/files/musl-patches/resolver.patch
+++ b/srcpkgs/chromium/files/musl-patches/resolver.patch
@@ -30,8 +30,8 @@
    base::ScopedBlockingCall scoped_blocking_call(FROM_HERE,
                                                  base::BlockingType::WILL_BLOCK);
  
--#if defined(OS_POSIX) && !defined(OS_APPLE) && !defined(OS_OPENBSD) && \
--    !defined(OS_ANDROID) && !defined(OS_FUCHSIA)
+-#if defined(OS_POSIX) && \
+-    !(defined(OS_APPLE) || defined(OS_OPENBSD) || defined(OS_ANDROID))
 +#if defined(__GLIBC__)
    DnsReloaderMaybeReload();
  #endif
diff --git a/srcpkgs/chromium/patches/chromium-system-nodejs.patch b/srcpkgs/chromium/patches/chromium-system-nodejs.patch
index eff56ba7602f..83e8b93b9fcf 100644
--- a/srcpkgs/chromium/patches/chromium-system-nodejs.patch
+++ b/srcpkgs/chromium/patches/chromium-system-nodejs.patch
@@ -1,20 +1,20 @@
---- a/third_party/node/node.py	2021-05-20 04:17:54.000000000 +0200
-+++ b/third_party/node/node.py	2021-05-20 04:17:54.000000000 +0200
-@@ -17,11 +17,12 @@
-   if platform.system() == 'Darwin' and platform.machine() == 'arm64':
-       return os.path.join(os_path.join(os_path.dirname(__file__), 'mac',
-                           'node-darwin-arm64', 'bin', 'node'))
+--- a/third_party/node/node.py
++++ b/third_party/node/node.py
+@@ -13,11 +13,12 @@
+ def GetBinaryPath():
+   darwin_name = ('node-darwin-arm64' if platform.machine() == 'arm64' else
+                  'node-darwin-x64')
 -  return os_path.join(os_path.dirname(__file__), *{
--    'Darwin': ('mac', 'node-darwin-x64', 'bin', 'node'),
+-    'Darwin': ('mac', darwin_name, 'bin', 'node'),
 -    'Linux': ('linux', 'node-linux-x64', 'bin', 'node'),
 -    'Windows': ('win', 'node.exe'),
 -  }[platform.system()])
-+  return "/usr/bin/node"
 +  #return os_path.join(os_path.dirname(__file__), *{
-+  #  'Darwin': ('mac', 'node-darwin-x64', 'bin', 'node'),
++  #  'Darwin': ('mac', darwin_name, 'bin', 'node'),
 +  #  'Linux': ('linux', 'node-linux-x64', 'bin', 'node'),
 +  #  'Windows': ('win', 'node.exe'),
 +  #}[platform.system()])
++  return "/usr/bin/node"
  
  
  def RunNode(cmd_parts, stdout=None):
diff --git a/srcpkgs/chromium/patches/downgrade-duplicate-peer-error-to-dvlog.patch b/srcpkgs/chromium/patches/downgrade-duplicate-peer-error-to-dvlog.patch
new file mode 100644
index 000000000000..e07127a473d0
--- /dev/null
+++ b/srcpkgs/chromium/patches/downgrade-duplicate-peer-error-to-dvlog.patch
@@ -0,0 +1,33 @@
+From 00604ca8ed6d669fb6cb3ae8bacd6028d5ef10ac Mon Sep 17 00:00:00 2001
+From: Stephen Roettger <sroettger@google.com>
+Date: Thu, 20 Jan 2022 10:04:04 +0000
+Subject: [PATCH] Downgrade duplicate peer error to dvlog
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Downgrading since this case can happen in non-error situations. There can be
+duplicate introductions in flight in which case we simply drop the second one.
+
+Change-Id: I2c51b177913ccd9634e9bb6343d468101d9735ed
+Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3398794
+Reviewed-by: Ken Rockot <rockot@google.com>
+Commit-Queue: Stephen Röttger <sroettger@google.com>
+Cr-Commit-Position: refs/heads/main@{#961389}
+---
+ mojo/core/node_controller.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/mojo/core/node_controller.cc b/mojo/core/node_controller.cc
+index 7cde7719687..81712676733 100644
+--- a/mojo/core/node_controller.cc
++++ b/mojo/core/node_controller.cc
+@@ -594,7 +594,7 @@ void NodeController::AddPeer(const ports::NodeName& name,
+     }
+ 
+     if (dropped_peers_.Contains(name) && !allow_name_reuse) {
+-      LOG(ERROR) << "Trying to re-add dropped peer " << name;
++      DVLOG(1) << "Trying to re-add dropped peer " << name;
+       return;
+     }
+ 
diff --git a/srcpkgs/chromium/patches/fix-bits-stdint-intn-include.patch b/srcpkgs/chromium/patches/fix-bits-stdint-intn-include.patch
deleted file mode 100644
index 978cd6a493d6..000000000000
--- a/srcpkgs/chromium/patches/fix-bits-stdint-intn-include.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/ui/ozone/platform/wayland/host/wayland_window.cc.orig
-+++ b/ui/ozone/platform/wayland/host/wayland_window.cc
-@@ -4,7 +4,7 @@
- 
- #include "ui/ozone/platform/wayland/host/wayland_window.h"
- 
--#include <bits/stdint-intn.h>
-+#include <stdint.h>
- #include <wayland-cursor.h>
- #include <algorithm>
- #include <memory>
diff --git a/srcpkgs/chromium/patches/fix-build-break-with-system-libdrm.patch b/srcpkgs/chromium/patches/fix-build-break-with-system-libdrm.patch
new file mode 100644
index 000000000000..fe8eee6d1e94
--- /dev/null
+++ b/srcpkgs/chromium/patches/fix-build-break-with-system-libdrm.patch
@@ -0,0 +1,62 @@
+From 5b287e0be8d8d8475ec6ef81b16eaa61e19db078 Mon Sep 17 00:00:00 2001
+From: "Steinar H. Gunderson" <sesse@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@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@chromium.org>
+Commit-Queue: Steinar H Gunderson <sesse@chromium.org>
+Auto-Submit: Steinar H Gunderson <sesse@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@apap04.com>
+ Andrei Borza <andrei.borza@gmail.com>
+ Andrei Parvu <andrei.prv@gmail.com>
+ Andrei Parvu <parvu@adobe.com>
++Andres Salomon <dilinger@queued.net>
+ Andreu Botella <andreu@andreubotella.com>
+ Andrew Boyarshin <andrew.boyarshin@gmail.com>
+ Andrew Brampton <me@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
diff --git a/srcpkgs/chromium/patches/use-FT_Done_MM_Var-in-CFX_Font-AdjustMMParams.patch b/srcpkgs/chromium/patches/use-FT_Done_MM_Var-in-CFX_Font-AdjustMMParams.patch
new file mode 100644
index 000000000000..9e3b07920f17
--- /dev/null
+++ b/srcpkgs/chromium/patches/use-FT_Done_MM_Var-in-CFX_Font-AdjustMMParams.patch
@@ -0,0 +1,72 @@
+From cb0aad687f34629a42053d600cf2947282cea2c0 Mon Sep 17 00:00:00 2001
+From: Lei Zhang <thestig@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@chromium.org>
+Commit-Queue: Lei Zhang <thestig@chromium.org>
+
+(cherry picked from commit ffeb67faf715475f6e463d65c368f556780adf19)
+---
+ 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 7a4e8eb24..0ef421fe7 100644
+--- a/third_party/pdfium/core/fxge/cfx_font.cpp
++++ b/third_party/pdfium/core/fxge/cfx_font.cpp
+@@ -43,6 +43,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 !defined(OS_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 defined(OS_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);
++  }
++}
++
+ #ifdef PDF_ENABLE_XFA
+ unsigned long FTStreamRead(FXFT_StreamRec* stream,
+                            unsigned long offset,
+@@ -640,14 +664,14 @@ void CFX_Font::AdjustMMParams(int glyph_index,
+     int 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;
+     }
+     int param = min_param + (max_param - min_param) * (dest_width - min_width) /
+                                 (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);
+ }
+ 
diff --git a/srcpkgs/chromium/patches/xxx-ppc64le-support.patch b/srcpkgs/chromium/patches/xxx-ppc64le-support.patch
index 2f66a144e269..e0ceb4c40842 100644
--- a/srcpkgs/chromium/patches/xxx-ppc64le-support.patch
+++ b/srcpkgs/chromium/patches/xxx-ppc64le-support.patch
@@ -1007,19 +1007,6 @@ index 2b78a0cc3..0a70f5ea5 100644
 +
  #endif  // SANDBOX_LINUX_SYSTEM_HEADERS_LINUX_SYSCALLS_H_
  
-diff --git a/sandbox/linux/system_headers/linux_ucontext.h b/sandbox/linux/system_headers/linux_ucontext.h
-index 22ce78027..a69b024c2 100644
---- a/sandbox/linux/system_headers/linux_ucontext.h
-+++ b/sandbox/linux/system_headers/linux_ucontext.h
-@@ -11,6 +11,8 @@
- #include "sandbox/linux/system_headers/arm_linux_ucontext.h"
- #elif defined(__i386__)
- #include "sandbox/linux/system_headers/i386_linux_ucontext.h"
-+#elif defined(__powerpc64__)
-+#include "sandbox/linux/system_headers/ppc64_linux_ucontext.h"
- #else
- #error "No support for your architecture in PNaCl header"
- #endif
 diff --git a/sandbox/linux/system_headers/ppc64_linux_syscalls.h b/sandbox/linux/system_headers/ppc64_linux_syscalls.h
 new file mode 100644
 index 000000000..ccacffe22
@@ -1038,24 +1025,6 @@ index 000000000..ccacffe22
 +//TODO: is it necessary to redefine syscall numbers for PPC64?
 +
 +#endif  // SANDBOX_LINUX_SYSTEM_HEADERS_PPC64_LINUX_SYSCALLS_H_
-diff --git a/sandbox/linux/system_headers/ppc64_linux_ucontext.h b/sandbox/linux/system_headers/ppc64_linux_ucontext.h
-new file mode 100644
-index 000000000..07728e087
---- /dev/null
-+++ b/sandbox/linux/system_headers/ppc64_linux_ucontext.h
-@@ -0,0 +1,12 @@
-+// Copyright 2014 The Chromium Authors. All rights reserved.
-+// Use of this source code is governed by a BSD-style license that can be
-+// found in the LICENSE file.
-+
-+#ifndef SANDBOX_LINUX_SYSTEM_HEADERS_PPC64_LINUX_UCONTEXT_H_
-+#define SANDBOX_LINUX_SYSTEM_HEADERS_PPC64_LINUX_UCONTEXT_H_
-+
-+#include <sys/ucontext.h>
-+
-+//TODO: is it necessary to redefine ucontext on PPC64?
-+
-+#endif  // SANDBOX_LINUX_SYSTEM_HEADERS_PPC64_LINUX_UCONTEXT_H_
 diff --git a/sandbox/policy/linux/bpf_renderer_policy_linux.cc b/sandbox/policy/linux/bpf_renderer_policy_linux.cc
 index 2588fc792..d455c4601 100644
 --- a/sandbox/policy/linux/bpf_renderer_policy_linux.cc
diff --git a/srcpkgs/chromium/template b/srcpkgs/chromium/template
index 453aabb5b08a..7b3031bf840f 100644
--- a/srcpkgs/chromium/template
+++ b/srcpkgs/chromium/template
@@ -1,7 +1,7 @@
 # Template file for 'chromium'
 pkgname=chromium
 # See https://chromiumdash.appspot.com/releases?platform=Linux for the latest version
-version=97.0.4692.99
+version=98.0.4758.80
 revision=1
 archs="i686* x86_64* aarch64* armv7l* ppc64le*"
 short_desc="Google's attempt at creating a safer, faster, and more stable browser"
@@ -9,7 +9,7 @@ maintainer="Duncaen <duncaen@voidlinux.org>"
 license="BSD-3-Clause"
 homepage="https://www.chromium.org/"
 distfiles="https://commondatastorage.googleapis.com/chromium-browser-official/${pkgname}-${version}.tar.xz"
-checksum=c91bae205705b367f2cfc1f72ce1ee99b2ceb5edfc584e15c60a6ab5ff01ecba
+checksum=c87266e20f860a32c48affc70a769368d1b876dbad768e3aa93ee3c335944171
 
 lib32disabled=yes
 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PR PATCH] [Merged]: chromium: update to 98.0.4758.80.
  2022-02-02 19:49 [PR PATCH] chromium: update to 98.0.4758.80 Duncaen
  2022-02-03 14:04 ` [PR PATCH] [Updated] " Duncaen
  2022-02-04 13:39 ` Duncaen
@ 2022-02-05  7:06 ` q66
  2022-02-06 18:35 ` intpl
  2022-02-06 18:42 ` Duncaen
  4 siblings, 0 replies; 6+ messages in thread
From: q66 @ 2022-02-05  7:06 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 252 bytes --]

There's a merged pull request on the void-packages repository

chromium: update to 98.0.4758.80.
https://github.com/void-linux/void-packages/pull/35359

Description:
[ci skip]

* [x] x86_64 (tested)
* [x] x86_64-musl
* [x] i686
* [x] aarch64-musl

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: chromium: update to 98.0.4758.80.
  2022-02-02 19:49 [PR PATCH] chromium: update to 98.0.4758.80 Duncaen
                   ` (2 preceding siblings ...)
  2022-02-05  7:06 ` [PR PATCH] [Merged]: " q66
@ 2022-02-06 18:35 ` intpl
  2022-02-06 18:42 ` Duncaen
  4 siblings, 0 replies; 6+ messages in thread
From: intpl @ 2022-02-06 18:35 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 269 bytes --]

New comment by intpl on void-packages repository

https://github.com/void-linux/void-packages/pull/35359#issuecomment-1030889085

Comment:
I have the following warning after this upgrade:
"Google API keys are missing. Some functionality of Chromium will be disabled."

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: chromium: update to 98.0.4758.80.
  2022-02-02 19:49 [PR PATCH] chromium: update to 98.0.4758.80 Duncaen
                   ` (3 preceding siblings ...)
  2022-02-06 18:35 ` intpl
@ 2022-02-06 18:42 ` Duncaen
  4 siblings, 0 replies; 6+ messages in thread
From: Duncaen @ 2022-02-06 18:42 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 303 bytes --]

New comment by Duncaen on void-packages repository

https://github.com/void-linux/void-packages/pull/35359#issuecomment-1030890260

Comment:
Yes, we removed the api keys some versions ago since they discontinued most APIs for chromium builds.

https://github.com/void-linux/void-packages/issues/28233

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-02-06 18:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-02 19:49 [PR PATCH] chromium: update to 98.0.4758.80 Duncaen
2022-02-03 14:04 ` [PR PATCH] [Updated] " Duncaen
2022-02-04 13:39 ` Duncaen
2022-02-05  7:06 ` [PR PATCH] [Merged]: " q66
2022-02-06 18:35 ` intpl
2022-02-06 18:42 ` Duncaen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).