Add patches to fix Perl file reading problem and using MSYS2 flex instead win_flex.