1 | # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 |
---|
2 | |
---|
3 | PortSystem 1.0 |
---|
4 | PortGroup active_variants 1.1 |
---|
5 | PortGroup cmake 1.1 |
---|
6 | PortGroup compiler_blacklist_versions 1.0 |
---|
7 | PortGroup legacysupport 1.0 |
---|
8 | PortGroup muniversal 1.0 |
---|
9 | |
---|
10 | name gdal |
---|
11 | version 3.8.0 |
---|
12 | revision 1 |
---|
13 | |
---|
14 | checksums rmd160 21ca0198e5fa72efdb535118ab7ffa141b9671ce \ |
---|
15 | sha256 ec0f78d9dc32352aeac6edc9c3b27a991b91f9dc6f92c452207d84431c58757d \ |
---|
16 | size 8853728 |
---|
17 | |
---|
18 | categories gis |
---|
19 | license MIT BSD |
---|
20 | maintainers {vince @Veence} {yahoo.com:n_larsson @nilason} openmaintainer |
---|
21 | |
---|
22 | description GDAL - Geospatial Data Abstraction Library |
---|
23 | long_description GDAL is a translator library for raster and vector \ |
---|
24 | geospatial data formats that is released under an MIT \ |
---|
25 | style Open Source License by the Open Source Geospatial \ |
---|
26 | Foundation. As a library, it presents a single raster \ |
---|
27 | abstract data model and single vector abstract data model \ |
---|
28 | to the calling application for all supported formats. It \ |
---|
29 | also comes with a variety of useful command line utilities \ |
---|
30 | for data translation and processing |
---|
31 | |
---|
32 | homepage https://www.gdal.org/ |
---|
33 | master_sites https://download.osgeo.org/gdal/${version} |
---|
34 | use_xz yes |
---|
35 | |
---|
36 | patchfiles-append patch-have_shared_mutex.diff |
---|
37 | |
---|
38 | # error: call to 'abs' is ambiguous |
---|
39 | compiler.blacklist-append {clang < 900} |
---|
40 | |
---|
41 | compiler.cxx_standard 2014 |
---|
42 | cmake.set_cxx_standard yes |
---|
43 | |
---|
44 | # See https://trac.macports.org/ticket/56908 |
---|
45 | compiler.thread_local_storage yes |
---|
46 | |
---|
47 | configure.optflags -DGDAL_COMPILATION |
---|
48 | |
---|
49 | depends_build-append \ |
---|
50 | port:bash-completion \ |
---|
51 | port:pkgconfig |
---|
52 | |
---|
53 | depends_lib-append \ |
---|
54 | port:blosc \ |
---|
55 | port:brunsli \ |
---|
56 | port:charls \ |
---|
57 | port:curl \ |
---|
58 | port:expat \ |
---|
59 | port:giflib \ |
---|
60 | path:include/turbojpeg.h:libjpeg-turbo \ |
---|
61 | port:lerc \ |
---|
62 | port:libaec \ |
---|
63 | port:libdeflate \ |
---|
64 | port:libpng \ |
---|
65 | port:libxml2 \ |
---|
66 | port:lz4 \ |
---|
67 | path:lib/libssl.dylib:openssl \ |
---|
68 | port:pcre2 \ |
---|
69 | port:qhull \ |
---|
70 | port:spatialite \ |
---|
71 | port:sqlite3 \ |
---|
72 | port:webp \ |
---|
73 | port:zlib \ |
---|
74 | port:zstd |
---|
75 | |
---|
76 | # By default, disable all drivers |
---|
77 | configure.args-append \ |
---|
78 | -DGDAL_BUILD_OPTIONAL_DRIVERS=OFF \ |
---|
79 | -DOGR_BUILD_OPTIONAL_DRIVERS=OFF \ |
---|
80 | -DGDAL_ENABLE_PLUGINS=ON \ |
---|
81 | -DGDAL_USE_EXTERNAL_LIBS=ON |
---|
82 | |
---|
83 | # Enable all built-in raster drivers |
---|
84 | configure.args-append \ |
---|
85 | -DGDAL_ENABLE_DRIVER_AAIGRID=ON \ |
---|
86 | -DGDAL_ENABLE_DRIVER_ADRG=ON \ |
---|
87 | -DGDAL_ENABLE_DRIVER_AIGRID=ON \ |
---|
88 | -DGDAL_ENABLE_DRIVER_AIRSAR=ON \ |
---|
89 | -DGDAL_ENABLE_DRIVER_ARG=ON \ |
---|
90 | -DGDAL_ENABLE_DRIVER_BLX=ON \ |
---|
91 | -DGDAL_ENABLE_DRIVER_BMP=ON \ |
---|
92 | -DGDAL_ENABLE_DRIVER_BSB=ON \ |
---|
93 | -DGDAL_ENABLE_DRIVER_CALS=ON \ |
---|
94 | -DGDAL_ENABLE_DRIVER_CEOS=ON \ |
---|
95 | -DGDAL_ENABLE_DRIVER_COASP=ON \ |
---|
96 | -DGDAL_ENABLE_DRIVER_COSAR=ON \ |
---|
97 | -DGDAL_ENABLE_DRIVER_CTG=ON \ |
---|
98 | -DGDAL_ENABLE_DRIVER_DIMAP=ON \ |
---|
99 | -DGDAL_ENABLE_DRIVER_DTED=ON \ |
---|
100 | -DGDAL_ENABLE_DRIVER_ELAS=ON \ |
---|
101 | -DGDAL_ENABLE_DRIVER_ERS=ON \ |
---|
102 | -DGDAL_ENABLE_DRIVER_ENVISAT=ON \ |
---|
103 | -DGDAL_ENABLE_DRIVER_ESRIC=ON \ |
---|
104 | -DGDAL_ENABLE_DRIVER_FIT=ON \ |
---|
105 | -DGDAL_ENABLE_DRIVER_GFF=ON \ |
---|
106 | -DGDAL_ENABLE_DRIVER_GIF=ON \ |
---|
107 | -DGDAL_ENABLE_DRIVER_GRIB=ON \ |
---|
108 | -DGDAL_ENABLE_DRIVER_GSG=ON \ |
---|
109 | -DGDAL_ENABLE_DRIVER_GXF=ON \ |
---|
110 | -DGDAL_ENABLE_DRIVER_HF2=ON \ |
---|
111 | -DGDAL_ENABLE_DRIVER_IDRISI=ON \ |
---|
112 | -DGDAL_ENABLE_DRIVER_ILWIS=ON \ |
---|
113 | -DGDAL_ENABLE_DRIVER_IRIS=ON \ |
---|
114 | -DGDAL_ENABLE_DRIVER_JAXAPALSAR=ON \ |
---|
115 | -DGDAL_ENABLE_DRIVER_JDEM=ON \ |
---|
116 | -DGDAL_ENABLE_DRIVER_JPEG=ON \ |
---|
117 | -DGDAL_ENABLE_DRIVER_KMLSUPEROVERLAY=ON \ |
---|
118 | -DGDAL_ENABLE_DRIVER_L1B=ON \ |
---|
119 | -DGDAL_ENABLE_DRIVER_LEVELLER=ON \ |
---|
120 | -DGDAL_ENABLE_DRIVER_MAP=ON \ |
---|
121 | -DGDAL_ENABLE_DRIVER_MRF=ON \ |
---|
122 | -DGDAL_ENABLE_DRIVER_MSGN=ON \ |
---|
123 | -DGDAL_ENABLE_DRIVER_NGSGEOID=ON \ |
---|
124 | -DGDAL_ENABLE_DRIVER_NITF=ON \ |
---|
125 | -DGDAL_ENABLE_DRIVER_NORTHWOOD=ON \ |
---|
126 | -DGDAL_ENABLE_DRIVER_OZI=ON \ |
---|
127 | -DGDAL_ENABLE_DRIVER_PCIDSK=ON \ |
---|
128 | -DGDAL_ENABLE_DRIVER_PDS=ON \ |
---|
129 | -DGDAL_ENABLE_DRIVER_PNG=ON \ |
---|
130 | -DGDAL_ENABLE_DRIVER_PRF=ON \ |
---|
131 | -DGDAL_ENABLE_DRIVER_R=ON \ |
---|
132 | -DGDAL_ENABLE_DRIVER_RAW=ON \ |
---|
133 | -DGDAL_ENABLE_DRIVER_RMF=ON \ |
---|
134 | -DGDAL_ENABLE_DRIVER_RS2=ON \ |
---|
135 | -DGDAL_ENABLE_DRIVER_SAFE=ON \ |
---|
136 | -DGDAL_ENABLE_DRIVER_SAGA=ON \ |
---|
137 | -DGDAL_ENABLE_DRIVER_SAR_CEOS=ON \ |
---|
138 | -DGDAL_ENABLE_DRIVER_SDTS=ON \ |
---|
139 | -DGDAL_ENABLE_DRIVER_SENTINEL2=ON \ |
---|
140 | -DGDAL_ENABLE_DRIVER_SGI=ON \ |
---|
141 | -DGDAL_ENABLE_DRIVER_SIGDEM=ON \ |
---|
142 | -DGDAL_ENABLE_DRIVER_SRTMHGT=ON \ |
---|
143 | -DGDAL_ENABLE_DRIVER_STACIT=ON \ |
---|
144 | -DGDAL_ENABLE_DRIVER_STACTA=ON \ |
---|
145 | -DGDAL_ENABLE_DRIVER_TERRAGEN=ON \ |
---|
146 | -DGDAL_ENABLE_DRIVER_TGA=ON \ |
---|
147 | -DGDAL_ENABLE_DRIVER_TIL=ON \ |
---|
148 | -DGDAL_ENABLE_DRIVER_TSX=ON \ |
---|
149 | -DGDAL_ENABLE_DRIVER_USGSDEM=ON \ |
---|
150 | -DGDAL_ENABLE_DRIVER_XPM=ON \ |
---|
151 | -DGDAL_ENABLE_DRIVER_XYZ=ON \ |
---|
152 | -DGDAL_ENABLE_DRIVER_ZARR=ON \ |
---|
153 | -DGDAL_ENABLE_DRIVER_ZMAP=ON |
---|
154 | |
---|
155 | # Same with built-in vector drivers |
---|
156 | configure.args-append \ |
---|
157 | -DOGR_ENABLE_DRIVER_AVC=ON \ |
---|
158 | -DOGR_ENABLE_DRIVER_CAD=ON \ |
---|
159 | -DOGR_ENABLE_DRIVER_CSV=ON \ |
---|
160 | -DOGR_ENABLE_DRIVER_DGN=ON \ |
---|
161 | -DOGR_ENABLE_DRIVER_DXF=ON \ |
---|
162 | -DOGR_ENABLE_DRIVER_EDIGEO=ON \ |
---|
163 | -DOGR_ENABLE_DRIVER_FLATGEOBUF=ON \ |
---|
164 | -DOGR_ENABLE_DRIVER_JSONFG=ON \ |
---|
165 | -DOGR_ENABLE_DRIVER_GEOCONCEPT=ON \ |
---|
166 | -DOGR_ENABLE_DRIVER_GMT=ON \ |
---|
167 | -DOGR_ENABLE_DRIVER_MAPML=ON \ |
---|
168 | -DOGR_ENABLE_DRIVER_MVT=ON \ |
---|
169 | -DOGR_ENABLE_DRIVER_NTF=ON \ |
---|
170 | -DOGR_ENABLE_DRIVER_OPENFILEGDB=ON \ |
---|
171 | -DOGR_ENABLE_DRIVER_PG=OFF \ |
---|
172 | -DOGR_ENABLE_DRIVER_PGDUMP=ON \ |
---|
173 | -DOGR_ENABLE_DRIVER_S57=ON \ |
---|
174 | -DOGR_ENABLE_DRIVER_SDTS=ON \ |
---|
175 | -DOGR_ENABLE_DRIVER_SELAFIN=ON \ |
---|
176 | -DOGR_ENABLE_DRIVER_SQLITE=ON \ |
---|
177 | -DOGR_ENABLE_DRIVER_SXF=ON \ |
---|
178 | -DOGR_ENABLE_DRIVER_TIGER=ON \ |
---|
179 | -DOGR_ENABLE_DRIVER_VDV=ON \ |
---|
180 | -DOGR_ENABLE_DRIVER_WASP=ON |
---|
181 | |
---|
182 | # These drivers require curl |
---|
183 | configure.args-append \ |
---|
184 | -DGDAL_ENABLE_DRIVER_DAAS=ON \ |
---|
185 | -DGDAL_ENABLE_DRIVER_EEDA=ON \ |
---|
186 | -DGDAL_ENABLE_DRIVER_OGCAPI=ON \ |
---|
187 | -DGDAL_ENABLE_DRIVER_PLMOSAIC=ON \ |
---|
188 | -DGDAL_ENABLE_DRIVER_WCS=ON \ |
---|
189 | -DGDAL_ENABLE_DRIVER_WMS=ON \ |
---|
190 | -DGDAL_ENABLE_DRIVER_WMTS=ON \ |
---|
191 | -DOGR_ENABLE_DRIVER_AMIGOCLOUD=ON \ |
---|
192 | -DOGR_ENABLE_DRIVER_CARTO=ON \ |
---|
193 | -DOGR_ENABLE_DRIVER_CSW=OFF \ |
---|
194 | -DOGR_ENABLE_DRIVER_ELASTIC=ON \ |
---|
195 | -DOGR_ENABLE_DRIVER_NGW=ON \ |
---|
196 | -DOGR_ENABLE_DRIVER_PLSCENES=ON \ |
---|
197 | -DOGR_ENABLE_DRIVER_WFS=ON |
---|
198 | |
---|
199 | # These drivers require sqlite3 |
---|
200 | configure.args-append \ |
---|
201 | -DGDAL_ENABLE_DRIVER_MBTILES=ON \ |
---|
202 | -DGDAL_ENABLE_DRIVER_RASTERLITE=ON \ |
---|
203 | -DOGR_ENABLE_DRIVER_GPKG=ON \ |
---|
204 | -DOGR_ENABLE_DRIVER_OSM=ON \ |
---|
205 | -DOGR_ENABLE_DRIVER_PMTILES=ON \ |
---|
206 | -DOGR_ENABLE_DRIVER_VFK=ON |
---|
207 | |
---|
208 | # These drivers require expat |
---|
209 | configure.args-append \ |
---|
210 | -DOGR_ENABLE_DRIVER_GEORSS=ON \ |
---|
211 | -DOGR_ENABLE_DRIVER_GML=ON \ |
---|
212 | -DOGR_ENABLE_DRIVER_GPSBABEL=ON \ |
---|
213 | -DOGR_ENABLE_DRIVER_GPX=ON \ |
---|
214 | -DOGR_ENABLE_DRIVER_JML=ON \ |
---|
215 | -DOGR_ENABLE_DRIVER_LVBAG=ON \ |
---|
216 | -DOGR_ENABLE_DRIVER_ODS=ON \ |
---|
217 | -DOGR_ENABLE_DRIVER_SVG=ON \ |
---|
218 | -DOGR_ENABLE_DRIVER_XLSX=ON |
---|
219 | |
---|
220 | # These drivers require libxml2 |
---|
221 | configure.args-append \ |
---|
222 | -DGDAL_USE_LIBXML2=ON |
---|
223 | |
---|
224 | # These drivers require OpenEXR |
---|
225 | configure.args-append \ |
---|
226 | -DGDAL_ENABLE_DRIVER_EXR=OFF |
---|
227 | |
---|
228 | # These drivers require Apache Arrow |
---|
229 | configure.args-append \ |
---|
230 | -DGDAL_USE_ARROW=OFF \ |
---|
231 | -DGDAL_USE_PARQUET=OFF \ |
---|
232 | -DOGR_ENABLE_DRIVER_ARROW=OFF \ |
---|
233 | -DOGR_ENABLE_DRIVER_PARQUET=OFF |
---|
234 | |
---|
235 | # Miscellaneous drivers |
---|
236 | configure.args-append \ |
---|
237 | -DBUILD_CSHARP_BINDINGS=OFF \ |
---|
238 | -DBUILD_JAVA_BINDINGS=OFF \ |
---|
239 | -DBUILD_PYTHON_BINDINGS=OFF \ |
---|
240 | -DGDAL_USE_ARCHIVE=OFF \ |
---|
241 | -DGDAL_USE_CFITSIO=OFF \ |
---|
242 | -DGDAL_USE_CRYPTOPP=OFF \ |
---|
243 | -DGDAL_USE_CURL=ON \ |
---|
244 | -DGDAL_USE_DEFLATE=ON \ |
---|
245 | -DGDAL_USE_ECW=OFF \ |
---|
246 | -DGDAL_USE_EXPAT=ON \ |
---|
247 | -DGDAL_USE_GEOS=ON \ |
---|
248 | -DGDAL_USE_GEOTIFF_INTERNAL=ON \ |
---|
249 | -DGDAL_USE_GIF=ON \ |
---|
250 | -DGDAL_USE_HDF4=OFF \ |
---|
251 | -DGDAL_USE_HDF5=OFF \ |
---|
252 | -DGDAL_USE_HEIF=OFF \ |
---|
253 | -DGDAL_USE_ICONV=ON \ |
---|
254 | -DGDAL_USE_IDB=OFF \ |
---|
255 | -DGDAL_USE_LIBAEC=ON \ |
---|
256 | -DGDAL_USE_LIBKML=OFF \ |
---|
257 | -DGDAL_USE_LIBLZMA=OFF \ |
---|
258 | -DGDAL_USE_MRSID=OFF \ |
---|
259 | -DGDAL_USE_MYSQL=OFF \ |
---|
260 | -DGDAL_USE_NETCDF=OFF \ |
---|
261 | -DGDAL_USE_ODBC=OFF \ |
---|
262 | -DGDAL_USE_OGDI=OFF \ |
---|
263 | -DGDAL_USE_OPENCL=OFF \ |
---|
264 | -DGDAL_USE_OPENEXR=OFF \ |
---|
265 | -DGDAL_USE_OPENJPEG=OFF \ |
---|
266 | -DGDAL_USE_PCRE2=ON \ |
---|
267 | -DGDAL_USE_PDFIUM=OFF \ |
---|
268 | -DGDAL_USE_PNG=ON \ |
---|
269 | -DGDAL_USE_POPPLER=OFF \ |
---|
270 | -DGDAL_USE_POSTGRESQL=ON \ |
---|
271 | -DGDAL_USE_QHULL=ON \ |
---|
272 | -DGDAL_USE_SPATIALITE=ON \ |
---|
273 | -DGDAL_USE_SQLITE3=ON \ |
---|
274 | -DGDAL_USE_TILEDB=OFF \ |
---|
275 | -DGDAL_USE_TIFF_INTERNAL=ON \ |
---|
276 | -DGDAL_USE_WEBP=ON \ |
---|
277 | -DGDAL_USE_XERCESC=OFF \ |
---|
278 | -DGDAL_USE_ZSTD=ON |
---|
279 | |
---|
280 | |
---|
281 | configure.args-append \ |
---|
282 | -DLIBAEC_INCLUDE_DIR=${prefix}/lib/libaec/include \ |
---|
283 | -DLIBAEC_LIBRARY=${prefix}/lib/libaec/lib/libaec.dylib |
---|
284 | |
---|
285 | # Always choose internal libjson code (#44098) |
---|
286 | configure.args-append -DGDAL_USE_JSONC_INTERNAL=ON |
---|
287 | |
---|
288 | if {${build_arch} in [list i386 ppc]} { |
---|
289 | # https://trac.macports.org/ticket/67468 |
---|
290 | configure.args-append \ |
---|
291 | -DBUILD_WITHOUT_64BIT_OFFSET=ON |
---|
292 | } |
---|
293 | |
---|
294 | pre-configure { |
---|
295 | # see https://trac.macports.org/ticket/56517 |
---|
296 | if {[string match *clang* ${configure.cxx}] && ${configure.cxx_stdlib} ne ""} { |
---|
297 | configure.ldflags-append -stdlib=${configure.cxx_stdlib} |
---|
298 | } |
---|
299 | |
---|
300 | global worksrcpath_dirs |
---|
301 | if {![variant_exists universal] || ![variant_isset universal]} { |
---|
302 | set worksrcpath_dirs ${worksrcpath} |
---|
303 | } else { |
---|
304 | foreach arch ${universal_archs_to_use} { |
---|
305 | lappend worksrcpath_dirs ${worksrcpath}-${arch} |
---|
306 | } |
---|
307 | } |
---|
308 | } |
---|
309 | |
---|
310 | if {[variant_isset kea] && ![variant_isset hdf5]} { |
---|
311 | ui_msg "NOTE: KEA driver support depends on HDF5, +hdf5 variant is added." |
---|
312 | default_variants +hdf5 |
---|
313 | } |
---|
314 | |
---|
315 | # Set target to none |
---|
316 | build.target |
---|
317 | |
---|
318 | variant arrow description {Enable (Geo)Arrow IPC File Format / Stream and (Geo)Parquet support} { |
---|
319 | depends_lib-append port:apache-arrow |
---|
320 | configure.args-replace -DGDAL_USE_ARROW=OFF -DGDAL_USE_ARROW=ON \ |
---|
321 | -DGDAL_USE_PARQUET=OFF -DGDAL_USE_PARQUET=ON \ |
---|
322 | -DOGR_ENABLE_DRIVER_ARROW=OFF -DOGR_ENABLE_DRIVER_ARROW=ON \ |
---|
323 | -DOGR_ENABLE_DRIVER_PARQUET=OFF -DOGR_ENABLE_DRIVER_PARQUET=ON |
---|
324 | configure.args-append -DARROW_USE_STATIC_LIBRARIES=OFF |
---|
325 | } |
---|
326 | |
---|
327 | variant cfitsio description {Enable FITS support} { |
---|
328 | depends_lib-append port:cfitsio |
---|
329 | configure.args-replace -DGDAL_USE_CFITSIO=OFF -DGDAL_USE_CFITSIO=ON |
---|
330 | configure.args-append -DGDAL_ENABLE_DRIVER_FITS=ON |
---|
331 | } |
---|
332 | |
---|
333 | variant cryptopp description {Enable Crypto++ support} { |
---|
334 | depends_lib-append port:libcryptopp |
---|
335 | configure.args-replace -DGDAL_USE_CRYPTOPP=OFF -DGDAL_USE_CRYPTOPP=ON |
---|
336 | } |
---|
337 | |
---|
338 | variant ecw description {Enable ECW file format} { |
---|
339 | configure.args-replace -DGDAL_USE_ECW=OFF -DGDAL_USE_ECW=ON |
---|
340 | configure.args-append -DECW_ROOT=${prefix}/lib/ECW \ |
---|
341 | -DGDAL_ENABLE_DRIVER_ECW=ON |
---|
342 | pre-configure { |
---|
343 | if {(![file exists ${prefix}/lib/ECW]) && \ |
---|
344 | (![file exists /Intergraph/ERDASEcwJpeg2000SDK5.1.1/Desktop_Read-Only])} { |
---|
345 | ui_error " |
---|
346 | **** |
---|
347 | * The Intergraph ECW SDK version 5.5.0.2034 is needed to |
---|
348 | * compile gdal with the ecw variant. It must be installed separately. |
---|
349 | * Please download the macOS version of the SDK |
---|
350 | * 'ERDAS ECW/JP2 SDK v5.5 (MacOSX)' from |
---|
351 | * https://download.hexagongeospatial.com/downloads/ecw/erdas-ecw-jp2-sdk-v5-5-update-3-macos |
---|
352 | * Choose to install it in ${prefix}/lib/ECW. |
---|
353 | * Then try to install GDAL again. |
---|
354 | ****" |
---|
355 | return -code error "ECW SDK 5.5 not installed." |
---|
356 | } |
---|
357 | |
---|
358 | if {(![file exists ${prefix}/lib/ECW]) && \ |
---|
359 | ([file exists /Intergraph/ERDASEcwJpeg2000SDK5.1.1/Desktop_Read-Only])} { |
---|
360 | |
---|
361 | ui_error " |
---|
362 | **** |
---|
363 | * Please create symbolic links from the installation directory to |
---|
364 | * ${prefix}/lib/ECW, by executing at the prompt: |
---|
365 | * sudo ln -s \${ECW_install_dir}/ERDASEcwJpeg2000SDK5.5.1/Desktop_Read-Only \ |
---|
366 | ${prefix}/lib/ECW |
---|
367 | * Or reinstall the ECW SDK in ${prefix}/lib/ECW directly. |
---|
368 | * Then try again. |
---|
369 | ****" |
---|
370 | return -code error "Symlinks missing." |
---|
371 | } |
---|
372 | } |
---|
373 | } |
---|
374 | |
---|
375 | variant hdf4 description {Enable HDF4 file format} { |
---|
376 | depends_lib-append port:hdf4 |
---|
377 | configure.args-replace -DGDAL_USE_HDF4=OFF -DGDAL_USE_HDF4=ON |
---|
378 | configure.args-append -DGDAL_ENABLE_DRIVER_HDF4=ON |
---|
379 | } |
---|
380 | |
---|
381 | variant hdf5 description {Enable HDF5 file format} { |
---|
382 | pre-configure { |
---|
383 | # If HDF5 is built with a mpi variant, we need to know the path to "mpi.h". |
---|
384 | # Figure out HDF5's mpi include directory: |
---|
385 | set mpl_include_dir "" |
---|
386 | if {![catch {set result [active_variants hdf5 openmpi]}]} { |
---|
387 | if {$result} { |
---|
388 | set mpl_include_dir "-I${prefix}/include/openmpi-mp" |
---|
389 | } |
---|
390 | } |
---|
391 | if {![catch {set result [active_variants hdf5 mpich]}]} { |
---|
392 | if {$result} { |
---|
393 | set mpl_include_dir "-I${prefix}/include/mpich-mp" |
---|
394 | } |
---|
395 | } |
---|
396 | if {$mpl_include_dir ne ""} { |
---|
397 | configure.cxxflags-append ${mpl_include_dir} |
---|
398 | } |
---|
399 | } |
---|
400 | depends_lib-append port:hdf5 |
---|
401 | configure.args-replace -DGDAL_USE_HDF5=OFF -DGDAL_USE_HDF5=ON |
---|
402 | configure.args-append -DGDAL_ENABLE_DRIVER_HDF5=ON |
---|
403 | } |
---|
404 | |
---|
405 | variant heif description {Enable HEIF support} { |
---|
406 | depends_lib-append port:libheif |
---|
407 | configure.args-replace -DGDAL_USE_HEIF=OFF -DGDAL_USE_HEIF=ON |
---|
408 | configure.args-append -DGDAL_ENABLE_DRIVER_HEIF=ON |
---|
409 | } |
---|
410 | |
---|
411 | variant kea description {Enable KEA support} { |
---|
412 | depends_lib-append port:kealib |
---|
413 | configure.args-append -DGDAL_ENABLE_DRIVER_KEA=ON |
---|
414 | } |
---|
415 | |
---|
416 | variant libarchive description {Enable libarchive support} { |
---|
417 | depends_lib-append port:libarchive |
---|
418 | configure.args-replace -DGDAL_USE_ARCHIVE=OFF -DGDAL_USE_ARCHIVE=ON |
---|
419 | } |
---|
420 | |
---|
421 | variant libkml description {Enable libkml} { |
---|
422 | pre-configure { |
---|
423 | set boost_includedir [exec ${prefix}/bin/pkg-config --variable=boost_includedir libkml] |
---|
424 | configure.cxxflags-append -I${boost_includedir} |
---|
425 | } |
---|
426 | depends_lib-append port:libkml |
---|
427 | configure.args-replace -DGDAL_USE_LIBKML=OFF -DGDAL_USE_LIBKML=ON |
---|
428 | configure.args-append -DOGR_ENABLE_DRIVER_LIBKML=ON |
---|
429 | } |
---|
430 | |
---|
431 | variant lto description {Enable Link Time Optimization} { |
---|
432 | configure.args-append -DENABLE_IPO=ON |
---|
433 | } |
---|
434 | |
---|
435 | variant lzma description {Enable LZMA (7Z) compression support} { |
---|
436 | depends_lib-append port:lzma |
---|
437 | configure.args-replace -DGDAL_USE_LIBLZMA=OFF -DGDAL_USE_LIBLZMA=ON |
---|
438 | } |
---|
439 | |
---|
440 | variant mrsid description {Enable MrSID file format} { |
---|
441 | depends_lib-append port:geoexpress-sdk |
---|
442 | configure.args-replace -DGDAL_USE_MRSID=OFF -DGDAL_USE_MRSID=ON \ |
---|
443 | -DGDAL_USE_JP2MRSID=OFF -DGDAL_USE_JP2MRSID=ON |
---|
444 | } |
---|
445 | |
---|
446 | variant mysql57 conflicts mysql8 description {Enable MySQL 5.7 support} { |
---|
447 | depends_lib-append port:mysql57 |
---|
448 | configure.args-replace -DGDAL_USE_MYSQL=OFF -DGDAL_USE_MYSQL=ON |
---|
449 | configure.args-append -DMYSQL_INCLUDE_DIR=${prefix}/include/mysql57/mysql \ |
---|
450 | -DMYSQL_LIBRARY=${prefix}/lib/mysql57/mysql/libmysqlclient.dylib |
---|
451 | } |
---|
452 | |
---|
453 | variant mysql8 conflicts mysql57 description {Enable MySQL 8 support} { |
---|
454 | depends_lib-append port:mysql8 |
---|
455 | configure.args-replace -DGDAL_USE_MYSQL=OFF -DGDAL_USE_MYSQL=ON |
---|
456 | configure.args-append -DMYSQL_INCLUDE_DIR=${prefix}/include/mysql8/mysql \ |
---|
457 | -DMYSQL_LIBRARY=${prefix}/lib/mysql8/mysql/libmysqlclient.dylib |
---|
458 | } |
---|
459 | |
---|
460 | variant native description {Optimize for speed} { |
---|
461 | if {${os.arch} eq "arm"} { |
---|
462 | configure.optflags -O3 -pipe -mcpu=apple-m1 -DGDAL_COMPILATION |
---|
463 | } elseif {${os.arch} eq "powerpc"} { |
---|
464 | # https://github.com/macports/macports-ports/pull/18587#issuecomment-1540025830 |
---|
465 | configure.optflags -O3 -pipe -mtune=native -mcpu=native -DGDAL_COMPILATION |
---|
466 | } else { |
---|
467 | configure.optflags -O3 -pipe -march=native -DGDAL_COMPILATION |
---|
468 | } |
---|
469 | } |
---|
470 | |
---|
471 | variant netcdf description {Enable NetCDF file format} { |
---|
472 | pre-configure { |
---|
473 | # If NetCDF is built with a mpi variant, we need to know the path to "mpi.h". |
---|
474 | # Figure out NetCDF's mpi include directory: |
---|
475 | set mpl_include_dir "" |
---|
476 | if {![catch {set result [active_variants netcdf openmpi]}]} { |
---|
477 | if {$result} { |
---|
478 | set mpl_include_dir "-I${prefix}/include/openmpi-mp" |
---|
479 | } |
---|
480 | } |
---|
481 | if {![catch {set result [active_variants netcdf mpich]}]} { |
---|
482 | if {$result} { |
---|
483 | set mpl_include_dir "-I${prefix}/include/mpich-mp" |
---|
484 | } |
---|
485 | } |
---|
486 | if {$mpl_include_dir ne ""} { |
---|
487 | configure.cxxflags-append ${mpl_include_dir} |
---|
488 | } |
---|
489 | } |
---|
490 | depends_lib-append port:netcdf |
---|
491 | configure.args-replace -DGDAL_USE_NETCDF=OFF -DGDAL_USE_NETCDF=ON |
---|
492 | configure.args-append -DGDAL_ENABLE_DRIVER_NETCDF=ON |
---|
493 | } |
---|
494 | |
---|
495 | variant odbc description {Enable ODBC support} { |
---|
496 | depends_lib-append port:unixODBC |
---|
497 | configure.args-replace -DGDAL_USE_ODBC=OFF -DGDAL_USE_ODBC=ON |
---|
498 | # These drivers depend on odbc |
---|
499 | configure.args-append -DOGR_ENABLE_DRIVER_ODBC=ON \ |
---|
500 | -DOGR_ENABLE_DRIVER_PGEO=ON \ |
---|
501 | -DOGR_ENABLE_DRIVER_MSSQLSPATIAL=ON |
---|
502 | } |
---|
503 | |
---|
504 | variant opencl description {Enable OpenCL} { |
---|
505 | configure.args-replace -DGDAL_USE_OPENCL=OFF -DGDAL_USE_OPENCL=ON |
---|
506 | } |
---|
507 | |
---|
508 | variant openexr description {Enable OpenEXR image file format} { |
---|
509 | depends_lib-append port:openexr |
---|
510 | configure.args-replace -DGDAL_USE_OPENEXR=OFF -DGDAL_USE_OPENEXR=ON \ |
---|
511 | -DGDAL_ENABLE_DRIVER_EXR=OFF -DGDAL_ENABLE_DRIVER_EXR=ON |
---|
512 | } |
---|
513 | |
---|
514 | variant openjpeg description {Enable OpenJPEG JPEG-2000 format support} { |
---|
515 | depends_lib-append port:openjpeg |
---|
516 | configure.args-replace -DGDAL_USE_OPENJPEG=OFF -DGDAL_USE_OPENJPEG=ON |
---|
517 | configure.args-append -DGDAL_ENABLE_DRIVER_JP2OPENJPEG=ON |
---|
518 | } |
---|
519 | |
---|
520 | variant poppler description {Enable Poppler support} { |
---|
521 | depends_lib-append path:lib/pkgconfig/poppler.pc:poppler |
---|
522 | configure.args-replace -DGDAL_USE_POPPLER=OFF -DGDAL_USE_POPPLER=ON |
---|
523 | configure.args-append -DGDAL_ENABLE_DRIVER_PDF=ON |
---|
524 | } |
---|
525 | |
---|
526 | variant tiledb description {Enable TileDB support} { |
---|
527 | depends_lib-append port:tiledb |
---|
528 | configure.args-replace -DGDAL_USE_TILEDB=OFF -DGDAL_USE_TILEDB=ON |
---|
529 | configure.args-append -DGDAL_ENABLE_DRIVER_TILEDB=ON |
---|
530 | } |
---|
531 | |
---|
532 | # PostgreSQL variants |
---|
533 | set pg_suffixes {12 13 14 15} |
---|
534 | set pg_variants {} |
---|
535 | set pg_default_variant "if {" |
---|
536 | foreach v ${pg_suffixes} { |
---|
537 | lappend pg_variants postgresql${v} |
---|
538 | set pg_default_variant "${pg_default_variant}!\[variant_isset postgresql${v}] && " |
---|
539 | } |
---|
540 | set pg_default_variant [string range ${pg_default_variant} 0 end-4] |
---|
541 | set pg_default_variant "${pg_default_variant}} {default_variants +postgresql${v}}" |
---|
542 | eval $pg_default_variant |
---|
543 | foreach v ${pg_suffixes} { |
---|
544 | set p postgresql${v} |
---|
545 | set i [lsearch -exact ${pg_variants} ${p}] |
---|
546 | set c [lreplace ${pg_variants} ${i} ${i}] |
---|
547 | variant ${p} description "Enable PostgreSQL ${v} support" conflicts {*}${c} " |
---|
548 | depends_lib-append port:${p} |
---|
549 | configure.args-replace -DOGR_ENABLE_DRIVER_PG=OFF -DOGR_ENABLE_DRIVER_PG=ON |
---|
550 | configure.args-append -DPostgreSQL_INCLUDE_DIR=${prefix}/include/${p} \ |
---|
551 | -DPostgreSQL_LIBRARY_DIR=${prefix}/lib/${p} \ |
---|
552 | -DPostgreSQL_ADDITIONAL_VERSIONS=${v} |
---|
553 | " |
---|
554 | } |
---|
555 | |
---|
556 | # PROJ variants |
---|
557 | set proj_versions {6 7 8 9} |
---|
558 | set proj_variants {} |
---|
559 | foreach pjver ${proj_versions} { |
---|
560 | lappend proj_variants proj${pjver} |
---|
561 | } |
---|
562 | foreach proj_ver ${proj_versions} { |
---|
563 | set index [lsearch -exact ${proj_variants} proj${proj_ver}] |
---|
564 | set cflcts [lreplace ${proj_variants} ${index} ${index}] |
---|
565 | variant proj${proj_ver} description "Use Proj${proj_ver}" conflicts {*}${cflcts} " |
---|
566 | depends_lib-append port:proj${proj_ver} |
---|
567 | configure.args-append -DGDAL_USE_PROJ=ON \ |
---|
568 | -DPROJ_INCLUDE_DIR=${prefix}/lib/proj${proj_ver}/include \ |
---|
569 | -DPROJ_LIBRARY_RELEASE=${prefix}/lib/proj${proj_ver}/lib/libproj.dylib |
---|
570 | " |
---|
571 | } |
---|
572 | set projdf "if {" |
---|
573 | foreach pv ${proj_versions} { |
---|
574 | set projdf "${projdf}!\[variant_isset proj${pv}\] && " |
---|
575 | } |
---|
576 | set projdf [string range ${projdf} 0 end-4] |
---|
577 | set projdf "${projdf}} { default_variants +proj${pv} }" |
---|
578 | eval ${projdf} |
---|
579 | |
---|
580 | variant xerces description {Enable Xerces XML support for GML file format} { |
---|
581 | depends_lib-append path:include/xercesc/util/XercesVersion.hpp:xercesc3 |
---|
582 | configure.args-replace -DGDAL_USE_XERCESC=OFF -DGDAL_USE_XERCESC=ON |
---|
583 | # These drivers need xerces-c |
---|
584 | configure.args-append -DOGR_ENABLE_DRIVER_NAS=ON \ |
---|
585 | -DOGR_ENABLE_DRIVER_ILI=ON \ |
---|
586 | -DOGR_ENABLE_DRIVER_GMLAS=ON |
---|
587 | } |
---|
588 | |
---|
589 | set jpeg2k 0 |
---|
590 | foreach jpeg2kVariant {openjpeg ecw} { |
---|
591 | if {[variant_isset ${jpeg2kVariant}]} { |
---|
592 | incr jpeg2k 1 |
---|
593 | } |
---|
594 | } |
---|
595 | if {${jpeg2k} > 1} { |
---|
596 | notes-append "Multiple drivers are able to open JPEG-2000 datasets. See https://trac.osgeo.org/gdal/wiki/ConfigOptions#GDAL_SKIP." |
---|
597 | } |
---|
598 | |
---|
599 | post-destroot { |
---|
600 | xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name} |
---|
601 | xinstall -m 644 -W ${worksrcpath} HOWTO-RELEASE VERSION \ |
---|
602 | ${destroot}${prefix}/share/doc/${name} |
---|
603 | |
---|
604 | if {[variant_isset ecw]} { |
---|
605 | foreach f [list \ |
---|
606 | bin/gdal_contour \ |
---|
607 | bin/gdal_create \ |
---|
608 | bin/gdal_grid \ |
---|
609 | bin/gdal_rasterize \ |
---|
610 | bin/gdal_translate \ |
---|
611 | bin/gdal_viewshed \ |
---|
612 | bin/gdaladdo \ |
---|
613 | bin/gdalbuildvrt \ |
---|
614 | bin/gdaldem \ |
---|
615 | bin/gdalenhance \ |
---|
616 | bin/gdalinfo \ |
---|
617 | bin/gdallocationinfo \ |
---|
618 | bin/gdalmanage \ |
---|
619 | bin/gdalmdiminfo \ |
---|
620 | bin/gdalmdimtranslate \ |
---|
621 | bin/gdalsrsinfo \ |
---|
622 | bin/gdaltindex \ |
---|
623 | bin/gdaltransform \ |
---|
624 | bin/gdalwarp \ |
---|
625 | bin/gnmanalyse \ |
---|
626 | lib/libgdal.dylib] \ |
---|
627 | { |
---|
628 | if {${configure.cxx_stdlib} eq "libc++"} { |
---|
629 | system "install_name_tool -change \ |
---|
630 | /Users/jenkins/hudson/workspace/RL_5.1.1_ECWJP2SDK_OSX/Master/libNCSEcw.dylib ${prefix}/lib/ECW/redistributable/libc++/libNCSEcw.dylib \ |
---|
631 | ${destroot}${prefix}/${f}" |
---|
632 | } else { |
---|
633 | system "install_name_tool -change \ |
---|
634 | /Users/jenkins/hudson/workspace/RL_5.1.1_ECWJP2SDK_OSX/Master/libNCSEcw.dylib ${prefix}/lib/ECW/redistributable/libstdc++/libNCSEcw.dylib \ |
---|
635 | ${destroot}${prefix}/${f}" |
---|
636 | } |
---|
637 | } |
---|
638 | } |
---|
639 | |
---|
640 | } |
---|
641 | |
---|
642 | livecheck.type regex |
---|
643 | livecheck.url https://download.osgeo.org/gdal/CURRENT |
---|
644 | livecheck.regex ${name}-(\\d+(?:\\.\\d+)*)\\.tar |
---|