I did this in xmlgraphics-commons: DEPEND= jpeg? ( || ( >=dev-java/sun-jdk-1.4 >=dev-java/blackdown-jdk-1.4 >=dev-java/ibm-jdk-bin-1.4 >=dev-java/jrockit-jdk-bin-1.4 ) ) But that doesn't help in forcing one of these VM's to be used. So had to do this workaround: pkg_setup() { java-pkg-2_pkg_setup if use jpeg && java-pkg_current-vm-matches kaffe; then eerror "Sun-private JPEG support cannot be built with kaffe." eerror "Please set your build VM to Sun, Blackdown, IBM or JRockit JDK." eerror "See http://www.gentoo.org/doc/en/java.xml for details." eerror "Alternatively, install this package with USE=-jpeg" die "Cannot build with USE=jpeg and kaffe." fi }
This is called virtuals support.
Basically in this case we would have virtual-sun-jpeg or something and then have the tools look at if we need to switch vm.
(In reply to Vlastimil Babka (Caster) (RETIRED) from comment #0) > I did this in xmlgraphics-commons: > [...] xmlgraphics-commons is presently version 2.8 without such problems. Also, java-virtuals is going away. Closing.