If one trys to emerge libidn on a system without the java-config package, it fails. Emerging java-config first fixes the problem, but I assume java-config can be added as a dependency for libidn.
Uhm? It depends on virtual/jdk which depends on java-config.