Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 29045 - Incorrect installation of jar files for Batik
Summary: Incorrect installation of jar files for Batik
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 30308
  Show dependency tree
 
Reported: 2003-09-18 04:02 UTC by Xavier
Modified: 2004-02-15 12:07 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Xavier 2003-09-18 04:02:07 UTC
It's needed to separate some *.jar files at installation in a lib directory 
inside the default lib where actually dojar copy the files.
To accomplish this it's needed to create a jarinto function in ebuild.sh and 
add only one line to the batik ebuild.
The default installation don't work because the main jar files of batik has in 
their manifest a classpath hardcoded with a lib directory where to find other 
classes (jar files).
The package.env and their inclussion in the CLASSPATH has no effect for batik 
to find additional classes in other jars, batik need to find this additional 
classes in a bunch of jar files that reside in a lib/ directory relative to 
the actual main batik jar file launched.

Reproducible: Always
Steps to Reproduce:
java -jar /usr/share/batik/lib/batik-rasterizer.jar

Actual Results:  
Exception in thread "main" java.lang.NoClassDefFoundError: 
org/apache/batik/i18n/LocalizableSupport
        at org.apache.batik.apps.rasterizer.Messages.<clinit>(Unknown Source)
        at org.apache.batik.apps.rasterizer.Main.<clinit>(Unknown Source)

Expected Results:  
SVG Rasterizer options are:
 -d <dir|file>
        output directory. If there is a single input file, this can be a file.
 -m <mimeType>
        output mime type.
 -w <width>
        output width. This is a floating point value.
 -h <height>
        output height. This is a floating point value.
 -maxw <width>
        Maximum output width. This is a floating point value.
 -maxh <height>
        Maximum output height. This is a floating point value.
 -a <area>
        output area. The format for <area> is x,y,w,h, where x, y, w and h
        are floating point values.
 -bg <color>
        ouput color. The format for <color> is a.r.g.b, where a, r, g and b
        are integer values.
 -cssMedia <media>
        CSS media type for which the source SVG files should be
        converted.
 -cssAlternate <alternate>
        CSS alternate stylesheet to use when converting the source
        SVG files.
 -cssUser <userStylesheet>
        CSS user stylesheet URI to apply to converted SVG documents
        in addition to any other referened or embeded stylesheets.
 -font-family <defaultFontFamily>
        Value used as a default when no font-family value
        is specified.
 -lang <userLanguage>
        User language to use when converting SVG documents.
 -q <quality>
        Quality for the output image. This is only relevant for the
        image/jpeg mime type.
 -indexed (1|2|4|8)
        Reduces the image to given number of bits per pixel using an
        adaptive pallete, resulting in an Indexed image.  This is
        currently only supported for PNG conversion.
 -dpi <resolution>
        Resolution for the ouptut image.
 -validate
        Controls whether the source SVG files should be validated.
 -onload
        Controls if the source SVG files must be rasterize after
        dispatching the 'onload' event.
 -scriptSecurityOff removes any security check on the scripts running
        as a result of dispatching the onload event.
 -anyScriptOrigin controls whether scripts can be loaded from
         any location. By default, scripts can only be loaded from
        the same location as the document referencing them.
 -scripts <listOfAllowedScripts> List of script types (i.e.,
        values for the type attribute in the <script> tag) which
        should be loaded.

I don't know if all of the main batik applications suffer from this.
If you take a look to the batik binary distribution, the lib directory exists 
inside the package.

ebuild.sh addition needed

jarinto() {
        if [ "$1" == "/" ]; then
                export JARDESTTREE=""
        else
                export JARDESTTREE="$1"
                if [ ! -d "${D}${JARDESTTREE}" ]; then
                        install -d "${D}${JARDESTTREE}"
                fi
        fi
}

batik ebuild modification

 src_install () {

         dojar ${P}/batik*.jar
+        jarinto lib/lib
         dojar ${P}/lib/*.jar

         dodoc README LICENSE LICENSE.rhino
         dohtml -r ${P}/docs/
 }

Additionally I used the same ebuild that uses the latest batik 1.5 and the 
emerge process works without any problem.
Comment 1 Xavier 2003-09-18 05:07:52 UTC
Only a little correction:

Additionally I used the ebuild for the batik 1.1.1 using the latest batik 1.5 (renaming the ebuild to batik-1.5 and creating the new digest) and the emerge process works without any problem.
Comment 2 Tobias Minich 2003-10-04 05:00:10 UTC
You can also put the jarinto() function inside the ebuild. I did that and
submitted the ebuild (bug #30308).
Comment 3 wolfwood 2003-12-11 17:43:58 UTC
Here, we need either a jarinto function added into ebuild.sh, or we should rewrite dojar to use ${INSDESTTREE}

I would be happy to write the code for either option.
Comment 4 Chris Aniszczyk (RETIRED) gentoo-dev 2004-02-15 12:07:40 UTC
Fixed in portage, thanks!