# Copyright 1999-2002 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License, v2 or later # $Header:$ S="${WORKDIR}/${P}" DESCRIPTION="translator library for raster geospatial data formats" SRC_URI="ftp://ftp.remotesensing.org/pub/gdal/${P}.tar.gz" HOMEPAGE="http://www.remotesensing.org/gdal/index.html" LICENSE="MIT" SLOT="0" KEYWORDS="~x86" IUSE="ogdi postgres grass cfitsio png jpeg jasper ogr" DEPEND=">=ogdi-3.1.1 postgres?(>=dev-db/postgresql-7.2.3-r1) grass?(>=dev-libs/libgrass5-1.0.0) cfitsio?(>=dev-libs/cfitsio-2.470) png?(>=media-libs/libpng-1.2.5) jpeg?(>=media-libs/jpeg-6b) jasper?(>=media-libs/jasper-1.700.5)" #xerces?(>=dev-libs/xerces-c-2.4.0)" src_compile() { python=${python:-/usr/bin/python} tmpstr="$(${python} -V 2>&1)" pyver_all="${tmpstr#Python }" pyver_major=$(echo ${pyver_all} | cut -d. -f1) pyver_minor=$(echo ${pyver_all} | cut -d. -f2) pyver="${pyver_major}.${pyver_minor}" use grass || myconf="--with-grass=no" use cfitsio || myconf="${myconf} --with-cfitsio=no" use png || myconf="${myconf} --with-png=no" use jpeg || myconf="${myconf} --with-jpeg=no" use ogr || myconf="${myconf} --without-ogr" #use xerces || myconf="${myconf} --with-xerces" #use xerces || myconf="${myconf} --with-xerces-inc=/usr/include/xercesc" #use xerces || myconf="${myconf} --with-xerces-lib='-lxerces-c -lm'" myconf="${myconf} --with-pymoddir=${D}/usr/lib/python${pyver}/site-packages" echo ${myconf} ./configure \ --host=${CHOST} \ --prefix=/usr \ --infodir=/usr/share/info \ --mandir=/usr/share/man \ ${myconf} || die "./configure failed" make || die } src_install () { make \ prefix=${D}/usr \ mandir=${D}/usr/share/man \ infodir=${D}/usr/share/info \ install || die dodoc ChangeLog NEWS VERSION }