gdal: 2.1.3 -> 2.2.1

This commit is contained in:
Robin Gloster 2017-07-29 23:33:58 +02:00
parent e8f1ddcbd1
commit 400abb8877
No known key found for this signature in database
GPG Key ID: 5E4C836C632C2882

View File

@ -7,13 +7,13 @@
with stdenv.lib; with stdenv.lib;
composableDerivation.composableDerivation {} (fixed: rec { stdenv.mkDerivation rec {
version = "2.1.3"; version = "2.2.1";
name = "gdal-${version}"; name = "gdal-${version}";
src = fetchurl { src = fetchurl {
url = "http://download.osgeo.org/gdal/${version}/${name}.tar.gz"; url = "http://download.osgeo.org/gdal/${version}/${name}.tar.xz";
sha256 = "0jh7filpf5dk5iz5acj7y3y49ihnzqypxckdlj0sjigbqq6hlsmf"; sha256 = "0rk0p0k787whzzdl8m1f9wcrm7h9bf1pny3z96d93b4383arhw4j";
}; };
buildInputs = [ unzip libjpeg libtiff libpng proj openssl sqlite buildInputs = [ unzip libjpeg libtiff libpng proj openssl sqlite
@ -22,16 +22,6 @@ composableDerivation.composableDerivation {} (fixed: rec {
++ stdenv.lib.optional stdenv.isDarwin libiconv ++ stdenv.lib.optional stdenv.isDarwin libiconv
++ stdenv.lib.optionals netcdfSupport [ netcdf hdf5 curl ]; ++ stdenv.lib.optionals netcdfSupport [ netcdf hdf5 curl ];
hardeningDisable = [ "format" ];
# - 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 = [ configureFlags = [
"--with-jpeg=${libjpeg.dev}" "--with-jpeg=${libjpeg.dev}"
"--with-libtiff=${libtiff.dev}" # optional (without largetiff support) "--with-libtiff=${libtiff.dev}" # optional (without largetiff support)
@ -50,6 +40,25 @@ composableDerivation.composableDerivation {} (fixed: rec {
(if netcdfSupport then "--with-netcdf=${netcdf}" else "") (if netcdfSupport then "--with-netcdf=${netcdf}" else "")
]; ];
hardeningDisable = [ "format" ];
CXXFLAGS = "-fpermissive";
postPatch = ''
sed -i '/ifdef bool/i\
#ifdef swap\
#undef swap\
#endif' ogr/ogrsf_frmts/mysql/ogr_mysql.h
'';
# - 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"
'';
preBuild = '' preBuild = ''
substituteInPlace swig/python/GNUmakefile \ substituteInPlace swig/python/GNUmakefile \
--replace "ifeq (\$(STD_UNIX_LAYOUT),\"TRUE\")" "ifeq (1,1)" --replace "ifeq (\$(STD_UNIX_LAYOUT),\"TRUE\")" "ifeq (1,1)"
@ -68,4 +77,4 @@ composableDerivation.composableDerivation {} (fixed: rec {
maintainers = [ stdenv.lib.maintainers.marcweber ]; maintainers = [ stdenv.lib.maintainers.marcweber ];
platforms = with stdenv.lib.platforms; linux ++ darwin; platforms = with stdenv.lib.platforms; linux ++ darwin;
}; };
}) }