[pkg-java] r3551 - trunk/fop/debian

avdyk at alioth.debian.org avdyk at alioth.debian.org
Tue May 29 12:27:28 UTC 2007


Author: avdyk
Date: 2007-05-29 12:27:28 +0000 (Tue, 29 May 2007)
New Revision: 3551

Modified:
   trunk/fop/debian/changelog
   trunk/fop/debian/fop-ttfreader.sh
Log:
update of the fop-ttfreader startup script

Modified: trunk/fop/debian/changelog
===================================================================
--- trunk/fop/debian/changelog	2007-05-28 08:48:57 UTC (rev 3550)
+++ trunk/fop/debian/changelog	2007-05-29 12:27:28 UTC (rev 3551)
@@ -1,3 +1,10 @@
+fop (1:0.93.dfsg.1-2) unstable; urgency=low
+
+  * debian/fop-ttfreader.sh: updated to include commons-logging and
+    commons-io (closes: #426476). Thanks to Michalis Kamburelis
+
+ -- Arnaud Vandyck <avdyk at debian.org>  Tue, 29 May 2007 12:29:12 +0200
+
 fop (1:0.93.dfsg.1-1) unstable; urgency=low
 
   * New upstream (closes: #349376, #406109)

Modified: trunk/fop/debian/fop-ttfreader.sh
===================================================================
--- trunk/fop/debian/fop-ttfreader.sh	2007-05-28 08:48:57 UTC (rev 3550)
+++ trunk/fop/debian/fop-ttfreader.sh	2007-05-29 12:27:28 UTC (rev 3551)
@@ -1,9 +1,58 @@
 #!/bin/sh
 # Command line wrapper for running fop.
 # Written by Ola Lundqvist <opal at debian.org>
+# Adapted by Arnaud Vandyck <avdyk at debian.org>
+# from the fop.sh upstream script
 
-JAVASH=/usr/share/java
+if [ -z "$JAVACMD" ] ; then
+  if [ -n "$JAVA_HOME"  ] ; then
+    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+      # IBM's JDK on AIX uses strange locations for the executables
+      JAVACMD="$JAVA_HOME/jre/sh/java"
+    else
+      JAVACMD="$JAVA_HOME/bin/java"
+    fi
+  else
+    JAVACMD=`which java 2> /dev/null `
+    if [ -z "$JAVACMD" ] ; then
+        JAVACMD=java
+    fi
+  fi
+fi
 
-export CLASSPATH=$JAVASH/fop.jar:$JAVASH/xalan2.jar:$JAVASH/xercesImpl.jar:$JAVASH/xmlParserAPIs.jar:$JAVASH/logkit.jar:$JAVASH/avalon-framework.jar:$JAVASH/batik.jar:$JAVASH/jimi-1.0.jar:$CLASSPATH
+if [ ! -x "$JAVACMD" ] ; then
+  echo "Error: JAVA_HOME is not defined correctly."
+  echo "  We cannot execute $JAVACMD"
+  exit 1
+fi
 
-java $JAVA_OPTS org.apache.fop.fonts.apps.TTFReader "$@"
+if [ -n "$CLASSPATH" ] ; then
+  LOCALCLASSPATH=$CLASSPATH
+fi
+
+# add fop.jar, fop-sandbox and fop-hyph.jar, which reside in $FOP_HOME/build
+#LOCALCLASSPATH=${FOP_HOME}/build/fop.jar${pathSepChar}${FOP_HOME}/build/fop-sandbox.jar${pathSepChar}${FOP_HOME}/build/fop-hyph.jar${pathSepChar}$LOCALCLASSPATH
+JLIBS=/usr/share/java
+# Debian specific LOCALCLASSPATH
+LOCALCLASSPATH=${JLIBS}/fop.jar${pathSepChar}$LOCALCLASSPATH
+
+# Does not exists in the the Debian package ${pathSepChar}${FOP_HOME}/build/fop-sandbox.jar${pathSepChar}${FOP_HOME}/build/fop-hyph.jar
+
+# add in the dependency .jar files, which reside in $FOP_HOME/lib
+DIRLIBS="${JLIBS}/commons-io.jar ${JLIBS}/avalon-framework.jar ${JLIBS}/serializer.jar ${JLIBS}/xalan2.jar ${JLIBS}/xml-apis.jar ${JLIBS}/batik-all.jar ${JLIBS}/commons-logging.jar ${JLIBS}/servlet-api.jar ${JLIBS}/xercesImpl.jar ${JLIBS}/xmlgraphics-commons.jar"
+
+for i in ${DIRLIBS}
+do
+    # if the directory is empty, then it will return the input string
+    # this is stupid, so case for it
+    if [ "$i" != "${DIRLIBS}" ] ; then
+      if [ -z "$LOCALCLASSPATH" ] ; then
+        LOCALCLASSPATH=$i
+      else
+        LOCALCLASSPATH="$i"${pathSepChar}$LOCALCLASSPATH
+      fi
+    fi
+done
+
+$JAVACMD -classpath $LOCALCLASSPATH \
+ $JAVA_OPTS org.apache.fop.fonts.apps.TTFReader "$@"




More information about the pkg-java-commits mailing list