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: gdal-1.8.1-r1.ebuild ChangeLog
Date: Mon, 26 Sep 2011 03:33:55
Message-Id: 20110926033345.CCF7F20033@flycatcher.gentoo.org
1 nerdboy 11/09/26 03:33:45
2
3 Modified: ChangeLog
4 Added: gdal-1.8.1-r1.ebuild
5 Log:
6 Updated for zlib header changes (closes bug #383569). Thanks to Ed
7 Catmur for the patch suggestion.
8
9 (Portage version: 2.1.10.19/cvs/Linux x86_64)
10
11 Revision Changes Path
12 1.119 sci-libs/gdal/ChangeLog
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-libs/gdal/ChangeLog?rev=1.119&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-libs/gdal/ChangeLog?rev=1.119&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-libs/gdal/ChangeLog?r1=1.118&r2=1.119
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/sci-libs/gdal/ChangeLog,v
21 retrieving revision 1.118
22 retrieving revision 1.119
23 diff -u -r1.118 -r1.119
24 --- ChangeLog 26 Jul 2011 16:21:29 -0000 1.118
25 +++ ChangeLog 26 Sep 2011 03:33:45 -0000 1.119
26 @@ -1,6 +1,13 @@
27 # ChangeLog for sci-libs/gdal
28 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
29 -# $Header: /var/cvsroot/gentoo-x86/sci-libs/gdal/ChangeLog,v 1.118 2011/07/26 16:21:29 neurogeek Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/sci-libs/gdal/ChangeLog,v 1.119 2011/09/26 03:33:45 nerdboy Exp $
31 +
32 +*gdal-1.8.1-r1 (26 Sep 2011)
33 +
34 + 26 Sep 2011; Steve Arnold <nerdboy@g.o> +gdal-1.8.1-r1.ebuild,
35 + +files/gdal-1.8.1-zlib_header_fix.patch:
36 + Updated for zlib header changes (closes bug #383569). Also updated
37 + python handling and EAPI.
38
39 26 Jul 2011; Jesus Rivero <neurogeek@g.o> gdal-1.8.1.ebuild:
40 Added python_mod_cleanup in pkg_postrm
41
42
43
44 1.1 sci-libs/gdal/gdal-1.8.1-r1.ebuild
45
46 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-libs/gdal/gdal-1.8.1-r1.ebuild?rev=1.1&view=markup
47 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-libs/gdal/gdal-1.8.1-r1.ebuild?rev=1.1&content-type=text/plain
48
49 Index: gdal-1.8.1-r1.ebuild
50 ===================================================================
51 # Copyright 1999-2011 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.8.1-r1.ebuild,v 1.1 2011/09/26 03:33:45 nerdboy Exp $
54
55 EAPI=3
56
57 WANT_AUTOCONF="2.5"
58
59 RUBY_OPTIONAL="yes"
60 USE_RUBY="ruby18"
61
62 PYTHON_DEPEND="python? 2:2.6"
63
64 inherit autotools eutils libtool perl-module python ruby-ng toolchain-funcs
65
66 DESCRIPTION="Translator library for raster geospatial data formats (includes OGR support)"
67 HOMEPAGE="http://www.gdal.org/"
68 SRC_URI="http://download.osgeo.org/gdal/${P}.tar.gz"
69
70 SLOT="0"
71 LICENSE="MIT"
72 KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
73
74 IUSE="+aux_xml curl debug doc ecwj2k fits geos gif gml hdf5 jpeg jpeg2k mysql netcdf odbc ogdi pdf perl png postgres python ruby sqlite threads"
75
76 RDEPEND="
77 dev-libs/expat
78 media-libs/tiff
79 sci-libs/libgeotiff
80 ( || ( <sys-libs/zlib-1.2.5.1-r1 >=sys-libs/zlib-1.2.5.1-r2[minizip] ) )
81 curl? ( net-misc/curl )
82 ecwj2k? ( sci-libs/libecwj2 )
83 fits? ( sci-libs/cfitsio )
84 geos? ( >=sci-libs/geos-2.2.1 )
85 gif? ( media-libs/giflib )
86 gml? ( >=dev-libs/xerces-c-3 )
87 hdf5? ( >=sci-libs/hdf5-1.6.4[szip] )
88 jpeg? ( virtual/jpeg )
89 jpeg2k? ( media-libs/jasper )
90 mysql? ( virtual/mysql )
91 netcdf? ( sci-libs/netcdf )
92 odbc? ( dev-db/unixODBC )
93 ogdi? ( sci-libs/ogdi )
94 pdf? ( app-text/poppler )
95 perl? ( dev-lang/perl )
96 png? ( media-libs/libpng )
97 postgres? ( >=dev-db/postgresql-base-8.4 )
98 python? ( dev-python/numpy )
99 ruby? ( $(ruby_implementation_depend ruby18) )
100 sqlite? ( >=dev-db/sqlite-3 )"
101
102 SWIG_DEP=">=dev-lang/swig-2.0.2"
103 DEPEND="${RDEPEND}
104 doc? ( app-doc/doxygen )
105 perl? ( ${SWIG_DEP} )
106 python? ( ${SWIG_DEP} )
107 ruby? ( ${SWIG_DEP} )"
108
109 AT_M4DIR="${S}/m4"
110 MAKEOPTS+=" -j1"
111
112 pkg_setup() {
113 if use python; then
114 python_set_active_version 2
115 python_pkg_setup
116 fi
117 }
118
119 src_unpack() {
120 # prevent ruby-ng.eclass from messing with the src path
121 default
122 }
123
124 src_prepare() {
125 # fix datadir and docdir placement
126 sed -i \
127 -e "s:@datadir@:@datadir@/gdal:" \
128 -e "s:@exec_prefix@/doc:@exec_prefix@/share/doc/${PF}/html:g" \
129 GDALmake.opt.in || die
130
131 # the second sed expression should fix bug 371075
132 sed -i \
133 -e "s:setup.py install:setup.py install --root=\$(DESTDIR):" \
134 -e "s:--prefix=\$(DESTDIR):--prefix=:" \
135 swig/python/GNUmakefile || die
136
137 epatch "${FILESDIR}"/1.7.2-ruby_cflags.patch
138
139 # -soname is only accepted by GNU ld/ELF
140 [[ ${CHOST} == *-darwin* ]] \
141 && epatch "${FILESDIR}"/${PN}-1.5.0-install_name.patch \
142 || epatch "${FILESDIR}"/${PN}-1.5.0-soname.patch
143
144 # Update for zlib header changes (see bug #383569)
145 epatch "${FILESDIR}"/${P}-zlib_header_fix.patch
146
147 # autoheader fail
148 eaclocal
149 eautoconf
150 eautomake
151 elibtoolize
152 }
153
154 src_configure() {
155 if use ruby; then
156 RUBY_MOD_DIR="$(ruby18 -r rbconfig -e 'print Config::CONFIG["sitearchdir"]')"
157 echo "Ruby module dir is: $RUBY_MOD_DIR"
158 fi
159
160 # pcidsk is internal, because there is no such library yet released
161 # also that thing is developed by the gdal people
162 # kakadu, mrsid jp2mrsid - another jpeg2k stuff, ignore
163 # bsb - legal issues
164 # oracle - disabled, i dont have and can't test
165 # ingres - same story as oracle oci
166 # tiff is a hard dep
167 econf \
168 --enable-shared \
169 --disable-static \
170 --with-expat \
171 --without-grass \
172 --without-hdf4 \
173 --without-fme \
174 --without-pcraster \
175 --without-kakadu \
176 --without-mrsid \
177 --without-jp2mrsid \
178 --without-msg \
179 --without-bsb \
180 --without-dods-root \
181 --without-oci \
182 --without-ingres \
183 --without-spatialite \
184 --without-dwgdirect \
185 --without-epsilon \
186 --without-idb \
187 --without-sde \
188 --without-libtool \
189 --with-libz="${EPREFIX}/usr/" \
190 --with-ogr \
191 --with-grib \
192 --with-vfk \
193 --with-libtiff=external \
194 --with-geotiff=external \
195 $(use_enable debug) \
196 $(use_with postgres pg) \
197 $(use_with fits cfitsio) \
198 $(use_with netcdf) \
199 $(use_with png) \
200 $(use_with jpeg) \
201 $(use_with jpeg pcidsk) \
202 $(use_with gif) \
203 $(use_with ogdi ogdi "${EPREFIX}"/usr) \
204 $(use_with hdf5) \
205 $(use_with jpeg2k jasper) \
206 $(use_with ecwj2k ecw) \
207 $(use_with gml xerces) \
208 $(use_with odbc) \
209 $(use_with curl) \
210 $(use_with sqlite sqlite3 "${EPREFIX}"/usr) \
211 $(use_with mysql mysql "${EPREFIX}"/usr/bin/mysql_config) \
212 $(use_with geos) \
213 $(use_with aux_xml pam) \
214 $(use_with pdf poppler) \
215 $(use_with perl) \
216 $(use_with ruby) \
217 $(use_with python) \
218 $(use_with threads) \
219 --with-pymoddir="${EPREFIX}"/$(python_get_sitedir)
220
221 # mysql-config puts this in (and boy is it a PITA to get it out)
222 if use mysql; then
223 sed -i \
224 -e "s: -rdynamic : :" \
225 GDALmake.opt || die "sed LIBS failed"
226 fi
227
228 # updated for newer swig (must specify the path to input files)
229 if use python; then
230 sed -i \
231 -e "s: gdal_array.i: ../include/gdal_array.i:" \
232 -e "s:\$(DESTDIR)\$(prefix):\$(DESTDIR)\$(INST_PREFIX):g" \
233 swig/python/GNUmakefile || die "sed python makefile failed"
234 sed -i \
235 -e "s:library_dirs = :library_dirs = /usr/$(get_libdir):g" \
236 swig/python/setup.cfg || die "sed python setup.cfg failed"
237 fi
238 }
239
240 src_compile() {
241 local i
242 for i in perl ruby python; do
243 if use $i; then
244 rm "${S}"/swig/$i/*_wrap.cpp
245 emake -C "${S}"/swig/$i generate || \
246 die "make generate failed for swig/$i"
247 fi
248 done
249
250 # parallel makes fail
251 emake || die "emake failed"
252
253 if use perl ; then
254 pushd "${S}"/swig/perl > /dev/null
255 perl-module_src_prep
256 perl-module_src_compile
257 popd > /dev/null
258 fi
259
260 if use doc ; then
261 emake docs || die "make docs failed"
262 fi
263 }
264
265 src_install() {
266 if use perl ; then
267 pushd "${S}"/swig/perl > /dev/null
268 perl-module_src_install
269 popd > /dev/null
270 sed -i \
271 -e "s:BINDINGS = python ruby perl:BINDINGS = python ruby:g" \
272 GDALmake.opt || die
273 fi
274
275 emake DESTDIR="${D}" install || die "make install failed"
276
277 if use ruby ; then
278 # weird reinstall collision; needs manual intervention...
279 pushd "${S}"/swig/ruby > /dev/null
280 rm -rf "${D}"${RUBY_MOD_DIR}/gdal
281 exeinto ${RUBY_MOD_DIR}/gdal
282 doexe *.so || die "doins ruby modules failed"
283 popd > /dev/null
284 fi
285
286 use perl && fixlocalpod
287
288 dodoc Doxyfile HOWTO-RELEASE NEWS || die
289
290 if use doc ; then
291 dohtml html/* || die "install html failed"
292 docinto ogr
293 dohtml ogr/html/* || die "install ogr html failed"
294 fi
295
296 if use python; then
297 newdoc swig/python/README.txt README-python.txt || die
298 insinto /usr/share/${PN}/samples
299 doins swig/python/samples/* || die
300 fi
301 }
302
303 pkg_postinst() {
304 if use python; then
305 python_need_rebuild
306 python_mod_optimize osgeo
307 fi
308 echo
309 elog "Check available image and data formats after building with"
310 elog "gdalinfo and ogrinfo (using the --formats switch)."
311 }
312
313 pkg_postrm() {
314 if use python; then
315 python_mod_cleanup osgeo
316 fi
317 }