Reminding ebuild write skills in man 5 ebuild I was a little bit confused: man 5 ebuild: … src_unpack This function is used to unpack all the sources in A to WORKDIR. If not defined in the ebuild script it calls unpack ${A}. Any patches and other pre configure/compile modifications should be done here. Initial working directory: $WORKDIR src_prepare All preparation of source code, such as application of patches, should be done here. This function is supported beginning with EAPI 2. Initial working directory: $S … Probably src_unpack description should contain notes, that applying patches here should be done only whe using legacy EAPI 0 or EAPI 1. Or completely remove note about applying patches on this phase. Excuse me my English, that is why I don't suggest patch.