Reworked all the svn:ignore properties. They are all set explicitely now, and nothing should be left unacounted for.

Changed SConstruct to use freetype-config.  Updated INSTALL to reflect.

Added a RAM requirement for building in the INSTALL doc.

Fixed some python styling and added some basic docstrings.
This commit is contained in:
Jean-Francois Doyon 2006-02-26 21:47:35 +00:00
parent 9de253198b
commit 34dc842d2d
7 changed files with 15 additions and 19 deletions

13
INSTALL
View file

@ -31,6 +31,7 @@ All of these will normally come with any modern Linux distribution.
If your system does NOT have one of these installed, you will need to install the mandatory ones at the very least before proceeding further. Instructions on how to do this will come with each individual package. If your system does NOT have one of these installed, you will need to install the mandatory ones at the very least before proceeding further. Instructions on how to do this will come with each individual package.
Also, a minimum of 256MB of RAM is recommended for the build process.
Building Building
-------- --------
@ -64,13 +65,9 @@ BOOST_LIBS: Search path for boost library files ( /path/to/BOOST_LIBS )
default: /usr/lib default: /usr/lib
actual: /usr/lib actual: /usr/lib
FREETYPE_INCLUDES: Search path for FreeType include files ( /path/to/FREETYPE_INCLUDES ) FREETYPE_CONFIG: The path to the freetype-config executable. ( /path/to/FREETYPE_CONFIG )
default: /usr/include default: /usr/bin/freetype-config
actual: /usr/include actual: /usr/bin/freetype-config
FREETYPE_LIBS: Search path for FreeType library files ( /path/to/FREETYPE_LIBS )
default: /usr/lib
actual: /usr/lib
PNG_INCLUDES: Search path for libpng include files ( /path/to/PNG_INCLUDES ) PNG_INCLUDES: Search path for libpng include files ( /path/to/PNG_INCLUDES )
default: /usr/include default: /usr/include
@ -152,7 +149,7 @@ If you're using the default PREFIX, you will most likely need to be root to perf
Test Test
---- ----
There currently are no easy way to test your setup, other than write some code to generate a map. There currently is no easy way to test your setup, other than write some code to generate a map.
One simple thing you can do is try to load the Python module, and make sure it does so without errors: One simple thing you can do is try to load the Python module, and make sure it does so without errors:

View file

@ -24,8 +24,7 @@ opts = Options()
opts.Add('PREFIX', 'The install path "prefix"', '/usr/local') 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_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'))
opts.Add(PathOption('FREETYPE_INCLUDES', 'Search path for FreeType include files', '/opt/freetype/include/freetype2')) opts.Add(PathOption('FREETYPE_CONFIG', 'The path to the freetype-config executable.', '/usr/bin/freetype-config'))
opts.Add(PathOption('FREETYPE_LIBS', 'Search path for FreeType library files', '/opt/freetype/lib'))
opts.Add(PathOption('PNG_INCLUDES', 'Search path for libpng include files', '/usr/include')) 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'))
opts.Add(PathOption('JPEG_INCLUDES', 'Search path for libjpeg include files', '/usr/include')) opts.Add(PathOption('JPEG_INCLUDES', 'Search path for libjpeg include files', '/usr/include'))
@ -49,21 +48,22 @@ conf = Configure(env)
env['CPPPATH'] = ['#agg/include', '#include'] env['CPPPATH'] = ['#agg/include', '#include']
for path in [env['BOOST_INCLUDES'], env['FREETYPE_INCLUDES'], env['PNG_INCLUDES'], env['JPEG_INCLUDES'], env['TIFF_INCLUDES'], env['PGSQL_INCLUDES']]: for path in [env['BOOST_INCLUDES'], env['PNG_INCLUDES'], env['JPEG_INCLUDES'], env['TIFF_INCLUDES'], env['PGSQL_INCLUDES']]:
if path not in env['CPPPATH']: env['CPPPATH'].append(path) if path not in env['CPPPATH']: env['CPPPATH'].append(path)
env['LIBPATH'] = ['#agg', '#src'] env['LIBPATH'] = ['#agg', '#src']
for path in [env['BOOST_LIBS'], env['FREETYPE_LIBS'], env['PNG_LIBS'], env['JPEG_LIBS'], env['TIFF_LIBS'], env['PGSQL_LIBS']]: for path in [env['BOOST_LIBS'], env['PNG_LIBS'], env['JPEG_LIBS'], env['TIFF_LIBS'], env['PGSQL_LIBS']]:
if path not in env['LIBPATH']: env['LIBPATH'].append(path) if path not in env['LIBPATH']: env['LIBPATH'].append(path)
env.ParseConfig(env['FREETYPE_CONFIG'] + ' --libs --cflags')
C_LIBSHEADERS = [ C_LIBSHEADERS = [
['ltdl', 'ltdl.h', True], ['ltdl', 'ltdl.h', True],
['png', 'png.h', True], ['png', 'png.h', True],
['tiff', 'tiff.h', True], ['tiff', 'tiff.h', True],
['z', 'zlib.h', True], ['z', 'zlib.h', True],
['jpeg', ['stdio.h','jpeglib.h'], True], ['jpeg', ['stdio.h', 'jpeglib.h'], True],
#['freetype', 'ft2build.h', True],
['pq', 'libpq-fe.h', False] ['pq', 'libpq-fe.h', False]
] ]

