--- Makefile (revision 518511) +++ Makefile (working copy) @@ -3,10 +3,12 @@ PORTNAME= logstash PORTVERSION= 6.8.5 -PORTREVISION= 0 CATEGORIES= sysutils java -MASTER_SITES= http://artifacts.elastic.co/downloads/logstash/ +MASTER_SITES= http://artifacts.elastic.co/downloads/logstash/:logstash \ + https://github.com/netty/netty-tcnative/archive/:nettytcnative PKGNAMESUFFIX= 6 +DISTFILES= ${PORTNAME}-${PORTVERSION}${EXTRACT_SUFX}:logstash \ + netty-tcnative-parent-${NETTY_VERSION}.Final.tar.gz:nettytcnative MAINTAINER= elastic@FreeBSD.org COMMENT= Server-side data ingest and transfomation tool @@ -14,16 +16,19 @@ LICENSE= APACHE20 RUN_DEPENDS= ${LOCALBASE}/bin/bash:shells/bash +LIB_DEPENDS= libapr-1.so:devel/apr1 +USES= cpe shebangfix + CONFLICTS= logstash-[0-9]* logstash5-[0-9]* -USES= cpe shebangfix SHEBANG_FILES= bin/* CPE_VENDOR= elasticsearch USE_JAVA= yes JAVA_VERSION= 1.8+ JAVA_RUN= yes -NO_BUILD= yes +JAVA_BUILD= yes +BUILD_WRKSRC= ${WRKDIR}/netty-tcnative-netty-tcnative-parent-${NETTY_VERSION}.Final/openssl-dynamic/src/main/c USERS= logstash GROUPS= logstash @@ -34,6 +39,10 @@ LOGSTASH_HOME?= ${PREFIX}/${PORTNAME} +NETTY_VERSION= 2.0.12 +BEATS_VERSION= 5.1.9 +JRUBY_VERSION= 2.5.0 + SUB_LIST= JAVA_HOME=${JAVA_HOME} \ LOGSTASH_HOME=${LOGSTASH_HOME} @@ -43,10 +52,46 @@ LOGSTASH_JRUBY_BIN_FILES= ast gem irb jgem jirb jirb_swing jruby \ jruby.bash jruby.sh jrubyc rake rdoc ri testrb +.include + +.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 + +SUB_LIST+= NETTY_ARCH=${NETTY_ARCH} + post-patch: ${REINPLACE_CMD} 's|%%ETCDIR%%|${ETCDIR}|g' ${WRKSRC}/config/logstash.yml ${FIND} ${WRKSRC} -name '*.orig' -delete +post-configure: + ${SED} ${_SUB_LIST_TEMP} -e '/^@comment /d' ${FILESDIR}/Makefile.in > ${BUILD_WRKSRC}/Makefile + ${SED} ${_SUB_LIST_TEMP} -e '/^@comment /d' ${FILESDIR}/config.h.in > ${BUILD_WRKSRC}/config.h + +post-build: + ${MKDIR} ${WRKSRC}/vendor/bundle/jruby/${JRUBY_VERSION}/gems/logstash-input-beats-${BEATS_VERSION}-java/vendor/jar-dependencies/io/netty/netty-tcnative-boringssl-static/${NETTY_VERSION}.Final/META-INF/native + ${CP} ${BUILD_WRKSRC}/libnetty*.so ${WRKSRC}/vendor/bundle/jruby/${JRUBY_VERSION}/gems/logstash-input-beats-${BEATS_VERSION}-java/vendor/jar-dependencies/io/netty/netty-tcnative-boringssl-static/${NETTY_VERSION}.Final/META-INF/native + (cd ${WRKSRC}/vendor/bundle/jruby/${JRUBY_VERSION}/gems/logstash-input-beats-${BEATS_VERSION}-java/vendor/jar-dependencies/io/netty/netty-tcnative-boringssl-static/${NETTY_VERSION}.Final && ${JAR} uvf netty-tcnative-boringssl-static-${NETTY_VERSION}.Final.jar META-INF/native/libnetty*.so) + ${CP} ${WRKSRC}/vendor/bundle/jruby/${JRUBY_VERSION}/gems/logstash-input-beats-${BEATS_VERSION}-java/vendor/jar-dependencies/io/netty/netty-tcnative-boringssl-static/${NETTY_VERSION}.Final/netty-tcnative-boringssl-static-${NETTY_VERSION}.Final.jar ${WRKSRC}/vendor/bundle/jruby/${JRUBY_VERSION}/gems/logstash-input-http-3.3.0-java/vendor/jar-dependencies/io/netty/netty-tcnative-boringssl-static/${NETTY_VERSION}.Final/netty-tcnative-boringssl-static-${NETTY_VERSION}.Final.jar + ${RM} -rf ${WRKSRC}/vendor/bundle/jruby/${JRUBY_VERSION}/gems/logstash-input-beats-${BEATS_VERSION}-java/vendor/jar-dependencies/io/netty/netty-tcnative-boringssl-static/${NETTY_VERSION}.Final/META-INF + do-install: ${FIND} ${WRKSRC} -name '*.bat' -delete ${MKDIR} ${STAGEDIR}${ETCDIR} @@ -71,4 +116,4 @@ ${SED} -e 's#^${STAGEDIR}${PREFIX}/##' >> ${TMPPLIST} ${ECHO} "@dir(logstash,logstash,) logstash/data" >> ${TMPPLIST} -.include +.include --- distinfo (revision 518511) +++ distinfo (working copy) @@ -1,3 +1,5 @@ TIMESTAMP = 1574583674 SHA256 (logstash-6.8.5.tar.gz) = c67b4cbf4dd28ecf6580a2e31769855b56a38f9f4db507341e6ca27edd27656d SIZE (logstash-6.8.5.tar.gz) = 172214102 +SHA256 (netty-tcnative-parent-2.0.12.Final.tar.gz) = a2ac433be51308b07e6b0b9fdcb65b15ac323b9c1d8a306d614ee79ec1efec10 +SIZE (netty-tcnative-parent-2.0.12.Final.tar.gz) = 146650 --- files/Makefile.in (nonexistent) +++ files/Makefile.in (working copy) @@ -0,0 +1,26 @@ +# $FreeBSD$ + +APR_INCLUDES = `%%LOCALBASE%%/bin/apr-1-config --includes` +APR_CFLAGS = `%%LOCALBASE%%/bin/apr-1-config --cflags` +APR_LIBS = `%%LOCALBASE%%/bin/apr-1-config --libs` +APR_LDFLAGS = `%%LOCALBASE%%/bin/apr-1-config --link-ld` +SHLIB_NAME= libnetty_tcnative_freebsd_%%NETTY_ARCH%%.so +SRCS!= ls *.c +INCS!= ls *.h +CFLAGS+= -DHAVE_OPENSSL -I/usr/include/openssl $(APR_INCLUDES) -I%%JAVA_HOME%%/include -I%%JAVA_HOME%%/include/freebsd -D_LARGEFILE64_SOURCE $(APR_CFLAGS) -fvisibility=hidden +LDFLAGS+= -L/usr/lib -lssl -lcrypto $(APR_LDFLAGS) $(APR_LIBS) + +.include +# $FreeBSD$ + +APR_INCLUDES = `%%LOCALBASE%%/bin/apr-1-config --includes` +APR_CFLAGS = `%%LOCALBASE%%/bin/apr-1-config --cflags` +APR_LIBS = `%%LOCALBASE%%/bin/apr-1-config --libs` +APR_LDFLAGS = `%%LOCALBASE%%/bin/apr-1-config --link-ld` +SHLIB_NAME= libnetty_tcnative_freebsd_%%NETTY_ARCH%%.so +SRCS!= ls *.c +INCS!= ls *.h +CFLAGS+= -DHAVE_OPENSSL -I/usr/include/openssl $(APR_INCLUDES) -I%%JAVA_HOME%%/include -I%%JAVA_HOME%%/include/freebsd -D_LARGEFILE64_SOURCE $(APR_CFLAGS) -fvisibility=hidden +LDFLAGS+= -L/usr/lib -lssl -lcrypto $(APR_LDFLAGS) $(APR_LIBS) + +.include --- files/config.h.in (nonexistent) +++ files/config.h.in (working copy) @@ -0,0 +1,130 @@ +/* src/config.h. Generated from config.h.in by configure. */ +/* src/config.h.in. Generated from configure.ac by autoheader. */ + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define HAVE_OPENSSL_DSA */ +/* #undef HAVE_OPENSSL_DSA */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to the sub-directory where libtool stores uninstalled libraries. */ +#define LT_OBJDIR ".libs/" + +/* Name of package */ +#define PACKAGE "-project_name-" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "@PROJECT_NAME@" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "@PROJECT_NAME@ @VERSION@" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "-project_name-" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "@VERSION@" + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Version number of package */ +#define VERSION "freebsd_%%NETTY_ARCH%%" +/* src/config.h. Generated from config.h.in by configure. */ +/* src/config.h.in. Generated from configure.ac by autoheader. */ + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define HAVE_OPENSSL_DSA */ +/* #undef HAVE_OPENSSL_DSA */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to the sub-directory where libtool stores uninstalled libraries. */ +#define LT_OBJDIR ".libs/" + +/* Name of package */ +#define PACKAGE "-project_name-" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "@PROJECT_NAME@" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "@PROJECT_NAME@ @VERSION@" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "-project_name-" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "@VERSION@" + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Version number of package */ +#define VERSION "freebsd_%%NETTY_ARCH%%"