scons: do not invoke any install or uninstall targets if using SYSTEM_FONTS - closes #1481

This commit is contained in:
Dane Springmeyer 2012-09-13 13:40:15 -07:00
parent 2a3a402f5d
commit 2ded86629f
2 changed files with 10 additions and 13 deletions

View file

@ -350,7 +350,7 @@ opts.AddVariables(
# Other variables # Other variables
BoolVariable('SHAPE_MEMORY_MAPPED_FILE', 'Utilize memory-mapped files in Shapefile Plugin (higher memory usage, better performance)', 'True'), BoolVariable('SHAPE_MEMORY_MAPPED_FILE', 'Utilize memory-mapped files in Shapefile Plugin (higher memory usage, better performance)', 'True'),
('SYSTEM_FONTS','Provide location for python bindings to register fonts (if given aborts installation of bundled DejaVu fonts)',''), ('SYSTEM_FONTS','Provide location for python bindings to register fonts (if provided then the bundled DejaVu fonts are not installed)',''),
('LIB_DIR_NAME','Name to use for the subfolder beside libmapnik where fonts and plugins are installed','mapnik'), ('LIB_DIR_NAME','Name to use for the subfolder beside libmapnik where fonts and plugins are installed','mapnik'),
PathVariable('PYTHON','Full path to Python executable used to build bindings', sys.executable), PathVariable('PYTHON','Full path to Python executable used to build bindings', sys.executable),
BoolVariable('FRAMEWORK_PYTHON', 'Link against Framework Python on Mac OS X', 'True'), BoolVariable('FRAMEWORK_PYTHON', 'Link against Framework Python on Mac OS X', 'True'),

View file

@ -22,15 +22,12 @@ import glob
Import('env') Import('env')
# grab all the deja vu fonts if not env['SYSTEM_FONTS']:
includes = glob.glob('*/*/*.ttf') # grab all the deja vu fonts
includes = glob.glob('*/*/*.ttf')
# grab single unifont ttf (available at http://unifoundry.com/unifont.html) # grab single unifont ttf (available at http://unifoundry.com/unifont.html)
includes.extend(glob.glob('unifont*.ttf')) includes.extend(glob.glob('unifont*.ttf'))
target_path = env['MAPNIK_FONTS_DEST']
target_path = env['MAPNIK_FONTS_DEST'] if 'uninstall' not in COMMAND_LINE_TARGETS:
env.Alias(target='install', source=env.Install(target_path, includes))
if 'uninstall' not in COMMAND_LINE_TARGETS and not env['SYSTEM_FONTS']: env['create_uninstall_target'](env, target_path)
env.Alias(target='install', source=env.Install(target_path, includes))
env['create_uninstall_target'](env, target_path)