git: 11b6514a0129 - main - java/openjdk17: Use the bootstrap port on supported ARCHs

From: Greg Lewis <glewis_at_FreeBSD.org>
Date: Sat, 27 Nov 2021 16:52:43 UTC
The branch main has been updated by glewis:

URL: https://cgit.FreeBSD.org/ports/commit/?id=11b6514a0129daac85f9600d49d6420844cf96d1

commit 11b6514a0129daac85f9600d49d6420844cf96d1
Author:     Greg Lewis <glewis@FreeBSD.org>
AuthorDate: 2021-11-27 16:50:26 +0000
Commit:     Greg Lewis <glewis@FreeBSD.org>
CommitDate: 2021-11-27 16:50:26 +0000

    java/openjdk17: Use the bootstrap port on supported ARCHs
---
 java/openjdk17/Makefile | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/java/openjdk17/Makefile b/java/openjdk17/Makefile
index 1072d7492c32..078431d0c568 100644
--- a/java/openjdk17/Makefile
+++ b/java/openjdk17/Makefile
@@ -104,8 +104,11 @@ JDK_BUILD_TYPE=		release
 
 .include <bsd.port.pre.mk>
 
-BOOTSTRAP_JDKS=	${LOCALBASE}/openjdk17 \
-		${LOCALBASE}/openjdk16
+BOOTSTRAP_JDKS=	${LOCALBASE}/openjdk17
+.if ${ARCH} == aarch64 || ${ARCH} == amd64
+BOOTSTRAP_JDKS+=	${LOCALBASE}/bootstrap-openjdk17
+.endif
+BOOTSTRAP_JDKS+=	${LOCALBASE}/openjdk16
 
 # do we have valid native jdk installed?
 .for BJDK in ${BOOTSTRAP_JDKS}
@@ -116,8 +119,13 @@ BOOTSTRAPJDKDIR=	${BJDK}
 
 # if no valid jdk found, set dependency
 .if !defined(BOOTSTRAPJDKDIR)
+.  if ${ARCH} == aarch64 || ${ARCH} == amd64
+BOOTSTRAPJDKDIR?=	${LOCALBASE}/bootstrap-openjdk17
+BUILD_DEPENDS+=		${BOOTSTRAPJDKDIR}/bin/javac:java/bootstrap-openjdk17
+.  else
 BOOTSTRAPJDKDIR?=	${LOCALBASE}/openjdk16
 BUILD_DEPENDS+=		${BOOTSTRAPJDKDIR}/bin/javac:java/openjdk16
+.  endif
 .endif
 
 JDK_BUILD_JVM=	server