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