diff options
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/gdal')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/gdal/001.3_0_1.darwin.patch | 29 | ||||
-rw-r--r-- | nixpkgs/pkgs/development/libraries/gdal/default.nix | 67 |
2 files changed, 35 insertions, 61 deletions
diff --git a/nixpkgs/pkgs/development/libraries/gdal/001.3_0_1.darwin.patch b/nixpkgs/pkgs/development/libraries/gdal/001.3_0_1.darwin.patch deleted file mode 100644 index 3d34f689120f..000000000000 --- a/nixpkgs/pkgs/development/libraries/gdal/001.3_0_1.darwin.patch +++ /dev/null @@ -1,29 +0,0 @@ -diff a/swig/python/setup.py b/swig/python/setup.py ---- a/swig/python/setup.py -+++ b/swig/python/setup.py -@@ -268,17 +268,17 @@ class gdal_ext(build_ext): - if ext.name != 'osgeo._gdalconst': - ext.extra_compile_args += [cxx11_flag] - -- # Adding arch flags here if OS X and compiler is clang -- if sys.platform == 'darwin' and [int(x) for x in os.uname()[2].split('.')] >= [11, 0, 0]: -- # since MacOS X 10.9, clang no longer accepts -mno-fused-madd -- # extra_compile_args.append('-Qunused-arguments') -- clang_flag = '-Wno-error=unused-command-line-argument-hard-error-in-future' -- if has_flag(self.compiler, clang_flag): -- ext.extra_compile_args += [clang_flag] -- else: -- clang_flag = '-Wno-error=unused-command-line-argument' -- if has_flag(self.compiler, clang_flag): -- ext.extra_compile_args += [clang_flag] -+ # Adding arch flags here if OS X and compiler is clang -+ if sys.platform == 'darwin' and [int(x) for x in os.uname()[2].split('.')] >= [11, 0, 0]: -+ # since MacOS X 10.9, clang no longer accepts -mno-fused-madd -+ # extra_compile_args.append('-Qunused-arguments') -+ clang_flag = '-Wno-error=unused-command-line-argument-hard-error-in-future' -+ if has_flag(self.compiler, clang_flag): -+ ext.extra_compile_args += [clang_flag] -+ else: -+ clang_flag = '-Wno-error=unused-command-line-argument' -+ if has_flag(self.compiler, clang_flag): -+ ext.extra_compile_args += [clang_flag] diff --git a/nixpkgs/pkgs/development/libraries/gdal/default.nix b/nixpkgs/pkgs/development/libraries/gdal/default.nix index 922877f6f461..7f3e796bbf1b 100644 --- a/nixpkgs/pkgs/development/libraries/gdal/default.nix +++ b/nixpkgs/pkgs/development/libraries/gdal/default.nix @@ -1,58 +1,61 @@ -{ stdenv, fetchFromGitHub, fetchpatch, unzip, libjpeg, libtiff, zlib -, postgresql, libmysqlclient, libgeotiff, pythonPackages, proj, geos, openssl -, libpng, sqlite, libspatialite, poppler, hdf4, qhull, giflib, expat -, libiconv, libxml2, autoreconfHook -, netcdfSupport ? true, netcdf, hdf5, curl -}: +{ stdenv, fetchFromGitHub, fetchpatch, unzip, libjpeg, libtiff, zlib, postgresql +, libmysqlclient, libgeotiff, pythonPackages, proj, geos, openssl, libpng +, sqlite, libspatialite, poppler, hdf4, qhull, giflib, expat, libiconv, libxml2 +, autoreconfHook, netcdfSupport ? true, netcdf, hdf5, curl, pkg-config }: with stdenv.lib; stdenv.mkDerivation rec { pname = "gdal"; - version = "3.0.1"; + version = "3.0.4"; src = fetchFromGitHub { owner = "OSGeo"; repo = "gdal"; rev = "v${version}"; - sha256 = "04rraqhygv8b8fy87qvdhkgx87whby9n98p3gxqr7kdrfymwnh8l"; + sha256 = "00a7q9wv8s1bmdhqxvixkq2afr8aibg3pkc76gg50r8lavf6j84c"; }; sourceRoot = "source/gdal"; - patches = [ - ./001.3_0_1.darwin.patch - (fetchpatch { - name = "CVE-2019-17545.patch"; - url = "https://github.com/OSGeo/gdal/commit/148115fcc40f1651a5d15fa34c9a8c528e7147bb.patch"; - stripLen = 1; - sha256 = "0hai59hhvrci9xwjw4lp3wc1brn00imngmqrbbs8v9yr3b0fzbgs"; - }) - ]; - - nativeBuildInputs = [ autoreconfHook ]; + nativeBuildInputs = [ autoreconfHook pkg-config ]; - buildInputs = [ unzip libjpeg libtiff libpng proj openssl sqlite - libspatialite libgeotiff poppler hdf4 qhull giflib expat libxml2 ] - ++ (with pythonPackages; [ python numpy wrapPython ]) - ++ stdenv.lib.optional stdenv.isDarwin libiconv - ++ stdenv.lib.optionals netcdfSupport [ netcdf hdf5 curl ]; + buildInputs = [ + unzip + libjpeg + libtiff + libpng + proj + openssl + sqlite + libspatialite + libgeotiff + poppler + hdf4 + qhull + giflib + expat + libxml2 + postgresql + ] ++ (with pythonPackages; [ python numpy wrapPython ]) + ++ stdenv.lib.optional stdenv.isDarwin libiconv + ++ stdenv.lib.optionals netcdfSupport [ netcdf hdf5 curl ]; configureFlags = [ "--with-expat=${expat.dev}" "--with-jpeg=${libjpeg.dev}" "--with-libtiff=${libtiff.dev}" # optional (without largetiff support) - "--with-png=${libpng.dev}" # optional + "--with-png=${libpng.dev}" # optional "--with-poppler=${poppler.dev}" # optional - "--with-libz=${zlib.dev}" # optional - "--with-pg=${postgresql}/bin/pg_config" + "--with-libz=${zlib.dev}" # optional + "--with-pg=yes" # since gdal 3.0 doesn't use ${postgresql}/bin/pg_config "--with-mysql=${libmysqlclient}/bin/mysql_config" "--with-geotiff=${libgeotiff}" "--with-sqlite3=${sqlite.dev}" "--with-spatialite=${libspatialite}" - "--with-python" # optional + "--with-python" # optional "--with-proj=${proj.dev}" # optional - "--with-geos=${geos}/bin/geos-config"# optional + "--with-geos=${geos}/bin/geos-config" # optional "--with-hdf4=${hdf4.dev}" # optional "--with-xml2=${libxml2.dev}/bin/xml2-config" # optional (if netcdfSupport then "--with-netcdf=${netcdf}" else "") @@ -65,9 +68,9 @@ stdenv.mkDerivation rec { # - Unset CC and CXX as they confuse libtool. # - teach gdal that libdf is the legacy name for libhdf preConfigure = '' - substituteInPlace configure \ + substituteInPlace configure \ --replace "-lmfhdf -ldf" "-lmfhdf -lhdf" - ''; + ''; preBuild = '' substituteInPlace swig/python/GNUmakefile \ @@ -82,7 +85,7 @@ stdenv.mkDerivation rec { meta = { description = "Translator library for raster geospatial data formats"; - homepage = https://www.gdal.org/; + homepage = "https://www.gdal.org/"; license = stdenv.lib.licenses.mit; maintainers = [ stdenv.lib.maintainers.marcweber ]; platforms = with stdenv.lib.platforms; linux ++ darwin; |