aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Grosbein <eugen@FreeBSD.org>2023-04-15 04:27:37 +0000
committerEugene Grosbein <eugen@FreeBSD.org>2023-04-15 04:27:37 +0000
commit3f3975ef8c2692cc0aedf26becd3ee6d2754fb81 (patch)
tree25403a0e149efc22d750284b0b416f1bfb6721a6
parent737f9739394794ebccafedf46e319cad936c0f6a (diff)
downloadports-3f3975ef8c2692cc0aedf26becd3ee6d2754fb81.tar.gz
ports-3f3975ef8c2692cc0aedf26becd3ee6d2754fb81.zip
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)
-rw-r--r--java/openjdk11/Makefile15
-rw-r--r--java/openjdk11/distinfo2
2 files changed, 15 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
diff --git a/java/openjdk11/distinfo b/java/openjdk11/distinfo
index 6c7115771807..8b8d70389a07 100644
--- a/java/openjdk11/distinfo
+++ b/java/openjdk11/distinfo
@@ -1,3 +1,5 @@
TIMESTAMP = 1674431160
+SHA256 (OpenPrinting-cups-v2.4.2_GH0.tar.gz) = 7095b2977bb728ded5566a5c802866062840d6541fd027836865949a407c3682
+SIZE (OpenPrinting-cups-v2.4.2_GH0.tar.gz) = 8173207
SHA256 (battleblow-jdk11u-jdk-11.0.18+10-1_GH0.tar.gz) = 605a5c602f8078445a6a8c094d81a56b9ea8928d1aefccc83bdf1587f8492693
SIZE (battleblow-jdk11u-jdk-11.0.18+10-1_GH0.tar.gz) = 123497196