# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils DESCRIPTION="GDAL-GRASS plugin provides better integration between GDAL/OGR and GRASS GIS" HOMEPAGE="http://www.remotesensing.org/gdal/index.html" PKG="${PN}-${PV}" SRC_URI="http://www.gdal.org/dl/${PKG}.tar.gz" SLOT="0" LICENSE="MIT" KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86" DEPEND=">=sci-libs/gdal-1.3.1 || ( sci-geosciences/grass sci-geosciences/grass-cvs )" S="${WORKDIR}/${PKG%\.2}" src_compile() { cd "${S}" local pkg_conf GRASS_ENVD="/etc/env.d/99grass /etc/env.d/99grass-cvs" for file in ${GRASS_ENVD}; do if test -r ${file}; then GRASSPATH=$(sed -n 's/LDPATH="\(.*\)\/lib"$/\1/p' ${file}); fi done pkg_conf="--with-grass=${GRASSPATH} --with-gdal"; econf ${pkg_conf} || die "Configuration failed" # Fixing sandbox (I hope :) ) epatch ${FILESDIR}/gdal-grass-1.3.1-sandbox-fix.patch emake || die "Compilation failed" } src_install() { # einstall causes sandbox violations on /usr/lib/libgdal.so make DESTDIR="${D}" GRASSTABLES_DIR="${D}/usr/share/gdal/grass" \ AUTOLOAD_DIR="${D}/usr/lib/gdalplugins" install || die "Installation failed" dodoc README }