anchor.diff:    };
   
     patches = []
  -    ++ optionals useEncumberedCode [
  +    # mingw: these patches use `strcasestr` which isn't available on windows
  +    ++ optionals (useEncumberedCode && stdenv.cross.libc or null != "msvcrt" ) [
         (fetchbohoomil "01-freetype-2.6.2-enable-valid.patch"
           "1szq0zha7n41f4pq179wgfkam034mp2xn0xc36sdl5sjp9s9hv08")
         (fetchbohoomil "02-upstream-2015.12.05.patch"
  
positive.code: 
    propagatedBuildInputs = [ zlib bzip2 libpng ]; # needed when linking against freetype
    # dependence on harfbuzz is looser than the reverse dependence
    buildInputs = [ pkgconfig which ]
      # FreeType requires GNU Make, which is not part of stdenv on FreeBSD.
      ++ optional (!stdenv.isLinux) gnumake;
  
  
negative.code: 
    postInstall = glib.flattenInclude;
  
    crossAttrs = stdenv.lib.optionalAttrs (stdenv.cross.libc or null != "msvcrt") {
      # Somehow it calls the unwrapped gcc, "i686-pc-linux-gnu-gcc", instead
      # of gcc. I think it's due to the unwrapped gcc being in the PATH. I don't
      # know why it's on the PATH.
  