openbsd-ports/devel/apache-ant/patches/patch-bin_ant
kurt 897cd07c19 - maintenance update to 1.7.0
NOTE: 1.7.0 has a useful new feature that will help java porters to
maintain runtime compatibility for src built java ports. Default values
for javac -source and -target arguments can be globally set using two new
properties: ant.build.javac.source and ant.build.javac.target.
2007-01-12 14:34:30 +00:00

37 lines
956 B
Plaintext

$OpenBSD: patch-bin_ant,v 1.5 2007/01/12 14:34:30 kurt Exp $
--- bin/ant.orig Mon Jan 8 19:14:09 2007
+++ bin/ant Mon Jan 8 19:15:42 2007
@@ -120,29 +120,11 @@ if $cygwin ; then
fi
# set ANT_LIB location
-ANT_LIB="${ANT_HOME}/lib"
+ANT_LIB="_antlibs_"
-if [ -z "$JAVACMD" ] ; then
- if [ -n "$JAVA_HOME" ] ; then
- # IBM's JDK on AIX uses strange locations for the executables
- if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
- JAVACMD="$JAVA_HOME/jre/sh/java"
- elif [ -x "$JAVA_HOME/jre/bin/java" ] ; then
- JAVACMD="$JAVA_HOME/jre/bin/java"
- else
- JAVACMD="$JAVA_HOME/bin/java"
- fi
- else
- JAVACMD=`which java 2> /dev/null `
- if [ -z "$JAVACMD" ] ; then
- JAVACMD=java
- fi
- fi
-fi
+JAVACMD=$(javaPathHelper -c apache-ant)
-if [ ! -x "$JAVACMD" ] ; then
- echo "Error: JAVA_HOME is not defined correctly."
- echo " We cannot execute $JAVACMD"
+if [ -z "${JAVACMD}" ]; then
exit 1
fi