diff options
author | Steven R. Loomis <srloomis@us.ibm.com> | 2015-07-31 16:25:15 -0700 |
---|---|---|
committer | João Reis <reis@janeasystems.com> | 2015-08-14 21:16:34 +0100 |
commit | 4c06515a2f13c9b0890b374bb3ab3c0740c282e2 (patch) | |
tree | df26a9d7d934f09dac85ec88c84056cd7ffabda4 /configure | |
parent | 88419479ccb6384473339f09e5c55f234f4ee194 (diff) | |
download | node-new-4c06515a2f13c9b0890b374bb3ab3c0740c282e2.tar.gz |
build: work around VS2015 issue in ICU <56
The particular ufile.c is from
http://bugs.icu-project.org/trac/changeset/37704
and should be OK for ICU 54 and 55.
Also, adds general mechanism for floating patches on top of ICU.
Fixes: https://github.com/nodejs/node/issues/2279
PR-URL: https://github.com/nodejs/node/pull/2283
Reviewed-By: João Reis <reis@janeasystems.com>
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -781,7 +781,7 @@ def write(filename, data): do_not_edit = '# Do not edit. Generated by the configure script.\n' -def glob_to_var(dir_base, dir_sub): +def glob_to_var(dir_base, dir_sub, patch_dir): list = [] dir_all = os.path.join(dir_base, dir_sub) files = os.walk(dir_all) @@ -789,7 +789,14 @@ def glob_to_var(dir_base, dir_sub): (path, dirs, files) = ent for file in files: if file.endswith('.cpp') or file.endswith('.c') or file.endswith('.h'): - list.append('%s/%s' % (dir_sub, file)) + # srcfile uses "slash" as dir separator as its output is consumed by gyp + srcfile = '%s/%s' % (dir_sub, file) + if patch_dir: + patchfile = '%s/%s/%s' % (dir_base, patch_dir, file) + if os.path.isfile(patchfile): + srcfile = '%s/%s' % (patch_dir, file) + print 'Using version-specific floating patch %s' % patchfile + list.append(srcfile) break return list @@ -1011,7 +1018,7 @@ def configure_intl(o): for i in icu_src: var = 'icu_src_%s' % i path = '../../deps/icu/source/%s' % icu_src[i] - icu_config['variables'][var] = glob_to_var('tools/icu', path) + icu_config['variables'][var] = glob_to_var('tools/icu', path, 'patches/%s/source/%s' % (icu_ver_major, icu_src[i]) ) # write updated icu_config.gypi with a bunch of paths write(icu_config_name, do_not_edit + pprint.pformat(icu_config, indent=2) + '\n') |