On Mon, 2019-09-23 at 15:35 +0100, Stuart Henderson wrote:
> On 2019/09/20 20:46, Kurt Miller wrote:
> > 
> > On Fri, 2019-09-20 at 15:18 -0400, k...@intricatesoftware.com wrote:
> > > 
> > > Update devel/jdk/11 to 11.0.5+8 which includes aarch64 support.
> > > * 11.0.5 is not released officially yet so this is realy a pre-
> > >   release of 11.0.5 and will be updated again when the final
> > >   upstream release occurs.
> > > * Adds aarch64 support.
> > > * Contains many upstream changes between 11.0.4+11 and 11.0.5+8
> > > * Contains many bsd-port changes to improve stablity and
> > >   compatiblity.
> > > * Update java.port.mk module to support jdk/11 only on aarch64.
> > > * aarch64 pbuild data size limit may need to be bumped - working
> > >   that out now.
> > ulimit -Sd 1572864 works to build the jdk on aarch64.
> > 
> > > 
> > > Index: java.port.mk
> > > ===================================================================
> > > RCS file: /cvs/ports/devel/jdk/java.port.mk,v
> > > retrieving revision 1.37
> > > diff -u -p -u -r1.37 java.port.mk
> > > --- java.port.mk  11 Jun 2019 00:36:04 -0000      1.37
> > > +++ java.port.mk  20 Sep 2019 19:02:14 -0000
> > > @@ -5,7 +5,6 @@
> > >  # version. Valid values for x.y are 1.8 or 11.
> > >  
> > >  MODJAVA_VER?=
> > > -ONLY_FOR_ARCHS?= i386 amd64
> > >  
> > >  # Based on the MODJAVA_VER, NO_BUILD and MACHINE_ARCH, the following
> > >  # things will be setup:
> > > @@ -25,14 +24,27 @@ ONLY_FOR_ARCHS?= i386 amd64
> > >  # to set the default JAVA_HOME or JAVACMD vars for a package.
> > >  #
> > >  
> > > -.if ${MODJAVA_VER:S/+//} == "1.8"
> > > -    JAVA_HOME= ${LOCALBASE}/jdk-1.8.0
> > > -    MODJAVA_BUILD_DEPENDS= jdk->=1.8v0,<1.9v0:devel/jdk/1.8
> > > -.elif ${MODJAVA_VER:S/+//} == "11"
> > > +.if ${MODJAVA_VER:S/+//} != "1.8" && ${MODJAVA_VER:S/+//} != "11"
> > > +    ERRORS+="Fatal: MODJAVA_VER must be set to a valid value."
> > > +.endif
> > > +
> > > +.if ${MODJAVA_VER} == "1.8"
> > > +    ONLY_FOR_ARCHS?= i386 amd64
> > > +.else
> > > +    ONLY_FOR_ARCHS?= i386 amd64 aarch64
> > > +.endif
> > > +
> > > +.if ${MACHINE_ARCH} == "aarch64"
> > >      JAVA_HOME= ${LOCALBASE}/jdk-11
> > >      MODJAVA_BUILD_DEPENDS+= jdk->=11v0,<12v0:devel/jdk/11
> > >  .else
> > > -    ERRORS+="Fatal: MODJAVA_VER must be set to a valid value."
> > > +.   if ${MODJAVA_VER:S/+//} == "1.8"
> > > +        JAVA_HOME= ${LOCALBASE}/jdk-1.8.0
> > > +        MODJAVA_BUILD_DEPENDS= jdk->=1.8v0,<1.9v0:devel/jdk/1.8
> > > +.   else
> > > +        JAVA_HOME= ${LOCALBASE}/jdk-11
> > > +        MODJAVA_BUILD_DEPENDS+= jdk->=11v0,<12v0:devel/jdk/11
> > > +.   endif
> > >  .endif
> > >  
> > >  .if ${MODJAVA_VER:M*+}
> java.port.mk OK.
> 
> I haven't run tested jdk yet, but it reads OK - a couple of comments but
> they don't need to block the update:
> 
> > 
> > > 
> > >  .else
> > > -BOOT_JDK_DIST=   openjdk-jdk11u-bootjdk-${ARCH}-${BOOTJDK_DATE}.tar.gz
> > > -.  if (${ARCH}==amd64) || (${ARCH}==i386)
> > > +BOOT_JDK_DIST=   
> > > openjdk-jdk11u-bootjdk-${MACHINE_ARCH}-${BOOTJDK_DATE}.tar.gz
> > > +.  if (${MACHINE_ARCH}==amd64) || (${MACHINE_ARCH}==i386) || 
> > > (${MACHINE_ARCH}==aarch64)
> > >  DISTFILES+=      ${BOOT_JDK_DIST}:1
> > >  .  endif
> since this is "every arch in ONLY_FOR_ARCHS", the extra var and conditional
> aren't needed:
> 
> DISTFILES+=     
> openjdk-jdk11u-bootjdk-${MACHINE_ARCH}-${BOOTJDK_DATE}.tar.gz:1

I have a vague recollection that espie@ asked for the arch
limiter there to correct an issue with fetching all the
distfiles or something along those lines IIRC.

> > 
> > > 
> > > @@ -128,6 +129,14 @@ PKG_ARGS+=   -Daot=1
> > >  PKG_ARGS+=       -Daot=0
> > >  .endif
> > >  
> > > +.if ${MACHINE_ARCH} == "aarch64"
> > > +# aot is not working yet on aarch64
> > > +CONFIGURE_ARGS+=--enable-aot=no
> > > +PKG_ARGS+=       -Dci=1
> > > +.else
> > > +PKG_ARGS+=       -Dci=0
> > > +.endif
> would it make more sense to have CONFIGURE_ARGS+=--enable-aot=no in the
> previous block alongside -Daot=0?
> 

Yes. I'll move that up and test it before committing.

Thank you,
-Kurt

Reply via email to