rendered paste body# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
inherit eutils qt4
DESCRIPTION="Quantum GIS (QGIS) is a Geographic Information System (GIS)"
HOMEPAGE="http://www.qgis.org/"
SRC_URI="http://download.qgis.org/qgis/src/qgis_0.8.0_preview-1_source.tar.bz2
http://qgis.org/uploadfiles/qgis_sample_data.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86"
IUSE="debug gps grass gsl postgres"
DEPEND="!sci-geosciences/qgis-svn
>=sci-libs/gdal-1.2.5
>=dev-db/sqlite-3.2.1
$(qt_min_version 4.1)
sci-libs/geos
sci-libs/proj
postgres? ( >=dev-db/postgresql-8
dev-db/postgis )
grass? ( || (
>=sci-geosciences/grass-5.0.2
sci-geosciences/grass-cvs )
sci-libs/gdal-grass )
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/postgresql-8
dev-db/postgis )
grass? ( || (
>=sci-geosciences/grass-5.0.2
sci-geosciences/grass-cvs )
sci-libs/gdal-grass )
gps? ( sci-geosciences/gpsbabel )
gsl? ( >=sci-libs/gsl-1.6 )"
S="${WORKDIR}/qgis_0.8.0_preview-1_source"
src_compile() {
cd "${S}"
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
myconf="${myconf} $(use_with postgres postgresql)\
$(use_enable gsl georef)\
$(use_enable gps gpx)\
$(use_enable debug)"
./autogen.sh ${myconf} || die "Bootstrap and configure 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/"
}