# 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" SRC_URI="http://iweb.gdal.org/dl/${P}.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 )" 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 Makefile errors... patch ./Makefile ${FILESDIR}/${P}-makefile.diff || die "Patching failed" emake || die "Compilation failed" } src_install() { # GRASSTABLES_DIR and AUTOLOAD_DIR overrided here for sandbox errors make DESTDIR="${D}"\ GRASSTABLES_DIR="${D}$(gdal-config --prefix)/share/gdal/grass" \ AUTOLOAD_DIR="${D}/usr/lib/gdalplugins" install || die "Installation failed" dodoc README }