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