1 |
commit: 8104c0b3dbc11e0de61d5ecc4892213f13486781 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue May 4 20:05:45 2021 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue May 4 21:25:20 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8104c0b3 |
7 |
|
8 |
sci-libs/gdal: add 3.2.3 |
9 |
|
10 |
No 3.3.0 yet because needs a GEOS patch. |
11 |
|
12 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
13 |
|
14 |
sci-libs/gdal/Manifest | 1 + |
15 |
sci-libs/gdal/gdal-3.2.3.ebuild | 316 ++++++++++++++++++++++++++++++++++++++++ |
16 |
2 files changed, 317 insertions(+) |
17 |
|
18 |
diff --git a/sci-libs/gdal/Manifest b/sci-libs/gdal/Manifest |
19 |
index 53ccd6cf0a4..e23b24d8734 100644 |
20 |
--- a/sci-libs/gdal/Manifest |
21 |
+++ b/sci-libs/gdal/Manifest |
22 |
@@ -1,2 +1,3 @@ |
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 |
|
27 |
diff --git a/sci-libs/gdal/gdal-3.2.3.ebuild b/sci-libs/gdal/gdal-3.2.3.ebuild |
28 |
new file mode 100644 |
29 |
index 00000000000..8f640dc7591 |
30 |
--- /dev/null |
31 |
+++ b/sci-libs/gdal/gdal-3.2.3.ebuild |
32 |
@@ -0,0 +1,316 @@ |
33 |
+# Copyright 1999-2021 Gentoo Authors |
34 |
+# Distributed under the terms of the GNU General Public License v2 |
35 |
+ |
36 |
+EAPI=7 |
37 |
+ |
38 |
+GENTOO_DEPEND_ON_PERL="no" |
39 |
+PYTHON_COMPAT=( python3_{7,8,9} ) |
40 |
+DISTUTILS_OPTIONAL=1 |
41 |
+inherit autotools bash-completion-r1 distutils-r1 flag-o-matic java-pkg-opt-2 perl-module toolchain-funcs |
42 |
+ |
43 |
+DESCRIPTION="Translator library for raster geospatial data formats (includes OGR support)" |
44 |
+HOMEPAGE="https://gdal.org/" |
45 |
+SRC_URI="https://download.osgeo.org/${PN}/${PV}/${P}.tar.gz" |
46 |
+ |
47 |
+SLOT="0/3.2" |
48 |
+LICENSE="BSD Info-ZIP MIT" |
49 |
+KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos" |
50 |
+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" |
51 |
+ |
52 |
+REQUIRED_USE=" |
53 |
+ mdb? ( java ) |
54 |
+ python? ( ${PYTHON_REQUIRED_USE} ) |
55 |
+ spatialite? ( sqlite ) |
56 |
+" |
57 |
+ |
58 |
+BDEPEND=" |
59 |
+ virtual/pkgconfig |
60 |
+ doc? ( app-doc/doxygen ) |
61 |
+ java? ( |
62 |
+ dev-java/ant-core |
63 |
+ dev-lang/swig:0 |
64 |
+ >=virtual/jdk-1.8:* |
65 |
+ ) |
66 |
+ perl? ( dev-lang/swig:0 ) |
67 |
+ python? ( |
68 |
+ dev-lang/swig:0 |
69 |
+ dev-python/setuptools[${PYTHON_USEDEP}] |
70 |
+ ) |
71 |
+" |
72 |
+DEPEND=" |
73 |
+ dev-libs/expat |
74 |
+ dev-libs/json-c:= |
75 |
+ dev-libs/libpcre |
76 |
+ dev-libs/libxml2:2 |
77 |
+ dev-libs/openssl:= |
78 |
+ media-libs/tiff |
79 |
+ >=sci-libs/libgeotiff-1.5.1-r1:= |
80 |
+ >=sci-libs/proj-6.0.0:= |
81 |
+ sys-libs/zlib[minizip(+)] |
82 |
+ armadillo? ( sci-libs/armadillo:=[lapack] ) |
83 |
+ curl? ( net-misc/curl ) |
84 |
+ fits? ( sci-libs/cfitsio:= ) |
85 |
+ geos? ( >=sci-libs/geos-3.8.0 ) |
86 |
+ gif? ( media-libs/giflib:= ) |
87 |
+ gml? ( >=dev-libs/xerces-c-3.1 ) |
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.2.1-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-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-rasdaman |
204 |
+ --without-rasterlite2 |
205 |
+ --without-pcraster |
206 |
+ --without-pdfium |
207 |
+ --without-perl |
208 |
+ --without-podofo |
209 |
+ --without-python |
210 |
+ --without-qhull |
211 |
+ --without-sfcgal |
212 |
+ --without-sosi |
213 |
+ --without-teigha |
214 |
+ $(use_enable debug) |
215 |
+ $(use_with armadillo) |
216 |
+ $(use_with aux-xml pam) |
217 |
+ $(use_with curl) |
218 |
+ $(use_with cpu_flags_x86_avx avx) |
219 |
+ $(use_with cpu_flags_x86_sse sse) |
220 |
+ $(use_with cpu_flags_x86_ssse3 ssse3) |
221 |
+ $(use_with fits cfitsio) |
222 |
+ $(use_with geos) |
223 |
+ $(use_with gif) |
224 |
+ $(use_with gml xerces) |
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 |
+ use java && java-pkg_dojar "${S}"/swig/java/gdal.jar |
318 |
+ |
319 |
+ if use perl; then |
320 |
+ pushd "${S}"/swig/perl > /dev/null || die |
321 |
+ myinst=( DESTDIR="${D}" ) |
322 |
+ perl-module_src_install |
323 |
+ popd > /dev/null || die |
324 |
+ perl_delete_localpod |
325 |
+ fi |
326 |
+ |
327 |
+ if use python; then |
328 |
+ # Don't clash with gdal's docs |
329 |
+ unset DOCS HTML_DOCS |
330 |
+ |
331 |
+ pushd "${S}"/swig/python > /dev/null || die |
332 |
+ distutils-r1_src_install |
333 |
+ popd > /dev/null || die |
334 |
+ |
335 |
+ newdoc swig/python/README.rst README-python.rst |
336 |
+ |
337 |
+ insinto /usr/share/${PN}/samples |
338 |
+ doins -r swig/python/samples/. |
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 |
+} |