head 1.1; access; symbols pkgsrc-2026Q1:1.1.0.26 pkgsrc-2026Q1-base:1.1 pkgsrc-2025Q4:1.1.0.24 pkgsrc-2025Q4-base:1.1 pkgsrc-2025Q3:1.1.0.22 pkgsrc-2025Q3-base:1.1 pkgsrc-2025Q2:1.1.0.20 pkgsrc-2025Q2-base:1.1 pkgsrc-2025Q1:1.1.0.18 pkgsrc-2025Q1-base:1.1 pkgsrc-2024Q4:1.1.0.16 pkgsrc-2024Q4-base:1.1 pkgsrc-2024Q3:1.1.0.14 pkgsrc-2024Q3-base:1.1 pkgsrc-2024Q2:1.1.0.12 pkgsrc-2024Q2-base:1.1 pkgsrc-2024Q1:1.1.0.10 pkgsrc-2024Q1-base:1.1 pkgsrc-2023Q4:1.1.0.8 pkgsrc-2023Q4-base:1.1 pkgsrc-2023Q3:1.1.0.6 pkgsrc-2023Q3-base:1.1 pkgsrc-2023Q2:1.1.0.4 pkgsrc-2023Q2-base:1.1 pkgsrc-2023Q1:1.1.0.2 pkgsrc-2023Q1-base:1.1; locks; strict; comment @# @; 1.1 date 2023.02.16.10.32.36; author abs; state Exp; branches; next ; commitid 5iBBMbhSratNLJdE; desc @@ 1.1 log @Adjust apache-ant wrapper to honour JAVA_HOME Still use the pkgsrc ${PREFIX}/bin/java wrapper by default, but allow overriding with either of JAVACMD or JAVA_HOME. The latter is particularly important for other pkgsrc packages which use ant to build and may require a specific jdk (java-jna) Drop setting of ANT_HOME (was in a non default branch anyway) Bump PKGREVISION @ text @$NetBSD$ Adjust to use the pkgsrc ${PREFIX}/bin/java wrapper by default, but still allow overriding with either of JAVACMD or JAVA_HOME. The latter is particularly important for other pkgsrc packages which use ant to build and may require a specific jdk (java-jna) --- bin/ant.orig 2023-01-04 09:33:13.000000000 +0000 +++ bin/ant @@@@ -115,6 +115,11 @@@@ if $rpm_mode; then fi fi +# pkgsrc: use ${PREFIX}/bin/java (wrapper) +if [ -z "$JAVA_HOME" ] && [ -z "$JAVACMD" ] && [ -x @@PREFIX@@/bin/java ]; then + JAVACMD=@@PREFIX@@/bin/java +fi + # OS specific support. $var _must_ be set to either true or false. cygwin=false; darwin=false; @@@@ -172,7 +177,7 @@@@ if $mingw; then fi # set ANT_LIB location -ANT_LIB="${ANT_HOME}/lib" +ANT_LIB="${ANT_HOME}/lib/java/ant" if [ -z "$JAVACMD" ]; then if [ -n "$JAVA_HOME" ]; then @