I've been trying to debug a nasty with building on a recent cygwin. It seems that the new version of patch has a <cough> non-optimal feature. $ untar lp_solve... $ patch --dry-run -p2 < /opt/libreoffice/calc-group-interpreter/lpsolve/lp_solve_5.5-windows.patch checking file lpsolve55/cgcc.bat Hunk #1 FAILED at 7 (different line endings). 1 out of 1 hunk FAILED checking file lpsolve55/lpsolve.rc Hunk #1 FAILED at 7 (different line endings). 1 out of 1 hunk FAILED checking file lpsolve55/cvc6.bat Hunk #1 FAILED at 14 (different line endings). 1 out of 1 hunk FAILED michael@linux-9ia1:/ssd/opt/libreoffice/calc-group-interpreter/foo/lp_solve_5.5> patch --version GNU patch 2.7.1 Copyright (C) 2003, 2009-2012 Free Software Foundation, Inc. Copyright (C) 1988 Larry Wall This is not ideal - so convert the line-endings to DOS in the patch: $ unix2dos /opt/libreoffice/calc-group-interpreter/lpsolve/lp_solve_5.5-windows.patch $ patch --dry-run -p2 < /opt/libreoffice/calc-group-interpreter/lpsolve/lp_solve_5.5-windows.patch (Stripping trailing CRs from patch; use --binary to disable.) checking file lpsolve55/cgcc.bat Hunk #1 FAILED at 7 (different line endings). 1 out of 1 hunk FAILED (Stripping trailing CRs from patch; use --binary to disable.) checking file lpsolve55/lpsolve.rc Hunk #1 FAILED at 7 (different line endings). 1 out of 1 hunk FAILED (Stripping trailing CRs from patch; use --binary to disable.) checking file lpsolve55/cvc6.bat Hunk #1 FAILED at 14 (different line endings). 1 out of 1 hunk FAILED As you see patch carefully does: "(Stripping trailing CRs from patch; use --binary to disable.)" and then (because they are missing) refuses to apply the patch :-) Doh.
Attempting to mix Unix + Dos newlines in the patch doesn't encourage patch not to mangle the line-endings and then fail horribly. The only fix appears to be adding --binary to the patch command-line.
pushed patches variously at least to master / 4.1.
Michael Meeks committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=d35cf5e19652989419aa598119ccd978307111fe fdo#66826 - Add DOS CR/LR line endings to please patch 2.7 under cygwin The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Michael Meeks committed a patch related to this issue. It has been pushed to "libreoffice-4-1": http://cgit.freedesktop.org/libreoffice/core/commit/?id=89c4c2ea0d1c96559e85814805704dfbe053534f&h=libreoffice-4-1 fdo#66826 - Add DOS CR/LR line endings to please patch 2.7 under cygwin It will be available in LibreOffice 4.1.1. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
As if by a miracle - patch 2.6 then refuses to apply the patch fixed up such that 2.7 can apply it [urgh]. So this is really no fix at all. I guess passing --binary to patch would make it work for both cases, but ... there is no gnumake conditional to add patch arguments currently.
Michael Meeks committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=e962805b31074d6b6a2ed0db6452769448337553 fdo#66826 - Allow parameters to be passed to patch such as --binary The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Michael Meeks committed a patch related to this issue. It has been pushed to "libreoffice-4-1": http://cgit.freedesktop.org/libreoffice/core/commit/?id=f1e7eeb83c18bce720d49e0e55704abd09ab96f7&h=libreoffice-4-1 fdo#66826 - Allow parameters to be passed to patch such as --binary It will be available in LibreOffice 4.1.1. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
This shows, that I followed the correct path when needed to build a 4.0 version now :-)