summary refs log tree commit diff
path: root/pkgs/development/libraries
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/libraries')
-rw-r--r--pkgs/development/libraries/SDL2/default.nix2
-rw-r--r--pkgs/development/libraries/alkimia/default.nix11
-rw-r--r--pkgs/development/libraries/at-spi2-core/default.nix4
-rw-r--r--pkgs/development/libraries/audio/libbass/default.nix4
-rw-r--r--pkgs/development/libraries/audio/rtaudio/default.nix4
-rw-r--r--pkgs/development/libraries/audio/rtmidi/default.nix4
-rw-r--r--pkgs/development/libraries/aws-c-common/default.nix6
-rw-r--r--pkgs/development/libraries/aws-sdk-cpp/default.nix4
-rw-r--r--pkgs/development/libraries/boost/1.59.nix30
-rw-r--r--pkgs/development/libraries/boost/1.67.nix32
-rw-r--r--pkgs/development/libraries/boost/1.70.nix11
-rw-r--r--pkgs/development/libraries/boost/cygwin-1.40.0-cstdint-cygwin.patch20
-rw-r--r--pkgs/development/libraries/boost/cygwin-1.40.0-iostreams-cygwin.patch24
-rw-r--r--pkgs/development/libraries/boost/cygwin-1.40.0-python-cygwin.patch35
-rw-r--r--pkgs/development/libraries/boost/cygwin-1.40.0-regex-cygwin.patch15
-rw-r--r--pkgs/development/libraries/boost/cygwin-1.45.0-jam-cygwin.patch12
-rw-r--r--pkgs/development/libraries/boost/cygwin-1.50.0-jam-pep3149.patch11
-rw-r--r--pkgs/development/libraries/boost/cygwin-1.55.0-asio-MSG_EOR.patch14
-rw-r--r--pkgs/development/libraries/boost/cygwin-1.55.0-interlocked-cygwin.patch11
-rw-r--r--pkgs/development/libraries/boost/cygwin-1.57.0-asio-cygwin.patch1835
-rw-r--r--pkgs/development/libraries/boost/cygwin-1.57.0-config-cygwin.patch76
-rw-r--r--pkgs/development/libraries/boost/cygwin-1.57.0-context-cygwin.patch600
-rw-r--r--pkgs/development/libraries/boost/cygwin-1.57.0-filesystem-cygwin.patch32
-rw-r--r--pkgs/development/libraries/boost/cygwin-1.57.0-locale-cygwin.patch81
-rw-r--r--pkgs/development/libraries/boost/cygwin-1.57.0-log-cygwin.patch46
-rw-r--r--pkgs/development/libraries/boost/cygwin-1.57.0-smart_ptr-cygwin.patch77
-rw-r--r--pkgs/development/libraries/boost/cygwin-1.57.0-system-cygwin.patch22
-rw-r--r--pkgs/development/libraries/boost/cygwin-fedora-boost-1.50.0-fix-non-utf8-files.patch22
-rw-r--r--pkgs/development/libraries/boost/cygwin-fedora-boost-1.50.0-pool.patch122
-rw-r--r--pkgs/development/libraries/boost/cygwin-fedora-boost-1.54.0-locale-unused_typedef.patch11
-rw-r--r--pkgs/development/libraries/boost/cygwin-fedora-boost-1.54.0-pool-max_chunks_shadow.patch14
-rw-r--r--pkgs/development/libraries/boost/cygwin-fedora-boost-1.54.0-python-unused_typedef.patch15
-rw-r--r--pkgs/development/libraries/boost/cygwin-fedora-boost-1.57.0-move-is_class.patch20
-rw-r--r--pkgs/development/libraries/boost/cygwin-fedora-boost-1.57.0-mpl-print.patch31
-rw-r--r--pkgs/development/libraries/boost/cygwin-fedora-boost-1.57.0-pool-test_linking.patch33
-rw-r--r--pkgs/development/libraries/boost/cygwin-fedora-boost-1.57.0-signals2-weak_ptr.patch10
-rw-r--r--pkgs/development/libraries/boost/cygwin-fedora-boost-1.57.0-spirit-unused_typedef.patch19
-rw-r--r--pkgs/development/libraries/boost/cygwin-fedora-boost-1.57.0-uuid-comparison.patch11
-rw-r--r--pkgs/development/libraries/boost/generic.nix5
-rw-r--r--pkgs/development/libraries/bullet/default.nix2
-rw-r--r--pkgs/development/libraries/c-ares/release.patch19
-rw-r--r--pkgs/development/libraries/c-blosc/default.nix4
-rw-r--r--pkgs/development/libraries/cfitsio/default.nix22
-rw-r--r--pkgs/development/libraries/clucene-core/2.x.nix2
-rw-r--r--pkgs/development/libraries/crypto++/default.nix12
-rw-r--r--pkgs/development/libraries/ctl/default.nix35
-rw-r--r--pkgs/development/libraries/ctl/source.nix11
-rw-r--r--pkgs/development/libraries/dav1d/default.nix4
-rw-r--r--pkgs/development/libraries/eccodes/default.nix4
-rw-r--r--pkgs/development/libraries/fflas-ffpack/default.nix37
-rw-r--r--pkgs/development/libraries/ffmpeg-full/default.nix14
-rw-r--r--pkgs/development/libraries/ffmpeg/4.nix4
-rw-r--r--pkgs/development/libraries/ffmpeg/vpxenc-0.10-libvpx-1.5.patch24
-rw-r--r--pkgs/development/libraries/ffmpeg/vpxenc-1.2-libvpx-1.5.patch24
-rw-r--r--pkgs/development/libraries/freetds/default.nix4
-rw-r--r--pkgs/development/libraries/freetype/disable-pcf-long-family-names.patch15
-rw-r--r--pkgs/development/libraries/frei0r/default.nix12
-rw-r--r--pkgs/development/libraries/g2o/default.nix24
-rw-r--r--pkgs/development/libraries/gdcm/default.nix4
-rw-r--r--pkgs/development/libraries/gdk-pixbuf/no-mime-sniffing.patch18
-rw-r--r--pkgs/development/libraries/gegl/4.0.nix32
-rw-r--r--pkgs/development/libraries/geoclue/add-option-for-installation-sysconfdir.patch23
-rw-r--r--pkgs/development/libraries/geoclue/default.nix4
-rw-r--r--pkgs/development/libraries/geos/default.nix4
-rw-r--r--pkgs/development/libraries/givaro/default.nix30
-rw-r--r--pkgs/development/libraries/glib/default.nix4
-rw-r--r--pkgs/development/libraries/glibc/glibc-remove-datetime-from-nscd.patch11
-rw-r--r--pkgs/development/libraries/gnutls/3.5.10.nix10
-rw-r--r--pkgs/development/libraries/gnutls/3.6.nix22
-rw-r--r--pkgs/development/libraries/gnutls/default.nix (renamed from pkgs/development/libraries/gnutls/generic.nix)52
-rw-r--r--pkgs/development/libraries/gnutls/nix-ssl-cert-file.patch19
-rw-r--r--pkgs/development/libraries/gnutls/no-security-framework.patch126
-rw-r--r--pkgs/development/libraries/gobject-introspection/absolute_shlib_path.patch50
-rw-r--r--pkgs/development/libraries/gobject-introspection/default.nix5
-rw-r--r--pkgs/development/libraries/gobject-introspection/macos-shared-library.patch36
-rw-r--r--pkgs/development/libraries/gobject-introspection/test_shlibs.patch31
-rw-r--r--pkgs/development/libraries/gpgme/gpgme_libsuffix.patch12
-rw-r--r--pkgs/development/libraries/gsl/default.nix6
-rw-r--r--pkgs/development/libraries/gsl/disable-fma.patch32
-rw-r--r--pkgs/development/libraries/gsl/gsl-1_16.nix5
-rw-r--r--pkgs/development/libraries/gtksourceview/3.x.nix4
-rw-r--r--pkgs/development/libraries/herqq/gcc6.patch1320
-rw-r--r--pkgs/development/libraries/hyperscan/default.nix50
-rw-r--r--pkgs/development/libraries/java/lombok/default.nix4
-rw-r--r--pkgs/development/libraries/leptonica/default.nix33
-rw-r--r--pkgs/development/libraries/libao/default.nix2
-rw-r--r--pkgs/development/libraries/libbap/default.nix6
-rw-r--r--pkgs/development/libraries/libcdio/default.nix6
-rw-r--r--pkgs/development/libraries/libcroco/default.nix19
-rw-r--r--pkgs/development/libraries/libcsptr/default.nix23
-rw-r--r--pkgs/development/libraries/libdazzle/default.nix4
-rw-r--r--pkgs/development/libraries/libdrm/default.nix9
-rw-r--r--pkgs/development/libraries/libdrm/libdrm-apple.patch88
-rw-r--r--pkgs/development/libraries/libdvdread/default.nix4
-rw-r--r--pkgs/development/libraries/libfaketime/default.nix5
-rw-r--r--pkgs/development/libraries/libgcrypt/1.5.nix10
-rw-r--r--pkgs/development/libraries/libgda/default.nix4
-rw-r--r--pkgs/development/libraries/libiio/default.nix4
-rw-r--r--pkgs/development/libraries/libimobiledevice/disable_sslv3.patch25
-rw-r--r--pkgs/development/libraries/libjpeg-turbo/default.nix19
-rw-r--r--pkgs/development/libraries/libjpeg-turbo/djpeg-rgb-islow-icc-cmp.patch11
-rw-r--r--pkgs/development/libraries/liblcf/default.nix4
-rw-r--r--pkgs/development/libraries/libmbim/default.nix4
-rw-r--r--pkgs/development/libraries/libnice/default.nix17
-rw-r--r--pkgs/development/libraries/libnsl/cdefs.patch30
-rw-r--r--pkgs/development/libraries/libnsl/default.nix12
-rw-r--r--pkgs/development/libraries/libnsl/nis_h.patch45
-rw-r--r--pkgs/development/libraries/libosinfo/default.nix7
-rw-r--r--pkgs/development/libraries/libpointmatcher/default.nix21
-rw-r--r--pkgs/development/libraries/libproxy/default.nix8
-rw-r--r--pkgs/development/libraries/libqmi/default.nix4
-rw-r--r--pkgs/development/libraries/libressl/default.nix20
-rw-r--r--pkgs/development/libraries/libsass/default.nix8
-rw-r--r--pkgs/development/libraries/libseccomp/default.nix6
-rw-r--r--pkgs/development/libraries/libshout/default.nix4
-rw-r--r--pkgs/development/libraries/libsnark/darwin-fix-clock-gettime.patch41
-rw-r--r--pkgs/development/libraries/libsnark/default.nix2
-rw-r--r--pkgs/development/libraries/libsoup/default.nix4
-rw-r--r--pkgs/development/libraries/libtins/default.nix6
-rw-r--r--pkgs/development/libraries/libu2f-host/default.nix7
-rw-r--r--pkgs/development/libraries/libusb1/default.nix10
-rw-r--r--pkgs/development/libraries/libuv/default.nix6
-rw-r--r--pkgs/development/libraries/libva/default.nix4
-rw-r--r--pkgs/development/libraries/libwmf/CVE-2006-3376.patch28
-rw-r--r--pkgs/development/libraries/libwmf/CVE-2009-1364.patch11
-rw-r--r--pkgs/development/libraries/libwmf/CVE-2015-0848+4588+4695+4696.patch186
-rw-r--r--pkgs/development/libraries/libwmf/default.nix34
-rw-r--r--pkgs/development/libraries/libx86emu/default.nix4
-rw-r--r--pkgs/development/libraries/libxmlb/default.nix6
-rw-r--r--pkgs/development/libraries/libxslt/default.nix10
-rw-r--r--pkgs/development/libraries/linbox/default.nix39
-rw-r--r--pkgs/development/libraries/mbedtls/default.nix4
-rw-r--r--pkgs/development/libraries/mesa/darwin-clock-gettime.patch76
-rw-r--r--pkgs/development/libraries/mesa/default.nix2
-rw-r--r--pkgs/development/libraries/microsoft_gsl/default.nix15
-rw-r--r--pkgs/development/libraries/nv-codec-headers/default.nix2
-rw-r--r--pkgs/development/libraries/oniguruma/default.nix4
-rw-r--r--pkgs/development/libraries/opencascade-occt/default.nix4
-rw-r--r--pkgs/development/libraries/opencsg/default.nix35
-rw-r--r--pkgs/development/libraries/opencsg/fix-pro-files.patch21
-rw-r--r--pkgs/development/libraries/openexr/default.nix26
-rw-r--r--pkgs/development/libraries/pcre2/default.nix4
-rw-r--r--pkgs/development/libraries/physics/rivet/key_val.patch12
-rw-r--r--pkgs/development/libraries/physics/rivet/zaxis_fix.patch42
-rw-r--r--pkgs/development/libraries/pixman/default.nix4
-rw-r--r--pkgs/development/libraries/polkit/default.nix38
-rw-r--r--pkgs/development/libraries/portaudio/default.nix2
-rw-r--r--pkgs/development/libraries/qscintilla/default.nix10
-rw-r--r--pkgs/development/libraries/qt-4.x/4.8/default.nix2
-rw-r--r--pkgs/development/libraries/qt-4.x/4.8/dlopen-webkit-nsplugin.diff4
-rw-r--r--pkgs/development/libraries/qt-5/5.11/default.nix32
-rw-r--r--pkgs/development/libraries/qt-5/5.11/qtbase-darwin-nseventtype.patch13
-rw-r--r--pkgs/development/libraries/qt-5/5.11/qtbase-darwin-revert-69221.patch73
-rw-r--r--pkgs/development/libraries/qt-5/5.11/qtbase-darwin.patch70
-rw-r--r--pkgs/development/libraries/qt-5/5.11/qtbase-revert-no-macos10.10.patch102
-rw-r--r--pkgs/development/libraries/qt-5/5.11/qtwebengine-clang-fix.patch30
-rw-r--r--pkgs/development/libraries/qt-5/5.11/qtwebengine-darwin-old-sdk.patch21
-rw-r--r--pkgs/development/libraries/qt-5/5.11/qtwebengine-darwin-sdk-10.10.patch160
-rw-r--r--pkgs/development/libraries/qt-5/5.11/qtwebkit-darwin-no-qos-classes.patch11
-rw-r--r--pkgs/development/libraries/qt-5/5.11/qtwebkit-darwin-no-readline.patch45
-rw-r--r--pkgs/development/libraries/qt-5/5.12/default.nix12
-rw-r--r--pkgs/development/libraries/qt-5/5.12/qtbase-darwin-nseventtype.patch13
-rw-r--r--pkgs/development/libraries/qt-5/5.12/qtbase-darwin.patch70
-rw-r--r--pkgs/development/libraries/qt-5/5.12/qtbase-revert-no-macos10.10.patch102
-rw-r--r--pkgs/development/libraries/qt-5/5.9/default.nix2
-rw-r--r--pkgs/development/libraries/qt-5/5.9/qtbase-darwin.patch35
-rw-r--r--pkgs/development/libraries/qt-5/modules/qtbase.nix53
-rw-r--r--pkgs/development/libraries/qt-5/modules/qtwebengine.nix7
-rw-r--r--pkgs/development/libraries/qt-5/modules/qtwebkit.nix3
-rw-r--r--pkgs/development/libraries/quazip/default.nix13
-rw-r--r--pkgs/development/libraries/range-v3/default.nix4
-rw-r--r--pkgs/development/libraries/science/math/fenics/default.nix9
-rw-r--r--pkgs/development/libraries/science/math/openblas/default.nix1
-rw-r--r--pkgs/development/libraries/sqlite/analyzer.nix6
-rw-r--r--pkgs/development/libraries/sqlite/default.nix8
-rw-r--r--pkgs/development/libraries/tbb/default.nix4
-rw-r--r--pkgs/development/libraries/tk/8.6.nix4
-rw-r--r--pkgs/development/libraries/tk/generic.nix11
-rw-r--r--pkgs/development/libraries/utf8proc/default.nix16
-rw-r--r--pkgs/development/libraries/v8/build-standalone-static-library.patch14
-rw-r--r--pkgs/development/libraries/v8/disable-building-tests.patch27
-rw-r--r--pkgs/development/libraries/v8/fPIC-for-static.patch13
-rw-r--r--pkgs/development/libraries/vte/default.nix4
-rw-r--r--pkgs/development/libraries/wxwidgets/2.9/default.nix3
-rw-r--r--pkgs/development/libraries/wxwidgets/3.0/default.nix1
-rw-r--r--pkgs/development/libraries/wxwidgets/3.0/mac.nix1
-rw-r--r--pkgs/development/libraries/xmlsec/default.nix4
187 files changed, 874 insertions, 6813 deletions
diff --git a/pkgs/development/libraries/SDL2/default.nix b/pkgs/development/libraries/SDL2/default.nix
index 8f1b7d93d00..2909b16d65d 100644
--- a/pkgs/development/libraries/SDL2/default.nix
+++ b/pkgs/development/libraries/SDL2/default.nix
@@ -9,6 +9,7 @@
 , dbusSupport ? stdenv.isLinux && !stdenv.hostPlatform.isAndroid, dbus
 , udevSupport ? false, udev
 , ibusSupport ? false, ibus
+, fcitxSupport ? false, fcitx
 , pulseaudioSupport ? config.pulseaudio or stdenv.isLinux && !stdenv.hostPlatform.isAndroid
 , libpulseaudio
 , AudioUnit, Cocoa, CoreAudio, CoreServices, ForceFeedback, OpenGL
@@ -55,6 +56,7 @@ stdenv.mkDerivation rec {
   buildInputs = [ libiconv ]
     ++ dlopenBuildInputs
     ++ optional  ibusSupport ibus
+    ++ optional  fcitxSupport fcitx
     ++ optionals stdenv.isDarwin [
       AudioUnit Cocoa CoreAudio CoreServices ForceFeedback OpenGL
       # Needed for NSDefaultRunLoopMode symbols.
diff --git a/pkgs/development/libraries/alkimia/default.nix b/pkgs/development/libraries/alkimia/default.nix
index 6f4fd09015e..f98c8fa480e 100644
--- a/pkgs/development/libraries/alkimia/default.nix
+++ b/pkgs/development/libraries/alkimia/default.nix
@@ -1,19 +1,20 @@
 { mkDerivation, fetchurl, lib
-, extra-cmake-modules, doxygen, graphviz, qtbase, mpir
+, extra-cmake-modules, doxygen, graphviz, qtbase, qtwebkit, mpir
+, kdelibs4support, plasma-framework, knewstuff, kpackage
 }:
 
 mkDerivation rec {
   name = "alkimia-${version}";
-  version = "7.0.1";
+  version = "8.0.1";
 
   src = fetchurl {
-    url = "mirror://kde/stable/alkimia/${version}/src/${name}.tar.xz";
-    sha256 = "1fri76465058fgsyrmdrc3hj1javz4g10mfzqp5rsj7qncjr1i22";
+    url = "mirror://kde/stable/alkimia/${version}/${name}.tar.xz";
+    sha256 = "059i6vn36sdq5zn2vqzh4asvvgdgs7n478nk9phvb5gdys01fq7m";
   };
 
   nativeBuildInputs = [ extra-cmake-modules doxygen graphviz ];
 
-  buildInputs = [ qtbase ];
+  buildInputs = [ qtbase qtwebkit kdelibs4support plasma-framework knewstuff kpackage ];
   propagatedBuildInputs = [ mpir ];
 
   meta = {
diff --git a/pkgs/development/libraries/at-spi2-core/default.nix b/pkgs/development/libraries/at-spi2-core/default.nix
index 0fc50f2c641..e5d5313eeb1 100644
--- a/pkgs/development/libraries/at-spi2-core/default.nix
+++ b/pkgs/development/libraries/at-spi2-core/default.nix
@@ -19,11 +19,11 @@
 stdenv.mkDerivation rec {
   name = "${pname}-${version}";
   pname = "at-spi2-core";
-  version = "2.32.0";
+  version = "2.32.1";
 
   src = fetchurl {
     url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${name}.tar.xz";
-    sha256 = "083j1v7kdjrpjsv1b9dl3d8xqj39jyp4cfn8i9gbbm7q2g93b923";
+    sha256 = "0lqd7gsl471v6538iighkvb21gjglcb9pklvas32rjpsxcvsjaiw";
   };
 
   outputs = [ "out" "dev" ];
diff --git a/pkgs/development/libraries/audio/libbass/default.nix b/pkgs/development/libraries/audio/libbass/default.nix
index 390ca6bb04b..0e1445ca9ee 100644
--- a/pkgs/development/libraries/audio/libbass/default.nix
+++ b/pkgs/development/libraries/audio/libbass/default.nix
@@ -11,7 +11,7 @@ let
         x86_64-linux = "x64/libbass.so";
       };
       urlpath = "bass${version}-linux.zip";
-      sha256 = "0alxx7knkvzwwifqrmzavafwq53flja7s1ckaabk6p2ir2f0j5cp";
+      sha256 = "1hjxp1akj8367qlglv5rqpwq2dimfz3bkllwq39abavz4sp8smjz";
     };
 
     bass_fx = {
@@ -21,7 +21,7 @@ let
         x86_64-linux = "x64/libbass_fx.so";
       };
       urlpath = "z/0/bass_fx${version}-linux.zip";
-      sha256 = "0j1cbq88j3vnqf2bibcqnfhciz904w48ldgycyh9d8954hwyg22m";
+      sha256 = "1q0g74z7iyhxqps5b3gnnbic8v2jji1r0mkvais57lsx8y21sbin";
     };
   };
 
diff --git a/pkgs/development/libraries/audio/rtaudio/default.nix b/pkgs/development/libraries/audio/rtaudio/default.nix
index 7f1e3d941a1..2adec665e1c 100644
--- a/pkgs/development/libraries/audio/rtaudio/default.nix
+++ b/pkgs/development/libraries/audio/rtaudio/default.nix
@@ -1,14 +1,14 @@
 { stdenv, fetchFromGitHub, autoconf, automake, libtool, libjack2,  alsaLib, rtmidi }:
 
 stdenv.mkDerivation rec {
-  version = "5.0.0";
+  version = "5.1.0";
   name = "rtaudio-${version}";
 
   src = fetchFromGitHub {
     owner = "thestk";
     repo = "rtaudio";
     rev = "${version}";
-    sha256 = "0jkqnhc2pq31nmq4daxhmqdjgv2qi4ib27hwms2r5zhnmvvzlr67";
+    sha256 = "1pglnjz907ajlhnlnig3p0sx7hdkpggr8ss7b3wzf1lykzgv9l52";
   };
 
   enableParallelBuilding = true;
diff --git a/pkgs/development/libraries/audio/rtmidi/default.nix b/pkgs/development/libraries/audio/rtmidi/default.nix
index 0f3f1fce42b..41bb9ca9f11 100644
--- a/pkgs/development/libraries/audio/rtmidi/default.nix
+++ b/pkgs/development/libraries/audio/rtmidi/default.nix
@@ -1,14 +1,14 @@
 { stdenv, fetchFromGitHub, autoconf, automake, libtool, libjack2, alsaLib, pkgconfig }:
 
 stdenv.mkDerivation rec {
-  version = "2.1.1";
+  version = "4.0.0";
   name = "rtmidi-${version}";
 
   src = fetchFromGitHub {
     owner = "thestk";
     repo = "rtmidi";
     rev = "${version}";
-    sha256 = "11pl45lp8sq5xkpipwk622w508nw0qcxr03ibicqn1lsws0hva96";
+    sha256 = "1g31p6a96djlbk9jh5r4pjly3x76lhccva9hrw6xzdma8dsjzgyq";
   };
 
   enableParallelBuilding = true;
diff --git a/pkgs/development/libraries/aws-c-common/default.nix b/pkgs/development/libraries/aws-c-common/default.nix
index 5b938ddb03c..c8f284acc13 100644
--- a/pkgs/development/libraries/aws-c-common/default.nix
+++ b/pkgs/development/libraries/aws-c-common/default.nix
@@ -2,19 +2,17 @@
 
 stdenv.mkDerivation rec {
   pname = "aws-c-common";
-  version = "0.3.4";
+  version = "0.3.9";
 
   src = fetchFromGitHub {
     owner = "awslabs";
     repo = pname;
     rev = "v${version}";
-    sha256 = "1z02ndb9jjn0p5bcc49pq0d8c0q2pq33dlszw77l76jkhrfx0921";
+    sha256 = "04wrmrw83vypqzsq88b2q8kp5sfbv0qsci3bcxw0c2mfxqk8358n";
   };
 
   nativeBuildInputs = [ cmake ];
 
-  buildInputs = lib.optional stdenv.hostPlatform.isMusl libexecinfo;
-
   NIX_CFLAGS_COMPILE = lib.optionals stdenv.isDarwin [
     "-Wno-nullability-extension"
     "-Wno-typedef-redefinition"
diff --git a/pkgs/development/libraries/aws-sdk-cpp/default.nix b/pkgs/development/libraries/aws-sdk-cpp/default.nix
index e53c75e6f74..f46571587ef 100644
--- a/pkgs/development/libraries/aws-sdk-cpp/default.nix
+++ b/pkgs/development/libraries/aws-sdk-cpp/default.nix
@@ -9,13 +9,13 @@
 
 stdenv.mkDerivation rec {
   name = "aws-sdk-cpp-${version}";
-  version = "1.7.56";
+  version = "1.7.90";
 
   src = fetchFromGitHub {
     owner = "awslabs";
     repo = "aws-sdk-cpp";
     rev = version;
-    sha256 = "0vfw5bqlwm5r0ikziz3jx6yb5v24lwig0m62979zy3ndx36kpb9b";
+    sha256 = "0zpqi612qmm0n53crxiisv0vdif43ymg13kafy6vv43j2wmh66ga";
   };
 
   # FIXME: might be nice to put different APIs in different outputs
diff --git a/pkgs/development/libraries/boost/1.59.nix b/pkgs/development/libraries/boost/1.59.nix
index 603d7883c64..f4931dfe547 100644
--- a/pkgs/development/libraries/boost/1.59.nix
+++ b/pkgs/development/libraries/boost/1.59.nix
@@ -7,34 +7,4 @@ callPackage ./generic.nix (args // rec {
     url = "mirror://sourceforge/boost/boost_1_59_0.tar.bz2";
     sha256 = "1jj1aai5rdmd72g90a3pd8sw9vi32zad46xv5av8fhnr48ir6ykj";
   };
-
-  patches = stdenv.lib.optionals stdenv.isCygwin [
-    ./cygwin-fedora-boost-1.50.0-fix-non-utf8-files.patch
-    ./cygwin-fedora-boost-1.50.0-pool.patch
-    ./cygwin-fedora-boost-1.57.0-mpl-print.patch
-    ./cygwin-fedora-boost-1.57.0-spirit-unused_typedef.patch
-    ./cygwin-fedora-boost-1.54.0-locale-unused_typedef.patch
-    ./cygwin-fedora-boost-1.54.0-python-unused_typedef.patch
-    ./cygwin-fedora-boost-1.57.0-pool-test_linking.patch
-    ./cygwin-fedora-boost-1.54.0-pool-max_chunks_shadow.patch
-    ./cygwin-fedora-boost-1.57.0-signals2-weak_ptr.patch
-    ./cygwin-fedora-boost-1.57.0-uuid-comparison.patch
-    ./cygwin-fedora-boost-1.57.0-move-is_class.patch
-    ./cygwin-1.40.0-cstdint-cygwin.patch
-    ./cygwin-1.57.0-asio-cygwin.patch
-    ./cygwin-1.55.0-asio-MSG_EOR.patch
-    ./cygwin-1.57.0-config-cygwin.patch
-    ./cygwin-1.57.0-context-cygwin.patch
-    ./cygwin-1.57.0-filesystem-cygwin.patch
-    ./cygwin-1.55.0-interlocked-cygwin.patch
-    ./cygwin-1.40.0-iostreams-cygwin.patch
-    ./cygwin-1.57.0-locale-cygwin.patch
-    ./cygwin-1.57.0-log-cygwin.patch
-    ./cygwin-1.40.0-python-cygwin.patch
-    ./cygwin-1.40.0-regex-cygwin.patch
-    ./cygwin-1.57.0-smart_ptr-cygwin.patch
-    ./cygwin-1.57.0-system-cygwin.patch
-    ./cygwin-1.45.0-jam-cygwin.patch
-    ./cygwin-1.50.0-jam-pep3149.patch
-  ];
 })
diff --git a/pkgs/development/libraries/boost/1.67.nix b/pkgs/development/libraries/boost/1.67.nix
index 938892ef355..406e63b9622 100644
--- a/pkgs/development/libraries/boost/1.67.nix
+++ b/pkgs/development/libraries/boost/1.67.nix
@@ -3,11 +3,33 @@
 callPackage ./generic.nix (args // rec {
   version = "1.67.0";
 
-  patches = [ (fetchpatch {
-    url = "https://github.com/boostorg/lockfree/commit/12726cda009a855073b9bedbdce57b6ce7763da2.patch";
-    sha256 = "0x65nkwzv8fdacj8sw5njl3v63jj19dirrpklbwy6qpsncw7fc7h";
-    stripLen = 1;
-  })];
+  patches = [
+    (fetchpatch {
+      url = "https://github.com/boostorg/lockfree/commit/12726cda009a855073b9bedbdce57b6ce7763da2.patch";
+      sha256 = "0x65nkwzv8fdacj8sw5njl3v63jj19dirrpklbwy6qpsncw7fc7h";
+      stripLen = 1;
+    })
+  ] ++ stdenv.lib.optionals stdenv.cc.isClang [
+    # Fixes https://github.com/boostorg/atomic/issues/15
+    (fetchpatch {
+      url = https://github.com/boostorg/atomic/commit/6e14ca24dab50ad4c1fa8c27c7dd6f1cb791b534.patch;
+      sha256 = "102g35ygvv8cxagp9651284xk4vybk93q2fm577y4mdxf5k46b7a";
+      stripLen = 1;
+    })
+
+    # Needed for the next patch
+    (fetchpatch {
+      url = https://github.com/boostorg/asio/commit/38cb19719748ad56b14d73ca1fff5828f36e5894.patch;
+      sha256 = "0cj9cxz9rfbsx8p8f5alxx00dq3r7g0vh23j68bbxbs9gq1arq2n";
+      stripLen = 1;
+    })
+    # Fixes https://github.com/boostorg/asio/pull/91
+    (fetchpatch {
+      url = https://github.com/boostorg/asio/commit/43874d5497414c67655d901e48c939ef01337edb.patch;
+      sha256 = "1c2ds164s2ygvpb4785p4ncv8ywbpm08cphirb99xp4mqvb693is";
+      stripLen = 1;
+    })
+  ];
 
   src = fetchurl {
     url = "mirror://sourceforge/boost/boost_1_67_0.tar.bz2";
diff --git a/pkgs/development/libraries/boost/1.70.nix b/pkgs/development/libraries/boost/1.70.nix
new file mode 100644
index 00000000000..5f7b39c1189
--- /dev/null
+++ b/pkgs/development/libraries/boost/1.70.nix
@@ -0,0 +1,11 @@
+{ stdenv, callPackage, fetchurl, fetchpatch, ... } @ args:
+
+callPackage ./generic.nix (args // rec {
+  version = "1.70.0";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/boost/boost_1_70_0.tar.bz2";
+    # SHA256 from http://www.boost.org/users/history/version_1_70_0.html
+    sha256 = "430ae8354789de4fd19ee52f3b1f739e1fba576f0aded0897c3c2bc00fb38778";
+  };
+})
diff --git a/pkgs/development/libraries/boost/cygwin-1.40.0-cstdint-cygwin.patch b/pkgs/development/libraries/boost/cygwin-1.40.0-cstdint-cygwin.patch
deleted file mode 100644
index 61791c60d9e..00000000000
--- a/pkgs/development/libraries/boost/cygwin-1.40.0-cstdint-cygwin.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-These were fixed in ~1.7.0-46
-
---- boost_1_40_0/boost/cstdint.hpp	2009-01-14 04:18:19.000000000 -0600
-+++ boost_1_40_0/boost/cstdint.hpp	2009-08-27 23:41:34.063543700 -0500
-@@ -40,15 +40,6 @@
- #   include <inttypes.h>
- # else
- #   include <stdint.h>
--
--// There is a bug in Cygwin two _C macros
--#   if defined(__STDC_CONSTANT_MACROS) && defined(__CYGWIN__)
--#     undef INTMAX_C
--#     undef UINTMAX_C
--#     define INTMAX_C(c) c##LL
--#     define UINTMAX_C(c) c##ULL
--#   endif
--
- # endif
- 
- #ifdef __QNX__
diff --git a/pkgs/development/libraries/boost/cygwin-1.40.0-iostreams-cygwin.patch b/pkgs/development/libraries/boost/cygwin-1.40.0-iostreams-cygwin.patch
deleted file mode 100644
index 6641ba823b1..00000000000
--- a/pkgs/development/libraries/boost/cygwin-1.40.0-iostreams-cygwin.patch
+++ /dev/null
@@ -1,24 +0,0 @@
---- boost_1_40_0/boost/iostreams/detail/config/wide_streams.hpp	2008-03-22 16:45:55.000000000 -0500
-+++ boost_1_40_0/boost/iostreams/detail/config/wide_streams.hpp	2009-08-27 23:41:34.082544800 -0500
-@@ -44,8 +44,7 @@
- //------------------Locale support--------------------------------------------//
- 
- #ifndef BOOST_IOSTREAMS_NO_LOCALE
--# if defined(BOOST_NO_STD_LOCALE) || \
--     defined(__CYGWIN__) && \
-+# if defined(BOOST_NO_STD_LOCALE) && \
-      ( !defined(__MSL_CPP__) || defined(_MSL_NO_WCHART_CPP_SUPPORT) ) \
-      /**/
- #  define BOOST_IOSTREAMS_NO_LOCALE
---- boost_1_40_0/boost/iostreams/detail/config/windows_posix.hpp	2008-03-22 16:45:55.000000000 -0500
-+++ boost_1_40_0/boost/iostreams/detail/config/windows_posix.hpp	2009-08-27 23:41:34.087545100 -0500
-@@ -13,8 +13,7 @@
- 
- // BOOST_IOSTREAMS_POSIX or BOOST_IOSTREAMS_WINDOWS specify which API to use.
- #if !defined( BOOST_IOSTREAMS_WINDOWS ) && !defined( BOOST_IOSTREAMS_POSIX )
--# if (defined(_WIN32) || defined(__WIN32__) || defined(WIN32)) && \
--     !defined(__CYGWIN__) \
-+# if (defined(_WIN32) || defined(__WIN32__) || defined(WIN32))
-      /**/
- #  define BOOST_IOSTREAMS_WINDOWS
- # else
diff --git a/pkgs/development/libraries/boost/cygwin-1.40.0-python-cygwin.patch b/pkgs/development/libraries/boost/cygwin-1.40.0-python-cygwin.patch
deleted file mode 100644
index 7932b0e124b..00000000000
--- a/pkgs/development/libraries/boost/cygwin-1.40.0-python-cygwin.patch
+++ /dev/null
@@ -1,35 +0,0 @@
---- boost_1_40_0/boost/python/detail/config.hpp	2007-11-25 12:07:19.000000000 -0600
-+++ boost_1_40_0/boost/python/detail/config.hpp	2009-08-27 23:41:34.092545400 -0500
-@@ -83,7 +83,7 @@
- #     endif
- #     define BOOST_PYTHON_DECL_FORWARD
- #     define BOOST_PYTHON_DECL_EXCEPTION __attribute__ ((__visibility__("default")))
--#  elif (defined(_WIN32) || defined(__CYGWIN__))
-+#  elif defined(_WIN32)
- #     if defined(BOOST_PYTHON_SOURCE)
- #        define BOOST_PYTHON_DECL __declspec(dllexport)
- #        define BOOST_PYTHON_BUILD_DLL
---- boost_1_40_0/boost/python/detail/wrap_python.hpp	2007-04-27 17:16:47.000000000 -0500
-+++ boost_1_40_0/boost/python/detail/wrap_python.hpp	2009-08-27 23:41:34.096545600 -0500
-@@ -82,8 +82,8 @@
- // Some things we need in order to get Python.h to work with compilers other
- // than MSVC on Win32
- //
--#if defined(_WIN32) || defined(__CYGWIN__)
--# if defined(__GNUC__) && defined(__CYGWIN__)
-+#if defined(_WIN32)
-+# if defined(__GNUC__)
- 
- #  define SIZEOF_LONG 4
- 
---- boost_1_40_0/boost/python/module_init.hpp	2007-06-07 13:08:54.000000000 -0500
-+++ boost_1_40_0/boost/python/module_init.hpp	2009-08-27 23:41:34.101545900 -0500
-@@ -15,7 +15,7 @@ BOOST_PYTHON_DECL void init_module(char 
- 
- }}}
- 
--#  if (defined(_WIN32) || defined(__CYGWIN__)) && !defined(BOOST_PYTHON_STATIC_MODULE)
-+#  if defined(_WIN32) && !defined(BOOST_PYTHON_STATIC_MODULE)
- 
- #   define BOOST_PYTHON_MODULE_INIT(name)               \
- void init_module_##name();                              \
diff --git a/pkgs/development/libraries/boost/cygwin-1.40.0-regex-cygwin.patch b/pkgs/development/libraries/boost/cygwin-1.40.0-regex-cygwin.patch
deleted file mode 100644
index 969bb814bd1..00000000000
--- a/pkgs/development/libraries/boost/cygwin-1.40.0-regex-cygwin.patch
+++ /dev/null
@@ -1,15 +0,0 @@
---- boost_1_40_0/boost/regex/v4/fileiter.hpp	2007-11-25 12:07:19.000000000 -0600
-+++ boost_1_40_0/boost/regex/v4/fileiter.hpp	2009-08-27 23:41:34.106546200 -0500
-@@ -28,11 +28,7 @@
- 
- #ifndef BOOST_REGEX_NO_FILEITER
- 
--#if (defined(__CYGWIN__) || defined(__CYGWIN32__)) && !defined(BOOST_REGEX_NO_W32)
--#error "Sorry, can't mix <windows.h> with STL code and gcc compiler: if you ran configure, try again with configure --disable-ms-windows"
--#define BOOST_REGEX_FI_WIN32_MAP
--#define BOOST_REGEX_FI_POSIX_DIR
--#elif (defined(__WIN32__) || defined(_WIN32) || defined(WIN32)) && !defined(BOOST_REGEX_NO_W32)
-+#if (defined(__WIN32__) || defined(_WIN32) || defined(WIN32)) && !defined(BOOST_REGEX_NO_W32)
- #define BOOST_REGEX_FI_WIN32_MAP
- #define BOOST_REGEX_FI_WIN32_DIR
- #else
diff --git a/pkgs/development/libraries/boost/cygwin-1.45.0-jam-cygwin.patch b/pkgs/development/libraries/boost/cygwin-1.45.0-jam-cygwin.patch
deleted file mode 100644
index 1a00851fa92..00000000000
--- a/pkgs/development/libraries/boost/cygwin-1.45.0-jam-cygwin.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-OS_CYGWIN is used to assume cygpath, Win32-isms
-
---- boost_1_48_0/tools/build/src/engine/jam.h
-+++ boost_1_48_0/tools/build/src/engine/jam.h
-@@ -245,7 +245,6 @@
- #endif
- #if defined(__cygwin__) || defined(__CYGWIN__)
-     #define OSMINOR "OS=CYGWIN"
--    #define OS_CYGWIN
- #endif
- #if defined(__FreeBSD__) && !defined(__DragonFly__)
-     #define OSMINOR "OS=FREEBSD"
diff --git a/pkgs/development/libraries/boost/cygwin-1.50.0-jam-pep3149.patch b/pkgs/development/libraries/boost/cygwin-1.50.0-jam-pep3149.patch
deleted file mode 100644
index 4bc6ec9d36e..00000000000
--- a/pkgs/development/libraries/boost/cygwin-1.50.0-jam-pep3149.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/tools/build/src/tools/python.jam	2012-04-25 22:35:55.000000000 -0500
-+++ b/tools/build/src/tools/python.jam	2013-01-21 07:22:30.814373200 -0600
-@@ -376,7 +376,7 @@ local rule path-to-native ( paths * )
- #
- local rule split-version ( version )
- {
--    local major-minor = [ MATCH ^([0-9]+)\.([0-9]+)(.*)$ : $(version) : 1 2 3 ] ;
-+    local major-minor = [ MATCH ^([0-9]+)\.([0-9]+[dmu]*)(.*)$ : $(version) : 1 2 3 ] ;
-     if ! $(major-minor[2]) || $(major-minor[3])
-     {
-         ECHO "Warning: \"using python\" expects a two part (major, minor) version number; got" $(version) instead ;
diff --git a/pkgs/development/libraries/boost/cygwin-1.55.0-asio-MSG_EOR.patch b/pkgs/development/libraries/boost/cygwin-1.55.0-asio-MSG_EOR.patch
deleted file mode 100644
index 46308a59cb0..00000000000
--- a/pkgs/development/libraries/boost/cygwin-1.55.0-asio-MSG_EOR.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- boost_1_55_0/boost/asio/detail/socket_types.hpp	2014-08-31 12:43:54.186255800 -0500
-+++ boost_1_55_0/boost/asio/detail/socket_types.hpp	2014-08-31 12:43:03.887868700 -0500
-@@ -332,7 +332,11 @@ typedef int signed_size_type;
- # define BOOST_ASIO_OS_DEF_MSG_OOB MSG_OOB
- # define BOOST_ASIO_OS_DEF_MSG_PEEK MSG_PEEK
- # define BOOST_ASIO_OS_DEF_MSG_DONTROUTE MSG_DONTROUTE
-+#ifdef MSG_EOR
- # define BOOST_ASIO_OS_DEF_MSG_EOR MSG_EOR
-+#else
-+# define BOOST_ASIO_OS_DEF_MSG_EOR 0
-+#endif
- # define BOOST_ASIO_OS_DEF_SHUT_RD SHUT_RD
- # define BOOST_ASIO_OS_DEF_SHUT_WR SHUT_WR
- # define BOOST_ASIO_OS_DEF_SHUT_RDWR SHUT_RDWR
diff --git a/pkgs/development/libraries/boost/cygwin-1.55.0-interlocked-cygwin.patch b/pkgs/development/libraries/boost/cygwin-1.55.0-interlocked-cygwin.patch
deleted file mode 100644
index df3edf51e7b..00000000000
--- a/pkgs/development/libraries/boost/cygwin-1.55.0-interlocked-cygwin.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- boost_1_55_0/boost/detail/interlocked.hpp	2013-10-24 09:01:53.000000000 -0500
-+++ boost_1_55_0/boost/detail/interlocked.hpp	2014-08-31 13:01:33.830313500 -0500
-@@ -160,7 +160,7 @@ extern "C" void* __cdecl _InterlockedExc
-     ((void*)BOOST_INTERLOCKED_EXCHANGE((long volatile*)(dest),(long)(exchange)))
- # endif
- 
--#elif defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ ) || defined( __CYGWIN__ )
-+#elif defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ )
- 
- #define BOOST_INTERLOCKED_IMPORT __declspec(dllimport)
- 
diff --git a/pkgs/development/libraries/boost/cygwin-1.57.0-asio-cygwin.patch b/pkgs/development/libraries/boost/cygwin-1.57.0-asio-cygwin.patch
deleted file mode 100644
index 3702d475c8e..00000000000
--- a/pkgs/development/libraries/boost/cygwin-1.57.0-asio-cygwin.patch
+++ /dev/null
@@ -1,1835 +0,0 @@
---- boost_1_57_0/boost/asio/detail/buffer_sequence_adapter.hpp	2014-10-17 17:49:08.000000000 -0500
-+++ boost_1_57_0/boost/asio/detail/buffer_sequence_adapter.hpp	2015-05-04 17:33:18.798985800 -0500
-@@ -42,7 +42,7 @@ protected:
-   BOOST_ASIO_DECL static void init_native_buffer(
-       native_buffer_type& buf,
-       const boost::asio::const_buffer& buffer);
--#elif defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#elif defined(BOOST_ASIO_WINDOWS)
-   // The maximum number of buffers to support in a single operation.
-   enum { max_buffers = 64 < max_iov_len ? 64 : max_iov_len };
- 
-@@ -61,7 +61,7 @@ protected:
-     buf.buf = const_cast<char*>(boost::asio::buffer_cast<const char*>(buffer));
-     buf.len = static_cast<ULONG>(boost::asio::buffer_size(buffer));
-   }
--#else // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#else // defined(BOOST_ASIO_WINDOWS)
-   // The maximum number of buffers to support in a single operation.
-   enum { max_buffers = 64 < max_iov_len ? 64 : max_iov_len };
- 
-@@ -92,7 +92,7 @@ protected:
-           boost::asio::buffer_cast<const void*>(buffer)));
-     iov.iov_len = boost::asio::buffer_size(buffer);
-   }
--#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#endif // defined(BOOST_ASIO_WINDOWS)
- };
- 
- // Helper class to translate buffers into the native buffer representation.
---- boost_1_57_0/boost/asio/detail/config.hpp	2014-10-17 17:49:08.000000000 -0500
-+++ boost_1_57_0/boost/asio/detail/config.hpp	2015-05-04 17:34:30.756623300 -0500
-@@ -474,7 +474,7 @@
- #endif // !defined(BOOST_ASIO_WINDOWS)
- 
- // Windows: target OS version.
--#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#if defined(BOOST_ASIO_WINDOWS)
- # if !defined(_WIN32_WINNT) && !defined(_WIN32_WINDOWS)
- #  if defined(_MSC_VER) || defined(__BORLANDC__)
- #   pragma message( \
-@@ -512,29 +512,29 @@
- #   error You must add -D__USE_W32_SOCKETS to your compiler options.
- #  endif // !defined(__USE_W32_SOCKETS)
- # endif // defined(__CYGWIN__)
--#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#endif // defined(BOOST_ASIO_WINDOWS)
- 
- // Windows: minimise header inclusion.
--#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#if defined(BOOST_ASIO_WINDOWS)
- # if !defined(BOOST_ASIO_NO_WIN32_LEAN_AND_MEAN)
- #  if !defined(WIN32_LEAN_AND_MEAN)
- #   define WIN32_LEAN_AND_MEAN
- #  endif // !defined(WIN32_LEAN_AND_MEAN)
- # endif // !defined(BOOST_ASIO_NO_WIN32_LEAN_AND_MEAN)
--#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#endif // defined(BOOST_ASIO_WINDOWS)
- 
- // Windows: suppress definition of "min" and "max" macros.
--#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#if defined(BOOST_ASIO_WINDOWS)
- # if !defined(BOOST_ASIO_NO_NOMINMAX)
- #  if !defined(NOMINMAX)
- #   define NOMINMAX 1
- #  endif // !defined(NOMINMAX)
- # endif // !defined(BOOST_ASIO_NO_NOMINMAX)
--#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#endif // defined(BOOST_ASIO_WINDOWS)
- 
- // Windows: IO Completion Ports.
- #if !defined(BOOST_ASIO_HAS_IOCP)
--# if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+# if defined(BOOST_ASIO_WINDOWS)
- #  if defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0400)
- #   if !defined(UNDER_CE)
- #    if !defined(BOOST_ASIO_DISABLE_IOCP)
-@@ -542,7 +542,7 @@
- #    endif // !defined(BOOST_ASIO_DISABLE_IOCP)
- #   endif // !defined(UNDER_CE)
- #  endif // defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0400)
--# endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+# endif // defined(BOOST_ASIO_WINDOWS)
- #endif // !defined(BOOST_ASIO_HAS_IOCP)
- 
- // Linux: epoll, eventfd and timerfd.
-@@ -599,8 +599,7 @@
- #if !defined(BOOST_ASIO_HAS_SERIAL_PORT)
- # if defined(BOOST_ASIO_HAS_IOCP) \
-   || !defined(BOOST_ASIO_WINDOWS) \
--  && !defined(BOOST_ASIO_WINDOWS_RUNTIME) \
--  && !defined(__CYGWIN__)
-+  && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
- #  if !defined(__SYMBIAN32__)
- #   if !defined(BOOST_ASIO_DISABLE_SERIAL_PORT)
- #    define BOOST_ASIO_HAS_SERIAL_PORT 1
-@@ -609,7 +608,6 @@
- # endif // defined(BOOST_ASIO_HAS_IOCP)
-         //   || !defined(BOOST_ASIO_WINDOWS)
-         //   && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
--        //   && !defined(__CYGWIN__)
- #endif // !defined(BOOST_ASIO_HAS_SERIAL_PORT)
- 
- // Windows: stream handles.
-@@ -633,11 +631,11 @@
- // Windows: object handles.
- #if !defined(BOOST_ASIO_HAS_WINDOWS_OBJECT_HANDLE)
- # if !defined(BOOST_ASIO_DISABLE_WINDOWS_OBJECT_HANDLE)
--#  if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#  if defined(BOOST_ASIO_WINDOWS)
- #   if !defined(UNDER_CE)
- #    define BOOST_ASIO_HAS_WINDOWS_OBJECT_HANDLE 1
- #   endif // !defined(UNDER_CE)
--#  endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#  endif // defined(BOOST_ASIO_WINDOWS)
- # endif // !defined(BOOST_ASIO_DISABLE_WINDOWS_OBJECT_HANDLE)
- #endif // !defined(BOOST_ASIO_HAS_WINDOWS_OBJECT_HANDLE)
- 
-@@ -654,12 +652,10 @@
- #if !defined(BOOST_ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
- # if !defined(BOOST_ASIO_DISABLE_POSIX_STREAM_DESCRIPTOR)
- #  if !defined(BOOST_ASIO_WINDOWS) \
--  && !defined(BOOST_ASIO_WINDOWS_RUNTIME) \
--  && !defined(__CYGWIN__)
-+  && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
- #   define BOOST_ASIO_HAS_POSIX_STREAM_DESCRIPTOR 1
- #  endif // !defined(BOOST_ASIO_WINDOWS)
-          //   && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
--         //   && !defined(__CYGWIN__)
- # endif // !defined(BOOST_ASIO_DISABLE_POSIX_STREAM_DESCRIPTOR)
- #endif // !defined(BOOST_ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
- 
-@@ -667,12 +663,10 @@
- #if !defined(BOOST_ASIO_HAS_LOCAL_SOCKETS)
- # if !defined(BOOST_ASIO_DISABLE_LOCAL_SOCKETS)
- #  if !defined(BOOST_ASIO_WINDOWS) \
--  && !defined(BOOST_ASIO_WINDOWS_RUNTIME) \
--  && !defined(__CYGWIN__)
-+  && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
- #   define BOOST_ASIO_HAS_LOCAL_SOCKETS 1
- #  endif // !defined(BOOST_ASIO_WINDOWS)
-          //   && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
--         //   && !defined(__CYGWIN__)
- # endif // !defined(BOOST_ASIO_DISABLE_LOCAL_SOCKETS)
- #endif // !defined(BOOST_ASIO_HAS_LOCAL_SOCKETS)
- 
-@@ -680,12 +674,10 @@
- #if !defined(BOOST_ASIO_HAS_SIGACTION)
- # if !defined(BOOST_ASIO_DISABLE_SIGACTION)
- #  if !defined(BOOST_ASIO_WINDOWS) \
--  && !defined(BOOST_ASIO_WINDOWS_RUNTIME) \
--  && !defined(__CYGWIN__)
-+  && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
- #   define BOOST_ASIO_HAS_SIGACTION 1
- #  endif // !defined(BOOST_ASIO_WINDOWS)
-          //   && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
--         //   && !defined(__CYGWIN__)
- # endif // !defined(BOOST_ASIO_DISABLE_SIGACTION)
- #endif // !defined(BOOST_ASIO_HAS_SIGACTION)
- 
-@@ -700,7 +692,7 @@
- 
- // Can use getaddrinfo() and getnameinfo().
- #if !defined(BOOST_ASIO_HAS_GETADDRINFO)
--# if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+# if defined(BOOST_ASIO_WINDOWS)
- #  if defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0501)
- #   define BOOST_ASIO_HAS_GETADDRINFO 1
- #  elif defined(UNDER_CE)
---- boost_1_57_0/boost/asio/detail/descriptor_ops.hpp	2014-10-17 17:49:08.000000000 -0500
-+++ boost_1_57_0/boost/asio/detail/descriptor_ops.hpp	2015-05-04 17:33:18.826989400 -0500
-@@ -18,8 +18,7 @@
- #include <boost/asio/detail/config.hpp>
- 
- #if !defined(BOOST_ASIO_WINDOWS) \
--  && !defined(BOOST_ASIO_WINDOWS_RUNTIME) \
--  && !defined(__CYGWIN__)
-+  && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
- 
- #include <cstddef>
- #include <boost/system/error_code.hpp>
-@@ -114,6 +113,5 @@ BOOST_ASIO_DECL int poll_write(int d,
- 
- #endif // !defined(BOOST_ASIO_WINDOWS)
-        //   && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
--       //   && !defined(__CYGWIN__)
- 
- #endif // BOOST_ASIO_DETAIL_DESCRIPTOR_OPS_HPP
---- boost_1_57_0/boost/asio/detail/descriptor_read_op.hpp	2014-10-17 17:49:08.000000000 -0500
-+++ boost_1_57_0/boost/asio/detail/descriptor_read_op.hpp	2015-05-04 17:33:18.830489800 -0500
-@@ -17,7 +17,7 @@
- 
- #include <boost/asio/detail/config.hpp>
- 
--#if !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)
-+#if !defined(BOOST_ASIO_WINDOWS)
- 
- #include <boost/asio/detail/addressof.hpp>
- #include <boost/asio/detail/bind_handler.hpp>
-@@ -116,6 +116,6 @@ private:
- 
- #include <boost/asio/detail/pop_options.hpp>
- 
--#endif // !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)
-+#endif // !defined(BOOST_ASIO_WINDOWS)
- 
- #endif // BOOST_ASIO_DETAIL_DESCRIPTOR_READ_OP_HPP
---- boost_1_57_0/boost/asio/detail/descriptor_write_op.hpp	2014-10-17 17:49:08.000000000 -0500
-+++ boost_1_57_0/boost/asio/detail/descriptor_write_op.hpp	2015-05-04 17:33:18.833490200 -0500
-@@ -17,7 +17,7 @@
- 
- #include <boost/asio/detail/config.hpp>
- 
--#if !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)
-+#if !defined(BOOST_ASIO_WINDOWS)
- 
- #include <boost/asio/detail/addressof.hpp>
- #include <boost/asio/detail/bind_handler.hpp>
-@@ -116,6 +116,6 @@ private:
- 
- #include <boost/asio/detail/pop_options.hpp>
- 
--#endif // !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)
-+#endif // !defined(BOOST_ASIO_WINDOWS)
- 
- #endif // BOOST_ASIO_DETAIL_DESCRIPTOR_WRITE_OP_HPP
---- boost_1_57_0/boost/asio/detail/fd_set_adapter.hpp	2014-10-17 17:49:08.000000000 -0500
-+++ boost_1_57_0/boost/asio/detail/fd_set_adapter.hpp	2015-05-04 17:33:18.836490600 -0500
-@@ -26,7 +26,7 @@ namespace boost {
- namespace asio {
- namespace detail {
- 
--#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#if defined(BOOST_ASIO_WINDOWS)
- typedef win_fd_set_adapter fd_set_adapter;
- #else
- typedef posix_fd_set_adapter fd_set_adapter;
---- boost_1_57_0/boost/asio/detail/hash_map.hpp	2014-10-17 17:49:08.000000000 -0500
-+++ boost_1_57_0/boost/asio/detail/hash_map.hpp	2015-05-04 17:33:18.839991000 -0500
-@@ -21,9 +21,9 @@
- #include <boost/asio/detail/assert.hpp>
- #include <boost/asio/detail/noncopyable.hpp>
- 
--#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#if defined(BOOST_ASIO_WINDOWS)
- # include <boost/asio/detail/socket_types.hpp>
--#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#endif // defined(BOOST_ASIO_WINDOWS)
- 
- #include <boost/asio/detail/push_options.hpp>
- 
-@@ -42,12 +42,12 @@ inline std::size_t calculate_hash_value(
-     + (reinterpret_cast<std::size_t>(p) >> 3);
- }
- 
--#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#if defined(BOOST_ASIO_WINDOWS)
- inline std::size_t calculate_hash_value(SOCKET s)
- {
-   return static_cast<std::size_t>(s);
- }
--#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#endif // defined(BOOST_ASIO_WINDOWS)
- 
- // Note: assumes K and V are POD types.
- template <typename K, typename V>
---- boost_1_57_0/boost/asio/detail/impl/descriptor_ops.ipp	2014-10-17 17:49:08.000000000 -0500
-+++ boost_1_57_0/boost/asio/detail/impl/descriptor_ops.ipp	2015-05-04 17:33:18.843491500 -0500
-@@ -21,8 +21,7 @@
- #include <boost/asio/error.hpp>
- 
- #if !defined(BOOST_ASIO_WINDOWS) \
--  && !defined(BOOST_ASIO_WINDOWS_RUNTIME) \
--  && !defined(__CYGWIN__)
-+  && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
- 
- #include <boost/asio/detail/push_options.hpp>
- 
-@@ -448,6 +447,5 @@ int poll_write(int d, state_type state,
- 
- #endif // !defined(BOOST_ASIO_WINDOWS)
-        //   && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
--       //   && !defined(__CYGWIN__)
- 
- #endif // BOOST_ASIO_DETAIL_IMPL_DESCRIPTOR_OPS_IPP
---- boost_1_57_0/boost/asio/detail/impl/pipe_select_interrupter.ipp	2014-10-17 17:49:08.000000000 -0500
-+++ boost_1_57_0/boost/asio/detail/impl/pipe_select_interrupter.ipp	2015-05-04 17:33:18.846991900 -0500
-@@ -19,7 +19,6 @@
- 
- #if !defined(BOOST_ASIO_WINDOWS_RUNTIME)
- #if !defined(BOOST_ASIO_WINDOWS)
--#if !defined(__CYGWIN__)
- #if !defined(__SYMBIAN32__)
- #if !defined(BOOST_ASIO_HAS_EVENTFD)
- 
-@@ -119,7 +118,6 @@ bool pipe_select_interrupter::reset()
- 
- #endif // !defined(BOOST_ASIO_HAS_EVENTFD)
- #endif // !defined(__SYMBIAN32__)
--#endif // !defined(__CYGWIN__)
- #endif // !defined(BOOST_ASIO_WINDOWS)
- #endif // !defined(BOOST_ASIO_WINDOWS_RUNTIME)
- 
---- boost_1_57_0/boost/asio/detail/impl/reactive_descriptor_service.ipp	2014-10-17 17:49:08.000000000 -0500
-+++ boost_1_57_0/boost/asio/detail/impl/reactive_descriptor_service.ipp	2015-05-04 17:33:18.849992300 -0500
-@@ -18,8 +18,7 @@
- #include <boost/asio/detail/config.hpp>
- 
- #if !defined(BOOST_ASIO_WINDOWS) \
--  && !defined(BOOST_ASIO_WINDOWS_RUNTIME) \
--  && !defined(__CYGWIN__)
-+  && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
- 
- #include <boost/asio/error.hpp>
- #include <boost/asio/detail/reactive_descriptor_service.hpp>
-@@ -205,6 +204,5 @@ void reactive_descriptor_service::start_
- 
- #endif // !defined(BOOST_ASIO_WINDOWS)
-        //   && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
--       //   && !defined(__CYGWIN__)
- 
- #endif // BOOST_ASIO_DETAIL_IMPL_REACTIVE_DESCRIPTOR_SERVICE_IPP
---- boost_1_57_0/boost/asio/detail/impl/reactive_serial_port_service.ipp	2014-10-17 17:49:08.000000000 -0500
-+++ boost_1_57_0/boost/asio/detail/impl/reactive_serial_port_service.ipp	2015-05-04 17:33:18.853492700 -0500
-@@ -19,7 +19,7 @@
- #include <boost/asio/detail/config.hpp>
- 
- #if defined(BOOST_ASIO_HAS_SERIAL_PORT)
--#if !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)
-+#if !defined(BOOST_ASIO_WINDOWS)
- 
- #include <cstring>
- #include <boost/asio/detail/reactive_serial_port_service.hpp>
-@@ -147,7 +147,7 @@ boost::system::error_code reactive_seria
- 
- #include <boost/asio/detail/pop_options.hpp>
- 
--#endif // !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)
-+#endif // !defined(BOOST_ASIO_WINDOWS)
- #endif // defined(BOOST_ASIO_HAS_SERIAL_PORT)
- 
- #endif // BOOST_ASIO_DETAIL_IMPL_REACTIVE_SERIAL_PORT_SERVICE_IPP
---- boost_1_57_0/boost/asio/detail/impl/select_reactor.ipp	2014-10-17 17:49:08.000000000 -0500
-+++ boost_1_57_0/boost/asio/detail/impl/select_reactor.ipp	2015-05-04 17:29:21.281324900 -0500
-@@ -187,7 +187,7 @@ void select_reactor::run(bool block, op_
-       max_fd = fd_sets_[i].max_descriptor();
-   }
- 
--#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#if defined(BOOST_ASIO_WINDOWS)
-   // Connection operations on Windows use both except and write fd_sets.
-   have_work_to_do = have_work_to_do || !op_queue_[connect_op].empty();
-   fd_sets_[write_op].set(op_queue_[connect_op], ops);
-@@ -196,7 +196,7 @@ void select_reactor::run(bool block, op_
-   fd_sets_[except_op].set(op_queue_[connect_op], ops);
-   if (fd_sets_[except_op].max_descriptor() > max_fd)
-     max_fd = fd_sets_[except_op].max_descriptor();
--#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#endif // defined(BOOST_ASIO_WINDOWS)
- 
-   // We can return immediately if there's no work to do and the reactor is
-   // not supposed to block.
-@@ -226,11 +226,11 @@ void select_reactor::run(bool block, op_
-   // Dispatch all ready operations.
-   if (retval > 0)
-   {
--#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#if defined(BOOST_ASIO_WINDOWS)
-     // Connection operations on Windows use both except and write fd_sets.
-     fd_sets_[except_op].perform(op_queue_[connect_op], ops);
-     fd_sets_[write_op].perform(op_queue_[connect_op], ops);
--#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#endif // defined(BOOST_ASIO_WINDOWS)
- 
-     // Exception operations must be processed first to ensure that any
-     // out-of-band data is read before normal data.
---- boost_1_57_0/boost/asio/detail/impl/signal_set_service.ipp	2014-10-17 17:49:08.000000000 -0500
-+++ boost_1_57_0/boost/asio/detail/impl/signal_set_service.ipp	2015-05-04 17:33:18.857993300 -0500
-@@ -60,12 +60,10 @@ signal_state* get_signal_state()
- void boost_asio_signal_handler(int signal_number)
- {
- #if defined(BOOST_ASIO_WINDOWS) \
--  || defined(BOOST_ASIO_WINDOWS_RUNTIME) \
--  || defined(__CYGWIN__)
-+  || defined(BOOST_ASIO_WINDOWS_RUNTIME)
-   signal_set_service::deliver_signal(signal_number);
- #else // defined(BOOST_ASIO_WINDOWS)
-       //   || defined(BOOST_ASIO_WINDOWS_RUNTIME)
--      //   || defined(__CYGWIN__)
-   int saved_errno = errno;
-   signal_state* state = get_signal_state();
-   signed_size_type result = ::write(state->write_descriptor_,
-@@ -74,7 +72,6 @@ void boost_asio_signal_handler(int signa
-   errno = saved_errno;
- #endif // defined(BOOST_ASIO_WINDOWS)
-        //   || defined(BOOST_ASIO_WINDOWS_RUNTIME)
--       //   || defined(__CYGWIN__)
- 
- #if defined(BOOST_ASIO_HAS_SIGNAL) && !defined(BOOST_ASIO_HAS_SIGACTION)
-   ::signal(signal_number, boost_asio_signal_handler);
-@@ -82,8 +79,7 @@ void boost_asio_signal_handler(int signa
- }
- 
- #if !defined(BOOST_ASIO_WINDOWS) \
--  && !defined(BOOST_ASIO_WINDOWS_RUNTIME) \
--  && !defined(__CYGWIN__)
-+  && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
- class signal_set_service::pipe_read_op : public reactor_op
- {
- public:
-@@ -115,30 +111,25 @@ public:
- };
- #endif // !defined(BOOST_ASIO_WINDOWS)
-        //   && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
--       //   && !defined(__CYGWIN__)
- 
- signal_set_service::signal_set_service(
-     boost::asio::io_service& io_service)
-   : io_service_(boost::asio::use_service<io_service_impl>(io_service)),
- #if !defined(BOOST_ASIO_WINDOWS) \
--  && !defined(BOOST_ASIO_WINDOWS_RUNTIME) \
--  && !defined(__CYGWIN__)
-+  && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
-     reactor_(boost::asio::use_service<reactor>(io_service)),
- #endif // !defined(BOOST_ASIO_WINDOWS)
-        //   && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
--       //   && !defined(__CYGWIN__)
-     next_(0),
-     prev_(0)
- {
-   get_signal_state()->mutex_.init();
- 
- #if !defined(BOOST_ASIO_WINDOWS) \
--  && !defined(BOOST_ASIO_WINDOWS_RUNTIME) \
--  && !defined(__CYGWIN__)
-+  && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
-   reactor_.init_task();
- #endif // !defined(BOOST_ASIO_WINDOWS)
-        //   && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
--       //   && !defined(__CYGWIN__)
- 
-   for (int i = 0; i < max_signal_number; ++i)
-     registrations_[i] = 0;
-@@ -174,8 +165,7 @@ void signal_set_service::fork_service(
-     boost::asio::io_service::fork_event fork_ev)
- {
- #if !defined(BOOST_ASIO_WINDOWS) \
--  && !defined(BOOST_ASIO_WINDOWS_RUNTIME) \
--  && !defined(__CYGWIN__)
-+  && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
-   signal_state* state = get_signal_state();
-   static_mutex::scoped_lock lock(state->mutex_);
- 
-@@ -217,11 +207,9 @@ void signal_set_service::fork_service(
-   }
- #else // !defined(BOOST_ASIO_WINDOWS)
-       //   && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
--      //   && !defined(__CYGWIN__)
-   (void)fork_ev;
- #endif // !defined(BOOST_ASIO_WINDOWS)
-        //   && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
--       //   && !defined(__CYGWIN__)
- }
- 
- void signal_set_service::construct(
-@@ -281,12 +269,12 @@ boost::system::error_code signal_set_ser
-       if (::signal(signal_number, boost_asio_signal_handler) == SIG_ERR)
- # endif // defined(BOOST_ASIO_HAS_SIGACTION)
-       {
--# if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+# if defined(BOOST_ASIO_WINDOWS)
-         ec = boost::asio::error::invalid_argument;
--# else // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+# else // defined(BOOST_ASIO_WINDOWS)
-         ec = boost::system::error_code(errno,
-             boost::asio::error::get_system_category());
--# endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+# endif // defined(BOOST_ASIO_WINDOWS)
-         delete new_registration;
-         return ec;
-       }
-@@ -351,12 +339,12 @@ boost::system::error_code signal_set_ser
-       if (::signal(signal_number, SIG_DFL) == SIG_ERR)
- # endif // defined(BOOST_ASIO_HAS_SIGACTION)
-       {
--# if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+# if defined(BOOST_ASIO_WINDOWS)
-         ec = boost::asio::error::invalid_argument;
--# else // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+# else // defined(BOOST_ASIO_WINDOWS)
-         ec = boost::system::error_code(errno,
-             boost::asio::error::get_system_category());
--# endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+# endif // defined(BOOST_ASIO_WINDOWS)
-         return ec;
-       }
-     }
-@@ -405,12 +393,12 @@ boost::system::error_code signal_set_ser
-       if (::signal(reg->signal_number_, SIG_DFL) == SIG_ERR)
- # endif // defined(BOOST_ASIO_HAS_SIGACTION)
-       {
--# if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+# if defined(BOOST_ASIO_WINDOWS)
-         ec = boost::asio::error::invalid_argument;
--# else // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+# else // defined(BOOST_ASIO_WINDOWS)
-         ec = boost::system::error_code(errno,
-             boost::asio::error::get_system_category());
--# endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+# endif // defined(BOOST_ASIO_WINDOWS)
-         return ec;
-       }
-     }
-@@ -500,11 +488,11 @@ void signal_set_service::add_service(sig
-   signal_state* state = get_signal_state();
-   static_mutex::scoped_lock lock(state->mutex_);
- 
--#if !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)
-+#if !defined(BOOST_ASIO_WINDOWS)
-   // If this is the first service to be created, open a new pipe.
-   if (state->service_list_ == 0)
-     open_descriptors();
--#endif // !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)
-+#endif // !defined(BOOST_ASIO_WINDOWS)
- 
-   // Insert service into linked list of all services.
-   service->next_ = state->service_list_;
-@@ -514,8 +502,7 @@ void signal_set_service::add_service(sig
-   state->service_list_ = service;
- 
- #if !defined(BOOST_ASIO_WINDOWS) \
--  && !defined(BOOST_ASIO_WINDOWS_RUNTIME) \
--  && !defined(__CYGWIN__)
-+  && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
-   // Register for pipe readiness notifications.
-   int read_descriptor = state->read_descriptor_;
-   lock.unlock();
-@@ -523,7 +510,6 @@ void signal_set_service::add_service(sig
-       read_descriptor, service->reactor_data_, new pipe_read_op);
- #endif // !defined(BOOST_ASIO_WINDOWS)
-        //   && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
--       //   && !defined(__CYGWIN__)
- }
- 
- void signal_set_service::remove_service(signal_set_service* service)
-@@ -534,8 +520,7 @@ void signal_set_service::remove_service(
-   if (service->next_ || service->prev_ || state->service_list_ == service)
-   {
- #if !defined(BOOST_ASIO_WINDOWS) \
--  && !defined(BOOST_ASIO_WINDOWS_RUNTIME) \
--  && !defined(__CYGWIN__)
-+  && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
-     // Disable the pipe readiness notifications.
-     int read_descriptor = state->read_descriptor_;
-     lock.unlock();
-@@ -544,7 +529,6 @@ void signal_set_service::remove_service(
-     lock.lock();
- #endif // !defined(BOOST_ASIO_WINDOWS)
-        //   && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
--       //   && !defined(__CYGWIN__)
- 
-     // Remove service from linked list of all services.
-     if (state->service_list_ == service)
-@@ -556,19 +540,18 @@ void signal_set_service::remove_service(
-     service->next_ = 0;
-     service->prev_ = 0;
- 
--#if !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)
-+#if !defined(BOOST_ASIO_WINDOWS)
-     // If this is the last service to be removed, close the pipe.
-     if (state->service_list_ == 0)
-       close_descriptors();
--#endif // !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)
-+#endif // !defined(BOOST_ASIO_WINDOWS)
-   }
- }
- 
- void signal_set_service::open_descriptors()
- {
- #if !defined(BOOST_ASIO_WINDOWS) \
--  && !defined(BOOST_ASIO_WINDOWS_RUNTIME) \
--  && !defined(__CYGWIN__)
-+  && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
-   signal_state* state = get_signal_state();
- 
-   int pipe_fds[2];
-@@ -593,14 +576,12 @@ void signal_set_service::open_descriptor
-   }
- #endif // !defined(BOOST_ASIO_WINDOWS)
-        //   && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
--       //   && !defined(__CYGWIN__)
- }
- 
- void signal_set_service::close_descriptors()
- {
- #if !defined(BOOST_ASIO_WINDOWS) \
--  && !defined(BOOST_ASIO_WINDOWS_RUNTIME) \
--  && !defined(__CYGWIN__)
-+  && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
-   signal_state* state = get_signal_state();
- 
-   if (state->read_descriptor_ != -1)
-@@ -612,7 +593,6 @@ void signal_set_service::close_descripto
-   state->write_descriptor_ = -1;
- #endif // !defined(BOOST_ASIO_WINDOWS)
-        //   && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
--       //   && !defined(__CYGWIN__)
- }
- 
- void signal_set_service::start_wait_op(
---- boost_1_57_0/boost/asio/detail/impl/socket_ops.ipp	2014-10-17 17:49:08.000000000 -0500
-+++ boost_1_57_0/boost/asio/detail/impl/socket_ops.ipp	2015-05-04 17:32:20.048025400 -0500
-@@ -33,12 +33,12 @@
- # include <string>
- #endif // defined(BOOST_ASIO_WINDOWS_RUNTIME)
- 
--#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__) \
-+#if defined(BOOST_ASIO_WINDOWS) \
-   || defined(__MACH__) && defined(__APPLE__)
- # if defined(BOOST_ASIO_HAS_PTHREADS)
- #  include <pthread.h>
- # endif // defined(BOOST_ASIO_HAS_PTHREADS)
--#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#endif // defined(BOOST_ASIO_WINDOWS)
-        // || defined(__MACH__) && defined(__APPLE__)
- 
- #include <boost/asio/detail/push_options.hpp>
-@@ -50,9 +50,9 @@ namespace socket_ops {
- 
- #if !defined(BOOST_ASIO_WINDOWS_RUNTIME)
- 
--#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#if defined(BOOST_ASIO_WINDOWS)
- struct msghdr { int msg_namelen; };
--#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#endif // defined(BOOST_ASIO_WINDOWS)
- 
- #if defined(__hpux)
- // HP-UX doesn't declare these functions extern "C", so they are declared again
-@@ -65,7 +65,7 @@ extern "C" unsigned int if_nametoindex(c
- 
- inline void clear_last_error()
- {
--#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#if defined(BOOST_ASIO_WINDOWS)
-   WSASetLastError(0);
- #else
-   errno = 0;
-@@ -78,7 +78,7 @@ template <typename ReturnType>
- inline ReturnType error_wrapper(ReturnType return_value,
-     boost::system::error_code& ec)
- {
--#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#if defined(BOOST_ASIO_WINDOWS)
-   ec = boost::system::error_code(WSAGetLastError(),
-       boost::asio::error::get_system_category());
- #else
-@@ -313,11 +313,11 @@ int close(socket_type s, state_type& sta
-     }
- 
-     clear_last_error();
--#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#if defined(BOOST_ASIO_WINDOWS)
-     result = error_wrapper(::closesocket(s), ec);
--#else // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#else // defined(BOOST_ASIO_WINDOWS)
-     result = error_wrapper(::close(s), ec);
--#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#endif // defined(BOOST_ASIO_WINDOWS)
- 
-     if (result != 0
-         && (ec == boost::asio::error::would_block
-@@ -329,10 +329,10 @@ int close(socket_type s, state_type& sta
-       // current OS where this behaviour is seen, Windows, says that the socket
-       // remains open. Therefore we'll put the descriptor back into blocking
-       // mode and have another attempt at closing it.
--#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#if defined(BOOST_ASIO_WINDOWS)
-       ioctl_arg_type arg = 0;
-       ::ioctlsocket(s, FIONBIO, &arg);
--#else // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#else // defined(BOOST_ASIO_WINDOWS)
- # if defined(__SYMBIAN32__)
-       int flags = ::fcntl(s, F_GETFL, 0);
-       if (flags >= 0)
-@@ -341,15 +341,15 @@ int close(socket_type s, state_type& sta
-       ioctl_arg_type arg = 0;
-       ::ioctl(s, FIONBIO, &arg);
- # endif // defined(__SYMBIAN32__)
--#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#endif // defined(BOOST_ASIO_WINDOWS)
-       state &= ~non_blocking;
- 
-       clear_last_error();
--#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#if defined(BOOST_ASIO_WINDOWS)
-       result = error_wrapper(::closesocket(s), ec);
--#else // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#else // defined(BOOST_ASIO_WINDOWS)
-       result = error_wrapper(::close(s), ec);
--#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#endif // defined(BOOST_ASIO_WINDOWS)
-     }
-   }
- 
-@@ -368,7 +368,7 @@ bool set_user_non_blocking(socket_type s
-   }
- 
-   clear_last_error();
--#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#if defined(BOOST_ASIO_WINDOWS)
-   ioctl_arg_type arg = (value ? 1 : 0);
-   int result = error_wrapper(::ioctlsocket(s, FIONBIO, &arg), ec);
- #elif defined(__SYMBIAN32__)
-@@ -421,7 +421,7 @@ bool set_internal_non_blocking(socket_ty
-   }
- 
-   clear_last_error();
--#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#if defined(BOOST_ASIO_WINDOWS)
-   ioctl_arg_type arg = (value ? 1 : 0);
-   int result = error_wrapper(::ioctlsocket(s, FIONBIO, &arg), ec);
- #elif defined(__SYMBIAN32__)
-@@ -543,7 +543,6 @@ bool non_blocking_connect(socket_type s,
-   // Check if the connect operation has finished. This is required since we may
-   // get spurious readiness notifications from the reactor.
- #if defined(BOOST_ASIO_WINDOWS) \
--  || defined(__CYGWIN__) \
-   || defined(__SYMBIAN32__)
-   fd_set write_fds;
-   FD_ZERO(&write_fds);
-@@ -556,7 +555,6 @@ bool non_blocking_connect(socket_type s,
-   zero_timeout.tv_usec = 0;
-   int ready = ::select(s + 1, 0, &write_fds, &except_fds, &zero_timeout);
- #else // defined(BOOST_ASIO_WINDOWS)
--      // || defined(__CYGWIN__)
-       // || defined(__SYMBIAN32__)
-   pollfd fds;
-   fds.fd = s;
-@@ -564,7 +562,6 @@ bool non_blocking_connect(socket_type s,
-   fds.revents = 0;
-   int ready = ::poll(&fds, 1, 0);
- #endif // defined(BOOST_ASIO_WINDOWS)
--       // || defined(__CYGWIN__)
-        // || defined(__SYMBIAN32__)
-   if (ready == 0)
-   {
-@@ -593,7 +590,7 @@ bool non_blocking_connect(socket_type s,
- int socketpair(int af, int type, int protocol,
-     socket_type sv[2], boost::system::error_code& ec)
- {
--#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#if defined(BOOST_ASIO_WINDOWS)
-   (void)(af);
-   (void)(type);
-   (void)(protocol);
-@@ -619,11 +616,11 @@ bool sockatmark(socket_type s, boost::sy
- 
- #if defined(SIOCATMARK)
-   ioctl_arg_type value = 0;
--# if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+# if defined(BOOST_ASIO_WINDOWS)
-   int result = error_wrapper(::ioctlsocket(s, SIOCATMARK, &value), ec);
--# else // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+# else // defined(BOOST_ASIO_WINDOWS)
-   int result = error_wrapper(::ioctl(s, SIOCATMARK, &value), ec);
--# endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+# endif // defined(BOOST_ASIO_WINDOWS)
-   if (result == 0)
-     ec = boost::system::error_code();
- # if defined(ENOTTY)
-@@ -648,11 +645,11 @@ size_t available(socket_type s, boost::s
-   }
- 
-   ioctl_arg_type value = 0;
--#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#if defined(BOOST_ASIO_WINDOWS)
-   int result = error_wrapper(::ioctlsocket(s, FIONREAD, &value), ec);
--#else // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#else // defined(BOOST_ASIO_WINDOWS)
-   int result = error_wrapper(::ioctl(s, FIONREAD, &value), ec);
--#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#endif // defined(BOOST_ASIO_WINDOWS)
-   if (result == 0)
-     ec = boost::system::error_code();
- #if defined(ENOTTY)
-@@ -689,32 +686,32 @@ inline void init_buf_iov_base(T& base, v
-   base = static_cast<T>(addr);
- }
- 
--#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#if defined(BOOST_ASIO_WINDOWS)
- typedef WSABUF buf;
--#else // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#else // defined(BOOST_ASIO_WINDOWS)
- typedef iovec buf;
--#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#endif // defined(BOOST_ASIO_WINDOWS)
- 
- void init_buf(buf& b, void* data, size_t size)
- {
--#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#if defined(BOOST_ASIO_WINDOWS)
-   b.buf = static_cast<char*>(data);
-   b.len = static_cast<u_long>(size);
--#else // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#else // defined(BOOST_ASIO_WINDOWS)
-   init_buf_iov_base(b.iov_base, data);
-   b.iov_len = size;
--#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#endif // defined(BOOST_ASIO_WINDOWS)
- }
- 
- void init_buf(buf& b, const void* data, size_t size)
- {
--#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#if defined(BOOST_ASIO_WINDOWS)
-   b.buf = static_cast<char*>(const_cast<void*>(data));
-   b.len = static_cast<u_long>(size);
--#else // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#else // defined(BOOST_ASIO_WINDOWS)
-   init_buf_iov_base(b.iov_base, const_cast<void*>(data));
-   b.iov_len = size;
--#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#endif // defined(BOOST_ASIO_WINDOWS)
- }
- 
- inline void init_msghdr_msg_name(void*& name, socket_addr_type* addr)
-@@ -743,7 +740,7 @@ signed_size_type recv(socket_type s, buf
-     int flags, boost::system::error_code& ec)
- {
-   clear_last_error();
--#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#if defined(BOOST_ASIO_WINDOWS)
-   // Receive some data.
-   DWORD recv_buf_count = static_cast<DWORD>(count);
-   DWORD bytes_transferred = 0;
-@@ -758,7 +755,7 @@ signed_size_type recv(socket_type s, buf
-     return socket_error_retval;
-   ec = boost::system::error_code();
-   return bytes_transferred;
--#else // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#else // defined(BOOST_ASIO_WINDOWS)
-   msghdr msg = msghdr();
-   msg.msg_iov = bufs;
-   msg.msg_iovlen = static_cast<int>(count);
-@@ -766,7 +763,7 @@ signed_size_type recv(socket_type s, buf
-   if (result >= 0)
-     ec = boost::system::error_code();
-   return result;
--#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#endif // defined(BOOST_ASIO_WINDOWS)
- }
- 
- size_t sync_recv(socket_type s, state_type state, buf* bufs,
-@@ -889,7 +886,7 @@ signed_size_type recvfrom(socket_type s,
-     boost::system::error_code& ec)
- {
-   clear_last_error();
--#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#if defined(BOOST_ASIO_WINDOWS)
-   // Receive some data.
-   DWORD recv_buf_count = static_cast<DWORD>(count);
-   DWORD bytes_transferred = 0;
-@@ -906,7 +903,7 @@ signed_size_type recvfrom(socket_type s,
-     return socket_error_retval;
-   ec = boost::system::error_code();
-   return bytes_transferred;
--#else // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#else // defined(BOOST_ASIO_WINDOWS)
-   msghdr msg = msghdr();
-   init_msghdr_msg_name(msg.msg_name, addr);
-   msg.msg_namelen = static_cast<int>(*addrlen);
-@@ -917,7 +914,7 @@ signed_size_type recvfrom(socket_type s,
-   if (result >= 0)
-     ec = boost::system::error_code();
-   return result;
--#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#endif // defined(BOOST_ASIO_WINDOWS)
- }
- 
- size_t sync_recvfrom(socket_type s, state_type state, buf* bufs,
-@@ -1014,10 +1011,10 @@ signed_size_type recvmsg(socket_type s,
-     int in_flags, int& out_flags, boost::system::error_code& ec)
- {
-   clear_last_error();
--#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#if defined(BOOST_ASIO_WINDOWS)
-   out_flags = 0;
-   return socket_ops::recv(s, bufs, count, in_flags, ec);
--#else // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#else // defined(BOOST_ASIO_WINDOWS)
-   msghdr msg = msghdr();
-   msg.msg_iov = bufs;
-   msg.msg_iovlen = static_cast<int>(count);
-@@ -1030,7 +1027,7 @@ signed_size_type recvmsg(socket_type s,
-   else
-     out_flags = 0;
-   return result;
--#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#endif // defined(BOOST_ASIO_WINDOWS)
- }
- 
- size_t sync_recvmsg(socket_type s, state_type state,
-@@ -1126,7 +1123,7 @@ signed_size_type send(socket_type s, con
-     int flags, boost::system::error_code& ec)
- {
-   clear_last_error();
--#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#if defined(BOOST_ASIO_WINDOWS)
-   // Send the data.
-   DWORD send_buf_count = static_cast<DWORD>(count);
-   DWORD bytes_transferred = 0;
-@@ -1141,7 +1138,7 @@ signed_size_type send(socket_type s, con
-     return socket_error_retval;
-   ec = boost::system::error_code();
-   return bytes_transferred;
--#else // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#else // defined(BOOST_ASIO_WINDOWS)
-   msghdr msg = msghdr();
-   msg.msg_iov = const_cast<buf*>(bufs);
-   msg.msg_iovlen = static_cast<int>(count);
-@@ -1152,7 +1149,7 @@ signed_size_type send(socket_type s, con
-   if (result >= 0)
-     ec = boost::system::error_code();
-   return result;
--#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#endif // defined(BOOST_ASIO_WINDOWS)
- }
- 
- size_t sync_send(socket_type s, state_type state, const buf* bufs,
-@@ -1253,7 +1250,7 @@ signed_size_type sendto(socket_type s, c
-     boost::system::error_code& ec)
- {
-   clear_last_error();
--#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#if defined(BOOST_ASIO_WINDOWS)
-   // Send the data.
-   DWORD send_buf_count = static_cast<DWORD>(count);
-   DWORD bytes_transferred = 0;
-@@ -1268,7 +1265,7 @@ signed_size_type sendto(socket_type s, c
-     return socket_error_retval;
-   ec = boost::system::error_code();
-   return bytes_transferred;
--#else // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#else // defined(BOOST_ASIO_WINDOWS)
-   msghdr msg = msghdr();
-   init_msghdr_msg_name(msg.msg_name, addr);
-   msg.msg_namelen = static_cast<int>(addrlen);
-@@ -1281,7 +1278,7 @@ signed_size_type sendto(socket_type s, c
-   if (result >= 0)
-     ec = boost::system::error_code();
-   return result;
--#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#endif // defined(BOOST_ASIO_WINDOWS)
- }
- 
- size_t sync_sendto(socket_type s, state_type state, const buf* bufs,
-@@ -1358,7 +1355,7 @@ socket_type socket(int af, int type, int
-     boost::system::error_code& ec)
- {
-   clear_last_error();
--#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#if defined(BOOST_ASIO_WINDOWS)
-   socket_type s = error_wrapper(::WSASocketW(af, type, protocol, 0, 0,
-         WSA_FLAG_OVERLAPPED), ec);
-   if (s == invalid_socket)
-@@ -1556,7 +1553,7 @@ int getsockopt(socket_type s, state_type
-   }
-   ec = boost::asio::error::fault;
-   return socket_error_retval;
--#elif defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#elif defined(BOOST_ASIO_WINDOWS)
-   clear_last_error();
-   int result = error_wrapper(call_getsockopt(&msghdr::msg_namelen,
-         s, level, optname, optval, optlen), ec);
-@@ -1574,7 +1571,7 @@ int getsockopt(socket_type s, state_type
-   if (result == 0)
-     ec = boost::system::error_code();
-   return result;
--#else // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#else // defined(BOOST_ASIO_WINDOWS)
-   clear_last_error();
-   int result = error_wrapper(call_getsockopt(&msghdr::msg_namelen,
-         s, level, optname, optval, optlen), ec);
-@@ -1593,7 +1590,7 @@ int getsockopt(socket_type s, state_type
-   if (result == 0)
-     ec = boost::system::error_code();
-   return result;
--#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#endif // defined(BOOST_ASIO_WINDOWS)
- }
- 
- template <typename SockLenType>
-@@ -1615,7 +1612,7 @@ int getpeername(socket_type s, socket_ad
-     return socket_error_retval;
-   }
- 
--#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#if defined(BOOST_ASIO_WINDOWS)
-   if (cached)
-   {
-     // Check if socket is still connected.
-@@ -1636,9 +1633,9 @@ int getpeername(socket_type s, socket_ad
-     ec = boost::system::error_code();
-     return 0;
-   }
--#else // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#else // defined(BOOST_ASIO_WINDOWS)
-   (void)cached;
--#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#endif // defined(BOOST_ASIO_WINDOWS)
- 
-   clear_last_error();
-   int result = error_wrapper(call_getpeername(
-@@ -1685,7 +1682,7 @@ int ioctl(socket_type s, state_type& sta
-   }
- 
-   clear_last_error();
--#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#if defined(BOOST_ASIO_WINDOWS)
-   int result = error_wrapper(::ioctlsocket(s, cmd, arg), ec);
- #elif defined(__MACH__) && defined(__APPLE__) \
-   || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__)
-@@ -1726,7 +1723,7 @@ int select(int nfds, fd_set* readfds, fd
-     fd_set* exceptfds, timeval* timeout, boost::system::error_code& ec)
- {
-   clear_last_error();
--#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#if defined(BOOST_ASIO_WINDOWS)
-   if (!readfds && !writefds && !exceptfds && timeout)
-   {
-     DWORD milliseconds = timeout->tv_sec * 1000 + timeout->tv_usec / 1000;
-@@ -1746,7 +1743,7 @@ int select(int nfds, fd_set* readfds, fd
-   if (timeout && timeout->tv_sec == 0
-       && timeout->tv_usec > 0 && timeout->tv_usec < 1000)
-     timeout->tv_usec = 1000;
--#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#endif // defined(BOOST_ASIO_WINDOWS)
- 
- #if defined(__hpux) && defined(__SELECT)
-   timespec ts;
-@@ -1772,7 +1769,6 @@ int poll_read(socket_type s, state_type
-   }
- 
- #if defined(BOOST_ASIO_WINDOWS) \
--  || defined(__CYGWIN__) \
-   || defined(__SYMBIAN32__)
-   fd_set fds;
-   FD_ZERO(&fds);
-@@ -1784,7 +1780,6 @@ int poll_read(socket_type s, state_type
-   clear_last_error();
-   int result = error_wrapper(::select(s + 1, &fds, 0, 0, timeout), ec);
- #else // defined(BOOST_ASIO_WINDOWS)
--      // || defined(__CYGWIN__)
-       // || defined(__SYMBIAN32__)
-   pollfd fds;
-   fds.fd = s;
-@@ -1794,7 +1789,6 @@ int poll_read(socket_type s, state_type
-   clear_last_error();
-   int result = error_wrapper(::poll(&fds, 1, timeout), ec);
- #endif // defined(BOOST_ASIO_WINDOWS)
--       // || defined(__CYGWIN__)
-        // || defined(__SYMBIAN32__)
-   if (result == 0)
-     ec = (state & user_set_non_blocking)
-@@ -1813,7 +1807,6 @@ int poll_write(socket_type s, state_type
-   }
- 
- #if defined(BOOST_ASIO_WINDOWS) \
--  || defined(__CYGWIN__) \
-   || defined(__SYMBIAN32__)
-   fd_set fds;
-   FD_ZERO(&fds);
-@@ -1825,7 +1818,6 @@ int poll_write(socket_type s, state_type
-   clear_last_error();
-   int result = error_wrapper(::select(s + 1, 0, &fds, 0, timeout), ec);
- #else // defined(BOOST_ASIO_WINDOWS)
--      // || defined(__CYGWIN__)
-       // || defined(__SYMBIAN32__)
-   pollfd fds;
-   fds.fd = s;
-@@ -1835,7 +1827,6 @@ int poll_write(socket_type s, state_type
-   clear_last_error();
-   int result = error_wrapper(::poll(&fds, 1, timeout), ec);
- #endif // defined(BOOST_ASIO_WINDOWS)
--       // || defined(__CYGWIN__)
-        // || defined(__SYMBIAN32__)
-   if (result == 0)
-     ec = (state & user_set_non_blocking)
-@@ -1854,7 +1845,6 @@ int poll_connect(socket_type s, boost::s
-   }
- 
- #if defined(BOOST_ASIO_WINDOWS) \
--  || defined(__CYGWIN__) \
-   || defined(__SYMBIAN32__)
-   fd_set write_fds;
-   FD_ZERO(&write_fds);
-@@ -1869,7 +1859,6 @@ int poll_connect(socket_type s, boost::s
-     ec = boost::system::error_code();
-   return result;
- #else // defined(BOOST_ASIO_WINDOWS)
--      // || defined(__CYGWIN__)
-       // || defined(__SYMBIAN32__)
-   pollfd fds;
-   fds.fd = s;
-@@ -1881,7 +1870,6 @@ int poll_connect(socket_type s, boost::s
-     ec = boost::system::error_code();
-   return result;
- #endif // defined(BOOST_ASIO_WINDOWS)
--       // || defined(__CYGWIN__)
-        // || defined(__SYMBIAN32__)
- }
- 
-@@ -1926,7 +1914,7 @@ const char* inet_ntop(int af, const void
-     ec = boost::asio::error::address_family_not_supported;
-     return 0;
-   }
--#elif defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#elif defined(BOOST_ASIO_WINDOWS)
-   using namespace std; // For memcpy.
- 
-   if (af != BOOST_ASIO_OS_DEF(AF_INET) && af != BOOST_ASIO_OS_DEF(AF_INET6))
-@@ -1981,7 +1969,7 @@ const char* inet_ntop(int af, const void
-     ec = boost::asio::error::invalid_argument;
- 
-   return result == socket_error_retval ? 0 : dest;
--#else // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#else // defined(BOOST_ASIO_WINDOWS)
-   const char* result = error_wrapper(::inet_ntop(
-         af, src, dest, static_cast<int>(length)), ec);
-   if (result == 0 && !ec)
-@@ -2001,7 +1989,7 @@ const char* inet_ntop(int af, const void
-     strcat(dest, if_name);
-   }
-   return result;
--#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#endif // defined(BOOST_ASIO_WINDOWS)
- }
- 
- int inet_pton(int af, const char* src, void* dest,
-@@ -2152,7 +2140,7 @@ int inet_pton(int af, const char* src, v
-     ec = boost::asio::error::address_family_not_supported;
-     return -1;
-   }
--#elif defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#elif defined(BOOST_ASIO_WINDOWS)
-   using namespace std; // For memcpy and strcmp.
- 
-   if (af != BOOST_ASIO_OS_DEF(AF_INET) && af != BOOST_ASIO_OS_DEF(AF_INET6))
-@@ -2212,7 +2200,7 @@ int inet_pton(int af, const char* src, v
-     ec = boost::system::error_code();
- 
-   return result == socket_error_retval ? -1 : 1;
--#else // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#else // defined(BOOST_ASIO_WINDOWS)
-   int result = error_wrapper(::inet_pton(af, src, dest), ec);
-   if (result <= 0 && !ec)
-     ec = boost::asio::error::invalid_argument;
-@@ -2234,7 +2222,7 @@ int inet_pton(int af, const char* src, v
-     }
-   }
-   return result;
--#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#endif // defined(BOOST_ASIO_WINDOWS)
- }
- 
- int gethostname(char* name, int namelen, boost::system::error_code& ec)
-@@ -2310,7 +2298,7 @@ inline hostent* gethostbyaddr(const char
-     hostent* result, char* buffer, int buflength, boost::system::error_code& ec)
- {
-   clear_last_error();
--#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#if defined(BOOST_ASIO_WINDOWS)
-   (void)(buffer);
-   (void)(buflength);
-   hostent* retval = error_wrapper(::gethostbyaddr(addr, length, af), ec);
-@@ -2353,7 +2341,7 @@ inline hostent* gethostbyname(const char
-     char* buffer, int buflength, int ai_flags, boost::system::error_code& ec)
- {
-   clear_last_error();
--#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#if defined(BOOST_ASIO_WINDOWS)
-   (void)(buffer);
-   (void)(buflength);
-   (void)(ai_flags);
-@@ -3153,7 +3141,7 @@ inline boost::system::error_code transla
-   case EAI_SOCKTYPE:
-     return boost::asio::error::socket_type_not_supported;
-   default: // Possibly the non-portable EAI_SYSTEM.
--#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#if defined(BOOST_ASIO_WINDOWS)
-     return boost::system::error_code(
-         WSAGetLastError(), boost::asio::error::get_system_category());
- #else
-@@ -3170,7 +3158,7 @@ boost::system::error_code getaddrinfo(co
-   host = (host && *host) ? host : 0;
-   service = (service && *service) ? service : 0;
-   clear_last_error();
--#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#if defined(BOOST_ASIO_WINDOWS)
- # if defined(BOOST_ASIO_HAS_GETADDRINFO)
-   // Building for Windows XP, Windows Server 2003, or later.
-   int error = ::getaddrinfo(host, service, &hints, result);
-@@ -3213,7 +3201,7 @@ boost::system::error_code background_get
- 
- void freeaddrinfo(addrinfo_type* ai)
- {
--#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#if defined(BOOST_ASIO_WINDOWS)
- # if defined(BOOST_ASIO_HAS_GETADDRINFO)
-   // Building for Windows XP, Windows Server 2003, or later.
-   ::freeaddrinfo(ai);
-@@ -3241,7 +3229,7 @@ boost::system::error_code getnameinfo(co
-     std::size_t addrlen, char* host, std::size_t hostlen,
-     char* serv, std::size_t servlen, int flags, boost::system::error_code& ec)
- {
--#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#if defined(BOOST_ASIO_WINDOWS)
- # if defined(BOOST_ASIO_HAS_GETADDRINFO)
-   // Building for Windows XP, Windows Server 2003, or later.
-   clear_last_error();
---- boost_1_57_0/boost/asio/detail/impl/socket_select_interrupter.ipp	2014-10-17 17:49:08.000000000 -0500
-+++ boost_1_57_0/boost/asio/detail/impl/socket_select_interrupter.ipp	2015-05-04 17:33:18.861493700 -0500
-@@ -20,7 +20,6 @@
- #if !defined(BOOST_ASIO_WINDOWS_RUNTIME)
- 
- #if defined(BOOST_ASIO_WINDOWS) \
--  || defined(__CYGWIN__) \
-   || defined(__SYMBIAN32__)
- 
- #include <cstdlib>
-@@ -169,7 +168,6 @@ bool socket_select_interrupter::reset()
- #include <boost/asio/detail/pop_options.hpp>
- 
- #endif // defined(BOOST_ASIO_WINDOWS)
--       // || defined(__CYGWIN__)
-        // || defined(__SYMBIAN32__)
- 
- #endif // !defined(BOOST_ASIO_WINDOWS_RUNTIME)
---- boost_1_57_0/boost/asio/detail/impl/winsock_init.ipp	2014-10-17 17:49:08.000000000 -0500
-+++ boost_1_57_0/boost/asio/detail/impl/winsock_init.ipp	2015-05-04 17:33:18.864494100 -0500
-@@ -17,7 +17,7 @@
- 
- #include <boost/asio/detail/config.hpp>
- 
--#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#if defined(BOOST_ASIO_WINDOWS)
- 
- #include <boost/asio/detail/socket_types.hpp>
- #include <boost/asio/detail/winsock_init.hpp>
-@@ -79,6 +79,6 @@ void winsock_init_base::throw_on_error(d
- 
- #include <boost/asio/detail/pop_options.hpp>
- 
--#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#endif // defined(BOOST_ASIO_WINDOWS)
- 
- #endif // BOOST_ASIO_DETAIL_IMPL_WINSOCK_INIT_IPP
---- boost_1_57_0/boost/asio/detail/local_free_on_block_exit.hpp	2014-10-17 17:49:08.000000000 -0500
-+++ boost_1_57_0/boost/asio/detail/local_free_on_block_exit.hpp	2015-05-04 17:33:18.867994600 -0500
-@@ -17,7 +17,7 @@
- 
- #include <boost/asio/detail/config.hpp>
- 
--#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#if defined(BOOST_ASIO_WINDOWS)
- 
- #include <boost/asio/detail/noncopyable.hpp>
- #include <boost/asio/detail/socket_types.hpp>
-@@ -54,6 +54,6 @@ private:
- 
- #include <boost/asio/detail/pop_options.hpp>
- 
--#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#endif // defined(BOOST_ASIO_WINDOWS)
- 
- #endif // BOOST_ASIO_DETAIL_LOCAL_FREE_ON_BLOCK_EXIT_HPP
---- boost_1_57_0/boost/asio/detail/null_signal_blocker.hpp	2014-10-17 17:49:08.000000000 -0500
-+++ boost_1_57_0/boost/asio/detail/null_signal_blocker.hpp	2015-05-04 17:33:18.870994900 -0500
-@@ -20,7 +20,6 @@
- #if !defined(BOOST_ASIO_HAS_THREADS) \
-   || defined(BOOST_ASIO_WINDOWS) \
-   || defined(BOOST_ASIO_WINDOWS_RUNTIME) \
--  || defined(__CYGWIN__) \
-   || defined(__SYMBIAN32__)
- 
- #include <boost/asio/detail/noncopyable.hpp>
-@@ -65,7 +64,6 @@ public:
- #endif // !defined(BOOST_ASIO_HAS_THREADS)
-        // || defined(BOOST_ASIO_WINDOWS)
-        // || defined(BOOST_ASIO_WINDOWS_RUNTIME)
--       // || defined(__CYGWIN__)
-        // || defined(__SYMBIAN32__)
- 
- #endif // BOOST_ASIO_DETAIL_NULL_SIGNAL_BLOCKER_HPP
---- boost_1_57_0/boost/asio/detail/old_win_sdk_compat.hpp	2014-10-17 17:49:08.000000000 -0500
-+++ boost_1_57_0/boost/asio/detail/old_win_sdk_compat.hpp	2015-05-04 17:33:18.874495400 -0500
-@@ -17,7 +17,7 @@
- 
- #include <boost/asio/detail/config.hpp>
- 
--#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#if defined(BOOST_ASIO_WINDOWS)
- 
- // Guess whether we are building against on old Platform SDK.
- #if !defined(IN6ADDR_ANY_INIT)
-@@ -211,6 +211,6 @@ struct addrinfo_emulation
- # define IPPROTO_ICMPV6 58
- #endif
- 
--#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#endif // defined(BOOST_ASIO_WINDOWS)
- 
- #endif // BOOST_ASIO_DETAIL_OLD_WIN_SDK_COMPAT_HPP
---- boost_1_57_0/boost/asio/detail/pipe_select_interrupter.hpp	2014-10-17 17:49:08.000000000 -0500
-+++ boost_1_57_0/boost/asio/detail/pipe_select_interrupter.hpp	2015-05-04 17:33:18.877995800 -0500
-@@ -19,7 +19,6 @@
- 
- #if !defined(BOOST_ASIO_WINDOWS)
- #if !defined(BOOST_ASIO_WINDOWS_RUNTIME)
--#if !defined(__CYGWIN__)
- #if !defined(__SYMBIAN32__)
- #if !defined(BOOST_ASIO_HAS_EVENTFD)
- 
-@@ -84,7 +83,6 @@ private:
- 
- #endif // !defined(BOOST_ASIO_HAS_EVENTFD)
- #endif // !defined(__SYMBIAN32__)
--#endif // !defined(__CYGWIN__)
- #endif // !defined(BOOST_ASIO_WINDOWS_RUNTIME)
- #endif // !defined(BOOST_ASIO_WINDOWS)
- 
---- boost_1_57_0/boost/asio/detail/posix_fd_set_adapter.hpp	2014-10-17 17:49:08.000000000 -0500
-+++ boost_1_57_0/boost/asio/detail/posix_fd_set_adapter.hpp	2015-05-04 17:33:18.881496300 -0500
-@@ -18,7 +18,6 @@
- #include <boost/asio/detail/config.hpp>
- 
- #if !defined(BOOST_ASIO_WINDOWS) \
--  && !defined(__CYGWIN__) \
-   && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
- 
- #include <cstring>
-@@ -114,7 +113,6 @@ private:
- #include <boost/asio/detail/pop_options.hpp>
- 
- #endif // !defined(BOOST_ASIO_WINDOWS)
--       // && !defined(__CYGWIN__)
-        // && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
- 
- #endif // BOOST_ASIO_DETAIL_POSIX_FD_SET_ADAPTER_HPP
---- boost_1_57_0/boost/asio/detail/reactive_descriptor_service.hpp	2014-10-17 17:49:08.000000000 -0500
-+++ boost_1_57_0/boost/asio/detail/reactive_descriptor_service.hpp	2015-05-04 17:33:18.886496900 -0500
-@@ -18,8 +18,7 @@
- #include <boost/asio/detail/config.hpp>
- 
- #if !defined(BOOST_ASIO_WINDOWS) \
--  && !defined(BOOST_ASIO_WINDOWS_RUNTIME) \
--  && !defined(__CYGWIN__)
-+  && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
- 
- #include <boost/asio/buffer.hpp>
- #include <boost/asio/io_service.hpp>
-@@ -319,6 +318,5 @@ private:
- 
- #endif // !defined(BOOST_ASIO_WINDOWS)
-        //   && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
--       //   && !defined(__CYGWIN__)
- 
- #endif // BOOST_ASIO_DETAIL_REACTIVE_DESCRIPTOR_SERVICE_HPP
---- boost_1_57_0/boost/asio/detail/reactive_serial_port_service.hpp	2014-10-17 17:49:08.000000000 -0500
-+++ boost_1_57_0/boost/asio/detail/reactive_serial_port_service.hpp	2015-05-04 17:33:18.889497300 -0500
-@@ -19,7 +19,7 @@
- #include <boost/asio/detail/config.hpp>
- 
- #if defined(BOOST_ASIO_HAS_SERIAL_PORT)
--#if !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)
-+#if !defined(BOOST_ASIO_WINDOWS)
- 
- #include <string>
- #include <boost/asio/error.hpp>
-@@ -230,7 +230,7 @@ private:
- # include <boost/asio/detail/impl/reactive_serial_port_service.ipp>
- #endif // defined(BOOST_ASIO_HEADER_ONLY)
- 
--#endif // !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)
-+#endif // !defined(BOOST_ASIO_WINDOWS)
- #endif // defined(BOOST_ASIO_HAS_SERIAL_PORT)
- 
- #endif // BOOST_ASIO_DETAIL_REACTIVE_SERIAL_PORT_SERVICE_HPP
---- boost_1_57_0/boost/asio/detail/select_interrupter.hpp	2014-10-17 17:49:08.000000000 -0500
-+++ boost_1_57_0/boost/asio/detail/select_interrupter.hpp	2015-05-04 17:33:18.892497700 -0500
-@@ -19,7 +19,7 @@
- 
- #if !defined(BOOST_ASIO_WINDOWS_RUNTIME)
- 
--#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__) || defined(__SYMBIAN32__)
-+#if defined(BOOST_ASIO_WINDOWS) || defined(__SYMBIAN32__)
- # include <boost/asio/detail/socket_select_interrupter.hpp>
- #elif defined(BOOST_ASIO_HAS_EVENTFD)
- # include <boost/asio/detail/eventfd_select_interrupter.hpp>
-@@ -31,7 +31,7 @@ namespace boost {
- namespace asio {
- namespace detail {
- 
--#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__) || defined(__SYMBIAN32__)
-+#if defined(BOOST_ASIO_WINDOWS) || defined(__SYMBIAN32__)
- typedef socket_select_interrupter select_interrupter;
- #elif defined(BOOST_ASIO_HAS_EVENTFD)
- typedef eventfd_select_interrupter select_interrupter;
---- boost_1_57_0/boost/asio/detail/select_reactor.hpp	2014-10-17 17:49:08.000000000 -0500
-+++ boost_1_57_0/boost/asio/detail/select_reactor.hpp	2015-05-04 17:33:18.895498100 -0500
-@@ -51,13 +51,13 @@ class select_reactor
-   : public boost::asio::detail::service_base<select_reactor>
- {
- public:
--#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#if defined(BOOST_ASIO_WINDOWS)
-   enum op_types { read_op = 0, write_op = 1, except_op = 2,
-     max_select_ops = 3, connect_op = 3, max_ops = 4 };
--#else // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#else // defined(BOOST_ASIO_WINDOWS)
-   enum op_types { read_op = 0, write_op = 1, except_op = 2,
-     max_select_ops = 3, connect_op = 1, max_ops = 3 };
--#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#endif // defined(BOOST_ASIO_WINDOWS)
- 
-   // Per-descriptor data.
-   struct per_descriptor_data
---- boost_1_57_0/boost/asio/detail/signal_blocker.hpp	2014-10-17 17:49:08.000000000 -0500
-+++ boost_1_57_0/boost/asio/detail/signal_blocker.hpp	2015-05-04 17:33:18.898498400 -0500
-@@ -19,7 +19,7 @@
- 
- #if !defined(BOOST_ASIO_HAS_THREADS) || defined(BOOST_ASIO_WINDOWS) \
-   || defined(BOOST_ASIO_WINDOWS_RUNTIME) \
--  || defined(__CYGWIN__) || defined(__SYMBIAN32__)
-+  || defined(__SYMBIAN32__)
- # include <boost/asio/detail/null_signal_blocker.hpp>
- #elif defined(BOOST_ASIO_HAS_PTHREADS)
- # include <boost/asio/detail/posix_signal_blocker.hpp>
-@@ -33,7 +33,7 @@ namespace detail {
- 
- #if !defined(BOOST_ASIO_HAS_THREADS) || defined(BOOST_ASIO_WINDOWS) \
-   || defined(BOOST_ASIO_WINDOWS_RUNTIME) \
--  || defined(__CYGWIN__) || defined(__SYMBIAN32__)
-+  || defined(__SYMBIAN32__)
- typedef null_signal_blocker signal_blocker;
- #elif defined(BOOST_ASIO_HAS_PTHREADS)
- typedef posix_signal_blocker signal_blocker;
---- boost_1_57_0/boost/asio/detail/signal_init.hpp	2014-10-17 17:49:08.000000000 -0500
-+++ boost_1_57_0/boost/asio/detail/signal_init.hpp	2015-05-04 17:33:18.901998900 -0500
-@@ -17,7 +17,7 @@
- 
- #include <boost/asio/detail/config.hpp>
- 
--#if !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)
-+#if !defined(BOOST_ASIO_WINDOWS)
- 
- #include <csignal>
- 
-@@ -44,6 +44,6 @@ public:
- 
- #include <boost/asio/detail/pop_options.hpp>
- 
--#endif // !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)
-+#endif // !defined(BOOST_ASIO_WINDOWS)
- 
- #endif // BOOST_ASIO_DETAIL_SIGNAL_INIT_HPP
---- boost_1_57_0/boost/asio/detail/signal_set_service.hpp	2014-10-17 17:49:08.000000000 -0500
-+++ boost_1_57_0/boost/asio/detail/signal_set_service.hpp	2015-05-04 17:33:18.904999300 -0500
-@@ -28,9 +28,9 @@
- #include <boost/asio/detail/signal_op.hpp>
- #include <boost/asio/detail/socket_types.hpp>
- 
--#if !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)
-+#if !defined(BOOST_ASIO_WINDOWS)
- # include <boost/asio/detail/reactor.hpp>
--#endif // !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)
-+#endif // !defined(BOOST_ASIO_WINDOWS)
- 
- #include <boost/asio/detail/push_options.hpp>
- 
-@@ -183,8 +183,7 @@ private:
-   io_service_impl& io_service_;
- 
- #if !defined(BOOST_ASIO_WINDOWS) \
--  && !defined(BOOST_ASIO_WINDOWS_RUNTIME) \
--  && !defined(__CYGWIN__)
-+  && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
-   // The type used for registering for pipe reactor notifications.
-   class pipe_read_op;
- 
-@@ -195,7 +194,6 @@ private:
-   reactor::per_descriptor_data reactor_data_;
- #endif // !defined(BOOST_ASIO_WINDOWS)
-        //   && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
--       //   && !defined(__CYGWIN__)
- 
-   // A mapping from signal number to the registered signal sets.
-   registration* registrations_[max_signal_number];
---- boost_1_57_0/boost/asio/detail/socket_ops.hpp	2014-10-17 17:49:08.000000000 -0500
-+++ boost_1_57_0/boost/asio/detail/socket_ops.hpp	2015-05-04 17:33:18.907999600 -0500
-@@ -128,11 +128,11 @@ BOOST_ASIO_DECL size_t available(socket_
- BOOST_ASIO_DECL int listen(socket_type s,
-     int backlog, boost::system::error_code& ec);
- 
--#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#if defined(BOOST_ASIO_WINDOWS)
- typedef WSABUF buf;
--#else // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#else // defined(BOOST_ASIO_WINDOWS)
- typedef iovec buf;
--#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#endif // defined(BOOST_ASIO_WINDOWS)
- 
- BOOST_ASIO_DECL void init_buf(buf& b, void* data, size_t size);
- 
---- boost_1_57_0/boost/asio/detail/socket_select_interrupter.hpp	2014-10-17 17:49:08.000000000 -0500
-+++ boost_1_57_0/boost/asio/detail/socket_select_interrupter.hpp	2015-05-04 17:33:18.912500200 -0500
-@@ -20,7 +20,6 @@
- #if !defined(BOOST_ASIO_WINDOWS_RUNTIME)
- 
- #if defined(BOOST_ASIO_WINDOWS) \
--  || defined(__CYGWIN__) \
-   || defined(__SYMBIAN32__)
- 
- #include <boost/asio/detail/socket_types.hpp>
-@@ -85,7 +84,6 @@ private:
- #endif // defined(BOOST_ASIO_HEADER_ONLY)
- 
- #endif // defined(BOOST_ASIO_WINDOWS)
--       // || defined(__CYGWIN__)
-        // || defined(__SYMBIAN32__)
- 
- #endif // !defined(BOOST_ASIO_WINDOWS_RUNTIME)
---- boost_1_57_0/boost/asio/detail/socket_types.hpp	2015-05-04 17:16:30.021887400 -0500
-+++ boost_1_57_0/boost/asio/detail/socket_types.hpp	2015-05-04 17:33:18.915500600 -0500
-@@ -19,7 +19,7 @@
- 
- #if defined(BOOST_ASIO_WINDOWS_RUNTIME)
- // Empty.
--#elif defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#elif defined(BOOST_ASIO_WINDOWS)
- # if defined(_WINSOCKAPI_) && !defined(_WINSOCK2API_)
- #  error WinSock.h has already been included
- # endif // defined(_WINSOCKAPI_) && !defined(_WINSOCK2API_)
-@@ -169,7 +169,7 @@ typedef int signed_size_type;
- # define BOOST_ASIO_OS_DEF_AI_V4MAPPED 0x800
- # define BOOST_ASIO_OS_DEF_AI_ALL 0x100
- # define BOOST_ASIO_OS_DEF_AI_ADDRCONFIG 0x400
--#elif defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#elif defined(BOOST_ASIO_WINDOWS)
- typedef SOCKET socket_type;
- const SOCKET invalid_socket = INVALID_SOCKET;
- const int socket_error_retval = SOCKET_ERROR;
---- boost_1_57_0/boost/asio/detail/win_fd_set_adapter.hpp	2014-10-17 17:49:08.000000000 -0500
-+++ boost_1_57_0/boost/asio/detail/win_fd_set_adapter.hpp	2015-05-04 17:33:18.919001000 -0500
-@@ -17,7 +17,7 @@
- 
- #include <boost/asio/detail/config.hpp>
- 
--#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#if defined(BOOST_ASIO_WINDOWS)
- 
- #include <boost/asio/detail/noncopyable.hpp>
- #include <boost/asio/detail/reactor_op_queue.hpp>
-@@ -146,6 +146,6 @@ private:
- 
- #include <boost/asio/detail/pop_options.hpp>
- 
--#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#endif // defined(BOOST_ASIO_WINDOWS)
- 
- #endif // BOOST_ASIO_DETAIL_WIN_FD_SET_ADAPTER_HPP
---- boost_1_57_0/boost/asio/detail/winsock_init.hpp	2014-10-17 17:49:08.000000000 -0500
-+++ boost_1_57_0/boost/asio/detail/winsock_init.hpp	2015-05-04 17:33:18.923501600 -0500
-@@ -17,7 +17,7 @@
- 
- #include <boost/asio/detail/config.hpp>
- 
--#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#if defined(BOOST_ASIO_WINDOWS)
- 
- #include <boost/asio/detail/push_options.hpp>
- 
-@@ -125,6 +125,6 @@ static const winsock_init<>& winsock_ini
- # include <boost/asio/detail/impl/winsock_init.ipp>
- #endif // defined(BOOST_ASIO_HEADER_ONLY)
- 
--#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#endif // defined(BOOST_ASIO_WINDOWS)
- 
- #endif // BOOST_ASIO_DETAIL_WINSOCK_INIT_HPP
---- boost_1_57_0/boost/asio/error.hpp	2014-10-17 17:49:08.000000000 -0500
-+++ boost_1_57_0/boost/asio/error.hpp	2015-05-04 17:33:18.926502000 -0500
-@@ -20,7 +20,6 @@
- #include <boost/system/error_code.hpp>
- #include <boost/system/system_error.hpp>
- #if defined(BOOST_ASIO_WINDOWS) \
--  || defined(__CYGWIN__) \
-   || defined(BOOST_ASIO_WINDOWS_RUNTIME)
- # include <winerror.h>
- #else
-@@ -45,7 +44,7 @@
- # define BOOST_ASIO_NETDB_ERROR(e) __HRESULT_FROM_WIN32(WSA ## e)
- # define BOOST_ASIO_GETADDRINFO_ERROR(e) __HRESULT_FROM_WIN32(WSA ## e)
- # define BOOST_ASIO_WIN_OR_POSIX(e_win, e_posix) e_win
--#elif defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#elif defined(BOOST_ASIO_WINDOWS)
- # define BOOST_ASIO_NATIVE_ERROR(e) e
- # define BOOST_ASIO_SOCKET_ERROR(e) WSA ## e
- # define BOOST_ASIO_NETDB_ERROR(e) WSA ## e
-@@ -225,7 +224,7 @@ inline const boost::system::error_catego
-   return boost::system::system_category();
- }
- 
--#if !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)
-+#if !defined(BOOST_ASIO_WINDOWS)
- 
- extern BOOST_ASIO_DECL
- const boost::system::error_category& get_netdb_category();
-@@ -233,7 +232,7 @@ const boost::system::error_category& get
- extern BOOST_ASIO_DECL
- const boost::system::error_category& get_addrinfo_category();
- 
--#else // !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)
-+#else // !defined(BOOST_ASIO_WINDOWS)
- 
- inline const boost::system::error_category& get_netdb_category()
- {
-@@ -245,7 +244,7 @@ inline const boost::system::error_catego
-   return get_system_category();
- }
- 
--#endif // !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)
-+#endif // !defined(BOOST_ASIO_WINDOWS)
- 
- extern BOOST_ASIO_DECL
- const boost::system::error_category& get_misc_category();
---- boost_1_57_0/boost/asio/impl/error.ipp	2014-10-17 17:49:08.000000000 -0500
-+++ boost_1_57_0/boost/asio/impl/error.ipp	2015-05-04 17:33:18.931002600 -0500
-@@ -25,7 +25,7 @@ namespace boost {
- namespace asio {
- namespace error {
- 
--#if !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)
-+#if !defined(BOOST_ASIO_WINDOWS)
- 
- namespace detail {
- 
-@@ -87,7 +87,7 @@ const boost::system::error_category& get
-   return instance;
- }
- 
--#endif // !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)
-+#endif // !defined(BOOST_ASIO_WINDOWS)
- 
- namespace detail {
- 
---- boost_1_57_0/boost/asio/impl/serial_port_base.ipp	2014-10-17 17:49:08.000000000 -0500
-+++ boost_1_57_0/boost/asio/impl/serial_port_base.ipp	2015-05-04 17:33:18.936503300 -0500
-@@ -27,7 +27,7 @@
- 
- #if defined(GENERATING_DOCUMENTATION)
- # define BOOST_ASIO_OPTION_STORAGE implementation_defined
--#elif defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#elif defined(BOOST_ASIO_WINDOWS)
- # define BOOST_ASIO_OPTION_STORAGE DCB
- #else
- # define BOOST_ASIO_OPTION_STORAGE termios
-@@ -41,7 +41,7 @@ namespace asio {
- boost::system::error_code serial_port_base::baud_rate::store(
-     BOOST_ASIO_OPTION_STORAGE& storage, boost::system::error_code& ec) const
- {
--#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#if defined(BOOST_ASIO_WINDOWS)
-   storage.BaudRate = value_;
- #else
-   speed_t baud;
-@@ -128,7 +128,7 @@ boost::system::error_code serial_port_ba
- boost::system::error_code serial_port_base::baud_rate::load(
-     const BOOST_ASIO_OPTION_STORAGE& storage, boost::system::error_code& ec)
- {
--#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#if defined(BOOST_ASIO_WINDOWS)
-   value_ = storage.BaudRate;
- #else
-   speed_t baud = ::cfgetospeed(&storage);
-@@ -221,7 +221,7 @@ serial_port_base::flow_control::flow_con
- boost::system::error_code serial_port_base::flow_control::store(
-     BOOST_ASIO_OPTION_STORAGE& storage, boost::system::error_code& ec) const
- {
--#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#if defined(BOOST_ASIO_WINDOWS)
-   storage.fOutxCtsFlow = FALSE;
-   storage.fOutxDsrFlow = FALSE;
-   storage.fTXContinueOnXoff = TRUE;
-@@ -288,7 +288,7 @@ boost::system::error_code serial_port_ba
- boost::system::error_code serial_port_base::flow_control::load(
-     const BOOST_ASIO_OPTION_STORAGE& storage, boost::system::error_code& ec)
- {
--#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#if defined(BOOST_ASIO_WINDOWS)
-   if (storage.fOutX && storage.fInX)
-   {
-     value_ = software;
-@@ -339,7 +339,7 @@ serial_port_base::parity::parity(serial_
- boost::system::error_code serial_port_base::parity::store(
-     BOOST_ASIO_OPTION_STORAGE& storage, boost::system::error_code& ec) const
- {
--#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#if defined(BOOST_ASIO_WINDOWS)
-   switch (value_)
-   {
-   case none:
-@@ -386,7 +386,7 @@ boost::system::error_code serial_port_ba
- boost::system::error_code serial_port_base::parity::load(
-     const BOOST_ASIO_OPTION_STORAGE& storage, boost::system::error_code& ec)
- {
--#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#if defined(BOOST_ASIO_WINDOWS)
-   if (storage.Parity == EVENPARITY)
-   {
-     value_ = even;
-@@ -434,7 +434,7 @@ serial_port_base::stop_bits::stop_bits(
- boost::system::error_code serial_port_base::stop_bits::store(
-     BOOST_ASIO_OPTION_STORAGE& storage, boost::system::error_code& ec) const
- {
--#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#if defined(BOOST_ASIO_WINDOWS)
-   switch (value_)
-   {
-   case one:
-@@ -470,7 +470,7 @@ boost::system::error_code serial_port_ba
- boost::system::error_code serial_port_base::stop_bits::load(
-     const BOOST_ASIO_OPTION_STORAGE& storage, boost::system::error_code& ec)
- {
--#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#if defined(BOOST_ASIO_WINDOWS)
-   if (storage.StopBits == ONESTOPBIT)
-   {
-     value_ = one;
-@@ -507,7 +507,7 @@ serial_port_base::character_size::charac
- boost::system::error_code serial_port_base::character_size::store(
-     BOOST_ASIO_OPTION_STORAGE& storage, boost::system::error_code& ec) const
- {
--#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#if defined(BOOST_ASIO_WINDOWS)
-   storage.ByteSize = value_;
- #else
-   storage.c_cflag &= ~CSIZE;
-@@ -527,7 +527,7 @@ boost::system::error_code serial_port_ba
- boost::system::error_code serial_port_base::character_size::load(
-     const BOOST_ASIO_OPTION_STORAGE& storage, boost::system::error_code& ec)
- {
--#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#if defined(BOOST_ASIO_WINDOWS)
-   value_ = storage.ByteSize;
- #else
-   if ((storage.c_cflag & CSIZE) == CS5) { value_ = 5; }
---- boost_1_57_0/boost/asio/io_service.hpp	2014-10-17 17:49:08.000000000 -0500
-+++ boost_1_57_0/boost/asio/io_service.hpp	2015-05-04 17:33:18.940003700 -0500
-@@ -24,7 +24,7 @@
- #include <boost/asio/detail/wrapped_handler.hpp>
- #include <boost/system/error_code.hpp>
- 
--#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#if defined(BOOST_ASIO_WINDOWS)
- # include <boost/asio/detail/winsock_init.hpp>
- #elif defined(__sun) || defined(__QNX__) || defined(__hpux) || defined(_AIX) \
-   || defined(__osf__)
-@@ -600,7 +600,7 @@ public:
-   friend bool has_service(io_service& ios);
- 
- private:
--#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#if defined(BOOST_ASIO_WINDOWS)
-   detail::winsock_init<> init_;
- #elif defined(__sun) || defined(__QNX__) || defined(__hpux) || defined(_AIX) \
-   || defined(__osf__)
---- boost_1_57_0/boost/asio/serial_port_base.hpp	2014-10-17 17:49:08.000000000 -0500
-+++ boost_1_57_0/boost/asio/serial_port_base.hpp	2015-05-04 17:33:18.943004100 -0500
-@@ -21,16 +21,16 @@
- #if defined(BOOST_ASIO_HAS_SERIAL_PORT) \
-   || defined(GENERATING_DOCUMENTATION)
- 
--#if !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)
-+#if !defined(BOOST_ASIO_WINDOWS)
- # include <termios.h>
--#endif // !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)
-+#endif // !defined(BOOST_ASIO_WINDOWS)
- 
- #include <boost/asio/detail/socket_types.hpp>
- #include <boost/system/error_code.hpp>
- 
- #if defined(GENERATING_DOCUMENTATION)
- # define BOOST_ASIO_OPTION_STORAGE implementation_defined
--#elif defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#elif defined(BOOST_ASIO_WINDOWS)
- # define BOOST_ASIO_OPTION_STORAGE DCB
- #else
- # define BOOST_ASIO_OPTION_STORAGE termios
---- boost_1_57_0/boost/asio/ssl/detail/impl/openssl_init.ipp	2014-10-17 17:49:08.000000000 -0500
-+++ boost_1_57_0/boost/asio/ssl/detail/impl/openssl_init.ipp	2015-05-04 17:33:18.946504500 -0500
-@@ -85,15 +85,15 @@ public:
- private:
-   static unsigned long openssl_id_func()
-   {
--#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#if defined(BOOST_ASIO_WINDOWS)
-     return ::GetCurrentThreadId();
--#else // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#else // defined(BOOST_ASIO_WINDOWS)
-     void* id = instance()->thread_id_;
-     if (id == 0)
-       instance()->thread_id_ = id = &id; // Ugh.
-     BOOST_ASIO_ASSERT(sizeof(unsigned long) >= sizeof(void*));
-     return reinterpret_cast<unsigned long>(id);
--#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-+#endif // defined(BOOST_ASIO_WINDOWS)
-   }
- 
-   static void openssl_locking_func(int mode, int n, 
-@@ -109,10 +109,10 @@ private:
-   std::vector<boost::asio::detail::shared_ptr<
-         boost::asio::detail::mutex> > mutexes_;
- 
--#if !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)
-+#if !defined(BOOST_ASIO_WINDOWS)
-   // The thread identifiers to be used by openssl.
-   boost::asio::detail::tss_ptr<void> thread_id_;
--#endif // !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)
-+#endif // !defined(BOOST_ASIO_WINDOWS)
- 
- #if !defined(SSL_OP_NO_COMPRESSION) \
-   && (OPENSSL_VERSION_NUMBER >= 0x00908000L)
diff --git a/pkgs/development/libraries/boost/cygwin-1.57.0-config-cygwin.patch b/pkgs/development/libraries/boost/cygwin-1.57.0-config-cygwin.patch
deleted file mode 100644
index 97acc72689d..00000000000
--- a/pkgs/development/libraries/boost/cygwin-1.57.0-config-cygwin.patch
+++ /dev/null
@@ -1,76 +0,0 @@
---- boost_1_57_0/boost/config/platform/cygwin.hpp	2015-05-04 18:02:21.742811600 -0500
-+++ boost_1_57_0/boost/config/platform/cygwin.hpp	2015-05-04 17:16:30.183407900 -0500
-@@ -39,18 +39,8 @@
- #define BOOST_HAS_STDINT_H
- #endif
- 
--/// Cygwin has no fenv.h
--#define BOOST_NO_FENV_H
--
- // boilerplate code:
- #include <boost/config/posix_features.hpp>
--
--//
--// Cygwin lies about XSI conformance, there is no nl_types.h:
--//
--#ifdef BOOST_HAS_NL_TYPES_H
--#  undef BOOST_HAS_NL_TYPES_H
--#endif
-  
- 
- 
---- boost_1_57_0/boost/config/stdlib/libstdcpp3.hpp	2014-10-26 07:36:42.000000000 -0500
-+++ boost_1_57_0/boost/config/stdlib/libstdcpp3.hpp	2015-05-04 17:54:44.835791700 -0500
-@@ -68,7 +68,7 @@
- #endif
- 
- // Apple doesn't seem to reliably defined a *unix* macro
--#if !defined(CYGWIN) && (  defined(__unix__)  \
-+#if (  defined(__unix__)  \
-                         || defined(__unix)    \
-                         || defined(unix)      \
-                         || defined(__APPLE__) \
---- boost_1_57_0/boost/config/stdlib/sgi.hpp	2014-10-26 07:36:42.000000000 -0500
-+++ boost_1_57_0/boost/config/stdlib/sgi.hpp	2015-05-04 17:54:52.911817300 -0500
-@@ -41,7 +41,7 @@
- #endif
- 
- // Apple doesn't seem to reliably defined a *unix* macro
--#if !defined(CYGWIN) && (  defined(__unix__)  \
-+#if (  defined(__unix__)  \
-                         || defined(__unix)    \
-                         || defined(unix)      \
-                         || defined(__APPLE__) \
---- boost_1_57_0/boost/config/stdlib/stlport.hpp	2014-10-26 07:36:42.000000000 -0500
-+++ boost_1_57_0/boost/config/stdlib/stlport.hpp	2015-05-04 17:55:00.621796300 -0500
-@@ -17,7 +17,7 @@
- #endif
- 
- // Apple doesn't seem to reliably defined a *unix* macro
--#if !defined(CYGWIN) && (  defined(__unix__)  \
-+#if (  defined(__unix__)  \
-                         || defined(__unix)    \
-                         || defined(unix)      \
-                         || defined(__APPLE__) \
---- boost_1_57_0/boost/config/stdlib/vacpp.hpp	2014-10-26 07:36:42.000000000 -0500
-+++ boost_1_57_0/boost/config/stdlib/vacpp.hpp	2015-05-04 17:55:07.424660200 -0500
-@@ -13,7 +13,7 @@
- #define BOOST_NO_STD_MESSAGES
- 
- // Apple doesn't seem to reliably defined a *unix* macro
--#if !defined(CYGWIN) && (  defined(__unix__)  \
-+#if (  defined(__unix__)  \
-                         || defined(__unix)    \
-                         || defined(unix)      \
-                         || defined(__APPLE__) \
---- boost_1_57_0/boost/predef/os/cygwin.h	2014-07-10 08:53:53.000000000 -0500
-+++ boost_1_57_0/boost/predef/os/cygwin.h	2015-05-04 17:57:31.634472500 -0500
-@@ -29,7 +29,7 @@ http://www.boost.org/LICENSE_1_0.txt)
-     defined(__CYGWIN__) \
-     )
- #   undef BOOST_OS_CYGWIN
--#   define BOOST_OS_CGYWIN BOOST_VERSION_NUMBER_AVAILABLE
-+#   define BOOST_OS_CYGWIN BOOST_VERSION_NUMBER_AVAILABLE
- #endif
- 
- #if BOOST_OS_CYGWIN
diff --git a/pkgs/development/libraries/boost/cygwin-1.57.0-context-cygwin.patch b/pkgs/development/libraries/boost/cygwin-1.57.0-context-cygwin.patch
deleted file mode 100644
index 3d9726179be..00000000000
--- a/pkgs/development/libraries/boost/cygwin-1.57.0-context-cygwin.patch
+++ /dev/null
@@ -1,600 +0,0 @@
---- boost_1_57_0/libs/context/build/Jamfile.v2	2014-10-20 01:26:00.000000000 -0500
-+++ boost_1_57_0/libs/context/build/Jamfile.v2	2015-05-04 17:43:10.812161900 -0500
-@@ -29,6 +29,7 @@ local rule default_binary_format ( )
-     local tmp = elf ;
-     if [ os.name ] = "MACOSX" { tmp = mach-o ; }
-     if [ os.name ] = "NT" { tmp = pe ; }
-+    if [ os.name ] = "CYGWIN" { tmp = pe ; }
-     if [ os.name ] = "AIX" { tmp = xcoff ; }
-     return $(tmp) ;
- }
-@@ -581,6 +582,16 @@ alias asm_context_sources
-    ;
- 
- alias asm_context_sources
-+   : asm/make_i386_ms_pe_gas.S
-+     asm/jump_i386_ms_pe_gas.S
-+     dummy.cpp
-+   : <address-model>32
-+     <architecture>x86
-+     <binary-format>pe
-+     <toolset>gcc
-+   ;
-+
-+alias asm_context_sources
-    : asm/make_i386_ms_pe_masm.asm
-      asm/jump_i386_ms_pe_masm.asm
-      dummy.cpp
-@@ -715,6 +726,16 @@ alias asm_context_sources
-    ;
- 
- alias asm_context_sources
-+   : asm/make_x86_64_ms_pe_gas.S
-+     asm/jump_x86_64_ms_pe_gas.S
-+     dummy.cpp
-+   : <address-model>64
-+     <architecture>x86
-+     <binary-format>pe
-+     <toolset>gcc
-+   ;
-+
-+alias asm_context_sources
-    : asm/make_x86_64_ms_pe_masm.asm
-      asm/jump_x86_64_ms_pe_masm.asm
-      dummy.cpp
---- boost_1_57_0/libs/context/src/asm/jump_i386_ms_pe_gas.S	1969-12-31 18:00:00.000000000 -0600
-+++ boost_1_57_0/libs/context/src/asm/jump_i386_ms_pe_gas.S	2015-05-04 17:43:10.821663100 -0500
-@@ -0,0 +1,108 @@
-+/*
-+            Copyright Oliver Kowalke 2009.
-+            Copyright Thomas Sailer 2013.
-+   Distributed under the Boost Software License, Version 1.0.
-+      (See accompanying file LICENSE_1_0.txt or copy at
-+            http://www.boost.org/LICENSE_1_0.txt)
-+*/
-+
-+/********************************************************************
-+ *                                                                  *
-+ *  --------------------------------------------------------------  *
-+ *  |    0    |    1    |    2    |    3    |    4     |    5    |  *
-+ *  --------------------------------------------------------------  *
-+ *  |    0h   |   04h   |   08h   |   0ch   |   010h   |   014h  |  *
-+ *  --------------------------------------------------------------  *
-+ *  |   EDI   |   ESI   |   EBX   |   EBP   |   ESP    |   EIP   |  *
-+ *  --------------------------------------------------------------  *
-+ *  --------------------------------------------------------------  *
-+ *  |    6    |    7    |    8    |                              |  *
-+ *  --------------------------------------------------------------  *
-+ *  |   018h  |   01ch  |   020h  |                              |  *
-+ *  --------------------------------------------------------------  *
-+ *  |    sp   |   size  |  limit  |                              |  *
-+ *  --------------------------------------------------------------  *
-+ *  --------------------------------------------------------------  *
-+ *  |    9    |                                                  |  *
-+ *  --------------------------------------------------------------  *
-+ *  |  024h   |                                                  |  *
-+ *  --------------------------------------------------------------  *
-+ *  |fc_execpt|                                                  |  *
-+ *  --------------------------------------------------------------  *
-+ *  --------------------------------------------------------------  *
-+ *  |   10    |                                                  |  *
-+ *  --------------------------------------------------------------  *
-+ *  |  028h   |                                                  |  *
-+ *  --------------------------------------------------------------  *
-+ *  |fc_strage|                                                  |  *
-+ *  --------------------------------------------------------------  *
-+ *  --------------------------------------------------------------  *
-+ *  |   11    |    12   |                                        |  *
-+ *  --------------------------------------------------------------  *
-+ *  |  02ch   |   030h  |                                        |  *
-+ *  --------------------------------------------------------------  *
-+ *  | fc_mxcsr|fc_x87_cw|                                        |  *
-+ *  --------------------------------------------------------------  *
-+ *                                                                  *
-+ * *****************************************************************/
-+
-+.file	"jump_i386_ms_pe_gas.S"
-+.text
-+.p2align 4,,15
-+.globl	_jump_fcontext
-+.def	_jump_fcontext;	.scl	2;	.type	32;	.endef
-+_jump_fcontext:
-+    movl    0x04(%esp), %ecx        /* load address of the first fcontext_t arg */
-+    movl    %edi,       (%ecx)      /* save EDI */
-+    movl    %esi,       0x04(%ecx)  /* save ESI */
-+    movl    %ebx,       0x08(%ecx)  /* save EBX */
-+    movl    %ebp,       0x0c(%ecx)  /* save EBP */
-+
-+    movl    %fs:(0x18), %edx        /* load NT_TIB */
-+    movl    (%edx),     %eax        /* load current SEH exception list */
-+    movl    %eax,       0x24(%ecx)  /* save current exception list */
-+    movl    0x04(%edx), %eax        /* load current stack base */
-+    movl    %eax,       0x18(%ecx)  /* save current stack base */
-+    movl    0x08(%edx), %eax        /* load current stack limit */
-+    movl    %eax,       0x20(%ecx)  /* save current stack limit */
-+    movl    0x10(%edx), %eax        /* load fiber local storage */
-+    movl    %eax,       0x28(%ecx)  /* save fiber local storage */
-+
-+    leal    0x04(%esp), %eax        /* exclude the return address */
-+    movl    %eax,       0x10(%ecx)  /* save as stack pointer */
-+    movl    (%esp),     %eax        /* load return address */
-+    movl    %eax,       0x14(%ecx)  /* save return address */
-+
-+    movl    0x08(%esp), %edx        /* load address of the second fcontext_t arg */
-+    movl    (%edx),     %edi        /* restore EDI */
-+    movl    0x04(%edx), %esi        /* restore ESI */
-+    movl    0x08(%edx), %ebx        /* restore EBX */
-+    movl    0x0c(%edx), %ebp        /* restore EBP */
-+
-+    movl    0x10(%esp), %eax        /* check if fpu enve preserving was requested */
-+    testl   %eax,       %eax 
-+    je      1f
-+
-+    stmxcsr 0x2c(%ecx)              /* save MMX control word */
-+    fnstcw  0x30(%ecx)              /* save x87 control word */
-+    ldmxcsr 0x2c(%edx)              /* restore MMX control word */
-+    fldcw   0x30(%edx)              /* restore x87 control word */
-+1:
-+    movl    %edx,       %ecx        
-+    movl    %fs:(0x18), %edx        /* load NT_TIB */
-+    movl    0x24(%ecx), %eax        /* load SEH exception list */
-+    movl    %eax,       (%edx)      /* restore next SEH item */
-+    movl    0x18(%ecx), %eax        /* load stack base */
-+    movl    %eax,       0x04(%edx)  /* restore stack base */
-+    movl    0x20(%ecx), %eax        /* load stack limit */
-+    movl    %eax,       0x08(%edx)  /* restore stack limit */
-+    movl    0x28(%ecx), %eax        /* load fiber local storage */
-+    movl    %eax,       0x10(%edx)  /* restore fiber local storage */
-+			            
-+    movl    0x0c(%esp), %eax        /* use third arg as return value after jump */
-+			            
-+    movl    0x10(%ecx), %esp        /* restore ESP */
-+    movl    %eax,       0x04(%esp)  /* use third arg as first arg in context function */
-+    movl    0x14(%ecx), %ecx        /* fetch the address to return to */
-+
-+    jmp     *%ecx                   /* indirect jump to context */
---- boost_1_57_0/libs/context/src/asm/jump_x86_64_ms_pe_gas.S	1969-12-31 18:00:00.000000000 -0600
-+++ boost_1_57_0/libs/context/src/asm/jump_x86_64_ms_pe_gas.S	2015-05-04 17:43:10.829664200 -0500
-@@ -0,0 +1,189 @@
-+/*
-+            Copyright Oliver Kowalke 2009.
-+            Copyright Thomas Sailer 2013.
-+   Distributed under the Boost Software License, Version 1.0.
-+      (See accompanying file LICENSE_1_0.txt or copy at
-+            http://www.boost.org/LICENSE_1_0.txt)
-+*/
-+
-+/****************************************************************************************
-+ *                                                                                      *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  |    0    |    1    |    2    |    3    |    4     |    5    |    6    |    7    |  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  |   0x0   |   0x4   |   0x8   |   0xc   |   0x10   |   0x14  |   0x18  |   0x1c  |  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  |        R12        |         R13       |         R14        |        R15        |  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  |    8    |    9    |   10    |   11    |    12    |    13   |    14   |    15   |  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  |   0x20  |   0x24  |   0x28  |  0x2c   |   0x30   |   0x34  |   0x38  |   0x3c  |  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  |        RDI        |        RSI        |         RBX        |        RBP        |  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  |    16   |    17   |    18   |    19   |                                        |  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  |   0x40  |   0x44  |   0x48  |   0x4c  |                                        |  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  |        RSP        |        RIP        |                                        |  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  |    20   |    21   |    22   |    23   |    24    |    25   |                   |  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  |   0x50  |   0x54  |   0x58  |   0x5c  |   0x60   |   0x64  |                   |  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  |        sp         |       size        |        limit       |                   |  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  |    26   |   27    |                                                            |  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  |   0x68  |   0x6c  |                                                            |  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  |      fbr_strg     |                                                            |  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  |    28   |   29    |    30   |    31   |    32    |    33   |   34    |   35    |  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  |   0x70  |   0x74  |   0x78  |   0x7c  |   0x80   |   0x84  |  0x88   |  0x8c   |  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  | fc_mxcsr|fc_x87_cw|      fc_xmm       |      SEE registers (XMM6-XMM15)        |  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  |   36    |    37   |    38   |    39   |    40    |    41   |   42    |   43    |  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  |  0x90   |   0x94  |   0x98  |   0x9c  |   0xa0   |   0xa4  |  0xa8   |  0xac   |  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  |                          SEE registers (XMM6-XMM15)                            |  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  |    44    |   45    |    46   |    47  |    48    |    49   |   50    |   51    |  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  |   0xb0   |  0xb4   |  0xb8   |  0xbc  |   0xc0   |   0xc4  |  0xc8   |  0xcc   |  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  |                          SEE registers (XMM6-XMM15)                            |  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  |    52    |   53    |    54   |   55   |    56    |    57   |   58    |   59    |  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  |   0xd0   |  0xd4   |   0xd8  |  0xdc  |   0xe0   |  0xe4   |  0xe8   |  0xec   |  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  |                          SEE registers (XMM6-XMM15)                            |  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  |    60   |    61   |    62    |    63  |    64    |    65   |   66    |   67    |  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  |  0xf0   |  0xf4   |   0xf8   |  0xfc  |   0x100  |  0x104  |  0x108  |  0x10c  |  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  |                          SEE registers (XMM6-XMM15)                            |  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  |    68   |    69   |    70    |    71  |    72    |    73   |   74    |   75    |  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  |  0x110  |  0x114  |   0x118  |  0x11c |   0x120  |  0x124  |  0x128  |  0x12c  |  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  |                          SEE registers (XMM6-XMM15)                            |  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *                                                                                      *
-+ * *************************************************************************************/
-+
-+.file	"jump_x86_64_ms_pe_gas.S"
-+.text
-+.p2align 4,,15
-+.globl	jump_fcontext
-+.def	jump_fcontext;	.scl	2;	.type	32;	.endef
-+.seh_proc	jump_fcontext
-+jump_fcontext:
-+.seh_endprologue
-+    movq    %r12,       (%rcx)      /* save R12 */
-+    movq    %r13,       0x08(%rcx)  /* save R13 */
-+    movq    %r14,       0x10(%rcx)  /* save R14 */
-+    movq    %r15,       0x18(%rcx)  /* save R15 */
-+    movq    %rdi,       0x20(%rcx)  /* save RDI */
-+    movq    %rsi,       0x28(%rcx)  /* save RSI */
-+    movq    %rbx,       0x30(%rcx)  /* save RBX */
-+    movq    %rbp,       0x38(%rcx)  /* save RBP */
-+
-+    movq    %gs:(0x30), %r10        /* load NT_TIB */
-+    movq    0x08(%r10), %rax        /* load current stack base */
-+    movq    %rax,       0x50(%rcx)  /* save current stack base */
-+    movq    0x10(%r10), %rax        /* load current stack limit */
-+    movq    %rax,       0x60(%rcx)  /* save current stack limit */
-+    movq    0x18(%r10), %rax        /* load fiber local storage */
-+    movq    %rax,       0x68(%rcx)  /* save fiber local storage */
-+
-+    testq   %r9,        %r9
-+    je      1f
-+
-+    stmxcsr 0x70(%rcx)              /* save MMX control and status word */
-+    fnstcw  0x74(%rcx)              /* save x87 control word */
-+    /* save XMM storage */
-+    /* save start address of SSE register block in R10 */
-+    leaq    0x90(%rcx), %r10
-+    /* shift address in R10 to lower 16 byte boundary */
-+    /* == pointer to SEE register block */
-+    andq    $-16,       %r10
-+
-+    movaps  %xmm6,      (%r10)
-+    movaps  %xmm7,      0x10(%r10)
-+    movaps  %xmm8,      0x20(%r10)
-+    movaps  %xmm9,      0x30(%r10)
-+    movaps  %xmm10,     0x40(%r10)
-+    movaps  %xmm11,     0x50(%r10)
-+    movaps  %xmm12,     0x60(%r10)
-+    movaps  %xmm13,     0x70(%r10)
-+    movaps  %xmm14,     0x80(%r10)
-+    movaps  %xmm15,     0x90(%r10)
-+
-+    ldmxcsr 0x70(%rdx)              /* restore MMX control and status word */
-+    fldcw   0x74(%rdx)              /* restore x87 control word */
-+    /* restore XMM storage */
-+	/* save start address of SSE register block in R10 */
-+    leaq    0x90(%rdx), %r10
-+    /* shift address in R10 to lower 16 byte boundary */
-+    /* == pointer to SEE register block */
-+    andq    $-16,       %r10
-+
-+    movaps  (%r10),     %xmm6
-+    movaps  0x10(%r10), %xmm7
-+    movaps  0x20(%r10), %xmm8
-+    movaps  0x30(%r10), %xmm9
-+    movaps  0x40(%r10), %xmm10
-+    movaps  0x50(%r10), %xmm11
-+    movaps  0x60(%r10), %xmm12
-+    movaps  0x70(%r10), %xmm13
-+    movaps  0x80(%r10), %xmm14
-+    movaps  0x90(%r10), %xmm15
-+
-+1:
-+    leaq    0x08(%rsp), %rax        /* exclude the return address */
-+    movq    %rax,       0x40(%rcx)  /* save as stack pointer */
-+    movq    (%rsp),     %rax        /* load return address */
-+    movq    %rax,       0x48(%rcx)  /* save return address */
-+
-+    movq    (%rdx),     %r12        /* restore R12 */
-+    movq    0x08(%rdx), %r13        /* restore R13 */
-+    movq    0x10(%rdx), %r14        /* restore R14 */
-+    movq    0x18(%rdx), %r15        /* restore R15 */
-+    movq    0x20(%rdx), %rdi        /* restore RDI */
-+    movq    0x28(%rdx), %rsi        /* restore RSI */
-+    movq    0x30(%rdx), %rbx        /* restore RBX */
-+    movq    0x38(%rdx), %rbp        /* restore RBP */
-+
-+    movq    %gs:(0x30), %r10        /* load NT_TIB */
-+    movq    0x50(%rdx), %rax        /* load stack base */
-+    movq    %rax,       0x08(%r10)  /* restore stack base */
-+    movq    0x60(%rdx), %rax        /* load stack limit */
-+    movq    %rax,       0x10(%r10)  /* restore stack limit */
-+    movq    0x68(%rdx), %rax        /* load fiber local storage */
-+    movq    %rax,       0x18(%r10)  /* restore fiber local storage */
-+
-+    movq    0x40(%rdx), %rsp        /* restore RSP */
-+    movq    0x48(%rdx), %r10        /* fetch the address to returned to */
-+
-+    movq    %r8,        %rax        /* use third arg as return value after jump */
-+    movq    %r8,        %rcx        /* use third arg as first arg in context function */
-+
-+    jmp     *%r10                   /* indirect jump to caller */
-+.seh_endproc
---- boost_1_57_0/libs/context/src/asm/make_i386_ms_pe_gas.S	1969-12-31 18:00:00.000000000 -0600
-+++ boost_1_57_0/libs/context/src/asm/make_i386_ms_pe_gas.S	2015-05-04 17:43:10.836165000 -0500
-@@ -0,0 +1,115 @@
-+/*
-+            Copyright Oliver Kowalke 2009.
-+            Copyright Thomas Sailer 2013.
-+   Distributed under the Boost Software License, Version 1.0.
-+      (See accompanying file LICENSE_1_0.txt or copy at
-+            http://www.boost.org/LICENSE_1_0.txt)
-+*/
-+
-+/********************************************************************
-+ *                                                                  *
-+ *  --------------------------------------------------------------  *
-+ *  |    0    |    1    |    2    |    3    |    4     |    5    |  *
-+ *  --------------------------------------------------------------  *
-+ *  |    0h   |   04h   |   08h   |   0ch   |   010h   |   014h  |  *
-+ *  --------------------------------------------------------------  *
-+ *  |   EDI   |   ESI   |   EBX   |   EBP   |   ESP    |   EIP   |  *
-+ *  --------------------------------------------------------------  *
-+ *  --------------------------------------------------------------  *
-+ *  |    6    |    7    |    8    |                              |  *
-+ *  --------------------------------------------------------------  *
-+ *  |   018h  |   01ch  |   020h  |                              |  *
-+ *  --------------------------------------------------------------  *
-+ *  |    sp   |   size  |  limit  |                              |  *
-+ *  --------------------------------------------------------------  *
-+ *  --------------------------------------------------------------  *
-+ *  |    9    |                                                  |  *
-+ *  --------------------------------------------------------------  *
-+ *  |  024h   |                                                  |  *
-+ *  --------------------------------------------------------------  *
-+ *  |fc_execpt|                                                  |  *
-+ *  --------------------------------------------------------------  *
-+ *  --------------------------------------------------------------  *
-+ *  |   10    |                                                  |  *
-+ *  --------------------------------------------------------------  *
-+ *  |  028h   |                                                  |  *
-+ *  --------------------------------------------------------------  *
-+ *  |fc_strage|                                                  |  *
-+ *  --------------------------------------------------------------  *
-+ *  --------------------------------------------------------------  *
-+ *  |   11    |    12   |                                        |  *
-+ *  --------------------------------------------------------------  *
-+ *  |  02ch   |   030h  |                                        |  *
-+ *  --------------------------------------------------------------  *
-+ *  | fc_mxcsr|fc_x87_cw|                                        |  *
-+ *  --------------------------------------------------------------  *
-+ *                                                                  *
-+ * *****************************************************************/
-+
-+.file	"make_i386_ms_pe_gas.S"
-+.text
-+.p2align 4,,15
-+.globl	_make_fcontext
-+.def	_make_fcontext;	.scl	2;	.type	32;	.endef
-+_make_fcontext:
-+    movl    0x04(%esp), %eax        /* load 1. arg of make_fcontext, pointer to context stack (base) */
-+    leal    -0x34(%eax),%eax        /* reserve space for fcontext_t at top of context stack */
-+
-+    /* shift address in EAX to lower 16 byte boundary */
-+    /* == pointer to fcontext_t and address of context stack */
-+    andl    $-16,       %eax
-+
-+    movl    0x04(%esp), %ecx        /* load 1. arg of make_fcontext, pointer to context stack (base) */
-+    movl    %ecx,       0x18(%eax)  /* save address of context stack (base) in fcontext_t */
-+    movl    0x08(%esp), %edx        /* load 2. arg of make_fcontext, context stack size */
-+    movl    %edx,       0x1c(%eax)  /* save context stack size in fcontext_t */
-+    negl    %edx                    /* negate stack size for LEA instruction (== substraction) */
-+    leal    (%ecx,%edx),%ecx        /* compute bottom address of context stack (limit) */
-+    movl    %ecx,       0x20(%eax)  /* save address of context stack (limit) in fcontext_t */
-+    movl    0x0c(%esp), %ecx        /* load 3. arg of make_fcontext, pointer to context function */
-+    movl    %ecx,       0x14(%eax)  /* save address of context function in fcontext_t */
-+
-+    stmxcsr 0x02c(%eax)             /* save MMX control word */
-+    fnstcw  0x030(%eax)             /* save x87 control word */
-+
-+    leal    -0x1c(%eax),%edx        /* reserve space for last frame and seh on context stack, (ESP - 0x4) % 16 == 0 */
-+    movl    %edx,       0x10(%eax)  /* save address in EDX as stack pointer for context function */
-+
-+    movl    $finish,    %ecx        /* abs address of finish */
-+    movl    %ecx,       (%edx)      /* save address of finish as return address for context function */
-+                                    /* entered after context function returns */
-+
-+    /* traverse current seh chain to get the last exception handler installed by Windows */
-+    /* note that on Windows Server 2008 and 2008 R2, SEHOP is activated by default */
-+    /* the exception handler chain is tested for the presence of ntdll.dll!FinalExceptionHandler */
-+    /* at its end by RaiseException all seh andlers are disregarded if not present and the */
-+    /* program is aborted */
-+    movl    %fs:(0x18), %ecx        /* load NT_TIB into ECX */
-+
-+walk:
-+    movl    (%ecx),     %edx        /* load 'next' member of current SEH into EDX */
-+    incl    %edx                    /* test if 'next' of current SEH is last (== 0xffffffff) */
-+    jz      found
-+    decl    %edx
-+    xchgl    %ecx,      %edx        /* exchange content; ECX contains address of next SEH */
-+    jmp     walk                    /* inspect next SEH */
-+
-+found:
-+    movl    0x04(%ecx), %ecx        /* load 'handler' member of SEH == address of last SEH handler installed by Windows */
-+    movl    0x10(%eax), %edx        /* load address of stack pointer for context function */
-+    movl    %ecx,       0x18(%edx)  /* save address in ECX as SEH handler for context */
-+    movl    $0xffffffff,%ecx        /* set ECX to -1 */
-+    movl    %ecx,       0x14(%edx)  /* save ECX as next SEH item */
-+    leal    0x14(%edx), %ecx        /* load address of next SEH item */
-+    movl    %ecx,       0x24(%eax)  /* save next SEH */
-+
-+    ret
-+
-+finish:
-+    /* ESP points to same address as ESP on entry of context function + 0x4 */
-+    xorl    %eax,       %eax
-+    movl    %eax,       (%esp)      /* exit code is zero */
-+    call    __exit                  /* exit application */
-+    hlt
-+
-+.def	__exit;	.scl	2;	.type	32;	.endef  /* standard C library function */
---- boost_1_57_0/libs/context/src/asm/make_x86_64_ms_pe_gas.S	1969-12-31 18:00:00.000000000 -0600
-+++ boost_1_57_0/libs/context/src/asm/make_x86_64_ms_pe_gas.S	2015-05-04 17:43:10.843165900 -0500
-@@ -0,0 +1,132 @@
-+/*
-+            Copyright Oliver Kowalke 2009.
-+            Copyright Thomas Sailer 2013.
-+   Distributed under the Boost Software License, Version 1.0.
-+      (See accompanying file LICENSE_1_0.txt or copy at
-+            http://www.boost.org/LICENSE_1_0.txt)
-+*/
-+
-+/****************************************************************************************
-+ *                                                                                      *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  |    0    |    1    |    2    |    3    |    4     |    5    |    6    |    7    |  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  |   0x0   |   0x4   |   0x8   |   0xc   |   0x10   |   0x14  |   0x18  |   0x1c  |  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  |        R12        |         R13       |         R14        |        R15        |  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  |    8    |    9    |   10    |   11    |    12    |    13   |    14   |    15   |  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  |   0x20  |   0x24  |   0x28  |  0x2c   |   0x30   |   0x34  |   0x38  |   0x3c  |  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  |        RDI        |        RSI        |         RBX        |        RBP        |  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  |    16   |    17   |    18   |    19   |                                        |  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  |   0x40  |   0x44  |   0x48  |   0x4c  |                                        |  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  |        RSP        |        RIP        |                                        |  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  |    20   |    21   |    22   |    23   |    24    |    25   |                   |  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  |   0x50  |   0x54  |   0x58  |   0x5c  |   0x60   |   0x64  |                   |  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  |        sp         |       size        |        limit       |                   |  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  |    26   |   27    |                                                            |  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  |   0x68  |   0x6c  |                                                            |  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  |      fbr_strg     |                                                            |  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  |    28   |   29    |    30   |    31   |    32    |    33   |   34    |   35    |  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  |   0x70  |   0x74  |   0x78  |   0x7c  |   0x80   |   0x84  |  0x88   |  0x8c   |  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  | fc_mxcsr|fc_x87_cw|      fc_xmm       |      SEE registers (XMM6-XMM15)        |  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  |   36    |    37   |    38   |    39   |    40    |    41   |   42    |   43    |  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  |  0x90   |   0x94  |   0x98  |   0x9c  |   0xa0   |   0xa4  |  0xa8   |  0xac   |  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  |                          SEE registers (XMM6-XMM15)                            |  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  |    44    |   45    |    46   |    47  |    48    |    49   |   50    |   51    |  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  |   0xb0   |  0xb4   |  0xb8   |  0xbc  |   0xc0   |   0xc4  |  0xc8   |  0xcc   |  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  |                          SEE registers (XMM6-XMM15)                            |  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  |    52    |   53    |    54   |   55   |    56    |    57   |   58    |   59    |  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  |   0xd0   |  0xd4   |   0xd8  |  0xdc  |   0xe0   |  0xe4   |  0xe8   |  0xec   |  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  |                          SEE registers (XMM6-XMM15)                            |  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  |    60   |    61   |    62    |    63  |    64    |    65   |   66    |   67    |  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  |  0xf0   |  0xf4   |   0xf8   |  0xfc  |   0x100  |  0x104  |  0x108  |  0x10c  |  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  |                          SEE registers (XMM6-XMM15)                            |  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  |    68   |    69   |    70    |    71  |    72    |    73   |   74    |   75    |  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  |  0x110  |  0x114  |   0x118  |  0x11c |   0x120  |  0x124  |  0x128  |  0x12c  |  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *  |                          SEE registers (XMM6-XMM15)                            |  *
-+ *  ----------------------------------------------------------------------------------  *
-+ *                                                                                      *
-+ * *************************************************************************************/
-+
-+.file	"make_x86_64_ms_pe_gas.S"
-+.text
-+.p2align 4,,15
-+.globl	make_fcontext
-+.def	make_fcontext;	.scl	2;	.type	32;	.endef
-+.seh_proc	make_fcontext
-+make_fcontext:
-+.seh_endprologue
-+    leaq    -0x130(%rcx),%rax       /* reserve space for fcontext_t at top of context stack */
-+
-+    /* shift address in RAX to lower 16 byte boundary */
-+    /* == pointer to fcontext_t and address of context stack */
-+    andq    $-16,       %rax
-+
-+    movq    %r8,        0x48(%rax)  /* save address of context function in fcontext_t */
-+    movq    %rdx,       0x58(%rax)  /* save context stack size in fcontext_t */
-+    movq    %rcx,       0x50(%rax)  /* save address of context stack pointer (base) in fcontext_t */
-+
-+    negq    %rdx                    /* negate stack size for LEA instruction (== substraction) */
-+    leaq    (%rcx,%rdx),%rcx        /* compute bottom address of context stack (limit) */
-+    movq    %rcx,       0x60(%rax)  /* save bottom address of context stack (limit) in fcontext_t */
-+
-+    stmxcsr 0x70(%rax)              /* save MMX control and status word */
-+    fnstcw  0x74(%rax)              /* save x87 control word */
-+
-+    leaq    -0x28(%rax),%rdx        /* reserve 32byte shadow space + return address on stack, (RSP - 0x8) % 16 == 0 */
-+    movq    %rdx,       0x40(%rax)  /* save address in RDX as stack pointer for context function */
-+
-+    leaq    finish(%rip),%rcx       /* compute abs address of label finish */
-+    movq    %rcx,(%rdx)             /* save address of finish as return address for context function */
-+                                    /* entered after context function returns */
-+
-+    ret
-+
-+finish:
-+    /* RSP points to same address as RSP on entry of context function + 0x8 */
-+    xorq    %rcx,       %rcx        /* exit code is zero */
-+    call    _exit                   /* exit application */
-+    hlt
-+.seh_endproc
-+
-+.def	_exit;	.scl	2;	.type	32;	.endef  /* standard C library function */
diff --git a/pkgs/development/libraries/boost/cygwin-1.57.0-filesystem-cygwin.patch b/pkgs/development/libraries/boost/cygwin-1.57.0-filesystem-cygwin.patch
deleted file mode 100644
index cbb5757746d..00000000000
--- a/pkgs/development/libraries/boost/cygwin-1.57.0-filesystem-cygwin.patch
+++ /dev/null
@@ -1,32 +0,0 @@
---- boost_1_57_0/libs/filesystem/src/operations.cpp	2014-10-29 10:34:00.000000000 -0500
-+++ boost_1_57_0/libs/filesystem/src/operations.cpp	2015-05-04 23:30:34.278446000 -0500
-@@ -1966,8 +1966,7 @@ namespace
-   {
-     errno = 0;
- 
--#   if !defined(__CYGWIN__)\
--    && defined(_POSIX_THREAD_SAFE_FUNCTIONS)\
-+#   if defined(_POSIX_THREAD_SAFE_FUNCTIONS)\
-     && defined(_SC_THREAD_SAFE_FUNCTIONS)\
-     && (_POSIX_THREAD_SAFE_FUNCTIONS+0 >= 0)\
-     && (!defined(__hpux) || defined(_REENTRANT)) \
---- boost_1_57_0/libs/filesystem/src/path.cpp	2014-10-29 10:34:00.000000000 -0500
-+++ boost_1_57_0/libs/filesystem/src/path.cpp	2015-05-04 17:45:45.582315200 -0500
-@@ -36,7 +36,7 @@
- # include "windows_file_codecvt.hpp"
- # include <windows.h>
- #elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__) \
-- || defined(__FreeBSD__) || defined(__OPEN_BSD__)
-+ || defined(__FreeBSD__) || defined(__OPEN_BSD__) || defined(__CYGWIN__)
- # include <boost/filesystem/detail/utf8_codecvt_facet.hpp>
- #endif
- 
-@@ -831,7 +831,7 @@ namespace
-     std::locale global_loc = std::locale();
-     return std::locale(global_loc, new windows_file_codecvt);
- # elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__) \
--  || defined(__FreeBSD__) || defined(__OpenBSD__)
-+  || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__CYGWIN__)
-     // "All BSD system functions expect their string parameters to be in UTF-8 encoding
-     // and nothing else." See
-     // http://developer.apple.com/mac/library/documentation/MacOSX/Conceptual/BPInternational/Articles/FileEncodings.html
diff --git a/pkgs/development/libraries/boost/cygwin-1.57.0-locale-cygwin.patch b/pkgs/development/libraries/boost/cygwin-1.57.0-locale-cygwin.patch
deleted file mode 100644
index 16208385a9b..00000000000
--- a/pkgs/development/libraries/boost/cygwin-1.57.0-locale-cygwin.patch
+++ /dev/null
@@ -1,81 +0,0 @@
---- boost_1_57_0/libs/locale/build/Jamfile.v2	2014-04-06 08:11:49.000000000 -0500
-+++ boost_1_57_0/libs/locale/build/Jamfile.v2	2015-05-04 18:11:52.956846500 -0500
-@@ -261,7 +261,7 @@ rule configure-full ( properties * : fla
- 
-     }
-         
--    if ! $(found-iconv) && ! $(found-icu) && ! <target-os>windows in $(properties) && ! <target-os>cygwin in $(properties) 
-+    if ! $(found-iconv) && ! $(found-icu) && ! <target-os>windows in $(properties) 
-     {
-         ECHO "- Boost.Locale needs either iconv or ICU library to be built." ;
-         result += <build>no ;
-@@ -298,7 +298,6 @@ rule configure-full ( properties * : fla
-     if ! <boost.locale.winapi> in $(properties:G)
-     {
-         if <target-os>windows in $(properties) 
--          || <target-os>cygwin in $(properties)
-         {
-             properties += <boost.locale.winapi>on ;
-         }      
-@@ -335,7 +334,7 @@ rule configure-full ( properties * : fla
-     }
-     
-     if ( ! <boost.locale.winapi>off in $(properties) || ! <boost.locale.std>off in $(properties) )
--       && ( <target-os>windows in $(properties) || <target-os>cygwin in $(properties) )
-+       && <target-os>windows in $(properties)
-     {
-         result += <source>win32/lcid.cpp ;
-     }
---- boost_1_57_0/libs/locale/src/encoding/codepage.cpp	2014-04-06 08:11:49.000000000 -0500
-+++ boost_1_57_0/libs/locale/src/encoding/codepage.cpp	2015-05-04 23:16:01.778652600 -0500
-@@ -8,7 +8,7 @@
- #define BOOST_LOCALE_SOURCE
- #include <boost/config.hpp>
- 
--#if defined(BOOST_WINDOWS) || defined(__CYGWIN__)
-+#if defined(BOOST_WINDOWS)
- #define BOOST_LOCALE_WITH_WCONV
- #endif
- 
---- boost_1_57_0/libs/locale/src/encoding/conv.hpp	2014-04-06 08:11:49.000000000 -0500
-+++ boost_1_57_0/libs/locale/src/encoding/conv.hpp	2015-05-04 23:16:08.454000300 -0500
-@@ -59,7 +59,7 @@ namespace boost {
-                     return normalize_encoding(l).compare(normalize_encoding(r));
-                 }
-             
--                #if defined(BOOST_WINDOWS)  || defined(__CYGWIN__)
-+                #if defined(BOOST_WINDOWS)
-                 int encoding_to_windows_codepage(char const *ccharset);
-                 #endif
-             
---- boost_1_57_0/libs/locale/src/util/default_locale.cpp	2014-04-06 08:11:49.000000000 -0500
-+++ boost_1_57_0/libs/locale/src/util/default_locale.cpp	2015-05-04 23:16:16.311998100 -0500
-@@ -15,7 +15,7 @@
- #  pragma warning(disable : 4996)
- #endif
- 
--#if defined(BOOST_WINDOWS) || defined(__CYGWIN__)
-+#if defined(BOOST_WINDOWS)
- #ifndef NOMINMAX
- #define NOMINMAX
- #endif
---- boost_1_57_0/libs/locale/test/test_codepage.cpp	2014-04-06 08:11:49.000000000 -0500
-+++ boost_1_57_0/libs/locale/test/test_codepage.cpp	2015-05-04 23:16:40.883618300 -0500
-@@ -23,7 +23,7 @@
- # include <locale.h>
- #endif
- 
--#if !defined(BOOST_LOCALE_WITH_ICU) && !defined(BOOST_LOCALE_WITH_ICONV) && (defined(BOOST_WINDOWS) || defined(__CYGWIN__))
-+#if !defined(BOOST_LOCALE_WITH_ICU) && !defined(BOOST_LOCALE_WITH_ICONV) && defined(BOOST_WINDOWS)
- #ifndef NOMINMAX
- # define NOMINMAX
- #endif
-@@ -395,7 +395,7 @@ int main()
-         def.push_back("posix");
-         #endif
- 
--        #if !defined(BOOST_LOCALE_WITH_ICU) && !defined(BOOST_LOCALE_WITH_ICONV) && (defined(BOOST_WINDOWS) || defined(__CYGWIN__))
-+        #if !defined(BOOST_LOCALE_WITH_ICU) && !defined(BOOST_LOCALE_WITH_ICONV) && defined(BOOST_WINDOWS)
-         test_iso_8859_8 = IsValidCodePage(28598)!=0;
-         #endif
- 
diff --git a/pkgs/development/libraries/boost/cygwin-1.57.0-log-cygwin.patch b/pkgs/development/libraries/boost/cygwin-1.57.0-log-cygwin.patch
deleted file mode 100644
index a7748ec58d8..00000000000
--- a/pkgs/development/libraries/boost/cygwin-1.57.0-log-cygwin.patch
+++ /dev/null
@@ -1,46 +0,0 @@
---- boost_1_57_0/boost/log/detail/config.hpp	2014-10-29 19:19:00.000000000 -0500
-+++ boost_1_57_0/boost/log/detail/config.hpp	2015-05-04 17:56:38.663746100 -0500
-@@ -96,11 +96,6 @@
- #   define BOOST_LOG_BROKEN_CONSTANT_EXPRESSIONS
- #endif
- 
--#if defined(__CYGWIN__)
--    // Boost.ASIO is broken on Cygwin
--#   define BOOST_LOG_NO_ASIO
--#endif
--
- #if !defined(BOOST_LOG_USE_NATIVE_SYSLOG) && defined(BOOST_LOG_NO_ASIO)
- #   ifndef BOOST_LOG_WITHOUT_SYSLOG
- #       define BOOST_LOG_WITHOUT_SYSLOG
---- boost_1_57_0/libs/log/build/Jamfile.v2	2014-10-29 19:19:00.000000000 -0500
-+++ boost_1_57_0/libs/log/build/Jamfile.v2	2015-05-04 22:16:49.242537800 -0500
-@@ -170,10 +170,6 @@ project boost/log
-         <target-os>windows:<library>ws2_32
-         <target-os>windows:<library>mswsock
- 
--        <target-os>cygwin:<define>__USE_W32_SOCKETS
--        <target-os>cygwin:<library>ws2_32
--        <target-os>cygwin:<library>mswsock
--
-         <target-os>linux:<library>rt
-         <target-os>linux:<define>_XOPEN_SOURCE=600
-         <target-os>linux:<define>_GNU_SOURCE=1
---- boost_1_57_0/libs/log/src/windows_version.hpp	2014-10-29 19:19:00.000000000 -0500
-+++ boost_1_57_0/libs/log/src/windows_version.hpp	2015-05-04 23:17:08.281597400 -0500
-@@ -18,7 +18,7 @@
- 
- #include <boost/log/detail/config.hpp>
- 
--#if defined(BOOST_WINDOWS) || defined(__CYGWIN__)
-+#if defined(BOOST_WINDOWS)
- 
- #if defined(BOOST_LOG_USE_WINNT6_API)
- 
-@@ -50,6 +50,6 @@
- #define WIN32_LEAN_AND_MEAN
- #endif
- 
--#endif // defined(BOOST_WINDOWS) || defined(__CYGWIN__)
-+#endif // defined(BOOST_WINDOWS)
- 
- #endif // BOOST_LOG_WINDOWS_VERSION_HPP_INCLUDED_
diff --git a/pkgs/development/libraries/boost/cygwin-1.57.0-smart_ptr-cygwin.patch b/pkgs/development/libraries/boost/cygwin-1.57.0-smart_ptr-cygwin.patch
deleted file mode 100644
index 35e6905b0f3..00000000000
--- a/pkgs/development/libraries/boost/cygwin-1.57.0-smart_ptr-cygwin.patch
+++ /dev/null
@@ -1,77 +0,0 @@
---- boost_1_57_0/boost/smart_ptr/detail/atomic_count.hpp	2014-08-21 15:48:32.000000000 -0500
-+++ boost_1_57_0/boost/smart_ptr/detail/atomic_count.hpp	2015-05-04 17:47:15.556740500 -0500
-@@ -79,7 +79,7 @@
- #elif defined( BOOST_SP_HAS_SYNC )
- # include <boost/smart_ptr/detail/atomic_count_sync.hpp>
- 
--#elif defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
-+#elif defined(WIN32) || defined(_WIN32) || defined(__WIN32__)
- # include <boost/smart_ptr/detail/atomic_count_win32.hpp>
- 
- #elif defined(__GLIBCPP__) || defined(__GLIBCXX__)
---- boost_1_57_0/boost/smart_ptr/detail/lightweight_mutex.hpp	2014-08-21 15:48:32.000000000 -0500
-+++ boost_1_57_0/boost/smart_ptr/detail/lightweight_mutex.hpp	2015-05-04 17:47:45.234509100 -0500
-@@ -32,7 +32,7 @@
- #  include <boost/smart_ptr/detail/lwm_nop.hpp>
- #elif defined(BOOST_HAS_PTHREADS)
- #  include <boost/smart_ptr/detail/lwm_pthreads.hpp>
--#elif defined(BOOST_HAS_WINTHREADS) || defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
-+#elif defined(BOOST_HAS_WINTHREADS) || defined(WIN32) || defined(_WIN32) || defined(__WIN32__)
- #  include <boost/smart_ptr/detail/lwm_win32_cs.hpp>
- #else
- // Use #define BOOST_DISABLE_THREADS to avoid the error
---- boost_1_57_0/boost/smart_ptr/detail/sp_counted_base.hpp	2014-08-21 15:48:32.000000000 -0500
-+++ boost_1_57_0/boost/smart_ptr/detail/sp_counted_base.hpp	2015-05-04 17:47:45.240009800 -0500
-@@ -65,7 +65,7 @@
- #elif defined(__GNUC__) && ( defined( __sparcv9 ) || ( defined( __sparcv8 ) && ( __GNUC__ * 100 + __GNUC_MINOR__ >= 402 ) ) )
- # include <boost/smart_ptr/detail/sp_counted_base_gcc_sparc.hpp>
- 
--#elif defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ ) || defined(__CYGWIN__)
-+#elif defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ )
- # include <boost/smart_ptr/detail/sp_counted_base_w32.hpp>
- 
- #elif defined( _AIX )
---- boost_1_57_0/boost/smart_ptr/detail/sp_interlocked.hpp	2014-08-21 15:48:32.000000000 -0500
-+++ boost_1_57_0/boost/smart_ptr/detail/sp_interlocked.hpp	2015-05-04 17:48:39.316376700 -0500
-@@ -119,7 +119,7 @@ extern "C" long __cdecl _InterlockedExch
- # define BOOST_SP_INTERLOCKED_EXCHANGE _InterlockedExchange
- # define BOOST_SP_INTERLOCKED_EXCHANGE_ADD _InterlockedExchangeAdd
- 
--#elif defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ ) || defined( __CYGWIN__ )
-+#elif defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ )
- 
- namespace boost
- {
---- boost_1_57_0/boost/smart_ptr/detail/spinlock.hpp	2014-08-21 15:48:32.000000000 -0500
-+++ boost_1_57_0/boost/smart_ptr/detail/spinlock.hpp	2015-05-04 17:47:45.247510800 -0500
-@@ -49,7 +49,7 @@
- #elif defined( BOOST_SP_HAS_SYNC )
- #  include <boost/smart_ptr/detail/spinlock_sync.hpp>
- 
--#elif defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
-+#elif defined(WIN32) || defined(_WIN32) || defined(__WIN32__)
- #  include <boost/smart_ptr/detail/spinlock_w32.hpp>
- 
- #elif defined(BOOST_HAS_PTHREADS)
---- boost_1_57_0/boost/smart_ptr/detail/yield_k.hpp	2014-08-21 15:48:32.000000000 -0500
-+++ boost_1_57_0/boost/smart_ptr/detail/yield_k.hpp	2015-05-04 17:47:45.253511600 -0500
-@@ -47,7 +47,7 @@ extern "C" void _mm_pause();
- 
- //
- 
--#if defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ ) || defined( __CYGWIN__ )
-+#if defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ )
- 
- #if defined( BOOST_USE_WINDOWS_H )
- # include <windows.h>
---- boost_1_57_0/libs/smart_ptr/test/sp_interlocked_test.cpp	2014-08-21 15:48:32.000000000 -0500
-+++ boost_1_57_0/libs/smart_ptr/test/sp_interlocked_test.cpp	2015-05-04 23:18:21.717422600 -0500
-@@ -8,7 +8,7 @@
- //  http://www.boost.org/LICENSE_1_0.txt
- //
- 
--#if defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ ) || defined( __CYGWIN__ )
-+#if defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ )
- 
- #include <boost/smart_ptr/detail/sp_interlocked.hpp>
- #include <boost/detail/lightweight_test.hpp>
diff --git a/pkgs/development/libraries/boost/cygwin-1.57.0-system-cygwin.patch b/pkgs/development/libraries/boost/cygwin-1.57.0-system-cygwin.patch
deleted file mode 100644
index e241f37f203..00000000000
--- a/pkgs/development/libraries/boost/cygwin-1.57.0-system-cygwin.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- boost_1_57_0/boost/system/api_config.hpp	2014-08-03 15:44:11.000000000 -0500
-+++ boost_1_57_0/boost/system/api_config.hpp	2015-05-04 17:51:31.189701800 -0500
-@@ -33,7 +33,7 @@
- //    Standalone MinGW and all other known Windows compilers do predefine _WIN32
- //    Compilers that predefine _WIN32 or __MINGW32__ do so for Windows 64-bit builds too.
- 
--# if defined(_WIN32) || defined(__CYGWIN__) // Windows default, including MinGW and Cygwin
-+# if defined(_WIN32) // Windows default, including MinGW and Cygwin
- #   define BOOST_WINDOWS_API
- # else
- #   define BOOST_POSIX_API 
---- boost_1_57_0/boost/system/detail/error_code.ipp	2014-08-03 15:44:11.000000000 -0500
-+++ boost_1_57_0/boost/system/detail/error_code.ipp	2015-05-04 17:51:02.925112700 -0500
-@@ -97,7 +97,7 @@ namespace
-       char buf[64];
-       char * bp = buf;
-       std::size_t sz = sizeof(buf);
--  #  if defined(__CYGWIN__) || defined(__USE_GNU)
-+  #  if defined(__GNU_VISIBLE) || defined(__USE_GNU)
-       // Oddball version of strerror_r
-       const char * c_str = strerror_r( ev, bp, sz );
-       return  c_str
diff --git a/pkgs/development/libraries/boost/cygwin-fedora-boost-1.50.0-fix-non-utf8-files.patch b/pkgs/development/libraries/boost/cygwin-fedora-boost-1.50.0-fix-non-utf8-files.patch
deleted file mode 100644
index b60a3ac49d3..00000000000
--- a/pkgs/development/libraries/boost/cygwin-fedora-boost-1.50.0-fix-non-utf8-files.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-diff --git a/libs/units/example/autoprefixes.cpp b/libs/units/example/autoprefixes.cpp
-index 8b2bc43..d04f2fe 100644
---- a/libs/units/example/autoprefixes.cpp
-+++ b/libs/units/example/autoprefixes.cpp
-@@ -67,7 +67,7 @@ struct thing_base_unit : boost::units::base_unit<thing_base_unit, boost::units::
- struct euro_base_unit : boost::units::base_unit<euro_base_unit, boost::units::dimensionless_type, 5>
- {
-   static const char* name() { return("EUR"); }
--  static const char* symbol() { return("€"); }
-+  static const char* symbol() { return("€"); }
- };
- 
- int main()
-@@ -140,7 +140,7 @@ int main()
- 
-   quantity<euro_base_unit::unit_type> ce = 2048. * euro_base_unit::unit_type();
-   cout << name_format << engineering_prefix << ce << endl;  // 2.048 kiloEUR
--  cout << symbol_format << engineering_prefix << ce << endl;  // 2.048 k€
-+  cout << symbol_format << engineering_prefix << ce << endl;  // 2.048 k€
- 
- 
-     return 0;
diff --git a/pkgs/development/libraries/boost/cygwin-fedora-boost-1.50.0-pool.patch b/pkgs/development/libraries/boost/cygwin-fedora-boost-1.50.0-pool.patch
deleted file mode 100644
index 15ce4007675..00000000000
--- a/pkgs/development/libraries/boost/cygwin-fedora-boost-1.50.0-pool.patch
+++ /dev/null
@@ -1,122 +0,0 @@
-Index: boost/pool/pool.hpp
-===================================================================
---- a/boost/pool/pool.hpp	(revision 78317)
-+++ b/boost/pool/pool.hpp	(revision 78326)
-@@ -27,4 +27,6 @@
- #include <boost/pool/poolfwd.hpp>
- 
-+// std::numeric_limits
-+#include <boost/limits.hpp>
- // boost::math::static_lcm
- #include <boost/math/common_factor_ct.hpp>
-@@ -358,4 +360,13 @@
-     }
- 
-+    size_type max_chunks() const
-+    { //! Calculated maximum number of memory chunks that can be allocated in a single call by this Pool.
-+      size_type partition_size = alloc_size();
-+      size_type POD_size = math::static_lcm<sizeof(size_type), sizeof(void *)>::value + sizeof(size_type);
-+      size_type max_chunks = (std::numeric_limits<size_type>::max() - POD_size) / alloc_size();
-+    
-+      return max_chunks;
-+    }
-+
-     static void * & nextof(void * const ptr)
-     { //! \returns Pointer dereferenced.
-@@ -377,5 +388,7 @@
-       //!   the first time that object needs to allocate system memory.
-       //!   The default is 32. This parameter may not be 0.
--      //! \param nmax_size is the maximum number of chunks to allocate in one block.
-+      //! \param nmax_size is the maximum number of chunks to allocate in one block.			
-+      set_next_size(nnext_size);
-+      set_max_size(nmax_size);
-     }
- 
-@@ -400,7 +413,7 @@
-     }
-     void set_next_size(const size_type nnext_size)
--    { //! Set number of chunks to request from the system the next time that object needs to allocate system memory. This value should never be set to 0.
--      //! \returns nnext_size.
--      next_size = start_size = nnext_size;
-+    { //! Set number of chunks to request from the system the next time that object needs to allocate system memory. This value should never be set to 0.     
-+      BOOST_USING_STD_MIN();
-+      next_size = start_size = min BOOST_PREVENT_MACRO_SUBSTITUTION(nnext_size, max_chunks());
-     }
-     size_type get_max_size() const
-@@ -410,5 +423,6 @@
-     void set_max_size(const size_type nmax_size)
-     { //! Set max_size.
--      max_size = nmax_size;
-+      BOOST_USING_STD_MIN();
-+      max_size = min BOOST_PREVENT_MACRO_SUBSTITUTION(nmax_size, max_chunks());
-     }
-     size_type get_requested_size() const
-@@ -713,7 +727,7 @@
-   BOOST_USING_STD_MIN();
-   if(!max_size)
--    next_size <<= 1;
-+    set_next_size(next_size << 1);
-   else if( next_size*partition_size/requested_size < max_size)
--    next_size = min BOOST_PREVENT_MACRO_SUBSTITUTION(next_size << 1, max_size*requested_size/ partition_size);
-+    set_next_size(min BOOST_PREVENT_MACRO_SUBSTITUTION(next_size << 1, max_size * requested_size / partition_size));
- 
-   //  initialize it,
-@@ -753,7 +767,7 @@
-   BOOST_USING_STD_MIN();
-   if(!max_size)
--    next_size <<= 1;
-+    set_next_size(next_size << 1);
-   else if( next_size*partition_size/requested_size < max_size)
--    next_size = min BOOST_PREVENT_MACRO_SUBSTITUTION(next_size << 1, max_size*requested_size/ partition_size);
-+    set_next_size(min BOOST_PREVENT_MACRO_SUBSTITUTION(next_size << 1, max_size * requested_size / partition_size));
- 
-   //  initialize it,
-@@ -797,4 +811,6 @@
-   //! \returns Address of chunk n if allocated ok.
-   //! \returns 0 if not enough memory for n chunks.
-+  if (n > max_chunks())
-+    return 0;
- 
-   const size_type partition_size = alloc_size();
-@@ -845,7 +861,7 @@
-   BOOST_USING_STD_MIN();
-   if(!max_size)
--    next_size <<= 1;
-+    set_next_size(next_size << 1);
-   else if( next_size*partition_size/requested_size < max_size)
--    next_size = min BOOST_PREVENT_MACRO_SUBSTITUTION(next_size << 1, max_size*requested_size/ partition_size);
-+    set_next_size(min BOOST_PREVENT_MACRO_SUBSTITUTION(next_size << 1, max_size * requested_size / partition_size));
- 
-   //  insert it into the list,
-Index: libs/pool/test/test_bug_6701.cpp
-===================================================================
---- a/libs/pool/test/test_bug_6701.cpp	(revision 78326)
-+++ b/libs/pool/test/test_bug_6701.cpp	(revision 78326)
-@@ -0,0 +1,27 @@
-+/* Copyright (C) 2012 Étienne Dupuis
-+* 
-+* Use, modification and distribution is subject to the 
-+* Boost Software License, Version 1.0. (See accompanying
-+* file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
-+*/
-+
-+// Test of bug #6701 (https://svn.boost.org/trac/boost/ticket/6701)
-+
-+#include <boost/pool/object_pool.hpp>
-+#include <boost/limits.hpp>
-+
-+int main()
-+{
-+  boost::pool<> p(1024, std::numeric_limits<size_t>::max() / 768);
-+
-+  void *x = p.malloc();
-+  BOOST_ASSERT(!x);
-+  
-+  BOOST_ASSERT(std::numeric_limits<size_t>::max() / 1024 >= p.get_next_size());
-+  BOOST_ASSERT(std::numeric_limits<size_t>::max() / 1024 >= p.get_max_size());
-+
-+  void *y = p.ordered_malloc(std::numeric_limits<size_t>::max() / 768);
-+  BOOST_ASSERT(!y);
-+
-+  return 0;
-+}
diff --git a/pkgs/development/libraries/boost/cygwin-fedora-boost-1.54.0-locale-unused_typedef.patch b/pkgs/development/libraries/boost/cygwin-fedora-boost-1.54.0-locale-unused_typedef.patch
deleted file mode 100644
index b7c91284d9b..00000000000
--- a/pkgs/development/libraries/boost/cygwin-fedora-boost-1.54.0-locale-unused_typedef.patch
+++ /dev/null
@@ -1,11 +0,0 @@
-diff -urp boost_1_54_0-orig/boost/locale/boundary/segment.hpp boost_1_54_0/boost/locale/boundary/segment.hpp
---- boost_1_54_0-orig/boost/locale/boundary/segment.hpp	2013-07-23 00:47:27.020787174 +0200
-+++ boost_1_54_0/boost/locale/boundary/segment.hpp	2013-07-23 00:50:40.382959016 +0200
-@@ -27,7 +27,6 @@ namespace boundary {
-         int compare_text(LeftIterator l_begin,LeftIterator l_end,RightIterator r_begin,RightIterator r_end)
-         {
-             typedef LeftIterator left_iterator;
--            typedef RightIterator right_iterator;
-             typedef typename std::iterator_traits<left_iterator>::value_type char_type;
-             typedef std::char_traits<char_type> traits;
-             while(l_begin!=l_end && r_begin!=r_end) {
diff --git a/pkgs/development/libraries/boost/cygwin-fedora-boost-1.54.0-pool-max_chunks_shadow.patch b/pkgs/development/libraries/boost/cygwin-fedora-boost-1.54.0-pool-max_chunks_shadow.patch
deleted file mode 100644
index 6c1d0a021ed..00000000000
--- a/pkgs/development/libraries/boost/cygwin-fedora-boost-1.54.0-pool-max_chunks_shadow.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-diff -up ./boost/pool/pool.hpp~ ./boost/pool/pool.hpp
---- a/boost/pool/pool.hpp~	2013-08-21 17:49:56.023296922 +0200
-+++ b/boost/pool/pool.hpp	2013-08-22 11:38:01.133912638 +0200
-@@ -361,9 +361,7 @@ class pool: protected simple_segregated_
-     { //! Calculated maximum number of memory chunks that can be allocated in a single call by this Pool.
-       size_type partition_size = alloc_size();
-       size_type POD_size = math::static_lcm<sizeof(size_type), sizeof(void *)>::value + sizeof(size_type);
--      size_type max_chunks = (std::numeric_limits<size_type>::max() - POD_size) / alloc_size();
--    
--      return max_chunks;
-+      return (std::numeric_limits<size_type>::max() - POD_size) / alloc_size();
-     }
- 
-     static void * & nextof(void * const ptr)
diff --git a/pkgs/development/libraries/boost/cygwin-fedora-boost-1.54.0-python-unused_typedef.patch b/pkgs/development/libraries/boost/cygwin-fedora-boost-1.54.0-python-unused_typedef.patch
deleted file mode 100644
index 8adf8ed2080..00000000000
--- a/pkgs/development/libraries/boost/cygwin-fedora-boost-1.54.0-python-unused_typedef.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-diff -up boost_1_53_0/boost/python/to_python_value.hpp\~ boost_1_53_0/boost/python/to_python_value.hpp
---- boost_1_53_0/boost/python/to_python_value.hpp~	2007-12-16 11:12:07.000000000 +0100
-+++ boost_1_53_0/boost/python/to_python_value.hpp	2013-07-23 16:19:02.518904596 +0200
-@@ -147,8 +147,8 @@ namespace detail
-   template <class T>
-   inline PyObject* registry_to_python_value<T>::operator()(argument_type x) const
-   {
--      typedef converter::registered<argument_type> r;
- # if BOOST_WORKAROUND(__GNUC__, < 3)
-+      typedef converter::registered<argument_type> r;
-       // suppresses an ICE, somehow
-       (void)r::converters;
- # endif 
-
-Diff finished.  Tue Jul 23 16:19:05 2013
diff --git a/pkgs/development/libraries/boost/cygwin-fedora-boost-1.57.0-move-is_class.patch b/pkgs/development/libraries/boost/cygwin-fedora-boost-1.57.0-move-is_class.patch
deleted file mode 100644
index cf9756e40ea..00000000000
--- a/pkgs/development/libraries/boost/cygwin-fedora-boost-1.57.0-move-is_class.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-diff -up ./move/core.hpp~ ./move/core.hpp
---- a/boost/move/core.hpp~	2015-02-09 17:33:35.000000000 +0100
-+++ b/boost/move/core.hpp	2015-02-13 13:54:52.012130813 +0100
-@@ -43,6 +43,7 @@
- #if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_MOVE_DOXYGEN_INVOKED)
- 
-    #include <boost/move/detail/meta_utils.hpp>
-+   #include <boost/type_traits/is_class.hpp>
- 
-    //Move emulation rv breaks standard aliasing rules so add workarounds for some compilers
-    #if defined(__GNUC__) && (__GNUC__ >= 4) && \
-@@ -65,7 +66,7 @@
-    template <class T>
-    class rv
-       : public ::boost::move_detail::if_c
--         < ::boost::move_detail::is_class_or_union<T>::value
-+         < ::boost::is_class<T>::value
-          , T
-          , ::boost::move_detail::nat
-          >::type
diff --git a/pkgs/development/libraries/boost/cygwin-fedora-boost-1.57.0-mpl-print.patch b/pkgs/development/libraries/boost/cygwin-fedora-boost-1.57.0-mpl-print.patch
deleted file mode 100644
index 561cef19eb2..00000000000
--- a/pkgs/development/libraries/boost/cygwin-fedora-boost-1.57.0-mpl-print.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-diff -up boost_1_57_0/boost/mpl/print.hpp\~ boost_1_57_0/boost/mpl/print.hpp
---- boost_1_57_0/boost/mpl/print.hpp~	2014-07-09 23:12:31.000000000 +0200
-+++ boost_1_57_0/boost/mpl/print.hpp	2015-01-20 12:44:59.621400948 +0100
-@@ -52,16 +52,15 @@ struct print
-     enum { n = sizeof(T) + -1 };
- #elif defined(__MWERKS__)
-     void f(int);
--#else 
--    enum {
--        n =
--# if defined(__EDG_VERSION__)
--           aux::dependent_unsigned<T>::value > -1
--# else 
--           sizeof(T) > -1
--# endif 
--        };
--#endif 
-+#elif defined(__EDG_VERSION__)
-+    enum { n = aux::dependent_unsigned<T>::value > -1 };
-+#elif defined(BOOST_GCC)
-+    enum { n1 };
-+    enum { n2 };
-+    enum { n = n1 != n2 };
-+#else
-+    enum { n = sizeof(T) > -1 };
-+#endif
- };
- 
- #if defined(BOOST_MSVC)
-
-Diff finished.  Tue Jan 20 12:45:03 2015
diff --git a/pkgs/development/libraries/boost/cygwin-fedora-boost-1.57.0-pool-test_linking.patch b/pkgs/development/libraries/boost/cygwin-fedora-boost-1.57.0-pool-test_linking.patch
deleted file mode 100644
index 57e6206bba1..00000000000
--- a/pkgs/development/libraries/boost/cygwin-fedora-boost-1.57.0-pool-test_linking.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-diff -up boost_1_57_0/libs/pool/test/Jamfile.v2\~ boost_1_57_0/libs/pool/test/Jamfile.v2
---- boost_1_57_0/libs/pool/test/Jamfile.v2~	2014-07-10 06:36:10.000000000 +0200
-+++ boost_1_57_0/libs/pool/test/Jamfile.v2	2015-01-20 13:59:10.818700586 +0100
-@@ -28,17 +28,17 @@ explicit valgrind_config_check ;
- local use-valgrind = [ check-target-builds valgrind_config_check "valgrind" : <testing.launcher>"valgrind --error-exitcode=1" : <build>no ] ;
- 
- test-suite pool :
--    [ run test_simple_seg_storage.cpp ]
--    [ run test_pool_alloc.cpp ]
--    [ run pool_msvc_compiler_bug_test.cpp ]
--    [ run test_msvc_mem_leak_detect.cpp ]
--    [ run test_bug_3349.cpp ]
--    [ run test_bug_4960.cpp ]
--    [ run test_bug_1252.cpp ]
--    [ run test_bug_2696.cpp ]
--    [ run test_bug_5526.cpp ]
-+    [ run test_simple_seg_storage.cpp : : : <library>/boost/system//boost_system ]
-+    [ run test_pool_alloc.cpp : : : <library>/boost/system//boost_system ]
-+    [ run pool_msvc_compiler_bug_test.cpp : : : <library>/boost/system//boost_system ]
-+    [ run test_msvc_mem_leak_detect.cpp : : : <library>/boost/system//boost_system ]
-+    [ run test_bug_3349.cpp : : : <library>/boost/system//boost_system ]
-+    [ run test_bug_4960.cpp : : : <library>/boost/system//boost_system ]
-+    [ run test_bug_1252.cpp : : : <library>/boost/system//boost_system ]
-+    [ run test_bug_2696.cpp : : : <library>/boost/system//boost_system ]
-+    [ run test_bug_5526.cpp : : : <library>/boost/system//boost_system ]
-     [ run test_threading.cpp : : : <threading>multi <library>/boost/thread//boost_thread <toolset>gcc:<cxxflags>-Wno-attributes <toolset>gcc:<cxxflags>-Wno-missing-field-initializers ]
--    [ run  ../example/time_pool_alloc.cpp ]
-+    [ run  ../example/time_pool_alloc.cpp : : : <library>/boost/system//boost_system ]
-     [ compile test_poisoned_macros.cpp ]
- 
- #
-
-Diff finished.  Tue Jan 20 13:59:16 2015
diff --git a/pkgs/development/libraries/boost/cygwin-fedora-boost-1.57.0-signals2-weak_ptr.patch b/pkgs/development/libraries/boost/cygwin-fedora-boost-1.57.0-signals2-weak_ptr.patch
deleted file mode 100644
index eb9ea14011f..00000000000
--- a/pkgs/development/libraries/boost/cygwin-fedora-boost-1.57.0-signals2-weak_ptr.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/boost/signals2/trackable.hpp
-+++ b/boost/signals2/trackable.hpp
-@@ -18,6 +18,7 @@
- 
- #include <boost/assert.hpp>
- #include <boost/shared_ptr.hpp>
-+#include <boost/weak_ptr.hpp>
- 
- namespace boost {
-   namespace signals2 {
diff --git a/pkgs/development/libraries/boost/cygwin-fedora-boost-1.57.0-spirit-unused_typedef.patch b/pkgs/development/libraries/boost/cygwin-fedora-boost-1.57.0-spirit-unused_typedef.patch
deleted file mode 100644
index 282962987c5..00000000000
--- a/pkgs/development/libraries/boost/cygwin-fedora-boost-1.57.0-spirit-unused_typedef.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-diff -up boost_1_57_0/boost/spirit/home/classic/core/non_terminal/impl/grammar.ipp\~ boost_1_57_0/boost/spirit/home/classic/core/non_terminal/impl/grammar.ipp
---- boost_1_57_0/boost/spirit/home/classic/core/non_terminal/impl/grammar.ipp~	2014-10-13 12:21:40.000000000 +0200
-+++ boost_1_57_0/boost/spirit/home/classic/core/non_terminal/impl/grammar.ipp	2015-01-20 13:25:50.069710766 +0100
-@@ -282,12 +282,12 @@ struct grammar_definition
- #if !defined(BOOST_SPIRIT_SINGLE_GRAMMAR_INSTANCE)
-         typedef impl::grammar_helper_base<GrammarT> helper_base_t;
-         typedef grammar_helper_list<GrammarT> helper_list_t;
--        typedef typename helper_list_t::vector_t::reverse_iterator iterator_t;
- 
-         helper_list_t&  helpers =
-         grammartract_helper_list::do_(self);
- 
- # if defined(BOOST_INTEL_CXX_VERSION)
-+        typedef typename helper_list_t::vector_t::reverse_iterator iterator_t;
-         for (iterator_t i = helpers.rbegin(); i != helpers.rend(); ++i)
-             (*i)->undefine(self);
- # else
-
-Diff finished.  Tue Jan 20 13:25:53 2015
diff --git a/pkgs/development/libraries/boost/cygwin-fedora-boost-1.57.0-uuid-comparison.patch b/pkgs/development/libraries/boost/cygwin-fedora-boost-1.57.0-uuid-comparison.patch
deleted file mode 100644
index 30ebb981b70..00000000000
--- a/pkgs/development/libraries/boost/cygwin-fedora-boost-1.57.0-uuid-comparison.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/boost/uuid/detail/uuid_x86.hpp
-+++ b/boost/uuid/detail/uuid_x86.hpp
-@@ -100,7 +100,7 @@ inline bool operator< (uuid const& lhs, uuid const& rhs) BOOST_NOEXCEPT
-     cmp = (cmp - 1u) ^ cmp;
-     rcmp = (rcmp - 1u) ^ rcmp;
- 
--    return static_cast< uint16_t >(cmp) < static_cast< uint16_t >(rcmp);
-+    return cmp < rcmp;
- }
- 
- } // namespace uuids
diff --git a/pkgs/development/libraries/boost/generic.nix b/pkgs/development/libraries/boost/generic.nix
index 8ce44b878d0..c0c69b0fe70 100644
--- a/pkgs/development/libraries/boost/generic.nix
+++ b/pkgs/development/libraries/boost/generic.nix
@@ -114,8 +114,9 @@ stdenv.mkDerivation {
     description = "Collection of C++ libraries";
     license = stdenv.lib.licenses.boost;
 
-    platforms = (platforms.unix ++ platforms.windows);
-    badPlatforms = stdenv.lib.optional (versionOlder version "1.59") "aarch64-linux";
+    platforms = platforms.unix ++ platforms.windows;
+    badPlatforms = stdenv.lib.optional (versionOlder version "1.59") "aarch64-linux"
+                 ++ stdenv.lib.optional ((versionOlder version "1.57") || version == "1.58") "x86_64-darwin";
     maintainers = with maintainers; [ peti ];
   };
 
diff --git a/pkgs/development/libraries/bullet/default.nix b/pkgs/development/libraries/bullet/default.nix
index fca5e8d70a3..b4a2133f7d8 100644
--- a/pkgs/development/libraries/bullet/default.nix
+++ b/pkgs/development/libraries/bullet/default.nix
@@ -40,6 +40,8 @@ stdenv.mkDerivation rec {
 
   enableParallelBuilding = true;
 
+  NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.cc.isClang "-Wno-error=argument-outside-range";
+
   meta = with stdenv.lib; {
     description = "A professional free 3D Game Multiphysics Library";
     longDescription = ''
diff --git a/pkgs/development/libraries/c-ares/release.patch b/pkgs/development/libraries/c-ares/release.patch
deleted file mode 100644
index e745648062a..00000000000
--- a/pkgs/development/libraries/c-ares/release.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-diff -aur c-ares-cares-1_13_0/ares_version.h c-ares-1.13.0/ares_version.h
---- c-ares-cares-1_13_0/ares_version.h	2017-06-20 02:00:21.000000000 -0400
-+++ c-ares-1.13.0/ares_version.h	2017-06-20 02:03:54.000000000 -0400
-@@ -6,12 +6,12 @@
- #define ARES_COPYRIGHT "2004 - 2016 Daniel Stenberg, <daniel@haxx.se>."
- 
- #define ARES_VERSION_MAJOR 1
--#define ARES_VERSION_MINOR 12
--#define ARES_VERSION_PATCH 1
-+#define ARES_VERSION_MINOR 13
-+#define ARES_VERSION_PATCH 0
- #define ARES_VERSION ((ARES_VERSION_MAJOR<<16)|\
-                        (ARES_VERSION_MINOR<<8)|\
-                        (ARES_VERSION_PATCH))
--#define ARES_VERSION_STR "1.12.1-DEV"
-+#define ARES_VERSION_STR "1.13.0"
- 
- #if (ARES_VERSION >= 0x010700)
- #  define CARES_HAVE_ARES_LIBRARY_INIT 1
diff --git a/pkgs/development/libraries/c-blosc/default.nix b/pkgs/development/libraries/c-blosc/default.nix
index 4c28ca9f2c7..3603667fbf2 100644
--- a/pkgs/development/libraries/c-blosc/default.nix
+++ b/pkgs/development/libraries/c-blosc/default.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   name = "c-blosc-${version}";
-  version = "1.16.2";
+  version = "1.16.3";
 
   src = fetchFromGitHub {
     owner = "Blosc";
     repo = "c-blosc";
     rev = "v${version}";
-    sha256 = "19wb699rb5bn6h9qhw1m18m2w77lws7r50vxpgrvggnl27mvm3xc";
+    sha256 = "1c58wkf34rp5wh9qp09zdk7zcfn037sk56p4xq1g0vapbnglv603";
   };
 
   buildInputs = [ cmake ];
diff --git a/pkgs/development/libraries/cfitsio/default.nix b/pkgs/development/libraries/cfitsio/default.nix
index a21158723be..32308c34ead 100644
--- a/pkgs/development/libraries/cfitsio/default.nix
+++ b/pkgs/development/libraries/cfitsio/default.nix
@@ -1,15 +1,23 @@
-{ fetchurl, stdenv }:
+{ fetchurl, stdenv
 
- stdenv.mkDerivation {
-  name = "cfitsio-3.430";
+# Optional dependencies
+, bzip2 ? null }:
+
+stdenv.mkDerivation rec {
+  name = "cfitsio-${version}";
+  version = "3.450";
 
   src = fetchurl {
-    url = "ftp://heasarc.gsfc.nasa.gov/software/fitsio/c/cfitsio3430.tar.gz";
-    sha256 = "07fghxh5fl8nqk3q0dh8rvc83npnm0hisxzcj16a6r7gj5pmp40l";
+    url = "https://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/cfitsio${builtins.replaceStrings ["."] [""] version}.tar.gz";
+    sha256 = "0bmrkw6w65zb0k3mszaaqy1f4zjm2hl7njww74nb5v38wvdi4q5z";
   };
 
+  buildInputs = [ bzip2 ];
+
   patches = [ ./darwin-curl-config.patch ./darwin-rpath-universal.patch ];
 
+  configureFlags = stdenv.lib.optional (bzip2 != null) "--with-bzip2=${bzip2.out}";
+
   # Shared-only build
   buildFlags = "shared";
   postPatch = '' sed -e '/^install:/s/libcfitsio.a //' -e 's@/bin/@@g' -i Makefile.in
@@ -27,8 +35,8 @@
          advanced features for manipulating and filtering the information in
          FITS files.
       '';
-    # Permissive BSD-style license.
-    license = "permissive";
+    license = licenses.mit;
+    maintainers = [ maintainers.xbreak ];
     platforms = with platforms; linux ++ darwin;
   };
 }
diff --git a/pkgs/development/libraries/clucene-core/2.x.nix b/pkgs/development/libraries/clucene-core/2.x.nix
index 6eb310550bc..91347813a24 100644
--- a/pkgs/development/libraries/clucene-core/2.x.nix
+++ b/pkgs/development/libraries/clucene-core/2.x.nix
@@ -36,6 +36,8 @@ stdenv.mkDerivation rec {
   # /build/clucene-core-2.3.3.4/build/bin/cl_test"
   doCheck = false;
 
+  NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.cc.isClang "-Wno-error=c++11-narrowing";
+
   meta = with stdenv.lib; {
     description = "Core library for full-featured text search engine";
     longDescription = ''
diff --git a/pkgs/development/libraries/crypto++/default.nix b/pkgs/development/libraries/crypto++/default.nix
index cbd3e405415..61a825cd374 100644
--- a/pkgs/development/libraries/crypto++/default.nix
+++ b/pkgs/development/libraries/crypto++/default.nix
@@ -18,17 +18,11 @@ stdenv.mkDerivation rec {
   ];
 
 
-  configurePhase = let
-    marchflags =
-      if stdenv.isi686 then "-march=i686" else
-      if stdenv.isx86_64 then "-march=nocona -mtune=generic" else
-      "";
-    in
-    ''
+  configurePhase = ''
       sed -i GNUmakefile \
-        -e 's|-march=native|${marchflags} -fPIC|g' \
+        -e 's|-march=native|-fPIC|g' \
         -e '/^CXXFLAGS =/s|-g ||'
-    '';
+  '';
 
   enableParallelBuilding = true;
 
diff --git a/pkgs/development/libraries/ctl/default.nix b/pkgs/development/libraries/ctl/default.nix
index ac6c9657dde..71e30104476 100644
--- a/pkgs/development/libraries/ctl/default.nix
+++ b/pkgs/development/libraries/ctl/default.nix
@@ -1,22 +1,31 @@
-{ stdenv, callPackage, cmake, pkgconfig, ilmbase, libtiff, openexr }:
+{ stdenv, fetchFromGitHub, fetchpatch, cmake, pkgconfig, ilmbase, libtiff, openexr }:
 
-let
-  source = callPackage ./source.nix { };
-in
-stdenv.mkDerivation {
-  name = "ctl-${source.version}";
+stdenv.mkDerivation rec {
+  pname = "ctl";
+  version = "1.5.2";
 
-  src = source.src;
+  src = fetchFromGitHub {
+    owner = "ampas";
+    repo = pname;
+    rev = "${pname}-${version}";
+    sha256 = "0a698rd1cmixh3mk4r1xa6rjli8b8b7dbx89pb43xkgqxy67glwx";
+  };
+
+  patches = [
+    (fetchpatch {
+      name = "ctl-1.5.2-ilm_230.patch";
+      url = "https://src.fedoraproject.org/rpms/CTL/raw/9d7c15a91bccdc0a9485d463bf2789be72e6b17d/f/ctl-1.5.2-ilm_230.patch";
+      sha256 = "0mdx7llwrm0q8ai53zhyxi40i9h5s339dbkqpqv30yzi2xpnfj3d";
+    })
+  ];
 
-  nativeBuildInputs = [ pkgconfig ];
-  buildInputs = [ cmake libtiff ilmbase openexr ];
+  nativeBuildInputs = [ cmake pkgconfig ];
+  buildInputs = [ libtiff ilmbase openexr ];
 
   meta = with stdenv.lib; {
     description = "Color Transformation Language";
-    homepage = http://ampasctl.sourceforge.net;
-    license = "A.M.P.A.S";
+    homepage = "https://github.com/ampas/CTL";
+    license = "A.M.P.A.S"; # BSD-derivative, free but GPL incompatible
     platforms = platforms.all;
   };
-
-  passthru.source = source;
 }
diff --git a/pkgs/development/libraries/ctl/source.nix b/pkgs/development/libraries/ctl/source.nix
deleted file mode 100644
index d0cb83c0369..00000000000
--- a/pkgs/development/libraries/ctl/source.nix
+++ /dev/null
@@ -1,11 +0,0 @@
-{ fetchFromGitHub }:
-rec {
-  version = "1.5.2";
-
-  src = fetchFromGitHub {
-    owner = "ampas";
-    repo = "CTL";
-    rev = "ctl-${version}";
-    sha256 = "0a698rd1cmixh3mk4r1xa6rjli8b8b7dbx89pb43xkgqxy67glwx";
-  };
-}
diff --git a/pkgs/development/libraries/dav1d/default.nix b/pkgs/development/libraries/dav1d/default.nix
index 49536687a93..157a6a21f3d 100644
--- a/pkgs/development/libraries/dav1d/default.nix
+++ b/pkgs/development/libraries/dav1d/default.nix
@@ -2,14 +2,14 @@
 
 stdenv.mkDerivation rec {
   pname = "dav1d";
-  version = "0.3.0";
+  version = "0.3.1";
 
   src = fetchFromGitLab {
     domain = "code.videolan.org";
     owner = "videolan";
     repo = pname;
     rev = version;
-    sha256 = "08vysa3naqjfvld9w1k6l6hby4xfn4l2gvnfnan498g5nss4050h";
+    sha256 = "1m5vdg64iqxpi37l84mcfiq313g9z55zf66s85j2rqik6asmxbqg";
   };
 
   nativeBuildInputs = [ meson ninja nasm ];
diff --git a/pkgs/development/libraries/eccodes/default.nix b/pkgs/development/libraries/eccodes/default.nix
index 4eaded81436..78f80d2baf4 100644
--- a/pkgs/development/libraries/eccodes/default.nix
+++ b/pkgs/development/libraries/eccodes/default.nix
@@ -6,11 +6,11 @@
 with stdenv.lib;
 stdenv.mkDerivation rec {
   name = "eccodes-${version}";
-  version = "2.12.0";
+  version = "2.12.5";
 
   src = fetchurl {
     url = "https://confluence.ecmwf.int/download/attachments/45757960/eccodes-${version}-Source.tar.gz";
-    sha256 = "0rqkx6p85b0v6zdkm4q2r516b7ldkxhkfc0cwkl24djlkv7fanpp";
+    sha256 = "0576fccng4nvmq5gma1nb1v00if5cwl81w4nv5zkb80q5wicn50c";
   };
 
   postPatch = ''
diff --git a/pkgs/development/libraries/fflas-ffpack/default.nix b/pkgs/development/libraries/fflas-ffpack/default.nix
index 2dd58e64585..a67210e860c 100644
--- a/pkgs/development/libraries/fflas-ffpack/default.nix
+++ b/pkgs/development/libraries/fflas-ffpack/default.nix
@@ -1,29 +1,18 @@
 { stdenv, fetchFromGitHub, autoreconfHook, givaro, pkgconfig, blas
-, fetchpatch
 , gmpxx
-, optimize ? false # impure
 }:
 stdenv.mkDerivation rec {
   name = "${pname}-${version}";
   pname = "fflas-ffpack";
-  version = "2.3.2";
+  version = "2.4.0";
 
   src = fetchFromGitHub {
     owner = "linbox-team";
     repo = "${pname}";
     rev = "v${version}";
-    sha256 = "1cqhassj2dny3gx0iywvmnpq8ca0d6m82xl5rz4mb8gaxr2kwddl";
+    sha256 = "1q1ala88ysz14pb5cn2kskv829nc1qif7zfzjwzhd5nnzwyivmc4";
   };
 
-  patches = [
-    # https://github.com/linbox-team/fflas-ffpack/issues/146
-    (fetchpatch {
-      name = "fix-flaky-test-fgemm-check.patch";
-      url = "https://github.com/linbox-team/fflas-ffpack/commit/d8cd67d91a9535417a5cb193cf1540ad6758a3db.patch";
-      sha256 = "1gnfc616fvnlr0smvz6lb2d445vn8fgv6vqcr6pwm3dj4wa6v3b3";
-    })
-  ];
-
   checkInputs = [
     gmpxx
   ];
@@ -40,19 +29,17 @@ stdenv.mkDerivation rec {
   configureFlags = [
     "--with-blas-libs=-l${blas.linkName}"
     "--with-lapack-libs=-l${blas.linkName}"
-  ] ++ stdenv.lib.optionals (!optimize) [
+  ] ++ stdenv.lib.optionals stdenv.isx86_64 {
     # disable SIMD instructions (which are enabled *when available* by default)
-    "--disable-sse"
-    "--disable-sse2"
-    "--disable-sse3"
-    "--disable-ssse3"
-    "--disable-sse41"
-    "--disable-sse42"
-    "--disable-avx"
-    "--disable-avx2"
-    "--disable-fma"
-    "--disable-fma4"
-  ];
+    "default"        = [ "--disable-sse3" "--disable-ssse3" "--disable-sse41" "--disable-sse42" "--disable-avx" "--disable-avx2" "--disable-fma" "--disable-fma4" ];
+    "westmere"       = [                                                                        "--disable-avx" "--disable-avx2" "--disable-fma" "--disable-fma4" ];
+    "sandybridge"    = [                                                                                        "--disable-avx2" "--disable-fma" "--disable-fma4" ];
+    "ivybridge"      = [                                                                                        "--disable-avx2" "--disable-fma" "--disable-fma4" ];
+    "haswell"        = [                                                                                                                         "--disable-fma4" ];
+    "broadwell"      = [                                                                                                                         "--disable-fma4" ];
+    "skylake"        = [                                                                                                                         "--disable-fma4" ];
+    "skylake-avx512" = [                                                                                                                         "--disable-fma4" ];
+  }.${stdenv.hostPlatform.platform.gcc.arch or "default"};
 
   doCheck = true;
 
diff --git a/pkgs/development/libraries/ffmpeg-full/default.nix b/pkgs/development/libraries/ffmpeg-full/default.nix
index 306b4e22cfc..db606cc02d6 100644
--- a/pkgs/development/libraries/ffmpeg-full/default.nix
+++ b/pkgs/development/libraries/ffmpeg-full/default.nix
@@ -97,8 +97,7 @@
 , libXv ? null # Xlib support
 , libXext ? null # Xlib support
 , lzma ? null # xz-utils
-, nvenc ? false, nvidia-video-sdk ? null, nv-codec-headers ? null # NVIDIA NVENC support
-, callPackage # needed for NVENC to access external ffmpeg nvidia headers
+, nvenc ? true, nv-codec-headers ? null # NVIDIA NVENC support
 , openal ? null # OpenAL 1.1 capture support
 #, opencl ? null # OpenCL code
 , opencore-amr ? null # AMR-NB de/encoder & AMR-WB decoder
@@ -228,15 +227,14 @@ assert libxcbxfixesExtlib -> libxcb != null;
 assert libxcbshapeExtlib -> libxcb != null;
 assert openglExtlib -> libGLU_combined != null;
 assert opensslExtlib -> gnutls == null && openssl != null && nonfreeLicensing;
-assert nvenc -> nvidia-video-sdk != null && nonfreeLicensing;
 
 stdenv.mkDerivation rec {
   name = "ffmpeg-full-${version}";
-  version = "4.1.2";
+  version = "4.1.3";
 
   src = fetchurl {
     url = "https://www.ffmpeg.org/releases/ffmpeg-${version}.tar.xz";
-    sha256 = "0yrl6nij4b1pk1c4nbi80857dsd760gziiss2ls19awq8zj0lpxr";
+    sha256 = "0gdnprc7gk4b7ckq8wbxbrj7i00r76r9a5g9mj7iln40512j0c0c";
   };
 
   prePatch = ''
@@ -418,13 +416,13 @@ stdenv.mkDerivation rec {
     ++ optional ((isLinux || isFreeBSD) && libva != null) libva
     ++ optionals isLinux [ alsaLib libraw1394 libv4l ]
     ++ optional (isLinux && libmfx != null) libmfx
-    ++ optionals nvenc [ nvidia-video-sdk nv-codec-headers ]
+    ++ optional nvenc nv-codec-headers
     ++ optionals stdenv.isDarwin [ Cocoa CoreServices CoreAudio AVFoundation
                                    MediaToolbox VideoDecodeAcceleration
                                    libiconv cf-private /* For _OBJC_EHTYPE_$_NSException */ ];
 
-  # Build qt-faststart executable
-  buildPhase = optional qtFaststartProgram ''make tools/qt-faststart'';
+  buildFlags = [ "all" ]
+    ++ optional qtFaststartProgram "tools/qt-faststart"; # Build qt-faststart executable
 
   # Hacky framework patching technique borrowed from the phantomjs2 package
   postInstall = optionalString qtFaststartProgram ''
diff --git a/pkgs/development/libraries/ffmpeg/4.nix b/pkgs/development/libraries/ffmpeg/4.nix
index 7e2507d5afd..3066e0b12e5 100644
--- a/pkgs/development/libraries/ffmpeg/4.nix
+++ b/pkgs/development/libraries/ffmpeg/4.nix
@@ -6,7 +6,7 @@
 
 callPackage ./generic.nix (args // rec {
   version = "${branch}";
-  branch = "4.1.2";
-  sha256 = "00yzwc2g97h8ws0haz1p0ahaavhgrbha6xjdc53a5vyfy3zyy3i0";
+  branch = "4.1.3";
+  sha256 = "0aka5pibjhpks1wrsvqpy98v8cbvyvnngwqhh4ajkg6pbdl7k9i9";
   darwinFrameworks = [ Cocoa CoreMedia VideoToolbox ];
 })
diff --git a/pkgs/development/libraries/ffmpeg/vpxenc-0.10-libvpx-1.5.patch b/pkgs/development/libraries/ffmpeg/vpxenc-0.10-libvpx-1.5.patch
deleted file mode 100644
index 740bb746aad..00000000000
--- a/pkgs/development/libraries/ffmpeg/vpxenc-0.10-libvpx-1.5.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c
-index 1d33ce9..dface51 100644
---- a/libavcodec/libvpxenc.c
-+++ b/libavcodec/libvpxenc.c
-@@ -78,19 +78,11 @@ typedef struct VP8EncoderContext {
- 
- /** String mappings for enum vp8e_enc_control_id */
- static const char *ctlidstr[] = {
--    [VP8E_UPD_ENTROPY]           = "VP8E_UPD_ENTROPY",
--    [VP8E_UPD_REFERENCE]         = "VP8E_UPD_REFERENCE",
--    [VP8E_USE_REFERENCE]         = "VP8E_USE_REFERENCE",
--    [VP8E_SET_ROI_MAP]           = "VP8E_SET_ROI_MAP",
--    [VP8E_SET_ACTIVEMAP]         = "VP8E_SET_ACTIVEMAP",
--    [VP8E_SET_SCALEMODE]         = "VP8E_SET_SCALEMODE",
-     [VP8E_SET_CPUUSED]           = "VP8E_SET_CPUUSED",
-     [VP8E_SET_ENABLEAUTOALTREF]  = "VP8E_SET_ENABLEAUTOALTREF",
-     [VP8E_SET_NOISE_SENSITIVITY] = "VP8E_SET_NOISE_SENSITIVITY",
--    [VP8E_SET_SHARPNESS]         = "VP8E_SET_SHARPNESS",
-     [VP8E_SET_STATIC_THRESHOLD]  = "VP8E_SET_STATIC_THRESHOLD",
-     [VP8E_SET_TOKEN_PARTITIONS]  = "VP8E_SET_TOKEN_PARTITIONS",
--    [VP8E_GET_LAST_QUANTIZER]    = "VP8E_GET_LAST_QUANTIZER",
-     [VP8E_SET_ARNR_MAXFRAMES]    = "VP8E_SET_ARNR_MAXFRAMES",
-     [VP8E_SET_ARNR_STRENGTH]     = "VP8E_SET_ARNR_STRENGTH",
-     [VP8E_SET_ARNR_TYPE]         = "VP8E_SET_ARNR_TYPE",
diff --git a/pkgs/development/libraries/ffmpeg/vpxenc-1.2-libvpx-1.5.patch b/pkgs/development/libraries/ffmpeg/vpxenc-1.2-libvpx-1.5.patch
deleted file mode 100644
index 7f1ec1df6c7..00000000000
--- a/pkgs/development/libraries/ffmpeg/vpxenc-1.2-libvpx-1.5.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c
-index 4f1adb8..1791952 100644
---- a/libavcodec/libvpxenc.c
-+++ b/libavcodec/libvpxenc.c
-@@ -87,19 +87,11 @@ typedef struct VP8EncoderContext {
- 
- /** String mappings for enum vp8e_enc_control_id */
- static const char *const ctlidstr[] = {
--    [VP8E_UPD_ENTROPY]           = "VP8E_UPD_ENTROPY",
--    [VP8E_UPD_REFERENCE]         = "VP8E_UPD_REFERENCE",
--    [VP8E_USE_REFERENCE]         = "VP8E_USE_REFERENCE",
--    [VP8E_SET_ROI_MAP]           = "VP8E_SET_ROI_MAP",
--    [VP8E_SET_ACTIVEMAP]         = "VP8E_SET_ACTIVEMAP",
--    [VP8E_SET_SCALEMODE]         = "VP8E_SET_SCALEMODE",
-     [VP8E_SET_CPUUSED]           = "VP8E_SET_CPUUSED",
-     [VP8E_SET_ENABLEAUTOALTREF]  = "VP8E_SET_ENABLEAUTOALTREF",
-     [VP8E_SET_NOISE_SENSITIVITY] = "VP8E_SET_NOISE_SENSITIVITY",
--    [VP8E_SET_SHARPNESS]         = "VP8E_SET_SHARPNESS",
-     [VP8E_SET_STATIC_THRESHOLD]  = "VP8E_SET_STATIC_THRESHOLD",
-     [VP8E_SET_TOKEN_PARTITIONS]  = "VP8E_SET_TOKEN_PARTITIONS",
--    [VP8E_GET_LAST_QUANTIZER]    = "VP8E_GET_LAST_QUANTIZER",
-     [VP8E_SET_ARNR_MAXFRAMES]    = "VP8E_SET_ARNR_MAXFRAMES",
-     [VP8E_SET_ARNR_STRENGTH]     = "VP8E_SET_ARNR_STRENGTH",
-     [VP8E_SET_ARNR_TYPE]         = "VP8E_SET_ARNR_TYPE",
diff --git a/pkgs/development/libraries/freetds/default.nix b/pkgs/development/libraries/freetds/default.nix
index 5c70df02cdc..d8bb9e8e85b 100644
--- a/pkgs/development/libraries/freetds/default.nix
+++ b/pkgs/development/libraries/freetds/default.nix
@@ -8,11 +8,11 @@ assert odbcSupport -> unixODBC != null;
 
 stdenv.mkDerivation rec {
   name = "freetds-${version}";
-  version = "1.00.111";
+  version = "1.1.6";
 
   src = fetchurl {
     url    = "http://www.freetds.org/files/stable/${name}.tar.bz2";
-    sha256 = "17vn95bjiib3ia3h64b7akcmgmj6wfjx7w538iylhf9whqvssi4j";
+    sha256 = "18rry59npbhxpzjb0l3ib7zlnlzj43srb5adcm65wyklklsh0gn2";
   };
 
   buildInputs = [
diff --git a/pkgs/development/libraries/freetype/disable-pcf-long-family-names.patch b/pkgs/development/libraries/freetype/disable-pcf-long-family-names.patch
deleted file mode 100644
index e3dfe4aabd6..00000000000
--- a/pkgs/development/libraries/freetype/disable-pcf-long-family-names.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-diff --git a/include/freetype/config/ftoption.h b/include/freetype/config/ftoption.h
-index 5676074..37a0d00 100644
---- a/include/freetype/config/ftoption.h
-+++ b/include/freetype/config/ftoption.h
-@@ -856,7 +856,7 @@ FT_BEGIN_HEADER
-   /* If this option is activated, it can be controlled with the            */
-   /* `no-long-family-names' property of the pcf driver module.             */
-   /*                                                                       */
--#define PCF_CONFIG_OPTION_LONG_FAMILY_NAMES
-+/* #define PCF_CONFIG_OPTION_LONG_FAMILY_NAMES */
- 
- 
-   /*************************************************************************/
--- 
-cgit v1.0-41-gc330
\ No newline at end of file
diff --git a/pkgs/development/libraries/frei0r/default.nix b/pkgs/development/libraries/frei0r/default.nix
index b54c6d4e956..cdeddd82b71 100644
--- a/pkgs/development/libraries/frei0r/default.nix
+++ b/pkgs/development/libraries/frei0r/default.nix
@@ -9,15 +9,21 @@ stdenv.mkDerivation rec {
     sha256 = "0pji26fpd0dqrx1akyhqi6729s394irl73dacnyxk58ijqq4dhp0";
   };
 
-  nativeBuildInputs = [ pkgconfig ];
-  buildInputs = [ autoconf cairo opencv ];
+  nativeBuildInputs = [ autoconf pkgconfig ];
+  buildInputs = [ cairo opencv ];
+
+  postInstall = stdenv.lib.optionalString stdenv.hostPlatform.isDarwin ''
+    for f in $out/lib/frei0r-1/*.so* ; do
+      ln -s $f "''${f%.*}.dylib"
+    done
+  '';
 
   meta = with stdenv.lib; {
     homepage = https://frei0r.dyne.org;
     description = "Minimalist, cross-platform, shared video plugins";
     license = licenses.gpl2;
     maintainers = [ maintainers.goibhniu ];
-    platforms = platforms.linux;
+    platforms = platforms.linux ++ platforms.darwin;
 
   };
 }
diff --git a/pkgs/development/libraries/g2o/default.nix b/pkgs/development/libraries/g2o/default.nix
new file mode 100644
index 00000000000..1486b5bfc55
--- /dev/null
+++ b/pkgs/development/libraries/g2o/default.nix
@@ -0,0 +1,24 @@
+{ lib, stdenv, fetchFromGitHub, cmake, eigen, suitesparse }:
+
+stdenv.mkDerivation rec {
+  pname = "g2o";
+  version = "unstable-2019-04-07";
+
+  src = fetchFromGitHub {
+    owner = "RainerKuemmerle";
+    repo = pname;
+    rev = "9b41a4ea5ade8e1250b9c1b279f3a9c098811b5a";
+    sha256 = "1rgrz6zxiinrik3lgwgvsmlww1m2fnpjmvcx1mf62xi1s2ma5w2i";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ eigen suitesparse ];
+
+  meta = {
+    description = "A General Framework for Graph Optimization";
+    homepage = "https://github.com/RainerKuemmerle/g2o";
+    license = with lib.licenses; [ bsd3 lgpl3 gpl3 ];
+    maintainers = with lib.maintainers; [ lopsided98 ];
+    platforms = lib.platforms.all;
+  };
+}
diff --git a/pkgs/development/libraries/gdcm/default.nix b/pkgs/development/libraries/gdcm/default.nix
index a1d623c7b98..fca567d683d 100644
--- a/pkgs/development/libraries/gdcm/default.nix
+++ b/pkgs/development/libraries/gdcm/default.nix
@@ -1,12 +1,12 @@
 { stdenv, fetchurl, cmake, vtk }:
 
 stdenv.mkDerivation rec {
-  version = "2.8.9";
+  version = "3.0.0";
   name = "gdcm-${version}";
 
   src = fetchurl {
     url = "mirror://sourceforge/gdcm/${name}.tar.bz2";
-    sha256 = "1za252d1chv40d78bkjngrg1p2yx0vya8y9q3vqmz66ip2zilvx7";
+    sha256 = "1rhblnl0q4bl3hmanz4ckv5kzdrzdiqp9xlcqh8df3rfrgk4d81x";
   };
 
   dontUseCmakeBuildDir = true;
diff --git a/pkgs/development/libraries/gdk-pixbuf/no-mime-sniffing.patch b/pkgs/development/libraries/gdk-pixbuf/no-mime-sniffing.patch
deleted file mode 100644
index 9896e25acda..00000000000
--- a/pkgs/development/libraries/gdk-pixbuf/no-mime-sniffing.patch
+++ /dev/null
@@ -1,18 +0,0 @@
---- a/meson.build
-+++ b/meson.build
-@@ -186,13 +186,8 @@
- gmodule_dep = dependency('gmodule-no-export-2.0')
- gio_dep = dependency('gio-2.0')
- 
--# On non-Windows/macOS systems we always required shared-mime-info and GIO
--if host_system != 'windows' and host_system != 'darwin'
--  shared_mime_dep = dependency('shared-mime-info')
--  gdk_pixbuf_conf.set('GDK_PIXBUF_USE_GIO_MIME', 1)
--else
--  shared_mime_dep = []
--endif
-+# No MIME sniffing for now
-+shared_mime_dep = []
- 
- gdk_pixbuf_deps = [ mathlib_dep, gobject_dep, gmodule_dep, gio_dep, shared_mime_dep ]
- 
diff --git a/pkgs/development/libraries/gegl/4.0.nix b/pkgs/development/libraries/gegl/4.0.nix
index da20438fb4b..4215f0ebc30 100644
--- a/pkgs/development/libraries/gegl/4.0.nix
+++ b/pkgs/development/libraries/gegl/4.0.nix
@@ -1,45 +1,19 @@
-{ stdenv, fetchurl, fetchpatch, pkgconfig, glib, babl, libpng, cairo, libjpeg, which
+{ stdenv, fetchurl, pkgconfig, glib, babl, libpng, cairo, libjpeg, which
 , librsvg, pango, gtk, bzip2, json-glib, gettext, autoreconfHook, libraw
 , gexiv2, libwebp, gnome3, libintl }:
 
 stdenv.mkDerivation rec {
   pname = "gegl";
-  version = "0.4.14";
+  version = "0.4.16";
 
   outputs = [ "out" "dev" "devdoc" ];
   outputBin = "dev";
 
   src = fetchurl {
     url = "https://download.gimp.org/pub/gegl/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.bz2";
-    sha256 = "00crhngwi07f5b9x77kx5p7p4cl6l5g6glpz9rqv7pfqk62xa0ac";
+    sha256 = "0njydcr6qdmfzh4fxx544681qxdpf7y6b2f47jcypn810dlxy4h1";
   };
 
-  patches = stdenv.lib.optionals stdenv.isDarwin [
-    # Make the Darwin patches below apply cleanly
-    (fetchpatch {
-      url = https://gitlab.gnome.org/GNOME/gegl/commit/141a7aa76cd36143f624f06b1c43d2483945653c.patch;
-      sha256 = "0ijv9ra6723jn60krjwzbc6l9qr08h76bsz9xgddvfgsgr1nnpbi";
-    })
-    (fetchpatch {
-      url = https://gitlab.gnome.org/GNOME/gegl/commit/b3ff0df080d133bbdb394c3db40d4f9d2980a8a6.patch;
-      sha256 = "0im0rqk8mz9vi7qqx06vj4wm5hjwv1544jwdaaywlcrs9g266hl0";
-    })
-    (fetchpatch {
-      url = https://gitlab.gnome.org/GNOME/gegl/commit/fe756be6f0c776a45201a61f67d3e5e42f6398de.patch;
-      sha256 = "0h3rqwfsph2gisbwvc2v5a9r5b0djcxlm790xpi6yfndj42b0v2b";
-    })
-    # Fix build on Darwin
-    # https://gitlab.gnome.org/GNOME/gegl/merge_requests/28
-    (fetchpatch {
-      url = https://gitlab.gnome.org/GNOME/gegl/commit/ac331b5c0e3d940b64bb811b0f54e86c7d312917.patch;
-      sha256 = "1yj9jh8q9cbr1szrxhdapknk4nfhbkbc1njv50ifrj7vyfislj34";
-    })
-    (fetchpatch {
-      url = https://gitlab.gnome.org/GNOME/gegl/commit/d05eb01170728f45f561ca937708a293e29e02d9.patch;
-      sha256 = "0gwz12sm8kkmzyxsiq0sl30cabs5q0ckj743yrzimspkhrvc1ya2";
-    })
-  ];
-
   enableParallelBuilding = true;
 
   doCheck = true;
diff --git a/pkgs/development/libraries/geoclue/add-option-for-installation-sysconfdir.patch b/pkgs/development/libraries/geoclue/add-option-for-installation-sysconfdir.patch
index feb46021f8c..9eb53acebb0 100644
--- a/pkgs/development/libraries/geoclue/add-option-for-installation-sysconfdir.patch
+++ b/pkgs/development/libraries/geoclue/add-option-for-installation-sysconfdir.patch
@@ -1,5 +1,5 @@
 diff --git a/data/meson.build b/data/meson.build
-index f826864..8b8a25e 100644
+index c189753..12c10cb 100644
 --- a/data/meson.build
 +++ b/data/meson.build
 @@ -7,7 +7,7 @@ if get_option('enable-backend')
@@ -11,7 +11,16 @@ index f826864..8b8a25e 100644
      configure_file(output: 'geoclue.conf',
                     input: 'geoclue.conf.in',
                     configuration: conf,
-@@ -26,7 +26,7 @@ if get_option('enable-backend')
+@@ -16,7 +16,7 @@ if get_option('enable-backend')
+     conf = configuration_data()
+     conf.set('libexecdir', libexecdir)
+     conf.set('dbus_srv_user', get_option('dbus-srv-user'))
+-    conf.set('sysconfdir', sysconfdir)
++    conf.set('sysconfdir', sysconfdir_install)
+ 
+     service_dir = join_paths(datadir, 'dbus-1', 'system-services')
+     configure_file(output: 'org.freedesktop.GeoClue2.service',
+@@ -33,7 +33,7 @@ if get_option('enable-backend')
      # DBus Service policy file
      dbus_service_dir = get_option('dbus-sys-dir')
      if dbus_service_dir == ''
@@ -21,10 +30,10 @@ index f826864..8b8a25e 100644
      configure_file(output: 'org.freedesktop.GeoClue2.conf',
                     input: 'org.freedesktop.GeoClue2.conf.in',
 diff --git a/demo/meson.build b/demo/meson.build
-index 99c094f..a29ca96 100644
+index 1427fbe..2623f16 100644
 --- a/demo/meson.build
 +++ b/demo/meson.build
-@@ -56,7 +56,7 @@ if get_option('demo-agent')
+@@ -54,7 +54,7 @@ if get_option('demo-agent')
                                     install_dir: desktop_dir)
  
      # Also install in the autostart directory.
@@ -34,7 +43,7 @@ index 99c094f..a29ca96 100644
                               desktop_file.full_path(),
                               autostart_dir)
 diff --git a/meson.build b/meson.build
-index d738ef6..c794a1d 100644
+index fde6fa3..39b7b0a 100644
 --- a/meson.build
 +++ b/meson.build
 @@ -12,7 +12,11 @@ gclue_api_version='2.0'
@@ -50,8 +59,8 @@ index d738ef6..c794a1d 100644
  localedir = join_paths(datadir, 'locale')
  
  header_dir = 'libgeoclue-' + gclue_api_version
-@@ -29,7 +33,7 @@ conf.set_quoted('PACKAGE_URL', 'http://www.freedesktop.org/wiki/Software/GeoClue
- conf.set_quoted('PACKAGE_BUGREPORT', 'http://bugs.freedesktop.org/enter_bug.cgi?product=GeoClue')
+@@ -29,7 +33,7 @@ conf.set_quoted('PACKAGE_URL', 'https://gitlab.freedesktop.org/geoclue/geoclue/w
+ conf.set_quoted('PACKAGE_BUGREPORT', 'https://gitlab.freedesktop.org/geoclue/geoclue/issues/new')
  conf.set_quoted('TEST_SRCDIR', meson.source_root() + '/data/')
  conf.set_quoted('LOCALEDIR', localedir)
 -conf.set_quoted('SYSCONFDIR', sysconfdir)
diff --git a/pkgs/development/libraries/geoclue/default.nix b/pkgs/development/libraries/geoclue/default.nix
index 5b8951cb3e0..70319c9151f 100644
--- a/pkgs/development/libraries/geoclue/default.nix
+++ b/pkgs/development/libraries/geoclue/default.nix
@@ -7,14 +7,14 @@ with stdenv.lib;
 
 stdenv.mkDerivation rec {
   pname = "geoclue";
-  version = "2.5.2";
+  version = "2.5.3";
 
   src = fetchFromGitLab {
     domain = "gitlab.freedesktop.org";
     owner = pname;
     repo = pname;
     rev = version;
-    sha256 = "1zk6n28q030a9v03whad928b9zwq16d30ch369qv2c0994axdr5p";
+    sha256 = "1wbpi74dw3p7izxwd57irz2i1g55r7wzl5h2yf0ns0hgq2njdfsg";
   };
 
   patches = [
diff --git a/pkgs/development/libraries/geos/default.nix b/pkgs/development/libraries/geos/default.nix
index d857c9931fe..ae8d88d12d9 100644
--- a/pkgs/development/libraries/geos/default.nix
+++ b/pkgs/development/libraries/geos/default.nix
@@ -1,11 +1,11 @@
 { stdenv, fetchurl, python }:
 
 stdenv.mkDerivation rec {
-  name = "geos-3.7.1";
+  name = "geos-3.7.2";
 
   src = fetchurl {
     url = "https://download.osgeo.org/geos/${name}.tar.bz2";
-    sha256 = "1312m02xk4sp6f1xdpb9w0ic0zbxg90p5y66qnwidl5fksscf1h0";
+    sha256 = "01vpkncvq1i1191agq03yg1h7d0igj10gv5z2mqk24nnwrdycri1";
   };
 
   enableParallelBuilding = true;
diff --git a/pkgs/development/libraries/givaro/default.nix b/pkgs/development/libraries/givaro/default.nix
index 0773daa2d09..0221b9c7013 100644
--- a/pkgs/development/libraries/givaro/default.nix
+++ b/pkgs/development/libraries/givaro/default.nix
@@ -1,15 +1,13 @@
-{ stdenv, fetchFromGitHub, automake, autoconf, libtool, autoreconfHook, gmpxx
-, optimize ? false # impure
-}:
+{ stdenv, fetchFromGitHub, automake, autoconf, libtool, autoreconfHook, gmpxx }:
 stdenv.mkDerivation rec {
   name = "${pname}-${version}";
   pname = "givaro";
-  version = "4.0.4";
+  version = "4.1.0";
   src = fetchFromGitHub {
     owner = "linbox-team";
     repo = "${pname}";
     rev = "v${version}";
-    sha256 = "199p8wyj5i63jbnk7j8qbdbfp5rm2lpmcxyk3mdjy9bz7ygx3hhy";
+    sha256 = "1l1172c964hni66mjdmhr7766l5k7y63zs3hgcpr10a8f1nx3iwp";
   };
 
   enableParallelBuilding = true;
@@ -19,19 +17,17 @@ stdenv.mkDerivation rec {
 
   configureFlags = [
     "--disable-optimization"
-  ] ++ stdenv.lib.optionals (!optimize) [
+  ] ++ stdenv.lib.optionals stdenv.isx86_64 {
     # disable SIMD instructions (which are enabled *when available* by default)
-    "--disable-sse"
-    "--disable-sse2"
-    "--disable-sse3"
-    "--disable-ssse3"
-    "--disable-sse41"
-    "--disable-sse42"
-    "--disable-avx"
-    "--disable-avx2"
-    "--disable-fma"
-    "--disable-fma4"
-  ];
+    "default"        = [ "--disable-sse3" "--disable-ssse3" "--disable-sse41" "--disable-sse42" "--disable-avx" "--disable-avx2" "--disable-fma" "--disable-fma4" ];
+    "westmere"       = [                                                                        "--disable-avx" "--disable-avx2" "--disable-fma" "--disable-fma4" ];
+    "sandybridge"    = [                                                                                        "--disable-avx2" "--disable-fma" "--disable-fma4" ];
+    "ivybridge"      = [                                                                                        "--disable-avx2" "--disable-fma" "--disable-fma4" ];
+    "haswell"        = [                                                                                                                         "--disable-fma4" ];
+    "broadwell"      = [                                                                                                                         "--disable-fma4" ];
+    "skylake"        = [                                                                                                                         "--disable-fma4" ];
+    "skylake-avx512" = [                                                                                                                         "--disable-fma4" ];
+  }.${stdenv.hostPlatform.platform.gcc.arch or "default"};
 
   # On darwin, tests are linked to dylib in the nix store, so we need to make
   # sure tests run after installPhase.
diff --git a/pkgs/development/libraries/glib/default.nix b/pkgs/development/libraries/glib/default.nix
index 05a52dce0f9..95eaf37d5c7 100644
--- a/pkgs/development/libraries/glib/default.nix
+++ b/pkgs/development/libraries/glib/default.nix
@@ -46,7 +46,7 @@ let
   '';
 
   binPrograms = optional (!stdenv.isDarwin) "gapplication" ++ [ "gdbus" "gio" "gsettings" ];
-  version = "2.60.0";
+  version = "2.60.1";
 in
 
 stdenv.mkDerivation rec {
@@ -54,7 +54,7 @@ stdenv.mkDerivation rec {
 
   src = fetchurl {
     url = "mirror://gnome/sources/glib/${stdenv.lib.versions.majorMinor version}/${name}.tar.xz";
-    sha256 = "0ls3njqknb345ni5i8hn9nr1n70kn6s8bi0g6kcqj3c4js5mv1i0";
+    sha256 = "0q2mkdvp20v6dvrhik8k5j875kj29hcfz346xi0624n6spsq9y49";
   };
 
   patches = optional stdenv.isDarwin ./darwin-compilation.patch
diff --git a/pkgs/development/libraries/glibc/glibc-remove-datetime-from-nscd.patch b/pkgs/development/libraries/glibc/glibc-remove-datetime-from-nscd.patch
deleted file mode 100644
index db010e62366..00000000000
--- a/pkgs/development/libraries/glibc/glibc-remove-datetime-from-nscd.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/nscd/nscd_stat.c
-+++ b/nscd/nscd_stat.c
-@@ -37,7 +37,7 @@
- 
- 
- /* We use this to make sure the receiver is the same.  */
--static const char compilation[21] = __DATE__ " " __TIME__;
-+static const char compilation[] = "@out@";
- 
- /* Statistic data for one database.  */
- struct dbstat
diff --git a/pkgs/development/libraries/gnutls/3.5.10.nix b/pkgs/development/libraries/gnutls/3.5.10.nix
deleted file mode 100644
index a44e2b04ed7..00000000000
--- a/pkgs/development/libraries/gnutls/3.5.10.nix
+++ /dev/null
@@ -1,10 +0,0 @@
-{ callPackage, fetchurl, libunistring, ... } @ args:
-
-callPackage ./generic.nix (args // rec {
-  version = "3.5.10";
-
-  src = fetchurl {
-    url = "mirror://gnupg/gnutls/v3.5/gnutls-${version}.tar.xz";
-    sha256 = "17apwvdkkazh5w8z8mbanpj2yj8s2002qwy46wz4v3akpa33wi5g";
-  };
-})
diff --git a/pkgs/development/libraries/gnutls/3.6.nix b/pkgs/development/libraries/gnutls/3.6.nix
deleted file mode 100644
index b05624ee0b2..00000000000
--- a/pkgs/development/libraries/gnutls/3.6.nix
+++ /dev/null
@@ -1,22 +0,0 @@
-{ callPackage, fetchurl, ... } @ args:
-
-callPackage ./generic.nix (args // rec {
-  version = "3.6.7";
-
-  src = fetchurl {
-    url = "mirror://gnupg/gnutls/v3.6/gnutls-${version}.tar.xz";
-    sha256 = "1ql8l6l5bxks2pgpwb1602zc0j6ivhpy27hdfc49h8xgbanhjd2v";
-  };
-
-  # Skip some tests:
-  #  - pkgconfig: building against the result won't work before installing (3.5.11)
-  #  - fastopen: no idea; it broke between 3.6.2 and 3.6.3 (3437fdde6 in particular)
-  #  - trust-store: default trust store path (/etc/ssl/...) is missing in sandbox (3.5.11)
-  #  - psk-file: no idea; it broke between 3.6.3 and 3.6.4
-  # Change p11-kit test to use pkg-config to find p11-kit
-  postPatch = ''
-    sed '2iexit 77' -i tests/{pkgconfig,fastopen}.sh
-    sed '/^void doit(void)/,/^{/ s/{/{ exit(77);/' -i tests/{trust-store,psk-file}.c
-    sed 's:/usr/lib64/pkcs11/ /usr/lib/pkcs11/ /usr/lib/x86_64-linux-gnu/pkcs11/:`pkg-config --variable=p11_module_path p11-kit-1`:' -i tests/p11-kit-trust.sh
-  '';
-})
diff --git a/pkgs/development/libraries/gnutls/generic.nix b/pkgs/development/libraries/gnutls/default.nix
index 086c0560cc4..8a92390ca30 100644
--- a/pkgs/development/libraries/gnutls/generic.nix
+++ b/pkgs/development/libraries/gnutls/default.nix
@@ -1,33 +1,52 @@
-{ config, lib, stdenv, zlib, lzo, libtasn1, nettle, pkgconfig, lzip
-, perl, gmp, autogen, libidn, p11-kit, libiconv
+{ config, lib, stdenv, fetchurl, zlib, lzo, libtasn1, nettle, pkgconfig, lzip
+, perl, gmp, autoconf, autogen, automake, libidn, p11-kit, libiconv
+, unbound, dns-root-data, gettext
 , guileBindings ? config.gnutls.guile or false, guile
 , tpmSupport ? false, trousers, which, nettools, libunistring
-, unbound, dns-root-data, gettext
-
-# Version dependent args
-, version, src, patches ? [], postPatch ? "", nativeBuildInputs ? []
-, buildInputs ? []
-, ...}:
+, withSecurity ? false, Security  # darwin Security.framework
+}:
 
 assert guileBindings -> guile != null;
 let
+  version = "3.6.7";
+
   # XXX: Gnulib's `test-select' fails on FreeBSD:
   # http://hydra.nixos.org/build/2962084/nixlog/1/raw .
   doCheck = !stdenv.isFreeBSD && !stdenv.isDarwin && lib.versionAtLeast version "3.4"
       && stdenv.buildPlatform == stdenv.hostPlatform;
+
+  inherit (stdenv.hostPlatform) isDarwin;
 in
+
 stdenv.mkDerivation {
   name = "gnutls-${version}";
+  inherit version;
 
-  inherit src patches;
+  src = fetchurl {
+    url = "mirror://gnupg/gnutls/v3.6/gnutls-${version}.tar.xz";
+    sha256 = "1ql8l6l5bxks2pgpwb1602zc0j6ivhpy27hdfc49h8xgbanhjd2v";
+  };
 
   outputs = [ "bin" "dev" "out" "man" "devdoc" ];
   outputInfo = "devdoc";
 
+  patches = [ ./nix-ssl-cert-file.patch ]
+    # Disable native add_system_trust.
+    ++ lib.optional (isDarwin && !withSecurity) ./no-security-framework.patch;
+
+  # Skip some tests:
+  #  - pkgconfig: building against the result won't work before installing (3.5.11)
+  #  - fastopen: no idea; it broke between 3.6.2 and 3.6.3 (3437fdde6 in particular)
+  #  - trust-store: default trust store path (/etc/ssl/...) is missing in sandbox (3.5.11)
+  #  - psk-file: no idea; it broke between 3.6.3 and 3.6.4
+  # Change p11-kit test to use pkg-config to find p11-kit
   postPatch = lib.optionalString (lib.versionAtLeast version "3.4") ''
-    sed '2iecho "name constraints tests skipped due to datefudge problems"\nexit 0' \
-      -i tests/cert-tests/name-constraints
-  '' + postPatch;
+    sed '2iecho "name constraints tests skipped due to datefudge problems"\nexit 0' -i tests/cert-tests/name-constraints
+  '' + lib.optionalString (lib.versionAtLeast version "3.6") ''
+    sed '2iexit 77' -i tests/{pkgconfig,fastopen}.sh
+    sed '/^void doit(void)/,/^{/ s/{/{ exit(77);/' -i tests/{trust-store,psk-file}.c
+    sed 's:/usr/lib64/pkcs11/ /usr/lib/pkcs11/ /usr/lib/x86_64-linux-gnu/pkcs11/:`pkg-config --variable=p11_module_path p11-kit-1`:' -i tests/p11-kit-trust.sh
+  '';
 
   preConfigure = "patchShebangs .";
   configureFlags =
@@ -42,11 +61,12 @@ stdenv.mkDerivation {
   enableParallelBuilding = true;
 
   buildInputs = [ lzo lzip libtasn1 libidn p11-kit zlib gmp autogen libunistring unbound gettext libiconv ]
+    ++ lib.optional (isDarwin && withSecurity) Security
     ++ lib.optional (tpmSupport && stdenv.isLinux) trousers
-    ++ lib.optional guileBindings guile
-    ++ buildInputs;
+    ++ lib.optional guileBindings guile;
 
-  nativeBuildInputs = [ perl pkgconfig ] ++ nativeBuildInputs
+  nativeBuildInputs = [ perl pkgconfig ]
+    ++ lib.optionals (isDarwin && !withSecurity) [ autoconf automake ]
     ++ lib.optionals doCheck [ which nettools ];
 
   propagatedBuildInputs = [ nettle ];
@@ -54,7 +74,7 @@ stdenv.mkDerivation {
   inherit doCheck;
 
   # Fixup broken libtool and pkgconfig files
-  preFixup = lib.optionalString (!stdenv.isDarwin) ''
+  preFixup = lib.optionalString (!isDarwin) ''
     sed ${lib.optionalString tpmSupport "-e 's,-ltspi,-L${trousers}/lib -ltspi,'"} \
         -e 's,-lz,-L${zlib.out}/lib -lz,' \
         -e 's,-L${gmp.dev}/lib,-L${gmp.out}/lib,' \
diff --git a/pkgs/development/libraries/gnutls/nix-ssl-cert-file.patch b/pkgs/development/libraries/gnutls/nix-ssl-cert-file.patch
new file mode 100644
index 00000000000..90d1e85ee8c
--- /dev/null
+++ b/pkgs/development/libraries/gnutls/nix-ssl-cert-file.patch
@@ -0,0 +1,19 @@
+allow overriding system trust store location via $NIX_SSL_CERT_FILE
+
+diff --git a/lib/system/certs.c b/lib/system/certs.c
+index 611c645..6ef6edb 100644
+--- a/lib/system/certs.c
++++ b/lib/system/certs.c
+@@ -369,6 +369,11 @@ gnutls_x509_trust_list_add_system_trust(gnutls_x509_trust_list_t list,
+ 					unsigned int tl_flags,
+ 					unsigned int tl_vflags)
+ {
+-	return add_system_trust(list, tl_flags|GNUTLS_TL_NO_DUPLICATES, tl_vflags);
++	tl_flags = tl_flags|GNUTLS_TL_NO_DUPLICATES;
++	const char *file = secure_getenv("NIX_SSL_CERT_FILE");
++	return file
++		? gnutls_x509_trust_list_add_trust_file(
++			list, file, NULL/*CRL*/, GNUTLS_X509_FMT_PEM, tl_flags, tl_vflags)
++		: add_system_trust(list, tl_flags, tl_vflags);
+ }
+ 
diff --git a/pkgs/development/libraries/gnutls/no-security-framework.patch b/pkgs/development/libraries/gnutls/no-security-framework.patch
new file mode 100644
index 00000000000..7f5808e5053
--- /dev/null
+++ b/pkgs/development/libraries/gnutls/no-security-framework.patch
@@ -0,0 +1,126 @@
+commit 9bcdde1ab9cdff6a4471f9a926dd488ab70c7247
+Author: Daiderd Jordan <daiderd@gmail.com>
+Date:   Mon Apr 22 16:38:27 2019 +0200
+
+    Revert "gnutls_x509_trust_list_add_system_trust: Add macOS keychain support"
+    
+    This reverts commit c0eb46d3463cd21b3f822ac377ff37f067f66b8d.
+
+diff --git a/configure.ac b/configure.ac
+index 8ad597bfd..8d14f26cd 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -781,7 +781,7 @@ dnl auto detect https://lists.gnu.org/archive/html/help-gnutls/2012-05/msg00004.
+ AC_ARG_WITH([default-trust-store-file],
+   [AS_HELP_STRING([--with-default-trust-store-file=FILE],
+     [use the given file default trust store])], with_default_trust_store_file="$withval",
+-  [if test "$build" = "$host" && test x$with_default_trust_store_pkcs11 = x && test x$with_default_trust_store_dir = x && test x$have_macosx = x;then
++  [if test "$build" = "$host" && test x$with_default_trust_store_pkcs11 = x && test x$with_default_trust_store_dir = x;then
+   for i in \
+     /etc/ssl/ca-bundle.pem \
+     /etc/ssl/certs/ca-certificates.crt \
+diff --git a/lib/Makefile.am b/lib/Makefile.am
+index fe9cf63a2..745695f7e 100644
+--- a/lib/Makefile.am
++++ b/lib/Makefile.am
+@@ -203,10 +203,6 @@ if WINDOWS
+ thirdparty_libadd += -lcrypt32
+ endif
+ 
+-if MACOSX
+-libgnutls_la_LDFLAGS += -framework Security -framework CoreFoundation
+-endif
+-
+ libgnutls_la_LIBADD += $(thirdparty_libadd)
+ 
+ # C++ library
+diff --git a/lib/system/certs.c b/lib/system/certs.c
+index 611c645e0..912b0aa5e 100644
+--- a/lib/system/certs.c
++++ b/lib/system/certs.c
+@@ -44,12 +44,6 @@
+ # endif
+ #endif
+ 
+-#ifdef __APPLE__
+-# include <CoreFoundation/CoreFoundation.h>
+-# include <Security/Security.h>
+-# include <Availability.h>
+-#endif
+-
+ /* System specific function wrappers for certificate stores.
+  */
+ 
+@@ -276,72 +270,6 @@ int add_system_trust(gnutls_x509_trust_list_t list, unsigned int tl_flags,
+ 
+ 	return r;
+ }
+-#elif defined(__APPLE__) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
+-static
+-int osstatus_error(status)
+-{
+-	CFStringRef err_str = SecCopyErrorMessageString(status, NULL);
+-	_gnutls_debug_log("Error loading system root certificates: %s\n",
+-			  CFStringGetCStringPtr(err_str, kCFStringEncodingUTF8));
+-	CFRelease(err_str);
+-	return GNUTLS_E_FILE_ERROR;
+-}
+-
+-static
+-int add_system_trust(gnutls_x509_trust_list_t list, unsigned int tl_flags,
+-		     unsigned int tl_vflags)
+-{
+-	int r=0;
+-
+-	SecTrustSettingsDomain domain[] = { kSecTrustSettingsDomainUser,
+-					    kSecTrustSettingsDomainAdmin,
+-					    kSecTrustSettingsDomainSystem };
+-	for (size_t d=0; d<sizeof(domain)/sizeof(*domain); d++) {
+-		CFArrayRef certs = NULL;
+-		OSStatus status = SecTrustSettingsCopyCertificates(domain[d],
+-								   &certs);
+-		if (status == errSecNoTrustSettings)
+-			continue;
+-		if (status != errSecSuccess)
+-			return osstatus_error(status);
+-
+-		int cert_count = CFArrayGetCount(certs);
+-		for (int i=0; i<cert_count; i++) {
+-			SecCertificateRef cert =
+-				(void*)CFArrayGetValueAtIndex(certs, i);
+-			CFDataRef der;
+-			status = SecItemExport(cert, kSecFormatX509Cert, 0,
+-					       NULL, &der);
+-			if (status != errSecSuccess) {
+-				CFRelease(der);
+-				CFRelease(certs);
+-				return osstatus_error(status);
+-			}
+-
+-			if (gnutls_x509_trust_list_add_trust_mem(list,
+-								 &(gnutls_datum_t) {
+-									.data = (void*)CFDataGetBytePtr(der),
+-									.size = CFDataGetLength(der),
+-								 },
+-								 NULL,
+-			                                         GNUTLS_X509_FMT_DER,
+-								 tl_flags,
+-								 tl_vflags) > 0)
+-				r++;
+-			CFRelease(der);
+-		}
+-		CFRelease(certs);
+-	}
+-
+-#ifdef DEFAULT_BLACKLIST_FILE
+-	ret = gnutls_x509_trust_list_remove_trust_file(list, DEFAULT_BLACKLIST_FILE, GNUTLS_X509_FMT_PEM);
+-	if (ret < 0) {
+-		_gnutls_debug_log("Could not load blacklist file '%s'\n", DEFAULT_BLACKLIST_FILE);
+-	}
+-#endif
+-
+-	return r;
+-}
+ #else
+ 
+ #define add_system_trust(x,y,z) GNUTLS_E_UNIMPLEMENTED_FEATURE
diff --git a/pkgs/development/libraries/gobject-introspection/absolute_shlib_path.patch b/pkgs/development/libraries/gobject-introspection/absolute_shlib_path.patch
index e2525d833f8..6e56d3fab41 100644
--- a/pkgs/development/libraries/gobject-introspection/absolute_shlib_path.patch
+++ b/pkgs/development/libraries/gobject-introspection/absolute_shlib_path.patch
@@ -1,6 +1,6 @@
 --- a/giscanner/scannermain.py
 +++ b/giscanner/scannermain.py
-@@ -101,6 +101,39 @@
+@@ -95,6 +95,39 @@ def get_windows_option_group(parser):
      return group
  
  
@@ -40,7 +40,7 @@
  def _get_option_parser():
      parser = optparse.OptionParser('%prog [options] sources',
                                     version='%prog ' + giscanner.__version__)
-@@ -211,6 +244,10 @@
+@@ -205,6 +238,10 @@ match the namespace prefix.""")
      parser.add_option("", "--filelist",
                        action="store", dest="filelist", default=[],
                        help="file containing headers and sources to be scanned")
@@ -53,7 +53,7 @@
      parser.add_option_group(group)
 --- a/giscanner/shlibs.py
 +++ b/giscanner/shlibs.py
-@@ -62,6 +62,12 @@
+@@ -57,6 +57,12 @@ def _ldd_library_pattern(library_name):
      $""" % re.escape(library_name), re.VERBOSE)
  
  
@@ -66,21 +66,33 @@
  # This is a what we do for non-la files. We assume that we are on an
  # ELF-like system where ldd exists and the soname extracted with ldd is
  # a filename that can be opened with dlopen().
-@@ -110,17 +116,16 @@ def _resolve_non_libtool(options, binary, libraries):
-         if isinstance(output, bytes):
+@@ -106,7 +112,8 @@ def _resolve_non_libtool(options, binary, libraries):
              output = output.decode("utf-8", "replace")
  
--        # Use absolute paths on OS X to conform to how libraries are usually
--        # referenced on OS X systems, and file names everywhere else.
--        basename = platform.system() != 'Darwin'
--        return resolve_from_ldd_output(libraries, output, basename=basename)
-+        # Never strip away absolute paths in Nix
-+        basename = False
-+        return resolve_from_ldd_output(libraries, output, basename=basename, fallback_libpath=options.fallback_libpath)
+         shlibs = resolve_from_ldd_output(libraries, output)
+-        return list(map(sanitize_shlib_path, shlibs))
++        fallback_libpath = options.fallback_libpath or "";
++        return list(map(lambda p: os.path.join(fallback_libpath, p), map(sanitize_shlib_path, shlibs)))
  
  
--def resolve_from_ldd_output(libraries, output, basename=False):
-+def resolve_from_ldd_output(libraries, output, basename=False, fallback_libpath=""):
+ def sanitize_shlib_path(lib):
+@@ -115,19 +122,18 @@ def sanitize_shlib_path(lib):
+     # In case we get relative paths on macOS (like @rpath) then we fall
+     # back to the basename as well:
+     # https://gitlab.gnome.org/GNOME/gobject-introspection/issues/222
+-    if sys.platform == "darwin":
+-        if not os.path.isabs(lib):
+-            return os.path.basename(lib)
+-        return lib
+-    else:
++
++    # Always use absolute paths if available
++    if not os.path.isabs(lib):
+         return os.path.basename(lib)
++    return lib
+ 
+ 
+ def resolve_from_ldd_output(libraries, output):
      patterns = {}
      for library in libraries:
          if not os.path.isfile(library):
@@ -89,7 +101,7 @@
      if len(patterns) == 0:
          return []
  
-@@ -129,11 +134,14 @@ def resolve_from_ldd_output(libraries, output, basename=False):
+@@ -139,8 +145,11 @@ def resolve_from_ldd_output(libraries, output):
          if line.endswith(':'):
              continue
          for word in line.split():
@@ -102,14 +114,10 @@
 +                    m = pattern.match(word)
                  if m:
                      del patterns[library]
--                    shlibs.append(_sanitize_install_name(m.group()))
-+                    shlibs.append(os.path.join(fallback_libpath, _sanitize_install_name(m.group())))
-                     break
- 
-     if len(patterns) > 0:
+                     shlibs.append(m.group())
 --- a/giscanner/utils.py
 +++ b/giscanner/utils.py
-@@ -116,17 +116,11 @@
+@@ -111,17 +111,11 @@ def extract_libtool_shlib(la_file):
      if dlname is None:
          return None
  
diff --git a/pkgs/development/libraries/gobject-introspection/default.nix b/pkgs/development/libraries/gobject-introspection/default.nix
index e6978d0955f..26c472930ed 100644
--- a/pkgs/development/libraries/gobject-introspection/default.nix
+++ b/pkgs/development/libraries/gobject-introspection/default.nix
@@ -9,7 +9,7 @@
 
 let
   pname = "gobject-introspection";
-  version = "1.60.0";
+  version = "1.60.1";
 in
 with stdenv.lib;
 stdenv.mkDerivation rec {
@@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
 
   src = fetchurl {
     url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${name}.tar.xz";
-    sha256 = "0pgk9lcvz3i79m6g2ynlp00ghws7g0p0d5qyf0k72warrf841zly";
+    sha256 = "1cr4r3lh5alrks9q2ycs1kn2crnkhrhn2wrmibng6dndkr4x2i6q";
   };
 
   outputs = [ "out" "dev" "man" ];
@@ -40,7 +40,6 @@ stdenv.mkDerivation rec {
   setupHook = ./setup-hook.sh;
 
   patches = [
-    ./macos-shared-library.patch
     (substituteAll {
       src = ./test_shlibs.patch;
       inherit nixStoreDir;
diff --git a/pkgs/development/libraries/gobject-introspection/macos-shared-library.patch b/pkgs/development/libraries/gobject-introspection/macos-shared-library.patch
deleted file mode 100644
index 9941878c427..00000000000
--- a/pkgs/development/libraries/gobject-introspection/macos-shared-library.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-diff --git a/giscanner/shlibs.py b/giscanner/shlibs.py
-index c93d20c..4d4915d 100644
---- a/giscanner/shlibs.py
-+++ b/giscanner/shlibs.py
-@@ -43,6 +43,22 @@ def _resolve_libtool(options, binary, libraries):
- 
-     return shlibs
- 
-+def _sanitize_install_name(install_name):
-+    '''
-+    On macOS, the dylib can be built with install_name as @rpath/libfoo.so
-+    instead of the absolute path to the library, so handle that. The name
-+    can also be @loader_path or @executable_path.
-+    '''
-+    if not install_name.startswith('@'):
-+        return install_name
-+    if install_name.startswith('@rpath/'):
-+        return install_name[7:]
-+    if install_name.startswith('@loader_path/'):
-+        return install_name[13:]
-+    if install_name.startswith('@executable_path/'):
-+        return install_name[17:]
-+    raise RuntimeError('Unknown install_name {!r}'.format(install_name))
-+
- 
- # Assume ldd output is something vaguely like
- #
-@@ -136,7 +152,7 @@ def resolve_from_ldd_output(libraries, output, basename=False):
-                 m = pattern.match(word)
-                 if m:
-                     del patterns[library]
--                    shlibs.append(m.group())
-+                    shlibs.append(_sanitize_install_name(m.group()))
-                     break
- 
-     if len(patterns) > 0:
diff --git a/pkgs/development/libraries/gobject-introspection/test_shlibs.patch b/pkgs/development/libraries/gobject-introspection/test_shlibs.patch
index c3152982d19..65b5a1a13b9 100644
--- a/pkgs/development/libraries/gobject-introspection/test_shlibs.patch
+++ b/pkgs/development/libraries/gobject-introspection/test_shlibs.patch
@@ -1,6 +1,6 @@
 --- a/tests/scanner/test_shlibs.py
 +++ b/tests/scanner/test_shlibs.py
-@@ -10,6 +10,46 @@ from giscanner.shlibs import resolve_from_ldd_output
+@@ -7,6 +7,30 @@ from giscanner.shlibs import resolve_from_ldd_output, sanitize_shlib_path
  
  class TestLddParser(unittest.TestCase):
  
@@ -26,25 +26,18 @@
 +        self.assertEqual(
 +            ['@nixStoreDir@/gmrf09y7sfxrr0mcx90dba7w41jj2kzk-glib-2.58.1/lib/libglib-2.0.so.0',
 +             '@nixStoreDir@/gmrf09y7sfxrr0mcx90dba7w41jj2kzk-glib-2.58.1/lib/libgio-2.0.so.0'],
-+            resolve_from_ldd_output(libraries, output, basename=False))
-+
-+    def test_resolve_from_ldd_output_macos(self):
-+        output = '''\
-+            @rpath/libatk-1.0.0.dylib
-+            @rpath/libgstreamer-1.0.0.dylib (compatibility version 0.0.0, current version 0.0.0)
-+            /Volumes/USB_SSD/cerbero/build/dist/darwin_x86_64/lib/libglib-2.0.0.dylib (compatibility version 0.0.0, current version 0.0.0)
-+            /Volumes/USB_SSD/cerbero/build/dist/darwin_x86_64/lib/libintl.dylib (compatibility version 0.0.0, current version 0.0.0)
-+            /Volumes/USB_SSD/cerbero/build/dist/darwin_x86_64/lib/libgobject-2.0.0.dylib (compatibility version 0.0.0, current version 0.0.0)
-+            /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.50.4)
-+        '''
-+        libraries = ['atk-1.0']
-+        fallback_libpath = '@nixStoreDir@/1ynd5b01z87c1nw75k5iy7sq49hpkw53-atk-2.30.0/lib'
-+
-+        self.assertEqual(
-+            [ '%s/libatk-1.0.0.dylib' % fallback_libpath ],
-+            resolve_from_ldd_output(libraries, output, basename=False, fallback_libpath=fallback_libpath))
++            resolve_from_ldd_output(libraries, output))
 +
      def test_resolve_from_ldd_output(self):
          output = '''\
              libglib-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007fbe12d68000)
-
+@@ -40,7 +64,8 @@ class TestLddParser(unittest.TestCase):
+ 
+         self.assertEqual(
+             sanitize_shlib_path('/foo/bar'),
+-            '/foo/bar' if sys.platform == 'darwin' else 'bar')
++            # NixOS always want the absolute path
++            '/foo/bar')
+ 
+     def test_unresolved_library(self):
+         output = ''
diff --git a/pkgs/development/libraries/gpgme/gpgme_libsuffix.patch b/pkgs/development/libraries/gpgme/gpgme_libsuffix.patch
deleted file mode 100644
index 4abc2757cf6..00000000000
--- a/pkgs/development/libraries/gpgme/gpgme_libsuffix.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/lang/cpp/src/GpgmeppConfig.cmake.in.in b/lang/cpp/src/GpgmeppConfig.cmake.in.in
-index 928d19f..cbe9713 100644 (file)
---- a/lang/cpp/src/GpgmeppConfig.cmake.in.in
-+++ b/lang/cpp/src/GpgmeppConfig.cmake.in.in
-@@ -63,7 +63,7 @@ add_library(Gpgmepp SHARED IMPORTED)
- 
- set_target_properties(Gpgmepp PROPERTIES
-   INTERFACE_INCLUDE_DIRECTORIES "@resolved_includedir@/gpgme++;@resolved_includedir@"
--  INTERFACE_LINK_LIBRARIES "pthread;@resolved_libdir@/libgpgme@libsuffix@;@LIBASSUAN_LIBS@"
-+  INTERFACE_LINK_LIBRARIES "pthread;@resolved_libdir@/libgpgme.so;@LIBASSUAN_LIBS@"
-   IMPORTED_LOCATION "@resolved_libdir@/libgpgmepp.so"
- )
diff --git a/pkgs/development/libraries/gsl/default.nix b/pkgs/development/libraries/gsl/default.nix
index 9fd3f8a7a99..c8846509d00 100644
--- a/pkgs/development/libraries/gsl/default.nix
+++ b/pkgs/development/libraries/gsl/default.nix
@@ -8,10 +8,8 @@ stdenv.mkDerivation rec {
     sha256 = "1395y9hlhqadn5g9j8q22224fds5sd92jxi9czfavjj24myasq04";
   };
 
-  patches = [
-    # ToDo: there might be more impurities than FMA support check
-    ./disable-fma.patch # https://lists.gnu.org/archive/html/bug-gsl/2011-11/msg00019.html
-  ];
+  # do not let -march=skylake to enable FMA (https://lists.gnu.org/archive/html/bug-gsl/2011-11/msg00019.html)
+  NIX_CFLAGS_COMPILE = stdenv.lib.optional stdenv.isx86_64 "-mno-fma";
 
   # https://lists.gnu.org/archive/html/bug-gsl/2015-11/msg00012.html
   doCheck = stdenv.hostPlatform.system != "i686-linux" && stdenv.hostPlatform.system != "aarch64-linux";
diff --git a/pkgs/development/libraries/gsl/disable-fma.patch b/pkgs/development/libraries/gsl/disable-fma.patch
deleted file mode 100644
index bb1eda9cccc..00000000000
--- a/pkgs/development/libraries/gsl/disable-fma.patch
+++ /dev/null
@@ -1,32 +0,0 @@
---- a/configure.ac        2011-09-22 16:13:22 +0000
-+++ b/configure.ac        2011-11-26 23:55:24 +0000
-@@ -381,6 +381,28 @@
- AC_SUBST(HAVE_DARWIN_IEEE_INTERFACE)
- AC_SUBST(HAVE_DARWIN86_IEEE_INTERFACE)
- 
-+dnl check for compiler flags to disable use of FMA
-+save_cflags="$CFLAGS"
-+AC_CACHE_CHECK([for compiler flags to disable use of FMA], ac_cv_c_fma_flags,
-+[
-+if test X"$GCC" = Xyes; then
-+    fma_flags='-ffp-contract=off'
-+else
-+    fma_flags=
-+fi
-+if test X"$fma_flags" != X; then
-+  CFLAGS="$fma_flags $CFLAGS"
-+  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[int foo;]])],[ac_cv_c_fma_flags="$fma_flags"],[ac_cv_c_fma_flags="none"])
-+else
-+  ac_cv_c_fma_flags="none"
-+fi])
-+
-+if test "$ac_cv_c_fma_flags" != "none" ; then
-+   CFLAGS="$ac_cv_c_fma_flags $save_cflags"
-+else
-+   CFLAGS="$save_cflags"
-+fi
-+
- dnl Check for IEEE control flags
- 
- save_cflags="$CFLAGS"
-
diff --git a/pkgs/development/libraries/gsl/gsl-1_16.nix b/pkgs/development/libraries/gsl/gsl-1_16.nix
index 69fe1b0db55..e5772c8772e 100644
--- a/pkgs/development/libraries/gsl/gsl-1_16.nix
+++ b/pkgs/development/libraries/gsl/gsl-1_16.nix
@@ -8,9 +8,10 @@ stdenv.mkDerivation rec {
     sha256 = "0lrgipi0z6559jqh82yx8n4xgnxkhzj46v96dl77hahdp58jzg3k";
   };
 
+  # do not let -march=skylake to enable FMA (https://lists.gnu.org/archive/html/bug-gsl/2011-11/msg00019.html)
+  NIX_CFLAGS_COMPILE = stdenv.lib.optional stdenv.isx86_64 "-mno-fma";
+
   patches = [
-    # ToDo: there might be more impurities than FMA support check
-    ./disable-fma.patch # https://lists.gnu.org/archive/html/bug-gsl/2011-11/msg00019.html
     (fetchpatch {
       name = "bug-39055.patch";
       url = "https://git.savannah.gnu.org/cgit/gsl.git/patch/?id=9cc12d";
diff --git a/pkgs/development/libraries/gtksourceview/3.x.nix b/pkgs/development/libraries/gtksourceview/3.x.nix
index 0f72afe4cc1..9d1751afaf9 100644
--- a/pkgs/development/libraries/gtksourceview/3.x.nix
+++ b/pkgs/development/libraries/gtksourceview/3.x.nix
@@ -3,11 +3,11 @@
 
 stdenv.mkDerivation rec {
   name = "gtksourceview-${version}";
-  version = "3.24.10";
+  version = "3.24.11";
 
   src = fetchurl {
     url = "mirror://gnome/sources/gtksourceview/${stdenv.lib.versions.majorMinor version}/${name}.tar.xz";
-    sha256 = "16ym7jwiki4s1pilwr4incx0yg7ll94f1cajrnpndkxxs36hcm5b";
+    sha256 = "1zbpj283b5ycz767hqz5kdq02wzsga65pp4fykvhg8xj6x50f6v9";
   };
 
   propagatedBuildInputs = [
diff --git a/pkgs/development/libraries/herqq/gcc6.patch b/pkgs/development/libraries/herqq/gcc6.patch
deleted file mode 100644
index b0f7d8d0c6f..00000000000
--- a/pkgs/development/libraries/herqq/gcc6.patch
+++ /dev/null
@@ -1,1320 +0,0 @@
-diff --git c/herqq/apps/simple_avtest-app/mediamanager_dialog.cpp i/herqq/apps/simple_avtest-app/mediamanager_dialog.cpp
-index c4d2ebe..707dbdb 100644
---- c/herqq/apps/simple_avtest-app/mediamanager_dialog.cpp
-+++ i/herqq/apps/simple_avtest-app/mediamanager_dialog.cpp
-@@ -306,7 +306,7 @@ void MediaManagerDialog::avTransportStateChanged(
- {
-     foreach(const HAvtLastChangeInfo& info, infos)
-     {
--        if (info.propertyName().compare("TransportState", Qt::CaseInsensitive) == 0)
-+        if (info.propertyName().compare(QString("TransportState"), Qt::CaseInsensitive) == 0)
-         {
-             HTransportState state(info.value().toString());
-             if (state.isValid())
-diff --git c/herqq/hupnp/src/dataelements/hproduct_tokens.cpp i/herqq/hupnp/src/dataelements/hproduct_tokens.cpp
-index 40f9fda..6739a58 100644
---- c/herqq/hupnp/src/dataelements/hproduct_tokens.cpp
-+++ i/herqq/hupnp/src/dataelements/hproduct_tokens.cpp
-@@ -99,7 +99,7 @@ bool HProductToken::isValidUpnpToken() const
- {
-     QString vrs = version();
- 
--    return (m_token.compare("upnp", Qt::CaseInsensitive) == 0) &&
-+    return (m_token.compare(QString("upnp"), Qt::CaseInsensitive) == 0) &&
-            (vrs.size() == 3    &&
-            (vrs[0]     == '1') &&
-             vrs[1]     == '.'  &&
-@@ -110,7 +110,7 @@ bool HProductToken::isValidDlnaDocToken() const
- {
-     QString vrs = version();
- 
--    bool b = m_token.compare("DLNADOC", Qt::CaseInsensitive) == 0 &&
-+    bool b = m_token.compare(QString("DLNADOC"), Qt::CaseInsensitive) == 0 &&
-              vrs.size() >= 3 &&
-              vrs[0] == '1' &&
-              vrs[1] == '.';
-diff --git c/herqq/hupnp/src/dataelements/hresourcetype.cpp i/herqq/hupnp/src/dataelements/hresourcetype.cpp
-index 8ed2492..94ab1e0 100644
---- c/herqq/hupnp/src/dataelements/hresourcetype.cpp
-+++ i/herqq/hupnp/src/dataelements/hresourcetype.cpp
-@@ -56,7 +56,7 @@ HResourceType::HResourceType(const QString& resourceTypeAsStr) :
-     {
-         return;
-     }
--    if (tmp[1].compare("schemas-upnp-org") != 0)
-+    if (tmp[1].compare(QString("schemas-upnp-org")) != 0)
-     {
-         flags = 0x01;
-         tmp[1] = tmp[1].replace('.', '-');
-@@ -67,11 +67,11 @@ HResourceType::HResourceType(const QString& resourceTypeAsStr) :
-     }
- 
-     tmp[2] = tmp[2].simplified();
--    if (tmp[2].compare("device") == 0)
-+    if (tmp[2].compare(QString("device")) == 0)
-     {
-         flags |= 0x04;
-     }
--    else if (tmp[2].compare("service") == 0)
-+    else if (tmp[2].compare(QString("service")) == 0)
-     {
-         flags |= 0x08;
-     }
-diff --git c/herqq/hupnp/src/dataelements/hserviceid.cpp i/herqq/hupnp/src/dataelements/hserviceid.cpp
-index 9b0fad6..11a8640 100644
---- c/herqq/hupnp/src/dataelements/hserviceid.cpp
-+++ i/herqq/hupnp/src/dataelements/hserviceid.cpp
-@@ -64,7 +64,7 @@ public:
-             return;
-         }
- 
--        if (tmp[0].compare("urn", Qt::CaseInsensitive) != 0)
-+        if (tmp[0].compare(QString("urn"), Qt::CaseInsensitive) != 0)
-         {
-             HLOG_WARN_NONSTD(
-                 QString("Invalid service identifier [%1]").arg(arg));
-@@ -72,7 +72,7 @@ public:
-             return;
-         }
- 
--        if (tmp[1].compare("upnp-org", Qt::CaseInsensitive) != 0)
-+        if (tmp[1].compare(QString("upnp-org"), Qt::CaseInsensitive) != 0)
-         {
-             tmp[1] = tmp[1].replace('.', '-');
-             if (tmp[1].isEmpty())
-@@ -85,7 +85,7 @@ public:
-         }
- 
-         bool warned = false;
--        if (tmp[2].compare("serviceId", Qt::CaseInsensitive) != 0)
-+        if (tmp[2].compare(QString("serviceId"), Qt::CaseInsensitive) != 0)
-         {
-             HLOG_WARN_NONSTD(QString("Invalid service identifier [%1]").arg(arg));
-             warned = true;
-diff --git c/herqq/hupnp/src/devicehosting/hddoc_parser_p.cpp i/herqq/hupnp/src/devicehosting/hddoc_parser_p.cpp
-index b3a58fa..d1853e1 100644
---- c/herqq/hupnp/src/devicehosting/hddoc_parser_p.cpp
-+++ i/herqq/hupnp/src/devicehosting/hddoc_parser_p.cpp
-@@ -195,7 +195,7 @@ bool HDocParser::parseActionArguments(
-         }
- 
-         HActionArgument createdArg;
--        if (dirStr.compare("out", Qt::CaseInsensitive) == 0)
-+        if (dirStr.compare(QString("out"), Qt::CaseInsensitive) == 0)
-         {
-             if (retValWasDefined)
-             {
-@@ -228,7 +228,7 @@ bool HDocParser::parseActionArguments(
- 
-             outArgs->push_back(createdArg);
-         }
--        else if (dirStr.compare("in", Qt::CaseInsensitive) == 0)
-+        else if (dirStr.compare(QString("in"), Qt::CaseInsensitive) == 0)
-         {
-             if (firstOutArgFound)
-             {
-@@ -677,11 +677,11 @@ bool HDocParser::parseStateVariable(
- 
-     QString strSendEvents = stateVariableElement.attribute("sendEvents", "no");
-     bool bSendEvents      = false;
--    if (strSendEvents.compare("yes", Qt::CaseInsensitive) == 0)
-+    if (strSendEvents.compare(QString("yes"), Qt::CaseInsensitive) == 0)
-     {
-         bSendEvents = true;
-     }
--    else if (strSendEvents.compare("no", Qt::CaseInsensitive) != 0)
-+    else if (strSendEvents.compare(QString("no"), Qt::CaseInsensitive) != 0)
-     {
-         m_lastError = InvalidServiceDescriptionError;
-         m_lastErrorDescription = QString(
-@@ -694,11 +694,11 @@ bool HDocParser::parseStateVariable(
- 
-     QString strMulticast  = stateVariableElement.attribute("multicast", "no");
-     bool bMulticast       = false;
--    if (strMulticast.compare("yes", Qt::CaseInsensitive) == 0)
-+    if (strMulticast.compare(QString("yes"), Qt::CaseInsensitive) == 0)
-     {
-         bMulticast = true;
-     }
--    else if (strMulticast.compare("no", Qt::CaseInsensitive) != 0)
-+    else if (strMulticast.compare(QString("no"), Qt::CaseInsensitive) != 0)
-     {
-         m_lastError = InvalidServiceDescriptionError;
-         m_lastErrorDescription = QString(
-diff --git c/herqq/hupnp/src/devicehosting/messages/hevent_messages_p.cpp i/herqq/hupnp/src/devicehosting/messages/hevent_messages_p.cpp
-index 2e375a0..2d6a8cc 100644
---- c/herqq/hupnp/src/devicehosting/messages/hevent_messages_p.cpp
-+++ i/herqq/hupnp/src/devicehosting/messages/hevent_messages_p.cpp
-@@ -197,7 +197,7 @@ HSubscribeRequest::RetVal HSubscribeRequest::setContents(
- 
-     // this appears to be an initial subscription
- 
--    if (nt.simplified().compare("upnp:event", Qt::CaseInsensitive) != 0)
-+    if (nt.simplified().compare(QString("upnp:event"), Qt::CaseInsensitive) != 0)
-     {
-         return PreConditionFailed;
-     }
-diff --git c/herqq/hupnp/src/devicehosting/messages/hnt_p.cpp i/herqq/hupnp/src/devicehosting/messages/hnt_p.cpp
-index aacdfcf..b618ba7 100644
---- c/herqq/hupnp/src/devicehosting/messages/hnt_p.cpp
-+++ i/herqq/hupnp/src/devicehosting/messages/hnt_p.cpp
-@@ -37,7 +37,7 @@ HNt::HNt(const QString& type) :
-     m_typeValue(qMakePair(Type_Undefined, QString(""))),

-     m_subTypeValue(qMakePair(SubType_Undefined, QString("")))

- {

--    if (type.compare("upnp:event", Qt::CaseInsensitive) == 0)

-+    if (type.compare(QString("upnp:event"), Qt::CaseInsensitive) == 0)

-     {

-         m_typeValue.first  = Type_UpnpEvent;

-         m_typeValue.second = "upnp:event";

-@@ -48,13 +48,13 @@ HNt::HNt(const QString& type, const QString& subtype) :
-     m_typeValue(qMakePair(Type_Undefined, QString(""))),

-     m_subTypeValue(qMakePair(SubType_Undefined, QString("")))

- {

--    if (type.compare("upnp:event", Qt::CaseInsensitive) == 0)

-+    if (type.compare(QString("upnp:event"), Qt::CaseInsensitive) == 0)

-     {

-         m_typeValue.first  = Type_UpnpEvent;

-         m_typeValue.second = "upnp:event";

-     }

- 

--    if (subtype.compare("upnp:propchange", Qt::CaseInsensitive) == 0)

-+    if (subtype.compare(QString("upnp:propchange"), Qt::CaseInsensitive) == 0)

-     {

-         m_subTypeValue.first  = SubType_UpnpPropChange;

-         m_subTypeValue.second = "upnp:propchange";

-diff --git c/herqq/hupnp/src/devicehosting/messages/htimeout_p.cpp i/herqq/hupnp/src/devicehosting/messages/htimeout_p.cpp
-index 0faf7f4..addbaaf 100644
---- c/herqq/hupnp/src/devicehosting/messages/htimeout_p.cpp
-+++ i/herqq/hupnp/src/devicehosting/messages/htimeout_p.cpp
-@@ -43,7 +43,7 @@ HTimeout::HTimeout(const QString& timeout) :
-     m_value(-1)

- {

-     QString tmp(timeout.simplified());

--    if (tmp.compare("infinite", Qt::CaseInsensitive) != 0)

-+    if (tmp.compare(QString("infinite"), Qt::CaseInsensitive) != 0)

-     {

-         if (tmp.startsWith("Second-", Qt::CaseInsensitive))

-         {

-diff --git c/herqq/hupnp/src/general/hupnp_datatypes.cpp i/herqq/hupnp/src/general/hupnp_datatypes.cpp
-index 9f2084f..ae8e9ae 100644
---- c/herqq/hupnp/src/general/hupnp_datatypes.cpp
-+++ i/herqq/hupnp/src/general/hupnp_datatypes.cpp
-@@ -424,15 +424,15 @@ QVariant HUpnpDataTypes::convertToRightVariantType(
- 

-     case HUpnpDataTypes::boolean:

-     {

--        if (value.compare("true", Qt::CaseInsensitive) == 0 ||

--            value.compare("yes", Qt::CaseInsensitive) == 0 ||

--            value.compare("1") == 0)

-+        if (value.compare(QString("true"), Qt::CaseInsensitive) == 0 ||

-+            value.compare(QString("yes"), Qt::CaseInsensitive) == 0 ||

-+            value.compare(QString("1")) == 0)

-         {

-             retVal = true;

-         }

--        else if (value.compare("false", Qt::CaseInsensitive) == 0 ||

--            value.compare("no", Qt::CaseInsensitive) == 0 ||

--            value.compare("0") == 0)

-+        else if (value.compare(QString("false"), Qt::CaseInsensitive) == 0 ||

-+            value.compare(QString("no"), Qt::CaseInsensitive) == 0 ||

-+            value.compare(QString("0")) == 0)

-         {

-             retVal = false;

-         }

-diff --git c/herqq/hupnp/src/http/hhttp_server_p.cpp i/herqq/hupnp/src/http/hhttp_server_p.cpp
-index eb1a56c..42e93ca 100644
---- c/herqq/hupnp/src/http/hhttp_server_p.cpp
-+++ i/herqq/hupnp/src/http/hhttp_server_p.cpp
-@@ -121,27 +121,27 @@ void HHttpServer::processRequest(HHttpAsyncOperation* op)
-     mi->setKeepAlive(HHttpUtils::keepAlive(*hdr));
- 
-     QString method = hdr->method();
--    if (method.compare("GET", Qt::CaseInsensitive) == 0)
-+    if (method.compare(QString("GET"), Qt::CaseInsensitive) == 0)
-     {
-         processGet(op->takeMessagingInfo(), *hdr);
-     }
--    else if (method.compare("HEAD"), Qt::CaseInsensitive)
-+    else if (method.compare(QString("HEAD")), Qt::CaseInsensitive)
-     {
-         processHead(op->takeMessagingInfo(), *hdr);
-     }
--    else if (method.compare("POST", Qt::CaseInsensitive) == 0)
-+    else if (method.compare(QString("POST"), Qt::CaseInsensitive) == 0)
-     {
-         processPost(op->takeMessagingInfo(), *hdr, op->dataRead());
-     }
--    else if (method.compare("NOTIFY", Qt::CaseInsensitive) == 0)
-+    else if (method.compare(QString("NOTIFY"), Qt::CaseInsensitive) == 0)
-     {
-         processNotifyMessage(op->takeMessagingInfo(), *hdr, op->dataRead());
-     }
--    else if (method.compare("SUBSCRIBE", Qt::CaseInsensitive) == 0)
-+    else if (method.compare(QString("SUBSCRIBE"), Qt::CaseInsensitive) == 0)
-     {
-         processSubscription(op->takeMessagingInfo(), *hdr);
-     }
--    else if (method.compare("UNSUBSCRIBE", Qt::CaseInsensitive) == 0)
-+    else if (method.compare(QString("UNSUBSCRIBE"), Qt::CaseInsensitive) == 0)
-     {
-         processUnsubscription(op->takeMessagingInfo(), *hdr);
-     }
-diff --git c/herqq/hupnp/src/http/hhttp_utils_p.h i/herqq/hupnp/src/http/hhttp_utils_p.h
-index 7285190..b3ee62e 100644
---- c/herqq/hupnp/src/http/hhttp_utils_p.h
-+++ i/herqq/hupnp/src/http/hhttp_utils_p.h
-@@ -64,10 +64,10 @@ public:
-         QString connection = hdr.value("CONNECTION");

-         if (hdr.minorVersion() == 1)

-         {

--            return connection.compare("close", Qt::CaseInsensitive) != 0;

-+            return connection.compare(QString("close"), Qt::CaseInsensitive) != 0;

-         }

- 

--        return connection.compare("Keep-Alive", Qt::CaseInsensitive) == 0;

-+        return connection.compare(QString("Keep-Alive"), Qt::CaseInsensitive) == 0;

-     }

- 

-     // returns the URLs as a string inside brackets. This is the format used in

-diff --git c/herqq/hupnp/src/utils/hmisc_utils_p.cpp i/herqq/hupnp/src/utils/hmisc_utils_p.cpp
-index 6641d14..7ea567a 100644
---- c/herqq/hupnp/src/utils/hmisc_utils_p.cpp
-+++ i/herqq/hupnp/src/utils/hmisc_utils_p.cpp
-@@ -70,10 +70,10 @@ bool toBool(const QString& arg, bool* ok)
-     bool retVal = false, match = true;

-     if (arg == "1") { retVal = true; }

-     else if (arg == "0") { retVal = false; }

--    else if (arg.compare("true", Qt::CaseInsensitive) == 0) { retVal = true; }

--    else if (arg.compare("false", Qt::CaseInsensitive) == 0) { retVal =  false; }

--    else if (arg.compare("yes", Qt::CaseInsensitive) == 0) { retVal = true; }

--    else if (arg.compare("no", Qt::CaseInsensitive) == 0) { retVal = false; }

-+    else if (arg.compare(QString("true"), Qt::CaseInsensitive) == 0) { retVal = true; }

-+    else if (arg.compare(QString("false"), Qt::CaseInsensitive) == 0) { retVal =  false; }

-+    else if (arg.compare(QString("yes"), Qt::CaseInsensitive) == 0) { retVal = true; }

-+    else if (arg.compare(QString("no"), Qt::CaseInsensitive) == 0) { retVal = false; }

-     else { match = false; }

- 

-     if (ok) { *ok = match; }

-diff --git c/herqq/hupnp_av/src/cds_model/cds_objects/hobject.cpp i/herqq/hupnp_av/src/cds_model/cds_objects/hobject.cpp
-index 6531929..8bd05c5 100644
---- c/herqq/hupnp_av/src/cds_model/cds_objects/hobject.cpp
-+++ i/herqq/hupnp_av/src/cds_model/cds_objects/hobject.cpp
-@@ -680,15 +680,15 @@ QString HObject::writeStatusToString(WriteStatus status)
- HObject::WriteStatus HObject::writeStatusFromString(const QString& status)
- {
-     WriteStatus retVal = UnknownWriteStatus;
--    if (status.compare("writable", Qt::CaseInsensitive) == 0)
-+    if (status.compare(QString("writable"), Qt::CaseInsensitive) == 0)
-     {
-         retVal = WritableWriteStatus;
-     }
--    else if (status.compare("protected", Qt::CaseInsensitive) == 0)
-+    else if (status.compare(QString("protected"), Qt::CaseInsensitive) == 0)
-     {
-         retVal = ProtectedWriteStatus;
-     }
--    else if (status.compare("mixed", Qt::CaseInsensitive) == 0)
-+    else if (status.compare(QString("mixed"), Qt::CaseInsensitive) == 0)
-     {
-         retVal = MixedWriteStatus;
-     }
-diff --git c/herqq/hupnp_av/src/cds_model/hmatching_id.cpp i/herqq/hupnp_av/src/cds_model/hmatching_id.cpp
-index 25ee560..bea6ece 100644
---- c/herqq/hupnp_av/src/cds_model/hmatching_id.cpp
-+++ i/herqq/hupnp_av/src/cds_model/hmatching_id.cpp
-@@ -77,11 +77,11 @@ QString HMatchingId::toString(Type type)
- HMatchingId::Type HMatchingId::fromString(const QString& type)
- {
-     Type retVal = Undefined;
--    if (type.compare("SI_SERIESID", Qt::CaseInsensitive) == 0)
-+    if (type.compare(QString("SI_SERIESID"), Qt::CaseInsensitive) == 0)
-     {
-         retVal = SeriesId;
-     }
--    else if (type.compare("SI_PROGRAMID", Qt::CaseInsensitive) == 0)
-+    else if (type.compare(QString("SI_PROGRAMID"), Qt::CaseInsensitive) == 0)
-     {
-         retVal = ProgramId;
-     }
-diff --git c/herqq/hupnp_av/src/cds_model/hscheduledtime.cpp i/herqq/hupnp_av/src/cds_model/hscheduledtime.cpp
-index 06ab6bf..e7cec20 100644
---- c/herqq/hupnp_av/src/cds_model/hscheduledtime.cpp
-+++ i/herqq/hupnp_av/src/cds_model/hscheduledtime.cpp
-@@ -108,11 +108,11 @@ QString HScheduledTime::toString(Type type)
- HScheduledTime::Type HScheduledTime::fromString(const QString& type)
- {
-     Type retVal = Undefined;
--    if (type.compare("SCHEDULED_PROGRAM", Qt::CaseInsensitive) == 0)
-+    if (type.compare(QString("SCHEDULED_PROGRAM"), Qt::CaseInsensitive) == 0)
-     {
-         retVal = ScheduledProgram;
-     }
--    else if (type.compare("ON_DEMAND", Qt::CaseInsensitive) == 0)
-+    else if (type.compare(QString("ON_DEMAND"), Qt::CaseInsensitive) == 0)
-     {
-         retVal = OnDemand;
-     }
-diff --git c/herqq/hupnp_av/src/cds_model/hsortinfo.cpp i/herqq/hupnp_av/src/cds_model/hsortinfo.cpp
-index 078d719..31e1af0 100644
---- c/herqq/hupnp_av/src/cds_model/hsortinfo.cpp
-+++ i/herqq/hupnp_av/src/cds_model/hsortinfo.cpp
-@@ -115,19 +115,19 @@ QString HSortModifier::toString(Type type)
- HSortModifier::Type HSortModifier::fromString(const QString& type)
- {
-     Type retVal = Undefined;
--    if (type.compare("+", Qt::CaseInsensitive) == 0)
-+    if (type.compare(QString("+"), Qt::CaseInsensitive) == 0)
-     {
-         retVal = AscendingByValue;
-     }
--    else if (type.compare("-", Qt::CaseInsensitive) == 0)
-+    else if (type.compare(QString("-"), Qt::CaseInsensitive) == 0)
-     {
-         retVal = DescendingByValue;
-     }
--    else if (type.compare("TIME+", Qt::CaseInsensitive) == 0)
-+    else if (type.compare(QString("TIME+"), Qt::CaseInsensitive) == 0)
-     {
-         retVal = AscendingByTime;
-     }
--    else if (type.compare("TIME-", Qt::CaseInsensitive) == 0)
-+    else if (type.compare(QString("TIME-"), Qt::CaseInsensitive) == 0)
-     {
-         retVal = DescendingByTime;
-     }
-diff --git c/herqq/hupnp_av/src/cds_model/hstatevariablecollection.cpp i/herqq/hupnp_av/src/cds_model/hstatevariablecollection.cpp
-index 65b67f8..f51e6b2 100644
---- c/herqq/hupnp_av/src/cds_model/hstatevariablecollection.cpp
-+++ i/herqq/hupnp_av/src/cds_model/hstatevariablecollection.cpp
-@@ -198,11 +198,11 @@ HStateVariableCollection::RcsInstanceType HStateVariableCollection::fromString(
-     const QString& type)
- {
-     RcsInstanceType retVal = Undefined;
--    if (type.compare("pre-mix", Qt::CaseInsensitive) == 0)
-+    if (type.compare(QString("pre-mix"), Qt::CaseInsensitive) == 0)
-     {
-         retVal = PreMix;
-     }
--    else if (type.compare("post-mix", Qt::CaseInsensitive) == 0)
-+    else if (type.compare(QString("post-mix"), Qt::CaseInsensitive) == 0)
-     {
-         retVal = PostMix;
-     }
-diff --git c/herqq/hupnp_av/src/cds_model/model_mgmt/hcds_dlite_serializer.cpp i/herqq/hupnp_av/src/cds_model/model_mgmt/hcds_dlite_serializer.cpp
-index 9f5712d..cd4dacb 100644
---- c/herqq/hupnp_av/src/cds_model/model_mgmt/hcds_dlite_serializer.cpp
-+++ i/herqq/hupnp_av/src/cds_model/model_mgmt/hcds_dlite_serializer.cpp
-@@ -568,7 +568,7 @@ bool HCdsDidlLiteSerializer::serializeFromXml(
-         addNamespaces(reader);
-         if (reader.readNextStartElement())
-         {
--            if (reader.name().compare("DIDL-Lite", Qt::CaseInsensitive) != 0)
-+            if (reader.name().compare(QString("DIDL-Lite"), Qt::CaseInsensitive) != 0)
-             {
-                 h_ptr->m_lastErrorDescription = "Missing mandatory DIDL-Lite element";
-                 return false;
-diff --git c/herqq/hupnp_av/src/cds_model/model_mgmt/hcdsproperty_db.cpp i/herqq/hupnp_av/src/cds_model/model_mgmt/hcdsproperty_db.cpp
-index 30af243..af03c5c 100644
---- c/herqq/hupnp_av/src/cds_model/model_mgmt/hcdsproperty_db.cpp
-+++ i/herqq/hupnp_av/src/cds_model/model_mgmt/hcdsproperty_db.cpp
-@@ -749,7 +749,7 @@ bool HCdsPropertyDbPrivate::serializeSvCollectionIn(
- 
-     if (stateVariableReader.readNextStartElement())
-     {
--        if (stateVariableReader.name().compare("stateVariableValuePairs", Qt::CaseInsensitive) != 0)
-+        if (stateVariableReader.name().compare(QString("stateVariableValuePairs"), Qt::CaseInsensitive) != 0)
-         {
-             return false;
-         }
-diff --git c/herqq/hupnp_av/src/common/hradioband.cpp i/herqq/hupnp_av/src/common/hradioband.cpp
-index d35a559..85b7e32 100644
---- c/herqq/hupnp_av/src/common/hradioband.cpp
-+++ i/herqq/hupnp_av/src/common/hradioband.cpp
-@@ -83,23 +83,23 @@ QString HRadioBand::toString(Type type)
- HRadioBand::Type HRadioBand::fromString(const QString& arg)

- {

-     Type retVal = Undefined;

--    if (arg.compare("am", Qt::CaseInsensitive) == 0)

-+    if (arg.compare(QString("am"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = AM;

-     }

--    else if (arg.compare("fm", Qt::CaseInsensitive) == 0)

-+    else if (arg.compare(QString("fm"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = FM;

-     }

--    else if (arg.compare("shortwave", Qt::CaseInsensitive) == 0)

-+    else if (arg.compare(QString("shortwave"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = ShortWave;

-     }

--    else if (arg.compare("internet", Qt::CaseInsensitive) == 0)

-+    else if (arg.compare(QString("internet"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = Internet;

-     }

--    else if (arg.compare("satellite", Qt::CaseInsensitive) == 0)

-+    else if (arg.compare(QString("satellite"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = Satellite;

-     }

-diff --git c/herqq/hupnp_av/src/common/hstoragemedium.cpp i/herqq/hupnp_av/src/common/hstoragemedium.cpp
-index 37ab7e0..c7f2109 100644
---- c/herqq/hupnp_av/src/common/hstoragemedium.cpp
-+++ i/herqq/hupnp_av/src/common/hstoragemedium.cpp
-@@ -187,155 +187,155 @@ QString HStorageMedium::toString(Type type)
- HStorageMedium::Type HStorageMedium::fromString(const QString& type)

- {

-     Type retVal = Unknown;

--    if (type.compare("UNKNOWN", Qt::CaseInsensitive) == 0)

-+    if (type.compare(QString("UNKNOWN"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = Unknown;

-     }

--    else if (type.compare("DV", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("DV"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = DigitalVideo;

-     }

--    else if (type.compare("VHS", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("VHS"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = VHS;

-     }

--    else if (type.compare("W-VHS", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("W-VHS"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = W_VHS;

-     }

--    else if (type.compare("S-VHS", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("S-VHS"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = S_VHS;

-     }

--    else if (type.compare("D_VHS", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("D_VHS"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = D_VHS;

-     }

--    else if (type.compare("VHSC", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("VHSC"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = VHSC;

-     }

--    else if (type.compare("VIDEO8", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("VIDEO8"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = Video8;

-     }

--    else if (type.compare("HI8", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("HI8"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = HI8;

-     }

--    else if (type.compare("CD-ROM", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("CD-ROM"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = CD_ROM;

-     }

--    else if (type.compare("CD-DA", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("CD-DA"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = CD_DA;

-     }

--    else if (type.compare("CD-R", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("CD-R"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = CD_R;

-     }

--    else if (type.compare("CD-RW", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("CD-RW"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = CD_RW;

-     }

--    else if (type.compare("VIDEO-CD", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("VIDEO-CD"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = Video_CD;

-     }

--    else if (type.compare("SACD", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("SACD"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = SACD;

-     }

--    else if (type.compare("MD-AUDIO", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("MD-AUDIO"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = MiniDiscAudio;

-     }

--    else if (type.compare("MD-PICTURE", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("MD-PICTURE"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = MiniDiscPicture;

-     }

--    else if (type.compare("DVD-ROM", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("DVD-ROM"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = DVD_ROM;

-     }

--    else if (type.compare("DVD-VIDEO", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("DVD-VIDEO"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = DVD_Video;

-     }

--    else if (type.compare("DVD+R", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("DVD+R"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = DVD_PlusRecordable;

-     }

--    else if (type.compare("DVD-R", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("DVD-R"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = DVD_MinusRecordable;

-     }

--    else if (type.compare("DVD+RW", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("DVD+RW"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = DVD_PlusRewritable;

-     }

--    else if (type.compare("DVD-RW", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("DVD-RW"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = DVD_MinusRewritable;

-     }

--    else if (type.compare("DVD-RAM", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("DVD-RAM"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = DVD_RAM;

-     }

--    else if (type.compare("DAT", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("DAT"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = DAT;

-     }

--    else if (type.compare("LD", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("LD"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = LD;

-     }

--    else if (type.compare("HDD", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("HDD"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = HDD;

-     }

--    else if (type.compare("MICRO-MV", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("MICRO-MV"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = MicroMV;

-     }

--    else if (type.compare("NETWORK", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("NETWORK"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = Network;

-     }

--    else if (type.compare("NONE", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("NONE"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = None;

-     }

--    else if (type.compare("NOT_IMPLEMENTED", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("NOT_IMPLEMENTED"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = NotImplemented;

-     }

--    else if (type.compare("SD", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("SD"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = SecureDigital;

-     }

--    else if (type.compare("PC-CARD", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("PC-CARD"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = PC_Card;

-     }

--    else if (type.compare("MMC", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("MMC"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = MultimediaCard;

-     }

--    else if (type.compare("CF", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("CF"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = CompactFlash;

-     }

--    else if (type.compare("BD", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("BD"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = BluRay;

-     }

--    else if (type.compare("MS", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("MS"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = MemoryStick;

-     }

--    else if (type.compare("HD_DVD", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("HD_DVD"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = HD_DVD;

-     }

-diff --git c/herqq/hupnp_av/src/connectionmanager/hconnectionmanager_info.cpp i/herqq/hupnp_av/src/connectionmanager/hconnectionmanager_info.cpp
-index 89d44ae..bb364b5 100644
---- c/herqq/hupnp_av/src/connectionmanager/hconnectionmanager_info.cpp
-+++ i/herqq/hupnp_av/src/connectionmanager/hconnectionmanager_info.cpp
-@@ -57,11 +57,11 @@ HConnectionManagerInfo::Direction
-     HConnectionManagerInfo::directionFromString(const QString& arg)

- {

-     Direction retVal = DirectionUndefined;

--    if (arg.compare("Input", Qt::CaseInsensitive) == 0)

-+    if (arg.compare(QString("Input"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = DirectionInput;

-     }

--    else if (arg.compare("Output", Qt::CaseInsensitive) == 0)

-+    else if (arg.compare(QString("Output"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = DirectionOutput;

-     }

-@@ -92,23 +92,23 @@ HConnectionManagerInfo::ConnectionStatus
-     HConnectionManagerInfo::statusFromString(const QString& arg)

- {

-     ConnectionStatus retVal = StatusUnknown;

--    if (arg.compare("Ok", Qt::CaseInsensitive) == 0)

-+    if (arg.compare(QString("Ok"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = StatusOk;

-     }

--    else if (arg.compare("Unknown", Qt::CaseInsensitive) == 0)

-+    else if (arg.compare(QString("Unknown"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = StatusUnknown;

-     }

--    else if (arg.compare("ContentFormatMismatch", Qt::CaseInsensitive) == 0)

-+    else if (arg.compare(QString("ContentFormatMismatch"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = StatusContentFormatMismatch;

-     }

--    else if (arg.compare("InsufficientBandwidth", Qt::CaseInsensitive) == 0)

-+    else if (arg.compare(QString("InsufficientBandwidth"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = StatusInsufficientBandwidth;

-     }

--    else if (arg.compare("UnreliableChannel", Qt::CaseInsensitive) == 0)

-+    else if (arg.compare(QString("UnreliableChannel"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = StatusUnreliableChannel;

-     }

-diff --git c/herqq/hupnp_av/src/contentdirectory/hcontentdirectory_info.cpp i/herqq/hupnp_av/src/contentdirectory/hcontentdirectory_info.cpp
-index 5c0c0d0..743ed1e 100644
---- c/herqq/hupnp_av/src/contentdirectory/hcontentdirectory_info.cpp
-+++ i/herqq/hupnp_av/src/contentdirectory/hcontentdirectory_info.cpp
-@@ -80,11 +80,11 @@ HContentDirectoryInfo::BrowseFlag
-     HContentDirectoryInfo::browseFlagFromString(const QString& arg)

- {

-     BrowseFlag retVal = Undefined;

--    if (arg.compare("BrowseMetadata", Qt::CaseInsensitive) == 0)

-+    if (arg.compare(QString("BrowseMetadata"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = BrowseMetadata;

-     }

--    else if (arg.compare("BrowseDirectChildren", Qt::CaseInsensitive) == 0)

-+    else if (arg.compare(QString("BrowseDirectChildren"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = BrowseDirectChildren;

-     }

-diff --git c/herqq/hupnp_av/src/contentdirectory/htransferprogressinfo.cpp i/herqq/hupnp_av/src/contentdirectory/htransferprogressinfo.cpp
-index 0a663dc..1771b6f 100644
---- c/herqq/hupnp_av/src/contentdirectory/htransferprogressinfo.cpp
-+++ i/herqq/hupnp_av/src/contentdirectory/htransferprogressinfo.cpp
-@@ -85,15 +85,15 @@ HTransferProgressInfo::~HTransferProgressInfo()
- HTransferProgressInfo::Status HTransferProgressInfo::fromString(const QString& arg)
- {
-     Status retVal = Error;
--    if (arg.compare("IN_PROGRESS", Qt::CaseInsensitive) == 0)
-+    if (arg.compare(QString("IN_PROGRESS"), Qt::CaseInsensitive) == 0)
-     {
-         retVal = InProgress;
-     }
--    else if (arg.compare("STOPPED", Qt::CaseInsensitive) == 0)
-+    else if (arg.compare(QString("STOPPED"), Qt::CaseInsensitive) == 0)
-     {
-         retVal = Stopped;
-     }
--    else if (arg.compare("COMPLETED", Qt::CaseInsensitive) == 0)
-+    else if (arg.compare(QString("COMPLETED"), Qt::CaseInsensitive) == 0)
-     {
-         retVal = Completed;
-     }
-diff --git c/herqq/hupnp_av/src/hav_global.cpp i/herqq/hupnp_av/src/hav_global.cpp
-index c3f93a9..27d98a0 100644
---- c/herqq/hupnp_av/src/hav_global.cpp
-+++ i/herqq/hupnp_av/src/hav_global.cpp
-@@ -647,7 +647,7 @@ HStateVariableCollection parseStateVariableCollection(const QString& arg)
-     addNamespaces(reader);
- 
-     if (!reader.readNextStartElement() ||
--        reader.name().compare("stateVariableValuePairs", Qt::CaseInsensitive) != 0)
-+        reader.name().compare(QString("stateVariableValuePairs"), Qt::CaseInsensitive) != 0)
-     {
-         return retVal;
-     }
-diff --git c/herqq/hupnp_av/src/mediabrowser/hmediabrowser.cpp i/herqq/hupnp_av/src/mediabrowser/hmediabrowser.cpp
-index f9e2dc4..69b7648 100644
---- c/herqq/hupnp_av/src/mediabrowser/hmediabrowser.cpp
-+++ i/herqq/hupnp_av/src/mediabrowser/hmediabrowser.cpp
-@@ -287,7 +287,7 @@ void HMediaBrowserPrivate::lastChangeReceived(
- 
-     if (reader.readNextStartElement())
-     {
--        if (reader.name().compare("StateEvent", Qt::CaseInsensitive) != 0)
-+        if (reader.name().compare(QString("StateEvent"), Qt::CaseInsensitive) != 0)
-         {
-             return;
-         }
-diff --git c/herqq/hupnp_av/src/mediarenderer/hconnection.cpp i/herqq/hupnp_av/src/mediarenderer/hconnection.cpp
-index 651e727..9fb4958 100644
---- c/herqq/hupnp_av/src/mediarenderer/hconnection.cpp
-+++ i/herqq/hupnp_av/src/mediarenderer/hconnection.cpp
-@@ -144,7 +144,7 @@ void HConnection::lastChangeReceived(
- 
-     if (reader.readNextStartElement())
-     {
--        if (reader.name().compare("Event", Qt::CaseInsensitive) != 0)
-+        if (reader.name().compare(QString("Event"), Qt::CaseInsensitive) != 0)
-         {
-             return;
-         }
-@@ -159,7 +159,7 @@ void HConnection::lastChangeReceived(
-     {
-         QStringRef name = reader.name();
- 
--        if (name.compare("InstanceID", Qt::CaseInsensitive))
-+        if (name.compare(QString("InstanceID"), Qt::CaseInsensitive))
-         {
-             continue;
-         }
-@@ -205,7 +205,7 @@ void HConnection::lastChangeReceived(HAvTransportAdapter*, const QString& data)
- 
-     if (reader.readNextStartElement())
-     {
--        if (reader.name().compare("Event", Qt::CaseInsensitive) != 0)
-+        if (reader.name().compare(QString("Event"), Qt::CaseInsensitive) != 0)
-         {
-             return;
-         }
-@@ -220,7 +220,7 @@ void HConnection::lastChangeReceived(HAvTransportAdapter*, const QString& data)
-     {
-         QStringRef name = reader.name();
- 
--        if (name.compare("InstanceID", Qt::CaseInsensitive))
-+        if (name.compare(QString("InstanceID"), Qt::CaseInsensitive))
-         {
-             continue;
-         }
-diff --git c/herqq/hupnp_av/src/mediarenderer/hconnectionmanager_sinkservice_p.cpp i/herqq/hupnp_av/src/mediarenderer/hconnectionmanager_sinkservice_p.cpp
-index 174f423..bf7e9f2 100644
---- c/herqq/hupnp_av/src/mediarenderer/hconnectionmanager_sinkservice_p.cpp
-+++ i/herqq/hupnp_av/src/mediarenderer/hconnectionmanager_sinkservice_p.cpp
-@@ -109,7 +109,7 @@ qint32 HConnectionManagerSinkService::prepareForConnection(
-         return HConnectionManagerInfo::IncompatibleDirections;
-     }
- 
--    if (remoteProtocolInfo.protocol().compare("http-get", Qt::CaseInsensitive) &&
-+    if (remoteProtocolInfo.protocol().compare(QString("http-get"), Qt::CaseInsensitive) &&
-         remoteProtocolInfo.protocol() != "*")
-     {
-         return HConnectionManagerInfo::IncompatibleProtocolInfo;
-diff --git c/herqq/hupnp_av/src/mediarenderer/hrendererconnection_info.cpp i/herqq/hupnp_av/src/mediarenderer/hrendererconnection_info.cpp
-index 1ad337a..0f5e209 100644
---- c/herqq/hupnp_av/src/mediarenderer/hrendererconnection_info.cpp
-+++ i/herqq/hupnp_av/src/mediarenderer/hrendererconnection_info.cpp
-@@ -1578,19 +1578,19 @@ bool HRendererConnectionInfo::hasChannelAssociated(const QString& svName)
- {
-     bool retVal = false;
-     QString trimmed = svName.trimmed();
--    if (trimmed.compare("Mute", Qt::CaseInsensitive) == 0)
-+    if (trimmed.compare(QString("Mute"), Qt::CaseInsensitive) == 0)
-     {
-         retVal = true;
-     }
--    else if (trimmed.compare("Volume", Qt::CaseInsensitive) == 0)
-+    else if (trimmed.compare(QString("Volume"), Qt::CaseInsensitive) == 0)
-     {
-         retVal = true;
-     }
--    else if (trimmed.compare("VolumeDB", Qt::CaseInsensitive) == 0)
-+    else if (trimmed.compare(QString("VolumeDB"), Qt::CaseInsensitive) == 0)
-     {
-         retVal = true;
-     }
--    else if (trimmed.compare("Loudness", Qt::CaseInsensitive) == 0)
-+    else if (trimmed.compare(QString("Loudness"), Qt::CaseInsensitive) == 0)
-     {
-         retVal = true;
-     }
-diff --git c/herqq/hupnp_av/src/mediarenderer/htransport_sinkservice_p.cpp i/herqq/hupnp_av/src/mediarenderer/htransport_sinkservice_p.cpp
-index a614e17..fbb3258 100644
---- c/herqq/hupnp_av/src/mediarenderer/htransport_sinkservice_p.cpp
-+++ i/herqq/hupnp_av/src/mediarenderer/htransport_sinkservice_p.cpp
-@@ -449,7 +449,7 @@ qint32 HTransportSinkService::getStateVariables(
-     foreach(QString svName, stateVarNames)
-     {
-         svName = svName.trimmed();
--        if (svName.compare("LastChange", Qt::CaseInsensitive) == 0 ||
-+        if (svName.compare(QString("LastChange"), Qt::CaseInsensitive) == 0 ||
-             svName.startsWith("A_ARG", Qt::CaseInsensitive))
-         {
-             return HAvTransportInfo::InvalidStateVariableList;
-@@ -512,7 +512,7 @@ qint32 HTransportSinkService::setStateVariables(
- 
-     if (reader.readNextStartElement())
-     {
--        if (reader.name().compare("stateVariableValuePairs", Qt::CaseInsensitive) != 0)
-+        if (reader.name().compare(QString("stateVariableValuePairs"), Qt::CaseInsensitive) != 0)
-         {
-             return UpnpInvalidArgs;
-         }
-diff --git c/herqq/hupnp_av/src/renderingcontrol/hchannel.cpp i/herqq/hupnp_av/src/renderingcontrol/hchannel.cpp
-index 751a3d9..51c1ff4 100644
---- c/herqq/hupnp_av/src/renderingcontrol/hchannel.cpp
-+++ i/herqq/hupnp_av/src/renderingcontrol/hchannel.cpp
-@@ -110,59 +110,59 @@ QString HChannel::toString(Type type)
- HChannel::Type HChannel::fromString(const QString& type)

- {

-     Type retVal = Undefined;

--    if (type.compare("MASTER", Qt::CaseInsensitive) == 0)

-+    if (type.compare(QString("MASTER"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = Master;

-     }

--    else if (type.compare("LF", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("LF"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = LeftFront;

-     }

--    else if (type.compare("RF", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("RF"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = RightFront;

-     }

--    else if (type.compare("CF", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("CF"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = CenterFront;

-     }

--    else if (type.compare("LFE", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("LFE"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = LFE;

-     }

--    else if (type.compare("LS", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("LS"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = LeftSurround;

-     }

--    else if (type.compare("RS", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("RS"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = RightSurround;

-     }

--    else if (type.compare("LFC", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("LFC"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = LeftOfCenter;

-     }

--    else if (type.compare("RFC", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("RFC"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = RightOfCenter;

-     }

--    else if (type.compare("SD", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("SD"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = Surround;

-     }

--    else if (type.compare("SL", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("SL"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = SideLeft;

-     }

--    else if (type.compare("SR", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("SR"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = SideRight;

-     }

--    else if (type.compare("T", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("T"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = Top;

-     }

--    else if (type.compare("B", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("B"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = Bottom;

-     }

-diff --git c/herqq/hupnp_av/src/renderingcontrol/hrenderingcontrol_service_p.cpp i/herqq/hupnp_av/src/renderingcontrol/hrenderingcontrol_service_p.cpp
-index fd52f9a..84f5579 100644
---- c/herqq/hupnp_av/src/renderingcontrol/hrenderingcontrol_service_p.cpp
-+++ i/herqq/hupnp_av/src/renderingcontrol/hrenderingcontrol_service_p.cpp
-@@ -859,7 +859,7 @@ qint32 HRenderingControlService::setStateVariables(
- 
-     if (reader.readNextStartElement())
-     {
--        if (reader.name().compare("stateVariableValuePairs", Qt::CaseInsensitive) != 0)
-+        if (reader.name().compare(QString("stateVariableValuePairs"), Qt::CaseInsensitive) != 0)
-         {
-             return UpnpInvalidArgs;
-         }
-diff --git c/herqq/hupnp_av/src/transport/havtransport_info.cpp i/herqq/hupnp_av/src/transport/havtransport_info.cpp
-index cb18ce0..e3fcd64 100644
---- c/herqq/hupnp_av/src/transport/havtransport_info.cpp
-+++ i/herqq/hupnp_av/src/transport/havtransport_info.cpp
-@@ -94,35 +94,35 @@ HAvTransportInfo::DrmState
-     HAvTransportInfo::drmStateFromString(const QString& state)
- {
-     DrmState retVal = DrmState_Unknown;
--    if (state.compare("OK", Qt::CaseInsensitive) == 0)
-+    if (state.compare(QString("OK"), Qt::CaseInsensitive) == 0)
-     {
-         retVal = DrmState_Ok;
-     }
--    else if (state.compare("UNKNOWN", Qt::CaseInsensitive) == 0)
-+    else if (state.compare(QString("UNKNOWN"), Qt::CaseInsensitive) == 0)
-     {
-         retVal = DrmState_Unknown;
-     }
--    else if (state.compare("PROCESSING_CONTENT_KEY", Qt::CaseInsensitive) == 0)
-+    else if (state.compare(QString("PROCESSING_CONTENT_KEY"), Qt::CaseInsensitive) == 0)
-     {
-         retVal = DrmState_ProcessingContentKey;
-     }
--    else if (state.compare("CONTENT_KEY_FAILURE", Qt::CaseInsensitive) == 0)
-+    else if (state.compare(QString("CONTENT_KEY_FAILURE"), Qt::CaseInsensitive) == 0)
-     {
-         retVal = DrmState_ContentKeyFailure;
-     }
--    else if (state.compare("ATTEMPTING_AUTHENTICATION", Qt::CaseInsensitive) == 0)
-+    else if (state.compare(QString("ATTEMPTING_AUTHENTICATION"), Qt::CaseInsensitive) == 0)
-     {
-         retVal = DrmState_AttemptingAuthentication;
-     }
--    else if (state.compare("FAILED_AUTHENTICATION", Qt::CaseInsensitive) == 0)
-+    else if (state.compare(QString("FAILED_AUTHENTICATION"), Qt::CaseInsensitive) == 0)
-     {
-         retVal = DrmState_FailedAuthentication;
-     }
--    else if (state.compare("NOT_AUTHENTICATED", Qt::CaseInsensitive) == 0)
-+    else if (state.compare(QString("NOT_AUTHENTICATED"), Qt::CaseInsensitive) == 0)
-     {
-         retVal = DrmState_NotAuthenticated;
-     }
--    else if (state.compare("DEVICE_REVOCATION", Qt::CaseInsensitive) == 0)
-+    else if (state.compare(QString("DEVICE_REVOCATION"), Qt::CaseInsensitive) == 0)
-     {
-         retVal = DrmState_DeviceRevocation;
-     }
-diff --git c/herqq/hupnp_av/src/transport/hmediainfo.cpp i/herqq/hupnp_av/src/transport/hmediainfo.cpp
-index 9e642c1..5f33847 100644
---- c/herqq/hupnp_av/src/transport/hmediainfo.cpp
-+++ i/herqq/hupnp_av/src/transport/hmediainfo.cpp
-@@ -180,15 +180,15 @@ HMediaInfo::MediaCategory HMediaInfo::mediaCategoryFromString(
-     const QString& category)
- {
-     MediaCategory retVal = Undefined;
--    if (category.compare("NO_MEDIA", Qt::CaseInsensitive) == 0)
-+    if (category.compare(QString("NO_MEDIA"), Qt::CaseInsensitive) == 0)
-     {
-         retVal = NoMedia;
-     }
--    else if (category.compare("TRACK_AWARE", Qt::CaseInsensitive) == 0)
-+    else if (category.compare(QString("TRACK_AWARE"), Qt::CaseInsensitive) == 0)
-     {
-         retVal = TrackAware;
-     }
--    else if (category.compare("TRACK_UNAWARE", Qt::CaseInsensitive) == 0)
-+    else if (category.compare(QString("TRACK_UNAWARE"), Qt::CaseInsensitive) == 0)
-     {
-         retVal = TrackUnaware;
-     }
-diff --git c/herqq/hupnp_av/src/transport/hplaymode.cpp i/herqq/hupnp_av/src/transport/hplaymode.cpp
-index 8d3a20e..57605f0 100644
---- c/herqq/hupnp_av/src/transport/hplaymode.cpp
-+++ i/herqq/hupnp_av/src/transport/hplaymode.cpp
-@@ -87,31 +87,31 @@ QString HPlayMode::toString(HPlayMode::Type type)
- HPlayMode::Type HPlayMode::fromString(const QString& type)

- {

-     Type retVal = Undefined;

--    if (type.compare("NORMAL", Qt::CaseInsensitive) == 0)

-+    if (type.compare(QString("NORMAL"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = Normal;

-     }

--    else if (type.compare("SHUFFLE", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("SHUFFLE"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = Shuffle;

-     }

--    else if (type.compare("REPEAT_ONE", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("REPEAT_ONE"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = RepeatOne;

-     }

--    else if (type.compare("REPEAT_ALL", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("REPEAT_ALL"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = RepeatAll;

-     }

--    else if (type.compare("RANDOM", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("RANDOM"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = Random;

-     }

--    else if (type.compare("DIRECT_1", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("DIRECT_1"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = Direct_1;

-     }

--    else if (type.compare("INTRO", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("INTRO"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = Intro;

-     }

-diff --git c/herqq/hupnp_av/src/transport/hrecordmediumwritestatus.cpp i/herqq/hupnp_av/src/transport/hrecordmediumwritestatus.cpp
-index ab29f09..a1a5de0 100644
---- c/herqq/hupnp_av/src/transport/hrecordmediumwritestatus.cpp
-+++ i/herqq/hupnp_av/src/transport/hrecordmediumwritestatus.cpp
-@@ -81,23 +81,23 @@ HRecordMediumWriteStatus::Type HRecordMediumWriteStatus::fromString(
-     const QString& type)

- {

-     Type retVal = Unknown;

--    if (type.compare("WRITABLE", Qt::CaseInsensitive) == 0)

-+    if (type.compare(QString("WRITABLE"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = Writable;

-     }

--    else if (type.compare("PROTECTED", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("PROTECTED"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = Protected;

-     }

--    else if (type.compare("NOT_WRITABLE", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("NOT_WRITABLE"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = NotWritable;

-     }

--    else if (type.compare("NOT_IMPLEMENTED", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("NOT_IMPLEMENTED"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = NotImplemented;

-     }

--    else if (type.compare("UNKNOWN", Qt::CaseInsensitive) != 0 && !type.isEmpty())

-+    else if (type.compare(QString("UNKNOWN"), Qt::CaseInsensitive) != 0 && !type.isEmpty())

-     {

-         retVal = VendorDefined;

-     }

-diff --git c/herqq/hupnp_av/src/transport/hrecordqualitymode.cpp i/herqq/hupnp_av/src/transport/hrecordqualitymode.cpp
-index bf7dd90..b659fd7 100644
---- c/herqq/hupnp_av/src/transport/hrecordqualitymode.cpp
-+++ i/herqq/hupnp_av/src/transport/hrecordqualitymode.cpp
-@@ -88,31 +88,31 @@ QString HRecordQualityMode::toString(Type mode)
- HRecordQualityMode::Type HRecordQualityMode::fromString(const QString& mode)

- {

-     Type retVal = Undefined;

--    if (mode.compare("0:EP", Qt::CaseInsensitive) == 0)

-+    if (mode.compare(QString("0:EP"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = Ep;

-     }

--    else if (mode.compare("1:LP", Qt::CaseInsensitive) == 0)

-+    else if (mode.compare(QString("1:LP"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = Lp;

-     }

--    else if (mode.compare("2:SP", Qt::CaseInsensitive) == 0)

-+    else if (mode.compare(QString("2:SP"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = Sp;

-     }

--    else if (mode.compare("0:BASIC", Qt::CaseInsensitive) == 0)

-+    else if (mode.compare(QString("0:BASIC"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = Basic;

-     }

--    else if (mode.compare("1:MEDIUM", Qt::CaseInsensitive) == 0)

-+    else if (mode.compare(QString("1:MEDIUM"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = Medium;

-     }

--    else if (mode.compare("2:HIGH", Qt::CaseInsensitive) == 0)

-+    else if (mode.compare(QString("2:HIGH"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = High;

-     }

--    else if (mode.compare("NOT_IMPLEMENTED", Qt::CaseInsensitive) == 0)

-+    else if (mode.compare(QString("NOT_IMPLEMENTED"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = NotImplemented;

-     }

-diff --git c/herqq/hupnp_av/src/transport/hseekinfo.cpp i/herqq/hupnp_av/src/transport/hseekinfo.cpp
-index c2ac69a..d3eee2b 100644
---- c/herqq/hupnp_av/src/transport/hseekinfo.cpp
-+++ i/herqq/hupnp_av/src/transport/hseekinfo.cpp
-@@ -102,43 +102,43 @@ QString HSeekMode::toString(Type type)
- HSeekMode::Type HSeekMode::fromString(const QString& type)

- {

-     Type retVal = Unknown;

--    if (type.compare("TRACK_NR", Qt::CaseInsensitive) == 0)

-+    if (type.compare(QString("TRACK_NR"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = TrackNr;

-     }

--    else if (type.compare("ABS_TIME", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("ABS_TIME"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = AbsTime;

-     }

--    else if (type.compare("REL_TIME", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("REL_TIME"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = RelTime;

-     }

--    else if (type.compare("ABS_COUNT", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("ABS_COUNT"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = AbsCount;

-     }

--    else if (type.compare("REL_COUNT", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("REL_COUNT"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = RelCount;

-     }

--    else if (type.compare("CHANNEL_FREQ", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("CHANNEL_FREQ"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = ChannelFreq;

-     }

--    else if (type.compare("TAPE-INDEX", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("TAPE-INDEX"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = TapeIndex;

-     }

--    else if (type.compare("REL_TAPE-INDEX", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("REL_TAPE-INDEX"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = RelTapeIndex;

-     }

--    else if (type.compare("FRAME", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("FRAME"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = Frame;

-     }

--    else if (type.compare("REL_FRAME", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("REL_FRAME"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = RelFrame;

-     }

-diff --git c/herqq/hupnp_av/src/transport/htransportaction.cpp i/herqq/hupnp_av/src/transport/htransportaction.cpp
-index d64b1bc..4a34b8d 100644
---- c/herqq/hupnp_av/src/transport/htransportaction.cpp
-+++ i/herqq/hupnp_av/src/transport/htransportaction.cpp
-@@ -91,31 +91,31 @@ QString HTransportAction::toString(Type type)
- HTransportAction::Type HTransportAction::fromString(const QString& type)

- {

-     Type retVal = Undefined;

--    if (type.compare("PLAY", Qt::CaseInsensitive) == 0)

-+    if (type.compare(QString("PLAY"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = Play;

-     }

--    else if (type.compare("STOP", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("STOP"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = Stop;

-     }

--    else if (type.compare("PAUSE", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("PAUSE"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = Pause;

-     }

--    else if (type.compare("SEEK", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("SEEK"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = Seek;

-     }

--    else if (type.compare("NEXT", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("NEXT"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = Next;

-     }

--    else if (type.compare("PREVIOUS", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("PREVIOUS"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = Previous;

-     }

--    else if (type.compare("RECORD", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("RECORD"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = Record;

-     }

-diff --git c/herqq/hupnp_av/src/transport/htransportinfo.cpp i/herqq/hupnp_av/src/transport/htransportinfo.cpp
-index ecfaf0b..8ca9b1c 100644
---- c/herqq/hupnp_av/src/transport/htransportinfo.cpp
-+++ i/herqq/hupnp_av/src/transport/htransportinfo.cpp
-@@ -71,11 +71,11 @@ QString HTransportStatus::toString(HTransportStatus::Type type)
- HTransportStatus::Type HTransportStatus::fromString(const QString& type)

- {

-     Type retVal = Undefined;

--    if (type.compare("OK", Qt::CaseInsensitive) == 0)

-+    if (type.compare(QString("OK"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = OK;

-     }

--    else if (type.compare("ERROR_OCCURRED", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("ERROR_OCCURRED"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = ErrorOccurred;

-     }

-diff --git c/herqq/hupnp_av/src/transport/htransportstate.cpp i/herqq/hupnp_av/src/transport/htransportstate.cpp
-index b460065..f2a1ac3 100644
---- c/herqq/hupnp_av/src/transport/htransportstate.cpp
-+++ i/herqq/hupnp_av/src/transport/htransportstate.cpp
-@@ -89,31 +89,31 @@ QString HTransportState::toString(HTransportState::Type type)
- HTransportState::Type HTransportState::fromString(const QString& type)

- {

-     Type retVal = Undefined;

--    if (type.compare("NO_MEDIA_PRESENT", Qt::CaseInsensitive) == 0)

-+    if (type.compare(QString("NO_MEDIA_PRESENT"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = NoMediaPresent;

-     }

--    else if (type.compare("STOPPED", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("STOPPED"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = Stopped;

-     }

--    else if (type.compare("PLAYING", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("PLAYING"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = Playing;

-     }

--    else if (type.compare("TRANSITIONING", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("TRANSITIONING"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = Transitioning;

-     }

--    else if (type.compare("PAUSED_PLAYBACK", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("PAUSED_PLAYBACK"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = PausedPlayback;

-     }

--    else if (type.compare("PAUSED_RECORDING", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("PAUSED_RECORDING"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = PausedRecording;

-     }

--    else if (type.compare("RECORDING", Qt::CaseInsensitive) == 0)

-+    else if (type.compare(QString("RECORDING"), Qt::CaseInsensitive) == 0)

-     {

-         retVal = Recording;

-     }

diff --git a/pkgs/development/libraries/hyperscan/default.nix b/pkgs/development/libraries/hyperscan/default.nix
index 53a3210caca..bc0ce15a083 100644
--- a/pkgs/development/libraries/hyperscan/default.nix
+++ b/pkgs/development/libraries/hyperscan/default.nix
@@ -1,5 +1,7 @@
-{ lib, stdenv, fetchFromGitHub, cmake, ragel, python27
+{ stdenv, fetchFromGitHub, cmake, ragel, python3
+, coreutils, gnused, utillinux
 , boost
+, withStatic ? false # build only shared libs by default, build static+shared if true
 }:
 
 # NOTICE: pkgconfig, pcap and pcre intentionally omitted from build inputs
@@ -8,45 +10,41 @@
 #         I not see any reason (for now) to backport 8.41.
 
 stdenv.mkDerivation rec {
-  name = "${pname}-${version}";
   pname = "hyperscan";
-  version = "5.1.0";
+  version = "5.1.1";
 
   src = fetchFromGitHub {
     owner = "intel";
-    repo = "hyperscan";
-    sha256 = "0r2c7s7alnq14yhbfhpkq6m28a3pyfqd427115k0754afxi82vbq";
+    repo = pname;
+    sha256 = "11adkz5ln2d2jywwlmixfnwqp5wxskq1104hmmcpws590lhkjv6j";
     rev = "v${version}";
   };
 
   outputs = [ "out" "dev" ];
 
   buildInputs = [ boost ];
-  nativeBuildInputs = [ cmake ragel python27 ];
+  nativeBuildInputs = [
+    cmake ragel python3
+    # Consider simply using busybox for these
+    # Need at least: rev, sed, cut, nm
+    coreutils gnused utillinux
+  ];
 
   cmakeFlags = [
     "-DFAT_RUNTIME=ON"
     "-DBUILD_AVX512=ON"
-    "-DBUILD_STATIC_AND_SHARED=ON"
-  ];
+  ]
+  ++ stdenv.lib.optional (withStatic) "-DBUILD_STATIC_AND_SHARED=ON"
+  ++ stdenv.lib.optional (!withStatic) "-DBUILD_SHARED_LIBS=ON";
 
-  prePatch = ''
+  postPatch = ''
     sed -i '/examples/d' CMakeLists.txt
+    substituteInPlace libhs.pc.in \
+      --replace "libdir=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@" "libdir=@CMAKE_INSTALL_LIBDIR@" \
+      --replace "includedir=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_INCLUDEDIR@" "includedir=@CMAKE_INSTALL_INCLUDEDIR@"
   '';
 
-  postInstall = ''
-    mkdir -p $dev/lib
-    mv $out/lib/*.a $dev/lib/
-    ln -sf $out/lib/libhs.so $dev/lib/
-    ln -sf $out/lib/libhs_runtime.so $dev/lib/
-  '';
-
-  postFixup = ''
-    sed -i "s,$out/include,$dev/include," $dev/lib/pkgconfig/libhs.pc
-    sed -i "s,$out/lib,$dev/lib," $dev/lib/pkgconfig/libhs.pc
-  '';
-
-  meta = {
+  meta = with stdenv.lib; {
     description = "High-performance multiple regex matching library";
     longDescription = ''
       Hyperscan is a high-performance multiple regex matching library.
@@ -61,9 +59,9 @@ stdenv.mkDerivation rec {
       Hyperscan is typically used in a DPI library stack.
     '';
 
-    homepage = https://www.hyperscan.io/;
-    maintainers = with lib.maintainers; [ avnik ];
-    platforms = [ "x86_64-linux" "x86_64-darwin" ];
-    license = lib.licenses.bsd3;
+    homepage = "https://www.hyperscan.io/";
+    maintainers = with maintainers; [ avnik ];
+    platforms = [ "x86_64-linux" ]; # can't find nm on darwin ; might build on aarch64 but untested
+    license = licenses.bsd3;
   };
 }
diff --git a/pkgs/development/libraries/java/lombok/default.nix b/pkgs/development/libraries/java/lombok/default.nix
index 7f932d52dc4..be3ddfff4c8 100644
--- a/pkgs/development/libraries/java/lombok/default.nix
+++ b/pkgs/development/libraries/java/lombok/default.nix
@@ -1,11 +1,11 @@
 { stdenv, fetchurl }:
 
 stdenv.mkDerivation rec {
-  name = "lombok-1.18.4";
+  name = "lombok-1.18.8";
 
   src = fetchurl {
     url = "https://projectlombok.org/downloads/${name}.jar";
-    sha256 = "0hlpycnmzd71ihn59hzf445dvwky2lkv57jimx91i6v7xcnr5wrr";
+    sha256 = "1z14rc3fh03qvn2xkjrb7ha0hddv3f3vsp781xm336sp4cl9b5h3";
   };
 
   buildCommand = ''
diff --git a/pkgs/development/libraries/leptonica/default.nix b/pkgs/development/libraries/leptonica/default.nix
index b9b6c3c7c24..52d835d7a20 100644
--- a/pkgs/development/libraries/leptonica/default.nix
+++ b/pkgs/development/libraries/leptonica/default.nix
@@ -1,44 +1,27 @@
-{ stdenv, fetchurl, fetchpatch, autoreconfHook, pkgconfig
+{ stdenv, fetchurl, fetchpatch, autoreconfHook, pkgconfig, which, gnuplot
 , giflib, libjpeg, libpng, libtiff, libwebp, openjpeg, zlib
 }:
 
 stdenv.mkDerivation rec {
   name = "leptonica-${version}";
-  version = "1.74.1";
+  version = "1.78.0";
 
   src = fetchurl {
     url = "http://www.leptonica.org/source/${name}.tar.gz";
-    sha256 = "0qpcidvv6igybrrhj0m6j47g642c8sk1qn4dpj82mgd38xx52skl";
+    sha256 = "122s9b8hi93va4lgwnwrbma50x5fp740npy0s92xybd2wy0jxvg2";
   };
 
-  patches = stdenv.lib.singleton (fetchpatch {
-    # configure: Support pkg-config
-    url = "https://github.com/DanBloomberg/leptonica/commit/"
-        + "4476d162cc191a0fefb2ce434153e12bbf188664.patch";
-    sha256 = "1razzp2g49shfaravfqpxm3ivcd1r92lvqysll6nnf6d1wp9865s";
-  });
-
-  postPatch = ''
-    # Remove the AC_SUBST() macros on *_LIBS, because the *_LIBS variables will
-    # be automatically set by PKG_CHECK_MODULES() since autotools 0.24 and
-    # using the ones that are set here in Leptonica's configure.ac do not
-    # include -L linker flags.
-    sed -i -e '/PKG_CHECK_MODULES/,/^ *\])/s/AC_SUBST([^)]*)//' configure.ac
-
-    # The giflib package doesn't ship a pkg-config file, so we need to inject
-    # the linker search path.
-    substituteInPlace configure.ac --replace -lgif \
-      ${stdenv.lib.escapeShellArg "'-L${giflib}/lib -lgif'"}
-  '';
-
   nativeBuildInputs = [ autoreconfHook pkgconfig ];
   buildInputs = [ giflib libjpeg libpng libtiff libwebp openjpeg zlib ];
+  enableParallelBuilding = true;
+
+  checkInputs = [ which gnuplot ];
+  doCheck = !stdenv.isDarwin;
 
   meta = {
     description = "Image processing and analysis library";
     homepage = http://www.leptonica.org/;
-    # Its own license: http://www.leptonica.org/about-the-license.html
-    license = stdenv.lib.licenses.free;
+    license = stdenv.lib.licenses.bsd2; # http://www.leptonica.org/about-the-license.html
     platforms = stdenv.lib.platforms.unix;
   };
 }
diff --git a/pkgs/development/libraries/libao/default.nix b/pkgs/development/libraries/libao/default.nix
index 826f72b1f5f..c1cf3215c16 100644
--- a/pkgs/development/libraries/libao/default.nix
+++ b/pkgs/development/libraries/libao/default.nix
@@ -1,5 +1,5 @@
 { stdenv, lib, fetchFromGitHub, autoreconfHook, pkgconfig, libpulseaudio, alsaLib, libcap
-, CoreAudio, CoreServices, AudioUnit
+, CoreAudio, CoreServices, AudioUnit, AudioToolbox
 , usePulseAudio }:
 
 stdenv.mkDerivation rec {
diff --git a/pkgs/development/libraries/libbap/default.nix b/pkgs/development/libraries/libbap/default.nix
index 5153b63e91c..2a129bc648f 100644
--- a/pkgs/development/libraries/libbap/default.nix
+++ b/pkgs/development/libraries/libbap/default.nix
@@ -3,13 +3,13 @@
 
 stdenv.mkDerivation rec {
   name = "libbap-${version}";
-  version = "master-2018-03-01";
+  version = "master-2019-04-05";
 
   src = fetchFromGitHub {
     owner = "BinaryAnalysisPlatform";
     repo = "bap-bindings";
-    rev = "bd125c379a784d4265c2ddcf1f6e34bde2e568d4";
-    sha256 = "0dp90djyjc262v1b1cw5irp424a8394y86fyprdk8z741wg56m3v";
+    rev = "1a89db62f1239a15d310b400f74e151c0a64f37f";
+    sha256 = "0mln9adjgxzhjmjayq06ahgiay4vj5kmnzdxqz3nsik9h3npycd6";
   };
 
   nativeBuildInputs = [ autoreconfHook which ];
diff --git a/pkgs/development/libraries/libcdio/default.nix b/pkgs/development/libraries/libcdio/default.nix
index 5c50d093243..9c3132a3e63 100644
--- a/pkgs/development/libraries/libcdio/default.nix
+++ b/pkgs/development/libraries/libcdio/default.nix
@@ -1,11 +1,11 @@
 { stdenv, fetchurl, libcddb, pkgconfig, ncurses, help2man, libiconv, Carbon, IOKit }:
 
 stdenv.mkDerivation rec {
-  name = "libcdio-2.0.0";
+  name = "libcdio-2.1.0";
 
   src = fetchurl {
     url = "mirror://gnu/libcdio/${name}.tar.bz2";
-    sha256 = "0jr8ppdm80c533nzmrpz3iffnpc6nhvsria1di9f4jg1l19a03fd";
+    sha256 = "0avi6apv5ydjy6b9c3z9a46rvp5i57qyr09vr7x4nndxkmcfjl45";
   };
 
   postPatch = ''
@@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
   buildInputs = [ libcddb ncurses help2man ]
     ++ stdenv.lib.optionals stdenv.isDarwin [ libiconv Carbon IOKit ];
 
-  doCheck = true;
+  doCheck = !stdenv.isDarwin;
 
   meta = with stdenv.lib; {
     description = "A library for OS-independent CD-ROM and CD image access";
diff --git a/pkgs/development/libraries/libcroco/default.nix b/pkgs/development/libraries/libcroco/default.nix
index dc4a967e7ac..90ed8c6d985 100644
--- a/pkgs/development/libraries/libcroco/default.nix
+++ b/pkgs/development/libraries/libcroco/default.nix
@@ -1,27 +1,14 @@
-{ stdenv, fetchurl, pkgconfig, libxml2, glib, fetchpatch, gnome3 }:
+{ stdenv, fetchurl, pkgconfig, libxml2, glib, gnome3 }:
 
 stdenv.mkDerivation rec {
   pname = "libcroco";
-  version = "0.6.12";
+  version = "0.6.13";
 
   src = fetchurl {
     url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
-    sha256 = "0q7qhi7z64i26zabg9dbs5706fa8pmzp1qhpa052id4zdiabbi6x";
+    sha256 = "1m110rbj5d2raxcdp4iz0qp172284945awrsbdlq99ksmqsc4zkn";
   };
 
-  patches = [
-    (fetchpatch {
-      name = "CVE-2017-7960.patch";
-      url = https://gitlab.gnome.org/GNOME/libcroco/commit/898e3a8c8c0314d2e6b106809a8e3e93cf9d4394.patch;
-      sha256 = "1xjwdqijxf4b7mhdp3kkgnb6c14y0bn3b3gg79kyrm82x696d94l";
-    })
-    (fetchpatch {
-      name = "CVE-2017-7961.patch";
-      url = https://gitlab.gnome.org/GNOME/libcroco/commit/9ad72875e9f08e4c519ef63d44cdbd94aa9504f7.patch;
-      sha256 = "0zakd72ynzjgzskwyvqglqiznsb93j1bkvc1lgyrzgv9rwrbwv9s";
-    })
-  ];
-
   outputs = [ "out" "dev" ];
   outputBin = "dev";
 
diff --git a/pkgs/development/libraries/libcsptr/default.nix b/pkgs/development/libraries/libcsptr/default.nix
new file mode 100644
index 00000000000..d7638dd2059
--- /dev/null
+++ b/pkgs/development/libraries/libcsptr/default.nix
@@ -0,0 +1,23 @@
+{ stdenv, fetchFromGitHub, cmake, git }:
+
+stdenv.mkDerivation rec {
+  name = "libcsptr-${version}";
+  version = "2.0.4";
+
+  src = fetchFromGitHub {
+    owner = "Snaipe";
+    repo = "libcsptr";
+    rev = "v${version}";
+    sha256 = "0i1498h2i6zq3fn3zf3iw7glv6brn597165hnibgwccqa8sh3ich";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  meta = with stdenv.lib; {
+    description = "Smart pointer constructs for the (GNU) C programming language";
+    homepage = https://github.com/Snaipe/libcsptr;
+    license = licenses.mit;
+    platforms = [ "i686-linux" "x86_64-linux" ];
+    maintainers = [ maintainers.fragamus ];
+  };
+}
diff --git a/pkgs/development/libraries/libdazzle/default.nix b/pkgs/development/libraries/libdazzle/default.nix
index 59f07202fde..28d9152dcee 100644
--- a/pkgs/development/libraries/libdazzle/default.nix
+++ b/pkgs/development/libraries/libdazzle/default.nix
@@ -2,7 +2,7 @@
 , gtk-doc, docbook_xsl, docbook_xml_dtd_43, glibcLocales, dbus, xvfb_run, glib, gtk3, gnome3 }:
 
 let
-  version = "3.32.1";
+  version = "3.32.2";
   pname = "libdazzle";
 in
 stdenv.mkDerivation {
@@ -13,7 +13,7 @@ stdenv.mkDerivation {
 
   src = fetchurl {
     url = "mirror://gnome/sources/libdazzle/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
-    sha256 = "0wprqgn480r31pcgmpyk9l6cfvlczfcx10fpqaq9pbn3vjgs3393";
+    sha256 = "0hgi7gnkna9n42nh7p81crrw0jjj22yr8acych60wxh6hzxqsgs1";
   };
 
   nativeBuildInputs = [ ninja meson pkgconfig vala gobject-introspection libxml2 gtk-doc docbook_xsl docbook_xml_dtd_43 glibcLocales dbus xvfb_run ];
diff --git a/pkgs/development/libraries/libdrm/default.nix b/pkgs/development/libraries/libdrm/default.nix
index a0bd7d86454..7415aa754e7 100644
--- a/pkgs/development/libraries/libdrm/default.nix
+++ b/pkgs/development/libraries/libdrm/default.nix
@@ -1,11 +1,11 @@
 { stdenv, fetchurl, pkgconfig, libpthreadstubs, libpciaccess, valgrind-light }:
 
 stdenv.mkDerivation rec {
-  name = "libdrm-2.4.97";
+  name = "libdrm-2.4.98";
 
   src = fetchurl {
     url = "https://dri.freedesktop.org/libdrm/${name}.tar.bz2";
-    sha256 = "08yimlp6jir1rs5ajgdx74xa5qdzcqahpdzdk0rmkmhh7vdcrl3p";
+    sha256 = "150qdzsm2nx6dfacc75rx53anzsc6m31nhxidf5xxax3mk6fvq4b";
   };
 
   outputs = [ "out" "dev" "bin" ];
@@ -14,17 +14,12 @@ stdenv.mkDerivation rec {
   buildInputs = [ libpthreadstubs libpciaccess valgrind-light ];
     # libdrm as of 2.4.70 does not actually do anything with udev.
 
-  patches = stdenv.lib.optional stdenv.isDarwin ./libdrm-apple.patch;
-
   postPatch = ''
     for a in */*-symbol-check ; do
       patchShebangs $a
     done
   '';
 
-  preConfigure = stdenv.lib.optionalString stdenv.isDarwin
-    "echo : \\\${ac_cv_func_clock_gettime=\'yes\'} > config.cache";
-
   configureFlags = [ "--enable-install-test-programs" ]
     ++ stdenv.lib.optionals (stdenv.isAarch32 || stdenv.isAarch64)
       [ "--enable-tegra-experimental-api" "--enable-etnaviv-experimental-api" ]
diff --git a/pkgs/development/libraries/libdrm/libdrm-apple.patch b/pkgs/development/libraries/libdrm/libdrm-apple.patch
deleted file mode 100644
index 17b447789c2..00000000000
--- a/pkgs/development/libraries/libdrm/libdrm-apple.patch
+++ /dev/null
@@ -1,88 +0,0 @@
-diff -Naur libdrm-2.4.26-orig/intel/intel_bufmgr_gem.c libdrm-2.4.26/intel/intel_bufmgr_gem.c
---- libdrm-2.4.26-orig/intel/intel_bufmgr_gem.c	2011-04-01 10:30:51.000000000 -0400
-+++ libdrm-2.4.26/intel/intel_bufmgr_gem.c	2011-08-29 02:17:20.000000000 -0400
-@@ -51,6 +51,7 @@
- #include <sys/stat.h>
- #include <sys/types.h>
- #include <stdbool.h>
-+#include <sys/time.h>
- 
- #include "errno.h"
- #include "libdrm_lists.h"
-@@ -987,9 +988,9 @@
- 	if (atomic_dec_and_test(&bo_gem->refcount)) {
- 		drm_intel_bufmgr_gem *bufmgr_gem =
- 		    (drm_intel_bufmgr_gem *) bo->bufmgr;
--		struct timespec time;
-+		struct timeval time;
- 
--		clock_gettime(CLOCK_MONOTONIC, &time);
-+		gettimeofday(&time, NULL);
- 
- 		pthread_mutex_lock(&bufmgr_gem->lock);
- 		drm_intel_gem_bo_unreference_final(bo, time.tv_sec);
-diff -Naur libdrm-2.4.26-orig/xf86drm.c libdrm-2.4.26/xf86drm.c
---- libdrm-2.4.26-orig/xf86drm.c	2011-03-21 09:39:24.000000000 -0400
-+++ libdrm-2.4.26/xf86drm.c	2011-08-29 02:17:49.000000000 -0400
-@@ -51,6 +51,9 @@
- #include <sys/mman.h>
- #include <sys/time.h>
- #include <stdarg.h>
-+#if defined(__APPLE__) && defined(__MACH__)
-+#include <mach/mach_time.h>
-+#endif
- 
- /* Not all systems have MAP_FAILED defined */
- #ifndef MAP_FAILED
-@@ -1941,20 +1944,43 @@
-  */
- int drmWaitVBlank(int fd, drmVBlankPtr vbl)
- {
-+#if defined(__APPLE__) && defined(__MACH__)
-+    uint64_t start, end, elapsed, elapsedNano;
-+    static const uint64_t maxElapsed = 2000000000;
-+    static mach_timebase_info_data_t timebaseInfo;
-+    if ( timebaseInfo.denom == 0 ) {
-+	(void) mach_timebase_info(&timebaseInfo);
-+    }
-+#else
-     struct timespec timeout, cur;
-+#endif
-     int ret;
- 
-+#if defined(__APPLE__) && defined(__MACH__)
-+    start = mach_absolute_time();
-+#else
-     ret = clock_gettime(CLOCK_MONOTONIC, &timeout);
-     if (ret < 0) {
- 	fprintf(stderr, "clock_gettime failed: %s\n", strerror(ret));
- 	goto out;
-     }
-     timeout.tv_sec++;
-+#endif
- 
-     do {
-        ret = ioctl(fd, DRM_IOCTL_WAIT_VBLANK, vbl);
-        vbl->request.type &= ~DRM_VBLANK_RELATIVE;
-        if (ret && errno == EINTR) {
-+#if defined(__APPLE__) && defined(__MACH__)
-+	       end = mach_absolute_time();
-+	       elapsed = end - start;
-+	       elapsedNano = elapsed * timebaseInfo.numer / timebaseInfo.denom;
-+	       if (elapsedNano > maxElapsed) {
-+		   errno = EBUSY;
-+		   ret = -1;
-+		   break;
-+	       }
-+#else
- 	       clock_gettime(CLOCK_MONOTONIC, &cur);
- 	       /* Timeout after 1s */
- 	       if (cur.tv_sec > timeout.tv_sec + 1 ||
-@@ -1964,6 +1990,7 @@
- 		       ret = -1;
- 		       break;
- 	       }
-+#endif
-        }
-     } while (ret && errno == EINTR);
- 
diff --git a/pkgs/development/libraries/libdvdread/default.nix b/pkgs/development/libraries/libdvdread/default.nix
index 95815f4abcd..5f0f0827503 100644
--- a/pkgs/development/libraries/libdvdread/default.nix
+++ b/pkgs/development/libraries/libdvdread/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   name = "libdvdread-${version}";
-  version = "6.0.0";
+  version = "6.0.1";
 
   src = fetchurl {
     url = "http://get.videolan.org/libdvdread/${version}/${name}.tar.bz2";
-    sha256 = "0dgr23fzcjhb7ck54xkr9zmf4jcq3ph0dz3fbyvla1c6ni9ijfxk";
+    sha256 = "1gfmh8ii3s2fw1c8vn57piwxc0smd3va4h7xgp9s8g48cc04zki8";
   };
 
   buildInputs = [libdvdcss];
diff --git a/pkgs/development/libraries/libfaketime/default.nix b/pkgs/development/libraries/libfaketime/default.nix
index cc9db8f7e66..65d04cb53f1 100644
--- a/pkgs/development/libraries/libfaketime/default.nix
+++ b/pkgs/development/libraries/libfaketime/default.nix
@@ -21,9 +21,8 @@ stdenv.mkDerivation rec {
     done
   '';
 
-  preBuild = ''
-    makeFlagsArray+=(PREFIX="$out" LIBDIRNAME=/lib)
-  '';
+  PREFIX = placeholder "out";
+  LIBDIRNAME = "/lib";
 
   checkInputs = [ perl ];
 
diff --git a/pkgs/development/libraries/libgcrypt/1.5.nix b/pkgs/development/libraries/libgcrypt/1.5.nix
index 2ccdd14874a..80cb6641bfb 100644
--- a/pkgs/development/libraries/libgcrypt/1.5.nix
+++ b/pkgs/development/libraries/libgcrypt/1.5.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchurl, libgpgerror, enableCapabilities ? false, libcap }:
+{ lib, stdenv, fetchpatch, fetchurl, libgpgerror, enableCapabilities ? false, libcap }:
 
 assert enableCapabilities -> stdenv.isLinux;
 
@@ -10,6 +10,14 @@ stdenv.mkDerivation rec {
     sha256 = "0ydy7bgra5jbq9mxl5x031nif3m6y3balc6ndw2ngj11wnsjc61h";
   };
 
+  patches = stdenv.lib.optionals stdenv.isDarwin [
+    (fetchpatch {
+      name = "fix-x86_64-apple-darwin.patch";
+      sha256 = "138sfwl1avpy19320dbd63mskspc1khlc93j1f1zmylxx3w19csi";
+      url = "https://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgcrypt.git;a=patch;h=71939faa7c54e7b4b28d115e748a85f134876a02";
+    })
+  ];
+
   buildInputs =
     [ libgpgerror ]
     ++ lib.optional enableCapabilities libcap;
diff --git a/pkgs/development/libraries/libgda/default.nix b/pkgs/development/libraries/libgda/default.nix
index 95860ac9420..bb6402dc428 100644
--- a/pkgs/development/libraries/libgda/default.nix
+++ b/pkgs/development/libraries/libgda/default.nix
@@ -9,11 +9,11 @@ assert postgresSupport -> postgresql != null;
 
 (if stdenv.isAarch64 then overrideCC stdenv gcc6 else stdenv).mkDerivation rec {
   pname = "libgda";
-  version = "5.2.8";
+  version = "5.2.9";
 
   src = fetchurl {
     url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
-    sha256 = "0id4my5wh2m6rd7ijqp2azsjdb4l4yjrv3imq71kly00gjc6v1z2";
+    sha256 = "16vxv2qvysh22s8h9h6irx96sacagxkz0i4qgi1wc6ibly6fvjjr";
   };
   configureFlags = with stdenv.lib; [ "--enable-gi-system-install=no" ]
     ++ (optional (mysqlSupport) "--with-mysql=yes")
diff --git a/pkgs/development/libraries/libiio/default.nix b/pkgs/development/libraries/libiio/default.nix
index ec025d31ce3..ee8029966dc 100644
--- a/pkgs/development/libraries/libiio/default.nix
+++ b/pkgs/development/libraries/libiio/default.nix
@@ -5,13 +5,13 @@
 
 stdenv.mkDerivation rec {
   name = "libiio-${version}";
-  version = "0.17";
+  version = "0.18";
 
   src = fetchFromGitHub {
     owner  = "analogdevicesinc";
     repo   = "libiio";
     rev    = "refs/tags/v${version}";
-    sha256 = "15lghy0zlq667abs1ggbvmb1qiw7vzhhzkw8dm9vzix4ffma2igg";
+    sha256 = "1cmg3ipam101iy9yncwz2y48idaqaw4fg7i9i4c8vfjisfcycnkk";
   };
 
   outputs = [ "out" "lib" "dev" "python" ];
diff --git a/pkgs/development/libraries/libimobiledevice/disable_sslv3.patch b/pkgs/development/libraries/libimobiledevice/disable_sslv3.patch
deleted file mode 100644
index 646b829496f..00000000000
--- a/pkgs/development/libraries/libimobiledevice/disable_sslv3.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From e19de4f0d4cb70e30017edfc6b4ca1b89ffbd381 Mon Sep 17 00:00:00 2001
-From: Franz Pletz <fpletz@fnordicwalking.de>
-Date: Thu, 14 Jan 2016 14:58:23 +0100
-Subject: [PATCH] Disable SSLv3
-
----
- src/idevice.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/idevice.c b/src/idevice.c
-index ce27495..8f03094 100644
---- a/src/idevice.c
-+++ b/src/idevice.c
-@@ -678,7 +678,7 @@ LIBIMOBILEDEVICE_API idevice_error_t idevice_connection_enable_ssl(idevice_conne
- 	}
- 	BIO_set_fd(ssl_bio, (int)(long)connection->data, BIO_NOCLOSE);
- 
--	SSL_CTX *ssl_ctx = SSL_CTX_new(SSLv3_method());
-+	SSL_CTX *ssl_ctx = SSL_CTX_new(SSLv23_method());
- 	if (ssl_ctx == NULL) {
- 		debug_info("ERROR: Could not create SSL context.");
- 		BIO_free(ssl_bio);
--- 
-2.7.0
-
diff --git a/pkgs/development/libraries/libjpeg-turbo/default.nix b/pkgs/development/libraries/libjpeg-turbo/default.nix
index ebcf51dfd03..23fa2f44b46 100644
--- a/pkgs/development/libraries/libjpeg-turbo/default.nix
+++ b/pkgs/development/libraries/libjpeg-turbo/default.nix
@@ -2,29 +2,16 @@
 
 stdenv.mkDerivation rec {
   name = "libjpeg-turbo-${version}";
-  version = "2.0.1";
+  version = "2.0.2";
 
   src = fetchurl {
     url = "mirror://sourceforge/libjpeg-turbo/${name}.tar.gz";
-    sha256 = "1zv6z093l3x3jzygvni7b819j7xhn6d63jhcdrckj7fz67n6ry75";
+    sha256 = "1v9gx1gdzgxf51nd55ncq7rghmj4x9x91rby50ag36irwngmkf5c";
   };
 
   patches =
     stdenv.lib.optional (stdenv.hostPlatform.libc or null == "msvcrt")
-      ./mingw-boolean.patch
-  ++ [
-    ./djpeg-rgb-islow-icc-cmp.patch # https://github.com/libjpeg-turbo/libjpeg-turbo/pull/321
-    (fetchpatch {
-      name = "cve-2018-19664.diff";
-      url = "https://github.com/libjpeg-turbo/libjpeg-turbo/commit/f8cca819a4fb.diff";
-      sha256 = "1kgfag62qmphlrq0mz15g17zw7zrg9nzaz7d2vg50m6m7m5aw4y5";
-    })
-    (fetchpatch {
-      name = "CVE-2018-20330.patch";
-      url = "https://github.com/libjpeg-turbo/libjpeg-turbo/commit/3d9c64e9f8aa1ee954d1d0bb3390fc894bb84da3.diff";
-      sha256 = "1jai8izw6xl05ihx24rpc96d1jcr9rp421cb02pbz3v53cxdasji";
-    })
-  ];
+      ./mingw-boolean.patch;
 
   outputs = [ "bin" "dev" "out" "man" "doc" ];
 
diff --git a/pkgs/development/libraries/libjpeg-turbo/djpeg-rgb-islow-icc-cmp.patch b/pkgs/development/libraries/libjpeg-turbo/djpeg-rgb-islow-icc-cmp.patch
deleted file mode 100644
index c0f7fef4493..00000000000
--- a/pkgs/development/libraries/libjpeg-turbo/djpeg-rgb-islow-icc-cmp.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -999,6 +999,8 @@ foreach(libtype ${TEST_LIBTYPES})
- 
-   add_test(djpeg-${libtype}-rgb-islow-icc-cmp
-     ${MD5CMP} b06a39d730129122e85c1363ed1bbc9e testout_rgb_islow.icc)
-+  set_tests_properties(djpeg-${libtype}-rgb-islow-icc-cmp PROPERTIES
-+    DEPENDS djpeg-${libtype}-rgb-islow)
- 
-   add_bittest(jpegtran icc "-copy;all;-icc;${TESTIMAGES}/test2.icc"
-     testout_rgb_islow2.jpg testout_rgb_islow.jpg ${MD5_JPEG_RGB_ISLOW2})
diff --git a/pkgs/development/libraries/liblcf/default.nix b/pkgs/development/libraries/liblcf/default.nix
index 8154a74aef5..313780a9f0f 100644
--- a/pkgs/development/libraries/liblcf/default.nix
+++ b/pkgs/development/libraries/liblcf/default.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   name = "liblcf-${version}";
-  version = "0.5.4";
+  version = "0.6.0";
 
   src = fetchFromGitHub {
     owner = "EasyRPG";
     repo = "liblcf";
     rev = version;
-    sha256 = "1842hns0rbjncrhwjj7fzg9b3n47adn5jp4dg2zz34gfah3q4ig8";
+    sha256 = "1nhwwb32c3x0y82s0w93k0xz8h6xsd0sb4r1a0my8fd8p5rsnwbi";
   };
 
   nativeBuildInputs = [ autoreconfHook pkgconfig ];
diff --git a/pkgs/development/libraries/libmbim/default.nix b/pkgs/development/libraries/libmbim/default.nix
index 021cfbb1bb4..406b88ea8c1 100644
--- a/pkgs/development/libraries/libmbim/default.nix
+++ b/pkgs/development/libraries/libmbim/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   pname = "libmbim";
-  version = "1.18.0";
+  version = "1.18.2";
 
   src = fetchurl {
     url = "https://www.freedesktop.org/software/libmbim/${pname}-${version}.tar.xz";
-    sha256 = "10mjjy860aakfd3h1yaj9l1jw816amrpwmyqlx37j21xv0l03x3c";
+    sha256 = "0s4jsfsydp2vykv7lnimalp9i680aas1qcx7zdpjiic64b5g48vp";
   };
 
   outputs = [ "out" "dev" "man" ];
diff --git a/pkgs/development/libraries/libnice/default.nix b/pkgs/development/libraries/libnice/default.nix
index e71bcd0e368..d6bb8ec5046 100644
--- a/pkgs/development/libraries/libnice/default.nix
+++ b/pkgs/development/libraries/libnice/default.nix
@@ -1,13 +1,13 @@
 { stdenv, fetchurl, fetchpatch, meson, ninja, pkgconfig, python3, gobject-introspection, gtk-doc, docbook_xsl, docbook_xml_dtd_412, glib, gupnp-igd, gst_all_1, gnutls }:
 
 stdenv.mkDerivation rec {
-  name = "libnice-0.1.15";
+  name = "libnice-0.1.16";
 
   outputs = [ "bin" "out" "dev" "devdoc" ];
 
   src = fetchurl {
     url = "https://nice.freedesktop.org/releases/${name}.tar.gz";
-    sha256 = "1nl7fn07f4i513s9c1s1ic3rki8rm2d000wsf6f4157mb0zhya7p";
+    sha256 = "1pzgxq0qrqlrhd78qnvpfgp8bl5c4znqh599ljaybpcldw37idh6";
   };
 
   patches = [
@@ -18,19 +18,6 @@ stdenv.mkDerivation rec {
       url = https://gitlab.freedesktop.org/libnice/libnice/commit/d470c4bf4f2449f7842df26ca1ce1efb63452bc6.patch;
       sha256 = "0z74vizf92flfw1m83p7yz824vfykmnm0xbnk748bnnyq186i6mg";
     })
-
-    # Fix test-different-number-streams
-    # https://gitlab.freedesktop.org/libnice/libnice/merge_requests/36
-    (fetchpatch {
-      url = https://gitlab.freedesktop.org/libnice/libnice/commit/a38c2adfc4bed2a69dc02568417f0926dd555b9a.patch;
-      sha256 = "1rh4z4iknrimmm3b3v8ln8vl3dsqi91g4vf0dl85348kvnf0sv6z";
-    })
-    # Fix test-gstreamer
-    # https://gitlab.freedesktop.org/libnice/libnice/merge_requests/35
-    (fetchpatch {
-      url = https://gitlab.freedesktop.org/libnice/libnice/commit/02de1fa1956105b09d9db4fd6331452b0ff0b8a2.patch;
-      sha256 = "12dymq1v20wj5n1cway4n3y8fkra1ffnpj5w7pbz38i612b82qw0";
-    })
   ];
 
   nativeBuildInputs = [ meson ninja pkgconfig python3 gobject-introspection gtk-doc docbook_xsl docbook_xml_dtd_412 ];
diff --git a/pkgs/development/libraries/libnsl/cdefs.patch b/pkgs/development/libraries/libnsl/cdefs.patch
deleted file mode 100644
index dbbe800a347..00000000000
--- a/pkgs/development/libraries/libnsl/cdefs.patch
+++ /dev/null
@@ -1,30 +0,0 @@
---- a/src/rpcsvc/nislib.h
-+++ b/src/rpcsvc/nislib.h
-@@ -19,6 +19,7 @@
- #ifndef	__RPCSVC_NISLIB_H__
- #define	__RPCSVC_NISLIB_H__
- 
-+#include <sys/cdefs.h>
- #include <features.h>
- 
- __BEGIN_DECLS
---- a/src/rpcsvc/ypclnt.h
-+++ b/src/rpcsvc/ypclnt.h
-@@ -20,6 +20,7 @@
- #ifndef	__RPCSVC_YPCLNT_H__
- #define	__RPCSVC_YPCLNT_H__
- 
-+#include <sys/cdefs.h>
- #include <features.h>
- 
- /* Some defines */
---- a/src/rpcsvc/ypupd.h
-+++ b/src/rpcsvc/ypupd.h
-@@ -33,6 +33,7 @@
- #ifndef __RPCSVC_YPUPD_H__
- #define __RPCSVC_YPUPD_H__
- 
-+#include <sys/cdefs.h>
- #include <features.h>
- 
- #include <rpc/rpc.h>
diff --git a/pkgs/development/libraries/libnsl/default.nix b/pkgs/development/libraries/libnsl/default.nix
index 9e8a46b2e6b..79006484743 100644
--- a/pkgs/development/libraries/libnsl/default.nix
+++ b/pkgs/development/libraries/libnsl/default.nix
@@ -1,21 +1,19 @@
 { stdenv, fetchFromGitHub, autoreconfHook, libtirpc, pkgconfig }:
 
 stdenv.mkDerivation rec {
-  name = "libnsl-${version}";
-  version = "1.1.0";
+  pname = "libnsl";
+  version = "1.2.0";
 
   src = fetchFromGitHub {
     owner = "thkukuk";
-    repo = "libnsl";
-    rev = "libnsl-${version}";
-    sha256 = "0h8br0gmgw3fp5fmy6bfbj1qlk9hry1ssg25ssjgxbd8spczpscs";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "1chzqhcgh0yia9js8mh92cmhyka7rh32ql6b3mgdk26n94dqzs8b";
   };
 
   nativeBuildInputs = [ autoreconfHook pkgconfig ];
   buildInputs = [ libtirpc ];
 
-  patches = stdenv.lib.optionals stdenv.hostPlatform.isMusl [ ./cdefs.patch ./nis_h.patch ];
-
   meta = with stdenv.lib; {
     description = "Client interface library for NIS(YP) and NIS+";
     homepage = https://github.com/thkukuk/libnsl;
diff --git a/pkgs/development/libraries/libnsl/nis_h.patch b/pkgs/development/libraries/libnsl/nis_h.patch
deleted file mode 100644
index 199259df2e8..00000000000
--- a/pkgs/development/libraries/libnsl/nis_h.patch
+++ /dev/null
@@ -1,45 +0,0 @@
---- a/src/rpcsvc/nis.h
-+++ b/src/rpcsvc/nis.h
-@@ -32,6 +32,7 @@
- #ifndef _RPCSVC_NIS_H
- #define _RPCSVC_NIS_H 1
- 
-+#include <sys/cdefs.h>
- #include <features.h>
- #include <rpc/rpc.h>
- #include <rpcsvc/nis_tags.h>
-@@ -56,6 +57,34 @@
-  *                                              <kukuk@suse.de>
-  */
- 
-+#ifndef rawmemchr
-+#define rawmemchr(s,c) memchr((s),(size_t)-1,(c))
-+#endif
-+
-+#ifndef __asprintf
-+#define __asprintf asprintf
-+#endif
-+
-+#ifndef __mempcpy
-+#define __mempcpy mempcpy
-+#endif
-+
-+#ifndef __strtok_r
-+#define __strtok_r strtok_r
-+#endif
-+
-+#ifndef __always_inline
-+#define __always_inline __attribute__((__always_inline__))
-+#endif
-+
-+#ifndef TEMP_FAILURE_RETRY
-+#define TEMP_FAILURE_RETRY(exp) ({ \
-+typeof (exp) _rc; \
-+ do { \
-+  _rc = (exp); \
-+ } while (_rc == -1 && errno == EINTR); \
-+ _rc; })
-+#endif
- 
- #ifndef __nis_object_h
- #define __nis_object_h
diff --git a/pkgs/development/libraries/libosinfo/default.nix b/pkgs/development/libraries/libosinfo/default.nix
index e947ec22bf8..9efeb0f678e 100644
--- a/pkgs/development/libraries/libosinfo/default.nix
+++ b/pkgs/development/libraries/libosinfo/default.nix
@@ -3,11 +3,12 @@
 }:
 
 stdenv.mkDerivation rec {
-  name = "libosinfo-1.4.0";
+  pname = "libosinfo";
+  version = "1.5.0";
 
   src = fetchurl {
-    url = "https://releases.pagure.org/libosinfo/${name}.tar.gz";
-    sha256 = "0ra1p2rnnwkq0181ayn0l0rs1pvk4a0i8fa08nqjfmqs5fl637m2";
+    url = "https://releases.pagure.org/${pname}/${pname}-${version}.tar.gz";
+    sha256 = "12b0xj9fz9q91d1pz9xm6aqap5k1ip0m9m3qvqmwjy1lk1kjasdz";
   };
 
   outputs = [ "out" "dev" "devdoc" ];
diff --git a/pkgs/development/libraries/libpointmatcher/default.nix b/pkgs/development/libraries/libpointmatcher/default.nix
index 2b8fc1fcc8f..cd841a9d8f8 100644
--- a/pkgs/development/libraries/libpointmatcher/default.nix
+++ b/pkgs/development/libraries/libpointmatcher/default.nix
@@ -1,17 +1,18 @@
-{stdenv, fetchFromGitHub, cmake, eigen, boost, libnabo}:
+{ stdenv, fetchFromGitHub, cmake, eigen, boost, libnabo }:
 
 stdenv.mkDerivation rec {
-  version = "2016-09-11";
-  name = "libpointmatcher-${version}";
+  pname = "libpointmatcher";
+  version = "1.3.1";
 
   src = fetchFromGitHub {
     owner = "ethz-asl";
-    repo = "libpointmatcher";
-    rev = "75044815d40ff934fe0bb7e05ed8bbf18c06493b";
-    sha256 = "1s7ilvg3lhr1fq8sxw05ydmbd3kl46496jnyxprhnpgvpmvqsbzl";
+    repo = pname;
+    rev = version;
+    sha256 = "0lai6sr3a9dj1j4pgjjyp7mx10wixy5wpvbka8nsc2danj6xhdyd";
   };
 
-  buildInputs = [cmake eigen boost libnabo];
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ eigen boost libnabo ];
 
   enableParallelBuilding = true;
 
@@ -19,11 +20,11 @@ stdenv.mkDerivation rec {
     -DEIGEN_INCLUDE_DIR=${eigen}/include/eigen3
   ";
 
+  doCheck = true;
   checkPhase = ''
-  export LD_LIBRARY_PATH=$PWD
-  ./utest/utest --path ../examples/data/
+    export LD_LIBRARY_PATH=$PWD
+    ./utest/utest --path ../examples/data/
   '';
-  doCheck = true;
 
   meta = with stdenv.lib; {
     inherit (src.meta) homepage;
diff --git a/pkgs/development/libraries/libproxy/default.nix b/pkgs/development/libraries/libproxy/default.nix
index 0e0499251eb..3b050c3dc6a 100644
--- a/pkgs/development/libraries/libproxy/default.nix
+++ b/pkgs/development/libraries/libproxy/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, pkgconfig, cmake, zlib
+{ stdenv, fetchFromGitHub, pkgconfig, cmake, zlib, fetchpatch
 , dbus, networkmanager, spidermonkey_38, pcre, python2, python3
 , SystemConfiguration, CoreFoundation, JavaScriptCore }:
 
@@ -30,6 +30,12 @@ stdenv.mkDerivation rec {
     )
   '';
 
+  patches = stdenv.lib.optional stdenv.isDarwin
+    (fetchpatch {
+      url = "https://github.com/libproxy/libproxy/commit/44158f03f8522116758d335688ed840dfcb50ac8.patch";
+      sha256 = "0axfvb6j7gcys6fkwi9dkn006imhvm3kqr83gpwban8419n0q5v1";
+    });
+
   doCheck = false; # fails 1 out of 10 tests
 
   meta = with stdenv.lib; {
diff --git a/pkgs/development/libraries/libqmi/default.nix b/pkgs/development/libraries/libqmi/default.nix
index 083b5c8bc85..8a239048390 100644
--- a/pkgs/development/libraries/libqmi/default.nix
+++ b/pkgs/development/libraries/libqmi/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   pname = "libqmi";
-  version = "1.22.2";
+  version = "1.22.4";
 
   src = fetchurl {
     url = "https://www.freedesktop.org/software/libqmi/${pname}-${version}.tar.xz";
-    sha256 = "09w20dsgr16bgbqw5ds7r6j2s6ihwyalh9zpbjhcn7cvm0afbwgi";
+    sha256 = "1wgrrb9vb3myl8xgck8ik86876ycbg8crylybs3ssi21vrxqwnsc";
   };
 
   outputs = [ "out" "dev" "devdoc" ];
diff --git a/pkgs/development/libraries/libressl/default.nix b/pkgs/development/libraries/libressl/default.nix
index 11ed2eb0044..e694c353df0 100644
--- a/pkgs/development/libraries/libressl/default.nix
+++ b/pkgs/development/libraries/libressl/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, lib }:
+{ stdenv, fetchurl, lib, cmake }:
 
 let
 
@@ -11,7 +11,17 @@ let
       inherit sha256;
     };
 
-    configureFlags = [ "--enable-nc" ];
+    nativeBuildInputs = [ cmake ];
+
+    cmakeFlags = [ "-DENABLE_NC=ON" "-DBUILD_SHARED_LIBS=ON" ];
+
+    # The autoconf build is broken as of 2.9.1, resulting in the following error:
+    # libressl-2.9.1/tls/.libs/libtls.a', needed by 'handshake_table'.
+    # Fortunately LibreSSL provides a CMake build as well, so opt for CMake by
+    # removing ./configure pre-config.
+    preConfigure = ''
+      rm configure
+    '';
 
     enableParallelBuilding = true;
 
@@ -19,6 +29,8 @@ let
 
     postFixup = ''
       moveToOutput "bin/nc" "$nc"
+      moveToOutput "bin/openssl" "$bin"
+      moveToOutput "bin/ocspcheck" "$bin"
       moveToOutput "share/man/man1/nc.1${lib.optionalString (dontGzipMan==null) ".gz"}" "$nc"
     '';
 
@@ -46,7 +58,7 @@ in {
   };
 
   libressl_2_9 = generic {
-    version = "2.9.0";
-    sha256 = "1x1wl6b449m6hfhyxxzxbf2v8yfb5q92q6d01hdg28xp1222jpzb";
+    version = "2.9.1";
+    sha256 = "1y32iz64rqh74m1g641b39h3293dqi4la7i0ckai1p4lcs2xvr1r";
   };
 }
diff --git a/pkgs/development/libraries/libsass/default.nix b/pkgs/development/libraries/libsass/default.nix
index 54108e1a007..ce43ed73432 100644
--- a/pkgs/development/libraries/libsass/default.nix
+++ b/pkgs/development/libraries/libsass/default.nix
@@ -9,6 +9,14 @@ stdenv.mkDerivation rec {
     sha256 = "0w6v1xa00jvfyk4b29ir7dfkhiq72anz015gg580bi7x3n7saz28";
   };
 
+  patches = [
+    (fetchpatch {
+      name = "CVE-2018-19827.patch";
+      url = "https://github.com/sass/libsass/commit/b21fb9f84096d9927780b86fa90629a096af358d.patch";
+      sha256 = "0ix12x9plmpgs3xda2fjdcykca687h16qfwqr57i5qphjr9vp33l";
+    })
+  ];
+
   preConfigure = ''
     export LIBSASS_VERSION=${version}
   '';
diff --git a/pkgs/development/libraries/libseccomp/default.nix b/pkgs/development/libraries/libseccomp/default.nix
index 54ca09a7b0d..6b38bcf2c77 100644
--- a/pkgs/development/libraries/libseccomp/default.nix
+++ b/pkgs/development/libraries/libseccomp/default.nix
@@ -28,7 +28,11 @@ stdenv.mkDerivation rec {
     homepage    = "https://github.com/seccomp/libseccomp";
     license     = licenses.lgpl21;
     platforms   = platforms.linux;
-    badPlatforms = platforms.riscv;
+    badPlatforms = [
+      "alpha-linux"
+      "riscv64-linux" "riscv32-linux"
+      "sparc-linux" "sparc64-linux"
+    ];
     maintainers = with maintainers; [ thoughtpolice ];
   };
 }
diff --git a/pkgs/development/libraries/libshout/default.nix b/pkgs/development/libraries/libshout/default.nix
index ef023640621..3753a070c63 100644
--- a/pkgs/development/libraries/libshout/default.nix
+++ b/pkgs/development/libraries/libshout/default.nix
@@ -4,11 +4,11 @@
 # need pkgconfig so that libshout installs ${out}/lib/pkgconfig/shout.pc
 
 stdenv.mkDerivation rec {
-  name = "libshout-2.4.1";
+  name = "libshout-2.4.2";
 
   src = fetchurl {
     url = "http://downloads.xiph.org/releases/libshout/${name}.tar.gz";
-    sha256 = "0kgjpf8jkgyclw11nilxi8vyjk4s8878x23qyxnvybbgqbgbib7k";
+    sha256 = "0qgwarqp2p6jy3zadds6dzj8z1jfb2mbwc3lsdlidf527h0a86ym";
   };
 
   outputs = [ "out" "dev" "doc" ];
diff --git a/pkgs/development/libraries/libsnark/darwin-fix-clock-gettime.patch b/pkgs/development/libraries/libsnark/darwin-fix-clock-gettime.patch
deleted file mode 100644
index 2eee84d1c4b..00000000000
--- a/pkgs/development/libraries/libsnark/darwin-fix-clock-gettime.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-Adapted from https://github.com/zcash/libsnark/pull/10
-
-diff --git a/depends/libff/libff/common/profiling.cpp b/depends/libff/libff/common/profiling.cpp
-index f2a1985..319149c 100755
---- a/depends/libff/libff/common/profiling.cpp
-+++ b/depends/libff/libff/common/profiling.cpp
-@@ -27,6 +27,13 @@
- #include <proc/readproc.h>
- #endif
- 
-+#ifdef __MACH__
-+#include <time.h>
-+#include <sys/time.h>
-+#include <mach/clock.h>
-+#include <mach/mach.h>
-+#endif
-+
- namespace libff {
- 
- long long get_nsec_time()
-@@ -42,10 +49,20 @@ long long get_nsec_cpu_time()
- 	return 0;
- #else
-     ::timespec ts;
-+#ifdef __MACH__
-+    clock_serv_t cclock;
-+    mach_timespec_t mts;
-+    host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &cclock);
-+    clock_get_time(cclock, &mts);
-+    mach_port_deallocate(mach_task_self(), cclock);
-+    ts.tv_sec = mts.tv_sec;
-+    ts.tv_nsec = mts.tv_nsec;
-+#else
-     if ( ::clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &ts) )
-         throw ::std::runtime_error("clock_gettime(CLOCK_PROCESS_CPUTIME_ID) failed");
-         // If we expected this to work, don't silently ignore failures, because that would hide the problem and incur an unnecessarily system-call overhead. So if we ever observe this exception, we should probably add a suitable #ifdef .
-         //TODO: clock_gettime(CLOCK_PROCESS_CPUTIME_ID) is not supported by native Windows. What about Cygwin? Should we #ifdef on CLOCK_PROCESS_CPUTIME_ID or on __linux__?
-+#endif
-     return ts.tv_sec * 1000000000ll + ts.tv_nsec;
- #endif
- }
diff --git a/pkgs/development/libraries/libsnark/default.nix b/pkgs/development/libraries/libsnark/default.nix
index 4ea2209160f..15d8169f102 100644
--- a/pkgs/development/libraries/libsnark/default.nix
+++ b/pkgs/development/libraries/libsnark/default.nix
@@ -19,8 +19,6 @@ in stdenv.mkDerivation rec {
     fetchSubmodules = true;
   };
 
-  patches = [ ./darwin-fix-clock-gettime.patch ];
-
   enableParallelBuilding = true;
 
   meta = with stdenv.lib; {
diff --git a/pkgs/development/libraries/libsoup/default.nix b/pkgs/development/libraries/libsoup/default.nix
index d0023a3d4f3..61cad10c190 100644
--- a/pkgs/development/libraries/libsoup/default.nix
+++ b/pkgs/development/libraries/libsoup/default.nix
@@ -5,11 +5,11 @@
 stdenv.mkDerivation rec {
   name = "${pname}-${version}";
   pname = "libsoup";
-  version = "2.66.0";
+  version = "2.66.1";
 
   src = fetchurl {
     url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${name}.tar.xz";
-    sha256 = "08c9kkdhzy504gv23pfdm4sq3dd3j20sikwz6gv0qrwcdjnw5bai";
+    sha256 = "1zs3bhspwg7fggxd7x1rrggpkcf2j9ch6dhncq9syh252z0vcb2a";
   };
 
   postPatch = ''
diff --git a/pkgs/development/libraries/libtins/default.nix b/pkgs/development/libraries/libtins/default.nix
index 1af7548ac96..483fb56f43b 100644
--- a/pkgs/development/libraries/libtins/default.nix
+++ b/pkgs/development/libraries/libtins/default.nix
@@ -31,7 +31,11 @@ stdenv.mkDerivation rec {
 
   enableParallelBuilding = true;
   doCheck = true;
-  checkPhase = "make tests && LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/lib make test";
+  preCheck = ''
+    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/lib
+    export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$PWD/lib
+  '';
+  checkTarget = "tests test";
 
   meta = with stdenv.lib; {
     description = "High-level, multiplatform C++ network packet sniffing and crafting library";
diff --git a/pkgs/development/libraries/libu2f-host/default.nix b/pkgs/development/libraries/libu2f-host/default.nix
index c163720f56e..ad0557049e3 100644
--- a/pkgs/development/libraries/libu2f-host/default.nix
+++ b/pkgs/development/libraries/libu2f-host/default.nix
@@ -1,11 +1,12 @@
 { stdenv, fetchurl, pkgconfig, json_c, hidapi }:
 
 stdenv.mkDerivation rec {
-  name = "libu2f-host-1.1.9";
+  pname = "libu2f-host";
+  version = "1.1.10";
 
   src = fetchurl {
-    url = "https://developers.yubico.com/libu2f-host/Releases/${name}.tar.xz";
-    sha256 = "1hnh3f4scx07v9jfkr1nnxasmydk1cmivn0nijcp2p75bc1fznip";
+    url = "https://developers.yubico.com/${pname}/Releases/${pname}-${version}.tar.xz";
+    sha256 = "0vrivl1dwql6nfi48z6dy56fwy2z13d7abgahgrs2mcmqng7hra2";
   };
 
   nativeBuildInputs = [ pkgconfig ];
diff --git a/pkgs/development/libraries/libusb1/default.nix b/pkgs/development/libraries/libusb1/default.nix
index ac5c38a34f1..0620163bb32 100644
--- a/pkgs/development/libraries/libusb1/default.nix
+++ b/pkgs/development/libraries/libusb1/default.nix
@@ -1,6 +1,6 @@
-{ stdenv, fetchurl, pkgconfig, systemd ? null, libobjc, IOKit }:
+{ stdenv, fetchurl, pkgconfig, systemd ? null, libobjc, IOKit, withStatic ? false }:
 
-stdenv.mkDerivation rec {
+stdenv.mkDerivation (rec {
   name = "libusb-1.0.22";
 
   src = fetchurl {
@@ -32,4 +32,8 @@ stdenv.mkDerivation rec {
     license = licenses.lgpl21Plus;
     maintainers = [ ];
   };
-}
+} // stdenv.lib.optionalAttrs withStatic {
+  # Carefully added here to avoid a mass rebuild.
+  # Inline this the next time this package changes.
+  dontDisableStatic = withStatic;
+})
diff --git a/pkgs/development/libraries/libuv/default.nix b/pkgs/development/libraries/libuv/default.nix
index 32697bdc0e0..78abbe7392c 100644
--- a/pkgs/development/libraries/libuv/default.nix
+++ b/pkgs/development/libraries/libuv/default.nix
@@ -1,14 +1,14 @@
 { stdenv, lib, fetchpatch, fetchFromGitHub, autoconf, automake, libtool, pkgconfig, ApplicationServices, CoreServices }:
 
 stdenv.mkDerivation rec {
-  version = "1.27.0";
+  version = "1.28.0";
   pname = "libuv";
 
   src = fetchFromGitHub {
     owner = pname;
     repo = pname;
     rev = "v${version}";
-    sha256 = "1nhd3772qymlv0b251wg9rrqz279vki4hnd4s23yyll0kpmzkpac";
+    sha256 = "0l0gx69sdy3sv3pirjbca2ws54n9d83mj0j96h77k0ncywimvi64";
   };
 
   postPatch = let
@@ -17,6 +17,8 @@ stdenv.mkDerivation rec {
       "spawn_setuid_fails" "spawn_setgid_fails" "fs_chown" # user namespaces
       "getaddrinfo_fail" "getaddrinfo_fail_sync"
       "threadpool_multiple_event_loops" # times out on slow machines
+      "get_passwd" # passed on NixOS but failed on other Linuxes
+      "tcp_writealot" # times out sometimes
     ] ++ stdenv.lib.optionals stdenv.isDarwin [
         # Sometimes: timeout (no output), failed uv_listen. Someone
         # should report these failures to libuv team. There tests should
diff --git a/pkgs/development/libraries/libva/default.nix b/pkgs/development/libraries/libva/default.nix
index 7f17b9af08b..752d56a344e 100644
--- a/pkgs/development/libraries/libva/default.nix
+++ b/pkgs/development/libraries/libva/default.nix
@@ -6,14 +6,14 @@
 
 stdenv.mkDerivation rec {
   name = "libva-${lib.optionalString minimal "minimal-"}${version}";
-  version = "2.4.0";
+  version = "2.4.1";
 
   # update libva-utils and vaapiIntel as well
   src = fetchFromGitHub {
     owner  = "01org";
     repo   = "libva";
     rev    = version;
-    sha256 = "1b58n6rjfsfjfw1s5kdfa0jpfiqs83g2w14s7sfp1qkckkz3988l";
+    sha256 = "06kqff05jhd87yi53gyc2qivgg4sbf19qyznm9s4dyz92k04cl5c";
   };
 
   outputs = [ "dev" "out" ];
diff --git a/pkgs/development/libraries/libwmf/CVE-2006-3376.patch b/pkgs/development/libraries/libwmf/CVE-2006-3376.patch
deleted file mode 100644
index 4c7519d9c10..00000000000
--- a/pkgs/development/libraries/libwmf/CVE-2006-3376.patch
+++ /dev/null
@@ -1,28 +0,0 @@
---- libwmf-0.2.8.4.orig/src/player.c
-+++ libwmf-0.2.8.4/src/player.c
-@@ -23,6 +23,7 @@
- 
- #include <stdio.h>
- #include <stdlib.h>
-+#include <stdint.h>
- #include <string.h>
- #include <math.h>
- 
-@@ -132,8 +133,14 @@
- 		}
- 	}
- 
--/*	P->Parameters = (unsigned char*) wmf_malloc (API,(MAX_REC_SIZE(API)-3) * 2 * sizeof (unsigned char));
-- */	P->Parameters = (unsigned char*) wmf_malloc (API,(MAX_REC_SIZE(API)  ) * 2 * sizeof (unsigned char));
-+	if (MAX_REC_SIZE(API) > UINT32_MAX / 2)
-+	{
-+		API->err = wmf_E_InsMem;
-+		WMF_DEBUG (API,"bailing...");
-+		return (API->err);
-+	}
-+
-+ 	P->Parameters = (unsigned char*) wmf_malloc (API,(MAX_REC_SIZE(API)  ) * 2 * sizeof (unsigned char));
- 
- 	if (ERR (API))
- 	{	WMF_DEBUG (API,"bailing...");
-
diff --git a/pkgs/development/libraries/libwmf/CVE-2009-1364.patch b/pkgs/development/libraries/libwmf/CVE-2009-1364.patch
deleted file mode 100644
index e2a4501662c..00000000000
--- a/pkgs/development/libraries/libwmf/CVE-2009-1364.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- libwmf-0.2.8.4.orig/src/extra/gd/gd_clip.c
-+++ libwmf-0.2.8.4/src/extra/gd/gd_clip.c
-@@ -70,6 +70,7 @@
- 	{	more = gdRealloc (im->clip->list,(im->clip->max + 8) * sizeof (gdClipRectangle));
- 		if (more == 0) return;
- 		im->clip->max += 8;
-+		im->clip->list = more;
- 	}
- 	im->clip->list[im->clip->count] = (*rect);
- 	im->clip->count++;
-
diff --git a/pkgs/development/libraries/libwmf/CVE-2015-0848+4588+4695+4696.patch b/pkgs/development/libraries/libwmf/CVE-2015-0848+4588+4695+4696.patch
deleted file mode 100644
index 54d47800298..00000000000
--- a/pkgs/development/libraries/libwmf/CVE-2015-0848+4588+4695+4696.patch
+++ /dev/null
@@ -1,186 +0,0 @@
---- libwmf-0.2.8.4.orig/src/player/meta.h
-+++ libwmf-0.2.8.4/src/player/meta.h
-@@ -1565,7 +1565,7 @@ static int meta_rgn_create (wmfAPI* API,
- 	objects = P->objects;
- 
- 	i = 0;
--	while (objects[i].type && (i < NUM_OBJECTS (API))) i++;
-+	while ((i < NUM_OBJECTS (API)) && objects[i].type) i++;
- 
- 	if (i == NUM_OBJECTS (API))
- 	{	WMF_ERROR (API,"Object out of range!");
-@@ -2142,7 +2142,7 @@ static int meta_dib_brush (wmfAPI* API,w
- 	objects = P->objects;
- 
- 	i = 0;
--	while (objects[i].type && (i < NUM_OBJECTS (API))) i++;
-+	while ((i < NUM_OBJECTS (API)) && objects[i].type) i++;
- 
- 	if (i == NUM_OBJECTS (API))
- 	{	WMF_ERROR (API,"Object out of range!");
-@@ -2593,9 +2593,10 @@ static int meta_dc_restore (wmfAPI* API,
- 		polyrect.BR = 0;
- 
- 		polyrect.count = 0;
-+	
-+		if (FR->region_clip) FR->region_clip (API,&polyrect);
- 	}
- 
--	if (FR->region_clip) FR->region_clip (API,&polyrect);
- 
- 	return (changed);
- }
-@@ -3067,7 +3068,7 @@ static int meta_pen_create (wmfAPI* API,
- 	objects = P->objects;
- 
- 	i = 0;
--	while (objects[i].type && (i < NUM_OBJECTS (API))) i++;
-+	while ((i < NUM_OBJECTS (API)) && objects[i].type) i++;
- 
- 	if (i == NUM_OBJECTS (API))
- 	{	WMF_ERROR (API,"Object out of range!");
-@@ -3181,7 +3182,7 @@ static int meta_brush_create (wmfAPI* AP
- 	objects = P->objects;
- 
- 	i = 0;
--	while (objects[i].type && (i < NUM_OBJECTS (API))) i++;
-+	while ((i < NUM_OBJECTS (API)) && objects[i].type) i++;
- 
- 	if (i == NUM_OBJECTS (API))
- 	{	WMF_ERROR (API,"Object out of range!");
-@@ -3288,7 +3289,7 @@ static int meta_font_create (wmfAPI* API
- 	objects = P->objects;
- 
- 	i = 0;
--	while (objects[i].type && (i < NUM_OBJECTS (API))) i++;
-+	while ((i < NUM_OBJECTS (API)) && objects[i].type) i++;
- 
- 	if (i == NUM_OBJECTS (API))
- 	{	WMF_ERROR (API,"Object out of range!");
-@@ -3396,7 +3397,7 @@ static int meta_palette_create (wmfAPI*
- 	objects = P->objects;
- 
- 	i = 0;
--	while (objects[i].type && (i < NUM_OBJECTS (API))) i++;
-+	while ((i < NUM_OBJECTS (API)) && objects[i].type) i++;
- 
- 	if (i == NUM_OBJECTS (API))
- 	{	WMF_ERROR (API,"Object out of range!");
---- libwmf-0.2.8.4.orig/src/ipa/ipa.h
-+++ libwmf-0.2.8.4/src/ipa/ipa.h
-@@ -48,7 +48,7 @@ static int            ReadBlobByte (BMPS
- static unsigned short ReadBlobLSBShort (BMPSource*);
- static unsigned long  ReadBlobLSBLong (BMPSource*);
- static long           TellBlob (BMPSource*);
--static void           DecodeImage (wmfAPI*,wmfBMP*,BMPSource*,unsigned int,unsigned char*);
-+static int            DecodeImage (wmfAPI*,wmfBMP*,BMPSource*,unsigned int,unsigned char*);
- static void           ReadBMPImage (wmfAPI*,wmfBMP*,BMPSource*);
- static int            ExtractColor (wmfAPI*,wmfBMP*,wmfRGB*,unsigned int,unsigned int);
- static void           SetColor (wmfAPI*,wmfBMP*,wmfRGB*,unsigned char,unsigned int,unsigned int);
---- libwmf-0.2.8.4.orig/src/ipa/ipa/bmp.h
-+++ libwmf-0.2.8.4/src/ipa/ipa/bmp.h
-@@ -859,7 +859,7 @@ static long TellBlob (BMPSource* src)
- %
- %
- */
--static void DecodeImage (wmfAPI* API,wmfBMP* bmp,BMPSource* src,unsigned int compression,unsigned char* pixels)
-+static int DecodeImage (wmfAPI* API,wmfBMP* bmp,BMPSource* src,unsigned int compression,unsigned char* pixels)
- {	int byte;
- 	int count;
- 	int i;
-@@ -870,12 +870,14 @@ static void DecodeImage (wmfAPI* API,wmf
- 	U32 u;
- 
- 	unsigned char* q;
-+	unsigned char* end;
- 
- 	for (u = 0; u < ((U32) bmp->width * (U32) bmp->height); u++) pixels[u] = 0;
- 
- 	byte = 0;
- 	x = 0;
- 	q = pixels;
-+	end = pixels + bmp->width * bmp->height;
- 
- 	for (y = 0; y < bmp->height; )
- 	{	count = ReadBlobByte (src);
-@@ -884,7 +886,10 @@ static void DecodeImage (wmfAPI* API,wmf
- 		{	/* Encoded mode. */
- 			byte = ReadBlobByte (src);
- 			for (i = 0; i < count; i++)
--			{	if (compression == 1)
-+			{	
-+				if (q == end)
-+					return 0;
-+			 	if (compression == 1)
- 				{	(*(q++)) = (unsigned char) byte;
- 				}
- 				else
-@@ -896,13 +901,15 @@ static void DecodeImage (wmfAPI* API,wmf
- 		else
- 		{	/* Escape mode. */
- 			count = ReadBlobByte (src);
--			if (count == 0x01) return;
-+			if (count == 0x01) return 1;
- 			switch (count)
- 			{
- 			case 0x00:
- 			 {	/* End of line. */
- 				x = 0;
- 				y++;
-+				if (y >= bmp->height)
-+					return 0;
- 				q = pixels + y * bmp->width;
- 				break;
- 			 }
-@@ -910,13 +917,20 @@ static void DecodeImage (wmfAPI* API,wmf
- 			 {	/* Delta mode. */
- 				x += ReadBlobByte (src);
- 				y += ReadBlobByte (src);
-+				if (y >= bmp->height)
-+					return 0;
-+				if (x >= bmp->width)
-+					return 0;
- 				q = pixels + y * bmp->width + x;
- 				break;
- 			 }
- 			default:
- 			 {	/* Absolute mode. */
- 				for (i = 0; i < count; i++)
--				{	if (compression == 1)
-+				{
-+					if (q == end)
-+						return 0;
-+					if (compression == 1)
- 					{	(*(q++)) = ReadBlobByte (src);
- 					}
- 					else
-@@ -943,7 +957,7 @@ static void DecodeImage (wmfAPI* API,wmf
- 	byte = ReadBlobByte (src);  /* end of line */
- 	byte = ReadBlobByte (src);
- 
--	return;
-+	return 1;
- }
- 
- /*
-@@ -1143,8 +1157,18 @@ static void ReadBMPImage (wmfAPI* API,wm
- 		}
- 	}
- 	else
--	{	/* Convert run-length encoded raster pixels. */
--		DecodeImage (API,bmp,src,(unsigned int) bmp_info.compression,data->image);
-+	{
-+		if (bmp_info.bits_per_pixel == 8)	/* Convert run-length encoded raster pixels. */
-+		{
-+			if (!DecodeImage (API,bmp,src,(unsigned int) bmp_info.compression,data->image))
-+			{	WMF_ERROR (API,"corrupt bmp");
-+				API->err = wmf_E_BadFormat;
-+			}
-+		}
-+		else
-+		{	WMF_ERROR (API,"Unexpected pixel depth");
-+			API->err = wmf_E_BadFormat;
-+		}
- 	}
- 
- 	if (ERR (API))
diff --git a/pkgs/development/libraries/libwmf/default.nix b/pkgs/development/libraries/libwmf/default.nix
index bf685862adf..e7aa5f7ecc9 100644
--- a/pkgs/development/libraries/libwmf/default.nix
+++ b/pkgs/development/libraries/libwmf/default.nix
@@ -1,31 +1,27 @@
-{ stdenv, fetchurl, fetchpatch, zlib, imagemagick, libpng, pkgconfig, glib
-, freetype, libjpeg, libxml2 }:
+{ stdenv, fetchFromGitHub, pkgconfig
+, freetype, glib, imagemagick, libjpeg, libpng, libxml2, zlib
+}:
 
-stdenv.mkDerivation {
-  name = "libwmf-0.2.8.4";
+stdenv.mkDerivation rec {
+  pname = "libwmf";
+  version = "0.2.12";
 
-  src = fetchurl {
-    url = mirror://sourceforge/wvware/libwmf-0.2.8.4.tar.gz;
-    sha256 = "1y3wba4q8pl7kr51212jwrsz1x6nslsx1gsjml1x0i8549lmqd2v";
+  src = fetchFromGitHub {
+    owner = "caolanm";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "0i2w5hg8mbgmgabxyd48qp1gx2mhk33hgr3jqvg72k0nhkd2jhf6";
   };
 
   nativeBuildInputs = [ pkgconfig ];
   buildInputs = [ zlib imagemagick libpng glib freetype libjpeg libxml2 ];
-
-  patches = [
-    ./CVE-2006-3376.patch ./CVE-2009-1364.patch
-    ./CVE-2015-0848+4588+4695+4696.patch
-    (fetchpatch {
-      name = "libwmf-0.2.8.4-CVE-2016-9011-debian.patch";
-      url = "https://bugs.debian.org/cgi-bin/bugreport.cgi?att=1;bug=842090;filename=libwmf-0.2.8.4-CVE-2016-9011-debian.patch;msg=10";
-      sha256 = "15vnqrj1dlvn0g8ccrxj2r2cyb1rv0qf0kfangxfgsi5h8is0c2b";
-    })
-  ];
+  enableParallelBuilding = true;
 
   meta = with stdenv.lib; {
     description = "WMF library from wvWare";
-    homepage = http://wvware.sourceforge.net/libwmf.html;
-    license = licenses.gpl2;
+    homepage = "http://wvware.sourceforge.net/libwmf.html";
+    downloadPage = "https://github.com/caolanm/libwmf/releases";
+    license = licenses.gpl2Plus;
     platforms = platforms.unix;
   };
 }
diff --git a/pkgs/development/libraries/libx86emu/default.nix b/pkgs/development/libraries/libx86emu/default.nix
index 93f78a7eb8f..2e00b5b5ab9 100644
--- a/pkgs/development/libraries/libx86emu/default.nix
+++ b/pkgs/development/libraries/libx86emu/default.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   name = "libx86emu-${version}";
-  version = "2.2";
+  version = "2.3";
 
   src = fetchFromGitHub {
     owner = "wfeldt";
     repo = "libx86emu";
     rev = version;
-    sha256 = "10amjaamd6jfwqxrinsbkqmm6jjrwzyqjp8qy3hm71vkg6fr20gy";
+    sha256 = "158mrg9xb0sb4l3s60084j6i7nr90smpsks9f02gbssk495h2k8l";
   };
 
   nativeBuildInputs = [ perl ];
diff --git a/pkgs/development/libraries/libxmlb/default.nix b/pkgs/development/libraries/libxmlb/default.nix
index 257ac8e277d..9edb9b475e8 100644
--- a/pkgs/development/libraries/libxmlb/default.nix
+++ b/pkgs/development/libraries/libxmlb/default.nix
@@ -2,7 +2,7 @@
 
 stdenv.mkDerivation rec {
   name = "libxmlb-${version}";
-  version = "0.1.8";
+  version = "0.1.10";
 
   outputs = [ "out" "lib" "dev" "devdoc" ];
 
@@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
     owner = "hughsie";
     repo = "libxmlb";
     rev = version;
-    sha256 = "0nry2a4vskfklykd20smp4maqpzibc65rzyv4i71nrc55dyjpy7x";
+    sha256 = "1ismh3bdwd0l1fjlhwycam89faxjmpb0wxqlbv58m0z6cxykp6rd";
   };
 
   nativeBuildInputs = [ meson ninja python3 pkgconfig gobject-introspection gtk-doc shared-mime-info docbook_xsl docbook_xml_dtd_43 ];
@@ -33,6 +33,6 @@ stdenv.mkDerivation rec {
     homepage = https://github.com/hughsie/libxmlb;
     license = licenses.lgpl21Plus;
     maintainers = with maintainers; [ jtojnar ];
-    platforms = platforms.unix;
+    platforms = platforms.linux;
   };
 }
diff --git a/pkgs/development/libraries/libxslt/default.nix b/pkgs/development/libraries/libxslt/default.nix
index ce79b2ac5ff..41633d91f3b 100644
--- a/pkgs/development/libraries/libxslt/default.nix
+++ b/pkgs/development/libraries/libxslt/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, libxml2, findXMLCatalogs, python2, libgcrypt
+{ stdenv, fetchurl, fetchpatch, libxml2, findXMLCatalogs, python2, libgcrypt
 , cryptoSupport ? false
 , pythonSupport ? stdenv.buildPlatform == stdenv.hostPlatform
 }:
@@ -18,6 +18,14 @@ stdenv.mkDerivation rec {
     sha256 = "1j1q1swnsy8jgi9x7mclvkrqhfgn09886gdlr9wzk7a08i8n0dlf";
   };
 
+  patches = [
+    (fetchpatch {
+      name = "CVE-2019-11068.patch";
+      url = "https://gitlab.gnome.org/GNOME/libxslt/commit/e03553605b45c88f0b4b2980adfbbb8f6fca2fd6.patch";
+      sha256 = "0pkpb4837km15zgg6h57bncp66d5lwrlvkr73h0lanywq7zrwhj8";
+    })
+  ];
+
   outputs = [ "bin" "dev" "out" "man" "doc" ] ++ stdenv.lib.optional pythonSupport "py";
 
   buildInputs = [ libxml2.dev ]
diff --git a/pkgs/development/libraries/linbox/default.nix b/pkgs/development/libraries/linbox/default.nix
index a9a649e2de7..cde422906da 100644
--- a/pkgs/development/libraries/linbox/default.nix
+++ b/pkgs/development/libraries/linbox/default.nix
@@ -7,19 +7,18 @@
 , blas
 , fflas-ffpack
 , gmpxx
-, optimize ? false # impure
 , withSage ? false # sage support
 }:
 stdenv.mkDerivation rec {
   name = "${pname}-${version}";
   pname = "linbox";
-  version = "1.5.2";
+  version = "1.6.1";
 
   src = fetchFromGitHub {
     owner = "linbox-team";
     repo = "${pname}";
     rev = "v${version}";
-    sha256 = "1wfivlwp30mzdy1697w7rzb8caajim50mc8h27k82yipn2qc5n4i";
+    sha256 = "11mgj7pkppvzmhx5g6wfnzisk36z00gqzzq9p14hzh5dbdhk3693";
   };
 
   nativeBuildInputs = [
@@ -37,32 +36,21 @@ stdenv.mkDerivation rec {
   configureFlags = [
     "--with-blas-libs=-l${blas.linkName}"
     "--disable-optimization"
-  ] ++ stdenv.lib.optionals (!optimize) [
+  ] ++ stdenv.lib.optionals stdenv.isx86_64 {
     # disable SIMD instructions (which are enabled *when available* by default)
-    "--disable-sse"
-    "--disable-sse2"
-    "--disable-sse3"
-    "--disable-ssse3"
-    "--disable-sse41"
-    "--disable-sse42"
-    "--disable-avx"
-    "--disable-avx2"
-    "--disable-fma"
-    "--disable-fma4"
-  ] ++ stdenv.lib.optionals withSage [
+    "default"        = [ "--disable-sse3" "--disable-ssse3" "--disable-sse41" "--disable-sse42" "--disable-avx" "--disable-avx2" "--disable-fma" "--disable-fma4" ];
+    "westmere"       = [                                                                        "--disable-avx" "--disable-avx2" "--disable-fma" "--disable-fma4" ];
+    "sandybridge"    = [                                                                                        "--disable-avx2" "--disable-fma" "--disable-fma4" ];
+    "ivybridge"      = [                                                                                        "--disable-avx2" "--disable-fma" "--disable-fma4" ];
+    "haswell"        = [                                                                                                                         "--disable-fma4" ];
+    "broadwell"      = [                                                                                                                         "--disable-fma4" ];
+    "skylake"        = [                                                                                                                         "--disable-fma4" ];
+    "skylake-avx512" = [                                                                                                                         "--disable-fma4" ];
+  }.${stdenv.hostPlatform.platform.gcc.arch or "default"}
+  ++ stdenv.lib.optionals withSage [
     "--enable-sage"
   ];
 
-  patches = stdenv.lib.optionals withSage [
-    # https://trac.sagemath.org/ticket/24214#comment:39
-    # Will be resolved by
-    # https://github.com/linbox-team/linbox/issues/69
-    (fetchpatch {
-      url = "https://raw.githubusercontent.com/sagemath/sage/a843f48b7a4267e44895a3dfa892c89c85b85611/build/pkgs/linbox/patches/linbox_charpoly_fullCRA.patch";
-      sha256 = "16nxfzfknra3k2yk3xy0k8cq9rmnmsch3dnkb03kx15h0y0jmibk";
-    })
-  ];
-
   doCheck = true;
 
   enableParallelBuilding = true;
@@ -73,6 +61,7 @@ stdenv.mkDerivation rec {
     license = stdenv.lib.licenses.lgpl21Plus;
     maintainers = [stdenv.lib.maintainers.timokau];
     platforms = stdenv.lib.platforms.unix;
+    broken = stdenv.isDarwin || stdenv.isAarch64; # https://trac.sagemath.org/ticket/26932#comment:21
     homepage = http://linalg.org/;
   };
 }
diff --git a/pkgs/development/libraries/mbedtls/default.nix b/pkgs/development/libraries/mbedtls/default.nix
index 7d070364a63..a72d5a825c6 100644
--- a/pkgs/development/libraries/mbedtls/default.nix
+++ b/pkgs/development/libraries/mbedtls/default.nix
@@ -11,13 +11,13 @@
 
 stdenv.mkDerivation rec {
   name = "mbedtls-${version}";
-  version = "2.16.0";
+  version = "2.17.0";
 
   src = fetchFromGitHub {
     owner = "ARMmbed";
     repo = "mbedtls";
     rev = name;
-    sha256 = "14gw3rga9qr6j8ssfjy7k4l8spz37gamqxh9qcwas7w48303897l";
+    sha256 = "1mk3xv61wvqqrzd6jnrz8csyfnwwwwpjzywj3fsfy99p51d7wqgw";
   };
 
   nativeBuildInputs = [ cmake ninja perl python ];
diff --git a/pkgs/development/libraries/mesa/darwin-clock-gettime.patch b/pkgs/development/libraries/mesa/darwin-clock-gettime.patch
deleted file mode 100644
index 94e90a1c587..00000000000
--- a/pkgs/development/libraries/mesa/darwin-clock-gettime.patch
+++ /dev/null
@@ -1,76 +0,0 @@
-diff --git a/include/c11/threads_posix.h b/include/c11/threads_posix.h
-index 45cb6075e6..62937311b9 100644
---- a/include/c11/threads_posix.h
-+++ b/include/c11/threads_posix.h
-@@ -36,6 +36,11 @@
- #include <sched.h>
- #include <stdint.h> /* for intptr_t */
- 
-+#ifdef __MACH__
-+#include <mach/clock.h>
-+#include <mach/mach.h>
-+#endif
-+
- /*
- Configuration macro:
- 
-@@ -383,12 +388,25 @@ tss_set(tss_t key, void *val)
- /*-------------------- 7.25.7 Time functions --------------------*/
- // 7.25.6.1
- #ifndef HAVE_TIMESPEC_GET
-+
- static inline int
- timespec_get(struct timespec *ts, int base)
- {
-     if (!ts) return 0;
-     if (base == TIME_UTC) {
-+#ifdef __MACH__
-+        if (ts != NULL) {
-+            clock_serv_t cclock;
-+            mach_timespec_t mts;
-+            host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &cclock);
-+            clock_get_time(cclock, &mts);
-+            mach_port_deallocate(mach_task_self(), cclock);
-+            ts->tv_sec = mts.tv_sec;
-+            ts->tv_nsec = mts.tv_nsec;
-+        }
-+#else
-         clock_gettime(CLOCK_REALTIME, ts);
-+#endif
-         return base;
-     }
-     return 0;
-diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
-index 1208ebb315..e1378fb1f0 100644
---- a/src/egl/drivers/dri2/egl_dri2.c
-+++ b/src/egl/drivers/dri2/egl_dri2.c
-@@ -65,6 +65,11 @@
- #include "util/u_vector.h"
- #include "mapi/glapi/glapi.h"
- 
-+#ifdef __MACH__
-+#include <mach/clock.h>
-+#include <mach/mach.h>
-+#endif
-+
- #define NUM_ATTRIBS 12
- 
- static void
-@@ -3092,7 +3097,17 @@ dri2_client_wait_sync(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSync *sync,
- 
-             /* We override the clock to monotonic when creating the condition
-              * variable. */
-+#ifdef __MACH__
-+            clock_serv_t cclock;
-+            mach_timespec_t mts;
-+            host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &cclock);
-+            clock_get_time(cclock, &mts);
-+            mach_port_deallocate(mach_task_self(), cclock);
-+            current.tv_sec = mts.tv_sec;
-+            current.tv_nsec = mts.tv_nsec;
-+#else
-             clock_gettime(CLOCK_MONOTONIC, &current);
-+#endif
- 
-             /* calculating when to expire */
-             expire.tv_nsec = timeout % 1000000000L;
diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix
index 5bc1dfaf878..c9ce97849e1 100644
--- a/pkgs/development/libraries/mesa/default.nix
+++ b/pkgs/development/libraries/mesa/default.nix
@@ -93,7 +93,7 @@ let self = stdenv.mkDerivation {
     ./symlink-drivers.patch
     ./missing-includes.patch # dev_t needs sys/stat.h, time_t needs time.h, etc.-- fixes build w/musl
     ./disk_cache-include-dri-driver-path-in-cache-key.patch
-  ] ++ lib.optional stdenv.isDarwin ./darwin-clock-gettime.patch;
+  ];
 
   outputs = [ "out" "dev" "drivers" ]
             ++ lib.optional (elem "swrast" galliumDrivers) "osmesa";
diff --git a/pkgs/development/libraries/microsoft_gsl/default.nix b/pkgs/development/libraries/microsoft_gsl/default.nix
index c4c4d8e3a57..b63de43fd9b 100644
--- a/pkgs/development/libraries/microsoft_gsl/default.nix
+++ b/pkgs/development/libraries/microsoft_gsl/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchgit, cmake
+{ stdenv, fetchFromGitHub, catch, cmake
 }:
 
 let
@@ -6,18 +6,19 @@ let
 in
 stdenv.mkDerivation rec {
   name = "microsoft_gsl-${version}";
-  version = "2017-02-13";
+  version = "2.0.0";
 
-  src = fetchgit {
-    url = "https://github.com/Microsoft/GSL.git";
-    rev = "3819df6e378ffccf0e29465afe99c3b324c2aa70";
-    sha256 = "03d17mnx6n175aakin313308q14wzvaa9pd0m1yfk6ckhha4qf35";
+  src = fetchFromGitHub {
+    owner = "Microsoft";
+    repo = "GSL";
+    rev = "v${version}";
+    sha256 = "1kxfca9ik934nkzyn34ingkyvwpc09li81cg1yc6vqcrdw51l4ri";
   };
 
 
   # build phase just runs the unit tests, so skip it if
   # we're doing a cross build
-  nativeBuildInputs = [ cmake ];
+  nativeBuildInputs = [ catch cmake ];
   buildPhase = if nativeBuild then "make" else "true";
 
   installPhase = ''
diff --git a/pkgs/development/libraries/nv-codec-headers/default.nix b/pkgs/development/libraries/nv-codec-headers/default.nix
index 07ec502cd12..73ed932afb6 100644
--- a/pkgs/development/libraries/nv-codec-headers/default.nix
+++ b/pkgs/development/libraries/nv-codec-headers/default.nix
@@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
   meta = {
     description = "FFmpeg version of headers for NVENC";
     homepage = http://ffmpeg.org/;
-    license = stdenv.lib.licenses.gpl3Plus;
+    license = stdenv.lib.licenses.mit;
     maintainers = [ stdenv.lib.maintainers.MP2E ];
     platforms = stdenv.lib.platforms.all;
   };
diff --git a/pkgs/development/libraries/oniguruma/default.nix b/pkgs/development/libraries/oniguruma/default.nix
index 4c994d596ba..b54f34fbb2c 100644
--- a/pkgs/development/libraries/oniguruma/default.nix
+++ b/pkgs/development/libraries/oniguruma/default.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   name = "onig-${version}";
-  version = "6.9.1";
+  version = "6.9.2";
 
   src = fetchFromGitHub {
     owner = "kkos";
     repo = "oniguruma";
     rev = "v${version}";
-    sha256 = "0dbdd9r15fsqn0rimkjwlv8v68v4i1830h0m7dw56b335wwl6bbg";
+    sha256 = "15asc9v6ylal8fwzlnrh673mp62wngxvv9jx7h86vhljjdap6yfc";
   };
 
   nativeBuildInputs = [ cmake ];
diff --git a/pkgs/development/libraries/opencascade-occt/default.nix b/pkgs/development/libraries/opencascade-occt/default.nix
index d57c10b41e9..2d1e0ffb200 100644
--- a/pkgs/development/libraries/opencascade-occt/default.nix
+++ b/pkgs/development/libraries/opencascade-occt/default.nix
@@ -11,7 +11,7 @@
 , doxygen
 }:
 
-let version = "7.3.0p2";
+let version = "7.3.0p3";
     commit = "V${builtins.replaceStrings ["."] ["_"] version}";
 
 in stdenv.mkDerivation {
@@ -21,7 +21,7 @@ in stdenv.mkDerivation {
   src = fetchurl {
     name = "occt-${commit}.tar.gz";
     url = "https://git.dev.opencascade.org/gitweb/?p=occt.git;a=snapshot;h=${commit};sf=tgz";
-    sha256 = "0nc9k1nqpj0n99pr7qkva79irmqhh007dffwghiyzs031zhd7i6w";
+    sha256 = "0k9c3ypcnjcilq1dhsf6xxbd52gyq4h5rchvp30k3c8ph4ris5pz";
   };
 
   nativeBuildInputs = [ cmake ];
diff --git a/pkgs/development/libraries/opencsg/default.nix b/pkgs/development/libraries/opencsg/default.nix
index e0a6c6a5705..11c66f0d497 100644
--- a/pkgs/development/libraries/opencsg/default.nix
+++ b/pkgs/development/libraries/opencsg/default.nix
@@ -1,5 +1,5 @@
 {stdenv, fetchurl, libGLU_combined, freeglut, glew, libXmu, libXext, libX11
-  }:
+, qmake, GLUT, fixDarwinDylibNames }:
 
 stdenv.mkDerivation rec {
   version = "1.4.2";
@@ -9,27 +9,42 @@ stdenv.mkDerivation rec {
     sha256 = "1ysazynm759gnw1rdhn9xw9nixnzrlzrc462340a6iif79fyqlnr";
   };
 
-  buildInputs = [libGLU_combined freeglut glew libXmu libXext libX11];
+  nativeBuildInputs = [ qmake ]
+    ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames;
+
+  buildInputs = [ glew ]
+    ++ stdenv.lib.optionals stdenv.isLinux [ libGLU_combined freeglut libXmu libXext libX11 ]
+    ++ stdenv.lib.optional stdenv.isDarwin GLUT;
 
   doCheck = false;
 
+  patches = [ ./fix-pro-files.patch ];
+
   preConfigure = ''
-    sed -i 's/^\(LIBS *=.*\)$/\1 -lX11/' example/Makefile
+    rm example/Makefile src/Makefile
+    qmakeFlags="$qmakeFlags INSTALLDIR=$out"
   '';
 
-  installPhase = ''
-    mkdir -pv "$out/"{bin,share/doc/opencsg}
-
-    cp example/opencsgexample "$out/bin"
-    cp -r include lib "$out"
+  postInstall = ''
+    install -D license.txt "$out/share/doc/opencsg/license.txt"
+  '' + stdenv.lib.optionalString stdenv.isDarwin ''
+    mkdir -p $out/Applications
+    mv $out/bin/*.app $out/Applications
+    rmdir $out/bin || true
+  '';
 
-    cp license.txt "$out/share/doc/opencsg"
+  postFixup = stdenv.lib.optionalString stdenv.isDarwin ''
+    app=$out/Applications/opencsgexample.app/Contents/MacOS/opencsgexample
+    install_name_tool -change \
+      $(otool -L $app | awk '/opencsg.+dylib/ { print $1 }') \
+      $(otool -D $out/lib/libopencsg.dylib | tail -n 1) \
+      $app
   '';
 
   meta = with stdenv.lib; {
     description = "Constructive Solid Geometry library";
     homepage = http://www.opencsg.org/;
-    platforms = platforms.linux;
+    platforms = platforms.unix;
     maintainers = [ maintainers.raskin ];
     license = licenses.gpl2;
   };
diff --git a/pkgs/development/libraries/opencsg/fix-pro-files.patch b/pkgs/development/libraries/opencsg/fix-pro-files.patch
new file mode 100644
index 00000000000..462b44c8f40
--- /dev/null
+++ b/pkgs/development/libraries/opencsg/fix-pro-files.patch
@@ -0,0 +1,21 @@
+diff -ur OpenCSG-1.4.2-pristine/example/example.pro OpenCSG-1.4.2/example/example.pro
+--- OpenCSG-1.4.2-pristine/example/example.pro	2016-09-27 06:11:16.000000000 +0900
++++ OpenCSG-1.4.2/example/example.pro	2019-05-07 10:45:18.785251737 +0900
+@@ -6,7 +6,9 @@
+ INCLUDEPATH += ../include
+ LIBS += -L../lib -lopencsg -lGLEW
+ 
+-INSTALLDIR = /usr/local
++isEmpty(INSTALLDIR) {
++  INSTALLDIR = /usr/local
++}
+ INSTALLS += target
+ target.path = $$INSTALLDIR/bin
+ 
+diff -ur OpenCSG-1.4.2-pristine/opencsg.pro OpenCSG-1.4.2/opencsg.pro
+--- OpenCSG-1.4.2-pristine/opencsg.pro	2016-09-27 06:11:16.000000000 +0900
++++ OpenCSG-1.4.2/opencsg.pro	2019-05-07 10:44:50.578698165 +0900
+@@ -1,2 +1,3 @@
+ TEMPLATE = subdirs
+ SUBDIRS  = src example
++CONFIG   += ordered
diff --git a/pkgs/development/libraries/openexr/default.nix b/pkgs/development/libraries/openexr/default.nix
index b575fa0ef08..54b617fdc01 100644
--- a/pkgs/development/libraries/openexr/default.nix
+++ b/pkgs/development/libraries/openexr/default.nix
@@ -1,4 +1,9 @@
-{ lib, stdenv, fetchurl, autoconf, automake, libtool, pkgconfig, zlib, ilmbase }:
+{ lib, stdenv, buildPackages, fetchurl, autoconf, automake, libtool, pkgconfig, zlib, ilmbase, }:
+
+let
+  # Doesn't really do anything when not crosscompiling
+  emulator = stdenv.hostPlatform.emulator buildPackages;
+in
 
 stdenv.mkDerivation rec {
   name = "openexr-${version}";
@@ -15,13 +20,28 @@ stdenv.mkDerivation rec {
 
   outputs = [ "bin" "dev" "out" "doc" ];
 
+  # Needed because there are some generated sources. Solution: just run them under QEMU.
+  postPatch = ''
+    for file in b44ExpLogTable dwaLookups
+    do
+      # Ecape for both sh and Automake
+      emu=${lib.escapeShellArg (lib.replaceStrings ["$"] ["$$"] emulator)}
+      before="./$file > $file.h"
+      after="$emu $before"
+      substituteInPlace IlmImf/Makefile.am \
+        --replace "$before" "$after"
+    done
+
+    # Make sure the patch succeeded
+    [[ $(grep "$emu" IlmImf/Makefile.am | wc -l) = 2 ]]
+  '';
+
   preConfigure = ''
     patchShebangs ./bootstrap
     ./bootstrap
   '';
 
-  nativeBuildInputs = [ pkgconfig ];
-  buildInputs = [ autoconf automake libtool ];
+  nativeBuildInputs = [ pkgconfig autoconf automake libtool ];
   propagatedBuildInputs = [ ilmbase zlib ];
 
   enableParallelBuilding = true;
diff --git a/pkgs/development/libraries/pcre2/default.nix b/pkgs/development/libraries/pcre2/default.nix
index 89649f0bf30..f080de82ddc 100644
--- a/pkgs/development/libraries/pcre2/default.nix
+++ b/pkgs/development/libraries/pcre2/default.nix
@@ -2,10 +2,10 @@
 
 stdenv.mkDerivation rec {
   name = "pcre2-${version}";
-  version = "10.32";
+  version = "10.33";
   src = fetchurl {
     url = "https://ftp.pcre.org/pub/pcre/${name}.tar.bz2";
-    sha256 = "0bkwp2czcckvvbdls7b331cad11rxsm020aqhrbz84z8bp68k7pj";
+    sha256 = "1anqi7vpbfzag7imccrc6di1zl5rl63ab7rfpmajpw6d1kzlsl9m";
   };
 
   configureFlags = [
diff --git a/pkgs/development/libraries/physics/rivet/key_val.patch b/pkgs/development/libraries/physics/rivet/key_val.patch
deleted file mode 100644
index 0b24d703dac..00000000000
--- a/pkgs/development/libraries/physics/rivet/key_val.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/bin/rivet-cmphistos b/bin/rivet-cmphistos
---- a/bin/rivet-cmphistos
-+++ b/bin/rivet-cmphistos
-@@ -371,7 +371,7 @@ if __name__ == '__main__':
-         #     plot[key] = val
-         if plotoptions.has_key("PLOT"):
-             for key_val in plotoptions["PLOT"]:
--                key, val = [s.strip() for s in key_val.split("=")]
-+                key, val = [s.strip() for s in key_val.split("=", 1)]
-                 plot[key] = val
-         if opts.LINEAR:
-             plot['LogY'] = '0'
diff --git a/pkgs/development/libraries/physics/rivet/zaxis_fix.patch b/pkgs/development/libraries/physics/rivet/zaxis_fix.patch
deleted file mode 100644
index c255db565e6..00000000000
--- a/pkgs/development/libraries/physics/rivet/zaxis_fix.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-diff --git a/bin/make-plots b/bin/make-plots
-index abb024d..f59293d 100755
---- a/bin/make-plots
-+++ b/bin/make-plots
-@@ -1152,8 +1152,8 @@ class ColorScale(Described):
- 
-         zcustommajortickmarks = int(self.description.get('ZMajorTickMarks', -1))
-         zcustomminortickmarks = int(self.description.get('ZMinorTickMarks', -1))
--        zcustommajorticks=[]
--        zcustomminorticks=[]
-+        zcustommajorticks=None
-+        zcustomminorticks=None
-         if self.description.has_key('ZCustomMajorTicks') and self.description['ZCustomMajorTicks']!='':
-             # TODO: Would be nice to have less invisible separation of the custom ticks than split on tabs
-             ticks = self.description['ZCustomMajorTicks'].strip().split('\t')
-@@ -2214,7 +2214,7 @@ class Ticks(object):
- 
- class XTicks(Ticks):
- 
--    def draw(self, custommajorticks=[], customminorticks=[], custommajortickmarks=-1, customminortickmarks=-1,drawlabels=True):
-+    def draw(self, custommajorticks=None, customminorticks=None, custommajortickmarks=-1, customminortickmarks=-1,drawlabels=True):
-         twosided = bool(int(self.description.get('XTwosidedTicks', '0')))
-         out = ""
-         out += ('\n%\n% X-Ticks\n%\n')
-@@ -2265,7 +2265,7 @@ class XTicks(Ticks):
- 
- class YTicks(Ticks):
- 
--    def draw(self, custommajorticks=[], customminorticks=[], custommajortickmarks=-1, customminortickmarks=-1, drawlabels=True):
-+    def draw(self, custommajorticks=None, customminorticks=None, custommajortickmarks=-1, customminortickmarks=-1, drawlabels=True):
-         twosided = bool(int(self.description.get('YTwosidedTicks', '0')))
-         out = ""
-         out += ('\n%\n% Y-Ticks\n%\n')
-@@ -2320,7 +2320,7 @@ class ZTicks(Ticks):
-         self.description = description
-         self.coors = coors
- 
--    def draw(self, custommajorticks=[], customminorticks=[],
-+    def draw(self, custommajorticks=None, customminorticks=None,
-             custommajortickmarks=-1, customminortickmarks=-1,
-             drawlabels=True):
-         out = ""
diff --git a/pkgs/development/libraries/pixman/default.nix b/pkgs/development/libraries/pixman/default.nix
index 639d6266b5a..2a033304b66 100644
--- a/pkgs/development/libraries/pixman/default.nix
+++ b/pkgs/development/libraries/pixman/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   name = "pixman-${version}";
-  version = "0.38.0";
+  version = "0.38.4";
 
   src = fetchurl {
     url = "mirror://xorg/individual/lib/${name}.tar.bz2";
-    sha256 = "1a1nnkjv0rqdj26847r0saly0kzckjfp4y3ly30bvpjxi7vy6s5p";
+    sha256 = "0l0m48lnmdlmnaxn2021qi5cj366d9fzfjxkqgcj9bs14pxbgaw4";
   };
 
   nativeBuildInputs = [ pkgconfig ];
diff --git a/pkgs/development/libraries/polkit/default.nix b/pkgs/development/libraries/polkit/default.nix
index f47d2713f1a..fb16a7fb693 100644
--- a/pkgs/development/libraries/polkit/default.nix
+++ b/pkgs/development/libraries/polkit/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchurl, fetchpatch, autoreconfHook, pkgconfig, glib, expat, pam, perl
-, intltool, spidermonkey_52 , gobject-introspection, libxslt, docbook_xsl, dbus
+, intltool, spidermonkey_60 , gobject-introspection, libxslt, docbook_xsl, dbus
 , docbook_xml_dtd_412, gtk-doc, coreutils
 , useSystemd ? stdenv.isLinux, systemd
 , withGnome ? true
@@ -14,28 +14,14 @@ let
 in
 
 stdenv.mkDerivation rec {
-  name = "polkit-0.115";
+  pname = "polkit";
+  version = "0.116";
 
   src = fetchurl {
-    url = "https://www.freedesktop.org/software/polkit/releases/${name}.tar.gz";
-    sha256 = "0c91y61y4gy6p91cwbzg32dhavw4b7fflg370rimqhdxpzdfr1rg";
+    url = "https://www.freedesktop.org/software/${pname}/releases/${pname}-${version}.tar.gz";
+    sha256 = "1c9lbpndh5zis22f154vjrhnqw65z8s85nrgl42v738yf6g0q5w8";
   };
 
-  patches = [
-    # CVE-2019-6133 - See: https://bugs.chromium.org/p/project-zero/issues/detail?id=1692
-    (fetchpatch {
-      url = "https://gitlab.freedesktop.org/polkit/polkit/commit/6cc6aafee135ba44ea748250d7d29b562ca190e3.patch";
-      name = "CVE-2019-6133.patch";
-      sha256 = "0jjlbjzqcz96xh6w3nv3ss9jl0hhrcd7jg4aa5advf08ibaj29r1";
-    })
-    # CVE-2018-19788 - high UID fixup
-    (fetchpatch {
-      url = "https://gitlab.freedesktop.org/polkit/polkit/commit/5230646dc6876ef6e27f57926b1bad348f636147.patch";
-      name = "CVE-2018-19788.patch";
-      sha256 = "1y3az4mlxx8k1zcss5qm7k102s7k1kqgcfnf11j9678fh7p008vp";
-    })
-  ];
-
   postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
     sed -i -e "s/-Wl,--as-needed//" configure.ac
   '';
@@ -46,7 +32,7 @@ stdenv.mkDerivation rec {
     [ glib gtk-doc pkgconfig intltool perl ]
     ++ [ libxslt docbook_xsl docbook_xml_dtd_412 ]; # man pages
   buildInputs =
-    [ glib expat pam spidermonkey_52 ]
+    [ glib expat pam spidermonkey_60 ]
     ++ stdenv.lib.optional useSystemd systemd
     ++ stdenv.lib.optional withGnome gobject-introspection;
 
@@ -72,15 +58,21 @@ stdenv.mkDerivation rec {
   configureFlags = [
     "--datadir=${system}/share"
     "--sysconfdir=/etc"
-    "--with-systemdsystemunitdir=$(out)/etc/systemd/system"
+    "--with-systemdsystemunitdir=${placeholder "out"}/etc/systemd/system"
     "--with-polkitd-user=polkituser" #TODO? <nixos> config.ids.uids.polkituser
     "--with-os-type=NixOS" # not recognized but prevents impurities on non-NixOS
     (if withGnome then "--enable-introspection" else "--disable-introspection")
   ] ++ stdenv.lib.optional (!doCheck) "--disable-test";
 
-  makeFlags = "INTROSPECTION_GIRDIR=$(out)/share/gir-1.0 INTROSPECTION_TYPELIBDIR=$(out)/lib/girepository-1.0";
+  makeFlags = [
+    "INTROSPECTION_GIRDIR=${placeholder "out"}/share/gir-1.0"
+    "INTROSPECTION_TYPELIBDIR=${placeholder "out"}/lib/girepository-1.0"
+  ];
 
-  installFlags=["datadir=$(out)/share" "sysconfdir=$(out)/etc"];
+  installFlags = [
+    "datadir=${placeholder "out"}/share"
+    "sysconfdir=${placeholder "out"}/etc"
+  ];
 
   inherit doCheck;
   checkInputs = [dbus];
diff --git a/pkgs/development/libraries/portaudio/default.nix b/pkgs/development/libraries/portaudio/default.nix
index 6a882ecd900..89248597f5d 100644
--- a/pkgs/development/libraries/portaudio/default.nix
+++ b/pkgs/development/libraries/portaudio/default.nix
@@ -15,6 +15,8 @@ stdenv.mkDerivation rec {
 
   configureFlags = [ "--disable-mac-universal --enable-cxx" ];
 
+  NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.cc.isClang "-Wno-error=nullability-inferred-on-nested-type -Wno-error=nullability-completeness-on-arrays";
+
   propagatedBuildInputs = stdenv.lib.optionals stdenv.isDarwin [ AudioUnit AudioToolbox CoreAudio CoreServices Carbon ];
 
   patchPhase = stdenv.lib.optionalString stdenv.isDarwin ''
diff --git a/pkgs/development/libraries/qscintilla/default.nix b/pkgs/development/libraries/qscintilla/default.nix
index bc3b4441305..43f0e431bb1 100644
--- a/pkgs/development/libraries/qscintilla/default.nix
+++ b/pkgs/development/libraries/qscintilla/default.nix
@@ -1,6 +1,7 @@
 { stdenv, lib, fetchurl, unzip
 , qt4 ? null, qmake4Hook ? null
 , withQt5 ? false, qtbase ? null, qtmacextras ? null, qmake ? null
+, fixDarwinDylibNames
 }:
 
 # Fix Xcode 8 compilation problem
@@ -19,10 +20,13 @@ stdenv.mkDerivation rec {
     sha256 = "04678skipydx68zf52vznsfmll2v9aahr66g50lcqbr6xsmgr1yi";
   };
 
-  buildInputs = [ (if withQt5 then qtbase else qt4) ]
-    ++ lib.optional (withQt5 && stdenv.isDarwin) qtmacextras;
+  buildInputs = [ (if withQt5 then qtbase else qt4) ];
+
+  propagatedBuildInputs = lib.optional (withQt5 && stdenv.isDarwin) qtmacextras;
+
   nativeBuildInputs = [ unzip ]
-    ++ (if withQt5 then [ qmake ] else [ qmake4Hook ]);
+    ++ (if withQt5 then [ qmake ] else [ qmake4Hook ])
+    ++ lib.optional stdenv.isDarwin fixDarwinDylibNames;
 
 
   patches = lib.optional (stdenv.isDarwin && withQt5) [ xcodePatch ];
diff --git a/pkgs/development/libraries/qt-4.x/4.8/default.nix b/pkgs/development/libraries/qt-4.x/4.8/default.nix
index 8715aaaa44d..d5bd065ab64 100644
--- a/pkgs/development/libraries/qt-4.x/4.8/default.nix
+++ b/pkgs/development/libraries/qt-4.x/4.8/default.nix
@@ -100,7 +100,6 @@ stdenv.mkDerivation rec {
     ++ lib.optional flashplayerFix (substituteAll {
         src = ./dlopen-webkit-nsplugin.diff;
         gtk = gtk2.out;
-        gdk_pixbuf = gdk_pixbuf.out;
       })
     ++ lib.optional stdenv.isAarch64 (fetchpatch {
         url = "https://src.fedoraproject.org/rpms/qt/raw/ecf530486e0fb7fe31bad26805cde61115562b2b/f/qt-aarch64.patch";
@@ -231,5 +230,6 @@ stdenv.mkDerivation rec {
     license     = lib.licenses.lgpl21Plus; # or gpl3
     maintainers = with lib.maintainers; [ orivej lovek323 phreedom sander ];
     platforms   = lib.platforms.unix;
+    badPlatforms = [ "x86_64-darwin" ];
   };
 }
diff --git a/pkgs/development/libraries/qt-4.x/4.8/dlopen-webkit-nsplugin.diff b/pkgs/development/libraries/qt-4.x/4.8/dlopen-webkit-nsplugin.diff
index 14199d40503..d2ebbf3b45a 100644
--- a/pkgs/development/libraries/qt-4.x/4.8/dlopen-webkit-nsplugin.diff
+++ b/pkgs/development/libraries/qt-4.x/4.8/dlopen-webkit-nsplugin.diff
@@ -20,7 +20,7 @@ index 2fe69d1..b658e4a 100644
      // The code below has the same effect as this one:
      // Display *gdkDisplay = gdk_x11_display_get_xdisplay(gdk_display_get_default());
 -    QLibrary library(QLatin1String("libgdk-x11-2.0"), 0);
-+    QLibrary library(QLatin1String("@gdk_pixbuf@/lib/libgdk-x11-2.0"), 0);
++    QLibrary library(QLatin1String("@gtk@/lib/libgdk-x11-2.0"), 0);
      if (!library.load())
          return 0;
  
@@ -46,7 +46,7 @@ index b8c8f2a..e7f4dc5 100644
      // Display *gdkDisplay = gdk_x11_display_get_xdisplay(gdk_display_get_default());
  
 -    QLibrary library(QLatin1String("libgdk-x11-2.0"), 0);
-+    QLibrary library(QLatin1String("@gdk_pixbuf@/lib/libgdk-x11-2.0"), 0);
++    QLibrary library(QLatin1String("@gtk@/lib/libgdk-x11-2.0"), 0);
      if (!library.load())
          return 0;
  
diff --git a/pkgs/development/libraries/qt-5/5.11/default.nix b/pkgs/development/libraries/qt-5/5.11/default.nix
index 379c370e1fc..0014a1452aa 100644
--- a/pkgs/development/libraries/qt-5/5.11/default.nix
+++ b/pkgs/development/libraries/qt-5/5.11/default.nix
@@ -20,7 +20,7 @@ top-level attribute to `top-level/all-packages.nix`.
   stdenv, fetchurl, fetchFromGitHub, makeSetupHook,
   bison, cups ? null, harfbuzz, libGL, perl,
   gstreamer, gst-plugins-base, gtk3, dconf,
-  cf-private,
+  cf-private, llvmPackages_5,
 
   # options
   developerBuild ? false,
@@ -51,34 +51,24 @@ let
   patches = {
     qtbase = [
       ./qtbase.patch
-      ./qtbase-darwin.patch
-      ./qtbase-revert-no-macos10.10.patch
       ./qtbase-fixguicmake.patch
-    ] ++ optionals stdenv.isDarwin [
-      ./qtbase-darwin-nseventtype.patch
-      ./qtbase-darwin-revert-69221.patch
     ];
     qtdeclarative = [ ./qtdeclarative.patch ];
     qtscript = [ ./qtscript.patch ];
     qtserialport = [ ./qtserialport.patch ];
     qttools = [ ./qttools.patch ];
-    qtwebengine = [ ./qtwebengine-no-build-skip.patch ]
-      ++ optional stdenv.cc.isClang ./qtwebengine-clang-fix.patch
-      ++ optionals stdenv.isDarwin [
-        ./qtwebengine-darwin-no-platform-check.patch
-        ./qtwebengine-darwin-sdk-10.10.patch
-        ./qtwebengine-darwin-old-sdk.patch
-      ];
-    qtwebkit = [ ./qtwebkit.patch ]
-      ++ optionals stdenv.isDarwin [
-        ./qtwebkit-darwin-no-readline.patch
-        ./qtwebkit-darwin-no-qos-classes.patch
-      ];
+    qtwebengine = [
+      ./qtwebengine-no-build-skip.patch
+      ./qtwebengine-darwin-no-platform-check.patch
+    ];
+    qtwebkit = [ ./qtwebkit.patch ];
   };
 
   mkDerivation =
-    import ../mkDerivation.nix
-    { inherit stdenv; inherit (stdenv) lib; }
+    import ../mkDerivation.nix {
+      inherit (stdenv) lib;
+      stdenv = if stdenv.cc.isClang then llvmPackages_5.stdenv else stdenv;
+    }
     { inherit debug; };
 
   qtModule =
@@ -109,7 +99,7 @@ let
       qtdoc = callPackage ../modules/qtdoc.nix {};
       qtgraphicaleffects = callPackage ../modules/qtgraphicaleffects.nix {};
       qtimageformats = callPackage ../modules/qtimageformats.nix {};
-      qtlocation = callPackage ../modules/qtlocation.nix {};
+      qtlocation = callPackage ../modules/qtlocation.nix { };
       qtmacextras = callPackage ../modules/qtmacextras.nix {
         inherit cf-private;
       };
diff --git a/pkgs/development/libraries/qt-5/5.11/qtbase-darwin-nseventtype.patch b/pkgs/development/libraries/qt-5/5.11/qtbase-darwin-nseventtype.patch
deleted file mode 100644
index 9ef6e8ef069..00000000000
--- a/pkgs/development/libraries/qt-5/5.11/qtbase-darwin-nseventtype.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/src/plugins/platforms/cocoa/qcocoawindow.mm
-+++ b/src/plugins/platforms/cocoa/qcocoawindow.mm
-@@ -404,8 +404,8 @@ void QCocoaWindow::setVisible(bool visible)
-                         removeMonitor();
-                         monitor = [NSEvent addGlobalMonitorForEventsMatchingMask:NSLeftMouseDownMask|NSRightMouseDownMask|NSOtherMouseDownMask|NSMouseMovedMask handler:^(NSEvent *e) {
-                             QPointF localPoint = QCocoaScreen::mapFromNative([NSEvent mouseLocation]);
--                            const auto button = e.type == NSEventTypeMouseMoved ? Qt::NoButton : cocoaButton2QtButton([e buttonNumber]);
--                            const auto eventType = e.type == NSEventTypeMouseMoved ? QEvent::MouseMove : QEvent::MouseButtonPress;
-+                            const auto button = e.type == NSMouseMoved ? Qt::NoButton : cocoaButton2QtButton([e buttonNumber]);
-+                            const auto eventType = e.type == NSMouseMoved ? QEvent::MouseMove : QEvent::MouseButtonPress;
-                             QWindowSystemInterface::handleMouseEvent(window(), window()->mapFromGlobal(localPoint.toPoint()), localPoint,
-                                                                      Qt::MouseButtons(uint(NSEvent.pressedMouseButtons & 0xFFFF)), button, eventType);
-                         }];
diff --git a/pkgs/development/libraries/qt-5/5.11/qtbase-darwin-revert-69221.patch b/pkgs/development/libraries/qt-5/5.11/qtbase-darwin-revert-69221.patch
deleted file mode 100644
index 73eea435f84..00000000000
--- a/pkgs/development/libraries/qt-5/5.11/qtbase-darwin-revert-69221.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm
-index 00c3f7c22c..94d35f59d6 100644
---- a/src/plugins/platforms/cocoa/qcocoawindow.mm
-+++ b/src/plugins/platforms/cocoa/qcocoawindow.mm
-@@ -1355,15 +1355,6 @@ QCocoaNSWindow *QCocoaWindow::createNSWindow(bool shouldBePanel)
- {
-     QMacAutoReleasePool pool;
- 
--    Qt::WindowType type = window()->type();
--    Qt::WindowFlags flags = window()->flags();
--
--    // Note: The macOS window manager has a bug, where if a screen is rotated, it will not allow
--    // a window to be created within the area of the screen that has a Y coordinate (I quadrant)
--    // higher than the height of the screen  in its non-rotated state, unless the window is
--    // created with the NSWindowStyleMaskBorderless style mask.
--    NSWindowStyleMask styleMask = windowStyleMask(flags);
--
-     QRect rect = geometry();
- 
-     QScreen *targetScreen = nullptr;
-@@ -1375,22 +1366,26 @@ QCocoaNSWindow *QCocoaWindow::createNSWindow(bool shouldBePanel)
-     }
- 
-     if (!targetScreen) {
--        qCWarning(lcQpaCocoaWindow) << "Window position" << rect << "outside any known screen, using primary screen";
-+        qCWarning(lcQpaCocoaWindow) << "Window position outside any known screen, using primary screen";
-         targetScreen = QGuiApplication::primaryScreen();
--        // AppKit will only reposition a window that's outside the target screen area if
--        // the window has a title bar. If left out, the window ends up with no screen.
--        // The style mask will be corrected to the original style mask in setWindowFlags.
--        styleMask |= NSWindowStyleMaskTitled;
-     }
- 
-     rect.translate(-targetScreen->geometry().topLeft());
-     QCocoaScreen *cocoaScreen = static_cast<QCocoaScreen *>(targetScreen->handle());
-     NSRect frame = QCocoaScreen::mapToNative(rect, cocoaScreen);
- 
-+    // Note: The macOS window manager has a bug, where if a screen is rotated, it will not allow
-+    // a window to be created within the area of the screen that has a Y coordinate (I quadrant)
-+    // higher than the height of the screen  in its non-rotated state, unless the window is
-+    // created with the NSWindowStyleMaskBorderless style mask.
-+
-+    Qt::WindowType type = window()->type();
-+    Qt::WindowFlags flags = window()->flags();
-+
-     // Create NSWindow
-     Class windowClass = shouldBePanel ? [QNSPanel class] : [QNSWindow class];
-     QCocoaNSWindow *nsWindow = [[windowClass alloc] initWithContentRect:frame
--        styleMask:styleMask
-+        styleMask:windowStyleMask(flags)
-         // Deferring window creation breaks OpenGL (the GL context is
-         // set up before the window is shown and needs a proper window)
-         backing:NSBackingStoreBuffered defer:NO
-@@ -1399,9 +1394,6 @@ QCocoaNSWindow *QCocoaWindow::createNSWindow(bool shouldBePanel)
-     Q_ASSERT_X(nsWindow.screen == cocoaScreen->nativeScreen(), "QCocoaWindow",
-         "Resulting NSScreen should match the requested NSScreen");
- 
--    if (targetScreen != window()->screen())
--        QWindowSystemInterface::handleWindowScreenChanged(window(), targetScreen);
--
-     nsWindow.delegate = [[QNSWindowDelegate alloc] initWithQCocoaWindow:this];
- 
-     // Prevent Cocoa from releasing the window on close. Qt
-@@ -1421,6 +1413,9 @@ QCocoaNSWindow *QCocoaWindow::createNSWindow(bool shouldBePanel)
-         });
-     }
- 
-+    if (targetScreen != window()->screen())
-+        QWindowSystemInterface::handleWindowScreenChanged(window(), targetScreen);
-+
-     nsWindow.restorable = NO;
-     nsWindow.level = windowLevel(flags);
- 
diff --git a/pkgs/development/libraries/qt-5/5.11/qtbase-darwin.patch b/pkgs/development/libraries/qt-5/5.11/qtbase-darwin.patch
deleted file mode 100644
index f6635175205..00000000000
--- a/pkgs/development/libraries/qt-5/5.11/qtbase-darwin.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-diff --git a/src/plugins/bearer/corewlan/qcorewlanengine.mm b/src/plugins/bearer/corewlan/qcorewlanengine.mm
-index 341d3bccf2..3368234c26 100644
---- a/src/plugins/bearer/corewlan/qcorewlanengine.mm
-+++ b/src/plugins/bearer/corewlan/qcorewlanengine.mm
-@@ -287,7 +287,7 @@ void QScanThread::getUserConfigurations()
-     QMacAutoReleasePool pool;
-     userProfiles.clear();
- 
--    NSArray<NSString *> *wifiInterfaces = [CWWiFiClient interfaceNames];
-+    NSArray *wifiInterfaces = [CWWiFiClient interfaceNames];
-     for (NSString *ifName in wifiInterfaces) {
- 
-         CWInterface *wifiInterface = [[CWWiFiClient sharedWiFiClient] interfaceWithName:ifName];
-@@ -602,7 +602,7 @@ void QCoreWlanEngine::doRequestUpdate()
- 
-     QMacAutoReleasePool pool;
- 
--    NSArray<NSString *> *wifiInterfaces = [CWWiFiClient interfaceNames];
-+    NSArray *wifiInterfaces = [CWWiFiClient interfaceNames];
-     for (NSString *ifName in wifiInterfaces) {
-             scanThread->interfaceName = QString::fromNSString(ifName);
-             scanThread->start();
-diff --git a/src/plugins/platforms/cocoa/qcocoascreen.mm b/src/plugins/platforms/cocoa/qcocoascreen.mm
-index a17a02b629..d76c42fa03 100644
---- a/src/plugins/platforms/cocoa/qcocoascreen.mm
-+++ b/src/plugins/platforms/cocoa/qcocoascreen.mm
-@@ -114,7 +114,7 @@ void QCocoaScreen::updateGeometry()
-         return;
-
-     // The reference screen for the geometry is always the primary screen
--    QRectF primaryScreenGeometry = QRectF::fromCGRect([[NSScreen screens] firstObject].frame);
-+    QRectF primaryScreenGeometry = QRectF::fromCGRect([[[NSScreen screens] firstObject] frame]);
-     m_geometry = qt_mac_flip(QRectF::fromCGRect(nsScreen.frame), primaryScreenGeometry).toRect();
-     m_availableGeometry = qt_mac_flip(QRectF::fromCGRect(nsScreen.visibleFrame), primaryScreenGeometry).toRect();
-
-diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm
-index 72f3bc0075..a9c058a850 100644
---- a/src/plugins/platforms/cocoa/qcocoawindow.mm
-+++ b/src/plugins/platforms/cocoa/qcocoawindow.mm
-@@ -1676,7 +1676,7 @@ void QCocoaWindow::applyContentBorderThickness(NSWindow *window)
- 
-     if (!m_drawContentBorderGradient) {
-         window.styleMask = window.styleMask & ~NSTexturedBackgroundWindowMask;
--        [window.contentView.superview setNeedsDisplay:YES];
-+        [[window.contentView superview] setNeedsDisplay:YES];
-         window.titlebarAppearsTransparent = NO;
-         return;
-     }
-diff --git a/src/plugins/platforms/cocoa/qnswindow.mm b/src/plugins/platforms/cocoa/qnswindow.mm
-index cb13b7d184..0159d68dca 100644
---- a/src/plugins/platforms/cocoa/qnswindow.mm
-+++ b/src/plugins/platforms/cocoa/qnswindow.mm
-@@ -231,7 +231,7 @@ static bool isMouseEvent(NSEvent *ev)
-     if (pw->frameStrutEventsEnabled() && isMouseEvent(theEvent)) {
-         NSPoint loc = [theEvent locationInWindow];
-         NSRect windowFrame = [self convertRectFromScreen:self.frame];
--        NSRect contentFrame = self.contentView.frame;
-+        NSRect contentFrame = [self.contentView frame];
-         if (NSMouseInRect(loc, windowFrame, NO) && !NSMouseInRect(loc, contentFrame, NO))
-             [qnsview_cast(pw->view()) handleFrameStrutMouseEvent:theEvent];
-     }
-@@ -260,7 +260,7 @@ static bool isMouseEvent(NSEvent *ev)
- + (void)applicationActivationChanged:(NSNotification*)notification
- {
-     const id sender = self;
--    NSEnumerator<NSWindow*> *windowEnumerator = nullptr;
-+    NSEnumerator *windowEnumerator = nullptr;
-     NSApplication *application = [NSApplication sharedApplication];
- 
- #if QT_MACOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__MAC_10_12)
diff --git a/pkgs/development/libraries/qt-5/5.11/qtbase-revert-no-macos10.10.patch b/pkgs/development/libraries/qt-5/5.11/qtbase-revert-no-macos10.10.patch
deleted file mode 100644
index 29776518379..00000000000
--- a/pkgs/development/libraries/qt-5/5.11/qtbase-revert-no-macos10.10.patch
+++ /dev/null
@@ -1,102 +0,0 @@
-Revert "Remove code paths for macOS < 10.11"
-
-This reverts commit 138a65e0cfa80b13fd018a01e7d8b33341a3cfd3.
-
-From 138a65e0cfa80b13fd018a01e7d8b33341a3cfd3 Mon Sep 17 00:00:00 2001
-From: Jake Petroules <jake.petroules@qt.io>
-Date: Thu, 8 Feb 2018 11:05:42 -0800
-Subject: [PATCH] Remove code paths for macOS < 10.11
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Change-Id: I5ae02d88aa3dcd97d1f2ebf6255a68643e5d6daa
-Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
-Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
-Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
----
- .../fontdatabases/mac/qfontengine_coretext.mm            | 16 +++-------------
- src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm    |  6 +-----
- src/plugins/platforms/cocoa/qnswindowdelegate.mm         | 16 ----------------
- 3 files changed, 4 insertions(+), 34 deletions(-)
-
-diff --git a/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm b/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm
-index 98b753eff9..489d9cd031 100644
---- a/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm
-+++ b/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm
-@@ -47,18 +47,28 @@
- 
- #include <cmath>
- 
--#if defined(Q_OS_MACOS)
-+#if defined(Q_OS_OSX) && !QT_OSX_DEPLOYMENT_TARGET_BELOW(__MAC_10_11)
- #import <AppKit/AppKit.h>
- #endif
- 
--#if defined(QT_PLATFORM_UIKIT)
-+#if defined(QT_PLATFORM_UIKIT) && !QT_IOS_DEPLOYMENT_TARGET_BELOW(__IPHONE_8_2)
- #import <UIKit/UIKit.h>
- #endif
- 
- // These are available cross platform, exported as kCTFontWeightXXX from CoreText.framework,
- // but they are not documented and are not in public headers so are private API and exposed
- // only through the NSFontWeightXXX and UIFontWeightXXX aliases in AppKit and UIKit (rdar://26109857)
--#if defined(Q_OS_MACOS)
-+#if QT_MAC_DEPLOYMENT_TARGET_BELOW(__MAC_10_11, __IPHONE_8_2)
-+#define kCTFontWeightUltraLight -0.8
-+#define kCTFontWeightThin -0.6
-+#define kCTFontWeightLight -0.4
-+#define kCTFontWeightRegular 0
-+#define kCTFontWeightMedium 0.23
-+#define kCTFontWeightSemibold 0.3
-+#define kCTFontWeightBold 0.4
-+#define kCTFontWeightHeavy 0.56
-+#define kCTFontWeightBlack 0.62
-+#elif defined(Q_OS_OSX)
- #define kCTFontWeightUltraLight NSFontWeightUltraLight
- #define kCTFontWeightThin NSFontWeightThin
- #define kCTFontWeightLight NSFontWeightLight
-diff --git a/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm b/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm
-index 94f2125bad..272cd9f3dc 100644
---- a/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm
-+++ b/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm
-@@ -162,7 +162,11 @@ QT_NAMESPACE_ALIAS_OBJC_CLASS(QNSOpenSavePanelDelegate);
-     // resetting our mCurrentDir, set the delegate
-     // here to make sure it gets the correct value.
-     [mSavePanel setDelegate:self];
--    mOpenPanel.accessoryViewDisclosed = YES;
-+
-+#if QT_OSX_PLATFORM_SDK_EQUAL_OR_ABOVE(__MAC_10_11)
-+    if (__builtin_available(macOS 10.11, *))
-+        mOpenPanel.accessoryViewDisclosed = YES;
-+#endif
- 
-     if (mOptions->isLabelExplicitlySet(QFileDialogOptions::Accept))
-         [mSavePanel setPrompt:[self strip:options->labelText(QFileDialogOptions::Accept)]];
-diff --git a/src/plugins/platforms/cocoa/qnswindowdelegate.mm b/src/plugins/platforms/cocoa/qnswindowdelegate.mm
-index 057a4c2943..eb55e50622 100644
---- a/src/plugins/platforms/cocoa/qnswindowdelegate.mm
-+++ b/src/plugins/platforms/cocoa/qnswindowdelegate.mm
-@@ -103,6 +103,22 @@ static QRegExp whitespaceRegex = QRegExp(QStringLiteral("\\s*"));
-     return QCocoaScreen::mapToNative(maximizedFrame);
- }
- 
-+#if QT_MACOS_DEPLOYMENT_TARGET_BELOW(__MAC_10_11)
-+/*
-+    AppKit on OS X 10.10 wrongly calls windowWillUseStandardFrame:defaultFrame
-+    from -[NSWindow _frameForFullScreenMode] when going into fullscreen, resulting
-+    in black bars on top and bottom of the window. By implementing the following
-+    method, AppKit will choose that instead, and resolve the right fullscreen
-+    geometry.
-+*/
-+- (NSSize)window:(NSWindow *)window willUseFullScreenContentSize:(NSSize)proposedSize
-+{
-+    Q_UNUSED(proposedSize);
-+    Q_ASSERT(window == m_cocoaWindow->nativeWindow());
-+    return NSSizeFromCGSize(m_cocoaWindow->screen()->geometry().size().toCGSize());
-+}
-+#endif
-+
- - (BOOL)window:(NSWindow *)window shouldPopUpDocumentPathMenu:(NSMenu *)menu
- {
-     Q_UNUSED(window);
diff --git a/pkgs/development/libraries/qt-5/5.11/qtwebengine-clang-fix.patch b/pkgs/development/libraries/qt-5/5.11/qtwebengine-clang-fix.patch
deleted file mode 100644
index 8dafd65cd34..00000000000
--- a/pkgs/development/libraries/qt-5/5.11/qtwebengine-clang-fix.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-Fix a following build error:
-
-In file included from ../../3rdparty/chromium/device/bluetooth/bluetooth_remote_gatt_characteristic_mac.mm:7:
-../../3rdparty/chromium/base/bind.h:59:3: error: static_assert failed "Bound argument |i| of type |Arg| cannot be forwarded as |Unwrapped| to the bound functor, which declares it as |Param|."
-  static_assert(
-  ^
-../../3rdparty/chromium/base/bind.h:91:7: note: in instantiation of template class 'base::internal::AssertConstructible<1, long, long, const long &, NSError *>' requested here
-    : AssertConstructible<Ns, Args, std::decay_t<Args>, Unwrapped, Params>... {
-      ^
-../../3rdparty/chromium/base/bind.h:213:27: note: in instantiation of template class 'base::internal::AssertBindArgsValidity<std::__1::integer_sequence<unsigned long, 0, 1>, base::internal::TypeList<base::WeakPtr<device::BluetoothRemoteGattCharacteristicMac>, long>, base::internal::TypeList<device::BluetoothRemoteGattCharacteristicMac *, const long &>, base::internal::TypeList<device::BluetoothRemoteGattCharacteristicMac *, NSError *> >' requested here
-  static_assert(internal::AssertBindArgsValidity<
-                          ^
-../../3rdparty/chromium/base/bind.h:242:16: note: in instantiation of function template specialization 'base::BindRepeating<void (device::BluetoothRemoteGattCharacteristicMac::*)(NSError *), base::WeakPtr<device::BluetoothRemoteGattCharacteristicMac>, long>' requested here
-  return base::BindRepeating(std::forward<Functor>(functor),
-               ^
-../../3rdparty/chromium/device/bluetooth/bluetooth_remote_gatt_characteristic_mac.mm:211:15: note: in instantiation of function template specialization 'base::Bind<void (device::BluetoothRemoteGattCharacteristicMac::*)(NSError *), base::WeakPtr<device::BluetoothRemoteGattCharacteristicMac>, long>' requested here
-        base::Bind(&BluetoothRemoteGattCharacteristicMac::DidWriteValue,
-              ^
-
---- a/src/3rdparty/chromium/device/bluetooth/bluetooth_remote_gatt_characteristic_mac.mm
-+++ b/src/3rdparty/chromium/device/bluetooth/bluetooth_remote_gatt_characteristic_mac.mm
-@@ -209,7 +209,7 @@ void BluetoothRemoteGattCharacteristicMac::WriteRemoteCharacteristic(
-     base::ThreadTaskRunnerHandle::Get()->PostTask(
-         FROM_HERE,
-         base::Bind(&BluetoothRemoteGattCharacteristicMac::DidWriteValue,
--                   weak_ptr_factory_.GetWeakPtr(), nil));
-+                   weak_ptr_factory_.GetWeakPtr(), nullptr));
-   }
- }
- 
diff --git a/pkgs/development/libraries/qt-5/5.11/qtwebengine-darwin-old-sdk.patch b/pkgs/development/libraries/qt-5/5.11/qtwebengine-darwin-old-sdk.patch
deleted file mode 100644
index b065c221101..00000000000
--- a/pkgs/development/libraries/qt-5/5.11/qtwebengine-darwin-old-sdk.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-diff --git a/src/3rdparty/chromium/third_party/webrtc/sdk/objc/Framework/Classes/Common/RTCFieldTrials.mm b/src/3rdparty/chromium/third_party/webrtc/sdk/objc/Framework/Classes/Common/RTCFieldTrials.mm
---- a/src/3rdparty/chromium/third_party/webrtc/sdk/objc/Framework/Classes/Common/RTCFieldTrials.mm
-+++ b/src/3rdparty/chromium/third_party/webrtc/sdk/objc/Framework/Classes/Common/RTCFieldTrials.mm
-@@ -45,7 +45,7 @@ NSString *RTCFieldTrialTrendlineFilterValue(
-   return [NSString stringWithFormat:format, windowSize, smoothingCoeff, thresholdGain];
- }
- 
--void RTCInitFieldTrialDictionary(NSDictionary<NSString *, NSString *> *fieldTrials) {
-+void RTCInitFieldTrialDictionary(NSDictionary *fieldTrials) {
-   if (!fieldTrials) {
-     RTCLogWarning(@"No fieldTrials provided.");
-     return;
-diff --git a/src/3rdparty/chromium/third_party/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCFieldTrials.h b/src/3rdparty/chromium/third_party/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCFieldTrials.h
---- a/src/3rdparty/chromium/third_party/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCFieldTrials.h
-+++ b/src/3rdparty/chromium/third_party/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCFieldTrials.h
-@@ -40,4 +40,4 @@ RTC_EXTERN NSString *RTCFieldTrialTrendlineFilterValue(
-  *  Must be called before any other call into WebRTC. See:
-  *  webrtc/system_wrappers/include/field_trial_default.h
-  */
--RTC_EXTERN void RTCInitFieldTrialDictionary(NSDictionary<NSString *, NSString *> *fieldTrials);
-+RTC_EXTERN void RTCInitFieldTrialDictionary(NSDictionary *fieldTrials);
diff --git a/pkgs/development/libraries/qt-5/5.11/qtwebengine-darwin-sdk-10.10.patch b/pkgs/development/libraries/qt-5/5.11/qtwebengine-darwin-sdk-10.10.patch
deleted file mode 100644
index d43b09b9538..00000000000
--- a/pkgs/development/libraries/qt-5/5.11/qtwebengine-darwin-sdk-10.10.patch
+++ /dev/null
@@ -1,160 +0,0 @@
-Fix build against 10.10 SDK
-
-The SecKey part perhaps could be fixed by implementing a revert to
-https://chromium.googlesource.com/chromium/src.git/+/8418e098b9cbedf884878b61dcd3292c515845cf%5E%21/#F0
-
---- a/src/3rdparty/chromium/content/browser/renderer_host/input/web_input_event_builders_mac.mm
-+++ b/src/3rdparty/chromium/content/browser/renderer_host/input/web_input_event_builders_mac.mm
-@@ -1,3 +1,4 @@
-+#define NSEventTypeScrollWheel 22
- // Copyright 2015 The Chromium Authors. All rights reserved.
- // Use of this source code is governed by a BSD-style license that can be
- // found in the LICENSE file.
---- a/src/3rdparty/chromium/net/ssl/ssl_platform_key_mac.cc
-+++ b/src/3rdparty/chromium/net/ssl/ssl_platform_key_mac.cc
-@@ -48,21 +48,6 @@ namespace net {
- 
- namespace {
- 
--// TODO(davidben): Remove this when we switch to building to the 10.13
--// SDK. https://crbug.com/780980
--#if !defined(MAC_OS_X_VERSION_10_13) || \
--    MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_13
--API_AVAILABLE(macosx(10.13))
--const SecKeyAlgorithm kSecKeyAlgorithmRSASignatureDigestPSSSHA256 =
--    CFSTR("algid:sign:RSA:digest-PSS:SHA256:SHA256:32");
--API_AVAILABLE(macosx(10.13))
--const SecKeyAlgorithm kSecKeyAlgorithmRSASignatureDigestPSSSHA384 =
--    CFSTR("algid:sign:RSA:digest-PSS:SHA384:SHA384:48");
--API_AVAILABLE(macosx(10.13))
--const SecKeyAlgorithm kSecKeyAlgorithmRSASignatureDigestPSSSHA512 =
--    CFSTR("algid:sign:RSA:digest-PSS:SHA512:SHA512:64");
--#endif
--
- class ScopedCSSM_CC_HANDLE {
-  public:
-   ScopedCSSM_CC_HANDLE() : handle_(0) {}
-@@ -187,109 +172,6 @@ class SSLPlatformKeyCSSM : public ThreadedSSLPrivateKey::Delegate {
-   DISALLOW_COPY_AND_ASSIGN(SSLPlatformKeyCSSM);
- };
- 
--// Returns the corresponding SecKeyAlgorithm or nullptr if unrecognized.
--API_AVAILABLE(macosx(10.12))
--SecKeyAlgorithm GetSecKeyAlgorithm(uint16_t algorithm) {
--  switch (algorithm) {
--    case SSL_SIGN_RSA_PKCS1_SHA512:
--      return kSecKeyAlgorithmRSASignatureDigestPKCS1v15SHA512;
--    case SSL_SIGN_RSA_PKCS1_SHA384:
--      return kSecKeyAlgorithmRSASignatureDigestPKCS1v15SHA384;
--    case SSL_SIGN_RSA_PKCS1_SHA256:
--      return kSecKeyAlgorithmRSASignatureDigestPKCS1v15SHA256;
--    case SSL_SIGN_RSA_PKCS1_SHA1:
--      return kSecKeyAlgorithmRSASignatureDigestPKCS1v15SHA1;
--    case SSL_SIGN_RSA_PKCS1_MD5_SHA1:
--      return kSecKeyAlgorithmRSASignatureDigestPKCS1v15Raw;
--    case SSL_SIGN_ECDSA_SECP521R1_SHA512:
--      return kSecKeyAlgorithmECDSASignatureDigestX962SHA512;
--    case SSL_SIGN_ECDSA_SECP384R1_SHA384:
--      return kSecKeyAlgorithmECDSASignatureDigestX962SHA384;
--    case SSL_SIGN_ECDSA_SECP256R1_SHA256:
--      return kSecKeyAlgorithmECDSASignatureDigestX962SHA256;
--    case SSL_SIGN_ECDSA_SHA1:
--      return kSecKeyAlgorithmECDSASignatureDigestX962SHA1;
--  }
--
--  if (base::mac::IsAtLeastOS10_13()) {
--    switch (algorithm) {
--      case SSL_SIGN_RSA_PSS_SHA512:
--        return kSecKeyAlgorithmRSASignatureDigestPSSSHA512;
--      case SSL_SIGN_RSA_PSS_SHA384:
--        return kSecKeyAlgorithmRSASignatureDigestPSSSHA384;
--      case SSL_SIGN_RSA_PSS_SHA256:
--        return kSecKeyAlgorithmRSASignatureDigestPSSSHA256;
--    }
--  }
--
--  return nullptr;
--}
--
--class API_AVAILABLE(macosx(10.12)) SSLPlatformKeySecKey
--    : public ThreadedSSLPrivateKey::Delegate {
-- public:
--  SSLPlatformKeySecKey(int type, size_t max_length, SecKeyRef key)
--      : key_(key, base::scoped_policy::RETAIN) {
--    // Determine the algorithms supported by the key.
--    for (uint16_t algorithm : SSLPrivateKey::DefaultAlgorithmPreferences(
--             type, true /* include PSS */)) {
--      SecKeyAlgorithm sec_algorithm = GetSecKeyAlgorithm(algorithm);
--      if (sec_algorithm &&
--          SecKeyIsAlgorithmSupported(key_.get(), kSecKeyOperationTypeSign,
--                                     sec_algorithm)) {
--        preferences_.push_back(algorithm);
--      }
--    }
--  }
--
--  ~SSLPlatformKeySecKey() override {}
--
--  std::vector<uint16_t> GetAlgorithmPreferences() override {
--    return preferences_;
--  }
--
--  Error Sign(uint16_t algorithm,
--             base::span<const uint8_t> input,
--             std::vector<uint8_t>* signature) override {
--    SecKeyAlgorithm sec_algorithm = GetSecKeyAlgorithm(algorithm);
--    if (!sec_algorithm) {
--      NOTREACHED();
--      return ERR_FAILED;
--    }
--
--    const EVP_MD* md = SSL_get_signature_algorithm_digest(algorithm);
--    uint8_t digest[EVP_MAX_MD_SIZE];
--    unsigned digest_len;
--    if (!md || !EVP_Digest(input.data(), input.size(), digest, &digest_len, md,
--                           nullptr)) {
--      return ERR_SSL_CLIENT_AUTH_SIGNATURE_FAILED;
--    }
--
--    base::ScopedCFTypeRef<CFDataRef> digest_ref(CFDataCreateWithBytesNoCopy(
--        kCFAllocatorDefault, digest, base::checked_cast<CFIndex>(digest_len),
--        kCFAllocatorNull));
--
--    base::ScopedCFTypeRef<CFErrorRef> error;
--    base::ScopedCFTypeRef<CFDataRef> signature_ref(SecKeyCreateSignature(
--        key_, sec_algorithm, digest_ref, error.InitializeInto()));
--    if (!signature_ref) {
--      LOG(ERROR) << error;
--      return ERR_SSL_CLIENT_AUTH_SIGNATURE_FAILED;
--    }
--
--    signature->assign(
--        CFDataGetBytePtr(signature_ref),
--        CFDataGetBytePtr(signature_ref) + CFDataGetLength(signature_ref));
--    return OK;
--  }
--
-- private:
--  std::vector<uint16_t> preferences_;
--  base::ScopedCFTypeRef<SecKeyRef> key_;
--
--  DISALLOW_COPY_AND_ASSIGN(SSLPlatformKeySecKey);
--};
--
- scoped_refptr<SSLPrivateKey> CreateSSLPrivateKeyForSecKey(
-     const X509Certificate* certificate,
-     SecKeyRef private_key) {
-@@ -298,13 +180,6 @@ scoped_refptr<SSLPrivateKey> CreateSSLPrivateKeyForSecKey(
-   if (!GetClientCertInfo(certificate, &key_type, &max_length))
-     return nullptr;
- 
--  if (base::mac::IsAtLeastOS10_12()) {
--    return base::MakeRefCounted<ThreadedSSLPrivateKey>(
--        std::make_unique<SSLPlatformKeySecKey>(key_type, max_length,
--                                               private_key),
--        GetSSLPlatformKeyTaskRunner());
--  }
--
-   const CSSM_KEY* cssm_key;
-   OSStatus status = SecKeyGetCSSMKey(private_key, &cssm_key);
-   if (status != noErr) {
diff --git a/pkgs/development/libraries/qt-5/5.11/qtwebkit-darwin-no-qos-classes.patch b/pkgs/development/libraries/qt-5/5.11/qtwebkit-darwin-no-qos-classes.patch
deleted file mode 100644
index a7087f51762..00000000000
--- a/pkgs/development/libraries/qt-5/5.11/qtwebkit-darwin-no-qos-classes.patch
+++ /dev/null
@@ -1,11 +0,0 @@
-diff --git a/Source/cmake/OptionsQt.cmake b/Source/cmake/OptionsQt.cmake
---- a/Source/cmake/OptionsQt.cmake
-+++ b/Source/cmake/OptionsQt.cmake
-@@ -683,7 +683,6 @@ if (WIN32 AND COMPILER_IS_GCC_OR_CLANG)
- endif ()
- 
- if (APPLE)
--    SET_AND_EXPOSE_TO_BUILD(HAVE_QOS_CLASSES 1)
- endif ()
- 
- if (ENABLE_MATHML)
diff --git a/pkgs/development/libraries/qt-5/5.11/qtwebkit-darwin-no-readline.patch b/pkgs/development/libraries/qt-5/5.11/qtwebkit-darwin-no-readline.patch
deleted file mode 100644
index 26d189d8601..00000000000
--- a/pkgs/development/libraries/qt-5/5.11/qtwebkit-darwin-no-readline.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-diff --git a/Source/JavaScriptCore/shell/CMakeLists.txt b/Source/JavaScriptCore/shell/CMakeLists.txt
---- a/Source/JavaScriptCore/shell/CMakeLists.txt
-+++ b/Source/JavaScriptCore/shell/CMakeLists.txt
-@@ -9,7 +9,6 @@ set(JSC_LIBRARIES
- )
- 
- if (WTF_OS_MAC_OS_X)
--    list(APPEND JSC_LIBRARIES edit)
- endif ()
- 
- if ("${JavaScriptCore_LIBRARY_TYPE}" MATCHES "STATIC")
-diff --git a/Source/WTF/wtf/Platform.h b/Source/WTF/wtf/Platform.h
---- a/Source/WTF/wtf/Platform.h
-+++ b/Source/WTF/wtf/Platform.h
-@@ -563,7 +563,6 @@
- #if PLATFORM(IOS)
- 
- #define HAVE_NETWORK_EXTENSION 1
--#define HAVE_READLINE 1
- #if USE(APPLE_INTERNAL_SDK)
- #define USE_CFNETWORK 1
- #endif
-@@ -650,7 +649,6 @@
- #define HAVE_MADV_DONTNEED 1
- #define HAVE_MERGESORT 1
- #define HAVE_PTHREAD_SETNAME_NP 1
--#define HAVE_READLINE 1
- #define HAVE_SYS_TIMEB_H 1
- 
- #if !PLATFORM(GTK) && !PLATFORM(QT)
-diff --git a/Source/WTF/wtf/PlatformMac.cmake b/Source/WTF/wtf/PlatformMac.cmake
---- a/Source/WTF/wtf/PlatformMac.cmake
-+++ b/Source/WTF/wtf/PlatformMac.cmake
-@@ -2,11 +2,9 @@ set(WTF_LIBRARY_TYPE SHARED)
- 
- find_library(COCOA_LIBRARY Cocoa)
- find_library(COREFOUNDATION_LIBRARY CoreFoundation)
--find_library(READLINE_LIBRARY Readline)
- list(APPEND WTF_LIBRARIES
-     ${COREFOUNDATION_LIBRARY}
-     ${COCOA_LIBRARY}
--    ${READLINE_LIBRARY}
-     libicucore.dylib
- )
- 
diff --git a/pkgs/development/libraries/qt-5/5.12/default.nix b/pkgs/development/libraries/qt-5/5.12/default.nix
index 6d0e241d7a5..d84596bd054 100644
--- a/pkgs/development/libraries/qt-5/5.12/default.nix
+++ b/pkgs/development/libraries/qt-5/5.12/default.nix
@@ -20,7 +20,7 @@ top-level attribute to `top-level/all-packages.nix`.
   stdenv, fetchurl, fetchFromGitHub, makeSetupHook,
   bison, cups ? null, harfbuzz, libGL, perl,
   gstreamer, gst-plugins-base, gtk3, dconf,
-  cf-private,
+  cf-private, llvmPackages_5,
 
   # options
   developerBuild ? false,
@@ -51,11 +51,7 @@ let
   patches = {
     qtbase = [
       ./qtbase.patch
-      ./qtbase-darwin.patch
-      ./qtbase-revert-no-macos10.10.patch
       ./qtbase-fixguicmake.patch
-    ] ++ optionals stdenv.isDarwin [
-      ./qtbase-darwin-nseventtype.patch
     ];
     qtdeclarative = [ ./qtdeclarative.patch ];
     qtscript = [ ./qtscript.patch ];
@@ -73,8 +69,10 @@ let
   };
 
   mkDerivation =
-    import ../mkDerivation.nix
-    { inherit stdenv; inherit (stdenv) lib; }
+    import ../mkDerivation.nix {
+      inherit (stdenv) lib;
+      stdenv = if stdenv.cc.isClang then llvmPackages_5.stdenv else stdenv;
+    }
     { inherit debug; };
 
   qtModule =
diff --git a/pkgs/development/libraries/qt-5/5.12/qtbase-darwin-nseventtype.patch b/pkgs/development/libraries/qt-5/5.12/qtbase-darwin-nseventtype.patch
deleted file mode 100644
index 9ef6e8ef069..00000000000
--- a/pkgs/development/libraries/qt-5/5.12/qtbase-darwin-nseventtype.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/src/plugins/platforms/cocoa/qcocoawindow.mm
-+++ b/src/plugins/platforms/cocoa/qcocoawindow.mm
-@@ -404,8 +404,8 @@ void QCocoaWindow::setVisible(bool visible)
-                         removeMonitor();
-                         monitor = [NSEvent addGlobalMonitorForEventsMatchingMask:NSLeftMouseDownMask|NSRightMouseDownMask|NSOtherMouseDownMask|NSMouseMovedMask handler:^(NSEvent *e) {
-                             QPointF localPoint = QCocoaScreen::mapFromNative([NSEvent mouseLocation]);
--                            const auto button = e.type == NSEventTypeMouseMoved ? Qt::NoButton : cocoaButton2QtButton([e buttonNumber]);
--                            const auto eventType = e.type == NSEventTypeMouseMoved ? QEvent::MouseMove : QEvent::MouseButtonPress;
-+                            const auto button = e.type == NSMouseMoved ? Qt::NoButton : cocoaButton2QtButton([e buttonNumber]);
-+                            const auto eventType = e.type == NSMouseMoved ? QEvent::MouseMove : QEvent::MouseButtonPress;
-                             QWindowSystemInterface::handleMouseEvent(window(), window()->mapFromGlobal(localPoint.toPoint()), localPoint,
-                                                                      Qt::MouseButtons(uint(NSEvent.pressedMouseButtons & 0xFFFF)), button, eventType);
-                         }];
diff --git a/pkgs/development/libraries/qt-5/5.12/qtbase-darwin.patch b/pkgs/development/libraries/qt-5/5.12/qtbase-darwin.patch
deleted file mode 100644
index 7ce27a99758..00000000000
--- a/pkgs/development/libraries/qt-5/5.12/qtbase-darwin.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-diff --git a/src/plugins/bearer/corewlan/qcorewlanengine.mm b/src/plugins/bearer/corewlan/qcorewlanengine.mm
-index c3dd49ff3e..6871399817 100644
---- a/src/plugins/bearer/corewlan/qcorewlanengine.mm
-+++ b/src/plugins/bearer/corewlan/qcorewlanengine.mm
-@@ -283,7 +283,7 @@ void QScanThread::getUserConfigurations()
-     QMacAutoReleasePool pool;
-     userProfiles.clear();
- 
--    NSArray<NSString *> *wifiInterfaces = [CWWiFiClient interfaceNames];
-+    NSArray *wifiInterfaces = [CWWiFiClient interfaceNames];
-     for (NSString *ifName in wifiInterfaces) {
- 
-         CWInterface *wifiInterface = [[CWWiFiClient sharedWiFiClient] interfaceWithName:ifName];
-@@ -598,7 +598,7 @@ void QCoreWlanEngine::doRequestUpdate()
- 
-     QMacAutoReleasePool pool;
- 
--    NSArray<NSString *> *wifiInterfaces = [CWWiFiClient interfaceNames];
-+    NSArray *wifiInterfaces = [CWWiFiClient interfaceNames];
-     for (NSString *ifName in wifiInterfaces) {
-             scanThread->interfaceName = QString::fromNSString(ifName);
-             scanThread->start();
-diff --git a/src/plugins/platforms/cocoa/qcocoascreen.mm b/src/plugins/platforms/cocoa/qcocoascreen.mm
-index afe14e623c..74d69c2fa1 100644
---- a/src/plugins/platforms/cocoa/qcocoascreen.mm
-+++ b/src/plugins/platforms/cocoa/qcocoascreen.mm
-@@ -127,7 +127,7 @@ void QCocoaScreen::updateProperties()
-     const qreal previousRefreshRate = m_refreshRate;
- 
-     // The reference screen for the geometry is always the primary screen
--    QRectF primaryScreenGeometry = QRectF::fromCGRect([[NSScreen screens] firstObject].frame);
-+    QRectF primaryScreenGeometry = QRectF::fromCGRect([[[NSScreen screens] firstObject] frame]);
-     m_geometry = qt_mac_flip(QRectF::fromCGRect(nsScreen.frame), primaryScreenGeometry).toRect();
-     m_availableGeometry = qt_mac_flip(QRectF::fromCGRect(nsScreen.visibleFrame), primaryScreenGeometry).toRect();
- 
-diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm
-index df1ad82592..0318a4ff96 100644
---- a/src/plugins/platforms/cocoa/qcocoawindow.mm
-+++ b/src/plugins/platforms/cocoa/qcocoawindow.mm
-@@ -1704,7 +1704,7 @@ void QCocoaWindow::applyContentBorderThickness(NSWindow *window)
- 
-     if (!m_drawContentBorderGradient) {
-         window.styleMask = window.styleMask & ~NSWindowStyleMaskTexturedBackground;
--        [window.contentView.superview setNeedsDisplay:YES];
-+        [[window.contentView superview] setNeedsDisplay:YES];
-         window.titlebarAppearsTransparent = NO;
-         return;
-     }
-diff --git a/src/plugins/platforms/cocoa/qnswindow.mm b/src/plugins/platforms/cocoa/qnswindow.mm
-index c17ad47aba..a0f1dd38fb 100644
---- a/src/plugins/platforms/cocoa/qnswindow.mm
-+++ b/src/plugins/platforms/cocoa/qnswindow.mm
-@@ -230,7 +230,7 @@ static bool isMouseEvent(NSEvent *ev)
-     if (pw->frameStrutEventsEnabled() && isMouseEvent(theEvent)) {
-         NSPoint loc = [theEvent locationInWindow];
-         NSRect windowFrame = [self convertRectFromScreen:self.frame];
--        NSRect contentFrame = self.contentView.frame;
-+        NSRect contentFrame = [self.contentView frame];
-         if (NSMouseInRect(loc, windowFrame, NO) && !NSMouseInRect(loc, contentFrame, NO))
-             [qnsview_cast(pw->view()) handleFrameStrutMouseEvent:theEvent];
-     }
-@@ -257,7 +257,7 @@ static bool isMouseEvent(NSEvent *ev)
- + (void)applicationActivationChanged:(NSNotification*)notification
- {
-     const id sender = self;
--    NSEnumerator<NSWindow*> *windowEnumerator = nullptr;
-+    NSEnumerator *windowEnumerator = nullptr;
-     NSApplication *application = [NSApplication sharedApplication];
- 
-     // Unfortunately there's no NSWindowListOrderedBackToFront,
diff --git a/pkgs/development/libraries/qt-5/5.12/qtbase-revert-no-macos10.10.patch b/pkgs/development/libraries/qt-5/5.12/qtbase-revert-no-macos10.10.patch
deleted file mode 100644
index 29776518379..00000000000
--- a/pkgs/development/libraries/qt-5/5.12/qtbase-revert-no-macos10.10.patch
+++ /dev/null
@@ -1,102 +0,0 @@
-Revert "Remove code paths for macOS < 10.11"
-
-This reverts commit 138a65e0cfa80b13fd018a01e7d8b33341a3cfd3.
-
-From 138a65e0cfa80b13fd018a01e7d8b33341a3cfd3 Mon Sep 17 00:00:00 2001
-From: Jake Petroules <jake.petroules@qt.io>
-Date: Thu, 8 Feb 2018 11:05:42 -0800
-Subject: [PATCH] Remove code paths for macOS < 10.11
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Change-Id: I5ae02d88aa3dcd97d1f2ebf6255a68643e5d6daa
-Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
-Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
-Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
----
- .../fontdatabases/mac/qfontengine_coretext.mm            | 16 +++-------------
- src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm    |  6 +-----
- src/plugins/platforms/cocoa/qnswindowdelegate.mm         | 16 ----------------
- 3 files changed, 4 insertions(+), 34 deletions(-)
-
-diff --git a/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm b/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm
-index 98b753eff9..489d9cd031 100644
---- a/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm
-+++ b/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm
-@@ -47,18 +47,28 @@
- 
- #include <cmath>
- 
--#if defined(Q_OS_MACOS)
-+#if defined(Q_OS_OSX) && !QT_OSX_DEPLOYMENT_TARGET_BELOW(__MAC_10_11)
- #import <AppKit/AppKit.h>
- #endif
- 
--#if defined(QT_PLATFORM_UIKIT)
-+#if defined(QT_PLATFORM_UIKIT) && !QT_IOS_DEPLOYMENT_TARGET_BELOW(__IPHONE_8_2)
- #import <UIKit/UIKit.h>
- #endif
- 
- // These are available cross platform, exported as kCTFontWeightXXX from CoreText.framework,
- // but they are not documented and are not in public headers so are private API and exposed
- // only through the NSFontWeightXXX and UIFontWeightXXX aliases in AppKit and UIKit (rdar://26109857)
--#if defined(Q_OS_MACOS)
-+#if QT_MAC_DEPLOYMENT_TARGET_BELOW(__MAC_10_11, __IPHONE_8_2)
-+#define kCTFontWeightUltraLight -0.8
-+#define kCTFontWeightThin -0.6
-+#define kCTFontWeightLight -0.4
-+#define kCTFontWeightRegular 0
-+#define kCTFontWeightMedium 0.23
-+#define kCTFontWeightSemibold 0.3
-+#define kCTFontWeightBold 0.4
-+#define kCTFontWeightHeavy 0.56
-+#define kCTFontWeightBlack 0.62
-+#elif defined(Q_OS_OSX)
- #define kCTFontWeightUltraLight NSFontWeightUltraLight
- #define kCTFontWeightThin NSFontWeightThin
- #define kCTFontWeightLight NSFontWeightLight
-diff --git a/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm b/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm
-index 94f2125bad..272cd9f3dc 100644
---- a/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm
-+++ b/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm
-@@ -162,7 +162,11 @@ QT_NAMESPACE_ALIAS_OBJC_CLASS(QNSOpenSavePanelDelegate);
-     // resetting our mCurrentDir, set the delegate
-     // here to make sure it gets the correct value.
-     [mSavePanel setDelegate:self];
--    mOpenPanel.accessoryViewDisclosed = YES;
-+
-+#if QT_OSX_PLATFORM_SDK_EQUAL_OR_ABOVE(__MAC_10_11)
-+    if (__builtin_available(macOS 10.11, *))
-+        mOpenPanel.accessoryViewDisclosed = YES;
-+#endif
- 
-     if (mOptions->isLabelExplicitlySet(QFileDialogOptions::Accept))
-         [mSavePanel setPrompt:[self strip:options->labelText(QFileDialogOptions::Accept)]];
-diff --git a/src/plugins/platforms/cocoa/qnswindowdelegate.mm b/src/plugins/platforms/cocoa/qnswindowdelegate.mm
-index 057a4c2943..eb55e50622 100644
---- a/src/plugins/platforms/cocoa/qnswindowdelegate.mm
-+++ b/src/plugins/platforms/cocoa/qnswindowdelegate.mm
-@@ -103,6 +103,22 @@ static QRegExp whitespaceRegex = QRegExp(QStringLiteral("\\s*"));
-     return QCocoaScreen::mapToNative(maximizedFrame);
- }
- 
-+#if QT_MACOS_DEPLOYMENT_TARGET_BELOW(__MAC_10_11)
-+/*
-+    AppKit on OS X 10.10 wrongly calls windowWillUseStandardFrame:defaultFrame
-+    from -[NSWindow _frameForFullScreenMode] when going into fullscreen, resulting
-+    in black bars on top and bottom of the window. By implementing the following
-+    method, AppKit will choose that instead, and resolve the right fullscreen
-+    geometry.
-+*/
-+- (NSSize)window:(NSWindow *)window willUseFullScreenContentSize:(NSSize)proposedSize
-+{
-+    Q_UNUSED(proposedSize);
-+    Q_ASSERT(window == m_cocoaWindow->nativeWindow());
-+    return NSSizeFromCGSize(m_cocoaWindow->screen()->geometry().size().toCGSize());
-+}
-+#endif
-+
- - (BOOL)window:(NSWindow *)window shouldPopUpDocumentPathMenu:(NSMenu *)menu
- {
-     Q_UNUSED(window);
diff --git a/pkgs/development/libraries/qt-5/5.9/default.nix b/pkgs/development/libraries/qt-5/5.9/default.nix
index be84691e6c3..d1e9af29926 100644
--- a/pkgs/development/libraries/qt-5/5.9/default.nix
+++ b/pkgs/development/libraries/qt-5/5.9/default.nix
@@ -38,7 +38,7 @@ let
   srcs = import ./srcs.nix { inherit fetchurl; inherit mirror; };
 
   patches = {
-    qtbase = [ ./qtbase.patch ./qtbase-fixguicmake.patch ] ++ optional stdenv.isDarwin ./qtbase-darwin.patch;
+    qtbase = [ ./qtbase.patch ./qtbase-fixguicmake.patch ];
     qtdeclarative = [ ./qtdeclarative.patch ];
     qtscript = [ ./qtscript.patch ];
     qtserialport = [ ./qtserialport.patch ];
diff --git a/pkgs/development/libraries/qt-5/5.9/qtbase-darwin.patch b/pkgs/development/libraries/qt-5/5.9/qtbase-darwin.patch
deleted file mode 100644
index 875fba12e2f..00000000000
--- a/pkgs/development/libraries/qt-5/5.9/qtbase-darwin.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-diff --git a/src/plugins/bearer/corewlan/qcorewlanengine.mm b/src/plugins/bearer/corewlan/qcorewlanengine.mm
-index 341d3bc..3368234 100644
---- a/src/plugins/bearer/corewlan/qcorewlanengine.mm
-+++ b/src/plugins/bearer/corewlan/qcorewlanengine.mm
-@@ -287,7 +287,7 @@ void QScanThread::getUserConfigurations()
-     QMacAutoReleasePool pool;
-     userProfiles.clear();
- 
--    NSArray<NSString *> *wifiInterfaces = [CWWiFiClient interfaceNames];
-+    NSArray *wifiInterfaces = [CWWiFiClient interfaceNames];
-     for (NSString *ifName in wifiInterfaces) {
- 
-         CWInterface *wifiInterface = [[CWWiFiClient sharedWiFiClient] interfaceWithName:ifName];
-@@ -602,7 +602,7 @@ void QCoreWlanEngine::doRequestUpdate()
- 
-     QMacAutoReleasePool pool;
- 
--    NSArray<NSString *> *wifiInterfaces = [CWWiFiClient interfaceNames];
-+    NSArray *wifiInterfaces = [CWWiFiClient interfaceNames];
-     for (NSString *ifName in wifiInterfaces) {
-             scanThread->interfaceName = QString::fromNSString(ifName);
-             scanThread->start();
-diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm
-index 5cd4beb..84919e6 100644
---- a/src/plugins/platforms/cocoa/qcocoawindow.mm
-+++ b/src/plugins/platforms/cocoa/qcocoawindow.mm
-@@ -320,7 +320,7 @@ static void qt_closePopups()
- + (void)applicationActivationChanged:(NSNotification*)notification
- {
-     const id sender = self;
--    NSEnumerator<NSWindow*> *windowEnumerator = nullptr;
-+    NSEnumerator *windowEnumerator = nullptr;
-     NSApplication *application = [NSApplication sharedApplication];
- 
- #if QT_MACOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__MAC_10_12)
diff --git a/pkgs/development/libraries/qt-5/modules/qtbase.nix b/pkgs/development/libraries/qt-5/modules/qtbase.nix
index 92ac8a24201..bd92d9bc27c 100644
--- a/pkgs/development/libraries/qt-5/modules/qtbase.nix
+++ b/pkgs/development/libraries/qt-5/modules/qtbase.nix
@@ -2,7 +2,7 @@
   stdenv, lib,
   src, patches, version, qtCompatVersion,
 
-  coreutils, bison, flex, gdb, gperf, lndir, patchelf, perl, pkgconfig, python2,
+  coreutils, bison, flex, gdb, gperf, lndir, perl, pkgconfig, python2,
   which,
   # darwin support
   darwin, libiconv,
@@ -78,17 +78,15 @@ stdenv.mkDerivation {
       [ libinput ]
       ++ lib.optional withGtk3 gtk3
     )
-    ++ lib.optional stdenv.isDarwin
-      # Needed for OBJC_CLASS_$_NSDate symbols.
-      [ darwin.cf-private ]
+       # Needed for OBJC_CLASS_$_NSDate symbols.
+    ++ lib.optional stdenv.isDarwin darwin.cf-private
     ++ lib.optional developerBuild gdb
     ++ lib.optional (cups != null) cups
     ++ lib.optional (mysql != null) mysql.connector-c
     ++ lib.optional (postgresql != null) postgresql;
 
   nativeBuildInputs =
-    [ bison flex gperf lndir perl pkgconfig python2 which ]
-    ++ lib.optional (!stdenv.isDarwin) patchelf;
+    [ bison flex gperf lndir perl pkgconfig python2 which ];
 
   propagatedNativeBuildInputs = [ lndir ];
 
@@ -199,26 +197,11 @@ stdenv.mkDerivation {
       ''-DNIXPKGS_LIBXCURSOR="${libXcursor.out}/lib/libXcursor"''
     ]
 
-    ++ (
-      if stdenv.isDarwin
-      then
-        [
-          "-Wno-missing-sysroot"
-          "-D__MAC_OS_X_VERSION_MAX_ALLOWED=1090"
-          "-D__AVAILABILITY_INTERNAL__MAC_10_10=__attribute__((availability(macosx,introduced=10.10)))"
-          # Note that nixpkgs's objc4 is from macOS 10.11 while the SDK is
-          # 10.9 which necessitates the above macro definition that mentions
-          # 10.10
-        ]
-      else
-        lib.optional libGLSupported ''-DNIXPKGS_MESA_GL="${libGL.out}/lib/libGL"''
-        ++ lib.optionals withGtk3
-          [
-            ''-DNIXPKGS_QGTK3_XDG_DATA_DIRS="${gtk3}/share/gsettings-schemas/${gtk3.name}"''
-            ''-DNIXPKGS_QGTK3_GIO_EXTRA_MODULES="${dconf.lib}/lib/gio/modules"''
-          ]
-    )
-
+    ++ lib.optional libGLSupported ''-DNIXPKGS_MESA_GL="${libGL.out}/lib/libGL"''
+    ++ lib.optionals withGtk3 [
+         ''-DNIXPKGS_QGTK3_XDG_DATA_DIRS="${gtk3}/share/gsettings-schemas/${gtk3.name}"''
+         ''-DNIXPKGS_QGTK3_GIO_EXTRA_MODULES="${dconf.lib}/lib/gio/modules"''
+       ]
     ++ lib.optional decryptSslTraffic "-DQT_DECRYPT_SSL_TRAFFIC";
 
   prefixKey = "-prefix ";
@@ -266,15 +249,18 @@ stdenv.mkDerivation {
     ++ (
       if (!stdenv.hostPlatform.isx86_64)
       then [ "-no-sse2" ]
-      else lib.optional (compareVersion "5.9.0" >= 0) [ "-sse2" ]
+      else lib.optionals (compareVersion "5.9.0" >= 0) {
+        "default"        = [ "-sse2" "-no-sse3" "-no-ssse3" "-no-sse4.1" "-no-sse4.2" "-no-avx" "-no-avx2" ];
+        "westmere"       = [ "-sse2"    "-sse3"    "-ssse3"    "-sse4.1"    "-sse4.2" "-no-avx" "-no-avx2" ];
+        "sandybridge"    = [ "-sse2"    "-sse3"    "-ssse3"    "-sse4.1"    "-sse4.2"    "-avx" "-no-avx2" ];
+        "ivybridge"      = [ "-sse2"    "-sse3"    "-ssse3"    "-sse4.1"    "-sse4.2"    "-avx" "-no-avx2" ];
+        "haswell"        = [ "-sse2"    "-sse3"    "-ssse3"    "-sse4.1"    "-sse4.2"    "-avx"    "-avx2" ];
+        "broadwell"      = [ "-sse2"    "-sse3"    "-ssse3"    "-sse4.1"    "-sse4.2"    "-avx"    "-avx2" ];
+        "skylake"        = [ "-sse2"    "-sse3"    "-ssse3"    "-sse4.1"    "-sse4.2"    "-avx"    "-avx2" ];
+        "skylake-avx512" = [ "-sse2"    "-sse3"    "-ssse3"    "-sse4.1"    "-sse4.2"    "-avx"    "-avx2" ];
+      }.${stdenv.hostPlatform.platform.gcc.arch or "default"}
     )
     ++ [
-      "-no-sse3"
-      "-no-ssse3"
-      "-no-sse4.1"
-      "-no-sse4.2"
-      "-no-avx"
-      "-no-avx2"
       "-no-mips_dsp"
       "-no-mips_dspr2"
     ]
@@ -392,6 +378,7 @@ stdenv.mkDerivation {
     license = with licenses; [ fdl13 gpl2 lgpl21 lgpl3 ];
     maintainers = with maintainers; [ qknight ttuegel periklis bkchr ];
     platforms = platforms.unix;
+    broken = stdenv.isDarwin && (compareVersion "5.9.0" < 0);
   };
 
 }
diff --git a/pkgs/development/libraries/qt-5/modules/qtwebengine.nix b/pkgs/development/libraries/qt-5/modules/qtwebengine.nix
index 91b7acf4365..86897cb3f16 100644
--- a/pkgs/development/libraries/qt-5/modules/qtwebengine.nix
+++ b/pkgs/development/libraries/qt-5/modules/qtwebengine.nix
@@ -79,7 +79,7 @@ qtModule {
     cat <<EOF > src/3rdparty/chromium/build/mac/find_sdk.py
 #!/usr/bin/env python
 print("${darwin.apple_sdk.sdk}")
-print("10.10.0")
+print("10.12.0")
 EOF
 
     cat <<EOF > src/3rdparty/chromium/build/config/mac/sdk_info.py
@@ -103,7 +103,10 @@ EOF
     '');
 
   NIX_CFLAGS_COMPILE =
-    lib.optionalString stdenv.isDarwin [
+  # it fails when compiled with -march=sandybridge https://github.com/NixOS/nixpkgs/pull/59148#discussion_r276696940
+  # TODO: investigate and fix properly
+    lib.optionals (stdenv.hostPlatform.platform.gcc.arch or "" == "sandybridge") [ "-march=westmere" ] ++
+    lib.optionals stdenv.isDarwin [
       "-DMAC_OS_X_VERSION_MAX_ALLOWED=MAC_OS_X_VERSION_10_10"
       "-DMAC_OS_X_VERSION_MIN_REQUIRED=MAC_OS_X_VERSION_10_10"
 
diff --git a/pkgs/development/libraries/qt-5/modules/qtwebkit.nix b/pkgs/development/libraries/qt-5/modules/qtwebkit.nix
index 6b43f6ed25c..2a474ab0ffe 100644
--- a/pkgs/development/libraries/qt-5/modules/qtwebkit.nix
+++ b/pkgs/development/libraries/qt-5/modules/qtwebkit.nix
@@ -58,7 +58,8 @@ qtModule {
     ++ optionals flashplayerFix
       [
         ''-DNIXPKGS_LIBGTK2="${getLib gtk2}/lib/libgtk-x11-2.0"''
-        ''-DNIXPKGS_LIBGDK2="${getLib gdk_pixbuf}/lib/libgdk-x11-2.0"''
+        # this file used to exist in gdk_pixbuf?
+        ''-DNIXPKGS_LIBGDK2="${getLib gtk2}/lib/libgdk-x11-2.0"''
       ]
     ++ optional (!stdenv.isDarwin) ''-DNIXPKGS_LIBUDEV="${getLib systemd}/lib/libudev"'';
 
diff --git a/pkgs/development/libraries/quazip/default.nix b/pkgs/development/libraries/quazip/default.nix
index b53335f45c3..addf9a1dbd6 100644
--- a/pkgs/development/libraries/quazip/default.nix
+++ b/pkgs/development/libraries/quazip/default.nix
@@ -1,4 +1,4 @@
-{ fetchFromGitHub, stdenv, zlib, qtbase, qmake }:
+{ fetchFromGitHub, stdenv, zlib, qtbase, qmake, fixDarwinDylibNames }:
 
 stdenv.mkDerivation rec {
   pname = "quazip";
@@ -12,12 +12,15 @@ stdenv.mkDerivation rec {
   };
 
   buildInputs = [ zlib qtbase ];
-  nativeBuildInputs = [ qmake ];
+  nativeBuildInputs = [ qmake ]
+    ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames;
+  qmakeFlags = [ "quazip" ]
+    ++ stdenv.lib.optional stdenv.isDarwin [ "LIBS=-lz" ];
 
-  meta = {
+  meta = with stdenv.lib; {
     description = "Provides access to ZIP archives from Qt programs";
-    license = stdenv.lib.licenses.gpl2Plus;
+    license = licenses.lgpl21Plus;
     homepage = https://stachenov.github.io/quazip/; # Migrated from http://quazip.sourceforge.net/
-    platforms = stdenv.lib.platforms.linux;
+    platforms = with platforms; linux ++ darwin;
   };
 }
diff --git a/pkgs/development/libraries/range-v3/default.nix b/pkgs/development/libraries/range-v3/default.nix
index 7fe4b504a99..256b756ed45 100644
--- a/pkgs/development/libraries/range-v3/default.nix
+++ b/pkgs/development/libraries/range-v3/default.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   name = "range-v3-${version}";
-  version = "0.4.0";
+  version = "0.5.0";
 
   src = fetchFromGitHub {
     owner = "ericniebler";
     repo = "range-v3";
     rev = version;
-    sha256 = "1s5gj799aa94nfg3r24whq7ck69g0zypf70w14wx64pgwg0424vf";
+    sha256 = "0fzbpaa4vwlivi417zxm1d6v4lkp5c9f5bd706nn2fmw3zxjj815";
   };
 
   nativeBuildInputs = [ cmake ];
diff --git a/pkgs/development/libraries/science/math/fenics/default.nix b/pkgs/development/libraries/science/math/fenics/default.nix
index 6c939d9a3a4..8134cc63eb0 100644
--- a/pkgs/development/libraries/science/math/fenics/default.nix
+++ b/pkgs/development/libraries/science/math/fenics/default.nix
@@ -35,10 +35,15 @@ let
       url = "https://bitbucket.org/fenics-project/dijitso/downloads/dijitso-${version}.tar.gz";
       sha256 = "0mw6mynjmg6yl3l2k33yra2x84s4r6mh44ylhk9znjfk74jra8zg";
     };
-    buildInputs = [ numpy pytest six ];
-    checkPhase = ''
+    buildInputs = [ numpy six ];
+    nativeBuildInputs = [ pytest ];
+    preCheck = ''
       export HOME=$PWD
+    '';
+    checkPhase = ''
+      runHook preCheck
       py.test test/
+      runHook postCheck
     '';
     meta = {
       description = "Distributed just-in-time shared library building";
diff --git a/pkgs/development/libraries/science/math/openblas/default.nix b/pkgs/development/libraries/science/math/openblas/default.nix
index 5d0f6794d17..489883e644c 100644
--- a/pkgs/development/libraries/science/math/openblas/default.nix
+++ b/pkgs/development/libraries/science/math/openblas/default.nix
@@ -58,6 +58,7 @@ let
       BINARY = 64;
       TARGET = setTarget "ATHLON";
       DYNAMIC_ARCH = true;
+      NO_AVX512 = true;
       USE_OPENMP = true;
     };
   };
diff --git a/pkgs/development/libraries/sqlite/analyzer.nix b/pkgs/development/libraries/sqlite/analyzer.nix
index 5c42f729469..f0390486b10 100644
--- a/pkgs/development/libraries/sqlite/analyzer.nix
+++ b/pkgs/development/libraries/sqlite/analyzer.nix
@@ -6,11 +6,11 @@ in
 
 stdenv.mkDerivation rec {
   name = "sqlite-analyzer-${version}";
-  version = "3.27.2";
+  version = "3.28.0";
 
   src = assert version == sqlite.version; fetchurl {
     url = "https://sqlite.org/2019/sqlite-src-${archiveVersion version}.zip";
-    sha256 = "02nz1y22wyb8101d9y6wfdrvp855wvch67js12p5y3riya345g8m";
+    sha256 = "15v57b113bpgcshfsx5jw93szar3da94rr03i053xhl15la7jllh";
   };
 
   nativeBuildInputs = [ unzip ];
@@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
   meta = with stdenv.lib; {
     description = "A tool that shows statistics about SQLite databases";
     downloadPage = http://sqlite.org/download.html;
-    homepage = http://www.sqlite.org;
+    homepage = https://www.sqlite.org;
     license = licenses.publicDomain;
     maintainers = with maintainers; [ pesterhazy ];
     platforms = platforms.unix;
diff --git a/pkgs/development/libraries/sqlite/default.nix b/pkgs/development/libraries/sqlite/default.nix
index bacba396c25..ea1c38ea476 100644
--- a/pkgs/development/libraries/sqlite/default.nix
+++ b/pkgs/development/libraries/sqlite/default.nix
@@ -10,12 +10,12 @@ in
 
 stdenv.mkDerivation rec {
   name = "sqlite-${version}";
-  version = "3.27.2";
+  version = "3.28.0";
 
   # NB! Make sure to update analyzer.nix src (in the same directory).
   src = fetchurl {
     url = "https://sqlite.org/2019/sqlite-autoconf-${archiveVersion version}.tar.gz";
-    sha256 = "0vpgwszs19pwks2b4dhqwa0n6q5sx6pn1s7rngyyrd98xa2rxhsh";
+    sha256 = "1hxpi45crbqp6lacl7z611lna02k956m9bsy2bjzrbb2y23546yn";
   };
 
   outputs = [ "bin" "dev" "out" ];
@@ -75,8 +75,8 @@ stdenv.mkDerivation rec {
 
   meta = {
     description = "A self-contained, serverless, zero-configuration, transactional SQL database engine";
-    downloadPage = http://sqlite.org/download.html;
-    homepage = http://www.sqlite.org/;
+    downloadPage = https://sqlite.org/download.html;
+    homepage = https://www.sqlite.org/;
     license = licenses.publicDomain;
     maintainers = with maintainers; [ eelco np ];
     platforms = platforms.unix ++ platforms.windows;
diff --git a/pkgs/development/libraries/tbb/default.nix b/pkgs/development/libraries/tbb/default.nix
index 615ac4fa690..f95ae385ab6 100644
--- a/pkgs/development/libraries/tbb/default.nix
+++ b/pkgs/development/libraries/tbb/default.nix
@@ -2,13 +2,13 @@
 
 with stdenv.lib; stdenv.mkDerivation rec {
   name = "tbb-${version}";
-  version = "2019_U5";
+  version = "2019_U6";
 
   src = fetchFromGitHub {
     owner = "01org";
     repo = "tbb";
     rev = version;
-    sha256 = "0390da1iya2mvn3ribjb1f8yvzsqsf5b16wn6dqbjxcz0crmwlzk";
+    sha256 = "1zbf06l659vq6s5wp3ln96ycwcd42caffan5vilqvqyxqvjljyic";
   };
 
   makeFlags = concatStringsSep " " (
diff --git a/pkgs/development/libraries/tk/8.6.nix b/pkgs/development/libraries/tk/8.6.nix
index cd8d42faa91..5013db64bba 100644
--- a/pkgs/development/libraries/tk/8.6.nix
+++ b/pkgs/development/libraries/tk/8.6.nix
@@ -3,8 +3,8 @@
 callPackage ./generic.nix (args // rec {
 
   src = fetchurl {
-    url = "mirror://sourceforge/tcl/tk${tcl.version}-src.tar.gz";
-    sha256 = "17diivcfcwdhp4v5zi6j9nkxncccjqkivhp363c4wx5lf4d3fb6n";
+    url = "mirror://sourceforge/tcl/tk${tcl.version}.1-src.tar.gz"; # TODO: remove '.1' for v8.6.10 or v8.7.x
+    sha256 = "1d7bfkxpacy33w5nahf73lkwxqpff44w1jplg7i2gmwgiaawvjwg";
   };
 
   patches = [ ./different-prefix-with-tcl.patch ] ++ stdenv.lib.optionals stdenv.isDarwin [ ./Fix-bad-install_name-for-libtk8.6.dylib.patch ];
diff --git a/pkgs/development/libraries/tk/generic.nix b/pkgs/development/libraries/tk/generic.nix
index d5eaff77c11..10b8bc7cd71 100644
--- a/pkgs/development/libraries/tk/generic.nix
+++ b/pkgs/development/libraries/tk/generic.nix
@@ -19,16 +19,19 @@ stdenv.mkDerivation {
   postInstall = ''
     ln -s $out/bin/wish* $out/bin/wish
     cp ../{unix,generic}/*.h $out/include
+    ln -s $out/lib/libtk${tcl.release}.so $out/lib/libtk.so
   '';
 
   configureFlags = [
+    "--enable-threads"
     "--with-tcl=${tcl}/lib"
-  ] ++ stdenv.lib.optional enableAqua "--enable-aqua";
+  ] ++ stdenv.lib.optional stdenv.is64bit "--enable-64bit"
+    ++ stdenv.lib.optional enableAqua "--enable-aqua";
 
   nativeBuildInputs = [ pkgconfig ];
 
-  propagatedBuildInputs = [ tcl libXft ];
-  buildInputs = lib.optional enableAqua (with darwin; with apple_sdk.frameworks; [
+  propagatedBuildInputs = [ tcl libXft ]
+    ++ lib.optional enableAqua (with darwin; with apple_sdk.frameworks; [
       Cocoa cf-private
     ]);
 
@@ -44,7 +47,7 @@ stdenv.mkDerivation {
 
   meta = with stdenv.lib; {
     description = "A widget toolkit that provides a library of basic elements for building a GUI in many different programming languages";
-    homepage = http://www.tcl.tk/;
+    homepage = https://www.tcl.tk/;
     license = licenses.tcltk;
     platforms = platforms.all;
     maintainers = with maintainers; [ lovek323 vrthra ];
diff --git a/pkgs/development/libraries/utf8proc/default.nix b/pkgs/development/libraries/utf8proc/default.nix
index 5b05f9ffef4..72f6f57553f 100644
--- a/pkgs/development/libraries/utf8proc/default.nix
+++ b/pkgs/development/libraries/utf8proc/default.nix
@@ -1,19 +1,21 @@
-{ stdenv, fetchurl }:
+{ stdenv, fetchFromGitHub }:
 
 stdenv.mkDerivation rec {
-  name = "utf8proc-${version}";
-  version = "2.2.0";
+  pname = "utf8proc";
+  version = "2.3.0";
 
-  src = fetchurl {
-    url = "https://github.com/JuliaLang/utf8proc/archive/v${version}.tar.gz";
-    sha256 = "1gsxxp7vk36z1g5mg19kq10j35dks5f9slsab2xfazh5vgdx33rz";
+  src = fetchFromGitHub {
+    owner = "JuliaStrings";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "1jhjl7nw6262ks5zrk447qmh6z2r5rrnnrm742dk33d7031g3s55";
   };
 
   makeFlags = [ "prefix=$(out)" ];
 
   meta = with stdenv.lib; {
     description = "A clean C library for processing UTF-8 Unicode data";
-    homepage = https://julialang.org/utf8proc;
+    homepage = "https://juliastrings.github.io/utf8proc/";
     license = licenses.mit;
     platforms = platforms.all;
     maintainers = [ maintainers.ftrvxmtrx ];
diff --git a/pkgs/development/libraries/v8/build-standalone-static-library.patch b/pkgs/development/libraries/v8/build-standalone-static-library.patch
deleted file mode 100644
index 994c322429d..00000000000
--- a/pkgs/development/libraries/v8/build-standalone-static-library.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-diff --git a/build/standalone.gypi b/build/standalone.gypi
-index b6519c4..ef9e7c5 100644
---- a/build/standalone.gypi
-+++ b/build/standalone.gypi
-@@ -373,6 +373,9 @@
-       }],
-     ],
-     'target_conditions': [
-+      ['_type=="static_library"', {
-+        'standalone_static_library': 1,
-+      }],
-       ['v8_code == 0', {
-         'defines!': [
-           'DEBUG',
diff --git a/pkgs/development/libraries/v8/disable-building-tests.patch b/pkgs/development/libraries/v8/disable-building-tests.patch
deleted file mode 100644
index 1854a9b7e56..00000000000
--- a/pkgs/development/libraries/v8/disable-building-tests.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-diff --git a/Makefile b/Makefile
-index 9761265..80169b2 100644
---- a/Makefile
-+++ b/Makefile
-@@ -248,8 +248,6 @@ NACL_ARCHES = nacl_ia32 nacl_x64
- GYPFILES = third_party/icu/icu.gypi third_party/icu/icu.gyp \
- 	   build/shim_headers.gypi build/features.gypi build/standalone.gypi \
- 	   build/toolchain.gypi build/all.gyp build/mac/asan.gyp \
--	   test/cctest/cctest.gyp \
--	   test/unittests/unittests.gyp tools/gyp/v8.gyp \
- 	   tools/parser-shell.gyp testing/gmock.gyp testing/gtest.gyp \
- 	   buildtools/third_party/libc++abi/libc++abi.gyp \
- 	   buildtools/third_party/libc++/libc++.gyp samples/samples.gyp \
-diff --git a/build/all.gyp b/build/all.gyp
-index 4aeb507..1ff2c7a 100644
---- a/build/all.gyp
-+++ b/build/all.gyp
-@@ -10,8 +10,6 @@
-       'dependencies': [
-         '../samples/samples.gyp:*',
-         '../src/d8.gyp:d8',
--        '../test/cctest/cctest.gyp:*',
--        '../test/unittests/unittests.gyp:*',
-       ],
-       'conditions': [
-         ['component!="shared_library"', {
-
diff --git a/pkgs/development/libraries/v8/fPIC-for-static.patch b/pkgs/development/libraries/v8/fPIC-for-static.patch
deleted file mode 100644
index 39564772af8..00000000000
--- a/pkgs/development/libraries/v8/fPIC-for-static.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/build/standalone.gypi b/build/standalone.gypi
-index 7670e5b..230518c 100644
---- a/build/standalone.gypi
-+++ b/build/standalone.gypi
-@@ -205,7 +205,7 @@
-           [ 'visibility=="hidden" and v8_enable_backtrace==0', {
-             'cflags': [ '-fvisibility=hidden' ],
-           }],
--          [ 'component=="shared_library"', {
-+          [ 'component=="shared_library" or component=="static_library" and (v8_target_arch=="x64" or v8_target_arch=="arm64")', {
-             'cflags': [ '-fPIC', ],
-           }],
-         ],
diff --git a/pkgs/development/libraries/vte/default.nix b/pkgs/development/libraries/vte/default.nix
index 7089da984a9..273072e9323 100644
--- a/pkgs/development/libraries/vte/default.nix
+++ b/pkgs/development/libraries/vte/default.nix
@@ -5,11 +5,11 @@
 
 stdenv.mkDerivation rec {
   pname = "vte";
-  version = "0.56.1";
+  version = "0.56.3";
 
   src = fetchurl {
     url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
-    sha256 = "0z6w4vrz51bjnvk773j4pnrqfmkvaaa58yc6yi3jwcx90b68xyh2";
+    sha256 = "0j166gic5znssdb9r45qazq4kb4v9fial82czand5wa8i2yd988p";
   };
 
   passthru = {
diff --git a/pkgs/development/libraries/wxwidgets/2.9/default.nix b/pkgs/development/libraries/wxwidgets/2.9/default.nix
index 1938b15efbb..18e0cebec85 100644
--- a/pkgs/development/libraries/wxwidgets/2.9/default.nix
+++ b/pkgs/development/libraries/wxwidgets/2.9/default.nix
@@ -74,12 +74,13 @@ stdenv.mkDerivation {
   };
 
   enableParallelBuilding = true;
-  
+
   meta = {
     platforms = with platforms; darwin ++ linux;
     license = licenses.wxWindows;
     homepage = https://www.wxwidgets.org/;
     description = "a C++ library that lets developers create applications for Windows, macOS, Linux and other platforms with a single code base";
     longDescription = "wxWidgets gives you a single, easy-to-use API for writing GUI applications on multiple platforms that still utilize the native platform's controls and utilities. Link with the appropriate library for your platform and compiler, and your application will adopt the look and feel appropriate to that platform. On top of great GUI functionality, wxWidgets gives you: online help, network programming, streams, clipboard and drag and drop, multithreading, image loading and saving in a variety of popular formats, database support, HTML viewing and printing, and much more.";
+    badPlatforms = [ "x86_64-darwin" ];
   };
 }
diff --git a/pkgs/development/libraries/wxwidgets/3.0/default.nix b/pkgs/development/libraries/wxwidgets/3.0/default.nix
index 948b261fe45..a89f132b832 100644
--- a/pkgs/development/libraries/wxwidgets/3.0/default.nix
+++ b/pkgs/development/libraries/wxwidgets/3.0/default.nix
@@ -89,5 +89,6 @@ stdenv.mkDerivation rec {
     homepage = https://www.wxwidgets.org/;
     description = "a C++ library that lets developers create applications for Windows, macOS, Linux and other platforms with a single code base";
     longDescription = "wxWidgets gives you a single, easy-to-use API for writing GUI applications on multiple platforms that still utilize the native platform's controls and utilities. Link with the appropriate library for your platform and compiler, and your application will adopt the look and feel appropriate to that platform. On top of great GUI functionality, wxWidgets gives you: online help, network programming, streams, clipboard and drag and drop, multithreading, image loading and saving in a variety of popular formats, database support, HTML viewing and printing, and much more.";
+    badPlatforms = [ "x86_64-darwin" ];
   };
 }
diff --git a/pkgs/development/libraries/wxwidgets/3.0/mac.nix b/pkgs/development/libraries/wxwidgets/3.0/mac.nix
index 040273e28b9..6e559cfb6a9 100644
--- a/pkgs/development/libraries/wxwidgets/3.0/mac.nix
+++ b/pkgs/development/libraries/wxwidgets/3.0/mac.nix
@@ -71,5 +71,6 @@ stdenv.mkDerivation rec {
     homepage = https://www.wxwidgets.org/;
     description = "a C++ library that lets developers create applications for Windows, macOS, Linux and other platforms with a single code base";
     longDescription = "wxWidgets gives you a single, easy-to-use API for writing GUI applications on multiple platforms that still utilize the native platform's controls and utilities. Link with the appropriate library for your platform and compiler, and your application will adopt the look and feel appropriate to that platform. On top of great GUI functionality, wxWidgets gives you: online help, network programming, streams, clipboard and drag and drop, multithreading, image loading and saving in a variety of popular formats, database support, HTML viewing and printing, and much more.";
+    broken = true;
   };
 }
diff --git a/pkgs/development/libraries/xmlsec/default.nix b/pkgs/development/libraries/xmlsec/default.nix
index 94f1d187267..b19bf000b0d 100644
--- a/pkgs/development/libraries/xmlsec/default.nix
+++ b/pkgs/development/libraries/xmlsec/default.nix
@@ -2,14 +2,14 @@
 , openssl, nss, makeWrapper }:
 
 let
-  version = "1.2.26";
+  version = "1.2.28";
 in
 stdenv.mkDerivation rec {
   name = "xmlsec-${version}";
 
   src = fetchurl {
     url = "https://www.aleksey.com/xmlsec/download/xmlsec1-${version}.tar.gz";
-    sha256 = "0l1dk344rn3j2vnj13daz72xd8j1msvzhg82n2il5ji0qz4pd0ld";
+    sha256 = "1m12caglhyx08g8lh2sl3nkldlpryzdx2d572q73y3m33s0w9vhk";
   };
 
   outputs = [ "out" "dev" ];