Gentoo Archives: gentoo-commits

From: Amy Liffey <amynka@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/gdal/
Date: Thu, 28 Jun 2018 20:02:54
Message-Id: 1530216133.5325276b91d66c0bfffc48330aae12033e5d8c38.amynka@gentoo
1 commit: 5325276b91d66c0bfffc48330aae12033e5d8c38
2 Author: Amy Liffey <amynka <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jun 28 19:53:06 2018 +0000
4 Commit: Amy Liffey <amynka <AT> gentoo <DOT> org>
5 CommitDate: Thu Jun 28 20:02:13 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5325276b
7
8 sci-libs/gdal: version bump 2.3.0
9
10 Closes: https://bugs.gentoo.org/654590
11 Closes: https://bugs.gentoo.org/644882
12 Closes: https://bugs.gentoo.org/654702
13 Closes: https://bugs.gentoo.org/656314
14 Package-Manager: Portage-2.3.40, Repoman-2.3.9
15
16 sci-libs/gdal/Manifest | 1 +
17 sci-libs/gdal/gdal-2.3.0.ebuild | 289 ++++++++++++++++++++++++++++++++++++++++
18 2 files changed, 290 insertions(+)
19
20 diff --git a/sci-libs/gdal/Manifest b/sci-libs/gdal/Manifest
21 index 17fbd88fc85..aac7d7c428b 100644
22 --- a/sci-libs/gdal/Manifest
23 +++ b/sci-libs/gdal/Manifest
24 @@ -1 +1,2 @@
25 DIST gdal-2.2.3.tar.gz 13754766 BLAKE2B d9482e7ee40bb5558fbbb43b750dfb95344abe45142c19e1f767535d3fc127fa9d6ed4496d730a25cb4132980efbffb4685e8663798fa05515b8548edb689e42 SHA512 841e5ba3c1a442b678dcaabac719ea7707b817f3dc717a34430dc7ba1f2c27fa88e27b7a8645075fae6e16373b36e6c50f674bdd6b70d10059e6bc4be7a72046
26 +DIST gdal-2.3.0.tar.gz 14423820 BLAKE2B 6c67c66b2f68699249ccd4df2cb1e3b7042e94003b730e64bd8b8eec726a32da9485cab29552bd34c23831686ec3e879edd1848a2339c8289580ce282a287992 SHA512 b37e433be0b7a587ea9f9e5e720295e4cd1406f6c8ca770f5fedcd7fdc797e01e576eb887034b38f93f04a4e76c0ce84792bc7d91a49fea4122231a37ace812f
27
28 diff --git a/sci-libs/gdal/gdal-2.3.0.ebuild b/sci-libs/gdal/gdal-2.3.0.ebuild
29 new file mode 100644
30 index 00000000000..24f395f1b09
31 --- /dev/null
32 +++ b/sci-libs/gdal/gdal-2.3.0.ebuild
33 @@ -0,0 +1,289 @@
34 +# Copyright 1999-2018 Gentoo Foundation
35 +# Distributed under the terms of the GNU General Public License v2
36 +
37 +EAPI=6
38 +
39 +GENTOO_DEPEND_ON_PERL="no"
40 +PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
41 +DISTUTILS_OPTIONAL=1
42 +
43 +inherit autotools perl-module distutils-r1 toolchain-funcs flag-o-matic java-pkg-opt-2
44 +
45 +DESCRIPTION="Translator library for raster geospatial data formats (includes OGR support)"
46 +HOMEPAGE="http://www.gdal.org/"
47 +SRC_URI="http://download.osgeo.org/${PN}/${PV}/${P}.tar.gz"
48 +
49 +SLOT="0/2.2"
50 +LICENSE="BSD Info-ZIP MIT"
51 +KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
52 +IUSE="armadillo +aux_xml curl debug doc fits geos gif gml hdf5 java jpeg jpeg2k mdb mysql netcdf odbc ogdi opencl oracle pdf perl png postgres python spatialite sqlite threads webp xls"
53 +
54 +COMMON_DEPEND="
55 + dev-libs/expat
56 + dev-libs/json-c:=
57 + dev-libs/libpcre
58 + dev-libs/libxml2:=
59 + media-libs/tiff:0=
60 + sci-libs/libgeotiff
61 + sys-libs/zlib:=[minizip(+)]
62 + armadillo? ( sci-libs/armadillo:=[lapack] )
63 + curl? ( net-misc/curl )
64 + fits? ( sci-libs/cfitsio:= )
65 + geos? ( >=sci-libs/geos-2.2.1 )
66 + gif? ( media-libs/giflib:= )
67 + gml? ( >=dev-libs/xerces-c-3.1 )
68 + hdf5? ( >=sci-libs/hdf5-1.6.4:=[szip] )
69 + jpeg? ( virtual/jpeg:0 )
70 + jpeg2k? ( media-libs/openjpeg:2= )
71 + mdb? ( dev-java/jackcess:1 )
72 + mysql? ( virtual/mysql )
73 + netcdf? ( sci-libs/netcdf:= )
74 + odbc? ( dev-db/unixODBC )
75 + ogdi? ( sci-libs/ogdi )
76 + opencl? ( virtual/opencl )
77 + oracle? ( dev-db/oracle-instantclient:= )
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/numpy[${PYTHON_USEDEP}]
85 + )
86 + spatialite? ( dev-db/spatialite )
87 + sqlite? ( dev-db/sqlite:3 )
88 + webp? ( media-libs/libwebp:= )
89 + xls? ( dev-libs/freexl )"
90 +
91 +RDEPEND="${COMMON_DEPEND}
92 + java? ( >=virtual/jre-1.7:* )"
93 +
94 +DEPEND="${COMMON_DEPEND}
95 + doc? ( app-doc/doxygen )
96 + java? ( >=virtual/jdk-1.7:* )
97 + perl? ( dev-lang/swig:0 )
98 + python? (
99 + dev-lang/swig:0
100 + dev-python/setuptools[${PYTHON_USEDEP}]
101 + )"
102 +
103 +REQUIRED_USE="
104 + mdb? ( java )
105 + python? ( ${PYTHON_REQUIRED_USE} )
106 + spatialite? ( sqlite )
107 +"
108 +
109 +PATCHES=(
110 + "${FILESDIR}/${PN}-2.2.3-soname.patch"
111 + "${FILESDIR}/${PN}-2.2.3-bashcomp-path.patch" # bug 641866
112 + "${FILESDIR}/${PN}-2.2.3-goocast.patch" # bug 656252
113 +)
114 +
115 +src_prepare() {
116 + # fix datadir and docdir placement
117 + sed -e "s:@datadir@:@datadir@/gdal:" \
118 + -e "s:@exec_prefix@/doc:@exec_prefix@/share/doc/${PF}/html:g" \
119 + -i "${S}"/GDALmake.opt.in || die
120 +
121 + # the second sed expression should fix bug 371075
122 + sed -e "s:setup.py install:setup.py install --root=\$(DESTDIR):" \
123 + -e "s:--prefix=\$(DESTDIR):--prefix=:" \
124 + -i "${S}"/swig/python/GNUmakefile || die
125 +
126 + # Fix spatialite/sqlite include issue
127 + sed -e 's:spatialite/sqlite3.h:sqlite3.h:g' \
128 + -i ogr/ogrsf_frmts/sqlite/ogr_sqlite.h || die
129 +
130 + # Fix freexl configure check
131 + sed -e 's:FREEXL_LIBS=missing):FREEXL_LIBS=missing,-lm):g' \
132 + -i configure.ac || die
133 +
134 + sed -e "s: /usr/: \"${EPREFIX}\"/usr/:g" \
135 + -i configure.ac || die
136 +
137 + sed -e 's:^ar:$(AR):g' \
138 + -i ogr/ogrsf_frmts/sdts/install-libs.sh || die
139 +
140 + # updated for newer swig (must specify the path to input files)
141 + sed -e "s: gdal_array.i: ../include/gdal_array.i:" \
142 + -e "s:\$(DESTDIR)\$(prefix):\$(DESTDIR)\$(INST_PREFIX):g" \
143 + -i swig/python/GNUmakefile || die "sed python makefile failed"
144 + sed -e "s:library_dirs = :library_dirs = /usr/$(get_libdir):g" \
145 + -i swig/python/setup.cfg || die "sed python setup.cfg failed"
146 +
147 + default
148 + eautoreconf
149 +}
150 +
151 +src_configure() {
152 + # bug 619148
153 + append-cxxflags -std=c++14
154 +
155 + tc-export AR RANLIB
156 + local myopts=()
157 +
158 + if use java; then
159 + myopts+=(
160 + --with-java=$(java-config --jdk-home 2>/dev/null)
161 + --with-jvm-lib=dlopen
162 + $(use_with mdb)
163 + )
164 + else
165 + myopts+=( --without-java --without-mdb )
166 + fi
167 +
168 + if use sqlite; then
169 + append-libs -lsqlite3
170 + fi
171 +
172 + # pcidsk is internal, because there is no such library yet released
173 + # also that thing is developed by the gdal people
174 + # kakadu, mrsid jp2mrsid - another jpeg2k stuff, ignore
175 + # bsb - legal issues
176 + # ingres - same story as oracle oci
177 + # jasper - disabled because unmaintained and vulnerable; openjpeg will be used as JPEG-2000 provider instead
178 + # podofo - we use poppler instead they are exclusive for each other
179 + # tiff is a hard dep
180 + ECONF_SOURCE="${S}" econf \
181 + --includedir="${EPREFIX}/usr/include/${PN}" \
182 + --disable-pdf-plugin \
183 + --disable-static \
184 + --enable-shared \
185 + --with-expat \
186 + --with-geotiff \
187 + --with-grib \
188 + --with-hide-internal-symbols \
189 + --with-libjson-c="${EPREFIX}/usr/" \
190 + --with-libtiff \
191 + --with-libtool \
192 + --with-libz="${EPREFIX}/usr/" \
193 + --with-gnm \
194 + --with-cryptopp=no \
195 + --without-bsb \
196 + --without-dods-root \
197 + --without-ecw \
198 + --without-epsilon \
199 + --without-fme \
200 + --without-grass \
201 + --without-hdf4 \
202 + --without-idb \
203 + --without-ingres \
204 + --without-jasper \
205 + --without-jp2mrsid \
206 + --without-kakadu \
207 + --without-mrsid \
208 + --without-msg \
209 + --without-mrf \
210 + --without-pcraster \
211 + --without-pdfium \
212 + --without-sde \
213 + --without-sosi \
214 + --without-mongocxx \
215 + --without-podofo \
216 + --disable-lto \
217 + $(use_enable debug) \
218 + $(use_with armadillo) \
219 + $(use_with aux_xml pam) \
220 + $(use_with curl) \
221 + $(use_with fits cfitsio) \
222 + $(use_with geos) \
223 + $(use_with gif) \
224 + $(use_with gml xerces) \
225 + $(use_with hdf5) \
226 + $(use_with jpeg pcidsk) \
227 + $(use_with jpeg) \
228 + $(use_with jpeg2k openjpeg) \
229 + $(use_with mysql mysql "${EPREFIX}"/usr/bin/mysql_config) \
230 + $(use_with netcdf) \
231 + $(use_with oracle oci) \
232 + $(use_with odbc) \
233 + $(use_with ogdi ogdi "${EPREFIX}"/usr) \
234 + $(use_with opencl) \
235 + $(use_with perl) \
236 + $(use_with png) \
237 + $(use_with pdf poppler) \
238 + $(use_with postgres pg) \
239 + $(use_with python) \
240 + $(use_with spatialite) \
241 + $(use_with sqlite sqlite3 "${EPREFIX}"/usr) \
242 + $(use_with threads) \
243 + $(use_with webp) \
244 + $(use_with xls freexl) \
245 + ${myopts}
246 +
247 + # mysql-config puts this in (and boy is it a PITA to get it out)
248 + if use mysql; then
249 + sed -e "s: -rdynamic : :" \
250 + -i GDALmake.opt || die "sed LIBS failed"
251 + fi
252 +}
253 +
254 +src_compile() {
255 + if use perl; then
256 + rm "${S}"/swig/perl/*_wrap.cpp || die
257 + emake -C "${S}"/swig/perl generate
258 + fi
259 +
260 + # gdal-config needed before generating Python bindings
261 + default
262 +
263 + if use perl ; then
264 + pushd "${S}"/swig/perl > /dev/null || die
265 + perl-module_src_configure
266 + perl-module_src_compile
267 + popd > /dev/null || die
268 + fi
269 +
270 + if use python; then
271 + rm -f "${S}"/swig/python/*_wrap.cpp || die
272 + emake -C "${S}"/swig/python generate
273 + pushd "${S}"/swig/python > /dev/null || die
274 + distutils-r1_src_compile
275 + popd > /dev/null || die
276 + fi
277 +
278 + use doc && emake docs
279 +}
280 +
281 +src_install() {
282 + if use perl ; then
283 + pushd "${S}"/swig/perl > /dev/null || die
284 + perl-module_src_install
285 + popd > /dev/null || die
286 + sed -e 's:BINDINGS = \(.*\) perl:BINDINGS = \1:g' \
287 + -i GDALmake.opt || die
288 + fi
289 +
290 + use perl && perl_delete_localpod
291 +
292 + local DOCS=( Doxyfile HOWTO-RELEASE NEWS )
293 + use doc && HTML_DOCS=( html/. )
294 +
295 + default
296 +
297 + python_install() {
298 + distutils-r1_python_install
299 + python_doscript scripts/*.py
300 + }
301 +
302 + if use python; then
303 + # Don't clash with gdal's docs
304 + unset DOCS HTML_DOCS
305 +
306 + pushd "${S}"/swig/python > /dev/null || die
307 + distutils-r1_src_install
308 + popd > /dev/null || die
309 +
310 + newdoc swig/python/README.txt README-python.txt
311 +
312 + insinto /usr/share/${PN}/samples
313 + doins -r swig/python/samples/
314 + fi
315 +
316 + doman "${S}"/man/man*/*
317 +}
318 +
319 +pkg_postinst() {
320 + elog "Check available image and data formats after building with"
321 + elog "gdalinfo and ogrinfo (using the --formats switch)."
322 +}