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

Bug 440994

Summary: dev-java/xmlgraphics-commons-1.5 version bump
Product: Gentoo Linux Reporter: Guillaume Horel <guillaume.horel>
Component: [OLD] JavaAssignee: Java team <java>
Status: RESOLVED FIXED    
Severity: normal CC: guillaume.horel, the.dmol
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: http://xmlgraphics.apache.org/commons/
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 335858    
Attachments: xmlgraphics-commons-1.5.ebuild
disable-iccprofile-test.patch
alternative xmlgraphics-commons-1.5.ebuild
xmlgraphics-commons-1.5.ebuild

Description Guillaume Horel 2012-11-02 18:32:04 UTC
This new version got rid of the non free com.sun classes so it compiles fine with the various iceadtea/openjdk. There are also various performance improvements (e.g. smaller ps files). Tests pass cleanly on my machine (although it relies on mockito which is bundled with this package). 

Reproducible: Always
Comment 1 Guillaume Horel 2012-11-02 18:32:51 UTC
Created attachment 328128 [details]
xmlgraphics-commons-1.5.ebuild
Comment 2 Guillaume Horel 2012-11-02 18:33:19 UTC
Created attachment 328130 [details, diff]
disable-iccprofile-test.patch
Comment 3 Ivan Baidakou (dmol) 2012-11-03 07:15:28 UTC
I have made a couple of days before the alternative ebuild, which don't requires a patch, through, it deletes PSGraphics2DTestCase as required mockito package, which we don't have yet...
Comment 4 Ivan Baidakou (dmol) 2012-11-03 07:17:07 UTC
Created attachment 328182 [details]
alternative xmlgraphics-commons-1.5.ebuild

Alternative ebuild for xmlgraphics-commons-1.5
Comment 5 Guillaume Horel 2012-11-03 19:47:37 UTC
Created attachment 328240 [details]
xmlgraphics-commons-1.5.ebuild

I have incorporated your trick of deleting PSGraphics2DTestCase to get rid of mockito.

However the patch is needed for the tests to pass on jdk-1.7. Have you tried to run the tests with your ebuild? I believe you still need the virtualx eclass for the tests as they need X to run. It explains why I have to pass the parameters inside the src_test function on the command line, cause the EANT_TEST variables don't play nice with virtualmake.
Also the warning about kaffe is not needed since it's no longer in the tree.
Comment 6 Ivan Baidakou (dmol) 2012-11-03 20:31:14 UTC
(In reply to comment #5)

> However the patch is needed for the tests to pass on jdk-1.7. Have you tried
> to run the tests with your ebuild? I believe you still need the virtualx
> eclass for the tests as they need X to run. It explains why I have to pass
> the parameters inside the src_test function on the command line, cause the
> EANT_TEST variables don't play nice with virtualmake.
Yes, all tests do pass on my ebuild, through, I launch them, while I'm in X. I mean it says that all junit tests have been passed, while I see the messages like

    [junit] Nov 3, 2012 9:16:28 PM org.apache.xmlgraphics.image.loader.impl.imageio.ImageLoaderImageIO loadImage
    [junit] WARNING: Image file:/tmp/portage/dev-java/xmlgraphics-commons-1.5/work/xmlgraphics-commons-1.5/build/test-classes/org/apache/xmlgraphics/image/loader/impl/gray-vs-cmyk-profile.png has an incompatible color profile. The color profile will be ignored.
    [junit] Color model of loaded bitmap: ColorModel: #pixelBits = 16 numComponents = 2 color space = java.awt.color.ICC_ColorSpace@3f6dadf9 transparency = 3 has alpha = true isAlphaPre = false
    [junit] Color model of color profile: ColorModel: #pixelBits = 40 numComponents = 5 color space = java.awt.color.ICC_ColorSpace@e949f69 transparency = 3 has alpha = true isAlphaPre = false


and 

    [junit] java.lang.RuntimeException: Unsupported bit depth: 1
    [junit] 	at org.apache.xmlgraphics.image.loader.impl.PNGFile.parse_IHDR_chunk(PNGFile.java:173)
    [junit] 	at org.apache.xmlgraphics.image.loader.impl.PNGFile.<init>(PNGFile.java:85)
    [junit] 	at org.apache.xmlgraphics.image.loader.impl.ImageLoaderRawPNG.loadImage(ImageLoaderRawPNG.java:72)
    [junit] 	at org.apache.xmlgraphics.image.loader.impl.PNGFileTestCase.testCorruptPNG(PNGFileTestCase.java:81)
    [junit] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [junit] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    [junit] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    [junit] 	at java.lang.reflect.Method.invoke(Method.java:597)
    [junit] 	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
    [junit] 	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
    [junit] 	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
    [junit] 	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
    [junit] 	at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)
    [junit] 	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)
    [junit] 	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
    [junit] 	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
    [junit] 	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
    [junit] 	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
    [junit] 	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
    [junit] 	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
    [junit] 	at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
    [junit] 	at junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:39)
    [junit] 	at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:520)
    [junit] 	at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:1060)
    [junit] 	at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:911)

So, probably, your patch seems reasonable. 

> Also the warning about kaffe is not needed since it's no longer in the tree.
OK.
Comment 7 Stephen Bosch 2013-04-18 10:19:47 UTC
What still has to happen for this to end up in main tree?
Comment 8 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-07-08 14:10:10 UTC
(In reply to Stephen Bosch from comment #7)
> What still has to happen for this to end up in main tree?

Nothing.

+  08 Jul 2013; Tom Wijsman <TomWij@gentoo.org>
+  +files/xmlgraphics-commons-1.5-disable-iccprofile-test.patch,
+  +xmlgraphics-commons-1.5.ebuild:
+  Version bump to 1.5. Fixes bug #440994 reported Guillaume Horel, contributed
+  together with Ivan Baidakou (dmol).

Enjoy... :)