Blame SOURCES/0001-SCL-ize-ant-script.patch

1f6a84
From bd27d06d2d72f406665f6423ccc71c88f8b50a50 Mon Sep 17 00:00:00 2001
1f6a84
From: Mikolaj Izdebski <mizdebsk@redhat.com>
1f6a84
Date: Thu, 13 Feb 2014 14:16:31 +0100
1f6a84
Subject: [PATCH] SCL-ize ant script
1f6a84
1f6a84
---
1f6a84
 src/script/ant | 21 +++++++++++----------
1f6a84
 1 file changed, 11 insertions(+), 10 deletions(-)
1f6a84
1f6a84
diff --git a/src/script/ant b/src/script/ant
1f6a84
index b5ed5be..e492f8c 100644
1f6a84
--- a/src/script/ant
1f6a84
+++ b/src/script/ant
1f6a84
@@ -45,9 +45,9 @@ if $no_config ; then
1f6a84
   usejikes=$use_jikes_default
1f6a84
 else
1f6a84
   # load system-wide ant configuration (ONLY if ANT_HOME has NOT been set)
1f6a84
-  if [ -z "$ANT_HOME" -o "$ANT_HOME" = "/usr/share/ant" ]; then
1f6a84
-      if [ -f "/etc/ant.conf" ] ; then
1f6a84
-          . /etc/ant.conf
1f6a84
+  if [ -z "$ANT_HOME" -o "$ANT_HOME" = "@DATADIR@/ant" ]; then
1f6a84
+      if [ -f "@CONFDIR@/ant.conf" ] ; then
1f6a84
+          . @CONFDIR@/ant.conf
1f6a84
       fi
1f6a84
   fi
1f6a84
 
1f6a84
@@ -70,8 +70,8 @@ fi
1f6a84
 
1f6a84
 # Setup Java environment in rpm mode
1f6a84
 if $rpm_mode ; then
1f6a84
-  if [ -f /usr/share/java-utils/java-functions ] ; then
1f6a84
-    . /usr/share/java-utils/java-functions
1f6a84
+  if [ -f @DATADIR@/java-utils/java-functions ] ; then
1f6a84
+    . @DATADIR@/java-utils/java-functions
1f6a84
     set_jvm
1f6a84
     set_javacmd
1f6a84
   fi
1f6a84
@@ -166,12 +166,12 @@ fi
1f6a84
 # is discouraged as it is not java-version safe. A user should
1f6a84
 # request optional jars and their dependencies via the OPT_JAR_LIST
1f6a84
 # variable
1f6a84
-if $rpm_mode && [ -x /usr/bin/build-classpath ] ; then
1f6a84
-  LOCALCLASSPATH="$(/usr/bin/build-classpath ant ant-launcher jaxp_parser_impl xml-commons-apis)"
1f6a84
+if $rpm_mode && [ -x @BINDIR@/build-classpath ] ; then
1f6a84
+  LOCALCLASSPATH="$(@BINDIR@/build-classpath ant/ant ant/ant-launcher xerces-j2 xml-commons-apis)"
1f6a84
 
1f6a84
   # If no optional jars have been specified then build the default list
1f6a84
   if [ -z "$OPT_JAR_LIST" ] ; then
1f6a84
-    for file in /etc/ant.d/*; do
1f6a84
+    for file in @CONFDIR@/ant.d/*; do
1f6a84
       if [ -f "$file" ]; then
1f6a84
         case "$file" in
1f6a84
         *~) ;;
1f6a84
@@ -189,7 +189,7 @@ if $rpm_mode && [ -x /usr/bin/build-classpath ] ; then
1f6a84
 
1f6a84
   # If the user requested to try to add some other jars to the classpath
1f6a84
   if [ -n "$OPT_JAR_LIST" ] ; then
1f6a84
-    _OPTCLASSPATH="$(/usr/bin/build-classpath $OPT_JAR_LIST 2> /dev/null)"
1f6a84
+    _OPTCLASSPATH="$(@BINDIR@/build-classpath $OPT_JAR_LIST 2> /dev/null)"
1f6a84
     if [ -n "$_OPTCLASSPATH" ] ; then 
1f6a84
       LOCALCLASSPATH="$LOCALCLASSPATH:$_OPTCLASSPATH"
1f6a84
     fi
1f6a84
@@ -278,7 +278,8 @@ if $show_help ; then
1f6a84
   echo $0 '[script options] [options] [target [target2 [target3] ..]]'
1f6a84
   echo 'Script Options:'
1f6a84
   echo '  --help, --h            print this message and ant help'
1f6a84
-  echo '  --noconfig             suppress sourcing of /etc/ant.conf,'
1f6a84
+  echo '  --noconfig             suppress sourcing of'
1f6a84
+  echo '                         @CONFDIR@/ant.conf,'
1f6a84
   echo '                         $HOME/.ant/ant.conf, and $HOME/.antrc'
1f6a84
   echo '                         configuration files'
1f6a84
   echo '  --usejikes             enable use of jikes by default, unless'
1f6a84
-- 
1f6a84
1.8.4.2
1f6a84