If WRKDIRPREFIX contains a trailing slash there are issues, as seen in
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=199297
I assume this fix is a little bit too simple...
devel/qt5-qmake % make -VWRKSRC WRKDIRPREFIX=/tmp /tmp/usr/ports/devel/qt5-qmake/work/qtbase-opensource-src-5.7.1 devel/qt5-qmake % make -VWRKSRC WRKDIRPREFIX=/tmp/ /tmp/usr/ports/devel/qt5-qmake/work/qtbase-opensource-src-5.7.1 devel/qt5-qmake % make -VWRKSRC WRKDIRPREFIX=/tmp// /tmp/usr/ports/devel/qt5-qmake/work/qtbase-opensource-src-5.7.1