As mentioned elsewhere it might still be better to keep the Python parts in a separate port so it can use the standard python.port.mk infrastructure (we're going to run into this with mail/notmuch's CFFI bindings too though I think in that case it may be trickier). Also this may makes it simpler for other language bindings added later as they too can use their own ports MODULES.
But if that doesn't work out (sometimes it can be a pain to use those subcomponents with a system library rather than a built tree for the main part of the software) then here are comments on the diff as-is: > How do I correctly set an RDEP on python for the -python package? One way is to remove MODPY_RUNDEP=No, explicitly override RUN_DEPENDS-main (set to empty), and let -python inherit the default. Another is RUN_DEPENDS-python=${MODPY_RUN_DEPENDS}. > Do I need to do the FLAVORS/FLAVOR thing? If so, how exactly? Flavours apply to the whole build rather than subpackages so I don't think it makes sense to use them. Just need to remove the ${MODPY_FLAVOR} from deps. > I assume that all dependencies of devel/py-protobuf${MODPY_FLAVOR} > will need adjusting and a bump. Some handholding here would also be > appreciated. Yes, simple change of RUN_DEPENDS plus REVISION bump, that's all. The @pkgpath changes are correct. > +test: btw do-test