Sascha Wildner has set the utility ‘whereis‘ to work with pkgsrc the same way it used to with ports – finding where in the pkgsrc tree a given port is located.
I mention this because I tied to do this myself some time ago, and didn’t get it right. It’s a darn useful command.