Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Sep 2019 01:49:46 +0000 (UTC)
From:      Greg Lewis <glewis@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r512693 - in head/java/netty: . files
Message-ID:  <201909240149.x8O1nknL055587@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: glewis
Date: Tue Sep 24 01:49:46 2019
New Revision: 512693
URL: https://svnweb.freebsd.org/changeset/ports/512693

Log:
  Build the native transport library
  
  * Build the native KQueue transport library
  * Add that library to the installed netty.jar
  * Bump PORTREVISION
  
  This was only tested on amd64, but should work on all architectures with
  Java support

Added:
  head/java/netty/files/
  head/java/netty/files/Makefile.in   (contents, props changed)
Modified:
  head/java/netty/Makefile

Modified: head/java/netty/Makefile
==============================================================================
--- head/java/netty/Makefile	Tue Sep 24 00:51:21 2019	(r512692)
+++ head/java/netty/Makefile	Tue Sep 24 01:49:46 2019	(r512693)
@@ -4,6 +4,7 @@
 PORTNAME=	netty
 PORTVERSION=	4.1.41
 DISTVERSIONSUFFIX=	.Final
+PORTREVISION=	1
 CATEGORIES=	java devel
 MASTER_SITES=	http://dl.bintray.com/netty/downloads/
 
@@ -18,7 +19,6 @@ USE_JAVA=	yes
 
 CPE_VENDOR=	netty_project
 JAVA_VERSION=	8+
-NO_BUILD=	yes
 NO_ARCH=	yes
 WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}.Final
 
@@ -36,6 +36,44 @@ PORTDOCS=	*
 
 OPTIONS_DEFINE=	DOCS
 
+.include <bsd.port.pre.mk>
+
+.if ${ARCH} == "aarch64"
+NETTY_ARCH=	aarch_64
+.elif ${ARCH} == "amd64"
+NETTY_ARCH=	x86_64
+.elif ${ARCH} == "arm6"
+NETTY_ARCH=	arm_32
+.elif ${ARCH} == "arm7"
+NETTY_ARCH=	arm_32
+.elif ${ARCH} == "i386"
+NETTY_ARCH=	x86_32
+.elif ${ARCH} == "powerpc"
+NETTY_ARCH=	ppc_32
+.elif ${ARCH} == "powerpc64"
+NETTY_ARCH=	ppc_64
+.elif ${ARCH} == "sparc64"
+NETTY_ARCH=	sparc_64
+.else
+# Default to ${ARCH}
+NETTY_ARCH=	${ARCH}
+.endif
+
+post-extract:
+	(cd ${WRKSRC} && \
+		${JAR} xf jar/netty-transport-native-kqueue-${PORTVERSION}.Final-sources.jar)
+	(cd ${WRKSRC} && \
+		${JAR} xf jar/netty-transport-native-unix-common-${PORTVERSION}.Final-sources.jar)
+	@${SED} -e 's!%%NETTY_ARCH%%!${NETTY_ARCH}!g' \
+		-e 's!%%JAVA_HOME%%!${JAVA_HOME}!g' \
+		${FILESDIR}/Makefile.in > ${WRKSRC}/Makefile
+
+pre-install:
+	@${MKDIR} ${WRKSRC}/jar/all-in-one/META-INF/native
+	@${MV} ${WRKSRC}/libnetty_transport_native_kqueue*.so \
+		${WRKSRC}/jar/all-in-one/META-INF/native/
+	@(cd ${WRKSRC}/jar/all-in-one && ${JAR} uvf ${PORTNAME}-all-${PORTVERSION}.Final.jar META-INF/native/libnetty_transport_native_kqueue*.so)
+
 do-install:
 	@${MKDIR} ${STAGEDIR}${JAVAJARDIR}
 	${INSTALL_DATA} ${WRKSRC}/jar/all-in-one/${PORTNAME}-all-${PORTVERSION}.Final.jar ${STAGEDIR}${JAVAJARDIR}/${PORTNAME}-${PORTVERSION}.jar
@@ -47,4 +85,4 @@ do-install:
 	${INSTALL_MAN} ${WRKSRC}/${FILE} ${STAGEDIR}${DOCSDIR}
 .endfor
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>

Added: head/java/netty/files/Makefile.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/java/netty/files/Makefile.in	Tue Sep 24 01:49:46 2019	(r512693)
@@ -0,0 +1,8 @@
+# $FreeBSD$
+
+SHLIB_NAME=	libnetty_transport_native_kqueue_%%NETTY_ARCH%%.so
+SRCS!=	ls *.c
+INCS!=	ls *.h
+CFLAGS+=	-I%%JAVA_HOME%%/include -I%%JAVA_HOME%%/include/freebsd
+
+.include <bsd.lib.mk>



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