/etc/portage/patches

The patches directory provides another way to apply user-defined patches. The advantage is if all you want is to apply a patch, you may do so without forking the entire package to an overlay, or defining a hook function, which can make following the upstream ebuild easier. This isn't a feature that's actually supplied by Portage directly. Ebuilds or eclasses must provide support for patches explicitly by calling  from eutils.eclass. This works out well because you can just let the package maintainer determine an appropriate place to apply patches. For example, qt4-build.eclass implements epatch_user directly in the eclass, after programatically applying patches defined by a global PATCHES array. Different ebuilds/eclasses may have their own systems. The function writes a lockfile to, so it isn't a big deal if accidentally callled more than once.