For example (not necessarily factual), Gentoo has an ebuild
git, which has the default branch name
main hardcoded in the source code.
Alice, as a user of Gentoo, would like to change it to
master before building, so that the original default branch name may be restored.
While Gentoo may not accept such a patch, Alice might still be able to apply a user-space patch before Portage makes the ebuild.
Is there such a way to achieve it?