diff -urN fop-0.20.5.orig/fop.sh fop-0.20.5/fop.sh --- fop-0.20.5.orig/fop.sh 2003-07-15 04:03:23.000000000 +0200 +++ fop-0.20.5/fop.sh 2004-11-17 09:21:18.000000000 +0100 @@ -11,7 +11,11 @@ darwin=false; case "`uname`" in CYGWIN*) cygwin=true ;; - Darwin*) darwin=true ;; + Darwin*) darwin=true + if [ -z "$JAVA_HOME" ] ; then + JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home + fi + ;; esac if [ -z "$FOP_HOME" ] ; then @@ -42,6 +46,8 @@ fi +FOP_HOME=@PREFIX@/share/java/fop + # For Cygwin, ensure paths are in UNIX format before anything is touched if $cygwin ; then [ -n "$FOP_HOME" ] && @@ -76,10 +82,10 @@ fi # add fop.jar, which resides in $FOP_HOME/build -LOCALCLASSPATH=${FOP_HOME}/build/fop.jar:$LOCALCLASSPATH +LOCALCLASSPATH=${FOP_HOME}/fop.jar:$LOCALCLASSPATH # add in the dependency .jar files, which reside in $FOP_HOME/lib -DIRLIBS=${FOP_HOME}/lib/*.jar +DIRLIBS=${FOP_HOME}/*.jar for i in ${DIRLIBS} do # if the directory is empty, then it will return the input string @@ -100,5 +106,5 @@ LOCALCLASSPATH=`cygpath --path --windows "$LOCALCLASSPATH"` fi -$JAVACMD -classpath "$LOCALCLASSPATH" $FOP_OPTS org.apache.fop.apps.Fop "$@" +$JAVACMD -Xms64M -Xmx320M -Djava.awt.headless=true -classpath "$LOCALCLASSPATH" $FOP_OPTS org.apache.fop.apps.Fop "$@" diff -urN fop-0.20.5.orig/fop_pfmreader.sh fop-0.20.5/fop_pfmreader.sh --- fop-0.20.5.orig/fop_pfmreader.sh 1970-01-01 01:00:00.000000000 +0100 +++ fop-0.20.5/fop_pfmreader.sh 2004-11-17 10:39:43.000000000 +0100 @@ -0,0 +1,110 @@ +#! /bin/sh +# +# Shell script to run FOP, adapted from the Jakarta-Ant project. + +if [ -f $HOME/.foprc ] ; then + . $HOME/.foprc +fi + +# OS specific support. $var _must_ be set to either true or false. +cygwin=false; +darwin=false; +case "`uname`" in + CYGWIN*) cygwin=true ;; + Darwin*) darwin=true + if [ -z "$JAVA_HOME" ] ; then + JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home + fi + ;; +esac + +if [ -z "$FOP_HOME" ] ; then + # try to find FOP + if [ -d /opt/fop ] ; then + FOP_HOME=/opt/fop + fi + + if [ -d ${HOME}/opt/fop ] ; then + FOP_HOME=${HOME}/opt/fop + fi + + ## resolve links - $0 may be a link to fop's home + PRG=$0 + progname=`basename $0` + + while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '.*/.*' > /dev/null; then + PRG="$link" + else + PRG="`dirname $PRG`/$link" + fi + done + + FOP_HOME=`dirname "$PRG"` + +fi + +FOP_HOME=@PREFIX@/share/java/fop + +# For Cygwin, ensure paths are in UNIX format before anything is touched +if $cygwin ; then + [ -n "$FOP_HOME" ] && + FOP_HOME=`cygpath --unix "$FOP_HOME"` + [ -n "$JAVA_HOME" ] && + JAVA_HOME=`cygpath --unix "$JAVA_HOME"` + [ -n "$CLASSPATH" ] && + CLASSPATH=`cygpath --path --unix "$CLASSPATH"` +fi + +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=java + fi +fi + +if [ ! -x "$JAVACMD" ] ; then + echo "Error: JAVA_HOME is not defined correctly." + echo " We cannot execute $JAVACMD" + exit +fi + +if [ -n "$CLASSPATH" ] ; then + LOCALCLASSPATH=$CLASSPATH +fi + +# add fop.jar, which resides in $FOP_HOME/build +LOCALCLASSPATH=${FOP_HOME}/fop.jar:$LOCALCLASSPATH + +# add in the dependency .jar files, which reside in $FOP_HOME/lib +DIRLIBS=${FOP_HOME}/*.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":$LOCALCLASSPATH + fi + fi +done + +# For Cygwin, switch paths to Windows format before running java +if $cygwin; then + FOP_HOME=`cygpath --path --windows "$FOP_HOME"` + JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` + LOCALCLASSPATH=`cygpath --path --windows "$LOCALCLASSPATH"` +fi + +$JAVACMD -Xms64M -Xmx320M -Djava.awt.headless=true -classpath "$LOCALCLASSPATH" $FOP_OPTS org.apache.fop.fonts.apps.PFMReader "$@" + diff -urN fop-0.20.5.orig/fop_ttfreader.sh fop-0.20.5/fop_ttfreader.sh --- fop-0.20.5.orig/fop_ttfreader.sh 1970-01-01 01:00:00.000000000 +0100 +++ fop-0.20.5/fop_ttfreader.sh 2004-11-17 10:40:18.000000000 +0100 @@ -0,0 +1,110 @@ +#! /bin/sh +# +# Shell script to run FOP, adapted from the Jakarta-Ant project. + +if [ -f $HOME/.foprc ] ; then + . $HOME/.foprc +fi + +# OS specific support. $var _must_ be set to either true or false. +cygwin=false; +darwin=false; +case "`uname`" in + CYGWIN*) cygwin=true ;; + Darwin*) darwin=true + if [ -z "$JAVA_HOME" ] ; then + JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home + fi + ;; +esac + +if [ -z "$FOP_HOME" ] ; then + # try to find FOP + if [ -d /opt/fop ] ; then + FOP_HOME=/opt/fop + fi + + if [ -d ${HOME}/opt/fop ] ; then + FOP_HOME=${HOME}/opt/fop + fi + + ## resolve links - $0 may be a link to fop's home + PRG=$0 + progname=`basename $0` + + while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '.*/.*' > /dev/null; then + PRG="$link" + else + PRG="`dirname $PRG`/$link" + fi + done + + FOP_HOME=`dirname "$PRG"` + +fi + +FOP_HOME=@PREFIX@/share/java/fop + +# For Cygwin, ensure paths are in UNIX format before anything is touched +if $cygwin ; then + [ -n "$FOP_HOME" ] && + FOP_HOME=`cygpath --unix "$FOP_HOME"` + [ -n "$JAVA_HOME" ] && + JAVA_HOME=`cygpath --unix "$JAVA_HOME"` + [ -n "$CLASSPATH" ] && + CLASSPATH=`cygpath --path --unix "$CLASSPATH"` +fi + +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=java + fi +fi + +if [ ! -x "$JAVACMD" ] ; then + echo "Error: JAVA_HOME is not defined correctly." + echo " We cannot execute $JAVACMD" + exit +fi + +if [ -n "$CLASSPATH" ] ; then + LOCALCLASSPATH=$CLASSPATH +fi + +# add fop.jar, which resides in $FOP_HOME/build +LOCALCLASSPATH=${FOP_HOME}/fop.jar:$LOCALCLASSPATH + +# add in the dependency .jar files, which reside in $FOP_HOME/lib +DIRLIBS=${FOP_HOME}/*.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":$LOCALCLASSPATH + fi + fi +done + +# For Cygwin, switch paths to Windows format before running java +if $cygwin; then + FOP_HOME=`cygpath --path --windows "$FOP_HOME"` + JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` + LOCALCLASSPATH=`cygpath --path --windows "$LOCALCLASSPATH"` +fi + +$JAVACMD -Xms64M -Xmx320M -Djava.awt.headless=true -classpath "$LOCALCLASSPATH" $FOP_OPTS org.apache.fop.fonts.apps.TTFReader "$@" + diff -urN fop-0.20.5.orig/xalan.sh fop-0.20.5/xalan.sh --- fop-0.20.5.orig/xalan.sh 2003-07-15 04:03:25.000000000 +0200 +++ fop-0.20.5/xalan.sh 2006-06-01 10:43:21.000000000 +0200 @@ -11,7 +11,11 @@ darwin=false; case "`uname`" in CYGWIN*) cygwin=true ;; - Darwin*) darwin=true ;; + Darwin*) darwin=true + if [ -z "$JAVA_HOME" ] ; then + JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home + fi + ;; esac if [ -z "$FOP_HOME" ] ; then @@ -42,6 +46,8 @@ fi +FOP_HOME=@PREFIX@/share/java/fop + # For Cygwin, ensure paths are in UNIX format before anything is touched if $cygwin ; then [ -n "$FOP_HOME" ] && @@ -76,10 +82,10 @@ fi # add fop.jar, which resides in $FOP_HOME/build -LOCALCLASSPATH=${FOP_HOME}/build/fop.jar:$LOCALCLASSPATH +LOCALCLASSPATH=${FOP_HOME}/fop.jar:$LOCALCLASSPATH # add in the dependency .jar files, which reside in $FOP_HOME/lib -DIRLIBS=${FOP_HOME}/lib/*.jar +DIRLIBS=${FOP_HOME}/*.jar for i in ${DIRLIBS} do # if the directory is empty, then it will return the input string @@ -100,5 +106,5 @@ LOCALCLASSPATH=`cygpath --path --windows "$LOCALCLASSPATH"` fi -$JAVACMD -classpath "$LOCALCLASSPATH" $FOP_OPTS org.apache.xalan.xslt.Process "$@" +$JAVACMD -Xms64M -Xmx320M -Djava.awt.headless=true -classpath "$LOCALCLASSPATH" $FOP_OPTS org.apache.xalan.xslt.Process "$@" --- fop-0.20.5/build.xml 2003-07-14 22:03:22.000000000 -0400 +++ fop-0.20.5-new/build.xml 2006-06-15 10:27:25.000000000 -0400 @@ -548,7 +548,7 @@ -