summaryrefslogtreecommitdiff
path: root/devel/apache-ant15/files
diff options
context:
space:
mode:
authorabs <abs>2004-04-01 14:27:12 +0000
committerabs <abs>2004-04-01 14:27:12 +0000
commitd3d67f06e0800143cbc29ed6e8306dcf12538263 (patch)
tree47f0c23544e8e6cef17b1198106228a69c03abd0 /devel/apache-ant15/files
parent63c2fecd5c72dca09afcd0a14d41c517d182782a (diff)
downloadpkgsrc-d3d67f06e0800143cbc29ed6e8306dcf12538263.tar.gz
Import apache-ant-1.5.4 as apache-ant15 prior to updating apache-ant to
1.6.1. 1.5.4 is the last version to support Java 1.1.
Diffstat (limited to 'devel/apache-ant15/files')
-rw-r--r--devel/apache-ant15/files/ant62
1 files changed, 62 insertions, 0 deletions
diff --git a/devel/apache-ant15/files/ant b/devel/apache-ant15/files/ant
new file mode 100644
index 00000000000..1d849883421
--- /dev/null
+++ b/devel/apache-ant15/files/ant
@@ -0,0 +1,62 @@
+#! /bin/sh
+
+if [ -f $HOME/.antrc ] ; then
+ . $HOME/.antrc
+fi
+
+if [ "$ANT_HOME" = "" ] ; then
+ # try to find ANT
+ ANT_HOME=@PREFIX@
+fi
+
+if [ "$JAVA_HOME" != "" ] ; then
+ if [ "$JAVACMD" = "" ] ; then
+ JAVACMD=$JAVA_HOME/bin/java
+ fi
+else
+ JAVA_HOME=@JAVA_HOME@
+ if [ "$JAVACMD" = "" ] ; then
+ JAVACMD=$JAVA_HOME/bin/java
+ fi
+fi
+
+# add in the dependency .jar files
+DIRLIBS="${ANT_HOME}/lib/java/ant/ant.jar ${ANT_HOME}/lib/java/ant/optional.jar ${ANT_HOME}/lib/java/crimson.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
+ LOCALCLASSPATH=$LOCALCLASSPATH:"$i"
+ fi
+done
+
+if [ "$CLASSPATH" != "" ] ; then
+ LOCALCLASSPATH=$LOCALCLASSPATH:$CLASSPATH
+fi
+
+if [ "$JAVA_HOME" != "" ] ; then
+ if test -f $JAVA_HOME/lib/tools.jar ; then
+ LOCALCLASSPATH=$LOCALCLASSPATH:$JAVA_HOME/lib/tools.jar
+ fi
+
+ if test -f $JAVA_HOME/lib/classes.zip ; then
+ LOCALCLASSPATH=$LOCALCLASSPATH:$JAVA_HOME/lib/classes.zip
+ fi
+else
+ echo "Warning: JAVA_HOME environment variable is not set."
+ echo " If build fails because sun.* classes could not be found"
+ echo " you will need to set the JAVA_HOME environment variable"
+ echo " to the installation directory of java."
+fi
+
+# supply JIKESPATH to Ant as jikes.class.path
+if [ "$JIKESPATH" != "" ] ; then
+ if [ "$ANT_OPTS" != "" ] ; then
+ ANT_OPTS="$ANT_OPTS -Djikes.class.path=$JIKESPATH"
+ else
+ ANT_OPTS=-Djikes.class.path=$JIKESPATH
+ fi
+fi
+
+exec $JAVACMD -classpath "$LOCALCLASSPATH" -Dant.home="${ANT_HOME}" $ANT_OPTS org.apache.tools.ant.Main "$@"