blob: 164224117f843421747df7f7b590e21c4f82b84e (
plain) (
blame)
| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
 | --- base/test/generate_fontconfig_caches.cc.orig	2019-12-12 12:38:59 UTC
+++ base/test/generate_fontconfig_caches.cc
@@ -52,14 +52,21 @@ int main() {
 
   // Delete directory before generating fontconfig caches. This will notify
   // future fontconfig_caches changes.
-  CHECK(base::DeleteFile(fontconfig_caches, /*recursive=*/true));
 
+  CHECK(base::DeleteFile(fontconfig_caches, /*recursive=*/true));
   base::SetUpFontconfig();
   FcInit();
   FcFini();
 
   // Check existence of intended fontconfig cache file.
+#if defined(OS_BSD)
+  // Our version of fontconfig is too old to respect .uuid files in font directories,
+  // so we check for the CACHEDIR.TAG file instead
   CHECK(base::PathExists(
+      fontconfig_caches.Append("CACHEDIR.TAG")));
+#else
+  CHECK(base::PathExists(
       fontconfig_caches.Append(base::StrCat({uuid, "-le64.cache-7"}))));
+#endif
   return 0;
 }
 |