Date: Fri, 16 Jul 2021 19:50:18 GMT From: Alexey Dokuchaev <danfe@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: a780ad6436af - main - java/sigar: the port had been updated and improved (+) Message-ID: <202107161950.16GJoI6c049343@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by danfe: URL: https://cgit.FreeBSD.org/ports/commit/?id=a780ad6436af3a43256fe2eeda167dd1b43b5309 commit a780ad6436af3a43256fe2eeda167dd1b43b5309 Author: Alexey Dokuchaev <danfe@FreeBSD.org> AuthorDate: 2021-07-16 19:44:32 +0000 Commit: Alexey Dokuchaev <danfe@FreeBSD.org> CommitDate: 2021-07-16 19:44:37 +0000 java/sigar: the port had been updated and improved (+) - Switch (temporarily?) to somewhat more developed GitHub fork - Add Java 11 support, `do-test' target, and remove GCC dependency - Optimize away PLATFORM_VER variable and just set the LIBNAME (without the suffix to make it more obvious that it's a shared object when we install things, and in the PLIST_FILES) - Utilize BUILD_WRKSRC and introduce INVOKE_ANT variable to reduce the tautology in targets' recipes - When symlinking to ${CC} as local compiler, do not assume it lives as ${LOCALBASE}/bin/${CC} and call `which ${CC}` explicitly - Garbage-collect commented out `post-patch' target while we're here PR: 245867 Submitted by: Angelo Polo --- java/sigar/Makefile | 40 +++++++++++++++++++--------------------- java/sigar/distinfo | 5 +++-- 2 files changed, 22 insertions(+), 23 deletions(-) diff --git a/java/sigar/Makefile b/java/sigar/Makefile index 12a2150be3ed..7808cd3d5d15 100644 --- a/java/sigar/Makefile +++ b/java/sigar/Makefile @@ -2,7 +2,7 @@ PORTNAME= sigar PORTVERSION= 1.7.3 -PORTREVISION= 10 +PORTREVISION= 11 CATEGORIES= java devel PKGNAMEPREFIX= java- @@ -17,50 +17,48 @@ BROKEN_armv7= fails to compile: jni-build.xml: gcc failed with return code 1 BUILD_DEPENDS= ${ANT_CMD}:devel/apache-ant LIB_DEPENDS= libsigar.so:devel/sigar +TEST_DEPENDS= ${JAVALIBDIR}/junit.jar:java/junit USE_GITHUB= yes -GH_ACCOUNT= amishHammer -GH_TAGNAME= b5af695 +GH_ACCOUNT= polo-language # amishHammer +GH_TAGNAME= 6719d4d USES= perl5 USE_PERL5= build USE_JAVA= yes -JAVA_VERSION= 8 JAVA_RUN= yes -USE_GCC= yes NO_CCACHE= yes +BUILD_WRKSRC= ${WRKSRC}/bindings/java + ANT_CMD?= ${LOCALBASE}/bin/ant -ANT= ${SETENV} JAVA_HOME=${JAVA_HOME} ${ANT_CMD} +INVOKE_ANT= ${SETENV} PATH=${PATH}:${WRKSRC}/bin JAVA_HOME=${JAVA_HOME} \ + ${ANT_CMD} .include <bsd.port.pre.mk> .if ${OPSYS} == FreeBSD -PLATFORM_VER= 1 +LIBNAME= libsigar-${ARCH:S,i386,x86,:S,powerpc64,ppc64,}-${OPSYS:tl}-1 .else IGNORE= ${OPSYS} platform is not supported .endif -LIBNAME= libsigar-${ARCH:S,i386,x86,:S,powerpc64,ppc64,}-${OPSYS:tl}-${PLATFORM_VER}.so - -PLIST_FILES= %%JAVAJARDIR%%/${PORTNAME}.jar \ - %%JAVAJARDIR%%/${LIBNAME} - -#post-patch: -# @${REINPLACE_CMD} s/gcc/${CC}/ \ -# ${WRKSRC}/bindings/java/hyperic_jni/jni-build.xml +PLIST_FILES= ${JAVAJARDIR}/${PORTNAME}.jar \ + ${JAVAJARDIR}/${LIBNAME}.so do-build: ${MKDIR} ${WRKSRC}/bin -.if ${CC} != "gcc" - ${LN} -s ${LOCALBASE}/bin/${CC} ${WRKSRC}/bin/gcc -.endif - cd ${WRKSRC}/bindings/java && PATH=${PATH}:${WRKSRC}/bin ${ANT} + ${LN} -s `which ${CC}` ${WRKSRC}/bin/gcc + @cd ${BUILD_WRKSRC} && ${INVOKE_ANT} build + +do-test: + @cd ${BUILD_WRKSRC} && ${INVOKE_ANT} \ + -Djunit.jar="${JAVALIBDIR}/junit.jar" test do-install: ${INSTALL_DATA} ${WRKSRC}/bindings/java/sigar-bin/lib/sigar.jar \ ${STAGEDIR}${JAVAJARDIR}/${PORTNAME}.jar - ${INSTALL_LIB} ${WRKSRC}/bindings/java/sigar-bin/lib/libsigar-${ARCH:S,i386,x86,:S,powerpc64,ppc64,}-freebsd-${PLATFORM_VER}.so \ - ${STAGEDIR}${JAVAJARDIR}/${LIBNAME} + ${INSTALL_LIB} ${WRKSRC}/bindings/java/sigar-bin/lib/${LIBNAME}.so \ + ${STAGEDIR}${JAVAJARDIR}/${LIBNAME}.so .include <bsd.port.post.mk> diff --git a/java/sigar/distinfo b/java/sigar/distinfo index 1fdb6f823779..04ae4776e453 100644 --- a/java/sigar/distinfo +++ b/java/sigar/distinfo @@ -1,2 +1,3 @@ -SHA256 (amishHammer-sigar-1.7.3-b5af695_GH0.tar.gz) = 548f853d3a0ce4d14e5833917bc6bac5fc42894415bd0b05123ea8e58780aa48 -SIZE (amishHammer-sigar-1.7.3-b5af695_GH0.tar.gz) = 1091675 +TIMESTAMP = 1626367522 +SHA256 (polo-language-sigar-1.7.3-6719d4d_GH0.tar.gz) = d7dd03254a2f0dfa998228306789188e561f051915a479b18ef5f2b6868fb477 +SIZE (polo-language-sigar-1.7.3-6719d4d_GH0.tar.gz) = 1091061
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202107161950.16GJoI6c049343>