---
I have installed this using glibc-2.7-r2 and gcc-4.2.4 - I do not know if it will work with glibc 2.8x and/or gcc 4.3.x.
I used boost-build-1.34.1 and boost-1.34.1-r2. Higher versions (1.35.0-r1) caused GPSDrive or Mapnik to fail to render maps (shows "No map available for current position").
Do not use LibTool 2.x, Mapnik will not build. I used libtool 1.5.26.
Setup PostgreSQL and Postgis
Install PostgreSQL by
#> emerge postgresql-serverand then postgis by
#> USE="proj geos" emerge postgisI am not sure if it has to be built with proj and geos support, but Mapnik uses it so I added them.
Run
#> emerge postgresql-server --configto initialize the databases and
#> /etc/init.d/postgresql-8.3 startto start the server.
Now switch to postgres user by
$> suAs the postgres user run the following to create the database (NOTE: Replace username with the user that will be using mapnik):
#> su - postgres
$> createuser usernameSetup PostGIS
$> createdb -E UTF8 -O username gis
$> createlang plpgsql gis
Initial database setup:
$> psql -d gis -f /usr/share/postgresql/contrib/lwpostgis.sqlFinally add the user who will be using GPSDrive to postgres group in /etc/group and login again.
$> echo "ALTER TABLE geometry_columns OWNER TO username; ALTER TABLE spatial_ref_sys OWNER TO username;" | psql -d gis
Install Mapnik
Ebuilds for Mapnik can be found at http://bugs.gentoo.org/show_bug.cgi?id=140599
Add the ebuild to portage tree:
#> mkdir /usr/portage/sci-geosciences/mapnikSetting up necessary data for Mapnik
#> mv mapnik-0.5.1.ebuild /usr/portage/sci-geosciences/mapnik/
#> ebuild /usr/portage/sci-geosciences/mapnik/mapnik-0.5.1.ebuild manifest
#> USE="postgres proj debug doc gdal python bidi" emerge mapnik
Here are more instructions: http://wiki.openstreetmap.org/index.php/Mapnik
I have condensed the most important.
World boundaries (51MB) and coastlines (~200MB):
$> wget http://tile.openstreetmap.org/world_boundaries-spherical.tgzInstall osm2pgsql and the osm data
$> wget http://hypercube.telascience.org/~kleptog/processed_p.zip
$> tar -zxvf world_boundaries-spherical.tgz
$> unzip processed_p.zip
$> mv coastlines/* world_boundaries/
$> rmdir coastlines
$> chmod -R 755 world_boundaries
#> mkdir /usr/local/share/mapnik
#> mv world_boundaries /usr/local/share/mapnik
Needed is sci-libs/geos, the 3.0.0 version does not work; do
#> emerge =geos-2.2.3Using svn (emerge subversion) get osm2pgsql from:
$> svn co http://svn.openstreetmap.org/applications/utils/export/osm2pgsql/Now, add your downloaded map data by
$> cd osm2pgsql
$> make
$> ./osm2pgsql -d gis ../yourmapdata.osm.bz2Later, if GPSDrive shows the position off by some 20 km, re-add the data with the -m flag.
(-m|--merc Store data in proper spherical mercator, not OSM merc).
For me, atleast, I first used the -m flag and my position was way off to the south, so I guess for now it should not be used.
OSM icons:
$> svn co http://svn.openstreetmap.org/applications/share/map-iconsGPSDrive
$> chmod -R 755 map-icons
#> mv map-icons /usr/share/icons
I am not sure if these Perl modules are needed but other howtos suggest them:
dev-perl/DBI
dev-perl/DBD-Pg
dev-perl/DBD-SQLite
CMake is required for building, simply do
#> emerge cmakelibgda 3 is also needed, unmask in /usr/portage/profiles/package.mask, then
#> emerge =libgda-3.0.4Then go on with GPSDrive:
$> svn co http://svn.gpsdrive.cc/gpsdrive/trunk gpsdrive-svnIf all went well, GPSDrive should now be installed.
$> cd gpsdrive-svn/build
$> cmake -DCMAKE_BUILD_TYPE=Debug ..
$> make
#> make install
There are however some things that need to be fixed before it will work.
Create an empty waypoint file, avoids complaining.
$> touch ~/.gpsdrive/way.txtMisc symlinking:
#> mkdir -p /usr/lib/mapnik/0.5Now GPSDrive should be possible to start. Click "Map Control" and check "Mapnik Mode".
#> ln -s /usr/lib/mapnik/fonts/ /usr/lib/mapnik/0.5/fonts
#> ln -s /usr/lib/mapnik/input/ /usr/lib/mapnik/0.5/input
#> mkdir /usr/local/share/icons
#> ln -s /usr/share/icons/map-icons /usr/local/share/icons/map-icons
#> mkdir /usr/share/fonts/truetype/ttf-dejavu
#> chmod -R 755 /usr/share/fonts/truetype
#> ln -n /usr/lib/mapnik/fonts/* /usr/share/fonts/truetype/ttf-dejavu/








































