build with system freetype again
OBS-URL: https://build.opensuse.org/package/show/network:chromium/chromium?expand=0&rev=1902
This commit is contained in:
@@ -6,3 +6,4 @@ Stephan Hartmann - https://github.com/stha09/chromium-patches/releases
|
||||
Gentoo - https://gitweb.gentoo.org/repo/gentoo.git/tree/www-client/chromium/files
|
||||
Fedora - https://src.fedoraproject.org/rpms/chromium/tree/rawhide
|
||||
Arch - https://github.com/archlinux/svntogit-packages/tree/packages/chromium/trunk
|
||||
Arch: https://gitlab.com/Matt.Jolly/chromium-patches/
|
||||
|
100
chromium-118-system-freetype.patch
Normal file
100
chromium-118-system-freetype.patch
Normal file
@@ -0,0 +1,100 @@
|
||||
https://github.com/chromium/chromium/commit/ed354d00aeda84693611b14baa56a287557a26b5
|
||||
From ed354d00aeda84693611b14baa56a287557a26b5 Mon Sep 17 00:00:00 2001
|
||||
From: Munira Tursunova <moonira@google.com>
|
||||
Date: Tue, 12 Sep 2023 11:54:48 +0000
|
||||
Subject: [PATCH] Add check for use_system_freetype when importing private
|
||||
freetype header
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
In [0] the include of private freetype header was added, which caused
|
||||
build breakage when use_system_freetype=true, see [1].
|
||||
|
||||
This CL fixes the breakage by introducing USE_SYSTEM_FREETYPE build flag.
|
||||
|
||||
[0] https://chromium-review.googlesource.com/c/chromium/src/+/4717485
|
||||
[1] https://chromium-review.googlesource.com/c/chromium/src/+/4717485/comments/cdfca7b9_8e61b2e0
|
||||
|
||||
Bug: 1429581
|
||||
Change-Id: I7f7de4cdb2dc46092a91a47d766bedb58ddccb7c
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4843428
|
||||
Commit-Queue: Munira Tursunova <moonira@google.com>
|
||||
Reviewed-by: Dominik Röttsches <drott@chromium.org>
|
||||
Reviewed-by: Rick Byers <rbyers@chromium.org>
|
||||
Cr-Commit-Position: refs/heads/main@{#1195323}
|
||||
---
|
||||
third_party/BUILD.gn | 6 ++++++
|
||||
third_party/blink/renderer/platform/BUILD.gn | 1 +
|
||||
.../renderer/platform/fonts/simple_font_data.cc | 12 +++++++++++-
|
||||
3 files changed, 18 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/third_party/BUILD.gn b/third_party/BUILD.gn
|
||||
index 7b086f95413ffd0..4ce797ebad72211 100644
|
||||
--- a/third_party/BUILD.gn
|
||||
+++ b/third_party/BUILD.gn
|
||||
@@ -2,6 +2,7 @@
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
+import("//build/buildflag_header.gni")
|
||||
import("//build/config/features.gni")
|
||||
import("//build/config/freetype/freetype.gni")
|
||||
import("//third_party/harfbuzz-ng/harfbuzz.gni")
|
||||
@@ -65,3 +66,8 @@ component("freetype_harfbuzz") {
|
||||
public_deps += [ "//third_party/harfbuzz-ng:harfbuzz_source" ]
|
||||
}
|
||||
}
|
||||
+
|
||||
+buildflag_header("freetype_buildflags") {
|
||||
+ header = "freetype_buildflags.h"
|
||||
+ flags = [ "USE_SYSTEM_FREETYPE=$use_system_freetype" ]
|
||||
+}
|
||||
diff --git a/third_party/blink/renderer/platform/BUILD.gn b/third_party/blink/renderer/platform/BUILD.gn
|
||||
index 591d2f939605b01..f6a2cd2168d1ee5 100644
|
||||
--- a/third_party/blink/renderer/platform/BUILD.gn
|
||||
+++ b/third_party/blink/renderer/platform/BUILD.gn
|
||||
@@ -1717,6 +1717,7 @@ component("platform") {
|
||||
"//services/viz/public/cpp/gpu",
|
||||
"//skia",
|
||||
"//skia:skcms",
|
||||
+ "//third_party:freetype_buildflags",
|
||||
"//third_party:freetype_harfbuzz",
|
||||
"//third_party/abseil-cpp:absl",
|
||||
"//third_party/blink/public:image_resources",
|
||||
diff --git a/third_party/blink/renderer/platform/fonts/simple_font_data.cc b/third_party/blink/renderer/platform/fonts/simple_font_data.cc
|
||||
index abe06f35c14a5e0..b2bfd88f0d85db5 100644
|
||||
--- a/third_party/blink/renderer/platform/fonts/simple_font_data.cc
|
||||
+++ b/third_party/blink/renderer/platform/fonts/simple_font_data.cc
|
||||
@@ -48,7 +48,7 @@
|
||||
#include "third_party/blink/renderer/platform/wtf/math_extras.h"
|
||||
#include "third_party/blink/renderer/platform/wtf/text/character_names.h"
|
||||
#include "third_party/blink/renderer/platform/wtf/text/unicode.h"
|
||||
-#include "third_party/freetype/src/src/autofit/afws-decl.h"
|
||||
+#include "third_party/freetype_buildflags.h"
|
||||
#include "third_party/skia/include/core/SkFontMetrics.h"
|
||||
#include "third_party/skia/include/core/SkPath.h"
|
||||
#include "third_party/skia/include/core/SkTypeface.h"
|
||||
@@ -57,12 +57,22 @@
|
||||
#include "ui/gfx/geometry/skia_conversions.h"
|
||||
#include "v8/include/v8.h"
|
||||
|
||||
+#if !BUILDFLAG(USE_SYSTEM_FREETYPE)
|
||||
+#include "third_party/freetype/src/src/autofit/afws-decl.h"
|
||||
+#endif
|
||||
+
|
||||
namespace blink {
|
||||
|
||||
constexpr float kSmallCapsFontSizeMultiplier = 0.7f;
|
||||
constexpr float kEmphasisMarkFontSizeMultiplier = 0.5f;
|
||||
+
|
||||
+#if !BUILDFLAG(USE_SYSTEM_FREETYPE)
|
||||
constexpr int32_t kFontObjectsMemoryConsumption =
|
||||
std::max(sizeof(AF_LatinMetricsRec), sizeof(AF_CJKMetricsRec));
|
||||
+#else
|
||||
+// sizeof(AF_LatinMetricsRec) = 2128
|
||||
+constexpr int32_t kFontObjectsMemoryConsumption = 2128;
|
||||
+#endif
|
||||
|
||||
SimpleFontData::SimpleFontData(const FontPlatformData& platform_data,
|
||||
scoped_refptr<CustomFontData> custom_data,
|
@@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Oct 9 20:07:46 UTC 2023 - Andreas Stieger <andreas.stieger@gmx.de>
|
||||
|
||||
- add patches:
|
||||
* chromium-118-system-freetype.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Oct 7 15:32:52 UTC 2023 - Andreas Stieger <andreas.stieger@gmx.de>
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# spec file for package chromium
|
||||
# spec file
|
||||
#
|
||||
# Copyright (c) 2023 SUSE LLC
|
||||
# Copyright (c) 2023 Callum Farmer <gmbr3@opensuse.org>
|
||||
@@ -36,12 +36,14 @@
|
||||
%endif
|
||||
%if 0%{?suse_version} >= 1599
|
||||
%bcond_without system_harfbuzz
|
||||
%bcond_without system_freetype
|
||||
%bcond_without arm_bti
|
||||
%bcond_without system_icu
|
||||
%bcond_without ffmpeg_51
|
||||
%bcond_without qt6
|
||||
%else
|
||||
%bcond_with system_harfbuzz
|
||||
%bcond_with system_freetype
|
||||
%bcond_with arm_bti
|
||||
%bcond_with system_icu
|
||||
%bcond_with ffmpeg_51
|
||||
@@ -66,7 +68,6 @@
|
||||
%bcond_without lto
|
||||
%bcond_without pipewire
|
||||
%bcond_without system_ffmpeg
|
||||
%bcond_with system_freetype
|
||||
%bcond_without system_zlib
|
||||
%bcond_with system_vpx
|
||||
# FFmpeg version
|
||||
@@ -143,8 +144,7 @@ Patch239: chromium-117-includes.patch
|
||||
Patch240: chromium-117-string-convert.patch
|
||||
Patch241: chromium-117-lp155-typename.patch
|
||||
Patch242: chromium-118-includes.patch
|
||||
BuildRequires: (python3 >= 3.7 or python3-dataclasses)
|
||||
BuildRequires: (python3-importlib-metadata if python3-base < 3.8)
|
||||
Patch243: chromium-118-system-freetype.patch
|
||||
BuildRequires: SDL-devel
|
||||
BuildRequires: bison
|
||||
BuildRequires: cups-devel
|
||||
@@ -154,9 +154,11 @@ BuildRequires: fdupes
|
||||
BuildRequires: flex
|
||||
BuildRequires: git
|
||||
BuildRequires: gn >= 0.1807
|
||||
BuildRequires: golang(API)
|
||||
BuildRequires: gperf
|
||||
BuildRequires: hicolor-icon-theme
|
||||
BuildRequires: (python3 >= 3.7 or python3-dataclasses)
|
||||
BuildRequires: (python3-importlib-metadata if python3-base < 3.8)
|
||||
BuildRequires: golang(API)
|
||||
# Java used during build
|
||||
BuildRequires: java-openjdk-headless
|
||||
BuildRequires: libdc1394
|
||||
|
Reference in New Issue
Block a user