Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 May 2022 05:30:07 GMT
From:      Mikhail Teterin <mi@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: c0eef0ceec76 - main - java/jxgrabkey: overwrite source- and target-versions on command-line.
Message-ID:  <202205190530.24J5U7mW028679@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by mi:

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

commit c0eef0ceec76f8e99a152aca04e938dcb12f7261
Author:     Mikhail Teterin <mi@FreeBSD.org>
AuthorDate: 2022-05-19 05:27:51 +0000
Commit:     Mikhail Teterin <mi@FreeBSD.org>
CommitDate: 2022-05-19 05:27:51 +0000

    java/jxgrabkey: overwrite source- and target-versions on command-line.
    
    The author's properties file (from 2010) sets source- and target-versions
    to 1.5, which is too old for JDK-1.7, for example. Instead of
    patching the properties-file, overwrite the two settings on
    command-line. Use the conservative value of 1.7...
---
 java/jxgrabkey/Makefile | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/java/jxgrabkey/Makefile b/java/jxgrabkey/Makefile
index 9b882e200b0f..f7e195b72c1f 100644
--- a/java/jxgrabkey/Makefile
+++ b/java/jxgrabkey/Makefile
@@ -20,11 +20,12 @@ TEST_BUILD_DEPENDS=	${JAVALIBDIR}/junit.jar:java/junit	\
 MAKE_ENV+=	JAVA_HOME=${JAVA_HOME} OPSYS=${OPSYS}
 PLIST_FILES=	%%JAVAJARDIR%%/JXGrabKey.jar lib/libJXGrabKey.so
 USE_LDCONFIG=	yes
+ANT_ARGS=	-Djavac.source=1.7 -Djavac.target=1.7
 
 do-build:
 	${SETENV} ${MAKE_ENV} ${MAKE} -C ${WRKSRC}/JXGrabKey/C++	\
 		-f ${FILESDIR}/Makefile.JXGrabKey libJXGrabKey.so
-	cd ${WRKSRC}/JXGrabKey/Java && ${ANT} -verbose jar
+	cd ${WRKSRC}/JXGrabKey/Java && ${ANT} -verbose jar ${ANT_ARGS}
 
 do-install:
 	${INSTALL_LIB} ${WRKSRC}/JXGrabKey/C++/libJXGrabKey.so ${STAGEDIR}${PREFIX}/lib/
@@ -36,6 +37,7 @@ do-test-TEST-on: build
 		${SETENV} CLASSPATH=${JAVALIBDIR}/junit.jar:${JAVALIBDIR}/hamcrest.jar	\
 		    LD_LIBRARY_PATH=${WRKSRC}/JXGrabKey/C++	\
 			${ANT} -Djavac.classpath=${JAVALIBDIR}/junit.jar \
+			    ${ANT_ARGS} \
 			    test
 
 .include <bsd.port.mk>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202205190530.24J5U7mW028679>