I have procrastinated through action.
It isn’t really procrastination though. I needed to learn more about Pkgsrc and the build system, especially for C++ packages, so I thought I’d have a go at updating the Ledger package since I use Ledger frequently now.
It took longer than I thought, though, to get something that worked. In the end I had to resort to quite a hacky, although clever (where there is a will, there is a way!), approach so I could use Ledger’s acprep tool; Experience has taught me that I’m not a fan of CMake (it’s a complicated solution in search of a problem) so that fact the Ledger’s acprep tool quite successfully wraps around CMake and produces something that actually works is a good thing.
If anyone else is in search of a similar hacky solution you can do things like the following in Pkgsrc Makefiles (undoubtably not recommended!):
#Pretend it doesn't require configuration or building:
NO_CONFIGURE= yes
NO_BUILD= yes
#Do the build after the patch phase:
post-patch:
cd ${WRKSRC} && ./acprep configure --prefix ${PREFIX} -- -DCMAKE_INSTALL_RPATH_USE_LINK_PATH:BOOL=ON -DCMAKE_INSTALL_MANDIR:PATH=${PKGMANDIR} && ./acprep make