Gentoo Archives: gentoo-commits

From: "Steve Arnold (nerdboy)" <nerdboy@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sci-libs/gdal: ChangeLog gdal-1.6.0-r1.ebuild gdal-1.6.0.ebuild
Date: Sat, 25 Apr 2009 06:08:11
Message-Id: E1Lxb3Z-0004qB-Ea@stork.gentoo.org
1 nerdboy 09/04/25 06:08:09
2
3 Modified: ChangeLog
4 Added: gdal-1.6.0-r1.ebuild
5 Removed: gdal-1.6.0.ebuild
6 Log:
7 Backported patch from upstream for swig 1.3.39 (fixes bug #266251).
8 (Portage version: 2.2_rc31/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.57 sci-libs/gdal/ChangeLog
12
13 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/gdal/ChangeLog?rev=1.57&view=markup
14 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/gdal/ChangeLog?rev=1.57&content-type=text/plain
15 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/gdal/ChangeLog?r1=1.56&r2=1.57
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/sci-libs/gdal/ChangeLog,v
20 retrieving revision 1.56
21 retrieving revision 1.57
22 diff -u -r1.56 -r1.57
23 --- ChangeLog 11 Apr 2009 17:07:01 -0000 1.56
24 +++ ChangeLog 25 Apr 2009 06:08:09 -0000 1.57
25 @@ -1,6 +1,14 @@
26 # ChangeLog for sci-libs/gdal
27 # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/sci-libs/gdal/ChangeLog,v 1.56 2009/04/11 17:07:01 nerdboy Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/sci-libs/gdal/ChangeLog,v 1.57 2009/04/25 06:08:09 nerdboy Exp $
30 +
31 +*gdal-1.6.0-r1 (25 Apr 2009)
32 +
33 + 25 Apr 2009; Steve Arnold <nerdboy@g.o>
34 + +files/gdal-1.6.0-swig-fix.patch, -gdal-1.6.0.ebuild,
35 + +gdal-1.6.0-r1.ebuild:
36 + Backported patch from upstream for swig 1.3.39 (fixes bug #266251) support
37 + for all supported bindings.
38
39 *gdal-1.6.0 (11 Apr 2009)
40
41
42
43
44 1.1 sci-libs/gdal/gdal-1.6.0-r1.ebuild
45
46 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/gdal/gdal-1.6.0-r1.ebuild?rev=1.1&view=markup
47 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/gdal/gdal-1.6.0-r1.ebuild?rev=1.1&content-type=text/plain
48
49 Index: gdal-1.6.0-r1.ebuild
50 ===================================================================
51 # Copyright 1999-2009 Gentoo Foundation
52 # Distributed under the terms of the GNU General Public License v2
53 # $Header: /var/cvsroot/gentoo-x86/sci-libs/gdal/gdal-1.6.0-r1.ebuild,v 1.1 2009/04/25 06:08:09 nerdboy Exp $
54
55 WANT_AUTOCONF="2.5"
56 inherit autotools distutils eutils perl-module toolchain-funcs
57
58 DESCRIPTION="GDAL is a translator library for raster geospatial data formats (includes OGR support)"
59 HOMEPAGE="http://www.gdal.org/"
60 SRC_URI="http://download.osgeo.org/gdal/${P}.tar.gz"
61
62 SLOT="0"
63 LICENSE="MIT"
64 KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
65 # need to get these arches updated on several libs first
66 #KEYWORDS="~alpha ~hppa"
67
68 IUSE="curl debug doc ecwj2k fits geos gif gml hdf hdf5 jpeg jpeg2k mysql \
69 netcdf odbc png ogdi perl postgres python ruby sqlite threads"
70
71 RDEPEND=">=sys-libs/zlib-1.1.4
72 >=media-libs/tiff-3.7.0
73 sci-libs/libgeotiff
74 dev-libs/expat
75 curl? ( net-misc/curl )
76 jpeg? ( media-libs/jpeg )
77 gif? ( media-libs/giflib )
78 png? ( media-libs/libpng )
79 perl? ( dev-lang/perl )
80 python? ( virtual/python
81 dev-python/numpy )
82 ruby? ( >=dev-lang/ruby-1.8.4.20060226 )
83 fits? ( sci-libs/cfitsio )
84 ogdi? ( sci-libs/ogdi )
85 gml? ( >=dev-libs/xerces-c-3 )
86 hdf5? ( >=sci-libs/hdf5-1.6.4 )
87 postgres? ( virtual/postgresql-server )
88 || (
89 netcdf? ( sci-libs/netcdf )
90 hdf? ( sci-libs/hdf )
91 )
92 || (
93 jpeg2k? ( media-libs/jasper )
94 ecwj2k? ( !media-libs/lcms
95 sci-libs/libecwj2 )
96 )
97 mysql? ( virtual/mysql )
98 odbc? ( dev-db/unixODBC )
99 geos? ( >=sci-libs/geos-2.2.1 )
100 sqlite? ( >=dev-db/sqlite-3 )"
101
102 DEPEND="${RDEPEND}
103 perl? ( python? ( ruby? ( >=dev-lang/swig-1.3.28 ) ) )
104 doc? ( app-doc/doxygen )"
105
106 AT_M4DIR="${S}/m4"
107
108 pkg_setup() {
109 if [ -n "${GDAL_CONFIGURE_OPTS}" ]; then
110 elog "User-specified configure options are ${GDAL_CONFIGURE_OPTS}."
111 else
112 elog "User-specified configure options are not set."
113 elog "If needed, set GDAL_CONFIGURE_OPTS to enable grass support."
114 fi
115 }
116
117 src_unpack() {
118 unpack ${A}
119 cd "${S}"
120
121 eaclocal
122 eautoconf
123
124 epatch "${FILESDIR}"/${PN}-1.4.2-datadir.patch \
125 "${FILESDIR}"/${PN}-1.5.0-soname.patch \
126 "${FILESDIR}"/${PN}-1.5.1-python-install.patch \
127 "${FILESDIR}"/${P}-ruby-make.patch \
128 "${FILESDIR}"/${P}-swig-fix.patch \
129 || die "sed failed"
130
131 if useq hdf; then
132 einfo "Checking if HDF4 is compiled with szip..."
133 if built_with_use sci-libs/hdf szip ; then
134 einfo "Found HDF4 compiled with szip. Nice."
135 else
136 ewarn "HDF4 (sci-libs/hdf) must be compiled with the szip USE flag!"
137 einfo "Please emerge hdf with szip USE flag and then emerge GDAL."
138 die "HDF4 not merged with szip use flag"
139 fi
140
141 if useq netcdf; then
142 ewarn "Netcdf and HDF4 are incompatible due to certain tools in"
143 ewarn "common; HDF5 is now the preferred choice for HDF data."
144 die "Please disable either the hdf or netcdf use flag."
145 fi
146 fi
147 }
148
149 src_compile() {
150
151 distutils_python_version
152
153 local pkg_conf="${GDAL_CONFIGURE_OPTS}"
154 local use_conf=""
155
156 pkg_conf="${pkg_conf} --enable-shared=yes --with-pic \
157 --with-libgrass=no --without-libtool"
158
159 use_conf="$(use_with jpeg) $(use_with png) $(use_with mysql) \
160 $(use_with postgres pg) $(use_with python) $(use_with ruby) \
161 $(use_with threads) $(use_with fits cfitsio) $(use_with perl) \
162 $(use_with netcdf) $(use_with hdf hdf4) $(use_with geos) \
163 $(use_with sqlite sqlite3) $(use_with jpeg2k jasper) $(use_with odbc) \
164 $(use_with gml xerces) $(use_with hdf5) $(use_with curl) \
165 $(use_enable debug)"
166
167 # It can't find this
168 if useq ogdi ; then
169 use_conf="--with-ogdi=/usr/$(get_libdir) ${use_conf}"
170 fi
171
172 if useq mysql ; then
173 use_conf="--with-mysql=/usr/bin/mysql_config ${use_conf}"
174 fi
175
176 if useq gif ; then
177 use_conf="--with-gif=internal ${use_conf}"
178 else
179 use_conf="--with-gif=no ${use_conf}"
180 fi
181
182 if useq python ; then
183 use_conf="--with-pymoddir=/usr/$(get_libdir)/python${PYVER}/site-packages \
184 ${use_conf}"
185 fi
186
187 # Fix doc path just in case
188 sed -i -e "s:@exec_prefix@/doc:/usr/share/doc/${PF}/html:g" \
189 GDALmake.opt.in || die "sed gdalmake.opt failed"
190
191 econf ${pkg_conf} ${use_conf} || die "econf failed"
192
193 # parallel makes fail on the ogr stuff (C++, what can I say?)
194 # also failing with gcc4 in libcsf
195 emake -j1 || die "emake failed"
196
197 if useq python; then
198 sed -i -e "s#library_dirs = #library_dirs = /usr/$(get_libdir):#g" \
199 swig/python/setup.cfg || die "sed python setup.cfg failed"
200 sed -i -e "s:\$(DESTDIR)\$(prefix):\$(DESTDIR)\$(INST_PREFIX):g" \
201 swig/python/GNUmakefile || die "sed python makefile failed"
202 fi
203
204 if useq perl ; then
205 cd "${S}"/swig/perl
206 perl-module_src_prep
207 perl-module_src_compile
208 cd "${S}"
209 fi
210
211 if useq doc ; then
212 make docs || die "make docs failed"
213 fi
214 }
215
216 src_install() {
217
218 if useq perl ; then
219 cd "${S}"/swig/perl
220 perl-module_src_install
221 sed -i -e "s:BINDINGS = python ruby perl:BINDINGS = python ruby:g" \
222 GDALmake.opt
223 cd "${S}"
224 fi
225
226 # einstall causes sandbox violations on /usr/lib/libgdal.so
227 make DESTDIR="${D}" install \
228 || die "make install failed"
229
230 dodoc Doxyfile HOWTO-RELEASE NEWS
231
232 if useq doc ; then
233 dohtml html/* || die "install html failed"
234 docinto ogr
235 dohtml ogr/html/* || die "install ogr html failed"
236 fi
237
238 if useq python; then
239 newdoc swig/python/README.txt README-python.txt
240 dodir /usr/share/${PN}/samples
241 insinto /usr/share/${PN}/samples
242 doins swig/python/samples/*
243 fi
244
245 use perl && fixlocalpod
246 }
247
248 pkg_postinst() {
249 elog
250 elog "If you need libgrass support, then you must rebuild gdal, after"
251 elog "installing the latest Grass, and set the following option:"
252 elog
253 elog "GDAL_CONFIGURE_OPTS=--with-grass=${GRASS_HOME} emerge gdal"
254 elog
255 elog "GDAL is most useful with full graphics support enabled via various"
256 elog "USE flags: png, jpeg, gif, jpeg2k, etc. Also python, fits, ogdi,"
257 elog "geos, and support for either netcdf or HDF4 is available, as well as"
258 elog "grass, and mysql, sqlite, or postgres (grass support requires grass 6"
259 elog "and rebuilding gdal). HDF5 support is now included."
260 elog
261 elog "Note: tiff and geotiff are now hard depends, so no USE flags."
262 elog "Also, this package will check for netcdf before hdf, so if you"
263 elog "prefer hdf, please emerge hdf with USE=szip prior to emerging"
264 elog "gdal. Detailed API docs require doxygen (man pages are free)."
265 elog
266 elog "Check available image and data formats after building with"
267 elog "gdalinfo and ogrinfo (using the --formats switch)."
268 elog
269 }