<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>29045</bug_id>
          
          <creation_ts>2003-09-18 04:02 0000</creation_ts>
          <short_desc>Incorrect installation of jar files for Batik</short_desc>
          <delta_ts>2004-02-15 12:07:40 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Ebuilds</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>30308</blocked>
          
          <everconfirmed>1</everconfirmed>
          <reporter>gentoo@dospins.com</reporter>
          <assigned_to>java@gentoo.org</assigned_to>
          <cc>wolfwood@users.sourceforge.net</cc>

      

      
          <long_desc isprivate="0">
            <who>gentoo@dospins.com</who>
            <bug_when>2003-09-18 04:02:07 0000</bug_when>
            <thetext>It&apos;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&apos;s needed to create a jarinto function in ebuild.sh and 
add only one line to the batik ebuild.
The default installation don&apos;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 &quot;main&quot; java.lang.NoClassDefFoundError: 
org/apache/batik/i18n/LocalizableSupport
        at org.apache.batik.apps.rasterizer.Messages.&lt;clinit&gt;(Unknown Source)
        at org.apache.batik.apps.rasterizer.Main.&lt;clinit&gt;(Unknown Source)

Expected Results:  
SVG Rasterizer options are:
 -d &lt;dir|file&gt;
        output directory. If there is a single input file, this can be a file.
 -m &lt;mimeType&gt;
        output mime type.
 -w &lt;width&gt;
        output width. This is a floating point value.
 -h &lt;height&gt;
        output height. This is a floating point value.
 -maxw &lt;width&gt;
        Maximum output width. This is a floating point value.
 -maxh &lt;height&gt;
        Maximum output height. This is a floating point value.
 -a &lt;area&gt;
        output area. The format for &lt;area&gt; is x,y,w,h, where x, y, w and h
        are floating point values.
 -bg &lt;color&gt;
        ouput color. The format for &lt;color&gt; is a.r.g.b, where a, r, g and b
        are integer values.
 -cssMedia &lt;media&gt;
        CSS media type for which the source SVG files should be
        converted.
 -cssAlternate &lt;alternate&gt;
        CSS alternate stylesheet to use when converting the source
        SVG files.
 -cssUser &lt;userStylesheet&gt;
        CSS user stylesheet URI to apply to converted SVG documents
        in addition to any other referened or embeded stylesheets.
 -font-family &lt;defaultFontFamily&gt;
        Value used as a default when no font-family value
        is specified.
 -lang &lt;userLanguage&gt;
        User language to use when converting SVG documents.
 -q &lt;quality&gt;
        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 &lt;resolution&gt;
        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 &apos;onload&apos; 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 &lt;listOfAllowedScripts&gt; List of script types (i.e.,
        values for the type attribute in the &lt;script&gt; tag) which
        should be loaded.

I don&apos;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 [ &quot;$1&quot; == &quot;/&quot; ]; then
                export JARDESTTREE=&quot;&quot;
        else
                export JARDESTTREE=&quot;$1&quot;
                if [ ! -d &quot;${D}${JARDESTTREE}&quot; ]; then
                        install -d &quot;${D}${JARDESTTREE}&quot;
                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.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>gentoo@dospins.com</who>
            <bug_when>2003-09-18 05:07:52 0000</bug_when>
            <thetext>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.
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>belgabor@gmx.de</who>
            <bug_when>2003-10-04 05:00:10 0000</bug_when>
            <thetext>You can also put the jarinto() function inside the ebuild. I did that and
submitted the ebuild (bug #30308).</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>wolfwood@users.sourceforge.net</who>
            <bug_when>2003-12-11 17:43:58 0000</bug_when>
            <thetext>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.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>zx@gentoo.org</who>
            <bug_when>2004-02-15 12:07:40 0000</bug_when>
            <thetext>Fixed in portage, thanks!</thetext>
          </long_desc>
      
    </bug>

</bugzilla>