You can reproduce anywhere with "make PKGNAME_REQD='pkg-*' replace" if it have new dependency, or some of BUILD_DEPENDS are not installed. If PKGNAME_REQD is passed as environment variable, it will not happen. That sounds like a problem in pkgsrc/mk where the PKGNAME_REQD should be removed before being passed to dependencies.
Attachment:
pgpdJwjo3qQ6o.pgp
Description: PGP signature