scons: fixes for bypassing configure checks when HOST is provided (iOS build)
This commit is contained in:
parent
98d21de168
commit
2505001af1
1 changed files with 107 additions and 96 deletions
31
SConstruct
31
SConstruct
|
@ -448,7 +448,8 @@ pickle_store = [# Scons internal variables
|
|||
'SVG_RENDERER',
|
||||
'SQLITE_LINKFLAGS',
|
||||
'BOOST_LIB_VERSION_FROM_HEADER',
|
||||
'BIGINT'
|
||||
'BIGINT',
|
||||
'HOST'
|
||||
]
|
||||
|
||||
# Add all other user configurable options to pickle pickle_store
|
||||
|
@ -1259,6 +1260,7 @@ if not preconfigured:
|
|||
has_boost_devel = False
|
||||
|
||||
if has_boost_devel:
|
||||
if not env['HOST']:
|
||||
env['BOOST_LIB_VERSION_FROM_HEADER'] = conf.GetBoostLibVersion()
|
||||
|
||||
# The other required boost headers.
|
||||
|
@ -1303,7 +1305,7 @@ if not preconfigured:
|
|||
color_print(4,'Could not find optional header or shared library for boost %s' % libinfo[0])
|
||||
env['SKIPPED_DEPS'].append('boost ' + libinfo[0])
|
||||
|
||||
if env['ICU_LIB_NAME'] not in env['MISSING_DEPS']:
|
||||
if not env['HOST'] and env['ICU_LIB_NAME'] not in env['MISSING_DEPS']:
|
||||
# http://lists.boost.org/Archives/boost/2009/03/150076.php
|
||||
# we need libicui18n if using static boost libraries, so it is
|
||||
# important to try this check with the library linked
|
||||
|
@ -1317,9 +1319,18 @@ if not preconfigured:
|
|||
env['REQUESTED_PLUGINS'] = [ driver.strip() for driver in Split(env['INPUT_PLUGINS'])]
|
||||
|
||||
SQLITE_HAS_RTREE = None
|
||||
if env['HOST']:
|
||||
SQLITE_HAS_RTREE = True
|
||||
|
||||
CHECK_PKG_CONFIG = conf.CheckPKGConfig('0.15.0')
|
||||
|
||||
if len(env['REQUESTED_PLUGINS']):
|
||||
if env['HOST']:
|
||||
for plugin in env['REQUESTED_PLUGINS']:
|
||||
details = env['PLUGINS'][plugin]
|
||||
if details['lib']:
|
||||
env.AppendUnique(LIBS=details['lib'])
|
||||
else:
|
||||
color_print(4,'Checking for requested plugins dependencies...')
|
||||
for plugin in env['REQUESTED_PLUGINS']:
|
||||
details = env['PLUGINS'][plugin]
|
||||
|
@ -1353,7 +1364,6 @@ if not preconfigured:
|
|||
if plugin == 'sqlite':
|
||||
SQLITE_HAS_RTREE = conf.sqlite_has_rtree()
|
||||
sqlite_backup = env.Clone().Dictionary()
|
||||
|
||||
# if statically linking, on linux we likely
|
||||
# need to link sqlite to pthreads and dl
|
||||
if env['RUNTIME_LINK'] == 'static':
|
||||
|
@ -1367,7 +1377,6 @@ if not preconfigured:
|
|||
env.Append(LIBS=lib)
|
||||
except OSError,e:
|
||||
pass
|
||||
|
||||
if SQLITE_HAS_RTREE is None:
|
||||
SQLITE_HAS_RTREE = conf.sqlite_has_rtree()
|
||||
if not SQLITE_HAS_RTREE:
|
||||
|
@ -1377,7 +1386,6 @@ if not preconfigured:
|
|||
env['SKIPPED_DEPS'].append('sqlite_rtree')
|
||||
else:
|
||||
env.Replace(**sqlite_backup)
|
||||
|
||||
elif details['lib'] and details['inc']:
|
||||
if not conf.CheckLibWithHeader(details['lib'], details['inc'], details['lang']):
|
||||
env['SKIPPED_DEPS'].append(details['lib'])
|
||||
|
@ -1388,6 +1396,7 @@ if not preconfigured:
|
|||
env.PrependUnique(CPPPATH = '#', delete_existing=True)
|
||||
env.PrependUnique(LIBPATH = '#src', delete_existing=True)
|
||||
|
||||
if not env['HOST']:
|
||||
if env['PGSQL2SQLITE']:
|
||||
if 'sqlite3' not in env['LIBS']:
|
||||
env.AppendUnique(LIBS='sqlite3')
|
||||
|
@ -1591,9 +1600,12 @@ if not preconfigured:
|
|||
|
||||
# fetch the mapnik version header in order to set the
|
||||
# ABI version used to build libmapnik.so on linux in src/build.py
|
||||
abi = conf.GetMapnikLibVersion()
|
||||
abi = None
|
||||
abi_fallback = "3.0.0-pre"
|
||||
if not env['HOST']:
|
||||
abi = conf.GetMapnikLibVersion()
|
||||
if not abi:
|
||||
if not env['HOST']:
|
||||
color_print(1,'Problem encountered parsing mapnik version, falling back to %s' % abi_fallback)
|
||||
abi = abi_fallback
|
||||
|
||||
|
@ -1818,7 +1830,7 @@ if not HELP_REQUESTED:
|
|||
if env['PLUGIN_LINKING'] == 'static' or plugin not in env['REQUESTED_PLUGINS']:
|
||||
if os.path.exists('plugins/input/%s.input' % plugin):
|
||||
os.unlink('plugins/input/%s.input' % plugin)
|
||||
if plugin in env['REQUESTED_PLUGINS']:
|
||||
elif plugin in env['REQUESTED_PLUGINS']:
|
||||
details = env['PLUGINS'][plugin]
|
||||
if details['lib'] in env['LIBS']:
|
||||
if env['PLUGIN_LINKING'] == 'shared':
|
||||
|
@ -1858,21 +1870,20 @@ if not HELP_REQUESTED:
|
|||
os.unlink(plugin_path)
|
||||
|
||||
# Build the c++ rundemo app if requested
|
||||
if not env['HOST']:
|
||||
if env['DEMO']:
|
||||
SConscript('demo/c++/build.py')
|
||||
|
||||
# Build shapeindex and remove its dependency from the LIBS
|
||||
if not env['HOST']:
|
||||
if 'boost_program_options%s' % env['BOOST_APPEND'] in env['LIBS']:
|
||||
if env['SHAPEINDEX']:
|
||||
SConscript('utils/shapeindex/build.py')
|
||||
|
||||
# Build the pgsql2psqlite app if requested
|
||||
if env['PGSQL2SQLITE']:
|
||||
SConscript('utils/pgsql2sqlite/build.py')
|
||||
|
||||
if env['SVG2PNG']:
|
||||
SConscript('utils/svg2png/build.py')
|
||||
|
||||
# devtools not ready for public
|
||||
#SConscript('utils/ogrindex/build.py')
|
||||
env['LIBS'].remove('boost_program_options%s' % env['BOOST_APPEND'])
|
||||
|
|
Loading…
Reference in a new issue