Doing a "make deinstall-depends" for any port de-installs pkg(8) first, then everything else it tries to do fails (and, it leaves you without pkg).
I'm not in a big hurry for a fix for this, it's just something I stumbled across and wanted to record it before I forget.
Doesn't pkg autoremove does what you want ?
I wasn't looking for a workaround, I was reporting a bug in the existing code, which needs to be fixed somehow. Are you proposing that the fix for this bug is to reimplement the deinstall-depends target by having it invoke pkg autoremove?
Not at all, but an infrastructure PR without a patch is not likely to be fixed, ever. I was just trying to tell you how to go around it.
A commit references this bug:
Date: Thu Sep 5 09:07:49 UTC 2019
New revision: 511161
Fix make deinstall-depends with pkg.
drop pkg itself from the list of deinstall-depends in order
to keep pkg around to be able to deinstall more ports.
Reported by: ian