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.
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.
You can also put the jarinto() function inside the ebuild. I did that and submitted the ebuild (bug #30308).
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.
Fixed in portage, thanks!