Building Mapnik Trunk on Debian 5 (Lenny)
Given a vanilla install of lenny...
Install Packages for dependencies
sudo apt-get install -y g++ cpp \ libboost1.35-dev \ libxml2 libxml2-dev \ libfreetype6 libfreetype6-dev \ libjpeg62 libjpeg62-dev \ libltdl3 libltdl3-dev \ libpng12-0 libpng12-dev \ libgeotiff-dev libtiff4 libtiff4-dev \ libcairo2 libcairo2-dev python-cairo python-cairo-dev \ libcairomm-1.0-1 libcairomm-1.0-dev \ ttf-dejavu ttf-dejavu-core ttf-dejavu-extra \ libgdal1-dev python-gdal \ postgresql-8.3-postgis postgresql-8.3 \ postgresql-server-dev-8.3 postgresql-contrib-8.3 \ libsqlite3-dev \ subversion build-essential python-nose
Install Mapnik trunk
svn co http://svn.mapnik.org/tags/release-0.7.1/ mapnik cd mapnik python scons/scons.py configure INPUT_PLUGINS=all \ OPTIMIZATION=3 \ SYSTEM_FONTS=/usr/share/fonts/truetype/ttf-dejavu/ python scons/scons.py sudo python scons/scons.py install sudo ldconfig
If scons fails to detect some boost libraries, be sure to install libboost1.35-filesystem-dev, libboost1.35-iostreams-dev, etc as required (look at the scons output). You might try using a different version of libboost (e.g. libboost-1.38-dev and libboost1.38-foo-dev).
Build and install mapnik without root permissions
The development libraries have to be present as described above. In the following example /home/$USER/mapnik_svn ($DIR_MAPNIK_SVN) is the directory where you want to check out the source and /home/$USER/mapnik_inst (DIR_MAPNIK_INSTALL) is the directory you want to use for installation.
DIR_MAPNIK_SRC=/home/$USER/mapnik_svn DIR_MAPNIK_INSTALL=/home/$USER/mapnik_inst svn co http://svn.mapnik.org/trunk $DIR_MAPNIK_SVN cd $DIR_MAPNIK_SVN python scons/scons.py configure INPUT_PLUGINS=all \ OPTIMIZATION=3 \ SYSTEM_FONTS=/usr/share/fonts/truetype/ttf-dejavu/ \ PREFIX=$DIR_MAPNIK_INSTALL \ PYTHON_PREFIX=$DIR_MAPNIK_INSTALL python scons/scons.py python scons/scons.py install # append the following lines to /home/$USER/.bashrc DIR_MAPNIK_INSTALL=/home/$USER/mapnik_inst export LD_LIBRARY_PATH=$DIR_MAPNIK_INSTALL/lib export PYTHONPATH=$DIR_MAPNIK_INSTALL/lib/python2.5/site-packages
