epatch failed to patch media-libs/freetype with https://github.com/bohoomil/fontconfig-ultimate/blob/master/freetype/02-upstream-2015.11.08.patch patch.out - https://bpaste.net/show/87a872c50511 patch -p1 -i /home/my_user/overlay/media-libs/freetype/files/02-upstream-2015.11.08.patch - works. patch -p1 -g0 -E --no-backup-if-mismatch < '/home/my_user/overlay/media-libs/freetype/files/02-upstream-2015.11.08.patch' - works too.
I think this might be a bug in sys-apps/patch. 'patch -p1 --dry-run' fails while 'patch -p1' succeeds (on freetype-2.6.1).
The problem seems to be that the patch patches "ChangeLog" multiple times and these patches on depend on each other. Without --dry-run patch applies the patches one after each other and everything works. With --dry-run patch sees whether the first patch applies. Next, it checks whether the second patch applies _to the original file_, to which the second patch might not apply after all. Another thing to note is that patch is also not able to reverse (option -R) these kind of patches. Either such patches are invalid or these are bugs in patch.
did you read patch.out? there is "patch -p1 -g0 -E --no-backup-if-mismatch < '/home/my_user/overlay/media-libs/freetype/files/02-upstream-2015.11.08.patch'" which didn't work for epatch, but it works itself.
epatch first uses internally in addition the "--dry-run" and "-f" options but does not tell you about that in patch.out.
i've clarified the log here: http://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1bb3a73979d7023e7425b9a0acc1324070044278 but in the end, epatch requires patches pass --dry-run mode, and your patch does not do that (because it modifies the same file multiple times).