From 00d241bb50a1e8ec79bff2ec6f0127126079e03d Mon Sep 17 00:00:00 2001 From: Ronald Klop Date: Sat, 13 Sep 2025 14:38:14 +0200 Subject: java/openjdk17: pass --with-jobs to honour MAKE_JOBS_NUMBER The configure script detects cores and memory and calculates itself how many jobs it uses. checking for number of cores... 28 checking for memory size... 130926 MB checking for appropriate number of jobs to run in parallel... 28 Override this by the variables of our ports framework. If this fixes the flapping builds I want to apply it to the other openjdk* ports. Bump portrevision so future failures are easy to trace back. Suggested in: https://lists.freebsd.org/archives/freebsd-java/2025-September/003304.html --- java/openjdk17/Makefile | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'java') diff --git a/java/openjdk17/Makefile b/java/openjdk17/Makefile index 9549ff9b0984..8e4fb466e6f0 100644 --- a/java/openjdk17/Makefile +++ b/java/openjdk17/Makefile @@ -1,7 +1,7 @@ PORTNAME= openjdk DISTVERSIONPREFIX= jdk- DISTVERSION= ${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_PATCH_VERSION}+${JDK_BUILD_NUMBER}-${BSD_JDK_VERSION} -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= java devel PKGNAMESUFFIX?= ${JDK_MAJOR_VERSION} @@ -48,7 +48,6 @@ MAKE_ENV= LANG="C" \ CXX=${CXX} \ CPP=${CPP} \ MAKEFLAGS="" -MAKE_JOBS_UNSAFE= yes JDK_OSARCH= bsd-${ARCH:S/amd64/x86_64/:S/i386/x86/:S/powerpc64/ppc64/} JDK_BUILDDIR= ${WRKSRC}/build/${JDK_OSARCH}-${JDK_BUILD_JVM}-${JDK_BUILD_TYPE} @@ -102,6 +101,12 @@ CONFIGURE_ARGS= --with-boot-jdk=${BOOTSTRAPJDKDIR} \ --with-vendor-bug-url="${JDK_BUG_URL}" \ --with-vendor-vm-bug-url="${JDK_BUG_URL}" +.if defined(MAKE_JOBS_UNSAFE) +CONFIGURE_ARGS+= --with-jobs=1 +.elif defined(MAKE_JOBS_NUMBER) +CONFIGURE_ARGS+= --with-jobs=${MAKE_JOBS_NUMBER} +.endif + JAVAVMS_COMMENT= OpenJDK${JDK_MAJOR_VERSION} .if defined(BUILD_JRE) @@ -113,6 +118,11 @@ JDK_BUILD_TYPE= release .include +# portsfallout.com shows flapping builds on 13.5 and 14.2 +.if ${OPSYS} == FreeBSD && ${OSVERSION} < 1403000 +MAKE_JOBS_UNSAFE= yes +.endif + BOOTSTRAP_JDKS= ${LOCALBASE}/openjdk17 ${LOCALBASE}/bootstrap-openjdk17 # do we have valid native jdk installed? -- cgit v1.3