commit:     61e6ac60c4a99110f68f02dbc16556e1a493b3d3
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 12 15:38:57 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Feb 12 15:39:02 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=61e6ac60

net-analyzer/tcpflow: restore package with 1.6.1 (python 3)

Closes: https://bugs.gentoo.org/735392
Package-Manager: Portage-3.0.14, Repoman-3.0.2
Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-analyzer/tcpflow/Manifest                      |  3 +
 .../files/tcpflow-1.5.0_alpha-libcapng.patch       | 13 +++++
 .../tcpflow/files/tcpflow-1.5.2-gentoo.patch       | 64 ++++++++++++++++++++++
 net-analyzer/tcpflow/metadata.xml                  | 11 ++++
 net-analyzer/tcpflow/tcpflow-1.6.1.ebuild          | 63 +++++++++++++++++++++
 5 files changed, 154 insertions(+)

diff --git a/net-analyzer/tcpflow/Manifest b/net-analyzer/tcpflow/Manifest
new file mode 100644
index 00000000000..2ca13347df5
--- /dev/null
+++ b/net-analyzer/tcpflow/Manifest
@@ -0,0 +1,3 @@
+DIST be13_api-20170924.tar.gz 75724 BLAKE2B 
a5257346b9c0740d9758543fe7772c960e1941735abefe4d24d347631b35d1511fde8eb5a58dbb2824c54e78ee0d686a2549ceea2c1dc91e05ef92899c8b3c2d
 SHA512 
5bf0d28f23df9436304245ccbdbf4af5b0f65e62b92e3039cfb9a70fe2056aa90dcce906db02f3df83fcf2a415c8a46f0f75468d48e13b15673d11c447a4c9c4
+DIST dfxml-20170921.tar.gz 163616 BLAKE2B 
17214d15596a136efb2afc7246ee0f5696620b5aac7c2d78e37764f51487ff816de5a7c0f59e7484d358a8cd8eab34841716970cd859f0ce868ac29c8532754c
 SHA512 
0885947aaf8efe639c13324413ef0cca49750027b48b434f226fb9fbfba494e84e245da879dc0d77b46bddc27798f7f5df12590fce47b096683034bbc61280e1
+DIST tcpflow-1.6.1.tar.gz 915502 BLAKE2B 
6560d11fe6a2b6bd77ddcffb47338e9af358a0f5ec07402ec81dae4cf87dd5cc26bf300df014927df8b8b6143e14553dd2a70cb63769dc4f2525cf9dd1967582
 SHA512 
ec5b9d5e5f0bc1d6582b9f2537c9ba6c8ae3d9c8f88fb0c67ef031146a515d19caa5ecd365492fb5daf8ddde77b58ea5190290b8e43b40abcdea5aaaef5e2e1c

diff --git a/net-analyzer/tcpflow/files/tcpflow-1.5.0_alpha-libcapng.patch 
b/net-analyzer/tcpflow/files/tcpflow-1.5.0_alpha-libcapng.patch
new file mode 100644
index 00000000000..b56144324c0
--- /dev/null
+++ b/net-analyzer/tcpflow/files/tcpflow-1.5.0_alpha-libcapng.patch
@@ -0,0 +1,13 @@
+--- a/src/tcpflow.cpp
++++ b/src/tcpflow.cpp
+@@ -30,6 +30,10 @@
+ #include <grp.h>
+ #endif
+ 
++#ifdef HAVE_CAP_NG_H
++#include <cap-ng.h>
++#endif
++
+ /* bring in inet_ntop if it is not present */
+ #define ETH_ALEN 6
+ #ifndef HAVE_INET_NTOP

