summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sci-libs/gdal/gdal-1.2.5.ebuild')
-rw-r--r--sci-libs/gdal/gdal-1.2.5.ebuild101
1 files changed, 101 insertions, 0 deletions
diff --git a/sci-libs/gdal/gdal-1.2.5.ebuild b/sci-libs/gdal/gdal-1.2.5.ebuild
new file mode 100644
index 000000000000..8199cd88b6a6
--- /dev/null
+++ b/sci-libs/gdal/gdal-1.2.5.ebuild
@@ -0,0 +1,101 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/gdal/gdal-1.2.5.ebuild,v 1.1 2005/02/21 00:09:45 nerdboy Exp $
+
+inherit eutils libtool gnuconfig distutils
+
+# libgrass support is coming soon...
+# grass? ( >=sci-geosciences/grass-5.0 )
+
+IUSE="jpeg png gif python postgres mysql ogdi fits"
+
+DESCRIPTION="GDAL is a translator library for raster geospatial data formats"
+HOMEPAGE="http://www.remotesensing.org/gdal/index.html"
+SRC_URI="http://dl.maptools.org/dl/gdal/${P}.tar.gz"
+
+SLOT="0"
+LICENSE="MIT"
+KEYWORDS="x86 ~sparc ~hppa ~alpha ~amd64 ~ppc"
+
+DEPEND=">=sys-libs/zlib-1.1.4
+ >=media-libs/tiff-3.7.0
+ sci-libs/libgeotiff
+ jpeg? ( media-libs/jpeg )
+ gif? ( media-libs/libungif )
+ png? ( media-libs/libpng )
+ python? ( dev-lang/python )
+ fits? ( sci-libs/cfitsio )
+ ogdi? ( sci-libs/ogdi )
+ || (
+ sci-libs/netcdf
+ sci-libs/hdf
+ )
+ || (
+ postgres? ( dev-db/postgresql )
+ mysql? ( dev-db/mysql )
+ )"
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+ elibtoolize --patch-only
+ gnuconfig_update
+}
+
+src_compile() {
+ distutils_python_version
+ # This package uses old borked automake/autoconf and libtool, so
+ # it doesn't work without ${D} econf and einstall
+ pkg_conf="--datadir=${D}usr/share/gdal --includedir=${D}usr/include/gdal --without-libtool --enable-shared --with-gnu-ld --with-pic"
+ use_conf="$(use_with jpeg) $(use_with png) $(use_with mysql) $(use_with postgres pg) $(use_with fits cfitsio) $(use_with ogdi)"
+
+ myconf="${pkg_conf} ${use_conf}"
+
+ # These will need version checks:
+ #$(use_with grass) $(use_with libgrass)
+
+ if useq gif ; then
+ myconf="--with-gif=internal ${myconf}"
+ else
+ myconf="--with-gif=no ${myconf}"
+ fi
+
+# if useq grass ; then # no libgrass in 5.0.3 !!!
+# myconf="--with-libgrass=/usr/grass5/lib ${myconf}"
+# else
+ myconf="--with-libgrass=no ${myconf}"
+# fi
+
+ if useq python ; then
+ myconf="--with-pymoddir=${D}usr/lib/python${PYVER}/site-packages ${myconf}"
+ else
+ myconf="--with-python=no ${myconf}"
+ fi
+
+ ./configure --prefix=${D}usr --exec-prefix=${D}usr \
+ --with-pymoddir=${D}usr/lib/python${PYVER}/site-packages \
+ ${myconf}
+ # Patch libtool here since it's not created until after configure runs
+ sed -i -e "s:hardcode_into_libs=yes:hardcode_into_libs=no:g" libtool
+ make || die "make failed"
+}
+
+src_install() {
+ # einstall causes sandbox violations on /usr/lib/libgdal.so
+ #einstall || die "einstall failed"
+ make DESTDIR=${D} install
+ dosed "s:${D}usr:/usr:g" /usr/bin/gdal-config
+ dodoc Doxyfile.man Doxyfile HOWTO-RELEASE NEWS
+}
+
+pkg_postinst() {
+ einfo "GDAL is most useful with full graphics support enabled via"
+ einfo "USE flags: png, jpeg, and gif. Optional python fits, ogdi, and"
+ einfo "support for either netcdf or HDF4 is available, as well as"
+ einfo "either mysql or postgres."
+ ewarn
+ einfo "Note: tiff and geotiff are now hard depends, so no USE flags."
+ einfo "Also, this package will check for netcdf before hdf, so if you"
+ einfo "prefer hdf, please emerge hdf (ver 4 only) prior to emerging"
+ einfo "gdal."
+}