--- apache-ant-1.6.5/src/script/ant.original 2005-10-27 17:06:55.000000000 -0400 +++ apache-ant-1.6.5/src/script/ant 2005-10-27 17:08:45.000000000 -0400 @@ -150,6 +150,28 @@ # variable if $rpm_mode && [ -f /usr/bin/build-classpath ] ; then LOCALCLASSPATH="$(/usr/bin/build-classpath ant ant-launcher jaxp_parser_impl xml-commons-apis)" + + # If no optional jars have been specified then build the default list + if [ -z "$OPT_JAR_LIST" ] ; then + for file in /etc/ant.d/*; do + if [ -f "$file" ]; then + case "$file" in + *~) ;; + *#*) ;; + *.rpmsave) ;; + *.rpmnew) ;; + *) + for dep in `cat "$file"`; do + case "$OPT_JAR_LIST" in + *"$dep"*) ;; + *) OPT_JAR_LIST="$OPT_JAR_LIST${OPT_JAR_LIST:+ }$dep" + esac + done + esac + fi + done + fi + # If the user requested to try to add some other jars to the classpath if [ -n "$OPT_JAR_LIST" ] ; then _OPTCLASSPATH="$(/usr/bin/build-classpath $OPT_JAR_LIST 2> /dev/null)"