summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Arnold <nerdboy@gentoo.org>2005-07-10 20:43:11 +0000
committerSteve Arnold <nerdboy@gentoo.org>2005-07-10 20:43:11 +0000
commit1467ec080806d6fa5fa11ee62410df896f24324b (patch)
treeba5d2bc321ae8ab0884a5ac5e8b2b20f38a5587b /sci-libs/gdal
parentsync IUSE (-doc) (diff)
downloadhistorical-1467ec080806d6fa5fa11ee62410df896f24324b.tar.gz
historical-1467ec080806d6fa5fa11ee62410df896f24324b.tar.bz2
historical-1467ec080806d6fa5fa11ee62410df896f24324b.zip
fixed for non-x86 arches
Diffstat (limited to 'sci-libs/gdal')
-rw-r--r--sci-libs/gdal/gdal-1.2.5-r1.ebuild105
1 files changed, 105 insertions, 0 deletions
diff --git a/sci-libs/gdal/gdal-1.2.5-r1.ebuild b/sci-libs/gdal/gdal-1.2.5-r1.ebuild
new file mode 100644
index 000000000000..663d43f8b0f5
--- /dev/null
+++ b/sci-libs/gdal/gdal-1.2.5-r1.ebuild
@@ -0,0 +1,105 @@
+# 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-r1.ebuild,v 1.1 2005/07/10 20:43:11 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 debug"
+
+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} (or with econf and einstall).
+ pkg_conf="--datadir=${D}usr/share/gdal --includedir=${D}usr/include/gdal --enable-shared --with-gnu-ld --with-pic"
+ [ "${ARCH}" = "x86" ] && pkg_conf="${pkg_conf} --without-libtool"
+ 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 debug ; then
+ export CFG=debug
+ 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,"
+ einfo "and support for either netcdf or HDF4 is available, as well"
+ einfo "as 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."
+}