All pastes #89338 Raw Edit

Anonymous

public text v1 · immutable
#89338 ·published 2006-07-16 03:27 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"
IUSE="postgis proj python 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
                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}
        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 python ; then
                MAKEOPTS="${MAKEOPTS} BINDINGS=none"
        fi
        if use debug ; then
                MAKEOPTS="${MAKEOPTS} DEBUG"
        fi
        scons ${MAKEOPTS}
}