Created attachment 234819 [details] new CUPS port option I need to build net-mgmt/unifi7 that is headless Java application that requires java/openjdk8 that depends on full CUPS port. In fact, it originally required cups-client port only that was later removed and merged to full cups port, so openjdk8 now requires full CUPS. However, OpenJDK8 really needs only some header files out of CUPS distribution and officially supports building --with-cups-include instead of --with-cups. Proposed patch introduces new CUPS port option to java/openjdk8 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.
Could/should this apply to other Java ports?
(In reply to Kubilay Kocak from comment #1) I hope so, but I did not check it.
Created attachment 234838 [details] new CUPS port option Fix some glitches in the patch
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=3f3975ef8c2692cc0aedf26becd3ee6d2754fb81 commit 3f3975ef8c2692cc0aedf26becd3ee6d2754fb81 Author: Eugene Grosbein <eugen@FreeBSD.org> AuthorDate: 2023-04-15 04:27:37 +0000 Commit: Eugene Grosbein <eugen@FreeBSD.org> CommitDate: 2023-04-15 04:27:37 +0000 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) java/openjdk11/Makefile | 15 +++++++++++++-- java/openjdk11/distinfo | 2 ++ 2 files changed, 15 insertions(+), 2 deletions(-)