ICU DATA: Default to icu-config if u_getDataDirectory fails

This commit is contained in:
Raul Marin 2018-02-23 15:25:13 +01:00
parent 8876d13356
commit 765406f9a7

View file

@ -831,9 +831,16 @@ int main() {
context.did_show_result=1 context.did_show_result=1
if ret[0]: if ret[0]:
context.Result('u_getDataDirectory returned %s' % ret[1]) context.Result('u_getDataDirectory returned %s' % ret[1])
return ret[1].strip()
else: else:
context.Result('Failed to detect (mapnik-config will have null value)') ret = call("icu-config --icudatadir", silent=True)
return ret[1].strip() if ret:
context.Result('icu-config returned %s' % ret)
return ret
else:
context.Result('Failed to detect (mapnik-config will have null value)')
return ''
def CheckGdalData(context, silent=False): def CheckGdalData(context, silent=False):