Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 304639

Summary: media-tv/channeleditor-1.9.2.1-r1 and media-video/projectx javaX flags removal and cleanup
Product: Gentoo Linux Reporter: Vlastimil Babka (Caster) (RETIRED) <caster>
Component: New packagesAssignee: Daniel Pielmeier <billie>
Status: RESOLVED FIXED    
Severity: normal CC: java, media-tv, media-video, sbriesen
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 287615, 292001    
Attachments: Remove javaX flags and use java eclass features

Description Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2010-02-11 22:18:29 UTC
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.
Comment 1 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2010-02-11 22:19:13 UTC
Created attachment 219291 [details, diff]
Remove javaX flags and use java eclass features
Comment 2 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2010-02-11 22:30:14 UTC
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 :)
Comment 3 Daniel Pielmeier gentoo-dev 2010-02-11 22:32:58 UTC
(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.
Comment 4 Daniel Pielmeier gentoo-dev 2010-02-11 22:34:16 UTC
If you have the time and you can do it now feel free to apply the changes. Else I will commit it tomorrow.
Comment 5 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2010-02-11 23:03:26 UTC
(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 :)