git: 71117cddc9fc - main - graphics/opencv: Fix JAVA option and correct Apache Ant usage

Jung-uk Kim jkim at FreeBSD.org
Wed Apr 14 16:42:40 UTC 2021


The branch main has been updated by jkim:

URL: https://cgit.FreeBSD.org/ports/commit/?id=71117cddc9fc29c1e83c14e94c4b04179c0158d3

commit 71117cddc9fc29c1e83c14e94c4b04179c0158d3
Author:     Jung-uk Kim <jkim at FreeBSD.org>
AuthorDate: 2021-04-14 16:13:30 +0000
Commit:     Jung-uk Kim <jkim at FreeBSD.org>
CommitDate: 2021-04-14 16:13:30 +0000

    graphics/opencv: Fix JAVA option and correct Apache Ant usage
    
    JAVA option did not work because the actual build knob was wrong.
    Especially, on a system where devel/apache-ant was installed, ant and
    java binaries were automatically detected and enabled even if the JAVA
    option was disabled.  While I am here, fix Apache Ant usage by setteing
    JAVACMD variable.  Without it, it may pick up java binary from JRE via
    javavm(1) from java/javavmwrapper.  If ant script is used with java from
    JRE, build fails because it cannot find jar.
    
    Approved by:    tcberner (maintainer)
---
 graphics/opencv/Makefile | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/graphics/opencv/Makefile b/graphics/opencv/Makefile
index 54fd430557f7..a2b19d061238 100644
--- a/graphics/opencv/Makefile
+++ b/graphics/opencv/Makefile
@@ -71,8 +71,11 @@ OPTIONS_SUB=		yes
 HARDENING_CMAKE_BOOL=	ENABLE_BUILD_HARDENING
 HARDENING_DESC=		Enable hardening of the resulting binaries
 
-JAVA_CMAKE_BOOL=	BUILD_openv_java
+JAVA_CMAKE_BOOL=	BUILD_JAVA
 JAVA_BUILD_DEPENDS=	ant:devel/apache-ant
+JAVA_MAKE_ENV=		JAVACMD=${JAVA}
+JAVA_USE=		JAVA=yes
+JAVA_VARS=		JAVA_BUILD=yes
 
 PYTHON_BUILD_DEPENDS=	${PYNUMPY}
 PYTHON_RUN_DEPENDS=	${PYNUMPY}


More information about the dev-commits-ports-all mailing list