From 6f14228e3090bdc59bafb17faff7b2239c8c9bd5 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Thu, 27 Feb 2014 14:02:24 -0800 Subject: [PATCH] fix static linking of gdal/ogr plugins on linux - refs mapnik/mapnik-packaging#123 --- plugins/input/gdal/build.py | 4 ++-- plugins/input/ogr/build.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/input/gdal/build.py b/plugins/input/gdal/build.py index 0e80f3c2a..fc563512a 100644 --- a/plugins/input/gdal/build.py +++ b/plugins/input/gdal/build.py @@ -35,17 +35,17 @@ plugin_sources = Split( ) plugin_env['LIBS'] = [] +plugin_env.Append(LIBS=env['PLUGINS']['gdal']['lib']) if env['RUNTIME_LINK'] == 'static': cmd = 'gdal-config --dep-libs' plugin_env.ParseConfig(cmd) # Link Library to Dependencies -plugin_env.Append(LIBS=env['PLUGINS']['gdal']['lib']) libraries = copy(plugin_env['LIBS']) if env['PLUGIN_LINKING'] == 'shared': - libraries.append('mapnik') + libraries.insert(0,'mapnik') libraries.append(env['ICU_LIB_NAME']) libraries.append('boost_system%s' % env['BOOST_APPEND']) diff --git a/plugins/input/ogr/build.py b/plugins/input/ogr/build.py index b66f6a9a9..54e66bd3b 100644 --- a/plugins/input/ogr/build.py +++ b/plugins/input/ogr/build.py @@ -39,13 +39,13 @@ plugin_sources = Split( cxxflags = [] plugin_env['LIBS'] = [] +plugin_env.Append(LIBS=env['PLUGINS']['ogr']['lib']) if env['RUNTIME_LINK'] == 'static': cmd = 'gdal-config --dep-libs' plugin_env.ParseConfig(cmd) # Link Library to Dependencies -plugin_env.Append(LIBS=env['PLUGINS']['ogr']['lib']) libraries = copy(plugin_env['LIBS']) if env.get('BOOST_LIB_VERSION_FROM_HEADER'): @@ -58,7 +58,7 @@ if env.get('BOOST_LIB_VERSION_FROM_HEADER'): plugin_env.Append(CXXFLAGS=cxxflags) if env['PLUGIN_LINKING'] == 'shared': - libraries.append('mapnik') + libraries.insert(0,'mapnik') libraries.append(env['ICU_LIB_NAME']) libraries.append('boost_system%s' % env['BOOST_APPEND'])