Fix Cygwin cairo support and add MinGW cairo support #28514
                
     Merged
            
            
          
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
This PR
Previously, the
conf-cairo-file would install a Cygwin package https://cygwin.com/packages/summary/libcairo-devel.html (and thus depending on cygwin1.dll) rather than a MinGW package, allowing us to build standalone, native Windows executables.Recall: Windows is supported in multiple forms (also summarized in our wiki-page: https://github.com/ocaml/opam-repository/wiki/Depexts-os-distribution---os-family-values):
os = "win32" & os-distribution = "cygwin") oros = "win32" & os-distribution = "msys2")os = "cygwin" & os-distribution = "cygwin") which produces executables that require Cygwinos = "win32" & os-distribution = "cygwinports") is the old, now discontinued approach based on a dedicated Windows opam-repoPreviously, CI would be green since the Cygwin package exists and installs cleanly - when matching the Cygwin-hosted MinGW environment we currently test in the GitHub actions CI workflow. The CI didn't catch the subtle, unwanted cygwin1.dll dependency introduced though... 🤷
The MinGW packages installed are
and the Cygwin package in question is
We don't have CI support for testing pure Cygwin (non-MinGW) ATM, but as in the previous PRs I've tested the two others with a self PR: jmid#13