| 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': [ | |
| 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 }], | |
| 31 ], | |
| 32 }, | |
| 33 { | |
| 34 'target_name': 'libfontconfig', | |
| 35 'type': 'static_library', | 16 'type': 'static_library', |
| 36 'dependencies': [ | 17 'dependencies': [ |
| 37 'freetype.gyp:freetype_poppler', | 18 'freetype.gyp:freetype_poppler', |
| 38 ], | 19 ], |
| 39 'include_dirs' : [ | 20 'include_dirs' : [ |
| 40 '../third_party/externals/fontconfig', | 21 '../third_party/externals/fontconfig', |
| 22 |
| 41 '../third_party/fontconfig/config', | 23 '../third_party/fontconfig/config', |
| 42 '../third_party/fontconfig/config/src', | 24 '../third_party/fontconfig/config/src', |
| 43 ], | 25 ], |
| 44 'sources': [ | 26 'sources': [ |
| 45 '../third_party/externals/fontconfig/src/fcatomic.c', | 27 '../third_party/externals/fontconfig/src/fcatomic.c', |
| 46 '../third_party/externals/fontconfig/src/fcblanks.c', | 28 '../third_party/externals/fontconfig/src/fcblanks.c', |
| 47 '../third_party/externals/fontconfig/src/fccache.c', | 29 '../third_party/externals/fontconfig/src/fccache.c', |
| 48 '../third_party/externals/fontconfig/src/fccfg.c', | 30 '../third_party/externals/fontconfig/src/fccfg.c', |
| 49 '../third_party/externals/fontconfig/src/fccharset.c', | 31 '../third_party/externals/fontconfig/src/fccharset.c', |
| 50 '../third_party/externals/fontconfig/src/fccompat.c', | 32 '../third_party/externals/fontconfig/src/fccompat.c', |
| (...skipping 26 matching lines...) Expand all Loading... |
| 77 | 59 |
| 78 'direct_dependent_settings': { | 60 'direct_dependent_settings': { |
| 79 'include_dirs': [ | 61 'include_dirs': [ |
| 80 '../third_party/externals/fontconfig', | 62 '../third_party/externals/fontconfig', |
| 81 ], | 63 ], |
| 82 }, | 64 }, |
| 83 | 65 |
| 84 'conditions': [ | 66 'conditions': [ |
| 85 ['skia_os == "mac"', { | 67 ['skia_os == "mac"', { |
| 86 'include_dirs': [ | 68 'include_dirs': [ |
| 87 '<(SHARED_INTERMEDIATE_DIR)/fontconfig_config', | |
| 88 '../third_party/fontconfig/config/mac', | 69 '../third_party/fontconfig/config/mac', |
| 89 '../third_party/fontconfig/config/mac/src', | 70 '../third_party/fontconfig/config/mac/src', |
| 90 ], | 71 ], |
| 91 'dependencies': [ | 72 'defines': [ |
| 92 'fontconfig_config_template', | 73 'FC_CACHEDIR', |
| 74 'FONTCONFIG_PATH', |
| 93 ], | 75 ], |
| 94 'libraries': [ | 76 'libraries': [ |
| 95 '$(SDKROOT)/usr/lib/libexpat.dylib', | 77 '$(SDKROOT)/usr/lib/libexpat.dylib', |
| 96 ], | 78 ], |
| 97 'xcode_settings': { | 79 'xcode_settings': { |
| 98 'DYLIB_INSTALL_NAME_BASE': '@executable_path', | 80 'DYLIB_INSTALL_NAME_BASE': '@executable_path', |
| 99 }, | 81 }, |
| 100 }], | 82 }], |
| 101 ['skia_os == "win"', { | 83 ['skia_os == "win"', { |
| 102 'include_dirs': [ | 84 'include_dirs': [ |
| 103 '../third_party/fontconfig/config/windows', | 85 '../third_party/fontconfig/config/windows', |
| 104 '../third_party/fontconfig/config/windows/src', | 86 '../third_party/fontconfig/config/windows/src', |
| 105 ], | 87 ], |
| 106 'sources!': [ | 88 'sources!': [ |
| 107 '../third_party/externals/fontconfig/src/fccompat.c', | 89 '../third_party/externals/fontconfig/src/fccompat.c', |
| 108 '../third_party/externals/fontconfig/src/fcxml.c', | 90 '../third_party/externals/fontconfig/src/fcxml.c', |
| 109 ], | 91 ], |
| 110 'defines': [ | 92 'defines': [ |
| 111 # inline is not recognized in C and has to be __inline | 93 # inline is not recognized in C and has to be __inline |
| 112 'inline=__inline', | 94 'inline=__inline', |
| 113 ], | 95 ], |
| 114 }], | 96 }], |
| 115 ], | 97 ], |
| 116 }, | 98 }, |
| 117 ], | 99 ], |
| 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 ], | |
| 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 '-k', '@FC_DEFAULT_FONTS@', '/System/Library/Fonts', | |
| 166 '-k', '@FC_FONTPATH@', '<dir>/Library/Fonts</dir>', | |
| 167 '-p', '@CONFIGDIR@', '<(configdir)/conf.d', | |
| 168 '-k', '@PACKAGE@', 'fontconfig', | |
| 169 '-k', '@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 }], | |
| 198 ], | |
| 199 } | 100 } |
| OLD | NEW |