# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit autotools kde-functions eutils DESCRIPTION="Quantum GIS (QGIS) is a Geographic Information System (GIS)" HOMEPAGE="http://www.qgis.org/" SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz http://qgis.org/uploadfiles/qgis_sample_data.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86" IUSE="postgres grass gps gsl debug" need-qt 3 DEPEND=">=sci-libs/gdal-1.2.5 >=dev-db/sqlite-3.2.1 sci-libs/geos sci-libs/proj postgres? ( dev-db/postgis ) grass? ( >=sci-geosciences/grass-5.0.2 ) gps? ( sci-geosciences/gpsbabel ) gsl? ( >=sci-libs/gsl-1.6 )" RDEPEND=">=sci-libs/gdal-1.2.5 >=dev-db/sqlite-3.2.1 sci-libs/geos sci-libs/proj postgres? ( dev-db/postgis ) grass? ( >=sci-geosciences/grass-5.0.2 ) gps? ( sci-geosciences/gpsbabel ) gsl? ( >=sci-libs/gsl-1.6 )" src_compile() { cd "${S}" local myconf myconf="--with-geos=$(which geos-config)\ --with-projdir=/usr\ --with-sqlite3dir=/usr\ --with-gdal=$(which gdal-config)" if use grass; then myconf="${myconf} $(use_with grass grass /usr/grass$(portageq match / grass |\ sed s/'sci-geosciences\/grass-'// | cut -d'.' -f1)0)" fi myconf="${myconf}\ $(use_with postgres postgresql) $(use_enable gsl georef) $(use_enable gps gpx)\ $(use_enable debug)" econf ${myconf} || die "econf failed" emake -j1 || die "emake failed" } src_install() { cd "${S}" make DESTDIR="${D}" install || die "Installation failed" dodoc AUTHORS BUGS COPYING ChangeLog INSTALL NEWS README TODO || \ die "Unable to install doc" cd "${WORKDIR}" insinto /usr/share/doc/${PF}/sample_data doins qgis_data/* || die "Unable to install sample data" } pkg_postinst() { einfo "You could find sample data to use with qgis in /usr/share/doc/${PF}/sample_data/" }