The gentoo-syntax ebuild uses $PORTDIR to hardcode portdir path in site file. This has the following problems:
1) whenever uses moves portdir to other location, the ebuild needs to be rebuilt,
2) binary packages rely on packager's location,
3) the ebuild is likely to break when copied to another repository,
4) it is likely that PORTDIR will be removed in a future EAPI as discussed in #373349.
Please consider replacing it with a runtime check or considering another solution. I'd really like to avoid EAPI 5 becoming a no-go for this ebuild.
I'm not aware of any alternative solution that a) doesn't require additional run-time dependencies and b) doesn't slow down startup.
We're not going to inconvenience 99% of users because of some unlikely scenarios. And users affected by points 1) to 3) can still override the location.
(In reply to comment #1)
> We're not going to inconvenience 99% of users because of some unlikely
Actually, the vast majority of these 99% will have PORTDIR=/usr/portage so we can use this as well (it is used a default only).
> And users affected by points 1) to 3) can still override the location.
Which is also true if we stick to the upstream default which is /usr/portage.
Therefore I've dropped PORTDIR from the ebuild now.