summaryrefslogtreecommitdiff
path: root/java/openjdk11/Makefile
diff options
context:
space:
mode:
authorEugene Grosbein <eugen@FreeBSD.org>2023-04-15 11:27:37 +0700
committerEugene Grosbein <eugen@FreeBSD.org>2023-04-15 11:27:37 +0700
commit3f3975ef8c2692cc0aedf26becd3ee6d2754fb81 (patch)
tree25403a0e149efc22d750284b0b416f1bfb6721a6 /java/openjdk11/Makefile
parentx11-themes/Kvantum: Update to 1.0.10 (diff)
java/openjdk11: add new CUPS port option
UniFi controller is headless Java application that requires OpenJDK that depends on full CUPS port. In fact, the latter originally required cups-client port only that was later removed and merged to full cups port, so openjdk11 now requires full CUPS. However, OpenJDK really needs only some header files out of CUPS distribution and officially supports building --with-cups-include instead of --with-cups. This change introduces new CUPS port option to java/openjdk11 that defaults to ON to preserve current behaviour. With CUPS option turned OFF it skips build dependency on full cups: instead, it downloads and extracts its distfile and builds --with-cups-include pointing to extracted cups distfile. Default build not affected, so PORTREVISION not changed. PR: 264792 Approved by: java (maintainer timeout, over 7 months)
Diffstat (limited to 'java/openjdk11/Makefile')
-rw-r--r--java/openjdk11/Makefile15
1 files changed, 13 insertions, 2 deletions
diff --git a/java/openjdk11/Makefile b/java/openjdk11/Makefile
index 841d76ecb151..424e96ac8010 100644
--- a/java/openjdk11/Makefile
+++ b/java/openjdk11/Makefile
@@ -16,7 +16,6 @@ ONLY_FOR_ARCHS= aarch64 amd64 armv6 armv7 i386 powerpc64 powerpc64le
BUILD_DEPENDS= zip:archivers/zip \
autoconf>0:devel/autoconf \
- ${LOCALBASE}/include/cups/cups.h:print/cups \
bash:shells/bash \
gsed:textproc/gsed
LIB_DEPENDS= libasound.so:audio/alsa-lib \
@@ -69,6 +68,15 @@ BSD_JDK_VERSION= 1
JDK_BUG_URL= https://bugs.freebsd.org/bugzilla/enter_bug.cgi?product=Ports%20%26%20Packages&component=Individual%20Port(s)&short_desc=java/${PORTNAME}${JDK_MAJOR_VERSION}%3A%20
+OPTIONS_DEFINE= CUPS
+OPTIONS_DEFAULT= CUPS
+
+CUPS_CONFIGURE_ON= --with-cups=${LOCALBASE}
+CUPS_CONFIGURE_OFF= --with-cups-include=${WRKDIR}/cups-${CUPS_INC_VER}
+CUPS_BUILD_DEPENDS= ${LOCALBASE}/include/cups/cups.h:print/cups
+CUPS_INC_VER= 2.4.2
+CUPS_DISTFILES_OFF= OpenPrinting-cups-v${CUPS_INC_VER}_GH0.tar.gz:cups
+
GNU_CONFIGURE= yes
CONFIGURE_ENV= CC=${CC} \
CXX=${CXX} \
@@ -80,7 +88,6 @@ CONFIGURE_ARGS= --with-boot-jdk=${BOOTSTRAPJDKDIR} \
--disable-hotspot-gtest \
--with-jvm-features=shenandoahgc \
--with-alsa=${LOCALBASE} \
- --with-cups=${LOCALBASE} \
--with-fontconfig=${LOCALBASE} \
--with-freetype=system \
--with-freetype-include=${LOCALBASE}/include/freetype2 \
@@ -113,6 +120,10 @@ JDK_BUILD_TYPE= release
.include <bsd.port.pre.mk>
+.if !${PORT_OPTIONS:MCUPS}
+MASTER_SITES+= https://codeload.github.com/OpenPrinting/cups/tar.gz/v${CUPS_INC_VER}?dummy=/:cups
+.endif
+
BOOTSTRAP_JDKS= ${LOCALBASE}/openjdk11 \
${LOCALBASE}/bootstrap-openjdk11