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