${PORTAGE_REPO_NAME} when using Portage as package manager.
(There is also https://bugs.gentoo.org/show_bug.cgi?id=414813 about support for ${REPOSITORY} variable in a future EAPI (which would be supported by all package managers).)
to circumscribe in a more clear way
there is currently no way to do it. (You should not use ${PORTAGE_REPO_NAME} because it will break with every other package manager.)