Created attachment 188133 [details]
patch to add java option and disable perl when disabled
Attached patch create JAVA option for net-mgmt/collectd5. While here, also ensure perl is disabled when the option is deselected, even if perl happens to be installed.
BTW, since perl and python end up as build deps, it might make sense to make those options enabled by default.
Please wait 1-2 days. I'm finishing patch because of new version of collectd. So I will merge your patch to mine.
When I'll make a new "bug" I think this should be closed.
There is update of collectd5 with your patch. You can see bug #223789
So please close this bug as duplicate