All pastes #89434 Raw Edit

Untitled

public text v1 · immutable
#89434 ·published 2006-07-16 07:07 UTC
rendered paste body
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit eutils

HOMEPAGE="http://www.mapnik.org/"
SRC_URI="http://download.berlios.de/mapnik/${P}.tar.bz2"
LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS="~x86 ~amd64"
IUSE="postgis proj debug"
DEPEND="dev-util/scons
		>=dev-libs/boost-1.32.0
		>=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
		postgis? ( >=dev-db/libpq-8.1.4 )
		postgis? ( >=dev-db/postgis-1.1.2 )
		>=dev-lang/python-1.5.2
		>=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}"/SConstruct-${PV}.patch
	epatch "${FILESDIR}"/SConstruct-pythonbindings-${PV}.patch
	epatch "${FILESDIR}"/SConstruct-projbindings-${PV}.patch
	sed -i -e "s:/usr/local/:/usr/:" SConstruct
}

src_compile() {
	cd ${S}
	MAKEOPTS="${MAKEOPTS} PREFIX=${D}usr"
	if ! use postgis ; then
		MAKEOPTS="${MAKEOPTS} INPUT_PLUGINS=shape,raster"
	fi
	if use debug ; then
		MAKEOPTS="${MAKEOPTS} DEBUG"
	fi
	scons ${MAKEOPTS} || die "Unable to build Mapnik"
}

src_install() {
	cd ${S}
	scons ${MAKEOPTS} install || die "Unable to install Mapnik"
}