/[gentoo-x86]/sci-libs/gdal/gdal-1.2.5-r1.ebuild
Gentoo

Contents of /sci-libs/gdal/gdal-1.2.5-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (show annotations) (download)
Sat Oct 8 21:43:02 2005 UTC (14 years, 8 months ago) by nerdboy
Branch: MAIN
CVS Tags: HEAD
Changes since 1.6: +1 -1 lines
FILE REMOVED
revision bump for glsa and cleanup of old ebuilds
(Portage version: 2.0.51.22-r2)

1 # Copyright 1999-2005 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sci-libs/gdal/gdal-1.2.5-r1.ebuild,v 1.6 2005/09/21 06:19:14 nerdboy Exp $
4
5 inherit eutils libtool gnuconfig distutils multilib
6
7 IUSE="jpeg png gif python postgres mysql ogdi fits debug"
8
9 DESCRIPTION="GDAL is a translator library for raster geospatial data formats"
10 HOMEPAGE="http://www.remotesensing.org/gdal/index.html"
11 SRC_URI="http://dl.maptools.org/dl/gdal/${P}.tar.gz"
12
13 SLOT="0"
14 LICENSE="MIT"
15 KEYWORDS="~alpha ~amd64 ~hppa ppc ~ppc64 sparc x86"
16
17 DEPEND=">=sys-libs/zlib-1.1.4
18 >=media-libs/tiff-3.7.0
19 sci-libs/libgeotiff
20 jpeg? ( media-libs/jpeg )
21 gif? ( media-libs/libungif )
22 png? ( media-libs/libpng )
23 python? ( dev-lang/python )
24 fits? ( sci-libs/cfitsio )
25 ogdi? ( sci-libs/ogdi )
26 || (
27 sci-libs/netcdf
28 sci-libs/hdf
29 )
30 || (
31 postgres? ( dev-db/postgresql )
32 mysql? ( dev-db/mysql )
33 )"
34
35 src_unpack() {
36 unpack ${A}
37 cd ${S}
38 elibtoolize --patch-only
39 gnuconfig_update
40 }
41
42 src_compile() {
43 distutils_python_version
44 # This package uses old borked automake/autoconf and libtool, so
45 # it doesn't work without ${D} (or with econf and einstall).
46 pkg_conf="--datadir=${D}usr/share/gdal --includedir=${D}usr/include/gdal \
47 --libdir=${D}usr/$(get_libdir) --enable-shared --with-gnu-ld --with-pic"
48 [ "${ARCH}" = "x86" ] && pkg_conf="${pkg_conf} --without-libtool"
49 use_conf="$(use_with jpeg) $(use_with png) $(use_with mysql) \
50 $(use_with postgres pg) $(use_with fits cfitsio) $(use_with ogdi)"
51
52 myconf="${pkg_conf} ${use_conf}"
53
54 # These will need version checks:
55 #$(use_with grass) $(use_with libgrass)
56
57 if useq gif ; then
58 myconf="--with-gif=internal ${myconf}"
59 else
60 myconf="--with-gif=no ${myconf}"
61 fi
62
63 if useq debug ; then
64 export CFG=debug
65 fi
66 # if useq grass ; then # no libgrass in 5.0.3 !!!
67 # myconf="--with-libgrass=/usr/grass5/lib ${myconf}"
68 # else
69 myconf="--with-libgrass=no ${myconf}"
70 # fi
71
72 if useq python ; then
73 myconf="--with-pymoddir=${D}usr/lib/python${PYVER}/site-packages ${myconf}"
74 else
75 myconf="--with-python=no ${myconf}"
76 fi
77
78 ./configure --prefix=${D}usr --exec-prefix=${D}usr \
79 --with-pymoddir=${D}usr/lib/python${PYVER}/site-packages \
80 ${myconf}
81 # Patch libtool here since it's not created until after configure runs
82 sed -i -e "s:hardcode_into_libs=yes:hardcode_into_libs=no:g" libtool
83 make || die "make failed"
84 }
85
86 src_install() {
87 # einstall causes sandbox violations on /usr/lib/libgdal.so
88 #einstall || die "einstall failed"
89 make DESTDIR=${D} install
90 dosed "s:${D}usr:/usr:g" /usr/bin/gdal-config
91 dodoc Doxyfile.man Doxyfile HOWTO-RELEASE NEWS
92 }
93
94 pkg_postinst() {
95 einfo "GDAL is most useful with full graphics support enabled via"
96 einfo "USE flags: png, jpeg, and gif. Optional python, fits, ogdi,"
97 einfo "and support for either netcdf or HDF4 is available, as well"
98 einfo "as either mysql or postgres."
99 ewarn
100 einfo "Note: tiff and geotiff are now hard depends, so no USE flags."
101 einfo "Also, this package will check for netcdf before hdf, so if you"
102 einfo "prefer hdf, please emerge hdf (ver 4 only) prior to emerging"
103 einfo "gdal."
104 }

  ViewVC Help
Powered by ViewVC 1.1.20