Skip to content

Commit

Permalink
scons: do not invoke any install or uninstall targets if using SYSTEM…
Browse files Browse the repository at this point in the history
…_FONTS - closes #1481
  • Loading branch information
Dane Springmeyer committed Sep 13, 2012
1 parent 2a3a402 commit 2ded866
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 13 deletions.
2 changes: 1 addition & 1 deletion SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ opts.AddVariables(

# Other variables
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'),
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'),
Expand Down
21 changes: 9 additions & 12 deletions fonts/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,12 @@

Import('env')

# grab all the deja vu fonts
includes = glob.glob('*/*/*.ttf')

# grab single unifont ttf (available at http://unifoundry.com/unifont.html)
includes.extend(glob.glob('unifont*.ttf'))

target_path = env['MAPNIK_FONTS_DEST']

if 'uninstall' not in COMMAND_LINE_TARGETS and not env['SYSTEM_FONTS']:
env.Alias(target='install', source=env.Install(target_path, includes))

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

0 comments on commit 2ded866

Please sign in to comment.