scons: port minor build fixes from master to make building os x binaries (against static icu and libpq) easier
This commit is contained in:
parent
c8848c8a9b
commit
51bf0ef2a5
3 changed files with 24 additions and 6 deletions
|
@ -834,6 +834,9 @@ int main()
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def boost_regex_has_icu(context):
|
def boost_regex_has_icu(context):
|
||||||
|
if env['RUNTIME_LINK'] == 'static':
|
||||||
|
context.env.Append(LIBS='icui18n')
|
||||||
|
context.env.Append(LIBS='icudata')
|
||||||
ret = context.TryRun("""
|
ret = context.TryRun("""
|
||||||
|
|
||||||
#include <boost/regex/icu.hpp>
|
#include <boost/regex/icu.hpp>
|
||||||
|
|
|
@ -32,15 +32,23 @@ postgis_src = Split(
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
|
|
||||||
libraries = ['pq']
|
# clear out and rebuild libs
|
||||||
|
plugin_env['LIBS'] = ['pq']
|
||||||
|
|
||||||
# Link Library to Dependencies
|
# Link Library to Dependencies
|
||||||
libraries.append('mapnik')
|
plugin_env['LIBS'].append('mapnik')
|
||||||
libraries.append(env['ICU_LIB_NAME'])
|
plugin_env['LIBS'].append(env['ICU_LIB_NAME'])
|
||||||
if env['THREADING'] == 'multi':
|
if env['THREADING'] == 'multi':
|
||||||
libraries.append('boost_thread%s' % env['BOOST_APPEND'])
|
plugin_env['LIBS'].append('boost_thread%s' % env['BOOST_APPEND'])
|
||||||
|
|
||||||
input_plugin = plugin_env.SharedLibrary('../postgis', source=postgis_src, SHLIBPREFIX='', SHLIBSUFFIX='.input', LIBS=libraries, LINKFLAGS=env['CUSTOM_LDFLAGS'])
|
if env['RUNTIME_LINK'] == 'static':
|
||||||
|
#cmd = 'pg_config --libs'
|
||||||
|
#plugin_env.ParseConfig(cmd)
|
||||||
|
# pg_config does not seem to report correct deps of libpq
|
||||||
|
# so resort to hardcoding for now
|
||||||
|
plugin_env['LIBS'].extend(['ldap','pam','ssl','crypto','krb5'])
|
||||||
|
|
||||||
|
input_plugin = plugin_env.SharedLibrary('../postgis', source=postgis_src, SHLIBPREFIX='', SHLIBSUFFIX='.input', LINKFLAGS=env['CUSTOM_LDFLAGS'])
|
||||||
|
|
||||||
# if the plugin links to libmapnik ensure it is built first
|
# if the plugin links to libmapnik ensure it is built first
|
||||||
Depends(input_plugin, env.subst('../../../src/%s' % env['MAPNIK_LIB_NAME']))
|
Depends(input_plugin, env.subst('../../../src/%s' % env['MAPNIK_LIB_NAME']))
|
||||||
|
|
|
@ -55,7 +55,10 @@ filesystem = 'boost_filesystem%s' % env['BOOST_APPEND']
|
||||||
regex = 'boost_regex%s' % env['BOOST_APPEND']
|
regex = 'boost_regex%s' % env['BOOST_APPEND']
|
||||||
|
|
||||||
# clear out and re-set libs for this env
|
# clear out and re-set libs for this env
|
||||||
lib_env['LIBS'] = ['freetype','ltdl','png','tiff','z','jpeg','proj',env['ICU_LIB_NAME'],filesystem,regex]
|
lib_env['LIBS'] = ['freetype','ltdl','png','tiff','z','proj',env['ICU_LIB_NAME'],filesystem,regex]
|
||||||
|
|
||||||
|
if env['JPEG']:
|
||||||
|
lib_env['LIBS'].append('jpeg')
|
||||||
|
|
||||||
if len(env['EXTRA_FREETYPE_LIBS']):
|
if len(env['EXTRA_FREETYPE_LIBS']):
|
||||||
lib_env['LIBS'].extend(copy(env['EXTRA_FREETYPE_LIBS']))
|
lib_env['LIBS'].extend(copy(env['EXTRA_FREETYPE_LIBS']))
|
||||||
|
@ -77,6 +80,10 @@ if not env['RUNTIME_LINK'] == 'static':
|
||||||
else:
|
else:
|
||||||
lib_env['LIBS'].append([lib for lib in env['LIBS'] if lib.startswith('agg')])
|
lib_env['LIBS'].append([lib for lib in env['LIBS'] if lib.startswith('agg')])
|
||||||
|
|
||||||
|
if env['RUNTIME_LINK'] == 'static':
|
||||||
|
if 'icuuc' in env['ICU_LIB_NAME']:
|
||||||
|
lib_env['LIBS'].append('icudata')
|
||||||
|
lib_env['LIBS'].append('icui18n')
|
||||||
|
|
||||||
if env['PLATFORM'] == 'Darwin':
|
if env['PLATFORM'] == 'Darwin':
|
||||||
mapnik_libname = 'libmapnik.dylib'
|
mapnik_libname = 'libmapnik.dylib'
|
||||||
|
|
Loading…
Add table
Reference in a new issue