components/ant/patches/ant.patch
author Norm Jacobs <Norm.Jacobs@Oracle.COM>
Wed, 13 Apr 2011 09:58:06 -0700
changeset 181 87e11e685b1f
parent 116 ae6a90899b42
permissions -rw-r--r--
7003927 userland should postprocess packaged files 7034188 userland should have common lint library rules 7034992 userland packages should include opensolaris.arc_url data 7019309 move ghostscript to userland (fix build)

--- apache-ant-1.7.1/src/script/ant.orig	Fri Feb 25 07:25:24 2011
+++ apache-ant-1.7.1/src/script/ant	Fri Feb 25 07:34:29 2011
@@ -3,6 +3,9 @@
 # Licensed to the Apache Software Foundation (ASF) under one or more
 # contributor license agreements.  See the NOTICE file distributed with
 # this work for additional information regarding copyright ownership.
+
+JAVA_HOME=${JAVA_HOME:-/usr/java}
+ANT_HOME=${ANT_HOME:-/usr}
 # The ASF licenses this file to You under the Apache License, Version 2.0
 # (the "License"); you may not use this file except in compliance with
 # the License.  You may obtain a copy of the License at
@@ -120,7 +123,11 @@
 fi
 
 # set ANT_LIB location
-ANT_LIB="${ANT_HOME}/lib"
+if [ "$ANT_HOME" = "/usr" ] ; then
+  ANT_LIB="${ANT_HOME}/share/lib/ant"
+else
+  ANT_LIB="${ANT_HOME}/lib"
+fi
 
 if [ -z "$JAVACMD" ] ; then
   if [ -n "$JAVA_HOME"  ] ; then