ebuild xy.ebuild config spills out /usr/sbin/ebuild.sh: line 1065: pkg_config: command not found then I looked and it is called pkg-config. I really don't know if either the name changed or it is a completly different tool.
what package causes this ? you say 'ebuild xy.ebuild' but we do not have anything like that ...
closing -- reopen if/when you have any details to provide