net-libs/libprotoident: Add live ebuild.
authorJeroen Roovers <jer@gentoo.org>
Mon, 12 Jun 2017 05:05:28 +0000 (07:05 +0200)
committerJeroen Roovers <jer@gentoo.org>
Mon, 12 Jun 2017 05:05:28 +0000 (07:05 +0200)
Package-Manager: Portage-2.3.6, Repoman-2.3.2

net-libs/libprotoident/files/libprotoident-9999-lpi_find_unknown-snprintf.patch [new file with mode: 0644]
net-libs/libprotoident/libprotoident-9999.ebuild [new file with mode: 0644]

diff --git a/net-libs/libprotoident/files/libprotoident-9999-lpi_find_unknown-snprintf.patch b/net-libs/libprotoident/files/libprotoident-9999-lpi_find_unknown-snprintf.patch
new file mode 100644 (file)
index 0000000..2378c37
--- /dev/null
@@ -0,0 +1,22 @@
+--- a/tools/find_unknown/lpi_find_unknown.cc
++++ b/tools/find_unknown/lpi_find_unknown.cc
+@@ -219,7 +219,7 @@
+       dump_payload(ident->lpi, 0, pload_out, 500);
+       dump_payload(ident->lpi, 1, pload_in, 500);
+         str = (char *)malloc(750);
+-        snprintf(str, 1000, "%s %s %u %u %u %.3f %.3f %" PRIu64 " %" PRIu64 " %s %s\n",
++        snprintf(str, 750, "%s %s %u %u %u %.3f %.3f %" PRIu64 " %" PRIu64 " %s %s\n",
+                       s_ip, c_ip,
+                         f->id.get_server_port(), f->id.get_client_port(),
+                         f->id.get_protocol(), ident->start_ts,
+--- a/tools/protoident/lpi_protoident.cc
++++ b/tools/protoident/lpi_protoident.cc
+@@ -214,7 +214,7 @@
+       dump_payload(ident->lpi, 0, pload_out, 500);
+       dump_payload(ident->lpi, 1, pload_in, 500);
+         str = (char *)malloc(750);
+-        snprintf(str, 1000, "%s %s %s %u %u %u %.3f %.3f %" PRIu64 " %" PRIu64 " %s %s\n",
++        snprintf(str, 750, "%s %s %s %u %u %u %.3f %.3f %" PRIu64 " %" PRIu64 " %s %s\n",
+                       proto->name, s_ip, c_ip,
+                         f->id.get_server_port(), f->id.get_client_port(),
+                         f->id.get_protocol(), ident->start_ts,
diff --git a/net-libs/libprotoident/libprotoident-9999.ebuild b/net-libs/libprotoident/libprotoident-9999.ebuild
new file mode 100644 (file)
index 0000000..f7ea393
--- /dev/null
@@ -0,0 +1,45 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit autotools eutils git-r3
+
+DESCRIPTION="A library that performs application layer protocol identification for flows"
+HOMEPAGE="http://research.wand.net.nz/software/libprotoident.php"
+EGIT_REPO_URI="https://github.com/wanduow/libprotoident"
+EGIT_BRANCH="develop"
+
+LICENSE="LGPL-3+"
+SLOT="0/2"
+KEYWORDS=""
+IUSE="static-libs +tools"
+
+DEPEND="
+       >=net-libs/libtrace-3.0.9
+       tools? ( net-libs/libflowmanager )
+"
+RDEPEND="
+       ${DEPEND}
+"
+PATCHES=(
+       "${FILESDIR}"/${PN}-9999-lpi_find_unknown-snprintf.patch
+)
+
+src_prepare() {
+       default
+
+       sed -i -e '/-Werror/d' lib/Makefile.am || die
+
+       eautoreconf
+}
+
+src_configure() {
+       econf \
+               $(use_enable static-libs static) \
+               $(use_with tools)
+}
+
+src_install() {
+       default
+       prune_libtool_files
+}