OpenCV has a number of configuration options, and I couldn't test all of
them. Further testing would be very welcome! I removed the patches which
were just backporting functionality or which said that future commits
would make them obsolete, and rebased some others.