Patch files are stored with the postfix .patch in the package directory and are applied automatically during the package build.
There are a few ways to control applying patches conditionally by adding an additional extension:
.patch.cross
Patches with .patch.cross are only applied in the cross compile stages 0 thru 2.
.patch.cross0
Patches with .patch.cross0 are only applied in the toolchain stage 0.
.patch.$arch
Patches with .patch.$arch, are only applied when compiled for the CPU architecture matching $arch.
.patch.$xsrctar
Useful for packages with multiple tarballs, as it allows matching patches to the individual files. Patches matching the beginning of the extracted source package filename are applied.
If more sophisticated conditional control is needed for a patch, it can be named completely differently, such as .diff or .patch.manual, and dynamically injected to the patchfiles variable in the package's .conf:
if condition; then var_append patchfiles $confdir/something.diff fi