diff options
author | Josef Kemetmueller <josef.kemetmueller@aon.at> | 2017-05-24 00:27:03 +0200 |
---|---|---|
committer | Josef Kemetmueller <josef.kemetmueller@zamg.ac.at> | 2017-06-08 07:52:16 +0000 |
commit | 7b25d31825efa3a05ad76277c9042f86f918d5ef (patch) | |
tree | d48c28e2940daa74b95ea31b01d12a56abca90d7 /pkgs/development/libraries/gdal | |
parent | cce12a644c8a4c5d540c6d30bba1fabff60e57db (diff) | |
download | nixlib-7b25d31825efa3a05ad76277c9042f86f918d5ef.tar nixlib-7b25d31825efa3a05ad76277c9042f86f918d5ef.tar.gz nixlib-7b25d31825efa3a05ad76277c9042f86f918d5ef.tar.bz2 nixlib-7b25d31825efa3a05ad76277c9042f86f918d5ef.tar.lz nixlib-7b25d31825efa3a05ad76277c9042f86f918d5ef.tar.xz nixlib-7b25d31825efa3a05ad76277c9042f86f918d5ef.tar.zst nixlib-7b25d31825efa3a05ad76277c9042f86f918d5ef.zip |
gdal: Add hdf4 support
Diffstat (limited to 'pkgs/development/libraries/gdal')
-rw-r--r-- | pkgs/development/libraries/gdal/default.nix | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/pkgs/development/libraries/gdal/default.nix b/pkgs/development/libraries/gdal/default.nix index 7e296fb9d06e..07f370b42100 100644 --- a/pkgs/development/libraries/gdal/default.nix +++ b/pkgs/development/libraries/gdal/default.nix @@ -1,6 +1,6 @@ { stdenv, fetchurl, composableDerivation, unzip, libjpeg, libtiff, zlib , postgresql, mysql, libgeotiff, pythonPackages, proj, geos, openssl -, libpng, sqlite, libspatialite, poppler +, libpng, sqlite, libspatialite, poppler, hdf4 , libiconv , netcdfSupport ? true, netcdf, hdf5 , curl }: @@ -17,15 +17,20 @@ composableDerivation.composableDerivation {} (fixed: rec { }; buildInputs = [ unzip libjpeg libtiff libpng proj openssl sqlite - libspatialite poppler ] + libspatialite poppler hdf4 ] ++ (with pythonPackages; [ python numpy wrapPython ]) ++ stdenv.lib.optional stdenv.isDarwin libiconv ++ stdenv.lib.optionals netcdfSupport [ netcdf hdf5 curl ]; hardeningDisable = [ "format" ]; - # Unset CC and CXX as they confuse libtool. - preConfigure = "unset CC CXX"; + # - Unset CC and CXX as they confuse libtool. + # - teach gdal that libdf is the legacy name for libhdf + preConfigure = '' + unset CC CXX + substituteInPlace configure \ + --replace "-lmfhdf -ldf" "-lmfhdf -lhdf" + ''; configureFlags = [ "--with-jpeg=${libjpeg.dev}" @@ -41,6 +46,7 @@ composableDerivation.composableDerivation {} (fixed: rec { "--with-python" # optional "--with-static-proj4=${proj}" # optional "--with-geos=${geos}/bin/geos-config"# optional + "--with-hdf4=${hdf4.dev}" # optional (if netcdfSupport then "--with-netcdf=${netcdf}" else "") ]; |