summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Roovers <jer@gentoo.org>2017-06-12 07:05:28 +0200
committerJeroen Roovers <jer@gentoo.org>2017-06-12 07:05:28 +0200
commit1a8093ef0cb386b7c80d1fe759b398c03d2cdc74 (patch)
treecd7f25c3aa398c0b2bf736f3d6b9832c109e5b43 /net-libs/libprotoident
parentnet-analyzer/mtr: Old. (diff)
downloadgentoo-1a8093ef0cb386b7c80d1fe759b398c03d2cdc74.tar.gz
gentoo-1a8093ef0cb386b7c80d1fe759b398c03d2cdc74.tar.bz2
gentoo-1a8093ef0cb386b7c80d1fe759b398c03d2cdc74.zip
net-libs/libprotoident: Add live ebuild.
Package-Manager: Portage-2.3.6, Repoman-2.3.2
Diffstat (limited to 'net-libs/libprotoident')
-rw-r--r--net-libs/libprotoident/files/libprotoident-9999-lpi_find_unknown-snprintf.patch22
-rw-r--r--net-libs/libprotoident/libprotoident-9999.ebuild45
2 files changed, 67 insertions, 0 deletions
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
index 000000000000..2378c37b9b99
--- /dev/null
+++ b/net-libs/libprotoident/files/libprotoident-9999-lpi_find_unknown-snprintf.patch
@@ -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
index 000000000000..f7ea3930549e
--- /dev/null
+++ b/net-libs/libprotoident/libprotoident-9999.ebuild
@@ -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
+}