Ensure that every ENTRY(foo) has a matching END(foo).
It allows to build with newer binutils

Differential Revision:	https://reviews.freebsd.org/D877
Reviewed by:	jhibbits
Always resolve PORTSDIR to absolute paths using realpath(1).

Reported by:	madpilot
Reviewed by:	bapt
X-MFC-With:	272282