# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit qt3 eutils DESCRIPTION="Quantum GIS is a open-source geographic information system" HOMEPAGE="http://www.qgis.org/" SRC_URI="mirror://sourceforge/qgis/${P}.tar.gz" S="${WORKDIR}/${P}" GRASSDIR=$() LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86" IUSE="postgres grass gpx georef debug" DEPEND=" >=x11-libs/qt-3.3.0 >=dev-db/sqlite-3.1.0 >=sci-libs/gdal-1.2.0 >=sci-libs/geos-2.0.0 >=sci-libs/proj-4.4.0 grass? (>=sci-geosciences/grass-5.7.0) gpx? (dev-libs/expat) georef? (sci-libs/gsl) postgres? (dev-db/postgresql (|| (dev-db/postgis dev-db/postgis-cvs)))" src_compile() { use grass \ && GRASSDIR="/usr/grass$(portageq match / grass |\ sed s/'sci-geosciences\/grass-'// | head -n 1 | cut -d'.' -f1)0" econf \ $(use_with postgres postgresql)\ $(use_with grass grass $GRASSDIR) \ $(use_enable gpx)\ $(use_enable georef)\ $(use_enable debug)\ || die "econf failed" # Fixes bug in 0.7.0 Makefiles # Currently this is fixed in CVS and will not affect next releases use postgres || sed -i s/-I\$\(PG_INC/\$\(PG_INC/g ${S}/src/Makefile && \ sed -i s/-I\$\(PG_INC/\$\(PG_INC/g ${S}/plugins/grass/Makefile emake -j1 || die "make failed" } src_install() { cd ${S} einstall || die "einstall failed" }