Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/gdal/
Date: Fri, 29 Oct 2021 17:45:18
Message-Id: 1635529507.71ea56e1b640aad241e105635d2b1f17ebf9862d.sam@gentoo
1 commit: 71ea56e1b640aad241e105635d2b1f17ebf9862d
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Fri Oct 29 17:44:57 2021 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Fri Oct 29 17:45:07 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=71ea56e1
7
8 sci-libs/gdal: add 3.3.3
9
10 Signed-off-by: Sam James <sam <AT> gentoo.org>
11
12 sci-libs/gdal/Manifest | 1 +
13 sci-libs/gdal/gdal-3.3.3.ebuild | 317 ++++++++++++++++++++++++++++++++++++++++
14 2 files changed, 318 insertions(+)
15
16 diff --git a/sci-libs/gdal/Manifest b/sci-libs/gdal/Manifest
17 index d95391c7dd0..784a66ee2c9 100644
18 --- a/sci-libs/gdal/Manifest
19 +++ b/sci-libs/gdal/Manifest
20 @@ -4,3 +4,4 @@ DIST gdal-3.2.3.tar.gz 18970990 BLAKE2B 9f2ac15b7e9d2df0393d15734030ec4777579aa0
21 DIST gdal-3.3.0.tar.gz 19572446 BLAKE2B afc7ce3c2191fb7607fdf3a01e7ed3e83c601fa063019015f666e0c550e4e42129b8782568f20f97422308f95b4e5c3dbd2311d562b7ec0830635e47e7c931b4 SHA512 39505c07aaf4dac587a189a979462101a7acba41e8732031540ebad02e089820658943ebb48c20f4ea56548363033b2db2f03f41c8a91ff5c5997a19b5eb999e
22 DIST gdal-3.3.1.tar.gz 19582883 BLAKE2B 328ba9f3c6a2ecca8583648e5f22469d3fbabf8d8676262a15c6debe718be8329ad3899cbe5397dff2896bc9c2500b60834c6a44cd0f5b670828d86838611f0d SHA512 0eb89502f1cebd5dd899fb8f20571952462c45aba6cee1d62ccc820b2fed5202f6c7e7096bd4ca6c0cfcc2de623f00295097a7e33da6ffa5624dcb8a7a0dc682
23 DIST gdal-3.3.2.tar.gz 19593819 BLAKE2B ab0919468482d080be9317f7d766ac8b7bd7a534a490a93ee29cab9ea5c68bef3827a256a6d13455d5ee8f4e6cf71a8a42fb173d1543282b04dea59c9378cf22 SHA512 ceacd101f770fecad12fec7fea5ba63c2a6d96413bdaa7f460798704fce1ff7a4f20b0b4a0785c195131aa8ee25990239a9e2da6844010b8f0c575f584d9b4a8
24 +DIST gdal-3.3.3.tar.gz 19600111 BLAKE2B 2d4558062b35016372d6964884296878fdcef0afa83fb03b10cd902ce101ec52f551d48014d95b391d19b8db13d7ca1d639575b39e9421780f4212bef02dd51f SHA512 c49e4555e598e4182e6419758c31df08d46b8b061480f08be09d61e840057529bd833338eaa8c1ecfe1c6a0cc8cd6a073bf15fa6cdae003e4475485cf3851145
25
26 diff --git a/sci-libs/gdal/gdal-3.3.3.ebuild b/sci-libs/gdal/gdal-3.3.3.ebuild
27 new file mode 100644
28 index 00000000000..9ca88526b95
29 --- /dev/null
30 +++ b/sci-libs/gdal/gdal-3.3.3.ebuild
31 @@ -0,0 +1,317 @@
32 +# Copyright 1999-2021 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=7
36 +
37 +GENTOO_DEPEND_ON_PERL="no"
38 +PYTHON_COMPAT=( python3_{8,9,10} )
39 +DISTUTILS_OPTIONAL=1
40 +inherit autotools bash-completion-r1 distutils-r1 flag-o-matic java-pkg-opt-2 perl-module toolchain-funcs
41 +
42 +DESCRIPTION="Translator library for raster geospatial data formats (includes OGR support)"
43 +HOMEPAGE="https://gdal.org/"
44 +SRC_URI="https://download.osgeo.org/${PN}/${PV}/${P}.tar.gz"
45 +
46 +SLOT="0/3.3"
47 +LICENSE="BSD Info-ZIP MIT"
48 +KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~riscv ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
49 +IUSE="armadillo +aux-xml curl cpu_flags_x86_avx cpu_flags_x86_sse cpu_flags_x86_ssse3 debug doc fits geos gif gml hdf5 heif java jpeg jpeg2k lzma mdb mysql netcdf odbc ogdi opencl oracle pdf perl png postgres python spatialite sqlite threads webp xls zstd"
50 +
51 +REQUIRED_USE="
52 + mdb? ( java )
53 + python? ( ${PYTHON_REQUIRED_USE} )
54 + spatialite? ( sqlite )
55 +"
56 +
57 +BDEPEND="
58 + virtual/pkgconfig
59 + doc? ( app-doc/doxygen )
60 + java? (
61 + dev-java/ant-core
62 + dev-lang/swig:0
63 + >=virtual/jdk-1.8:*
64 + )
65 + perl? ( dev-lang/swig:0 )
66 + python? (
67 + dev-lang/swig:0
68 + dev-python/setuptools[${PYTHON_USEDEP}]
69 + )
70 +"
71 +DEPEND="
72 + dev-libs/expat
73 + dev-libs/json-c:=
74 + dev-libs/libpcre
75 + dev-libs/libxml2:2
76 + dev-libs/openssl:=
77 + media-libs/tiff
78 + >=sci-libs/libgeotiff-1.5.1-r1:=
79 + >=sci-libs/proj-6.0.0:=
80 + sys-libs/zlib[minizip(+)]
81 + armadillo? ( sci-libs/armadillo:=[lapack] )
82 + curl? ( net-misc/curl )
83 + fits? ( sci-libs/cfitsio:= )
84 + geos? ( >=sci-libs/geos-3.8.0 )
85 + gif? ( media-libs/giflib:= )
86 + gml? ( >=dev-libs/xerces-c-3.1 )
87 + heif? ( media-libs/libheif:= )
88 + hdf5? ( >=sci-libs/hdf5-1.6.4:=[szip] )
89 + jpeg? ( virtual/jpeg:0= )
90 + jpeg2k? ( media-libs/openjpeg:2= )
91 + lzma? ( || (
92 + app-arch/xz-utils
93 + app-arch/lzma
94 + ) )
95 + mdb? ( dev-java/jackcess:1 )
96 + mysql? ( virtual/mysql )
97 + netcdf? ( sci-libs/netcdf:= )
98 + odbc? ( dev-db/unixODBC )
99 + ogdi? ( sci-libs/ogdi )
100 + opencl? ( virtual/opencl )
101 + oracle? ( dev-db/oracle-instantclient:= )
102 + pdf? ( app-text/poppler:= )
103 + perl? ( dev-lang/perl:= )
104 + png? ( media-libs/libpng:0= )
105 + postgres? ( >=dev-db/postgresql-8.4:= )
106 + python? (
107 + ${PYTHON_DEPS}
108 + dev-python/numpy[${PYTHON_USEDEP}]
109 + )
110 + spatialite? ( dev-db/spatialite )
111 + sqlite? ( dev-db/sqlite:3 )
112 + webp? ( media-libs/libwebp:= )
113 + xls? ( dev-libs/freexl )
114 + zstd? ( app-arch/zstd:= )
115 +"
116 +RDEPEND="${DEPEND}
117 + java? ( >=virtual/jre-1.8:* )
118 +"
119 +
120 +PATCHES=(
121 + "${FILESDIR}/${PN}-2.2.3-soname.patch"
122 + "${FILESDIR}/${PN}-2.3.0-curl.patch" # bug 659840
123 + "${FILESDIR}/${PN}-3.3.0-libdir.patch"
124 +)
125 +
126 +src_prepare() {
127 + default
128 +
129 + # Drop a --prefix hack in the upstream build system
130 + # We don't want the line at all, so let's just drop it rather than
131 + # trying to put in the right libdir value.
132 + # bug #696106
133 + sed -e '/\$ADD_PREFIX\/lib/d' \
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 + # SWIG: Use of the include path to find the input file is deprecated and will not work with ccache.
143 + sed -e "s: gdal_array.i: ../include/gdal_array.i:" \
144 + -i swig/python/GNUmakefile || die "sed python makefile failed"
145 +
146 + # autoconf 2.70+
147 + # bug #775209
148 + config_rpath_update .
149 +
150 + eautoreconf
151 +}
152 +
153 +src_configure() {
154 + local myconf=(
155 + # charls - not packaged in Gentoo ebuild repository
156 + # kakadu, mrsid jp2mrsid - another jpeg2k stuff, ignore
157 + # bsb - legal issues
158 + # ingres - same story as oracle oci
159 + # jasper - disabled because unmaintained and vulnerable; openjpeg will be used as JPEG-2000 provider instead
160 + # podofo - we use poppler instead they are exclusive for each other
161 + # tiff is a hard dep
162 + --includedir="${EPREFIX}"/usr/include/${PN}
163 + --disable-lto
164 + --disable-static
165 + --disable-driver-bsb
166 + --disable-driver-mrf
167 + --disable-pdf-plugin
168 + --enable-shared
169 + --enable-driver-grib
170 + --with-bash-completion="$(get_bashcompdir)"
171 + --with-cpp14
172 + --with-crypto
173 + --with-cryptopp=no
174 + --with-expat
175 + --with-geotiff
176 + --with-gnm
177 + --with-hide-internal-symbols
178 + --with-libjson-c="${EPREFIX}"/usr
179 + --with-libtiff
180 + --with-libtool
181 + --with-libz="${EPREFIX}"/usr
182 + --without-charls
183 + --without-dods-root
184 + --without-ecw
185 + --without-fgdb
186 + --without-fme
187 + --without-gta
188 + --without-grass
189 + --without-hdf4
190 + --without-idb
191 + --without-ingres
192 + --without-jasper
193 + --without-jp2lura
194 + --without-jp2mrsid
195 + --without-kakadu
196 + --without-kea
197 + --without-libkml
198 + --without-mongocxx
199 + --without-mrsid
200 + --without-mrsid_lidar
201 + --without-msg
202 + --without-rasdaman
203 + --without-rasterlite2
204 + --without-pcraster
205 + --without-pdfium
206 + --without-perl
207 + --without-podofo
208 + --without-python
209 + --without-qhull
210 + --without-sfcgal
211 + --without-sosi
212 + --without-teigha
213 + $(use_enable debug)
214 + $(use_with armadillo)
215 + $(use_with aux-xml pam)
216 + $(use_with curl)
217 + $(use_with cpu_flags_x86_avx avx)
218 + $(use_with cpu_flags_x86_sse sse)
219 + $(use_with cpu_flags_x86_ssse3 ssse3)
220 + $(use_with fits cfitsio)
221 + $(use_with geos)
222 + $(use_with gif)
223 + $(use_with gml xerces)
224 + $(use_with heif)
225 + $(use_with hdf5)
226 + $(use_with jpeg pcidsk) # pcidsk is internal, because there is no such library released developer by gdal
227 + $(use_with jpeg)
228 + $(use_with jpeg2k openjpeg)
229 + $(use_with lzma liblzma)
230 + $(use_with mysql mysql "${EPREFIX}"/usr/bin/mysql_config)
231 + $(use_with netcdf)
232 + $(use_with oracle oci)
233 + $(use_with odbc)
234 + $(use_with ogdi ogdi "${EPREFIX}"/usr)
235 + $(use_with opencl)
236 + $(use_with pdf poppler)
237 + $(use_with png)
238 + $(use_with postgres pg)
239 + $(use_with spatialite)
240 + $(use_with sqlite sqlite3 "${EPREFIX}"/usr)
241 + $(use_with threads)
242 + $(use_with webp)
243 + $(use_with xls freexl)
244 + $(use_with zstd)
245 + )
246 +
247 + tc-export AR RANLIB
248 +
249 + if use java; then
250 + myconf+=(
251 + --with-java=$(java-config --jdk-home 2>/dev/null)
252 + --with-jvm-lib=dlopen
253 + $(use_with mdb)
254 + )
255 + else
256 + myconf+=( --without-java --without-mdb )
257 + fi
258 +
259 + if use sqlite; then
260 + append-libs -lsqlite3
261 + fi
262 +
263 + # bug #632660
264 + if use ogdi; then
265 + append-cflags $($(tc-getPKG_CONFIG) --cflags libtirpc)
266 + append-cxxflags $($(tc-getPKG_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 java; then
288 + pushd "${S}"/swig/java > /dev/null || die
289 + emake
290 + popd > /dev/null || die
291 + fi
292 +
293 + if use perl; then
294 + pushd "${S}"/swig/perl > /dev/null || die
295 + perl-module_src_configure
296 + perl-module_src_compile
297 + popd > /dev/null || die
298 + fi
299 +
300 + if use python; then
301 + rm -f "${S}"/swig/python/*_wrap.cpp || die
302 + emake -C "${S}"/swig/python generate
303 + pushd "${S}"/swig/python > /dev/null || die
304 + distutils-r1_src_compile
305 + popd > /dev/null || die
306 + fi
307 +
308 + use doc && emake docs
309 +}
310 +
311 +src_install() {
312 + local DOCS=( NEWS )
313 + use doc && local HTML_DOCS=( html/. )
314 +
315 + default
316 +
317 + # Respect libdir in pkgconfig file
318 + sed -i -e "s:\${exec_prefix}/lib:\${exec_prefix}/$(get_libdir):" "${ED}"/usr/$(get_libdir)/pkgconfig/gdal.pc || die
319 +
320 + use java && java-pkg_dojar "${S}"/swig/java/gdal.jar
321 +
322 + if use perl; then
323 + pushd "${S}"/swig/perl > /dev/null || die
324 + myinst=( DESTDIR="${D}" )
325 + perl-module_src_install
326 + popd > /dev/null || die
327 + perl_delete_localpod
328 + fi
329 +
330 + if use python; then
331 + # Don't clash with gdal's docs
332 + unset DOCS HTML_DOCS
333 +
334 + pushd "${S}"/swig/python > /dev/null || die
335 + distutils-r1_src_install
336 + popd > /dev/null || die
337 +
338 + newdoc swig/python/README.rst README-python.rst
339 + fi
340 +
341 + doman "${S}"/man/man*/*
342 + find "${ED}" -name '*.la' -type f -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 +}