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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Sun Jul 10 20:45:40 2005 UTC (15 years ago) by nerdboy
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
FILE REMOVED
fixing lib silliness on non-x86 arches, and bumping stable (x86 and sparc)
(Portage version: 2.0.51.19)

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.ebuild,v 1.2 2005/02/22 06:31:55 nerdboy Exp $
4
5 inherit eutils libtool gnuconfig distutils
6
7 # libgrass support is coming soon...
8 # grass? ( >=sci-geosciences/grass-5.0 )
9
10 IUSE="jpeg png gif python postgres mysql ogdi fits debug"
11
12 DESCRIPTION="GDAL is a translator library for raster geospatial data formats"
13 HOMEPAGE="http://www.remotesensing.org/gdal/index.html"
14 SRC_URI="http://dl.maptools.org/dl/gdal/${P}.tar.gz"
15
16 SLOT="0"
17 LICENSE="MIT"
18 KEYWORDS="x86 ~sparc ~hppa ~alpha ~amd64 ~ppc"
19
20 DEPEND=">=sys-libs/zlib-1.1.4
21 >=media-libs/tiff-3.7.0
22 sci-libs/libgeotiff
23 jpeg? ( media-libs/jpeg )
24 gif? ( media-libs/libungif )
25 png? ( media-libs/libpng )
26 python? ( dev-lang/python )
27 fits? ( sci-libs/cfitsio )
28 ogdi? ( sci-libs/ogdi )
29 || (
30 sci-libs/netcdf
31 sci-libs/hdf
32 )
33 || (
34 postgres? ( dev-db/postgresql )
35 mysql? ( dev-db/mysql )
36 )"
37
38 src_unpack() {
39 unpack ${A}
40 cd ${S}
41 elibtoolize --patch-only
42 gnuconfig_update
43 }
44
45 src_compile() {
46 distutils_python_version
47 # This package uses old borked automake/autoconf and libtool, so
48 # it doesn't work without ${D} econf and einstall
49 pkg_conf="--datadir=${D}usr/share/gdal --includedir=${D}usr/include/gdal --without-libtool --enable-shared --with-gnu-ld --with-pic"
50 use_conf="$(use_with jpeg) $(use_with png) $(use_with mysql) $(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, and"
97 einfo "support for either netcdf or HDF4 is available, as well as"
98 einfo "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