From d1697efe6db4a3067104e2389329536beac4ad4b Mon Sep 17 00:00:00 2001 From: Mickey Rose Date: Fri, 20 Sep 2019 20:15:53 +0200 Subject: [PATCH] install mapbox includes into subdir mapnik/deps/ --- SConstruct | 3 -- deps/mapnik/build.py | 20 ------- include/build.py | 53 ++++++++++--------- utils/mapnik-config/mapnik-config.template.sh | 2 +- 4 files changed, 29 insertions(+), 49 deletions(-) delete mode 100644 deps/mapnik/build.py diff --git a/SConstruct b/SConstruct index fc2785105..e224f9ee1 100644 --- a/SConstruct +++ b/SConstruct @@ -2170,9 +2170,6 @@ if not HELP_REQUESTED: # Install headers SConscript('include/build.py') - # Install auxiliary headers - SConscript('deps/mapnik/build.py') - # Build the requested and able-to-be-compiled input plug-ins GDAL_BUILT = False OGR_BUILT = False diff --git a/deps/mapnik/build.py b/deps/mapnik/build.py deleted file mode 100644 index dff5f70e7..000000000 --- a/deps/mapnik/build.py +++ /dev/null @@ -1,20 +0,0 @@ -import os -from glob import glob - -Import('env') - -subdirs = { - './sparsehash':{'dir':'sparsehash','glob':'*'}, - './sparsehash/internal':{'dir':'sparsehash/internal','glob':'*'}, - '../agg/include':{'dir':'agg','glob':'agg*'}, - '../mapbox/variant/include':{'dir':'mapbox','glob':'*/*.hpp'}, - '../mapbox/geometry/include':{'dir':'mapbox','glob':'*/*.hpp'}, - '../mapbox/geometry/include/mapbox':{'dir':'mapbox/geometry','glob':'*/*.hpp'} -} - -if 'install' in COMMAND_LINE_TARGETS: - for k,v in subdirs.items(): - pathdir = os.path.join(k,v['glob']) - includes = glob(pathdir) - inc_target = os.path.normpath(env['INSTALL_PREFIX']+'/include/mapnik/'+v['dir']) - env.Alias(target='install', source=env.Install(inc_target, includes)) diff --git a/include/build.py b/include/build.py index aa122d9a5..fab900426 100644 --- a/include/build.py +++ b/include/build.py @@ -24,37 +24,40 @@ from glob import glob Import('env') -base = './mapnik/' -subdirs = [ - '', - 'geometry', - 'csv', - 'svg', - 'wkt', - 'cairo', - 'grid', - 'json', - 'util', - 'group', - 'text', - 'text/placements', - 'text/formatting', - 'transform', - 'markers_placements', - 'geometry', - 'value' - ] +subdirglobs = [ + ('.', 'mapnik/*.hpp'), + ('agg', '../deps/agg/include/agg*'), + ('cairo', 'mapnik/cairo/*.hpp'), + ('csv', 'mapnik/csv/*.hpp'), + ('deps/mapbox', '../deps/mapbox/variant/include/mapbox/*.hpp'), + ('deps/mapbox', '../deps/mapbox/geometry/include/mapbox/*.hpp'), + ('deps/mapbox/geometry', '../deps/mapbox/geometry/include/mapbox/geometry/*.hpp'), + ('geometry', 'mapnik/geometry/*.hpp'), + ('group', 'mapnik/group/*.hpp'), + ('json', 'mapnik/json/*.hpp'), + ('markers_placements', 'mapnik/markers_placements/*.hpp'), + ('renderer_common', 'mapnik/renderer_common/*.hpp'), + ('sparsehash', '../deps/mapnik/sparsehash/*'), + ('sparsehash/internal', '../deps/mapnik/sparsehash/internal/*'), + ('svg', 'mapnik/svg/*.hpp'), + ('text', 'mapnik/text/*.hpp'), + ('text/formatting', 'mapnik/text/formatting/*.hpp'), + ('text/placements', 'mapnik/text/placements/*.hpp'), + ('transform', 'mapnik/transform/*.hpp'), + ('util', 'mapnik/util/*.hpp'), + ('value', 'mapnik/value/*.hpp'), + ('wkt', 'mapnik/wkt/*.hpp'), +] if env['SVG_RENDERER']: - subdirs.append('svg/output') + subdirglobs.append(('svg/output', 'mapnik/svg/output/*.hpp')) if env['GRID_RENDERER']: - subdirs.append('grid') + subdirglobs.append(('grid', 'mapnik/grid/*.hpp')) if 'install' in COMMAND_LINE_TARGETS: - for subdir in subdirs: - pathdir = os.path.join(base,subdir,'*.hpp') - includes = glob(pathdir) + for subdir, filenamepattern in subdirglobs: + includes = glob(filenamepattern) inc_target = os.path.normpath(env['INSTALL_PREFIX']+'/include/mapnik/'+subdir) env.Alias(target='install', source=env.Install(inc_target, includes)) diff --git a/utils/mapnik-config/mapnik-config.template.sh b/utils/mapnik-config/mapnik-config.template.sh index c201abe0f..f362e4f00 100755 --- a/utils/mapnik-config/mapnik-config.template.sh +++ b/utils/mapnik-config/mapnik-config.template.sh @@ -32,7 +32,7 @@ CONFIG_QUERIED_ICU_DATA= ## D.R.Y. variables -DRY_INCLUDES="-I${RUNTIME_PREFIX}/include -I${RUNTIME_PREFIX}/include/mapnik/agg -I${RUNTIME_PREFIX}/include/mapnik" +DRY_INCLUDES="-I${RUNTIME_PREFIX}/include -I${RUNTIME_PREFIX}/include/mapnik/agg -I${RUNTIME_PREFIX}/include/mapnik/deps" DRY_CFLAGS="${DRY_INCLUDES} ${CONFIG_DEP_INCLUDES} ${CONFIG_DEFINES} ${CONFIG_CXXFLAGS}" DRY_LIBS="-L${RUNTIME_PREFIX}/${CONFIG_LIBDIR_SCHEMA} -l${CONFIG_MAPNIK_NAME}"