OLD | NEW |
---|---|
1 # GYP for fontconfig ( | 1 # GYP for fontconfig ( |
2 # | 2 # |
3 # This has been tested on Windows and Mac. | 3 # This has been tested on Windows and Mac. |
4 # This library is native to Linux, so build from source is not necessary. | 4 # This library is native to Linux, so build from source is not necessary. |
5 # | 5 # |
6 # Additional files for building under Windows are provided here: (LGPL) | 6 # Additional files for building under Windows are provided here: (LGPL) |
7 # http://comments.gmane.org/gmane.comp.fonts.fontconfig/4438 | 7 # http://comments.gmane.org/gmane.comp.fonts.fontconfig/4438 |
8 | 8 |
9 { | 9 { |
10 'variables': { | 10 'variables': { |
11 'skia_warnings_as_errors': 0, | 11 'skia_warnings_as_errors': 0, |
12 }, | 12 }, |
13 'targets': [ | 13 'targets': [ |
14 { | 14 { |
15 'target_name': 'fontconfig', | 15 'target_name': 'fontconfig', |
16 'type': 'none', | |
17 'dependencies': [ | |
epoger
2014/01/08 19:40:22
Why the additional level of indirection here?
Is
vandebo (ex-Chrome)
2014/01/08 21:24:15
You mean make the thing that depends on fontconfig
epoger
2014/01/08 21:38:12
No, I meant making fontconfig depend on fontconfig
vandebo (ex-Chrome)
2014/01/08 22:08:18
I need fontconfig_setup to run after fontconfig is
epoger
2014/01/09 15:22:31
Ah, now I understand. Might be worth adding a com
| |
18 'libfontconfig', | |
19 ], | |
20 'direct_dependent_settings': { | |
21 'include_dirs': [ | |
22 '../third_party/externals/fontconfig', | |
23 ], | |
24 }, | |
25 'conditions': [ | |
26 ['skia_os == "mac"', { | |
27 'dependencies': [ | |
28 'fontconfig_setup', | |
29 ], | |
30 } ], | |
bungeman-skia
2014/01/07 21:13:29
nit: there normally isn't a space between the curl
vandebo (ex-Chrome)
2014/01/08 21:24:15
Done.
| |
31 ], | |
32 }, | |
33 { | |
34 'target_name': 'libfontconfig', | |
16 'type': 'static_library', | 35 'type': 'static_library', |
17 'dependencies': [ | 36 'dependencies': [ |
18 'freetype.gyp:freetype_poppler', | 37 'freetype.gyp:freetype_poppler', |
19 ], | 38 ], |
20 'include_dirs' : [ | 39 'include_dirs' : [ |
21 '../third_party/externals/fontconfig', | 40 '../third_party/externals/fontconfig', |
22 | |
23 '../third_party/fontconfig/config', | 41 '../third_party/fontconfig/config', |
24 '../third_party/fontconfig/config/src', | 42 '../third_party/fontconfig/config/src', |
25 ], | 43 ], |
26 'sources': [ | 44 'sources': [ |
27 '../third_party/externals/fontconfig/src/fcatomic.c', | 45 '../third_party/externals/fontconfig/src/fcatomic.c', |
28 '../third_party/externals/fontconfig/src/fcblanks.c', | 46 '../third_party/externals/fontconfig/src/fcblanks.c', |
29 '../third_party/externals/fontconfig/src/fccache.c', | 47 '../third_party/externals/fontconfig/src/fccache.c', |
30 '../third_party/externals/fontconfig/src/fccfg.c', | 48 '../third_party/externals/fontconfig/src/fccfg.c', |
31 '../third_party/externals/fontconfig/src/fccharset.c', | 49 '../third_party/externals/fontconfig/src/fccharset.c', |
32 '../third_party/externals/fontconfig/src/fccompat.c', | 50 '../third_party/externals/fontconfig/src/fccompat.c', |
(...skipping 26 matching lines...) Expand all Loading... | |
59 | 77 |
60 'direct_dependent_settings': { | 78 'direct_dependent_settings': { |
61 'include_dirs': [ | 79 'include_dirs': [ |
62 '../third_party/externals/fontconfig', | 80 '../third_party/externals/fontconfig', |
63 ], | 81 ], |
64 }, | 82 }, |
65 | 83 |
66 'conditions': [ | 84 'conditions': [ |
67 ['skia_os == "mac"', { | 85 ['skia_os == "mac"', { |
68 'include_dirs': [ | 86 'include_dirs': [ |
87 '<(SHARED_INTERMEDIATE_DIR)/fontconfig_config', | |
69 '../third_party/fontconfig/config/mac', | 88 '../third_party/fontconfig/config/mac', |
70 '../third_party/fontconfig/config/mac/src', | 89 '../third_party/fontconfig/config/mac/src', |
71 ], | 90 ], |
72 'defines': [ | 91 'dependencies': [ |
73 'FC_CACHEDIR', | 92 'fontconfig_config_template', |
74 'FONTCONFIG_PATH', | |
75 ], | 93 ], |
76 'libraries': [ | 94 'libraries': [ |
77 '$(SDKROOT)/usr/lib/libexpat.dylib', | 95 '$(SDKROOT)/usr/lib/libexpat.dylib', |
78 ], | 96 ], |
79 'xcode_settings': { | 97 'xcode_settings': { |
80 'DYLIB_INSTALL_NAME_BASE': '@executable_path', | 98 'DYLIB_INSTALL_NAME_BASE': '@executable_path', |
81 }, | 99 }, |
82 }], | 100 }], |
83 ['skia_os == "win"', { | 101 ['skia_os == "win"', { |
84 'include_dirs': [ | 102 'include_dirs': [ |
85 '../third_party/fontconfig/config/windows', | 103 '../third_party/fontconfig/config/windows', |
86 '../third_party/fontconfig/config/windows/src', | 104 '../third_party/fontconfig/config/windows/src', |
87 ], | 105 ], |
88 'sources!': [ | 106 'sources!': [ |
89 '../third_party/externals/fontconfig/src/fccompat.c', | 107 '../third_party/externals/fontconfig/src/fccompat.c', |
90 '../third_party/externals/fontconfig/src/fcxml.c', | 108 '../third_party/externals/fontconfig/src/fcxml.c', |
91 ], | 109 ], |
92 'defines': [ | 110 'defines': [ |
93 # inline is not recognized in C and has to be __inline | 111 # inline is not recognized in C and has to be __inline |
94 'inline=__inline', | 112 'inline=__inline', |
95 ], | 113 ], |
96 }], | 114 }], |
97 ], | 115 ], |
98 }, | 116 }, |
99 ], | 117 ], |
118 'conditions': [ | |
119 ['skia_os == "mac"', { | |
120 'variables': { | |
121 'cachedir': '<(PRODUCT_DIR)/fontconfig/cache', | |
122 'configdir': '<(PRODUCT_DIR)/fontconfig/etc', | |
123 }, | |
124 'targets': [ | |
125 { | |
126 'target_name': 'fontconfig_config_template', | |
127 'type': 'none', | |
128 'actions': [{ | |
129 'action_name': 'fontconfig_config_template', | |
130 'message': 'Generating fontconfig header', | |
131 'inputs': [ | |
132 '../third_party/fontconfig/process-template.py', | |
133 '../third_party/fontconfig/config/mac/config.h.template', | |
134 ], | |
135 'outputs': [ | |
136 '<(SHARED_INTERMEDIATE_DIR)/fontconfig_config/config.h', | |
137 ], | |
bungeman-skia
2014/01/07 21:13:29
nit: outdent 1 space
vandebo (ex-Chrome)
2014/01/08 21:24:15
Done.
| |
138 'action': [ | |
139 'python', '../third_party/fontconfig/process-template.py', | |
140 '-i', '../third_party/fontconfig/config/mac/config.h.template', | |
141 '-o', '<@(_outputs)', | |
142 '-p', 'FC_CACHEDIR', '<(cachedir)', | |
143 '-p', 'FONTCONFIG_PATH', '<(configdir)', | |
144 ], | |
145 }], | |
146 }, { | |
147 'target_name': 'fontconfig_setup', | |
148 'type': 'none', | |
149 'dependencies': [ | |
150 'fc-cache', | |
151 ], | |
152 'actions': [{ | |
153 'action_name': 'fontconfig_config_file', | |
154 'message': 'Generating font.conf', | |
155 'inputs': [ | |
156 '../third_party/fontconfig/process-template.py', | |
157 '../third_party/externals/fontconfig/fonts.conf.in', | |
158 ], | |
159 'outputs': [ '<(configdir)/fonts.conf', ], | |
160 'action': [ | |
161 'python', '../third_party/fontconfig/process-template.py', | |
162 '-i', '../third_party/externals/fontconfig/fonts.conf.in', | |
163 '-o', '<(configdir)/fonts.conf', | |
164 '-p', 'FC_CACHEDIR', '<(cachedir)', | |
165 '-s', 'FC_DEFAULT_FONTS', '/System/Library/Fonts', | |
166 '-s', 'FC_FONTPATH', '<dir>/Library/Fonts</dir>', | |
167 '-p', 'CONFIGDIR', '<(configdir)/conf.d', | |
168 '-s', 'PACKAGE', 'fontconfig', | |
169 '-s', 'VERSION', '2.10.93', | |
170 ], | |
171 }, { | |
172 'action_name': 'populate_fontconfig_cache', | |
173 'message': | |
174 'Generating fontconfig cache (this will take a few minutes).', | |
175 'inputs': [ | |
176 '<(PRODUCT_DIR)/fc-cache', | |
177 '<(configdir)/fonts.conf', | |
178 ], | |
179 'outputs': [ '<(cachedir)/CACHEDIR.TAG', ], | |
180 'action': [ '<(PRODUCT_DIR)/fc-cache', '-s', '-f', '-v', ], | |
181 }], | |
182 }, | |
183 { | |
184 'target_name': 'fc-cache', | |
185 'type': 'executable', | |
186 'dependencies': [ | |
187 'libfontconfig', | |
188 ], | |
189 'libraries':[ | |
190 '$(SDKROOT)/usr/lib/libexpat.dylib', | |
191 ], | |
192 'sources': [ | |
193 '../third_party/externals/fontconfig/fc-cache/fc-cache.c', | |
194 ], | |
195 }, | |
196 ], | |
197 } ], | |
bungeman-skia
2014/01/07 21:13:29
nit: extra space
| |
198 ], | |
100 } | 199 } |
OLD | NEW |