git: a66b53754035 - 2023Q1 - www/{chromium,ungoogled-chromium}: unbreak tests by using FC_CACHE_VERSION instead of hardcoding the version

From: Rene Ladan <rene_at_FreeBSD.org>
Date: Sat, 14 Jan 2023 16:18:02 UTC
The branch 2023Q1 has been updated by rene:

URL: https://cgit.FreeBSD.org/ports/commit/?id=a66b53754035c0e4f0c0a99a7972366c15163ab8

commit a66b53754035c0e4f0c0a99a7972366c15163ab8
Author:     Robert Nagy <robert@openbsd.org>
AuthorDate: 2023-01-14 16:11:06 +0000
Commit:     Rene Ladan <rene@FreeBSD.org>
CommitDate: 2023-01-14 16:17:59 +0000

    www/{chromium,ungoogled-chromium}: unbreak tests by using FC_CACHE_VERSION instead of hardcoding the version
    
    (cherry picked from commit 36e349bf592cf1c3a25d0f75bc83e90ae7779686)
---
 ...rty_test__fonts_fontconfig_generate__fontconfig__caches.cc | 11 +++++++++++
 ...rty_test__fonts_fontconfig_generate__fontconfig__caches.cc | 11 +++++++++++
 2 files changed, 22 insertions(+)

diff --git a/www/chromium/files/patch-third__party_test__fonts_fontconfig_generate__fontconfig__caches.cc b/www/chromium/files/patch-third__party_test__fonts_fontconfig_generate__fontconfig__caches.cc
new file mode 100644
index 000000000000..535576512526
--- /dev/null
+++ b/www/chromium/files/patch-third__party_test__fonts_fontconfig_generate__fontconfig__caches.cc
@@ -0,0 +1,11 @@
+--- third_party/test_fonts/fontconfig/generate_fontconfig_caches.cc.orig	2023-01-14 16:09:37 UTC
++++ third_party/test_fonts/fontconfig/generate_fontconfig_caches.cc
+@@ -56,7 +56,7 @@ int main() {
+   FcFini();
+ 
+   // Check existence of intended fontconfig cache file.
+-  auto cache = fontconfig_caches + "/" + kCacheKey + "-le64.cache-7";
++  auto cache = fontconfig_caches + "/" + kCacheKey + "-le64.cache-" + FC_CACHE_VERSION;
+   bool cache_exists = access(cache.c_str(), F_OK) == 0;
+   return !cache_exists;
+ }
diff --git a/www/ungoogled-chromium/files/patch-third__party_test__fonts_fontconfig_generate__fontconfig__caches.cc b/www/ungoogled-chromium/files/patch-third__party_test__fonts_fontconfig_generate__fontconfig__caches.cc
new file mode 100644
index 000000000000..535576512526
--- /dev/null
+++ b/www/ungoogled-chromium/files/patch-third__party_test__fonts_fontconfig_generate__fontconfig__caches.cc
@@ -0,0 +1,11 @@
+--- third_party/test_fonts/fontconfig/generate_fontconfig_caches.cc.orig	2023-01-14 16:09:37 UTC
++++ third_party/test_fonts/fontconfig/generate_fontconfig_caches.cc
+@@ -56,7 +56,7 @@ int main() {
+   FcFini();
+ 
+   // Check existence of intended fontconfig cache file.
+-  auto cache = fontconfig_caches + "/" + kCacheKey + "-le64.cache-7";
++  auto cache = fontconfig_caches + "/" + kCacheKey + "-le64.cache-" + FC_CACHE_VERSION;
+   bool cache_exists = access(cache.c_str(), F_OK) == 0;
+   return !cache_exists;
+ }