1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
|
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sci-geosciences/mapnik/mapnik-0.6.0.ebuild,v 1.4 2009/08/19 02:59:58 nerdboy Exp $
EAPI=2
inherit eutils toolchain-funcs
DESCRIPTION="A Free Toolkit for developing mapping applications."
HOMEPAGE="http://www.mapnik.org/"
SRC_URI="mirror://berlios/${PN}/${P}.tar.bz2"
LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~x86"
IUSE="cairo curl debug +gdal postgres python sqlite"
RDEPEND="dev-libs/boost
dev-libs/libxml2
dev-libs/icu
media-libs/libpng
media-libs/jpeg
media-libs/tiff
media-libs/freetype:2
sci-libs/proj
x11-libs/agg
media-fonts/dejavu
python? ( >=dev-libs/boost-1.35.0-r5[python] )
cairo? ( x11-libs/cairo
dev-cpp/cairomm )
postgres? ( || (
>=dev-db/postgresql-base-8.0
>=dev-db/postgresql-server-8.0
>=dev-db/postgresql-8.0
)
!dev-db/libpq
>=dev-db/postgis-1.1.2
)
gdal? ( sci-libs/gdal )
sqlite? ( dev-db/sqlite:3 )
curl? ( net-misc/curl )"
DEPEND="${RDEPEND}
>=dev-util/scons-1.0.0"
src_prepare() {
epatch "${FILESDIR}"/${P}-gentoo.patch
sed -i -e "s:mapniklibpath + '/fonts':'/usr/share/fonts/dejavu/':g" \
bindings/python/SConscript || die "sed 1 failed"
sed -i -e "s:libraries \= \[:libraries \= \[\'mapnik\',:g" \
plugins/input/{gdal,postgis,shape,raster}/SConscript \
|| die "sed 4 failed"
}
src_configure() {
MAKEOPTS="INTERNAL_LIBAGG=no"
MAKEOPTS="${MAKEOPTS} INPUT_PLUGINS="
use postgres && MAKEOPTS="${MAKEOPTS}postgis,"
use gdal && MAKEOPTS="${MAKEOPTS}gdal,ogr,"
use sqlite && MAKEOPTS="${MAKEOPTS}sqlite,"
use curl && MAKEOPTS="${MAKEOPTS}osm,"
MAKEOPTS="${MAKEOPTS}shape,raster"
use cairo || MAKEOPTS="${MAKEOPTS} CAIRO=false"
use python || MAKEOPTS="${MAKEOPTS} BINDINGS=none"
use debug && MAKEOPTS="${MAKEOPTS} DEBUG=yes"
use postgres && use sqlite && MAKEOPTS="${MAKEOPTS} PGSQL2SQLITE=yes"
scons CXX="$(tc-getCXX)" ${MAKEOPTS} DESTDIR="${D}" configure \
|| die "scons configure failed"
}
src_compile() {
scons || die "scons make failed"
}
src_install() {
scons install || die "scons install failed"
if use python ; then
fperms o-w /usr/lib/python*/site-packages/mapnik/paths.py
dobin utils/stats/mapdef_stats.py
insinto /usr/share/doc/${P}/examples
doins utils/ogcserver/*
fi
dodoc AUTHORS CHANGELOG README
dohtml -r docs/api_docs/python/*
}
pkg_postinst() {
elog ""
elog "See the home page or the OpenStreetMap wiki for more info, and"
elog "the installed examples for the default mapnik ogcserver config."
elog ""
}
|