From ffee263b35f21dc303d613cb7112c0f9e82f8254 Mon Sep 17 00:00:00 2001 From: Matt Jolly Date: Wed, 10 Sep 2025 09:22:19 +1000 Subject: [PATCH] build with actually released fontconfig https://chromium.googlesource.com/chromium/src/+/9af749d9dfb0f4a5aaa0463bcad126973e3d5363 rolls Chromium's fontconfig to include https://chromium.googlesource.com/external/fontconfig.git/+/59da606145558a0041eb90d9c80a26a6f0c1d348%5E%21/ which _is_ available upstream, but is not in _any_ fontconfig release; this change updates the fontconfig cache magic number from `9` to `10`. As a result, any Chromium build using an unbundled fontconfig (like, say, every Linux distro...) will fail if building test targets, despite fontconfig being one of the few libraries supported by `build/linux/unbundle/replace_gn_files.py`. Further changes to work around regressions in fontations also configure bundled fontconfig to suffix `-reindex1` to the cache path which, as per the above, also breaks builds using system fontconfig. https://github.com/chromium/chromium/commit/bbf7b467a342847e94eadf02777ab70073807fa7 This patch reverts enough of these changes to allow Chromium to build with unbundled (and actually released) fontconfig versions again. See-also: https://issues.chromium.org/issues/442698344 Signed-off-by: Matt Jolly --- a/third_party/test_fonts/fontconfig/BUILD.gn +++ b/third_party/test_fonts/fontconfig/BUILD.gn @@ -49,7 +49,7 @@ if (is_linux || is_chromeos) { args = [] inputs = [ "$root_out_dir/etc/fonts/fonts.conf" ] outputs = [ - "$root_out_dir/fontconfig_caches/fb5c91b2895aa445d23aebf7f9e2189c-le64.cache-reindex1-10", + "$root_out_dir/fontconfig_caches/fb5c91b2895aa445d23aebf7f9e2189c-le64.cache-9", "$root_out_dir/fontconfig_caches/CACHEDIR.TAG", ] } --- a/third_party/test_fonts/fontconfig/generate_fontconfig_caches.cc +++ b/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-reindex1-10"; + auto cache = fontconfig_caches + "/" + kCacheKey + "-le64.cache-9"; bool cache_exists = access(cache.c_str(), F_OK) == 0; return !cache_exists; } -- 2.50.1