The make(1) variable DISTDIR is used by both ports and src with a
different meaning. Some users may set DISTDIR in /etc/make.conf
for ports, which previously worked fine when building src since
the src targets which used this variable were not very commonly
used (mainly, make distributeworld).
Unfortunately, with pkgbase becoming the default, this is no longer
true since make (update-)packages invokes make stageworld, which is
sensitive to DISTDIR, and these users find that their build now fails.
A correct fix for this probably requires renaming one or both of
the DISTDIR variables, but for now, work around the problem by
setting DISTDIR=/ for the user-facing pkgbase targets, packages
and update-package. Since setting DISTDIR doesn't work for these
targets anyway, this should not break any existing configurations.
PR: 290010
Reported by: Oleh Vinichenko <moonlapse81@gmail.com>
MFC after: 1 week