# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils autotools HOMEPAGE="http://www.mapnik.org/" SRC_URI="mirror://berlios/mapnik/mapnik_src-${PV}.tar.gz" LICENSE="LGPL-2.1" SLOT="0" KEYWORDS="~x86 ~amd64" IUSE="postgres proj debug doc python bidi" DEPEND="dev-util/scons >=dev-libs/boost-1.32.0 bidi? ( dev-libs/fribidi ) >=media-libs/jpeg-6b >=media-libs/libpng-1.2.12 >=media-libs/tiff-3.8.2 >=sys-libs/zlib-1.2.3 >=media-libs/freetype-2.1.10 postgres? ( >=dev-db/postgis-1.1.2 ) >=dev-lang/python-1.5.2 sci-libs/gdal python? ( >=dev-lang/python-2.2 ) proj? ( >=sci-libs/proj-4.4.9 )" #pkg_setup() { # if ! built_with_use 'dev-libs/boost' threads ; then # die "${PN} requires dev-libs/boost emerged with USE='threads'" # fi #} src_unpack() { unpack ${A} cd ${S} epatch "${FILESDIR}/mapnik-0.5.1-postgres-path.diff" || die "epatch failed" # epatch "${FILESDIR}"/SConstruct-0.4.0.patch # epatch "${FILESDIR}"/SConstruct-pythonbindings-0.4.0.patch #sed -i -e "s:/usr/local/:/usr/:" SConstruct epatch "${FILESDIR}/mapnik-0.5.0-fix-localpath.diff" || die "epatch failed" #./autogen.sh || die } src_compile() { #ewarn "Mapnik build procedure eats lots of memory. Pay attention!" #cd ${S} MAKEOPTS="${MAKEOPTS} PREFIX=/usr" if ! use python ; then MAKEOPTS="${MAKEOPTS} BINDINGS=none" fi MAKEOPTS="${MAKEOPTS} INPUT_PLUGINS=shape,raster,postgis" if use debug ; then MAKEOPTS="${MAKEOPTS} DEBUG=1" fi if use bidi ; then MAKEOPTS="${MAKEOPTS} BIDI=1" fi #scons ${MAKEOPTS} || die "Unable to build Mapnik" python scons/scons.py PGSQL_INCLUDES=/usr/include/postgresql PROJ_INCLUDES=/usr/include PROJ_LIBS=/usr/lib XMLPARSER=libxml2 || die #econf $(use_with postgres pstgresql) || die } src_install() { #make DESTDIR="${D}" install || die "install failed" #cd ${S} scons DESTDIR="${D}" install || die "Unable to install Mapnik" if use doc ; then dohtml -r docs/epydocs/* fi }