anchor.diff:      (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 = ''
       substituteInPlace swig/python/GNUmakefile \
         --replace "ifeq (\$(STD_UNIX_LAYOUT),\"TRUE\")" "ifeq (1,1)"
  
positive.code:     maintainers = [ stdenv.lib.maintainers.marcweber ];
      platforms = with stdenv.lib.platforms; linux ++ darwin;
    };
  })
  
negative.code:   ++ (with pythonPackages; [ python numpy wrapPython ])
    ++ stdenv.lib.optional stdenv.isDarwin libiconv
    ++ stdenv.lib.optionals netcdfSupport [ netcdf hdf5 curl ];
  
    configureFlags = [
      "--with-jpeg=${libjpeg.dev}"
  