diff --git a/plugins/input/postgis/build.py b/plugins/input/postgis/build.py index a1e8563c6..c1d4a00a6 100644 --- a/plugins/input/postgis/build.py +++ b/plugins/input/postgis/build.py @@ -33,15 +33,23 @@ postgis_src = Split( """ ) -libraries = ['pq'] +# clear out and rebuild libs +plugin_env['LIBS'] = ['pq'] # Link Library to Dependencies -libraries.append('mapnik') -libraries.append(env['ICU_LIB_NAME']) +plugin_env['LIBS'].append('mapnik') +plugin_env['LIBS'].append(env['ICU_LIB_NAME']) 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 Depends(input_plugin, env.subst('../../../src/%s' % env['MAPNIK_LIB_NAME']))