summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--var/spack/repos/builtin/packages/gdal/package.py17
1 files changed, 11 insertions, 6 deletions
diff --git a/var/spack/repos/builtin/packages/gdal/package.py b/var/spack/repos/builtin/packages/gdal/package.py
index 044013c88d..6f55b8b0d0 100644
--- a/var/spack/repos/builtin/packages/gdal/package.py
+++ b/var/spack/repos/builtin/packages/gdal/package.py
@@ -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 @@ class Gdal(Package):
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)