My current employer uses pkgsrc as the base libraries for all in house written apps on top of rhel 7. We are 1-2 years into a project to get off of pkgsrc so we can get off of rhel 7 before having to switch to ELS, as it is expensive.
It isn't meant for building off applications, you might be able to make it work. It seems more meant for and works great for embedded systems with firmware images.
The pkgsrc setup at work makes use of hard coded RPATHs full absolute paths. It is never clear which dynamic library is getting loaded at runtime, as even ldd gets it wrong. I have to set LD_DEBUG and run the binary to figure out what's happening. Because it is using RPATHs, which have inherit the RPATHs of the parent, we sometimes end up with different libraries being loading depemding on how the app gets launched.
asdf is popular for usespace tool installs and might work.
TL;DR I don't recommend using pkgsrc for this