Translations:Basic guide to write Gentoo Ebuilds/5/en
From Gentoo Wiki
The location of ebuilds from the Gentoo repository (available in the snapshot) are usually at /var/db/repos/gentoo[1] or in /usr/portage for older installs. The location is determined by the repos.conf file. Custom ebuilds are recommended to be placed in a custom repository, say /var/db/repos/larry.