Flameeyes gave me a log of antlr failing on x86-fbsd with diablo-jdk. The problem was: javac: target release 1.2 conflicts with default source release 1.5 ... GENTOO_VM=diablo-jdk CLASSPATH="" JAVA_HOME="/opt/diablo-jdk-1.5.0.07.00" JAVACFLAGS="+ -target 1.2" COMPILER="" Apparently -source 1.2 was missing. java-pkg_javac-args() doesn't set -source if the VM is not >=1.4 (probably 1.3- doesn't support it). The VM version is determined in java-pkg_get-vm-version() which calls sed on GENTOO_VM string. For an unslotted JDK like diablo-jdk or KAFFE, there is no version in GENTOO_VM thus it all fails and -source is not set. So, Diego already slotmoved diablo-jdk and jre to 1.5 as I advised him to do. But that leaves kaffe broken. The check in the eclass is probably obsolete now that we are 1.4+ only, but still I think the get-vm-version() function should be fixed. Because each VM stores a PROVIDES_VERSION in its env file, java-config could be used to extract it, instead of the failing sed on GENTOO_VM.
Created attachment 96841 [details, diff] the very simple patch any objections? :)
Indeed, much cleaner than using sed voodoo. Go ahead and apply it.
Commited