GDAL: add v3.11.0 (#50405)
This commit is contained in:
parent
3371cc55ed
commit
d8172e2c29
@ -30,6 +30,7 @@ class Gdal(CMakePackage, AutotoolsPackage, PythonExtension):
|
|||||||
license("MIT")
|
license("MIT")
|
||||||
maintainers("adamjstewart")
|
maintainers("adamjstewart")
|
||||||
|
|
||||||
|
version("3.11.0", sha256="ba1a17a74428bfd5c789ce293f59b6a3d8bfabab747431c33331ac0ac579ea71")
|
||||||
version("3.10.2", sha256="67b4e08acd1cc4b6bd67b97d580be5a8118b586ad6a426b09d5853898deeada5")
|
version("3.10.2", sha256="67b4e08acd1cc4b6bd67b97d580be5a8118b586ad6a426b09d5853898deeada5")
|
||||||
version("3.10.1", sha256="9211eac72b53f5f85d23cf6d83ee20245c6d818733405024e71f2af41e5c5f91")
|
version("3.10.1", sha256="9211eac72b53f5f85d23cf6d83ee20245c6d818733405024e71f2af41e5c5f91")
|
||||||
version("3.10.0", sha256="af821a3bcf68cf085724c21c9b53605fd451d83af3c8854d8bf194638eb734a8")
|
version("3.10.0", sha256="af821a3bcf68cf085724c21c9b53605fd451d83af3c8854d8bf194638eb734a8")
|
||||||
@ -104,6 +105,7 @@ class Gdal(CMakePackage, AutotoolsPackage, PythonExtension):
|
|||||||
version("2.0.0", sha256="91704fafeea2349c5e268dc1e2d03921b3aae64b05ee01d59fdfc1a6b0ffc061")
|
version("2.0.0", sha256="91704fafeea2349c5e268dc1e2d03921b3aae64b05ee01d59fdfc1a6b0ffc061")
|
||||||
|
|
||||||
# Optional dependencies
|
# Optional dependencies
|
||||||
|
# https://gdal.org/en/stable/development/building_from_source.html
|
||||||
variant("archive", default=False, when="@3.7:", description="Optional for vsi7z VFS driver")
|
variant("archive", default=False, when="@3.7:", description="Optional for vsi7z VFS driver")
|
||||||
variant(
|
variant(
|
||||||
"armadillo",
|
"armadillo",
|
||||||
@ -129,6 +131,12 @@ class Gdal(CMakePackage, AutotoolsPackage, PythonExtension):
|
|||||||
variant("ecw", default=False, description="Required for ECW driver")
|
variant("ecw", default=False, description="Required for ECW driver")
|
||||||
variant("epsilon", default=False, when="@:3.2", description="Required for EPSILON driver")
|
variant("epsilon", default=False, when="@:3.2", description="Required for EPSILON driver")
|
||||||
variant("expat", default=True, description="Required for XML parsing in many OGR drivers")
|
variant("expat", default=True, description="Required for XML parsing in many OGR drivers")
|
||||||
|
variant(
|
||||||
|
"exprtk",
|
||||||
|
default=False,
|
||||||
|
when="@3.11:",
|
||||||
|
description="Required for advanced C++ VRT expressions",
|
||||||
|
)
|
||||||
variant("filegdb", default=False, description="Required for FileGDB driver")
|
variant("filegdb", default=False, description="Required for FileGDB driver")
|
||||||
variant("fme", default=False, when="@:3.4", description="Required for FME driver")
|
variant("fme", default=False, when="@:3.4", description="Required for FME driver")
|
||||||
variant("freexl", default=False, description="Required for XLS driver")
|
variant("freexl", default=False, description="Required for XLS driver")
|
||||||
@ -152,7 +160,7 @@ class Gdal(CMakePackage, AutotoolsPackage, PythonExtension):
|
|||||||
variant("jxl", default=False, when="@3.4:", description="Required for JPEGXL driver")
|
variant("jxl", default=False, when="@3.4:", description="Required for JPEGXL driver")
|
||||||
variant("kdu", default=False, description="Required for JP2KAK and JPIPKAK drivers")
|
variant("kdu", default=False, description="Required for JP2KAK and JPIPKAK drivers")
|
||||||
variant("kea", default=False, description="Required for KEA driver")
|
variant("kea", default=False, description="Required for KEA driver")
|
||||||
variant("lerc", default=False, when="@2.4:", description="Required for LERC compression")
|
variant("lerc", default=True, when="@2.4:", description="Required for LERC compression")
|
||||||
variant("libaec", default=False, when="@3.8:", description="Optional for GRIB driver")
|
variant("libaec", default=False, when="@3.8:", description="Optional for GRIB driver")
|
||||||
variant("libcsf", default=False, description="Required for PCRaster driver")
|
variant("libcsf", default=False, description="Required for PCRaster driver")
|
||||||
variant("libkml", default=False, description="Required for LIBKML driver")
|
variant("libkml", default=False, description="Required for LIBKML driver")
|
||||||
@ -182,6 +190,12 @@ class Gdal(CMakePackage, AutotoolsPackage, PythonExtension):
|
|||||||
when="build_system=cmake",
|
when="build_system=cmake",
|
||||||
description="Required for MSSQLSpatial driver",
|
description="Required for MSSQLSpatial driver",
|
||||||
)
|
)
|
||||||
|
variant(
|
||||||
|
"muparser",
|
||||||
|
default=True,
|
||||||
|
when="@3.11:",
|
||||||
|
description="Required for nominal C++ VRT expressions",
|
||||||
|
)
|
||||||
variant("mysql", default=False, description="Required for MySQL driver")
|
variant("mysql", default=False, description="Required for MySQL driver")
|
||||||
variant("netcdf", default=False, description="Required for NetCDF driver")
|
variant("netcdf", default=False, description="Required for NetCDF driver")
|
||||||
variant("odbc", default=False, description="Required for many OGR drivers")
|
variant("odbc", default=False, description="Required for many OGR drivers")
|
||||||
@ -222,7 +236,7 @@ class Gdal(CMakePackage, AutotoolsPackage, PythonExtension):
|
|||||||
)
|
)
|
||||||
variant(
|
variant(
|
||||||
"qhull",
|
"qhull",
|
||||||
default=False,
|
default=True,
|
||||||
when="@2.1:",
|
when="@2.1:",
|
||||||
description="Used for linear interpolation of gdal_grid",
|
description="Used for linear interpolation of gdal_grid",
|
||||||
)
|
)
|
||||||
@ -307,6 +321,7 @@ class Gdal(CMakePackage, AutotoolsPackage, PythonExtension):
|
|||||||
# depends_on('ecw', when='+ecw')
|
# depends_on('ecw', when='+ecw')
|
||||||
# depends_on('libepsilon', when='+epsilon')
|
# depends_on('libepsilon', when='+epsilon')
|
||||||
depends_on("expat@1.95:", when="+expat")
|
depends_on("expat@1.95:", when="+expat")
|
||||||
|
depends_on("exprtk", when="+exprtk")
|
||||||
# depends_on('filegdb', when='+filegdb')
|
# depends_on('filegdb', when='+filegdb')
|
||||||
# depends_on('fme', when='+fme')
|
# depends_on('fme', when='+fme')
|
||||||
depends_on("freexl", when="+freexl")
|
depends_on("freexl", when="+freexl")
|
||||||
@ -350,6 +365,7 @@ class Gdal(CMakePackage, AutotoolsPackage, PythonExtension):
|
|||||||
# depends_on('lizardtech-lidar', when='+mrsid_lidar')
|
# depends_on('lizardtech-lidar', when='+mrsid_lidar')
|
||||||
# depends_on('mssql_ncli', when='+mssql_ncli')
|
# depends_on('mssql_ncli', when='+mssql_ncli')
|
||||||
# depends_on('mssql_odbc', when='+mssql_odbc')
|
# depends_on('mssql_odbc', when='+mssql_odbc')
|
||||||
|
depends_on("muparser", when="+muparser")
|
||||||
depends_on("mysql", when="+mysql")
|
depends_on("mysql", when="+mysql")
|
||||||
depends_on("netcdf-c@4.7:", when="@3.9:+netcdf")
|
depends_on("netcdf-c@4.7:", when="@3.9:+netcdf")
|
||||||
depends_on("netcdf-c", when="+netcdf")
|
depends_on("netcdf-c", when="+netcdf")
|
||||||
@ -422,17 +438,17 @@ class Gdal(CMakePackage, AutotoolsPackage, PythonExtension):
|
|||||||
depends_on("py-numpy@1.0.0:", type=("build", "run"), when="+python")
|
depends_on("py-numpy@1.0.0:", type=("build", "run"), when="+python")
|
||||||
# https://github.com/OSGeo/gdal/issues/9751
|
# https://github.com/OSGeo/gdal/issues/9751
|
||||||
depends_on("py-numpy@:1", when="@:3.8+python", type=("build", "run"))
|
depends_on("py-numpy@:1", when="@:3.8+python", type=("build", "run"))
|
||||||
depends_on("swig", type="build", when="+python")
|
depends_on("swig@4:", type="build", when="+python")
|
||||||
depends_on("java@7:", type=("build", "link", "run"), when="@3.2:+java")
|
depends_on("java@7:", type=("build", "link", "run"), when="@3.2:+java")
|
||||||
depends_on("java@6:", type=("build", "link", "run"), when="@2.4:+java")
|
depends_on("java@6:", type=("build", "link", "run"), when="@2.4:+java")
|
||||||
depends_on("java@5:", type=("build", "link", "run"), when="@2.1:+java")
|
depends_on("java@5:", type=("build", "link", "run"), when="@2.1:+java")
|
||||||
depends_on("java@4:", type=("build", "link", "run"), when="@:2.0+java")
|
depends_on("java@4:", type=("build", "link", "run"), when="@:2.0+java")
|
||||||
depends_on("ant", type="build", when="+java")
|
depends_on("ant", type="build", when="+java")
|
||||||
depends_on("swig", type="build", when="+java")
|
depends_on("swig@4:", type="build", when="+java")
|
||||||
depends_on("perl", type=("build", "run"), when="+perl")
|
depends_on("perl", type=("build", "run"), when="+perl")
|
||||||
depends_on("swig", type="build", when="+perl")
|
depends_on("swig@4:", type="build", when="+perl")
|
||||||
depends_on("php", type=("build", "link", "run"), when="+php")
|
depends_on("php", type=("build", "link", "run"), when="+php")
|
||||||
depends_on("swig", type="build", when="+php")
|
depends_on("swig@4:", type="build", when="+php")
|
||||||
|
|
||||||
# https://gdal.org/development/rfc/rfc88_googletest.html
|
# https://gdal.org/development/rfc/rfc88_googletest.html
|
||||||
depends_on("googletest@1.10:", type="test")
|
depends_on("googletest@1.10:", type="test")
|
||||||
@ -566,6 +582,7 @@ def cmake_args(self):
|
|||||||
self.define_from_variant("GDAL_USE_DEFLATE", "deflate"),
|
self.define_from_variant("GDAL_USE_DEFLATE", "deflate"),
|
||||||
self.define_from_variant("GDAL_USE_ECW", "ecw"),
|
self.define_from_variant("GDAL_USE_ECW", "ecw"),
|
||||||
self.define_from_variant("GDAL_USE_EXPAT", "expat"),
|
self.define_from_variant("GDAL_USE_EXPAT", "expat"),
|
||||||
|
self.define_from_variant("GDAL_USE_EXPRTK", "exprtk"),
|
||||||
self.define_from_variant("GDAL_USE_FILEGDB", "filegdb"),
|
self.define_from_variant("GDAL_USE_FILEGDB", "filegdb"),
|
||||||
self.define_from_variant("GDAL_USE_FREEXL", "freexl"),
|
self.define_from_variant("GDAL_USE_FREEXL", "freexl"),
|
||||||
self.define_from_variant("GDAL_USE_FYBA", "fyba"),
|
self.define_from_variant("GDAL_USE_FYBA", "fyba"),
|
||||||
@ -595,6 +612,7 @@ def cmake_args(self):
|
|||||||
self.define_from_variant("GDAL_USE_MRSID", "mrsid"),
|
self.define_from_variant("GDAL_USE_MRSID", "mrsid"),
|
||||||
self.define_from_variant("GDAL_USE_MSSQL_NCLI", "mssql_ncli"),
|
self.define_from_variant("GDAL_USE_MSSQL_NCLI", "mssql_ncli"),
|
||||||
self.define_from_variant("GDAL_USE_MSSQL_ODBC", "mssql_odbc"),
|
self.define_from_variant("GDAL_USE_MSSQL_ODBC", "mssql_odbc"),
|
||||||
|
self.define_from_variant("GDAL_USE_MUPARSER", "muparser"),
|
||||||
self.define_from_variant("GDAL_USE_MYSQL", "mysql"),
|
self.define_from_variant("GDAL_USE_MYSQL", "mysql"),
|
||||||
self.define_from_variant("GDAL_USE_NETCDF", "netcdf"),
|
self.define_from_variant("GDAL_USE_NETCDF", "netcdf"),
|
||||||
self.define_from_variant("GDAL_USE_ODBC", "odbc"),
|
self.define_from_variant("GDAL_USE_ODBC", "odbc"),
|
||||||
|
@ -21,7 +21,8 @@ class Lerc(CMakePackage):
|
|||||||
version("4.0.0", sha256="91431c2b16d0e3de6cbaea188603359f87caed08259a645fd5a3805784ee30a0")
|
version("4.0.0", sha256="91431c2b16d0e3de6cbaea188603359f87caed08259a645fd5a3805784ee30a0")
|
||||||
version("3.0", sha256="8c0148f5c22d823eff7b2c999b0781f8095e49a7d3195f13c68c5541dd5740a1")
|
version("3.0", sha256="8c0148f5c22d823eff7b2c999b0781f8095e49a7d3195f13c68c5541dd5740a1")
|
||||||
|
|
||||||
depends_on("cxx", type="build") # generated
|
depends_on("c", type="build")
|
||||||
|
depends_on("cxx", type="build")
|
||||||
|
|
||||||
depends_on("cmake@3.11:", type="build")
|
depends_on("cmake@3.11:", type="build")
|
||||||
depends_on("cmake@3.12:", type="build", when="@4.0.0:")
|
depends_on("cmake@3.12:", type="build", when="@4.0.0:")
|
||||||
|
@ -2,10 +2,12 @@
|
|||||||
#
|
#
|
||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
from spack.build_systems.autotools import AutotoolsBuilder
|
||||||
|
from spack.build_systems.cmake import CMakeBuilder
|
||||||
from spack.package import *
|
from spack.package import *
|
||||||
|
|
||||||
|
|
||||||
class Muparser(CMakePackage, Package):
|
class Muparser(CMakePackage, AutotoolsPackage):
|
||||||
"""C++ math expression parser library."""
|
"""C++ math expression parser library."""
|
||||||
|
|
||||||
homepage = "https://beltoforion.de/en/muparser/"
|
homepage = "https://beltoforion.de/en/muparser/"
|
||||||
@ -22,7 +24,9 @@ class Muparser(CMakePackage, Package):
|
|||||||
patch("auto_ptr.patch", when="@2.2.5")
|
patch("auto_ptr.patch", when="@2.2.5")
|
||||||
|
|
||||||
variant("samples", default=True, description="enable samples", when="build_system=cmake")
|
variant("samples", default=True, description="enable samples", when="build_system=cmake")
|
||||||
variant("openmp", default=True, description="enable OpenMP support", when="build_system=cmake")
|
variant(
|
||||||
|
"openmp", default=False, description="enable OpenMP support", when="build_system=cmake"
|
||||||
|
)
|
||||||
variant(
|
variant(
|
||||||
"wide_char",
|
"wide_char",
|
||||||
default=False,
|
default=False,
|
||||||
@ -31,13 +35,13 @@ class Muparser(CMakePackage, Package):
|
|||||||
)
|
)
|
||||||
variant("shared", default=True, description="enable shared libs", when="build_system=cmake")
|
variant("shared", default=True, description="enable shared libs", when="build_system=cmake")
|
||||||
|
|
||||||
# Non-CMake build system is not supported by windows
|
build_system(conditional("cmake", when="@2.2.6:"), "autotools", default="cmake")
|
||||||
conflicts("platform=windows", when="@:2.2.5")
|
|
||||||
build_system(conditional("cmake", when="@2.2.6:"), "generic", default="cmake")
|
|
||||||
|
|
||||||
depends_on("c", type="build") # generated
|
depends_on("c", type="build")
|
||||||
depends_on("cxx", type="build") # generated
|
depends_on("cxx", type="build")
|
||||||
|
|
||||||
|
|
||||||
|
class CMakeBuilder(CMakeBuilder):
|
||||||
def cmake_args(self):
|
def cmake_args(self):
|
||||||
return [
|
return [
|
||||||
self.define_from_variant("ENABLE_SAMPLES", "samples"),
|
self.define_from_variant("ENABLE_SAMPLES", "samples"),
|
||||||
@ -46,17 +50,14 @@ def cmake_args(self):
|
|||||||
self.define_from_variant("ENABLE_WIDE_CHAR", "wide_char"),
|
self.define_from_variant("ENABLE_WIDE_CHAR", "wide_char"),
|
||||||
]
|
]
|
||||||
|
|
||||||
@when("@:2.2.5")
|
|
||||||
def install(self, spec, prefix):
|
class AutotoolsBuilder(AutotoolsBuilder):
|
||||||
options = [
|
parallel = False
|
||||||
|
|
||||||
|
def configure_args(self):
|
||||||
|
return [
|
||||||
"--disable-debug",
|
"--disable-debug",
|
||||||
"--disable-samples",
|
"--disable-samples",
|
||||||
"--disable-dependency-tracking",
|
"--disable-dependency-tracking",
|
||||||
"CXXFLAGS={0}".format(self.compiler.cxx11_flag),
|
"CXXFLAGS={0}".format(self.compiler.cxx11_flag),
|
||||||
"--prefix=%s" % prefix,
|
|
||||||
]
|
]
|
||||||
|
|
||||||
configure(*options)
|
|
||||||
|
|
||||||
make(parallel=False)
|
|
||||||
make("install")
|
|
||||||
|
Loading…
Reference in New Issue
Block a user