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/files/, sci-libs/gdal/
Date: Fri, 28 May 2021 03:47:23
Message-Id: 1622173632.7db9d431bcdf4ec1cf079d3d3f271dddbe68208a.sam@gentoo
1 commit: 7db9d431bcdf4ec1cf079d3d3f271dddbe68208a
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Fri May 28 03:44:09 2021 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Fri May 28 03:47:12 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7db9d431
7
8 sci-libs/gdal: add 3.3.0
9
10 Signed-off-by: Sam James <sam <AT> gentoo.org>
11
12 sci-libs/gdal/Manifest | 1 +
13 .../files/gdal-3.3.0-configure-geos-disable.patch | 187 ++++++++++
14 sci-libs/gdal/files/gdal-3.3.0-libdir.patch | 392 +++++++++++++++++++++
15 sci-libs/gdal/gdal-3.3.0.ebuild | 317 +++++++++++++++++
16 4 files changed, 897 insertions(+)
17
18 diff --git a/sci-libs/gdal/Manifest b/sci-libs/gdal/Manifest
19 index e23b24d8734..a5e15147c50 100644
20 --- a/sci-libs/gdal/Manifest
21 +++ b/sci-libs/gdal/Manifest
22 @@ -1,3 +1,4 @@
23 DIST gdal-3.2.1.tar.gz 18953600 BLAKE2B b47994849bcf6bc2b2f53daabb85ef99cdc9ce2a06134bc591652bf7e5304d503701d2b07cae520ca71ad6238dd0b073d2034743e59b072fc5eb50c13bc143e6 SHA512 152dd97464a8242ea1da7a3a215b1d3326bab5aa4b0884fcab6880da460577c80075f87ea7b9513d796e899e98b40701c0b6a63f1e5275607905480ec547e688
24 DIST gdal-3.2.2.tar.gz 18959415 BLAKE2B 001347ee12c72fe4d9cfa27adb427624f80e5b16eeca01510166e3d74c36eb00da72c27d8582ccda124151143561c29b8e59dc3dd800c474b77991417b33acd1 SHA512 d7ff8773d3f1cb894fce89f56a3d4355769f1113eefb1367a3a543ced750e2c42618a4a1deef3a338ddd4d33b7332ae962b2d793f8c0b97e31ed4b84cb2df2d5
25 DIST gdal-3.2.3.tar.gz 18970990 BLAKE2B 9f2ac15b7e9d2df0393d15734030ec4777579aa01fcf2700958228b24fd50d574f3bd438c03e767549614a699c362b31f38cbb0f32ceb8056c9b55fab11ecfec SHA512 985a058a53f676f7d49a96d1a48d4f93c5da8548012bf81345afde03d8044022b210484290bca70c3d7a1ef3b0087d9e17c636b5badd1e0816c1f59b1bf21ee8
26 +DIST gdal-3.3.0.tar.gz 19572446 BLAKE2B afc7ce3c2191fb7607fdf3a01e7ed3e83c601fa063019015f666e0c550e4e42129b8782568f20f97422308f95b4e5c3dbd2311d562b7ec0830635e47e7c931b4 SHA512 39505c07aaf4dac587a189a979462101a7acba41e8732031540ebad02e089820658943ebb48c20f4ea56548363033b2db2f03f41c8a91ff5c5997a19b5eb999e
27
28 diff --git a/sci-libs/gdal/files/gdal-3.3.0-configure-geos-disable.patch b/sci-libs/gdal/files/gdal-3.3.0-configure-geos-disable.patch
29 new file mode 100644
30 index 00000000000..1671845707a
31 --- /dev/null
32 +++ b/sci-libs/gdal/files/gdal-3.3.0-configure-geos-disable.patch
33 @@ -0,0 +1,187 @@
34 +https://github.com/OSGeo/gdal/commit/b414b0a0594b3e9c175a001e8455819463039eb6.patch
35 +https://github.com/OSGeo/gdal/issues/3782
36 +
37 +From b414b0a0594b3e9c175a001e8455819463039eb6 Mon Sep 17 00:00:00 2001
38 +From: Thomas Bonfort <thomas.bonfort@××××××.com>
39 +Date: Tue, 4 May 2021 08:13:45 +0200
40 +Subject: [PATCH] configure: fix explicit disabling of geos/sfcgal
41 +--- a/configure
42 ++++ b/configure
43 +@@ -38323,6 +38323,7 @@ fi
44 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: GEOS support disabled" >&5
45 + $as_echo "GEOS support disabled" >&6; }
46 + GEOS_CONFIG=no
47 ++ HAVE_GEOS=no
48 +
49 + elif test x"$with_geos" = x"yes" -o x"$with_geos" = x"" ; then
50 +
51 +@@ -38580,15 +38581,13 @@ $as_echo "$as_me: WARNING: GEOS was found on your system, but the library could
52 +
53 + else
54 +
55 +- if test $ac_geos_config_auto = "no" ; then
56 ++ if test x"$with_geos" != x"no" -a x"$with_geos" != x ; then
57 + as_fn_error $? "GEOS support explicitly enabled, but geos-config could not be found" "$LINENO" 5
58 + fi
59 +
60 + fi
61 +
62 +-HAVE_GEOS_RESULT="no"
63 + if test "${HAVE_GEOS}" = "yes" ; then
64 +-
65 + { $as_echo "$as_me:${as_lineno-$LINENO}: Using C API from GEOS $GEOS_VERSION" >&5
66 + $as_echo "$as_me: Using C API from GEOS $GEOS_VERSION" >&6;}
67 +
68 +@@ -38602,7 +38601,6 @@ $as_echo "$as_me: Using C API from GEOS $GEOS_VERSION" >&6;}
69 +
70 + GEOS_LIBS="$STRIPPED_LIBRARY_NAME"
71 + LIBS="${GEOS_LIBS} ${LIBS}"
72 +- HAVE_GEOS_RESULT="yes"
73 + fi
74 +
75 +
76 +@@ -38625,6 +38623,7 @@ fi
77 +
78 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: SFCGAL support disabled" >&5
79 + $as_echo "SFCGAL support disabled" >&6; }
80 ++ HAVE_SFCGAL=no
81 + SFCGAL_CONFIG=no
82 +
83 + elif test x"$with_sfcgal" = x"yes" -o x"$with_sfcgal" = x"" ; then
84 +@@ -38883,15 +38882,13 @@ $as_echo "$as_me: WARNING: SFCGAL was found on your system, but the library coul
85 +
86 + else
87 +
88 +- if test $ac_sfcgal_config_auto = "no" ; then
89 ++ if test x"$with_sfcgal" != x"no" -a x"$with_sfcgal" != x ; then
90 + as_fn_error $? "SFCGAL support explicitly enabled, but sfcgal-config could not be found" "$LINENO" 5
91 + fi
92 +
93 + fi
94 +
95 +-HAVE_SFCGAL_RESULT="no"
96 + if test "${HAVE_SFCGAL}" = "yes" ; then
97 +-
98 + { $as_echo "$as_me:${as_lineno-$LINENO}: Using C API from SFCGAL $SFCGAL_VERSION" >&5
99 + $as_echo "$as_me: Using C API from SFCGAL $SFCGAL_VERSION" >&6;}
100 +
101 +@@ -38905,7 +38902,6 @@ $as_echo "$as_me: Using C API from SFCGAL $SFCGAL_VERSION" >&6;}
102 +
103 + SFCGAL_LIBS="$STRIPPED_LIBRARY_NAME"
104 + LIBS="${SFCGAL_LIBS} ${LIBS}"
105 +- HAVE_SFCGAL_RESULT="yes"
106 + fi
107 +
108 +
109 +@@ -44998,7 +44994,7 @@ echo " FreeXL support: ${HAVE_FREEXL}"
110 + echo " GEORASTER support: ${HAVE_GEORASTER}"
111 +
112 +
113 +-echo " GEOS support: ${HAVE_GEOS_RESULT}"
114 ++echo " GEOS support: ${HAVE_GEOS}"
115 +
116 +
117 + echo " Google libkml support: ${HAVE_LIBKML}"
118 +@@ -45162,7 +45158,7 @@ echo " RasterLite2 support: ${HAVE_RASTERLITE2}"
119 + echo " RDB support: ${RDB_SETTING}"
120 +
121 +
122 +-echo " SFCGAL support: ${HAVE_SFCGAL_RESULT}"
123 ++echo " SFCGAL support: ${HAVE_SFCGAL}"
124 +
125 +
126 + echo " SOSI support: ${SOSI_ENABLED}"
127 +diff --git a/configure.ac b/configure.ac
128 +index ffc71b7faf76..1f88370c4045 100644
129 +--- a/configure.ac
130 ++++ b/configure.ac
131 +@@ -4541,14 +4541,11 @@ dnl Check if geos library is available.
132 + dnl ---------------------------------------------------------------------------
133 +
134 + GEOS_INIT(3.1.0)
135 +-HAVE_GEOS_RESULT="no"
136 + if test "${HAVE_GEOS}" = "yes" ; then
137 +-
138 + AC_MSG_NOTICE([Using C API from GEOS $GEOS_VERSION])
139 + STRIP_SYSTEM_LIBRARY_PATHS("${GEOS_LIBS}")
140 + GEOS_LIBS="$STRIPPED_LIBRARY_NAME"
141 + LIBS="${GEOS_LIBS} ${LIBS}"
142 +- HAVE_GEOS_RESULT="yes"
143 + fi
144 +
145 + dnl ---------------------------------------------------------------------------
146 +@@ -4556,14 +4553,11 @@ dnl Check if SFCGAL library is available.
147 + dnl ---------------------------------------------------------------------------
148 +
149 + SFCGAL_INIT(1.2.2)
150 +-HAVE_SFCGAL_RESULT="no"
151 + if test "${HAVE_SFCGAL}" = "yes" ; then
152 +-
153 + AC_MSG_NOTICE([Using C API from SFCGAL $SFCGAL_VERSION])
154 + STRIP_SYSTEM_LIBRARY_PATHS("${SFCGAL_LIBS}")
155 + SFCGAL_LIBS="$STRIPPED_LIBRARY_NAME"
156 + LIBS="${SFCGAL_LIBS} ${LIBS}"
157 +- HAVE_SFCGAL_RESULT="yes"
158 + fi
159 +
160 + dnl ---------------------------------------------------------------------------
161 +@@ -6077,7 +6071,7 @@ LOC_MSG([ EXR support: ${HAVE_EXR}])
162 + LOC_MSG([ FGDB support: ${FGDB_ENABLED}])
163 + LOC_MSG([ FreeXL support: ${HAVE_FREEXL}])
164 + LOC_MSG([ GEORASTER support: ${HAVE_GEORASTER}])
165 +-LOC_MSG([ GEOS support: ${HAVE_GEOS_RESULT}])
166 ++LOC_MSG([ GEOS support: ${HAVE_GEOS}])
167 + LOC_MSG([ Google libkml support: ${HAVE_LIBKML}])
168 + LOC_MSG([ GRASS support: ${GRASS_SETTING}])
169 + LOC_MSG([ GTA support: ${GTA_SETTING}])
170 +@@ -6135,7 +6129,7 @@ LOC_MSG([ QHull support: ${QHULL_SETTING}])
171 + LOC_MSG([ Rasdaman support: ${RASDAMAN_ENABLED}])
172 + LOC_MSG([ RasterLite2 support: ${HAVE_RASTERLITE2}])
173 + LOC_MSG([ RDB support: ${RDB_SETTING}])
174 +-LOC_MSG([ SFCGAL support: ${HAVE_SFCGAL_RESULT}])
175 ++LOC_MSG([ SFCGAL support: ${HAVE_SFCGAL}])
176 + LOC_MSG([ SOSI support: ${SOSI_ENABLED}])
177 + LOC_MSG([ SpatiaLite support: ${HAVE_SPATIALITE}])
178 + if test "x$SPATIALITE_SONAME" != "x"; then
179 +diff --git a/m4/geos.m4 b/m4/geos.m4
180 +index 1c685039740e..608466c67c69 100644
181 +--- a/m4/geos.m4
182 ++++ b/m4/geos.m4
183 +@@ -55,6 +55,7 @@ AC_DEFUN([GEOS_INIT],[
184 +
185 + AC_MSG_RESULT([GEOS support disabled])
186 + GEOS_CONFIG=no
187 ++ HAVE_GEOS=no
188 +
189 + elif test x"$with_geos" = x"yes" -o x"$with_geos" = x"" ; then
190 +
191 +@@ -160,7 +161,7 @@ AC_DEFUN([GEOS_INIT],[
192 +
193 + else
194 +
195 +- if test $ac_geos_config_auto = "no" ; then
196 ++ if test x"$with_geos" != x"no" -a x"$with_geos" != x ; then
197 + AC_MSG_ERROR([GEOS support explicitly enabled, but geos-config could not be found])
198 + fi
199 +
200 +diff --git a/m4/sfcgal.m4 b/m4/sfcgal.m4
201 +index 2384f0f0dc5d..1a8d26460ce7 100644
202 +--- a/m4/sfcgal.m4
203 ++++ b/m4/sfcgal.m4
204 +@@ -53,6 +53,7 @@ AC_DEFUN([SFCGAL_INIT],[
205 + if test x"$with_sfcgal" = x"no" ; then
206 +
207 + AC_MSG_RESULT([SFCGAL support disabled])
208 ++ HAVE_SFCGAL=no
209 + SFCGAL_CONFIG=no
210 +
211 + elif test x"$with_sfcgal" = x"yes" -o x"$with_sfcgal" = x"" ; then
212 +@@ -159,7 +160,7 @@ AC_DEFUN([SFCGAL_INIT],[
213 +
214 + else
215 +
216 +- if test $ac_sfcgal_config_auto = "no" ; then
217 ++ if test x"$with_sfcgal" != x"no" -a x"$with_sfcgal" != x ; then
218 + AC_MSG_ERROR([SFCGAL support explicitly enabled, but sfcgal-config could not be found])
219 + fi
220 +
221
222 diff --git a/sci-libs/gdal/files/gdal-3.3.0-libdir.patch b/sci-libs/gdal/files/gdal-3.3.0-libdir.patch
223 new file mode 100644
224 index 00000000000..cd75a39f319
225 --- /dev/null
226 +++ b/sci-libs/gdal/files/gdal-3.3.0-libdir.patch
227 @@ -0,0 +1,392 @@
228 +[Dropped a few hunks for this to apply for now. Needs some rework to send upstream.]
229 +
230 +https://github.com/OSGeo/gdal/pull/3560
231 +https://bugs.gentoo.org/696106
232 +--- a/configure.ac
233 ++++ b/configure.ac
234 +@@ -1121,11 +1121,11 @@ if test "$with_libz" = "external" -o "$with_libz" = "" -o "$with_libz" = "yes" ;
235 +
236 + elif test "$with_libz" != "no" -a "$with_libz" != "internal" ; then
237 +
238 +- LIBS="-L$with_libz -L$with_libz/lib $LIBS"
239 ++ LIBS="-L$with_libz -L$with_libz/${libdir} $LIBS"
240 +
241 +- AC_CHECK_LIB(z,deflateInit_,LIBZ_SETTING=external,LIBZ_SETTING=internal,-L$with_libz -L$with_libz/lib -lz)
242 ++ AC_CHECK_LIB(z,deflateInit_,LIBZ_SETTING=external,LIBZ_SETTING=internal,-L$with_libz -L$with_libz/${libdir} -lz)
243 + if test "$LIBZ_SETTING" = "external" ; then
244 +- AC_CHECK_LIB(z,inflateCopy,LIBZ_SETTING=external,LIBZ_SETTING=internal,-L$with_libz -L$with_libz/lib -lz)
245 ++ AC_CHECK_LIB(z,inflateCopy,LIBZ_SETTING=external,LIBZ_SETTING=internal,-L$with_libz -L$with_libz/${libdir} -lz)
246 + if test "$LIBZ_SETTING" = "external" ; then
247 + AC_MSG_RESULT([using libz library from $with_libz])
248 + else
249 +@@ -1166,7 +1166,7 @@ AC_ARG_WITH(libdeflate,
250 + if test "$with_libdeflate" != "no" ; then
251 +
252 + if test "$with_libdeflate" != "" -a "$with_libdeflate" != "yes"; then
253 +- AC_CHECK_LIB(deflate, libdeflate_zlib_decompress, [libdeflate_lib=yes], [libdeflate_lib=no],-L$with_libdeflate/lib)
254 ++ AC_CHECK_LIB(deflate, libdeflate_zlib_decompress, [libdeflate_lib=yes], [libdeflate_lib=no],-L$with_libdeflate/${libdir})
255 + else
256 + AC_CHECK_LIB(deflate, libdeflate_zlib_decompress, [libdeflate_lib=yes], [libdeflate_lib=no])
257 + fi
258 +@@ -1197,7 +1197,7 @@ fi
259 + if test "$LIBDEFLATE_SETTING" = "yes" ; then
260 + if test "$with_libdeflate" != "" -a "$with_libdeflate" != "yes"; then
261 + EXTRA_INCLUDES="-I$with_libdeflate/include $EXTRA_INCLUDES"
262 +- LIBS="-L$with_libdeflate/lib -ldeflate $LIBS"
263 ++ LIBS="-L$with_libdeflate/${libdir} -ldeflate $LIBS"
264 + else
265 + LIBS="-ldeflate $LIBS"
266 + fi
267 +@@ -1290,7 +1290,7 @@ else
268 + LIBS="-L$with_libtiff -ltiff $LIBS"
269 + EXTRA_INCLUDES="-I$with_libtiff $EXTRA_INCLUDES"
270 + else
271 +- LIBS="-L$with_libtiff/lib -ltiff $LIBS"
272 ++ LIBS="-L$with_libtiff/${libdir} -ltiff $LIBS"
273 + EXTRA_INCLUDES="-I$with_libtiff/include $EXTRA_INCLUDES"
274 + fi
275 +
276 +@@ -1414,52 +1414,22 @@ else
277 + fi
278 + else
279 + ORIG_LIBS="$LIBS"
280 +- LIBS="-L$with_proj/lib -lproj $with_proj_extra_lib_for_test $ORIG_LIBS"
281 ++ LIBS="-L$with_proj/${libdir} -lproj $with_proj_extra_lib_for_test $ORIG_LIBS"
282 + AC_LANG_PUSH([C++])
283 + AC_CHECK_LIB(proj,proj_create_from_wkt,PROJ_FOUND=yes,PROJ_FOUND=no,)
284 + AC_LANG_POP([C++])
285 + if test "$PROJ_FOUND" = "no"; then
286 +- LIBS="-L$with_proj/lib -lproj $with_proj_extra_lib_for_test $ORIG_LIBS"
287 ++ LIBS="-L$with_proj/${libdir} -lproj $with_proj_extra_lib_for_test $ORIG_LIBS"
288 + unset ac_cv_lib_proj_proj_create_from_wkt
289 + AC_LANG_PUSH([C++])
290 + AC_CHECK_LIB(proj,proj_create_from_wkt,PROJ_FOUND=yes,PROJ_FOUND=no,)
291 + AC_LANG_POP([C++])
292 + fi
293 + if test "$PROJ_FOUND" = "no"; then
294 +- LIBS="-L$with_proj/lib64 -lproj $with_proj_extra_lib_for_test $ORIG_LIBS"
295 +- unset ac_cv_lib_proj_proj_create_from_wkt
296 +- AC_LANG_PUSH([C++])
297 +- AC_CHECK_LIB(proj,proj_create_from_wkt,PROJ_FOUND=yes,PROJ_FOUND=no,)
298 +- AC_LANG_POP([C++])
299 +- fi
300 +- if test "$PROJ_FOUND" = "no"; then
301 +- LIBS="-L$with_proj/lib -lproj $with_proj_extra_lib_for_test $ORIG_LIBS"
302 ++ LIBS="-L$with_proj/${libdir} -lproj $with_proj_extra_lib_for_test $ORIG_LIBS"
303 + AC_LANG_PUSH([C++])
304 + AC_CHECK_LIB(proj,internal_proj_create_from_wkt,PROJ_FOUND=yes,PROJ_FOUND=no,)
305 + AC_LANG_POP([C++])
306 +- if test "$PROJ_FOUND" = "no"; then
307 +- LIBS="-L$with_proj/lib -lproj $with_proj_extra_lib_for_test $ORIG_LIBS"
308 +- unset ac_cv_lib_proj_internal_proj_create_from_wkt
309 +- AC_LANG_PUSH([C++])
310 +- AC_CHECK_LIB(proj,internal_proj_create_from_wkt,PROJ_FOUND=yes,PROJ_FOUND=no,)
311 +- AC_LANG_POP([C++])
312 +- fi
313 +- if test "$PROJ_FOUND" = "yes"; then
314 +- PROJ_INCLUDE="-DPROJ_RENAME_SYMBOLS"
315 +- fi
316 +- fi
317 +- if test "$PROJ_FOUND" = "no"; then
318 +- LIBS="-L$with_proj/lib -linternalproj $with_proj_extra_lib_for_test $ORIG_LIBS"
319 +- AC_LANG_PUSH([C++])
320 +- AC_CHECK_LIB(internalproj,internal_proj_create_from_wkt,PROJ_FOUND=yes,PROJ_FOUND=no,)
321 +- AC_LANG_POP([C++])
322 +- if test "$PROJ_FOUND" = "no"; then
323 +- LIBS="-L$with_proj/lib -linternalproj $with_proj_extra_lib_for_test $ORIG_LIBS"
324 +- unset ac_cv_lib_internal_proj_internal_proj_create_from_wkt
325 +- AC_LANG_PUSH([C++])
326 +- AC_CHECK_LIB(internalproj,internal_proj_create_from_wkt,PROJ_FOUND=yes,PROJ_FOUND=no,)
327 +- AC_LANG_POP([C++])
328 +- fi
329 + if test "$PROJ_FOUND" = "yes"; then
330 + PROJ_INCLUDE="-DPROJ_RENAME_SYMBOLS"
331 + fi
332 +@@ -1523,7 +1493,7 @@ elif test "$with_spatialite" = "dlopen"; then
333 + SPATIALITE_SONAME="spatialite.so"
334 + fi
335 + else
336 +- AC_CHECK_LIB(spatialite,spatialite_init,SPATIALITE_INIT_FOUND=yes,SPATIALITE_INIT_FOUND=no,-L$with_spatialite/lib -lspatialite)
337 ++ AC_CHECK_LIB(spatialite,spatialite_init,SPATIALITE_INIT_FOUND=yes,SPATIALITE_INIT_FOUND=no,-L$with_spatialite/${libdir} -lspatialite)
338 +
339 + if test -f "$with_spatialite/include/spatialite.h" -a \
340 + "$SPATIALITE_INIT_FOUND" = "yes"; then
341 +@@ -1531,7 +1501,7 @@ else
342 + if test "$HAVE_SQLITE3" = "yes"; then
343 + SPATIALITE_INC="-I$with_spatialite/include"
344 + HAVE_SPATIALITE=yes
345 +- SPATIALITE_LIBS="-L$with_spatialite/lib -lspatialite"
346 ++ SPATIALITE_LIBS="-L$with_spatialite/${libdir} -lspatialite"
347 + LIBS="$SQLITE3_LDFLAGS $LIBS $SPATIALITE_LIBS"
348 + AC_MSG_RESULT(spatialite enabled)
349 + else
350 +@@ -1593,10 +1563,10 @@ if test "$with_zstd" = "" -o "$with_zstd" = "yes" ; then
351 + fi
352 + elif test "$with_zstd" != "" -a "$with_zstd" != "no"; then
353 +
354 +- AC_CHECK_LIB(zstd,ZSTD_decompressStream,ZSTD_SETTING=yes,ZSTD_SETTING=no,-L$with_zstd/lib)
355 ++ AC_CHECK_LIB(zstd,ZSTD_decompressStream,ZSTD_SETTING=yes,ZSTD_SETTING=no,-L$with_zstd/${libdir})
356 +
357 + if test "$ZSTD_SETTING" = "yes" -a -f "$with_zstd/include/zstd.h" ; then
358 +- LIBS="-L$with_zstd/lib -lzstd $LIBS"
359 ++ LIBS="-L$with_zstd/${libdir} -lzstd $LIBS"
360 + EXTRA_INCLUDES="-I$with_zstd/include $EXTRA_INCLUDES"
361 + else
362 + AC_MSG_ERROR([libzstd not found])
363 +@@ -1919,20 +1889,20 @@ fi
364 + # TODO: separate libs for rasters and vectors
365 + if test "$with_grass" != "yes" -a "$with_grass" != "no" ; then
366 +
367 +- AC_CHECK_LIB(grass_gis,G_is_initialized,GRASS_SETTING=grass70+,GRASS_SETTING=no,-L$with_grass/lib -lgrass_datetime)
368 ++ AC_CHECK_LIB(grass_gis,G_is_initialized,GRASS_SETTING=grass70+,GRASS_SETTING=no,-L$with_grass/${libdir} -lgrass_datetime)
369 + if test "$GRASS_SETTING" = "no" ; then
370 +- AC_CHECK_LIB(grass_gis,G_asprintf,GRASS_SETTING=grass57+,GRASS_SETTING=no,-L$with_grass/lib -lgrass_datetime)
371 ++ AC_CHECK_LIB(grass_gis,G_asprintf,GRASS_SETTING=grass57+,GRASS_SETTING=no,-L$with_grass/${libdir} -lgrass_datetime)
372 + fi
373 +
374 + if test "$GRASS_SETTING" != "no" ; then
375 + if test "$GRASS_SETTING" = "grass70+" ; then
376 + G_RASTLIBS="-lgrass_raster -lgrass_imagery"
377 + G_VECTLIBS="-lgrass_vector -lgrass_dig2 -lgrass_dgl -lgrass_rtree -lgrass_linkm -lgrass_dbmiclient -lgrass_dbmibase"
378 +- LIBS="-L$with_grass/lib $G_VECTLIBS $G_RASTLIBS -lgrass_gproj -lgrass_gmath -lgrass_gis -lgrass_datetime $LIBS"
379 ++ LIBS="-L$with_grass/${libdir} $G_VECTLIBS $G_RASTLIBS -lgrass_gproj -lgrass_gmath -lgrass_gis -lgrass_datetime $LIBS"
380 + else
381 + G_RASTLIBS="-lgrass_I"
382 + G_VECTLIBS="-lgrass_vect -lgrass_dig2 -lgrass_dgl -lgrass_rtree -lgrass_linkm -lgrass_dbmiclient -lgrass_dbmibase"
383 +- LIBS="-L$with_grass/lib $G_VECTLIBS $G_RASTLIBS -lgrass_gproj -lgrass_vask -lgrass_gmath -lgrass_gis -lgrass_datetime $LIBS"
384 ++ LIBS="-L$with_grass/${libdir} $G_VECTLIBS $G_RASTLIBS -lgrass_gproj -lgrass_vask -lgrass_gmath -lgrass_gis -lgrass_datetime $LIBS"
385 + fi
386 + GRASS_INCLUDE="-I$with_grass/include"
387 + GRASS_GISBASE="$with_grass"
388 +@@ -1956,10 +1926,10 @@ elif test "$with_libgrass" = "yes" -o "$with_libgrass" = "" ; then
389 +
390 + else
391 +
392 +- AC_CHECK_LIB(grass5,G_gisinit_2,GRASS_SETTING=libgrass,GRASS_SETTING=no,-L$with_libgrass/lib)
393 ++ AC_CHECK_LIB(grass5,G_gisinit_2,GRASS_SETTING=libgrass,GRASS_SETTING=no,-L$with_libgrass/${libdir})
394 +
395 + if test "$GRASS_SETTING" = "libgrass" ; then
396 +- LIBS="-L$with_libgrass -L$with_libgrass/lib -lgrass5 $LIBS"
397 ++ LIBS="-L$with_libgrass -L$with_libgrass/${libdir} -lgrass5 $LIBS"
398 + GRASS_INCLUDE="-I$with_libgrass -I$with_libgrass/include $EXTRA_INCLUDES"
399 + else
400 + AC_MSG_ERROR([--with-libgrass=$with_grass requested, but libgrass5 not found!])
401 +@@ -2006,7 +1976,7 @@ dnl Fedora has cfitsio headers in /usr/include/cfitsio
402 + else
403 +
404 + FITS_SETTING=external
405 +- LIBS="-L$with_cfitsio -L$with_cfitsio/lib -lcfitsio $LIBS"
406 ++ LIBS="-L$with_cfitsio -L$with_cfitsio/${libdir} -lcfitsio $LIBS"
407 + EXTRA_INCLUDES="-I$with_cfitsio -I$with_cfitsio/include $EXTRA_INCLUDES"
408 +
409 + echo "using libcfitsio from $with_cfitsio."
410 +@@ -2055,7 +2025,7 @@ elif test "$with_pcraster" = "internal" ; then
411 + else
412 +
413 + PCRASTER_SETTING=external
414 +- LIBS="-L$with_pcraster/lib -lcsf $LIBS"
415 ++ LIBS="-L$with_pcraster/${libdir} -lcsf $LIBS"
416 + EXTRA_INCLUDES="-I$with_pcraster/include $EXTRA_INCLUDES"
417 +
418 + echo "using libcsf from $with_pcraster."
419 +@@ -2106,7 +2076,7 @@ elif test "$with_png" = "internal" ; then
420 + else
421 +
422 + PNG_SETTING=external
423 +- LIBS="-L$with_png -L$with_png/lib -lpng $LIBS"
424 ++ LIBS="-L$with_png -L$with_png/${libdir} -lpng $LIBS"
425 + EXTRA_INCLUDES="-I$with_png -I$with_png/include $EXTRA_INCLUDES"
426 +
427 + echo "using libpng from $with_png."
428 +@@ -2141,7 +2111,7 @@ else
429 +
430 + DDS_SETTING=yes
431 + CRUNCHDIR="$with_dds"
432 +- LIBS="-L$with_dds/lib/ -lcrunch $LIBS"
433 ++ LIBS="-L$with_dds/${libdir}/ -lcrunch $LIBS"
434 + echo "using libcrunch from $with_dds."
435 +
436 + fi
437 +@@ -2179,7 +2149,7 @@ elif test "$with_gta" = "yes" -o "$with_gta" = "" ; then
438 + else
439 +
440 + GTA_SETTING=yes
441 +- LIBS="-L$with_gta -L$with_gta/lib -lgta $LIBS"
442 ++ LIBS="-L$with_gta -L$with_gta/${libdir} -lgta $LIBS"
443 + EXTRA_INCLUDES="-I$with_gta -I$with_gta/include $EXTRA_INCLUDES"
444 +
445 + echo "using libgta from $with_gta."
446 +@@ -2292,10 +2262,10 @@ else
447 +
448 + dnl We now require libgeotiff 1.5.0
449 + dnl first check if $with_geotiff/lib has the library:
450 +- AC_CHECK_LIB(geotiff,GTIFAttachPROJContext,GEOTIFF_SETTING=external,GEOTIFF_SETTING=not_found,-L$with_geotiff/lib)
451 ++ AC_CHECK_LIB(geotiff,GTIFAttachPROJContext,GEOTIFF_SETTING=external,GEOTIFF_SETTING=not_found,-L$with_geotiff/${libdir})
452 +
453 + if test $GEOTIFF_SETTING = "external" ; then
454 +- LIBS="-L$with_geotiff/lib -lgeotiff $LIBS"
455 ++ LIBS="-L$with_geotiff/${libdir} -lgeotiff $LIBS"
456 + if test -d $with_geotiff/include ; then
457 + EXTRA_INCLUDES="-I$with_geotiff/include $EXTRA_INCLUDES"
458 + fi
459 +@@ -2518,7 +2488,7 @@ elif test "$with_gif" = "internal" ; then
460 + else
461 +
462 + GIF_SETTING=external
463 +- LIBS="-L$with_gif -L$with_gif/lib -lgif $LIBS"
464 ++ LIBS="-L$with_gif -L$with_gif/${libdir} -lgif $LIBS"
465 + EXTRA_INCLUDES="-I$with_gif -I$with_gif/include $EXTRA_INCLUDES"
466 +
467 + echo "using libgif from $with_gif."
468 +@@ -2584,10 +2554,10 @@ elif test "$with_ogdi" = "yes" -o "$with_ogdi" = "" ; then
469 +
470 + else
471 +
472 +- AC_CHECK_LIB(ogdi,cln_GetLayerCapabilities,HAVE_OGDI=yes,HAVE_OGDI=no,-L$with_ogdi -L$with_ogdi/lib -logdi)
473 ++ AC_CHECK_LIB(ogdi,cln_GetLayerCapabilities,HAVE_OGDI=yes,HAVE_OGDI=no,-L$with_ogdi -L$with_ogdi/${libdir} -logdi)
474 + if test "$HAVE_OGDI" = "yes" ; then
475 + if test -f "$with_ogdi/ecs.h" -o -f "$with_ogdi/include/ecs.h"; then
476 +- LIBS="-L$with_ogdi -L$with_ogdi/lib -logdi $LIBS"
477 ++ LIBS="-L$with_ogdi -L$with_ogdi/${libdir} -logdi $LIBS"
478 + OGDI_INCLUDE="-I$with_ogdi -I$with_ogdi/include"
479 +
480 + echo "using libogdi from $with_ogdi."
481 +@@ -2597,10 +2567,10 @@ else
482 + fi
483 + else
484 + dnl For backward compatibility. Retry with ogdi31 as a name
485 +- AC_CHECK_LIB(ogdi31,cln_GetLayerCapabilities,HAVE_OGDI=yes,HAVE_OGDI=no,-L$with_ogdi -L$with_ogdi/lib -logdi31)
486 ++ AC_CHECK_LIB(ogdi31,cln_GetLayerCapabilities,HAVE_OGDI=yes,HAVE_OGDI=no,-L$with_ogdi -L$with_ogdi/${libdir} -logdi31)
487 + if test "$HAVE_OGDI" = "yes" ; then
488 + if test -f "$with_ogdi/ecs.h" -o -f "$with_ogdi/include/ecs.h"; then
489 +- LIBS="-L$with_ogdi -L$with_ogdi/lib -logdi31 $LIBS"
490 ++ LIBS="-L$with_ogdi -L$with_ogdi/${libdir} -logdi31 $LIBS"
491 + OGDI_INCLUDE="-I$with_ogdi -I$with_ogdi/include"
492 +
493 + echo "using libogdi31 from $with_ogdi."
494 +@@ -2718,10 +2688,10 @@ elif test "$with_sosi" = "yes" ; then
495 + rm -f testfyba
496 + else
497 +
498 +- AC_MSG_CHECKING([for libfyba.a, libfygm.a and libfyut.a in $with_sosi/lib])
499 +- if test -r $with_sosi/lib/libfyba.a -a -r $with_sosi/lib/libfygm.a -a -r $with_sosi/lib/libfyut.a ; then
500 ++ AC_MSG_CHECKING([for libfyba.a, libfygm.a and libfyut.a in $with_sosi/${libdir}])
501 ++ if test -r $with_sosi/${libdir}/libfyba.a -a -r $with_sosi/${libdir}/libfygm.a -a -r $with_sosi/${libdir}/libfyut.a ; then
502 + AC_MSG_RESULT([found.])
503 +- SOSI_LIB="$with_sosi/lib/libfyba.a $with_sosi/lib/libfygm.a $with_sosi/lib/libfyut.a"
504 ++ SOSI_LIB="$with_sosi/${libdir}/libfyba.a $with_sosi/${libdir}/libfygm.a $with_sosi/${libdir}/libfyut.a"
505 + SOSI_ENABLED=yes
506 + else
507 + AC_MSG_ERROR([not found.])
508 +@@ -2782,14 +2752,14 @@ else
509 + AC_ARG_WITH(boost-lib-path,
510 + [ --with-boost-lib-path=ARG Path to boost libraries for mongocxx client],,,)
511 +
512 +- AC_MSG_CHECKING([for libmongoclient.so in in $with_mongocxx/lib])
513 ++ AC_MSG_CHECKING([for libmongoclient.so in in $with_mongocxx/${libdir}])
514 + MONGODB_ENABLED=yes
515 +- if test -r $with_mongocxx/lib/libmongoclient.so; then
516 ++ if test -r $with_mongocxx/${libdir}/libmongoclient.so; then
517 + AC_MSG_RESULT([found.])
518 +- MONGODB_LIB="-L$with_mongocxx/lib -lmongoclient"
519 +- elif test -r $with_mongocxx/lib/libmongoclient.dylib; then
520 ++ MONGODB_LIB="-L$with_mongocxx/${libdir} -lmongoclient"
521 ++ elif test -r $with_mongocxx/${libdir}/libmongoclient.dylib; then
522 + AC_MSG_RESULT([found.])
523 +- MONGODB_LIB="-L$with_mongocxx/lib -lmongoclient"
524 ++ MONGODB_LIB="-L$with_mongocxx/${libdir} -lmongoclient"
525 + else
526 + AC_MSG_ERROR([not found.])
527 + fi
528 +@@ -4770,8 +4740,8 @@ if test "$with_libjson_c" = "external" -o "$with_libjson_c" = "" -o "$with_libjs
529 + elif test "$with_libjson_c" = "internal" ; then
530 + LIBJSONC_SETTING=internal
531 + elif test "$with_libjson_c" != "no"; then
532 +- LIBS="-L$with_libjson_c/lib $LIBS"
533 +- AC_CHECK_LIB(json-c,json_object_set_serializer,LIBJSONC_SETTING=external,LIBJSONC_SETTING=internal,-L$with_libjson_c/lib)
534 ++ LIBS="-L$with_libjson_c/${libdir} $LIBS"
535 ++ AC_CHECK_LIB(json-c,json_object_set_serializer,LIBJSONC_SETTING=external,LIBJSONC_SETTING=internal,-L$with_libjson_c/${libdir})
536 + else
537 + AC_MSG_ERROR([libjson-c (internal or external) is required])
538 + fi
539 +--- a/frmts/grass/pkg/configure.in
540 ++++ b/frmts/grass/pkg/configure.in
541 +@@ -99,7 +99,7 @@ else
542 + if $GDAL_CONFIG --autoload > /dev/null 2>&1 ; then
543 + AUTOLOAD_DIR=`$GDAL_CONFIG --autoload`
544 + else
545 +- AUTOLOAD_DIR=`$GDAL_CONFIG --prefix`/lib/gdalplugins
546 ++ AUTOLOAD_DIR=`$GDAL_CONFIG --prefix`/${libdir}/gdalplugins
547 + fi
548 + fi
549 +
550 +@@ -123,11 +123,11 @@ fi
551 +
552 + if test "$with_grass" != "yes" ; then
553 +
554 +- AC_CHECK_LIB(grass_gis,G_read_compressed,GRASS_SETTING=grass72+,GRASS_SETTING=no,-L$with_grass/lib -lgrass_datetime)
555 ++ AC_CHECK_LIB(grass_gis,G_read_compressed,GRASS_SETTING=grass72+,GRASS_SETTING=no,-L$with_grass/${libdir} -lgrass_datetime)
556 + if test "$GRASS_SETTING" = "no" ; then
557 +- AC_CHECK_LIB(grass_gis,G_is_initialized,GRASS_SETTING=grass70+,GRASS_SETTING=no,-L$with_grass/lib -lgrass_datetime)
558 ++ AC_CHECK_LIB(grass_gis,G_is_initialized,GRASS_SETTING=grass70+,GRASS_SETTING=no,-L$with_grass/${libdir} -lgrass_datetime)
559 + if test "$GRASS_SETTING" = "no" ; then
560 +- AC_CHECK_LIB(grass_gis,G_asprintf,GRASS_SETTING=grass57+,GRASS_SETTING=no,-L$with_grass/lib -lgrass_datetime)
561 ++ AC_CHECK_LIB(grass_gis,G_asprintf,GRASS_SETTING=grass57+,GRASS_SETTING=no,-L$with_grass/${libdir} -lgrass_datetime)
562 + fi
563 + fi
564 +
565 +@@ -135,15 +135,15 @@ if test "$with_grass" != "yes" ; then
566 + if test "$GRASS_SETTING" = "grass72+" ; then
567 + G_RASTLIBS="-lgrass_raster -lgrass_imagery"
568 + G_VECTLIBS="-lgrass_vector -lgrass_dig2 -lgrass_dgl -lgrass_rtree -lgrass_linkm -lgrass_dbmiclient -lgrass_dbmibase"
569 +- LIBS="-L$with_grass/lib $G_VECTLIBS $G_RASTLIBS -lgrass_gproj -lgrass_gmath -lgrass_gis -lgrass_datetime -lgrass_btree2 -lgrass_ccmath $LIBS"
570 ++ LIBS="-L$with_grass/${libdir} $G_VECTLIBS $G_RASTLIBS -lgrass_gproj -lgrass_gmath -lgrass_gis -lgrass_datetime -lgrass_btree2 -lgrass_ccmath $LIBS"
571 + elif test "$GRASS_SETTING" = "grass70+" ; then
572 + G_RASTLIBS="-lgrass_raster -lgrass_imagery"
573 + G_VECTLIBS="-lgrass_vector -lgrass_dig2 -lgrass_dgl -lgrass_rtree -lgrass_linkm -lgrass_dbmiclient -lgrass_dbmibase"
574 +- LIBS="-L$with_grass/lib $G_VECTLIBS $G_RASTLIBS -lgrass_gproj -lgrass_gmath -lgrass_gis -lgrass_datetime $LIBS"
575 ++ LIBS="-L$with_grass/${libdir} $G_VECTLIBS $G_RASTLIBS -lgrass_gproj -lgrass_gmath -lgrass_gis -lgrass_datetime $LIBS"
576 + else
577 + G_RASTLIBS="-lgrass_I"
578 + G_VECTLIBS="-lgrass_vect -lgrass_dig2 -lgrass_dgl -lgrass_rtree -lgrass_linkm -lgrass_dbmiclient -lgrass_dbmibase"
579 +- LIBS="-L$with_grass/lib $G_VECTLIBS $G_RASTLIBS -lgrass_gproj -lgrass_vask -lgrass_gmath -lgrass_gis -lgrass_datetime $LIBS"
580 ++ LIBS="-L$with_grass/${libdir} $G_VECTLIBS $G_RASTLIBS -lgrass_gproj -lgrass_vask -lgrass_gmath -lgrass_gis -lgrass_datetime $LIBS"
581 + fi
582 + GRASS_INCLUDE="-I$with_grass/include"
583 + GRASS_GISBASE="$with_grass"
584 +--- a/m4/ax_lib_expat.m4
585 ++++ b/m4/ax_lib_expat.m4
586 +@@ -119,9 +119,9 @@ AC_DEFUN([AX_LIB_EXPAT],
587 + expat_lib_flags="-lexpat"
588 + fi
589 + else
590 +- AC_CHECK_LIB(expat,XML_ParserCreate,run_expat_test="yes",run_expat_test="no",-L$expat_prefix/lib)
591 ++ AC_CHECK_LIB(expat,XML_ParserCreate,run_expat_test="yes",run_expat_test="no",-L$expat_prefix/${libdir})
592 + if test "$run_expat_test" = "yes"; then
593 +- expat_lib_flags="-L$expat_prefix/lib -lexpat"
594 ++ expat_lib_flags="-L$expat_prefix/${libdir} -lexpat"
595 + fi
596 + fi
597 + fi
598 +--- a/m4/ax_lib_libkml.m4
599 ++++ b/m4/ax_lib_libkml.m4
600 +@@ -172,7 +172,7 @@ kmldom::KmlFactory* factory = kmldom::KmlFactory::GetFactory();
601 + if test "$libkml_prefix" = "/usr"; then
602 + libkml_lib_flags="-lkmldom -lkmlbase -lkmlengine -lkmlconvenience -lminizip -luriparser"
603 + else
604 +- libkml_lib_flags="-L$libkml_prefix/lib -lkmldom -lkmlbase -lkmlengine -lkmlconvenience -lminizip -luriparser"
605 ++ libkml_lib_flags="-L$libkml_prefix/${libdir} -lkmldom -lkmlbase -lkmlengine -lkmlconvenience -lminizip -luriparser"
606 + fi
607 + run_libkml_test="yes"
608 + elif test "$libkml_requested" = "yes"; then
609 +--- a/m4/ax_lib_xerces.m4
610 ++++ b/m4/ax_lib_xerces.m4
611 +@@ -100,7 +100,7 @@ AC_DEFUN([AX_LIB_XERCES],
612 + if test "$xerces_prefix" = "/usr"; then
613 + xerces_lib_flags="-lxerces-c -lpthread"
614 + else
615 +- xerces_lib_flags="-L$xerces_prefix/lib -lxerces-c -lpthread"
616 ++ xerces_lib_flags="-L$xerces_prefix/${libdir} -lxerces-c -lpthread"
617 + fi
618 + run_xerces_test="yes"
619 + elif test "$xerces_requested" = "yes"; then
620
621 diff --git a/sci-libs/gdal/gdal-3.3.0.ebuild b/sci-libs/gdal/gdal-3.3.0.ebuild
622 new file mode 100644
623 index 00000000000..5283d9b8188
624 --- /dev/null
625 +++ b/sci-libs/gdal/gdal-3.3.0.ebuild
626 @@ -0,0 +1,317 @@
627 +# Copyright 1999-2021 Gentoo Authors
628 +# Distributed under the terms of the GNU General Public License v2
629 +
630 +EAPI=7
631 +
632 +GENTOO_DEPEND_ON_PERL="no"
633 +PYTHON_COMPAT=( python3_{7,8,9} )
634 +DISTUTILS_OPTIONAL=1
635 +inherit autotools bash-completion-r1 distutils-r1 flag-o-matic java-pkg-opt-2 perl-module toolchain-funcs
636 +
637 +DESCRIPTION="Translator library for raster geospatial data formats (includes OGR support)"
638 +HOMEPAGE="https://gdal.org/"
639 +SRC_URI="https://download.osgeo.org/${PN}/${PV}/${P}.tar.gz"
640 +
641 +SLOT="0/3.3"
642 +LICENSE="BSD Info-ZIP MIT"
643 +KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
644 +IUSE="armadillo +aux-xml curl cpu_flags_x86_avx cpu_flags_x86_sse cpu_flags_x86_ssse3 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"
645 +
646 +REQUIRED_USE="
647 + mdb? ( java )
648 + python? ( ${PYTHON_REQUIRED_USE} )
649 + spatialite? ( sqlite )
650 +"
651 +
652 +BDEPEND="
653 + virtual/pkgconfig
654 + doc? ( app-doc/doxygen )
655 + java? (
656 + dev-java/ant-core
657 + dev-lang/swig:0
658 + >=virtual/jdk-1.8:*
659 + )
660 + perl? ( dev-lang/swig:0 )
661 + python? (
662 + dev-lang/swig:0
663 + dev-python/setuptools[${PYTHON_USEDEP}]
664 + )
665 +"
666 +DEPEND="
667 + dev-libs/expat
668 + dev-libs/json-c:=
669 + dev-libs/libpcre
670 + dev-libs/libxml2:2
671 + dev-libs/openssl:=
672 + media-libs/tiff
673 + >=sci-libs/libgeotiff-1.5.1-r1:=
674 + >=sci-libs/proj-6.0.0:=
675 + sys-libs/zlib[minizip(+)]
676 + armadillo? ( sci-libs/armadillo:=[lapack] )
677 + curl? ( net-misc/curl )
678 + fits? ( sci-libs/cfitsio:= )
679 + geos? ( >=sci-libs/geos-3.8.0 )
680 + gif? ( media-libs/giflib:= )
681 + gml? ( >=dev-libs/xerces-c-3.1 )
682 + hdf5? ( >=sci-libs/hdf5-1.6.4:=[szip] )
683 + jpeg? ( virtual/jpeg:0= )
684 + jpeg2k? ( media-libs/openjpeg:2= )
685 + lzma? ( || (
686 + app-arch/xz-utils
687 + app-arch/lzma
688 + ) )
689 + mdb? ( dev-java/jackcess:1 )
690 + mysql? ( virtual/mysql )
691 + netcdf? ( sci-libs/netcdf:= )
692 + odbc? ( dev-db/unixODBC )
693 + ogdi? ( sci-libs/ogdi )
694 + opencl? ( virtual/opencl )
695 + oracle? ( dev-db/oracle-instantclient:= )
696 + pdf? ( app-text/poppler:= )
697 + perl? ( dev-lang/perl:= )
698 + png? ( media-libs/libpng:0= )
699 + postgres? ( >=dev-db/postgresql-8.4:= )
700 + python? (
701 + ${PYTHON_DEPS}
702 + dev-python/numpy[${PYTHON_USEDEP}]
703 + )
704 + spatialite? ( dev-db/spatialite )
705 + sqlite? ( dev-db/sqlite:3 )
706 + webp? ( media-libs/libwebp:= )
707 + xls? ( dev-libs/freexl )
708 + zstd? ( app-arch/zstd:= )
709 +"
710 +RDEPEND="${DEPEND}
711 + java? ( >=virtual/jre-1.8:* )
712 +"
713 +
714 +PATCHES=(
715 + "${FILESDIR}/${PN}-2.2.3-soname.patch"
716 + "${FILESDIR}/${PN}-2.3.0-curl.patch" # bug 659840
717 + "${FILESDIR}/${PN}-3.3.0-libdir.patch"
718 + "${FILESDIR}/${PN}-3.3.0-configure-geos-disable.patch"
719 +)
720 +
721 +src_prepare() {
722 + default
723 +
724 + # Drop a --prefix hack in the upstream build system
725 + # We don't want the line at all, so let's just drop it rather than
726 + # trying to put in the right libdir value.
727 + # bug #696106
728 + sed -e '/\$ADD_PREFIX\/lib/d' \
729 + -i configure.ac || die
730 +
731 + sed -e "s: /usr/: \"${EPREFIX}\"/usr/:g" \
732 + -i configure.ac || die
733 +
734 + sed -e 's:^ar:$(AR):g' \
735 + -i ogr/ogrsf_frmts/sdts/install-libs.sh || die
736 +
737 + # SWIG: Use of the include path to find the input file is deprecated and will not work with ccache.
738 + sed -e "s: gdal_array.i: ../include/gdal_array.i:" \
739 + -i swig/python/GNUmakefile || die "sed python makefile failed"
740 +
741 + # autoconf 2.70+
742 + # bug #775209
743 + config_rpath_update .
744 +
745 + eautoreconf
746 +}
747 +
748 +src_configure() {
749 + local myconf=(
750 + # charls - not packaged in Gentoo ebuild repository
751 + # kakadu, mrsid jp2mrsid - another jpeg2k stuff, ignore
752 + # bsb - legal issues
753 + # ingres - same story as oracle oci
754 + # jasper - disabled because unmaintained and vulnerable; openjpeg will be used as JPEG-2000 provider instead
755 + # podofo - we use poppler instead they are exclusive for each other
756 + # tiff is a hard dep
757 + --includedir="${EPREFIX}"/usr/include/${PN}
758 + --disable-lto
759 + --disable-static
760 + --disable-driver-bsb
761 + --disable-driver-mrf
762 + --disable-pdf-plugin
763 + --enable-shared
764 + --enable-driver-grib
765 + --with-bash-completion="$(get_bashcompdir)"
766 + --with-cpp14
767 + --with-crypto
768 + --with-cryptopp=no
769 + --with-expat
770 + --with-geotiff
771 + --with-gnm
772 + --with-hide-internal-symbols
773 + --with-libjson-c="${EPREFIX}"/usr
774 + --with-libtiff
775 + --with-libtool
776 + --with-libz="${EPREFIX}"/usr
777 + --without-charls
778 + --without-dods-root
779 + --without-ecw
780 + --without-epsilon
781 + --without-fgdb
782 + --without-fme
783 + --without-gta
784 + --without-grass
785 + --without-hdf4
786 + --without-idb
787 + --without-ingres
788 + --without-jasper
789 + --without-jp2lura
790 + --without-jp2mrsid
791 + --without-kakadu
792 + --without-kea
793 + --without-libkml
794 + --without-mongocxx
795 + --without-mrsid
796 + --without-mrsid_lidar
797 + --without-msg
798 + --without-rasdaman
799 + --without-rasterlite2
800 + --without-pcraster
801 + --without-pdfium
802 + --without-perl
803 + --without-podofo
804 + --without-python
805 + --without-qhull
806 + --without-sfcgal
807 + --without-sosi
808 + --without-teigha
809 + $(use_enable debug)
810 + $(use_with armadillo)
811 + $(use_with aux-xml pam)
812 + $(use_with curl)
813 + $(use_with cpu_flags_x86_avx avx)
814 + $(use_with cpu_flags_x86_sse sse)
815 + $(use_with cpu_flags_x86_ssse3 ssse3)
816 + $(use_with fits cfitsio)
817 + $(use_with geos)
818 + $(use_with gif)
819 + $(use_with gml xerces)
820 + $(use_with hdf5)
821 + $(use_with jpeg pcidsk) # pcidsk is internal, because there is no such library released developer by gdal
822 + $(use_with jpeg)
823 + $(use_with jpeg2k openjpeg)
824 + $(use_with lzma liblzma)
825 + $(use_with mysql mysql "${EPREFIX}"/usr/bin/mysql_config)
826 + $(use_with netcdf)
827 + $(use_with oracle oci)
828 + $(use_with odbc)
829 + $(use_with ogdi ogdi "${EPREFIX}"/usr)
830 + $(use_with opencl)
831 + $(use_with pdf poppler)
832 + $(use_with png)
833 + $(use_with postgres pg)
834 + $(use_with spatialite)
835 + $(use_with sqlite sqlite3 "${EPREFIX}"/usr)
836 + $(use_with threads)
837 + $(use_with webp)
838 + $(use_with xls freexl)
839 + $(use_with zstd)
840 + )
841 +
842 + tc-export AR RANLIB
843 +
844 + if use java; then
845 + myconf+=(
846 + --with-java=$(java-config --jdk-home 2>/dev/null)
847 + --with-jvm-lib=dlopen
848 + $(use_with mdb)
849 + )
850 + else
851 + myconf+=( --without-java --without-mdb )
852 + fi
853 +
854 + if use sqlite; then
855 + append-libs -lsqlite3
856 + fi
857 +
858 + # bug #632660
859 + if use ogdi; then
860 + append-cflags $($(tc-getPKG_CONFIG) --cflags libtirpc)
861 + append-cxxflags $($(tc-getPKG_CONFIG) --cflags libtirpc)
862 + fi
863 +
864 + ECONF_SOURCE="${S}" econf "${myconf[@]}"
865 +
866 + # mysql-config puts this in (and boy is it a PITA to get it out)
867 + if use mysql; then
868 + sed -e "s: -rdynamic : :" \
869 + -i GDALmake.opt || die "sed LIBS failed"
870 + fi
871 +}
872 +
873 +src_compile() {
874 + if use perl; then
875 + rm "${S}"/swig/perl/*_wrap.cpp || die
876 + emake -C "${S}"/swig/perl generate
877 + fi
878 +
879 + # gdal-config needed before generating Python bindings
880 + default
881 +
882 + if use java; then
883 + pushd "${S}"/swig/java > /dev/null || die
884 + emake
885 + popd > /dev/null || die
886 + fi
887 +
888 + if use perl; then
889 + pushd "${S}"/swig/perl > /dev/null || die
890 + perl-module_src_configure
891 + perl-module_src_compile
892 + popd > /dev/null || die
893 + fi
894 +
895 + if use python; then
896 + rm -f "${S}"/swig/python/*_wrap.cpp || die
897 + emake -C "${S}"/swig/python generate
898 + pushd "${S}"/swig/python > /dev/null || die
899 + distutils-r1_src_compile
900 + popd > /dev/null || die
901 + fi
902 +
903 + use doc && emake docs
904 +}
905 +
906 +src_install() {
907 + local DOCS=( NEWS )
908 + use doc && local HTML_DOCS=( html/. )
909 +
910 + default
911 +
912 + use java && java-pkg_dojar "${S}"/swig/java/gdal.jar
913 +
914 + if use perl; then
915 + pushd "${S}"/swig/perl > /dev/null || die
916 + myinst=( DESTDIR="${D}" )
917 + perl-module_src_install
918 + popd > /dev/null || die
919 + perl_delete_localpod
920 + fi
921 +
922 + if use python; then
923 + # Don't clash with gdal's docs
924 + unset DOCS HTML_DOCS
925 +
926 + pushd "${S}"/swig/python > /dev/null || die
927 + distutils-r1_src_install
928 + popd > /dev/null || die
929 +
930 + newdoc swig/python/README.rst README-python.rst
931 +
932 + insinto /usr/share/${PN}/samples
933 + doins -r swig/python/samples/.
934 + fi
935 +
936 + doman "${S}"/man/man*/*
937 + find "${ED}" -name '*.la' -type f -delete || die
938 +}
939 +
940 +pkg_postinst() {
941 + elog "Check available image and data formats after building with"
942 + elog "gdalinfo and ogrinfo (using the --formats switch)."
943 +}