summaryrefslogtreecommitdiff
path: root/devel/apache-ant/files
diff options
context:
space:
mode:
authorjschauma <jschauma@pkgsrc.org>2003-06-03 17:00:08 +0000
committerjschauma <jschauma@pkgsrc.org>2003-06-03 17:00:08 +0000
commit944d01fdb1470cbed1c225d6d97b96db919f29d9 (patch)
tree5f3820d9d9b8b7248b6318f8125636f440383fee /devel/apache-ant/files
parent3299a427fd101a0022b64a6a6cef4114c47eeb9e (diff)
downloadpkgsrc-944d01fdb1470cbed1c225d6d97b96db919f29d9.tar.gz
Update "ant" to 1.5.3-1. The program was, up until version 1.5.1 known
as "jakarta-ant", and is now known as "apache-ant". Changes since 1.4.1 are too many to list here.
Diffstat (limited to 'devel/apache-ant/files')
-rw-r--r--devel/apache-ant/files/ant62
-rw-r--r--devel/apache-ant/files/antRun9
2 files changed, 71 insertions, 0 deletions
diff --git a/devel/apache-ant/files/ant b/devel/apache-ant/files/ant
new file mode 100644
index 00000000000..6175a6d0cf4
--- /dev/null
+++ b/devel/apache-ant/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.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
+
+$JAVACMD -classpath "$LOCALCLASSPATH" -Dant.home="${ANT_HOME}" $ANT_OPTS org.apache.tools.ant.Main "$@"
diff --git a/devel/apache-ant/files/antRun b/devel/apache-ant/files/antRun
new file mode 100644
index 00000000000..f0a18f16531
--- /dev/null
+++ b/devel/apache-ant/files/antRun
@@ -0,0 +1,9 @@
+#! /bin/sh
+
+# Args: DIR command
+cd "$1"
+CMD="$2"
+shift
+shift
+
+exec $CMD "$@"