Skip to content

Commit

Permalink
require mapnik 2.0.x or greater
Browse files Browse the repository at this point in the history
  • Loading branch information
Dane Springmeyer committed Nov 24, 2011
1 parent 5aed1b8 commit 15d310c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 46 deletions.
11 changes: 3 additions & 8 deletions README.md
Expand Up @@ -23,8 +23,8 @@ Dane Springmeyer <dane - at - dbsgeo.com> with any questions.

# Requires

* Mapnik 0.7.2 or 2.0.x (http://svn.mapnik.org/trunk)
* Boost >= 1.42 (for spirit2)
* Mapnik >=2.0.x
* Boost >= 1.42
* Scons (for build)


Expand All @@ -41,7 +41,6 @@ Install scons:

sudo easy_install scons

Set your mapnik version in SConstruct (mapnik or mapnik2)

You will also likely need to manually tweak the compile paths and flags in SConstruct. The trick is to get paths to libicuuc, libfreetype, libboost*, and libmapnik in the compile lines

Expand All @@ -53,15 +52,11 @@ Next edit the config.json to customize to your mapnik setup.

Then run:

# for mapnik2
./paleoserver2 config.json

# for mapnik 0.7.2:
./paleoserver config.json

Or just pass all required options on the command line like:

./paleoserver2 0.0.0.0 8000 2 . /usr/local/lib/mapnik2 demo/world_latlon.xml
./paleoserver 0.0.0.0 8000 2 . /usr/local/lib/mapnik demo/world_latlon.xml


# Supports
Expand Down
37 changes: 4 additions & 33 deletions scons_ext/core.py
Expand Up @@ -4,13 +4,6 @@

from SCons.Script import *

# library name, either 'mapnik' for Mapnik 0.7.x or 'mapnik2' for Mapnik trunk
mapnik = 'mapnik2'
#mapnik = 'mapnik'

# build against a Framework install of Mapnik (for osx)
FRAMEWORK = False

# build with debug output
DEBUG = False

Expand All @@ -32,32 +25,10 @@ def main():

env['CXX'] = os.environ.get('CXX') or 'g++'

env['LIBS'] = [mapnik,'icuuc','boost_filesystem','boost_regex','boost_system','boost_thread']
env['CPPPATH'] = ['/usr/local/include']
env['LIBPATH'] = ['/usr/local/lib']

if FRAMEWORK:
fm_path = '/Library/Frameworks/Mapnik.framework/Versions/Current/unix/'
env['CPPPATH'].insert(0,'%sinclude' % fm_path)
env['LIBPATH'].insert(0,'%slib' % fm_path)

# add freetype paths
env.ParseConfig('freetype-config --libs --cflags')

# add xml2 paths
env.ParseConfig('xml2-config --cflags --libs')

if mapnik == 'mapnik2':
pass#env.ParseConfig('mapnik-config --libs --cppflags')
else:
if not FRAMEWORK:
env['CPPPATH'].insert(0,'/usr/local/include/')

cppflags = '-O3 -ansi -Wall'

if 'mapnik2' in env['LIBS']:
cppflags += ' -DUSING_MAPNIK2'

env.ParseConfig('mapnik-config --ldflags --libs --dep-libs --cflags')

cppflags = ''

if COPY_MAP_PER_THREAD:
# instead of sharing a single map
# for every request instead load
Expand Down
7 changes: 2 additions & 5 deletions src/SConscript
Expand Up @@ -7,12 +7,9 @@ prefix = env['PREFIX']

source = [os.path.basename(i) for i in glob.glob('*.cpp')]

if 'mapnik2' in env['LIBS']:
target = '../paleoserver2'
else:
target = '../paleoserver'
target = '../paleoserver'

paleoserver = env.Program(target, source)#, CPPPATH=env['CPPPATH'], LIBS=env['LIBS'])
paleoserver = env.Program(target, source)

env.Install(prefix + '/bin', paleoserver)
env.Alias('install', prefix + '/bin')

0 comments on commit 15d310c

Please sign in to comment.