diff --git a/net-analyzer/tcpflow/files/tcpflow-1.5.2-gentoo.patch 
b/net-analyzer/tcpflow/files/tcpflow-1.5.2-gentoo.patch
new file mode 100644
index 00000000000..e6748c01968
--- /dev/null
+++ b/net-analyzer/tcpflow/files/tcpflow-1.5.2-gentoo.patch
@@ -0,0 +1,64 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -30,7 +30,6 @@
+ AC_PROG_INSTALL
+ 
+ m4_include([m4/slg_searchdirs.m4])
+-m4_include([m4/slg_gcc_all_warnings.m4])
+ 
+ 
+ # use C++11 mode if available; HAVE_CXX11 is defined in config.h if so.  Don't
+@@ -402,7 +402,12 @@
+       AC_CHECK_HEADERS(cap-ng.h)
+ fi
+ 
+-
++################################################################
++# http-parser
++ 
++AC_CHECK_LIB(http_parser,http_parser_init,,
++  AC_MSG_ERROR([http-parser library not installed]))
++AC_CHECK_HEADERS(http_parser.h)
+ 
+ ################################################################
+ # Specify our other headers
+--- a/src/scan_http.cpp
++++ b/src/scan_http.cpp
+@@ -11,7 +11,11 @@
+ #include "tcpip.h"
+ #include "tcpdemux.h"
+ 
++#ifdef HAVE_HTTP_PARSER_H
++#include "http_parser.h"
++#else
+ #include "http-parser/http_parser.h"
++#endif
+ 
+ #include "mime_map.h"
+ 
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 793ec1a..ecac7a9 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -98,8 +98,6 @@ tcpflow_SOURCES = \
+       scan_netviz.cpp \
+       pcap_writer.h \
+       iptree.h \
+-      http-parser/http_parser.c \
+-      http-parser/http_parser.h \
+       mime_map.cpp \
+       mime_map.h
+ 
+@@ -110,12 +108,6 @@ tcpflow_SOURCES = \
+ EXTRA_DIST =\
+       inet_ntop.c \
+       inet_ntop.h \
+-      http-parser/AUTHORS \
+-      http-parser/CONTRIBUTIONS \
+-      http-parser/LICENSE-MIT \
+-      http-parser/Makefile \
+-      http-parser/README.md \
+-      http-parser/http_parser.gyp \
+       wifipcap/README.txt \
+       wifipcap/TimeVal.cpp \
+       wifipcap/TimeVal.h \

diff --git a/net-analyzer/tcpflow/metadata.xml 
b/net-analyzer/tcpflow/metadata.xml
new file mode 100644
index 00000000000..d0b78340e0f
--- /dev/null
+++ b/net-analyzer/tcpflow/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+       <maintainer type="project">
+               <email>net...@gentoo.org</email>
+               <name>Gentoo network monitoring and analysis project</name>
+       </maintainer>
+       <upstream>
+               <remote-id type="github">simsong/tcpflow</remote-id>
+       </upstream>
+</pkgmetadata>

diff --git a/net-analyzer/tcpflow/tcpflow-1.6.1.ebuild 
b/net-analyzer/tcpflow/tcpflow-1.6.1.ebuild
new file mode 100644
index 00000000000..7bd4f40e888
--- /dev/null
+++ b/net-analyzer/tcpflow/tcpflow-1.6.1.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7,8,9} )
+inherit autotools flag-o-matic python-single-r1
+
+# 1.6.1 wasn't tagged
+COMMIT="a5965b11a332fe908ab1ed136b14803920e8ecdb"
+DESCRIPTION="A tool for monitoring, capturing and storing TCP connections 
flows"
+HOMEPAGE="https://github.com/simsong/tcpflow";
+SRC_URI="
+       
https://api.github.com/repos/simsong/be13_api/tarball/c81521d768bb78499c069fcd7c47adc8eee0350c
 -> be13_api-20170924.tar.gz
+       
https://api.github.com/repos/simsong/dfxml/tarball/7d11eaa7da8d31f588ce8aecb4b4f5e7e8169ba6
 -> dfxml-20170921.tar.gz
+       https://github.com/simsong/tcpflow/archive/${COMMIT}.tar.gz -> 
${P}.tar.gz
+       https://github.com/simsong/${PN}/archive/${P/_/}.tar.gz
+"
+S="${WORKDIR}/${PN}-${COMMIT}"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~x86 ~amd64-linux ~x86-linux ~x64-macos"
+IUSE="cairo test"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+       ${PYTHON_DEPS}
+       dev-db/sqlite
+       dev-libs/boost:=
+       dev-libs/openssl:=
+       net-libs/http-parser:=
+       net-libs/libpcap
+       sys-libs/libcap-ng
+       sys-libs/zlib:=
+       cairo? (
+               x11-libs/cairo
+       )
+"
+DEPEND="
+       ${RDEPEND}
+       test? ( sys-apps/coreutils )
+"
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-1.5.0_alpha-libcapng.patch
+       "${FILESDIR}"/${PN}-1.5.2-gentoo.patch
+)
+
+src_prepare() {
+       default
+
+       eautoreconf
+}
+
+src_configure() {
+       append-cxxflags -fpermissive
+
+       econf \
+               $(usex cairo --enable-cairo=true --enable-cairo=false)
+}

Reply via email to