Hi, I was looking at the few ebuilds that still use java5 flag, and noticed this one. We are removing that flag since jdk-1.4 is p.masked, and the same will happen soon with jdk-1.5 and java6 flag, respectively, so we can kill both at once here. It also seems to me that the ebuild is using the java5 and java6 flags just to set the java bytecode version, which is not worth the trouble (the flags have meanings when a language feature or API of a jdk version is needed, bytecode is just a potential compatibility problem). BTW, you could spare yourself of the manual version rewriting in build.xml because java-ant-2 eclass does that for you (based on the jdk dep, taking USE in account). But, since it does that in src_prepare which you override, it wasn't executed. So I suggest removing the javaX flags and just set the jdk/jre deps in a fixed way. >=1.4 will build 1.4 bytecode which is fine. Attached patch does that. It also changes src_prepare to java_prepare, which is our shortcut to make src_prepare from the eclass visible (and which will call the java_prepare in the ebuild). And using JAVA_PKG_IUSE before inherit will add the app-arch/zip dependency automatically.
Created attachment 219291 [details, diff] Remove javaX flags and use java eclass features
I see media-video/projectx is exactly the same case, so adding it here. The suggested changes are the same. I can also commit both myself if you like. And feel free to ask anything unclear about java eclasses etc :)
(In reply to comment #2) > I see media-video/projectx is exactly the same case, so adding it here. The > suggested changes are the same. I can also commit both myself if you like. And > feel free to ask anything unclear about java eclasses etc :) > Hm, midair-collision so sending this after-wards :) Thank you very much for your improvement suggestions. I will change this as soon as possible. I always wanted to ask the java-team for help about this ebuild but never found the time. I have just copied this logic from media-video/projectx where probably the same changes apply.
If you have the time and you can do it now feel free to apply the changes. Else I will commit it tomorrow.
(In reply to comment #4) > If you have the time and you can do it now feel free to apply the changes. Else > I will commit it tomorrow. Great, done :)