Gentoo Archives: gentoo-commits

From: Jeroen Roovers <jer@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/flow-tools/files/, net-analyzer/flow-tools/
Date: Thu, 03 Sep 2020 07:31:29
Message-Id: 1599118280.8d6ed17600ee9557ea5393542419bd637d2585fd.jer@gentoo
1 commit: 8d6ed17600ee9557ea5393542419bd637d2585fd
2 Author: Jeroen Roovers <jer <AT> gentoo <DOT> org>
3 AuthorDate: Thu Sep 3 07:29:24 2020 +0000
4 Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org>
5 CommitDate: Thu Sep 3 07:31:20 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8d6ed176
7
8 net-analyzer/flow-tools: Version 0.68.6
9
10 Package-Manager: Portage-3.0.5, Repoman-3.0.1
11 Closes: https://bugs.gentoo.org/665940
12 Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org>
13
14 net-analyzer/flow-tools/Manifest | 1 +
15 .../files/flow-tools-0.68.5.1-fno-common.patch | 4 +-
16 .../files/flow-tools-0.68.5.1-openssl11.patch | 5 +-
17 .../flow-tools/files/flow-tools-0.68.6-mysql.patch | 15 ++++
18 net-analyzer/flow-tools/flow-tools-0.68.6.ebuild | 89 ++++++++++++++++++++++
19 5 files changed, 109 insertions(+), 5 deletions(-)
20
21 diff --git a/net-analyzer/flow-tools/Manifest b/net-analyzer/flow-tools/Manifest
22 index 946ffc26dc2..11214dc160a 100644
23 --- a/net-analyzer/flow-tools/Manifest
24 +++ b/net-analyzer/flow-tools/Manifest
25 @@ -1 +1,2 @@
26 DIST flow-tools-0.68.5.1.tar.bz2 914062 BLAKE2B 8a987c1aac53a1370045ab118888c51ce2de7b8db4074432e86e701153469163870cf1cf9da9e2267ed934d240de4b4bf2391b4681012b82db7e4205207b7fa4 SHA512 ae17ba39854daa8ef3deecd3a554bb6d1fa47648cb791d8225a40bec13f65bf0692871660b2c3490d133b1251875c323d066bb0c0483eceb0707cec9b7714c57
27 +DIST flow-tools-0.68.6.tar.gz 1078778 BLAKE2B 8a6179e44f2efa90bb2c3ace73bfbb8a928c1d7aabc8f47a778ca7361a92c13f2df168194bdd9c489c175079c1bd977f6ad9852711a62d99649d1f44609d746b SHA512 fc3d0650ace93ec2180340624648b5967fd7f094900f8409e751b439eb659c9623e2ee55effeb74164ec6b15f0a1edd8ed7735ccfacfd72af08e9c5c0d65b740
28
29 diff --git a/net-analyzer/flow-tools/files/flow-tools-0.68.5.1-fno-common.patch b/net-analyzer/flow-tools/files/flow-tools-0.68.5.1-fno-common.patch
30 index 14623fa93f3..1f746491996 100644
31 --- a/net-analyzer/flow-tools/files/flow-tools-0.68.5.1-fno-common.patch
32 +++ b/net-analyzer/flow-tools/files/flow-tools-0.68.5.1-fno-common.patch
33 @@ -1,5 +1,5 @@
34 ---- ./src/acl2.h
35 -+++ ./src/acl2.h
36 +--- a/src/acl2.h
37 ++++ b/src/acl2.h
38 @@ -48,7 +48,7 @@
39 #define ACL_TYPE_STD 1
40 #define ACL_TYPE_EXT 2
41
42 diff --git a/net-analyzer/flow-tools/files/flow-tools-0.68.5.1-openssl11.patch b/net-analyzer/flow-tools/files/flow-tools-0.68.5.1-openssl11.patch
43 index c6b17743ce9..686d40ab807 100644
44 --- a/net-analyzer/flow-tools/files/flow-tools-0.68.5.1-openssl11.patch
45 +++ b/net-analyzer/flow-tools/files/flow-tools-0.68.5.1-openssl11.patch
46 @@ -1,6 +1,5 @@
47 -diff -Nuar --exclude '*~' flow-tools-0.68.5.1.orig/lib/ftxlate.c flow-tools-0.68.5.1/lib/ftxlate.c
48 ---- flow-tools-0.68.5.1.orig/lib/ftxlate.c 2008-01-27 12:48:49.000000000 -0800
49 -+++ flow-tools-0.68.5.1/lib/ftxlate.c 2018-12-29 15:18:33.739062317 -0800
50 +--- a/lib/ftxlate.c
51 ++++ b/lib/ftxlate.c
52 @@ -34,6 +34,14 @@
53 #include <openssl/ssl.h>
54 #include <openssl/evp.h>
55
56 diff --git a/net-analyzer/flow-tools/files/flow-tools-0.68.6-mysql.patch b/net-analyzer/flow-tools/files/flow-tools-0.68.6-mysql.patch
57 new file mode 100644
58 index 00000000000..a270567fc20
59 --- /dev/null
60 +++ b/net-analyzer/flow-tools/files/flow-tools-0.68.6-mysql.patch
61 @@ -0,0 +1,15 @@
62 +--- a/configure.ac
63 ++++ b/configure.ac
64 +@@ -62,11 +62,9 @@
65 + if test "x$WHERE_MYSQL" != "x"; then
66 + old_LIBS="$LIBS"
67 + old_LDFLAGS="$LDFLAGS"
68 +- LDFLAGS="$LDFLAGS -L$WHERE_MYSQL/lib/mysql"
69 +- AC_CHECK_LIB(mysqlclient, my_init,
70 ++ AC_CHECK_LIB(mysqlclient, mysql_init,
71 + [
72 + MYSQLCFLAGS="-I$WHERE_MYSQL/include/mysql"
73 +- MYSQLLDFLAGS="-L$WHERE_MYSQL/lib/mysql"
74 + MYSQLLIB="-lmysqlclient"
75 + AC_DEFINE(HAVE_MYSQL, 1, [Do we have to build MySQL support])
76 + ]
77
78 diff --git a/net-analyzer/flow-tools/flow-tools-0.68.6.ebuild b/net-analyzer/flow-tools/flow-tools-0.68.6.ebuild
79 new file mode 100644
80 index 00000000000..85002e28287
81 --- /dev/null
82 +++ b/net-analyzer/flow-tools/flow-tools-0.68.6.ebuild
83 @@ -0,0 +1,89 @@
84 +# Copyright 1999-2020 Gentoo Authors
85 +# Distributed under the terms of the GNU General Public License v2
86 +
87 +EAPI=7
88 +inherit autotools user
89 +
90 +DESCRIPTION="library and programs to process reports from NetFlow data"
91 +HOMEPAGE="https://github.com/5u623l20/flow-tools/"
92 +SRC_URI="https://github.com/5u623l20/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
93 +
94 +LICENSE="BSD GPL-3"
95 +SLOT="0"
96 +KEYWORDS="~amd64 ~ppc ~x86"
97 +IUSE="debug libressl mysql postgres ssl static-libs"
98 +
99 +RDEPEND="
100 + sys-apps/tcp-wrappers
101 + sys-libs/zlib
102 + mysql? ( dev-db/mysql-connector-c:0= )
103 + postgres? ( dev-db/postgresql:* )
104 + ssl? (
105 + !libressl? ( dev-libs/openssl:0= )
106 + libressl? ( dev-libs/libressl:0= )
107 + )
108 +"
109 +DEPEND="
110 + ${RDEPEND}
111 +"
112 +BDEPEND="
113 + app-text/docbook2X
114 + sys-devel/bison
115 + sys-devel/flex
116 +"
117 +DOCS=( ChangeLog.old README README.fork SECURITY TODO TODO.old )
118 +PATCHES=(
119 + "${FILESDIR}"/${PN}-0.68.5.1-run.patch
120 + "${FILESDIR}"/${PN}-0.68.5.1-openssl11.patch
121 + "${FILESDIR}"/${PN}-0.68.5.1-fno-common.patch
122 + "${FILESDIR}"/${PN}-0.68.6-mysql.patch
123 +)
124 +
125 +pkg_douser() {
126 + enewgroup flows
127 + enewuser flows -1 -1 /var/lib/flows flows
128 +}
129 +
130 +pkg_setup() {
131 + pkg_douser
132 +}
133 +
134 +src_prepare() {
135 + default
136 + sed -i -e 's|docbook-to-man|docbook2man|g' docs/Makefile.am || die
137 + eautoreconf
138 +}
139 +
140 +src_configure() {
141 + econf \
142 + $(use_enable static-libs static) \
143 + $(usex mysql --with-mysql '') \
144 + $(usex postgres --with-postgresql=yes --with-postgresql=no) \
145 + $(usex ssl --with-openssl '') \
146 + --sysconfdir=/etc/flow-tools
147 +}
148 +
149 +src_install() {
150 + default
151 +
152 + exeinto /var/lib/flows/bin
153 + doexe "${FILESDIR}"/linkme
154 +
155 + keepdir /var/lib/flows/ft
156 +
157 + newinitd "${FILESDIR}/flowcapture.initd" flowcapture
158 + newconfd "${FILESDIR}/flowcapture.confd" flowcapture
159 +
160 + fowners flows:flows /var/lib/flows
161 + fowners flows:flows /var/lib/flows/bin
162 + fowners flows:flows /var/lib/flows/ft
163 +
164 + fperms 0755 /var/lib/flows
165 + fperms 0755 /var/lib/flows/bin
166 +
167 + find "${ED}" -name '*.la' -delete || die
168 +}
169 +
170 +pkg_preinst() {
171 + pkg_douser
172 +}