Trouble with creating a patchfile (when hitting a file with missing newline at end of file)

Marko Käning MK-MacPorts at techno.ms
Mon Nov 15 13:01:21 PST 2010


It looks like I have found a workaround!
Best would be to just append a newline to the said file's end.
Since I don't have access to kmymoney4's repository I have no choice but to start from the SVN versions as before,
and append those newlines to the files in question, make the diff and use that for MacPorts' port patch phase.

BUT, before applying the patch I have to append a newline also to the extracted source file, by using a pre-patch phase like this:
---
# Fix trouble with a file without a newline at the end (patch had to be made accordingly):
pre-patch {
    system "echo >>${workpath}/${distname}/developer-doc/phb/CMakeLists.txt"
}
--- 

Now "port patch" works just fine, as had to be expected.

This pre-patch phase doesn't really look nice, but it does its job.


(I'll inform kmymoney's developers about the issue, so that they can get rid of this already in their source file right from the start.)


More information about the macports-dev mailing list