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
This commit is contained in:
parent
022ef33fc9
commit
b53a14ae3e
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=512693
2 changed files with 48 additions and 2 deletions
|
@ -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>
|
||||
|
|
8
java/netty/files/Makefile.in
Normal file
8
java/netty/files/Makefile.in
Normal file
|
@ -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>
|
Loading…
Reference in a new issue