Gentoo Archives: gentoo-commits

From: Amy Winston <amynka@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/gdal/
Date: Sat, 26 Dec 2015 21:22:54
Message-Id: 1451164853.0dd94e531da261f381fe1d8357c348835af84341.amynka@gentoo
1 commit: 0dd94e531da261f381fe1d8357c348835af84341
2 Author: Amy Winston <amynka <AT> gentoo <DOT> org>
3 AuthorDate: Sat Dec 26 21:19:32 2015 +0000
4 Commit: Amy Winston <amynka <AT> gentoo <DOT> org>
5 CommitDate: Sat Dec 26 21:20:53 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0dd94e53
7
8 sci-libs/gdal: 2.0.1 version version bump bug #561262
9
10 Package-Manager: portage-2.2.24
11
12 sci-libs/gdal/Manifest | 1 +
13 sci-libs/gdal/gdal-2.0.1.ebuild | 315 ++++++++++++++++++++++++++++++++++++++++
14 2 files changed, 316 insertions(+)
15
16 diff --git a/sci-libs/gdal/Manifest b/sci-libs/gdal/Manifest
17 index 362db48..813f8a0 100644
18 --- a/sci-libs/gdal/Manifest
19 +++ b/sci-libs/gdal/Manifest
20 @@ -1,3 +1,4 @@
21 DIST gdal-1.11.1.tar.gz 10731242 SHA256 f46b5944a8cabc8516673f231f466131cdfd2cdc6677dbee5d96ec7fc58a3340 SHA512 17214ae17a5199d73477d17cf8680396aee8a28d4333cf55818bdd869548dc6a4d7535d7e05949696db31a7be4a511c5ca73199af3dda48d9a40d5640618e9c3 WHIRLPOOL 1f07ee4acccf58552ddef6b5a306b9dbe832014f6890d353f195ab0d47dfc4e81164b7c8b9cefc9915035d113d2f28818f05e89918728eadb0e80e43e7220b5b
22 DIST gdal-1.11.2.tar.gz 10746847 SHA256 66bc8192d24e314a66ed69285186d46e6999beb44fc97eeb9c76d82a117c0845 SHA512 f1f025de5a618cc2458b6d1f066647341ad4ded1cc2a08e4b78756d96d38715ddd8ba34b7c263369bde66cb20c7919195e13b60a1ecadee25ef80db79f3eb7da WHIRLPOOL 77274f6f9b9bb29fc21c6f274512bccebc7748420c31e3e626d26087194f69b9606354603b393b77903451b073d034f2508403193fdf738f5b099d7808771653
23 DIST gdal-2.0.0.tar.gz 11582325 SHA256 53761563ff53c5bf27bff7c4d6cab8bb1634baccefda05348e0f3b7acaf4c9e6 SHA512 74ae9d01a69652c92a16bc91f71b4c8416697d5f7aa137d385f58b7dc63c165c26330464c98891ac66b09475de24fbbff61f506ad1c9ecf64ffe08f1429fbad5 WHIRLPOOL 7d4a27e94e41ea53050ae3b8f1f06720e13626885455897caf6659a88c87bf61c087102963182b580e56a8840e3b57b6fbb8adadde64fd4679d5c37c3aa682c7
24 +DIST gdal-2.0.1.tar.gz 11592723 SHA256 b55f794768e104a2fd0304eaa61bb8bda3dc7c4e14f2c9d0913baca3e55b83ab SHA512 b3b22e53b6e4b68911d84260d79ed382625f9d71722759a89f49fdd736d1f1ad183bda99e0f09d3f368fead89b509df58daa35a367473dfd5628855d331efa23 WHIRLPOOL 1b1218d5d6c84e41051475c38b412ebb49511c4a1ae948f56edb5939d9eb9599546b9bd89a3cb6b2517d205723201e77bde64955bb3eb0b5bccfda799d5bffe3
25
26 diff --git a/sci-libs/gdal/gdal-2.0.1.ebuild b/sci-libs/gdal/gdal-2.0.1.ebuild
27 new file mode 100644
28 index 0000000..3eabe0d
29 --- /dev/null
30 +++ b/sci-libs/gdal/gdal-2.0.1.ebuild
31 @@ -0,0 +1,315 @@
32 +# Copyright 1999-2015 Gentoo Foundation
33 +# Distributed under the terms of the GNU General Public License v2
34 +# $Id$
35 +
36 +EAPI=5
37 +
38 +WANT_AUTOCONF="2.5"
39 +
40 +GENTOO_DEPEND_ON_PERL="no"
41 +PYTHON_COMPAT=( python2_7 python3_{3,4} )
42 +DISTUTILS_OPTIONAL=1
43 +
44 +inherit autotools eutils libtool perl-module distutils-r1 python-r1 toolchain-funcs java-pkg-opt-2
45 +
46 +DESCRIPTION="Translator library for raster geospatial data formats (includes OGR support)"
47 +HOMEPAGE="http://www.gdal.org/"
48 +SRC_URI="http://download.osgeo.org/${PN}/${PV}/${P}.tar.gz"
49 +
50 +SLOT="0"
51 +LICENSE="MIT"
52 +KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
53 +IUSE="armadillo +aux_xml curl debug doc fits geos gif gml hdf5 java jpeg jpeg2k mdb mysql netcdf odbc ogdi opencl pdf perl png postgres python spatialite sqlite threads xls"
54 +
55 +RDEPEND="
56 + dev-libs/expat
57 + dev-libs/json-c
58 + dev-libs/libpcre
59 + dev-libs/libxml2
60 + media-libs/tiff:0=
61 + sci-libs/libgeotiff
62 + sys-libs/zlib[minizip(+)]
63 + armadillo? ( sci-libs/armadillo[lapack] )
64 + curl? ( net-misc/curl )
65 + fits? ( sci-libs/cfitsio )
66 + geos? ( >=sci-libs/geos-2.2.1 )
67 + gif? ( media-libs/giflib )
68 + gml? ( >=dev-libs/xerces-c-3 )
69 + hdf5? ( >=sci-libs/hdf5-1.6.4[szip] )
70 + java? ( >=virtual/jre-1.6:* )
71 + jpeg? ( virtual/jpeg:0= )
72 + jpeg2k? ( media-libs/jasper )
73 + mysql? ( virtual/mysql )
74 + netcdf? ( sci-libs/netcdf )
75 + odbc? ( dev-db/unixODBC )
76 + ogdi? ( sci-libs/ogdi )
77 + opencl? ( virtual/opencl )
78 + pdf? ( >=app-text/poppler-0.24.3:= )
79 + perl? ( dev-lang/perl:= )
80 + png? ( media-libs/libpng:0= )
81 + postgres? ( >=dev-db/postgresql-8.4:= )
82 + python? (
83 + ${PYTHON_DEPS}
84 + dev-python/setuptools[${PYTHON_USEDEP}]
85 + dev-python/numpy[${PYTHON_USEDEP}]
86 + )
87 + sqlite? ( dev-db/sqlite:3 )
88 + spatialite? ( dev-db/spatialite )
89 + xls? ( dev-libs/freexl )
90 +"
91 +
92 +DEPEND="${RDEPEND}
93 + doc? ( app-doc/doxygen )
94 + java? ( >=virtual/jdk-1.6 )
95 + perl? ( dev-lang/swig:0 )
96 + python? ( dev-lang/swig:0 )"
97 +
98 +AT_M4DIR="${S}/m4"
99 +MAKEOPTS+=" -j1"
100 +
101 +REQUIRED_USE="
102 + spatialite? ( sqlite )
103 + mdb? ( java )
104 +"
105 +
106 +pkg_setup() {
107 + java-pkg-opt-2_pkg_setup
108 +}
109 +
110 +src_prepare() {
111 + java-pkg-opt-2_src_prepare
112 +
113 + # fix datadir and docdir placement
114 + sed -i \
115 + -e "s:@datadir@:@datadir@/gdal:" \
116 + -e "s:@exec_prefix@/doc:@exec_prefix@/share/doc/${PF}/html:g" \
117 + "${S}"/GDALmake.opt.in || die
118 +
119 + # the second sed expression should fix bug 371075
120 + sed -i \
121 + -e "s:setup.py install:setup.py install --root=\$(DESTDIR):" \
122 + -e "s:--prefix=\$(DESTDIR):--prefix=:" \
123 + "${S}"/swig/python/GNUmakefile || die
124 +
125 + # -soname is only accepted by GNU ld/ELF
126 + [[ ${CHOST} == *-darwin* ]] \
127 + && epatch "${FILESDIR}"/${PN}-1.5.0-install_name.patch \
128 + || epatch "${FILESDIR}"/${PN}-1.5.0-soname.patch
129 +
130 + # Fix spatialite/sqlite include issue
131 + sed -i \
132 + -e 's:spatialite/sqlite3.h:sqlite3.h:g' \
133 + ogr/ogrsf_frmts/sqlite/ogr_sqlite.h || die
134 +
135 + # Fix freexl configure check
136 + sed -i \
137 + -e 's:FREEXL_LIBS=missing):FREEXL_LIBS=missing,-lm):g' \
138 + configure.in || die
139 +
140 + sed \
141 + -e "s: /usr/: \"${EPREFIX}\"/usr/:g" \
142 + -i configure.in || die
143 +
144 + sed \
145 + -e 's:^ar:$(AR):g' \
146 + -i ogr/ogrsf_frmts/sdts/install-libs.sh || die
147 +
148 + tc-export AR RANLIB
149 +
150 + eautoreconf
151 +
152 + prepare_python() {
153 + mkdir -p "${BUILD_DIR}" || die
154 + find "${S}" -type d -maxdepth 1 -exec ln -s {} "${BUILD_DIR}"/ \; ||die
155 + find "${S}" -type f -maxdepth 1 -exec cp --target="${BUILD_DIR}"/ {} + ||die
156 +# mkdir -p "${BUILD_DIR}"/swig/python || die
157 +# mkdir -p "${BUILD_DIR}"/apps || die
158 +# cp -dpR --target="${BUILD_DIR}"/swig/ \
159 +# "${S}"/swig/{python,SWIGmake.base,GNUmakefile} || die
160 +# ln -s "${S}"/swig/include "${BUILD_DIR}"/swig/ || die
161 +# ln -s "${S}"/apps/gdal-config "${BUILD_DIR}"/apps/ || die
162 +# ln -s "${S}"/port "${BUILD_DIR}"/ || die
163 + }
164 + if use python; then
165 + python_foreach_impl prepare_python
166 + fi
167 +}
168 +
169 +gdal_src_configure() {
170 + local myopts=""
171 +
172 + if use java; then
173 + myopts+="
174 + --with-java=$(java-config --jdk-home 2>/dev/null)
175 + $(use_with mdb)"
176 + else
177 + myopts+=" --without-java --without-mdb"
178 + use mdb && ewarn "mdb requires java use enabled. disabling"
179 + fi
180 +
181 + if use sqlite; then
182 + myopts+=" LIBS=-lsqlite3"
183 + fi
184 +
185 + # pcidsk is internal, because there is no such library yet released
186 + # also that thing is developed by the gdal people
187 + # kakadu, mrsid jp2mrsid - another jpeg2k stuff, ignore
188 + # bsb - legal issues
189 + # oracle - disabled, i dont have and can't test
190 + # ingres - same story as oracle oci
191 + # podofo - we use poppler instead they are exclusive for each other
192 + # tiff is a hard dep
193 + ECONF_SOURCE="${S}" econf \
194 + --includedir="${EPREFIX}/usr/include/${PN}" \
195 + --disable-static \
196 + --enable-shared \
197 + --with-expat \
198 + --with-geotiff \
199 + --with-grib \
200 + --with-libtiff \
201 + --with-libz="${EPREFIX}/usr/" \
202 + --with-ogr \
203 + --without-bsb \
204 + --without-dods-root \
205 + --without-dwgdirect \
206 + --without-epsilon \
207 + --without-fme \
208 + --without-grass \
209 + --without-hdf4 \
210 + --without-idb \
211 + --without-ingres \
212 + --without-jp2mrsid \
213 + --without-kakadu \
214 + --without-libtool \
215 + --without-mrsid \
216 + --without-msg \
217 + --without-oci \
218 + --without-pcraster \
219 + --without-podofo \
220 + --without-sde \
221 + $(use_enable debug) \
222 + $(use_with armadillo) \
223 + $(use_with aux_xml pam) \
224 + $(use_with curl) \
225 + --without-ecw \
226 + $(use_with fits cfitsio) \
227 + $(use_with geos) \
228 + $(use_with gif) \
229 + $(use_with gml xerces) \
230 + $(use_with hdf5) \
231 + $(use_with jpeg pcidsk) \
232 + $(use_with jpeg) \
233 + $(use_with jpeg2k jasper) \
234 + $(use_with mysql mysql "${EPREFIX}"/usr/bin/mysql_config) \
235 + $(use_with netcdf) \
236 + $(use_with odbc) \
237 + $(use_with ogdi ogdi "${EPREFIX}"/usr) \
238 + $(use_with opencl) \
239 + $(use_with pdf poppler) \
240 + $(use_with perl) \
241 + $(use_with png) \
242 + $(use_with postgres pg) \
243 + $(use_with python) \
244 + $(use_with spatialite) \
245 + $(use_with sqlite sqlite3 "${EPREFIX}"/usr) \
246 + $(use_with threads) \
247 + $(use_with xls freexl) \
248 + ${myopts}
249 +
250 + # mysql-config puts this in (and boy is it a PITA to get it out)
251 + if use mysql; then
252 + sed -i \
253 + -e "s: -rdynamic : :" \
254 + GDALmake.opt || die "sed LIBS failed"
255 + fi
256 +
257 + if [[ -n $use_python ]]; then
258 + # updated for newer swig (must specify the path to input files)
259 + sed -i \
260 + -e "s: gdal_array.i: ../include/gdal_array.i:" \
261 + -e "s:\$(DESTDIR)\$(prefix):\$(DESTDIR)\$(INST_PREFIX):g" \
262 + swig/python/GNUmakefile || die "sed python makefile failed"
263 + sed -i \
264 + -e "s:library_dirs = :library_dirs = /usr/$(get_libdir):g" \
265 + swig/python/setup.cfg || die "sed python setup.cfg failed"
266 +# -e "s:gdal_config=.*$:gdal_config=../../../apps/gdal-config:g" \
267 + fi
268 +}
269 +
270 +src_configure() {
271 + local use_python=""
272 +
273 + gdal_src_configure
274 +
275 + if use python; then
276 + use_python="yes"
277 + python_foreach_impl run_in_build_dir gdal_src_configure
278 + fi
279 +}
280 +
281 +src_compile() {
282 + if use perl; then
283 + rm "${S}"/swig/perl/*_wrap.cpp
284 + emake -C "${S}"/swig/perl generate
285 + fi
286 +
287 + default
288 +
289 + if use perl ; then
290 + pushd "${S}"/swig/perl > /dev/null
291 + perl-module_src_configure
292 + perl-module_src_compile
293 + popd > /dev/null
294 + fi
295 +
296 + use doc && emake docs
297 +
298 + compile_python() {
299 + rm -f swig/python/*_wrap.cpp
300 + emake -C swig/python generate
301 + emake -C swig/python build
302 + }
303 + if use python; then
304 + python_foreach_impl run_in_build_dir compile_python
305 + fi
306 +}
307 +
308 +src_install() {
309 + if use perl ; then
310 + pushd "${S}"/swig/perl > /dev/null
311 + perl-module_src_install
312 + popd > /dev/null
313 + sed -e 's:BINDINGS = \(.*\) perl:BINDINGS = \1:g' \
314 + -i GDALmake.opt || die
315 + fi
316 +
317 + default
318 +
319 + use perl && perl_delete_localpod
320 +
321 + dodoc Doxyfile HOWTO-RELEASE NEWS
322 +
323 + use doc && dohtml html/*
324 +
325 + install_python() {
326 + emake -C swig/python DESTDIR="${D}" install
327 + }
328 + if use python; then
329 + python_foreach_impl run_in_build_dir install_python
330 + newdoc swig/python/README.txt README-python.txt
331 + insinto /usr/share/${PN}/samples
332 + doins swig/python/samples/*
333 + python_replicate_script "${ED}"/usr/bin/*py
334 + fi
335 +
336 + pushd man/man1 > /dev/null
337 + for i in * ; do
338 + newman ${i} ${i}
339 + done
340 + popd > /dev/null
341 +}
342 +
343 +pkg_postinst() {
344 + elog "Check available image and data formats after building with"
345 + elog "gdalinfo and ogrinfo (using the --formats switch)."
346 +}