He's not dead, he's resting
EAPI 2: src_prepare
This is post four in a series describing EAPI 2.
EAPI 2 has a new phase function called
src_prepare. It is called after
src_unpack, and can be used to apply patches, do sed voodoo and so on. The default implementation does nothing.
This function is purely for convenience. It gets rather tedious copying out the default implementation of
src_unpack just to add a patch in somewhere.
src_prepare was first introduced in
exheres-0 (which has a more elaborate default implementation). It was considered but rejected for
kdebuild-1 because making best use of it requires eclass awareness, and the packages using
kdebuild-1 had to share eclasses with the main Gentoo tree.