View file

@ -58,7 +58,7 @@ bool (Envelope<double>::*intersects_p3)(Envelope<double> const&) const = &Envelo
void export_envelope() void export_envelope()
{ {
using namespace boost::python; using namespace boost::python;
class_<Envelope<double> >("Envelope",init<double,double,double,double>()) class_<Envelope<double> >("Envelope","A spacial envelope (i.e. bounding box) which also defines some basic operators.",init<double,double,double,double>())
.def(init<>()) .def(init<>())
.def(init<const coord<double,2>&, const coord<double,2>&>()) .def(init<const coord<double,2>&, const coord<double,2>&>())
.add_property("minx",&Envelope<double>::minx) .add_property("minx",&Envelope<double>::minx)

View file

@ -38,7 +38,7 @@ namespace
void export_filter() void export_filter()
{ {
using namespace boost::python; using namespace boost::python;
class_<filter<Feature>,boost::noncopyable>("Filter",no_init) class_<filter<Feature>,boost::noncopyable>("Filter","An expression which allows to select features.",no_init)
.def("__str__",&filter<Feature>::to_string); .def("__str__",&filter<Feature>::to_string);
; ;
def("filter",&create_filter); def("filter",&create_filter);

View file

@ -32,7 +32,7 @@ char const* rawdata(const Image32& image)
void export_image() void export_image()
{ {
using namespace boost::python; using namespace boost::python;
class_<Image32>("Image",init<int,int>()) class_<Image32>("Image","This class represents a 32 bit image.",init<int,int>())
; ;
def("rawdata",&rawdata); def("rawdata",&rawdata);
} }

View file

@ -104,7 +104,7 @@ void export_layer()
.def(vector_indexing_suite<std::vector<std::string>,true >()) .def(vector_indexing_suite<std::vector<std::string>,true >())
; ;
class_<Layer>("Layer",no_init) class_<Layer>("Layer","A map layer.",no_init)
.def("name",&Layer::name,return_value_policy<copy_const_reference>()) .def("name",&Layer::name,return_value_policy<copy_const_reference>())
.def("params",&Layer::params,return_value_policy<reference_existing_object>()) .def("params",&Layer::params,return_value_policy<reference_existing_object>())
.def("envelope",&Layer::envelope) .def("envelope",&Layer::envelope)

View file

@ -24,7 +24,6 @@ Import('env')
prefix = env['PREFIX'] prefix = env['PREFIX']
libraries = ['agg'] + env['LIBS'] libraries = ['agg'] + env['LIBS']
libraries += ['freetype']
linkflags = '-Wl,-rpath-link,. -Wl,-soname,libmapnik.so' linkflags = '-Wl,-rpath-link,. -Wl,-soname,libmapnik.so'