backport r2570 from trunk - fix for gdal framework installer
This commit is contained in:
parent
70b5f62759
commit
48c4a86abb
1 changed files with 18 additions and 4 deletions
22
SConstruct
22
SConstruct
|
@ -446,7 +446,17 @@ def parse_config(context, config, checks='--libs --cflags'):
|
|||
parsed = False
|
||||
if ret:
|
||||
try:
|
||||
env.ParseConfig(cmd)
|
||||
# hack for potential -framework GDAL syntax
|
||||
# which will not end up being added to env['LIBS']
|
||||
# and thus breaks knowledge below that gdal worked
|
||||
if 'gdal-config' in cmd:
|
||||
num_libs = len(env['LIBS'])
|
||||
env.ParseConfig(cmd)
|
||||
if not num_libs > env['LIBS']:
|
||||
env['LIBS'].append('gdal')
|
||||
env['LIBPATH'].insert(0,'/Library/Frameworks/GDAL.framework/unix/lib')
|
||||
else:
|
||||
env.ParseConfig(cmd)
|
||||
parsed = True
|
||||
except OSError, e:
|
||||
ret = False
|
||||
|
@ -456,7 +466,7 @@ def parse_config(context, config, checks='--libs --cflags'):
|
|||
env['SKIPPED_DEPS'].append(tool)
|
||||
conf.rollback_option('GDAL_CONFIG')
|
||||
else:
|
||||
env['MISSING_DEPS'].append(tool)
|
||||
env['MISSING_DEPS'].append(tool)
|
||||
context.Result( ret )
|
||||
return ret
|
||||
|
||||
|
@ -470,9 +480,13 @@ def get_pkg_lib(context, config, lib):
|
|||
parsed = False
|
||||
if ret:
|
||||
try:
|
||||
libnames = re.findall(libpattern,call(cmd,silent=True))
|
||||
value = call(cmd,silent=True)
|
||||
libnames = re.findall(libpattern,value)
|
||||
if libnames:
|
||||
libname = libnames[0]
|
||||
libname = libnames[0]
|
||||
else:
|
||||
# osx 1.8 install gives '-framework GDAL'
|
||||
libname = 'gdal'
|
||||
except Exception, e:
|
||||
ret = False
|
||||
print ' unable to determine library name:'# %s' % str(e)
|
||||
|
|
Loading…
Reference in a new issue