Description: <short summary of the patch>
 TODO: Put a short summary on the line above and replace this paragraph
 with a longer explanation of this change. Complete the meta-information
 with other relevant fields (see below for details). To make it easier, the
 information below has been extracted from the changelog. Adjust it or drop
 it.
 .
 ant (1.10.5-2) unstable; urgency=medium
 .
   * Team upload.
   * Lower the minimum required source/target level to 1.6 again.
     This is acceptable for OpenJDK 11 but must be reverted for OpenJDK 12.
     Thanks to Bdale Garbee for the report and patch. (Closes: #906785)
   * Declare compliance with Debian Policy 4.2.1.
Author: Markus Koschany <apo@debian.org>
Bug-Debian: https://bugs.debian.org/906785

---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: https://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: 2021-05-22

--- ant-1.10.5.orig/src/script/ant
+++ ant-1.10.5/src/script/ant
@@ -150,7 +150,11 @@ if [ -z "$ANT_HOME" -o ! -d "$ANT_HOME"
     if expr "$link" : '/.*' > /dev/null; then
       PRG="$link"
     else
-      PRG=`dirname "$PRG"`"/$link"
+      if [ `dirname $PRG` = "/bin" ] && [ -d "/usr/share" ] && [ ! -d "/share" ];then
+        PRG=`dirname "$PRG"`/../usr/bin"/$link"
+      else
+        PRG=`dirname "$PRG"`"/$link"
+      fi
     fi
   done
 
