From 5c0c072b21e794ad43227cf0f04ca0ae152c8b23 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Thu, 8 Nov 2012 15:07:50 -0500 Subject: [PATCH] link libmapnik and boost system to help avoid any linking errors with more recent boost - closes #1567 --- SConstruct | 2 -- bindings/python/SConscript | 3 +++ plugins/input/gdal/SConscript | 7 ++++--- plugins/input/kismet/SConscript | 9 +++++---- plugins/input/occi/SConscript | 7 ++++--- plugins/input/ogr/SConscript | 11 ++++------- plugins/input/osm/SConscript | 7 ++++--- plugins/input/postgis/SConscript | 11 ++++++----- plugins/input/raster/SConscript | 8 ++++---- plugins/input/shape/SConscript | 9 ++++----- plugins/input/sqlite/SConscript | 8 ++++---- 11 files changed, 42 insertions(+), 40 deletions(-) diff --git a/SConstruct b/SConstruct index d4a4e51d7..b09772a3b 100644 --- a/SConstruct +++ b/SConstruct @@ -16,8 +16,6 @@ # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # -# $Id$ - import os import sys diff --git a/bindings/python/SConscript b/bindings/python/SConscript index eee8ebe3b..3246eb351 100644 --- a/bindings/python/SConscript +++ b/bindings/python/SConscript @@ -31,6 +31,9 @@ install_prefix = env['DESTDIR'] + '/' + prefix linkflags = '' libraries = ['mapnik','png','jpeg'] +if env['HAS_BOOST_SYSTEM']: + libraries.append('boost_system%s' % env['BOOST_APPEND']) + if env['BOOST_PYTHON_LIB']: libraries.append(env['BOOST_PYTHON_LIB']) else: diff --git a/plugins/input/gdal/SConscript b/plugins/input/gdal/SConscript index f9bb57246..c7e5ee957 100644 --- a/plugins/input/gdal/SConscript +++ b/plugins/input/gdal/SConscript @@ -32,9 +32,10 @@ gdal_src = Split( ) libraries = [env['PLUGINS']['gdal']['lib']] -if env['PLATFORM'] == 'Darwin': - libraries.append('mapnik') - libraries.append(env['ICU_LIB_NAME']) +libraries.append('mapnik') +libraries.append(env['ICU_LIB_NAME']) +if env['HAS_BOOST_SYSTEM']: + libraries.append('boost_system%s' % env['BOOST_APPEND']) gdal_inputdriver = env.SharedLibrary('gdal', source=gdal_src, SHLIBPREFIX='', SHLIBSUFFIX='.input', LIBS=libraries) diff --git a/plugins/input/kismet/SConscript b/plugins/input/kismet/SConscript index 377fe60da..3ad1310f9 100644 --- a/plugins/input/kismet/SConscript +++ b/plugins/input/kismet/SConscript @@ -32,10 +32,11 @@ kismet_src = Split( ) libraries = [] -if env['PLATFORM'] == 'Darwin': - libraries.append('mapnik') - libraries.append(env['ICU_LIB_NAME']) - libraries.append('boost_thread%s' % env['BOOST_APPEND']) +libraries.append('mapnik') +libraries.append(env['ICU_LIB_NAME']) +libraries.append('boost_thread%s' % env['BOOST_APPEND']) +if env['HAS_BOOST_SYSTEM']: + libraries.append('boost_system%s' % env['BOOST_APPEND']) kismet_inputdriver = env.SharedLibrary('../kismet', source=kismet_src, SHLIBPREFIX='', SHLIBSUFFIX='.input', LIBS=libraries) diff --git a/plugins/input/occi/SConscript b/plugins/input/occi/SConscript index 99287b6ca..25ade136a 100644 --- a/plugins/input/occi/SConscript +++ b/plugins/input/occi/SConscript @@ -35,9 +35,10 @@ occi_src = Split( ) libraries = [ 'occi', 'ociei' ] -if env['PLATFORM'] == 'Darwin': - libraries.append('mapnik') - libraries.append(env['ICU_LIB_NAME']) +libraries.append('mapnik') +libraries.append(env['ICU_LIB_NAME']) +if env['HAS_BOOST_SYSTEM']: + libraries.append('boost_system%s' % env['BOOST_APPEND']) occi_inputdriver = env.SharedLibrary('../occi', source=occi_src, SHLIBPREFIX='', SHLIBSUFFIX='.input', LIBS=libraries) diff --git a/plugins/input/ogr/SConscript b/plugins/input/ogr/SConscript index bfda1be96..ad9c4dfc0 100644 --- a/plugins/input/ogr/SConscript +++ b/plugins/input/ogr/SConscript @@ -35,13 +35,10 @@ ogr_src = Split( libraries = [env['PLUGINS']['ogr']['lib']] libraries.append(['boost_iostreams%s' % env['BOOST_APPEND']]) - -if env['PLATFORM'] == 'Darwin': - if env['HAS_BOOST_SYSTEM']: - boost_system = 'boost_system%s' % env['BOOST_APPEND'] - libraries.append(boost_system) - libraries.append('mapnik') - libraries.append(env['ICU_LIB_NAME']) +if env['HAS_BOOST_SYSTEM']: + libraries.append('boost_system%s' % env['BOOST_APPEND']) +libraries.append('mapnik') +libraries.append(env['ICU_LIB_NAME']) ogr_inputdriver = env.SharedLibrary('../ogr', source=ogr_src, SHLIBPREFIX='', SHLIBSUFFIX='.input', LIBS=libraries) diff --git a/plugins/input/osm/SConscript b/plugins/input/osm/SConscript index 5c03eeb87..58950cc51 100644 --- a/plugins/input/osm/SConscript +++ b/plugins/input/osm/SConscript @@ -37,9 +37,10 @@ osm_src = Split( libraries = [ 'xml2' ] libraries.append('curl') -if env['PLATFORM'] == 'Darwin': - libraries.append('mapnik') - libraries.append(env['ICU_LIB_NAME']) +libraries.append('mapnik') +libraries.append(env['ICU_LIB_NAME']) +if env['HAS_BOOST_SYSTEM']: + libraries.append('boost_system%s' % env['BOOST_APPEND']) osm_inputdriver = env.SharedLibrary('../osm', source=osm_src, SHLIBPREFIX='', SHLIBSUFFIX='.input', LIBS=libraries) diff --git a/plugins/input/postgis/SConscript b/plugins/input/postgis/SConscript index 5e449efae..25197c42e 100644 --- a/plugins/input/postgis/SConscript +++ b/plugins/input/postgis/SConscript @@ -33,11 +33,12 @@ postgis_src = Split( libraries = ['pq'] -if env['PLATFORM'] == 'Darwin': - libraries.append('mapnik') - libraries.append(env['ICU_LIB_NAME']) - if env['THREADING'] == 'multi': - libraries.append('boost_thread%s' % env['BOOST_APPEND']) +libraries.append('mapnik') +libraries.append(env['ICU_LIB_NAME']) +if env['THREADING'] == 'multi': + libraries.append('boost_thread%s' % env['BOOST_APPEND']) +if env['HAS_BOOST_SYSTEM']: + libraries.append('boost_system%s' % env['BOOST_APPEND']) postgis_inputdriver = env.SharedLibrary('../postgis', source=postgis_src, SHLIBPREFIX='', SHLIBSUFFIX='.input', LIBS=libraries) diff --git a/plugins/input/raster/SConscript b/plugins/input/raster/SConscript index db3ccac36..49332868e 100644 --- a/plugins/input/raster/SConscript +++ b/plugins/input/raster/SConscript @@ -33,11 +33,11 @@ raster_src = Split( ) libraries = [] -if env['PLATFORM'] == 'Darwin': - libraries.append('mapnik') - libraries.append(env['ICU_LIB_NAME']) +libraries.append('mapnik') +libraries.append(env['ICU_LIB_NAME']) +if env['HAS_BOOST_SYSTEM']: libraries.append('boost_system%s' % env['BOOST_APPEND']) - libraries.append('boost_filesystem%s' % env['BOOST_APPEND']) +libraries.append('boost_filesystem%s' % env['BOOST_APPEND']) raster_inputdriver = env.SharedLibrary('../raster', source=raster_src, SHLIBPREFIX='', SHLIBSUFFIX='.input', LIBS=libraries) diff --git a/plugins/input/shape/SConscript b/plugins/input/shape/SConscript index 19e4079a7..684443171 100644 --- a/plugins/input/shape/SConscript +++ b/plugins/input/shape/SConscript @@ -37,12 +37,11 @@ shape_src = Split( ) libraries = ['boost_iostreams%s' % env['BOOST_APPEND']] - -if env['PLATFORM'] == 'Darwin': - libraries.append('mapnik') - libraries.append(env['ICU_LIB_NAME']) +libraries.append('mapnik') +libraries.append(env['ICU_LIB_NAME']) +if env['HAS_BOOST_SYSTEM']: libraries.append('boost_system%s' % env['BOOST_APPEND']) - libraries.append('boost_filesystem%s' % env['BOOST_APPEND']) +libraries.append('boost_filesystem%s' % env['BOOST_APPEND']) env2 = env.Clone() if env['SHAPE_MEMORY_MAPPED_FILE']: diff --git a/plugins/input/sqlite/SConscript b/plugins/input/sqlite/SConscript index fea3a4fcf..542c403c3 100644 --- a/plugins/input/sqlite/SConscript +++ b/plugins/input/sqlite/SConscript @@ -32,11 +32,11 @@ sqlite_src = Split( ) libraries = [ 'sqlite3' ] -if env['PLATFORM'] == 'Darwin': - libraries.append('mapnik') - libraries.append(env['ICU_LIB_NAME']) +libraries.append('mapnik') +libraries.append(env['ICU_LIB_NAME']) +if env['HAS_BOOST_SYSTEM']: libraries.append('boost_system%s' % env['BOOST_APPEND']) - libraries.append('boost_filesystem%s' % env['BOOST_APPEND']) +libraries.append('boost_filesystem%s' % env['BOOST_APPEND']) sqlite_inputdriver = env.SharedLibrary('../sqlite', source=sqlite_src, SHLIBPREFIX='', SHLIBSUFFIX='.input', LIBS=libraries)