# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils qt4 autotools DESCRIPTION="Quantum GIS (QGIS) is a Geographic Information System (GIS)" HOMEPAGE="http://www.qgis.org/" SRC_URI="http://download.qgis.org/qgis/src/${P}.tar.gz samples? ( http://qgis.org/uploadfiles/qgis_sample_data.tar.gz )" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86" IUSE="debug gps grass gsl postgres python samples wfs" DEPEND=">=sci-libs/gdal-1.2.5 >=dev-db/sqlite-3.2.1 $(qt4_min_version 4.1) =sci-libs/geos-2* sci-libs/proj postgres? ( >=dev-db/postgresql-8 dev-db/postgis ) grass? ( || ( >=sci-geosciences/grass-6.0.0 sci-geosciences/grass-cvs ) sci-libs/gdal-grass ) gps? ( dev-libs/expat ) gsl? ( >=sci-libs/gsl-1.6 )" RDEPEND=">=sci-libs/gdal-1.2.5 >=dev-db/sqlite-3.2.1 =sci-libs/geos-2* sci-libs/proj postgres? ( >=dev-db/postgresql-8 dev-db/postgis ) python? ( dev-lang/python ) grass? ( || ( >=sci-geosciences/grass-6.0.0 sci-geosciences/grass-cvs ) sci-libs/gdal-grass ) gps? ( sci-geosciences/gpsbabel dev-libs/expat ) gsl? ( >=sci-libs/gsl-1.6 )" pkg_setup() { if use wfs; then einfo "Please notice that QGIS compiled with the useflag 'wfs' may be \ instable." fi } src_compile() { cd "${S}" epatch ${FILESDIR}/${P}-pkg-config.patch local myconf; myconf="--with-geos=$(which geos-config) --with-projdir=/usr\ --with-qt-pkg-config --with-sqlite3dir=/usr\ --with-gdal=$(which gdal-config) --prefix=/usr" if use grass; then 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 myconf="${myconf} $(use_with grass grass ${GRASSPATH})"; fi if use gsl; then myconf="${myconf} --enable-georef --with-gsl-prefix=/usr" else myconf="${myconf} --disable-georef" fi myconf="${myconf} $(use_with postgres postgresql)\ $(use_enable gps gpx)\ $(use_enable debug)\ $(use_with wfs)\ $(use_with python)" eautoreconf econf ${myconf} || die "econf failed!" emake -j1 || die "emake failed!" } src_install() { cd "${S}" make DESTDIR="${D}" install || die "Install failed!" dodoc AUTHORS BUGS COPYING ChangeLog INSTALL NEWS README TODO \ || die "Unable to install doc" if use samples; then cd "${WORKDIR}" insinto /usr/share/doc/${PF}/sample_data doins qgis_sample_data/* || die "Unable to install sample data" fi } pkg_postinst() { if use samples; then einfo "You could find sample data to use with qgis in \ /usr/share/doc/${PF}/sample_data/" fi }