Gentoo Archives: gentoo-commits

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