From 22c39d91ba39469714d6f3926ff36fc470f591cf Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Tue, 30 Aug 2011 05:32:01 +0000 Subject: [PATCH] scons: rename all SConscript files to more friendly name of 'build' with a python extension for quick syntax detection in editors --- SConstruct | 40 +++++++++---------- agg/{SConscript => build.py} | 0 bindings/python/{SConscript => build.py} | 0 demo/c++/{SConscript => build.py} | 0 demo/viewer/{SConscript => build.py} | 0 fonts/{SConscript => build.py} | 0 plugins/input/gdal/{SConscript => build.py} | 0 plugins/input/geos/{SConscript => build.py} | 0 plugins/input/kismet/{SConscript => build.py} | 0 plugins/input/occi/{SConscript => build.py} | 0 plugins/input/ogr/{SConscript => build.py} | 0 plugins/input/osm/{SConscript => build.py} | 0 .../input/postgis/{SConscript => build.py} | 10 ++++- plugins/input/raster/{SConscript => build.py} | 0 .../input/rasterlite/{SConscript => build.py} | 0 plugins/input/shape/{SConscript => build.py} | 0 plugins/input/sqlite/{SConscript => build.py} | 0 src/{SConscript => build.py} | 0 tests/cpp_tests/{SConscript => build.py} | 0 .../{SConscript => build.py} | 0 utils/mapnik-config/{SConscript => build.py} | 0 utils/ogrindex/{SConscript => build.py} | 0 utils/performance/{SConscript => build.py} | 0 utils/pgsql2sqlite/{SConscript => build.py} | 0 utils/shapeindex/{SConscript => build.py} | 0 utils/svg2png/{SConscript => build.py} | 0 .../upgrade_map_xml/{SConscript => build.py} | 0 27 files changed, 28 insertions(+), 22 deletions(-) rename agg/{SConscript => build.py} (100%) rename bindings/python/{SConscript => build.py} (100%) rename demo/c++/{SConscript => build.py} (100%) rename demo/viewer/{SConscript => build.py} (100%) rename fonts/{SConscript => build.py} (100%) rename plugins/input/gdal/{SConscript => build.py} (100%) rename plugins/input/geos/{SConscript => build.py} (100%) rename plugins/input/kismet/{SConscript => build.py} (100%) rename plugins/input/occi/{SConscript => build.py} (100%) rename plugins/input/ogr/{SConscript => build.py} (100%) rename plugins/input/osm/{SConscript => build.py} (100%) rename plugins/input/postgis/{SConscript => build.py} (87%) rename plugins/input/raster/{SConscript => build.py} (100%) rename plugins/input/rasterlite/{SConscript => build.py} (100%) rename plugins/input/shape/{SConscript => build.py} (100%) rename plugins/input/sqlite/{SConscript => build.py} (100%) rename src/{SConscript => build.py} (100%) rename tests/cpp_tests/{SConscript => build.py} (100%) rename tests/cpp_tests/svg_renderer_tests/{SConscript => build.py} (100%) rename utils/mapnik-config/{SConscript => build.py} (100%) rename utils/ogrindex/{SConscript => build.py} (100%) rename utils/performance/{SConscript => build.py} (100%) rename utils/pgsql2sqlite/{SConscript => build.py} (100%) rename utils/shapeindex/{SConscript => build.py} (100%) rename utils/svg2png/{SConscript => build.py} (100%) rename utils/upgrade_map_xml/{SConscript => build.py} (100%) diff --git a/SConstruct b/SConstruct index 5389ec4a2..50313bf8a 100644 --- a/SConstruct +++ b/SConstruct @@ -1372,7 +1372,7 @@ if not preconfigured: print # fetch the mapnik version header in order to set the - # ABI version used to build libmapnik.so on linux in src/SConscript + # ABI version used to build libmapnik.so on linux in src/build.py abi = conf.GetMapnikLibVersion() abi_fallback = [2,0,0] if not abi: @@ -1487,7 +1487,7 @@ if not preconfigured: majver, minver = env['PYTHON_VERSION'].split('.') # we don't want the includes it in the main environment... - # as they are later set in the python SConscript + # as they are later set in the python build.py # ugly hack needed until we have env specific conf backup = env.Clone().Dictionary() env.AppendUnique(CPPPATH = os.path.realpath(env['PYTHON_INCLUDES'])) @@ -1564,7 +1564,7 @@ if not HELP_REQUESTED: if env['PATH_INSERT']: env['ENV']['PATH'] = os.path.realpath(env['PATH_INSERT']) + ':' + env['ENV']['PATH'] - # export env so it is available in Sconscript files + # export env so it is available in build.py files Export('env') @@ -1592,10 +1592,10 @@ if not HELP_REQUESTED: # Build agg first, doesn't need anything special if env['RUNTIME_LINK'] == 'shared' and env['INTERNAL_LIBAGG']: - SConscript('agg/SConscript') + SConscript('agg/build.py') # Build the core library - SConscript('src/SConscript') + SConscript('src/build.py') # Build the requested and able-to-be-compiled input plug-ins GDAL_BUILT = False @@ -1603,7 +1603,7 @@ if not HELP_REQUESTED: for plugin in env['REQUESTED_PLUGINS']: details = env['PLUGINS'][plugin] if details['lib'] in env['LIBS']: - SConscript('plugins/input/%s/SConscript' % plugin) + SConscript('plugins/input/%s/build.py' % plugin) if plugin == 'ogr': OGR_BUILT = True if plugin == 'gdal': GDAL_BUILT = True if plugin == 'ogr' or plugin == 'gdal': @@ -1613,7 +1613,7 @@ if not HELP_REQUESTED: env['LIBS'].remove(details['lib']) elif not details['lib']: # build internal shape and raster plugins - SConscript('plugins/input/%s/SConscript' % plugin) + SConscript('plugins/input/%s/build.py' % plugin) else: color_print(1,"Notice: dependencies not met for plugin '%s', not building..." % plugin) @@ -1633,49 +1633,49 @@ if not HELP_REQUESTED: # Build the c++ rundemo app if requested if env['DEMO']: - SConscript('demo/c++/SConscript') + SConscript('demo/c++/build.py') # Build the pgsql2psqlite app if requested if env['PGSQL2SQLITE']: - SConscript('utils/pgsql2sqlite/SConscript') + SConscript('utils/pgsql2sqlite/build.py') # Build shapeindex and remove its dependency from the LIBS if 'boost_program_options%s' % env['BOOST_APPEND'] in env['LIBS']: - SConscript('utils/shapeindex/SConscript') + SConscript('utils/shapeindex/build.py') # devtools not ready for public - #SConscript('utils/ogrindex/SConscript') - #SConscript('utils/svg2png/SConscript') + #SConscript('utils/ogrindex/build.py') + #SConscript('utils/svg2png/build.py') env['LIBS'].remove('boost_program_options%s' % env['BOOST_APPEND']) else : color_print(1,"WARNING: Cannot find boost_program_options. 'shapeindex' won't be available") # Build the Python bindings if 'python' in env['BINDINGS']: - SConscript('bindings/python/SConscript') + SConscript('bindings/python/build.py') # Install the python speed testing scripts if python bindings will be available - SConscript('utils/performance/SConscript') + SConscript('utils/performance/build.py') # Install the mapnik2 upgrade script - SConscript('utils/upgrade_map_xml/SConscript') + SConscript('utils/upgrade_map_xml/build.py') # Configure fonts and if requested install the bundled DejaVu fonts - SConscript('fonts/SConscript') + SConscript('fonts/build.py') # build C++ tests # not ready for release - #SConscript('tests/cpp_tests/SConscript') + #SConscript('tests/cpp_tests/build.py') # not ready for release #if env['SVG_RENDERER']: - # SConscript('tests/cpp_tests/svg_renderer_tests/SConscript') + # SConscript('tests/cpp_tests/svg_renderer_tests/build.py') # install pkg-config script and mapnik-config script - SConscript('utils/mapnik-config/SConscript') + SConscript('utils/mapnik-config/build.py') # write the viewer.ini file - SConscript('demo/viewer/SConscript') + SConscript('demo/viewer/build.py') # if requested, build the sample input plugins if env['SAMPLE_INPUT_PLUGINS']: diff --git a/agg/SConscript b/agg/build.py similarity index 100% rename from agg/SConscript rename to agg/build.py diff --git a/bindings/python/SConscript b/bindings/python/build.py similarity index 100% rename from bindings/python/SConscript rename to bindings/python/build.py diff --git a/demo/c++/SConscript b/demo/c++/build.py similarity index 100% rename from demo/c++/SConscript rename to demo/c++/build.py diff --git a/demo/viewer/SConscript b/demo/viewer/build.py similarity index 100% rename from demo/viewer/SConscript rename to demo/viewer/build.py diff --git a/fonts/SConscript b/fonts/build.py similarity index 100% rename from fonts/SConscript rename to fonts/build.py diff --git a/plugins/input/gdal/SConscript b/plugins/input/gdal/build.py similarity index 100% rename from plugins/input/gdal/SConscript rename to plugins/input/gdal/build.py diff --git a/plugins/input/geos/SConscript b/plugins/input/geos/build.py similarity index 100% rename from plugins/input/geos/SConscript rename to plugins/input/geos/build.py diff --git a/plugins/input/kismet/SConscript b/plugins/input/kismet/build.py similarity index 100% rename from plugins/input/kismet/SConscript rename to plugins/input/kismet/build.py diff --git a/plugins/input/occi/SConscript b/plugins/input/occi/build.py similarity index 100% rename from plugins/input/occi/SConscript rename to plugins/input/occi/build.py diff --git a/plugins/input/ogr/SConscript b/plugins/input/ogr/build.py similarity index 100% rename from plugins/input/ogr/SConscript rename to plugins/input/ogr/build.py diff --git a/plugins/input/osm/SConscript b/plugins/input/osm/build.py similarity index 100% rename from plugins/input/osm/SConscript rename to plugins/input/osm/build.py diff --git a/plugins/input/postgis/SConscript b/plugins/input/postgis/build.py similarity index 87% rename from plugins/input/postgis/SConscript rename to plugins/input/postgis/build.py index 5694fe1f0..f80d90f91 100644 --- a/plugins/input/postgis/SConscript +++ b/plugins/input/postgis/build.py @@ -32,7 +32,7 @@ postgis_src = Split( """ ) -libraries = ['pq'] +libraries = ['pq','intl','ssl','crypto'] # Link Library to Dependencies libraries.append('mapnik2') @@ -40,7 +40,13 @@ libraries.append(env['ICU_LIB_NAME']) if env['THREADING'] == 'multi': libraries.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']) +linkflags = env['CUSTOM_LDFLAGS'] +linkflags += ' -framework Kerberos ' +linkflags += ' -framework Foundation ' +linkflags += ' -framework LDAP ' +linkflags += ' -liconv ' + +input_plugin = plugin_env.SharedLibrary('../postgis', source=postgis_src, SHLIBPREFIX='', SHLIBSUFFIX='.input', LIBS=libraries, LINKFLAGS=linkflags) # if the plugin links to libmapnik2 ensure it is built first Depends(input_plugin, env.subst('../../../src/%s' % env['MAPNIK_LIB_NAME'])) diff --git a/plugins/input/raster/SConscript b/plugins/input/raster/build.py similarity index 100% rename from plugins/input/raster/SConscript rename to plugins/input/raster/build.py diff --git a/plugins/input/rasterlite/SConscript b/plugins/input/rasterlite/build.py similarity index 100% rename from plugins/input/rasterlite/SConscript rename to plugins/input/rasterlite/build.py diff --git a/plugins/input/shape/SConscript b/plugins/input/shape/build.py similarity index 100% rename from plugins/input/shape/SConscript rename to plugins/input/shape/build.py diff --git a/plugins/input/sqlite/SConscript b/plugins/input/sqlite/build.py similarity index 100% rename from plugins/input/sqlite/SConscript rename to plugins/input/sqlite/build.py diff --git a/src/SConscript b/src/build.py similarity index 100% rename from src/SConscript rename to src/build.py diff --git a/tests/cpp_tests/SConscript b/tests/cpp_tests/build.py similarity index 100% rename from tests/cpp_tests/SConscript rename to tests/cpp_tests/build.py diff --git a/tests/cpp_tests/svg_renderer_tests/SConscript b/tests/cpp_tests/svg_renderer_tests/build.py similarity index 100% rename from tests/cpp_tests/svg_renderer_tests/SConscript rename to tests/cpp_tests/svg_renderer_tests/build.py diff --git a/utils/mapnik-config/SConscript b/utils/mapnik-config/build.py similarity index 100% rename from utils/mapnik-config/SConscript rename to utils/mapnik-config/build.py diff --git a/utils/ogrindex/SConscript b/utils/ogrindex/build.py similarity index 100% rename from utils/ogrindex/SConscript rename to utils/ogrindex/build.py diff --git a/utils/performance/SConscript b/utils/performance/build.py similarity index 100% rename from utils/performance/SConscript rename to utils/performance/build.py diff --git a/utils/pgsql2sqlite/SConscript b/utils/pgsql2sqlite/build.py similarity index 100% rename from utils/pgsql2sqlite/SConscript rename to utils/pgsql2sqlite/build.py diff --git a/utils/shapeindex/SConscript b/utils/shapeindex/build.py similarity index 100% rename from utils/shapeindex/SConscript rename to utils/shapeindex/build.py diff --git a/utils/svg2png/SConscript b/utils/svg2png/build.py similarity index 100% rename from utils/svg2png/SConscript rename to utils/svg2png/build.py diff --git a/utils/upgrade_map_xml/SConscript b/utils/upgrade_map_xml/build.py similarity index 100% rename from utils/upgrade_map_xml/SConscript rename to utils/upgrade_map_xml/build.py