added support for building on x86_64 platform e.g. /usr/lib64 etc.

This commit is contained in:
Artem Pavlenko 2006-09-06 09:14:41 +00:00
parent 26a406706e
commit 31d04c3131
7 changed files with 26 additions and 17 deletions

View file

@ -20,30 +20,39 @@
# $Id$
import os, sys
import os, sys, platform
if platform.uname()[4] == 'x86_64':
LIB_PLATFORM = 'lib64'
else :
LIB_PLATFORM = 'lib'
opts = Options()
opts.Add('PREFIX', 'The install path "prefix"', '/usr/local')
opts.Add(PathOption('BOOST_INCLUDES', 'Search path for boost include files', '/usr/include'))
opts.Add(PathOption('BOOST_LIBS', 'Search path for boost library files', '/usr/lib'))
opts.Add(PathOption('BOOST_LIBS', 'Search path for boost library files', '/usr/' + LIB_PLATFORM))
opts.Add(PathOption('FREETYPE_CONFIG', 'The path to the freetype-config executable.', '/usr/bin/freetype-config'))
opts.Add(PathOption('PNG_INCLUDES', 'Search path for libpng include files', '/usr/include'))
opts.Add(PathOption('PNG_LIBS', 'Search path for libpng include files', '/usr/lib'))
opts.Add(PathOption('PNG_LIBS', 'Search path for libpng include files', '/usr/' + LIB_PLATFORM))
opts.Add(PathOption('JPEG_INCLUDES', 'Search path for libjpeg include files', '/usr/include'))
opts.Add(PathOption('JPEG_LIBS', 'Search path for libjpeg library files', '/usr/lib'))
opts.Add(PathOption('JPEG_LIBS', 'Search path for libjpeg library files', '/usr/' + LIB_PLATFORM))
opts.Add(PathOption('TIFF_INCLUDES', 'Search path for libtiff include files', '/usr/include'))
opts.Add(PathOption('TIFF_LIBS', 'Search path for libtiff library files', '/usr/lib'))
opts.Add(PathOption('TIFF_LIBS', 'Search path for libtiff library files', '/usr/' + LIB_PLATFORM))
opts.Add(PathOption('PGSQL_INCLUDES', 'Search path for PostgreSQL include files', '/usr/include'))
opts.Add(PathOption('PGSQL_LIBS', 'Search path for PostgreSQL library files', '/usr/lib'))
opts.Add(PathOption('PGSQL_LIBS', 'Search path for PostgreSQL library files', '/usr/' + LIB_PLATFORM))
opts.Add(PathOption('PROJ_INCLUDES', 'Search path for PROJ.4 include files', '/usr/local/include'))
opts.Add(PathOption('PROJ_LIBS', 'Search path for PROJ.4 include files', '/usr/local/lib'))
opts.Add(PathOption('PROJ_LIBS', 'Search path for PROJ.4 include files', '/usr/local/' + LIB_PLATFORM))
opts.Add(PathOption('PYTHON','Python executable', sys.executable))
opts.Add(ListOption('INPUT_PLUGINS','Input drivers to include','all',['postgis','shape','raster']))
opts.Add(ListOption('BINDINGS','Language bindings to build','all',['python']))
opts.Add('DEBUG', 'Compile a debug version of mapnik', '')
env = Environment(ENV=os.environ, options=opts)
env['LIB_PLATFORM'] = LIB_PLATFORM
Help(opts.GenerateHelpText(env))

View file

@ -23,7 +23,7 @@ import glob
Import('env')
prefix = env['PYTHON_PREFIX'] + '/lib/python' + env['PYTHON_VERSION'] + '/site-packages/'
prefix = env['PYTHON_PREFIX'] + '/'+env['LIB_PLATFORM']+ '/python' + env['PYTHON_VERSION'] + '/site-packages/'
libraries = ['mapnik', 'boost_python%s' % env['BOOST_APPEND']]
headers = [env['PYTHON_PREFIX'] + '/include/python' + env['PYTHON_VERSION']] + env['CPPPATH']
@ -36,7 +36,7 @@ inputpluginspath = mapniklibpath + '/input'
fontscollectionpath = mapniklibpath + '/fonts'
"""
file('mapnik/paths.py','w').write(paths % (env['PREFIX'] + '/lib/mapnik',))
file('mapnik/paths.py','w').write(paths % (env['PREFIX'] + '/'+env['LIB_PLATFORM']+'/mapnik',))
pymapnik = glob.glob('mapnik/*.py')
env.Alias(target='install', source=env.Install(prefix+'/mapnik', pymapnik))

View file

@ -24,4 +24,4 @@ Import('env')
prefix = env['PREFIX']
includes = glob.glob('*/*.ttf')
env.Alias(target='install', source=env.Install(prefix+'/lib/mapnik/fonts', includes))
env.Alias(target='install', source=env.Install(prefix+'/' + env['LIB_PLATFORM'] + '/mapnik/fonts', includes))

View file

@ -32,5 +32,5 @@ postgis_src = Split(
postgis_inputdriver = env.SharedLibrary('postgis', source=postgis_src, SHLIBPREFIX='', LIBS='pq')
env.Install(prefix + '/lib/mapnik/input', postgis_inputdriver)
env.Alias("install", prefix + '/lib/mapnik/input')
env.Install(prefix + '/' + env['LIB_PLATFORM'] + '/mapnik/input', postgis_inputdriver)
env.Alias('install', prefix + '/' + env['LIB_PLATFORM'] + '/mapnik/input')

View file

@ -33,5 +33,5 @@ raster_src = Split(
raster_inputdriver = env.SharedLibrary('raster', source=raster_src, SHLIBPREFIX='', LIBS=[])
env.Install(prefix + '/lib/mapnik/input', raster_inputdriver)
env.Alias('install', prefix + '/lib/mapnik/input')
env.Install(prefix + '/' + env['LIB_PLATFORM'] + '/mapnik/input', raster_inputdriver)
env.Alias('install', prefix + '/' + env['LIB_PLATFORM'] + '/mapnik/input')

View file

@ -38,5 +38,5 @@ shape_src = Split(
shape_inputdriver = env.SharedLibrary('shape', source=shape_src, SHLIBPREFIX='', LIBS=[])
env.Install(prefix+'/lib/mapnik/input', shape_inputdriver)
env.Alias('install', prefix + '/lib/mapnik/input')
env.Install(prefix + '/' + env['LIB_PLATFORM'] + '/mapnik/input', shape_inputdriver)
env.Alias('install', prefix + '/' + env['LIB_PLATFORM'] + '/mapnik/input')

View file

@ -57,6 +57,6 @@ source = Split(
mapnik = env.SharedLibrary('mapnik', source, LIBS=libraries, LINKFLAGS=linkflags)
env.Alias(target='install', source=env.Install(prefix+'/lib', mapnik))
env.Alias(target='install', source=env.Install(prefix + '/' + env['LIB_PLATFORM'], mapnik))
includes = glob.glob('../include' + '/*.hpp')
env.Alias(target='install', source=env.Install(prefix+'/include/mapnik', includes))