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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Mon Jul 25 01:47:20 2005 UTC (14 years, 11 months ago) by nerdboy
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
fix for bug 100103, giflib, and general cleanup
(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.6.ebuild,v 1.1 2005/07/23 06:33:02 nerdboy Exp $
4
5 inherit eutils libtool gnuconfig distutils
6
7 IUSE="jpeg png geos gif grass jasper netcdf hdf python postgres mysql odbc sqlite 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="~amd64 ~ppc ~sparc ~x86"
16 # need to get these arches updated on several libs first
17 #KEYWORDS="~alpha ~hppa ~ppc64"
18
19 DEPEND=">=sys-libs/zlib-1.1.4
20 >=media-libs/tiff-3.7.0
21 sci-libs/libgeotiff
22 jpeg? ( media-libs/jpeg )
23 gif? ( media-libs/libungif )
24 png? ( media-libs/libpng )
25 python? ( dev-lang/python )
26 fits? ( sci-libs/cfitsio )
27 ogdi? ( sci-libs/ogdi )
28 || (
29 postgres? ( dev-db/postgresql )
30 mysql? ( dev-db/mysql )
31 )
32 || (
33 netcdf? ( sci-libs/netcdf )
34 hdf? ( sci-libs/hdf )
35 )
36 jasper? ( media-libs/jasper )
37 odbc? ( dev-db/unixODBC )
38 geos? ( sci-libs/geos )
39 grass? ( ~sci-geosciences/grass-6.0.0 )
40 sqlite? ( dev-db/sqlite )"
41
42 src_unpack() {
43 unpack ${A}
44 cd ${S}
45 elibtoolize --patch-only
46 gnuconfig_update
47 if useq netcdf && useq hdf; then
48 einfo "Checking is HDF4 compiled with szip..."
49 if grep -c szip /var/db/pkg/sci-libs/hdf-4*/USE; then
50 einfo "Found HDF4 compiled with szip. Nice."
51 else
52 ewarn "HDF4 must be compiled with szip USE flag!"
53 einfo "Emerge HDF with szip USE flag and then emerge GDAL."
54 die "HDF4 not merged with szip use flag"
55 fi
56 fi
57 }
58
59 src_compile() {
60 distutils_python_version
61 # This package uses old borked automake/autoconf and libtool, so
62 # it doesn't work without ${D} (or with econf and einstall).
63 pkg_conf="--datadir=${D}usr/share/gdal --includedir=${D}usr/include/gdal \
64 --enable-shared --with-gnu-ld --with-pic"
65 [ "${ARCH}" = "x86" ] && pkg_conf="${pkg_conf} --without-libtool"
66 use_conf="$(use_with jpeg) $(use_with png) $(use_with mysql) \
67 $(use_with postgres pg) $(use_with fits cfitsio) \
68 $(use_with netcdf) $(use_with hdf hdf4) $(use_with geos) \
69 $(use_with sqlite) $(use_with jasper) $(use_with odbc)"
70
71 # It can't find this
72 if useq ogdi ; then
73 use_conf="--with-ogdi=/usr/lib ${use_conf}"
74 fi
75
76 if useq gif ; then
77 use_conf="--with-gif=internal ${use_conf}"
78 else
79 use_conf="--with-gif=no ${use_conf}"
80 fi
81
82 if useq debug ; then
83 export CFG=debug
84 fi
85
86 #enable newer Grass support only
87 if useq grass ; then
88 use_conf="--with-grass=/usr/grass60 ${use_conf}"
89 use_conf="--with-libgrass=no ${use_conf}"
90 fi
91
92 if useq python ; then
93 use_conf="--with-pymoddir=${D}usr/lib/python${PYVER}/site-packages \
94 ${use_conf}"
95 else
96 use_conf="--with-python=no ${use_conf}"
97 fi
98
99 myconf="${pkg_conf} ${use_conf}"
100
101 ./configure --prefix=${D}usr --exec-prefix=${D}usr \
102 --with-pymoddir=${D}usr/lib/python${PYVER}/site-packages \
103 ${myconf}
104
105 # Patch libtool here since it's not created until after configure runs
106 sed -i -e "s:hardcode_into_libs=yes:hardcode_into_libs=no:g" libtool
107 make || die "make failed"
108 }
109
110 src_install() {
111 # einstall causes sandbox violations on /usr/lib/libgdal.so
112 #einstall || die "einstall failed"
113 make DESTDIR=${D} install
114 dosed "s:${D}usr:/usr:g" /usr/bin/gdal-config
115 dodoc Doxyfile.man Doxyfile HOWTO-RELEASE NEWS
116 }
117
118 pkg_postinst() {
119 einfo "GDAL is most useful with full graphics support enabled via"
120 einfo "USE flags: png, jpeg, and gif. Optional python, fits, ogdi,"
121 einfo "and support for either netcdf or HDF4 is available, as well"
122 einfo "as either mysql or postgres."
123 ewarn
124 einfo "Note: tiff and geotiff are now hard depends, so no USE flags."
125 einfo "Also, this package will check for netcdf before hdf, so if you"
126 einfo "prefer hdf, please emerge hdf with USE=szip prior to emerging"
127 einfo "gdal."
128 }

  ViewVC Help
Powered by ViewVC 1.1.20