| # Copyright 1999-2010 Gentoo Foundation |
| # Distributed under the terms of the GNU General Public License v2 |
| # $Header: /var/cvsroot/gentoo-x86/sci-geosciences/gdal-grass/gdal-grass-1.4.3.ebuild,v 1.2 2010/01/19 04:53:34 bicatali Exp $ |
| |
| EAPI=2 |
| inherit eutils |
| |
| DESCRIPTION="GDAL plugin to access GRASS data" |
| HOMEPAGE="http://www.gdal.org/" |
| SRC_URI="http://download.osgeo.org/gdal/${P}.tar.gz" |
| |
| SLOT="0" |
| LICENSE="MIT" |
| KEYWORDS="~amd64 ~x86" |
| |
| IUSE="" |
| |
| RDEPEND="sci-libs/gdal |
| sci-geosciences/grass" |
| DEPEND="${RDEPEND}" |
| |
| src_prepare() { |
| epatch "${FILESDIR}/${PN}-makefile.patch" |
| } |
| |
| src_configure() { |
| GRASS_ENVD="/etc/env.d/99grass /etc/env.d/99grass-6 /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 |
| econf --with-grass=${GRASSPATH} --with-gdal |
| } |
| |
| src_install() { |
| #pass the right variables to 'make install' to prevent a sandbox access violation |
| emake DESTDIR="${D}" \ |
| GRASSTABLES_DIR="${D}$(gdal-config --prefix)/share/gdal/grass" \ |
| AUTOLOAD_DIR="${D}/usr/$(get_libdir)/gdalplugins" \ |
| install || die "emake install failure" |
| } |