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

Bug 145568

Summary: dev-java/fop-0.20.5-r6 build.xml uses automagical tests to determine whether build optional stuff
Product: Gentoo Linux Reporter: Vlastimil Babka (Caster) (RETIRED) <caster>
Component: New packagesAssignee: Java team <java>
Status: RESOLVED FIXED    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: new patch for build.xml
patch for fop's ebuild

Description Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2006-08-30 02:47:09 UTC
It tests presence of the following on classpath:
jimi (sun-jimi), jai (sun-jai-bin), trax (xalan), jdk14, jce

This is bad because jimi and jai are controlled by useflags (linking appropriate jars into lib/ dir based on the flag), but the autodetection can mess with it because ant can be using jai itself, and that can result in (with USE="-jai" for fop):
- java-strict is on, but the autodetection will still see jai on classpath when doing the test (-Dbuild.sysclasspath=ignore doesn't affect this, sadly), during compiling jai will be hidden and build will fail
- java-strict is off, it will build jai support because it's in ant's classpath, but it won't be recorded as dep in fop's package.env

One solution can be to put ignoresystemclasspath="true" parameter in <available> tags in build.xml used to test jai and jimi presence. This will ensure that jai and jimi support will be checked only in lib/ dir, not on classpath ant uses. This could be done even without patching, by running xml-rewrite.py from ebuild. But since there's already a build.xml patch, I expanded it to do the following:

Instead of testing for jdk14 and jce, it enables is unconditionally. Also changed the dep from || (jdk1.4 jdk-1.3) to just jdk-1.4.
Same with the trax testing, it's just enabled, because xalan is unconditional dep anyway.
Tests for jai and jimi are removed and the associated properties are not set in build.xml at all. Ebuild passes these properties based on useflags.
No automagical detection is left :)
Comment 1 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2006-08-30 02:48:37 UTC
Created attachment 95444 [details, diff]
new patch for build.xml
Comment 2 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2006-08-30 02:50:14 UTC
Created attachment 95447 [details, diff]
patch for fop's ebuild
Comment 3 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2006-09-10 13:56:32 UTC
Released in fop-0.20.5-r7