To get help when developing pkgsrc, the definitive source is this document, the pkgsrc guide. If you don't find anything here, there are alternatives:
The built-in pkgsrc help, which is available after bootstrapping
pkgsrc. Run bmake help topic=… to get
help for any topic, such as a variable name like
BUILD_DEFS, a make target like
do-build, a missing C or C++ function like
strcasecmp or any other topic.
The available help topics are listed in Appendix D, Help topics.