Gentoo Archives: gentoo-commits

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