diff options
author | Elizabeth Fischer <rpf2116@columbia.edu> | 2018-02-03 04:06:35 -0500 |
---|---|---|
committer | Massimiliano Culpo <massimiliano.culpo@gmail.com> | 2018-02-03 10:06:35 +0100 |
commit | be5fa8f6c20ec04c233e90bdaae34849345a5d21 (patch) | |
tree | 96ff60e274be3b6680e58433927d946a6c20a8b3 | |
parent | 4c9521b52b045a167efef5406258c51e49f40694 (diff) | |
download | spack-be5fa8f6c20ec04c233e90bdaae34849345a5d21.tar.gz spack-be5fa8f6c20ec04c233e90bdaae34849345a5d21.tar.bz2 spack-be5fa8f6c20ec04c233e90bdaae34849345a5d21.tar.xz spack-be5fa8f6c20ec04c233e90bdaae34849345a5d21.zip |
macOS Fix for GDAL (#7155)
-rw-r--r-- | var/spack/repos/builtin/packages/gdal/package.py | 17 |
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) |