macOS Fix for GDAL (#7155)
This commit is contained in:
parent
4c9521b52b
commit
be5fa8f6c2
1 changed files with 11 additions and 6 deletions
|
@ -23,9 +23,10 @@
|
|||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
##############################################################################
|
||||
from spack import *
|
||||
import sys
|
||||
|
||||
|
||||
class Gdal(Package):
|
||||
class Gdal(AutotoolsPackage):
|
||||
"""GDAL is a translator library for raster and vector geospatial
|
||||
data formats that is released under an X/MIT style Open Source
|
||||
license by the Open Source Geospatial Foundation. As a library,
|
||||
|
@ -67,9 +68,10 @@ class Gdal(Package):
|
|||
|
||||
parallel = False
|
||||
|
||||
def install(self, spec, prefix):
|
||||
def configure_args(self):
|
||||
spec = self.spec
|
||||
|
||||
args = []
|
||||
args.append("--prefix=%s" % prefix)
|
||||
args.append("--with-liblzma=yes")
|
||||
args.append("--with-zlib=%s" % spec['zlib'].prefix)
|
||||
args.append("--with-python=%s" % spec['python'].command.path)
|
||||
|
@ -88,7 +90,10 @@ def install(self, spec, prefix):
|
|||
if '+netcdf' in spec:
|
||||
args.append('--with-netcdf=%s' % spec['netcdf'].prefix)
|
||||
|
||||
configure(*args)
|
||||
return args
|
||||
|
||||
make()
|
||||
make("install")
|
||||
@run_after('install')
|
||||
def darwin_fix(self):
|
||||
# The shared library is not installed correctly on Darwin; fix this
|
||||
if sys.platform == 'darwin':
|
||||
fix_darwin_install_name(self.prefix.lib)
|
||||
|
|
Loading…
Reference in a new issue