summaryrefslogtreecommitdiff
blob: b3c2ffb315a52a5c6e37460b24a3d4e78bad7a8a (plain)
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
Description: Use system lcms2
Author: Sandro Knauß <hefee@debian.org>
Origin: Debian
Forwarded: https://bugreports.qt.io/browse/QTBUG-61746
Reviewed-by: Sandro Knauß <hefee@debian.org>
Last-Update: 2021-03-08
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/src/3rdparty/chromium/third_party/pdfium/third_party/BUILD.gn
+++ b/src/3rdparty/chromium/third_party/pdfium/third_party/BUILD.gn
@@ -239,58 +239,19 @@ if (!pdf_use_skia && !pdf_use_skia_paths
   }
 }
 
-config("fx_lcms2_warnings") {
-  visibility = [ ":*" ]
-  if (is_clang) {
-    cflags = [
-      # cmslut.cc is sloppy with aggregate initialization. Version 2.7 of this
-      # library doesn't appear to have this problem.
-      "-Wno-missing-braces",
-    ]
-  }
+import("//build/shim_headers.gni")
+
+shim_headers("lcms2_shim") {
+  root_path = "lcms/include"
+  headers = [
+    "lcms2.h",
+    "lcms2_plugin.h",
+  ]
 }
 
 source_set("fx_lcms2") {
-  configs -= [ "//build/config/compiler:chromium_code" ]
-  configs += [
-    "//build/config/compiler:no_chromium_code",
-    "//build/config/sanitizers:cfi_icall_generalize_pointers",
-    ":pdfium_third_party_config",
-
-    # Must be after no_chromium_code for warning flags to be ordered correctly.
-    ":fx_lcms2_warnings",
-  ]
-  sources = [
-    "lcms/include/lcms2.h",
-    "lcms/include/lcms2_plugin.h",
-    "lcms/src/cmsalpha.c",
-    "lcms/src/cmscam02.c",
-    "lcms/src/cmscgats.c",
-    "lcms/src/cmscnvrt.c",
-    "lcms/src/cmserr.c",
-    "lcms/src/cmsgamma.c",
-    "lcms/src/cmsgmt.c",
-    "lcms/src/cmshalf.c",
-    "lcms/src/cmsintrp.c",
-    "lcms/src/cmsio0.c",
-    "lcms/src/cmsio1.c",
-    "lcms/src/cmslut.c",
-    "lcms/src/cmsmd5.c",
-    "lcms/src/cmsmtrx.c",
-    "lcms/src/cmsnamed.c",
-    "lcms/src/cmsopt.c",
-    "lcms/src/cmspack.c",
-    "lcms/src/cmspcs.c",
-    "lcms/src/cmsplugin.c",
-    "lcms/src/cmsps2.c",
-    "lcms/src/cmssamp.c",
-    "lcms/src/cmssm.c",
-    "lcms/src/cmstypes.c",
-    "lcms/src/cmsvirt.c",
-    "lcms/src/cmswtpnt.c",
-    "lcms/src/cmsxform.c",
-  ]
-  deps = [ "../core/fxcrt" ]
+  deps = [ ":lcms2_shim" ]
+  libs = ["lcms2"]
 }
 
 if (!build_with_chromium) {