# Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI="2" inherit eutils DESCRIPTION="Computer code for multivariable geostatistical modelling, prediction and simulation" HOMEPAGE="http://www.gstat.org/" SRC_URI="http://www.gstat.org/bin/${P}.tar.gz" LICENSE="GPL-1" SLOT="0" KEYWORDS="~x86" IUSE="csf debug gdal gnuplot grass gsl netcdf ncurses png sparse" DEPEND="\ csf? ( sci-libs/libcsf ) ncurses? ( sys-libs/ncurses ) png? ( media-libs/gd[png] ) netcdf? ( sci-libs/netcdf ) gdal? ( sci-libs/gdal ) grass? ( >=sci-geosciences/grass-6.0.0 ) gsl? ( sci-libs/gsl )" RDEPEND="${DEPEND} \ gnuplot? ( sci-visualization/gnuplot )" src_prepare() { epatch "${FILESDIR}/${P}-job_server_unavailable.patch" epatch "${FILESDIR}/${P}-destdir.patch" epatch "${FILESDIR}/${P}-utils.patch" epatch "${FILESDIR}/${P}-maxint.patch" epatch "${FILESDIR}/${P}-mapio.patch" } src_configure () { local myconf="" if use grass; then myconf="${myconf} --with-grass6=/usr/grass63" fi econf \ $(use_with csf) \ $(use_with debug) \ $(use_with ncurses curses) \ $(use_with netcdf) \ $(use_with gdal) \ $(use_with grass) \ $(use_with gsl) \ $(use_with png gd) \ $(use_with sparse) \ ${myconf} \ || die } src_compile () { emake || die } src_install () { dodir "usr/bin" emake DESTDIR="${D}" install || die } pkg_postinst () { einfo "If you want the R package, please run the following" einfo "command from R's prompt: install.packages(\"gstat\")" }