1 |
commit: 09820b316c5ffe7ca4ef801fd1481fe967bef5b3 |
2 |
Author: Jeroen Roovers <jer <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Aug 20 13:04:08 2020 +0000 |
4 |
Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Aug 20 13:06:18 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=09820b31 |
7 |
|
8 |
net-analyzer/flowgrind: Fix building with CFLAGS=-fno-common |
9 |
|
10 |
https://github.com/flowgrind/flowgrind/pull/227 |
11 |
|
12 |
Package-Manager: Portage-3.0.4, Repoman-3.0.1 |
13 |
Closes: https://bugs.gentoo.org/738186 |
14 |
Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org> |
15 |
|
16 |
.../files/flowgrind-0.8.0-fno-common.patch | 36 ++++++++++++++++ |
17 |
net-analyzer/flowgrind/flowgrind-0.8.0-r1.ebuild | 49 ++++++++++++++++++++++ |
18 |
2 files changed, 85 insertions(+) |
19 |
|
20 |
diff --git a/net-analyzer/flowgrind/files/flowgrind-0.8.0-fno-common.patch b/net-analyzer/flowgrind/files/flowgrind-0.8.0-fno-common.patch |
21 |
new file mode 100644 |
22 |
index 00000000000..60835b85881 |
23 |
--- /dev/null |
24 |
+++ b/net-analyzer/flowgrind/files/flowgrind-0.8.0-fno-common.patch |
25 |
@@ -0,0 +1,36 @@ |
26 |
+--- a/src/daemon.c |
27 |
++++ b/src/daemon.c |
28 |
+@@ -86,6 +86,10 @@ |
29 |
+ |
30 |
+ int daemon_pipe[2]; |
31 |
+ |
32 |
++pthread_t daemon_thread; |
33 |
++char *dump_prefix; |
34 |
++char *dump_dir; |
35 |
++ |
36 |
+ pthread_mutex_t mutex; |
37 |
+ struct request *requests = 0, *requests_last = 0; |
38 |
+ |
39 |
+--- a/src/daemon.h |
40 |
++++ b/src/daemon.h |
41 |
+@@ -252,7 +252,7 @@ |
42 |
+ int num_flows; |
43 |
+ }; |
44 |
+ |
45 |
+-pthread_t daemon_thread; |
46 |
++extern pthread_t daemon_thread; |
47 |
+ |
48 |
+ /* Through this pipe we wakeup the thread from select */ |
49 |
+ extern int daemon_pipe[2]; |
50 |
+@@ -268,9 +268,8 @@ |
51 |
+ * large a reply can get */ |
52 |
+ struct report* get_reports(int *has_more); |
53 |
+ |
54 |
+-/* FIXME: shouldn't be global? */ |
55 |
+-char *dump_prefix; |
56 |
+-char *dump_dir; |
57 |
++extern char *dump_prefix; |
58 |
++extern char *dump_dir; |
59 |
+ |
60 |
+ void *daemon_main(void* ptr); |
61 |
+ void add_report(struct report* report); |
62 |
|
63 |
diff --git a/net-analyzer/flowgrind/flowgrind-0.8.0-r1.ebuild b/net-analyzer/flowgrind/flowgrind-0.8.0-r1.ebuild |
64 |
new file mode 100644 |
65 |
index 00000000000..2c2e1839abf |
66 |
--- /dev/null |
67 |
+++ b/net-analyzer/flowgrind/flowgrind-0.8.0-r1.ebuild |
68 |
@@ -0,0 +1,49 @@ |
69 |
+# Copyright 1999-2020 Gentoo Authors |
70 |
+# Distributed under the terms of the GNU General Public License v2 |
71 |
+ |
72 |
+EAPI=7 |
73 |
+ |
74 |
+DESCRIPTION="Network performance measurement tool" |
75 |
+HOMEPAGE="http://flowgrind.net/ https://github.com/flowgrind/flowgrind/" |
76 |
+SRC_URI="https://github.com/${PN}/${PN}/releases/download/${P}/${P}.tar.bz2" |
77 |
+ |
78 |
+LICENSE="GPL-3" |
79 |
+SLOT="0" |
80 |
+KEYWORDS="~amd64 ~x86" |
81 |
+IUSE="debug doc gsl pcap" |
82 |
+ |
83 |
+RDEPEND=" |
84 |
+ dev-libs/xmlrpc-c[abyss,curl] |
85 |
+ sys-apps/util-linux |
86 |
+ gsl? ( sci-libs/gsl ) |
87 |
+ pcap? ( net-libs/libpcap ) |
88 |
+" |
89 |
+DEPEND=" |
90 |
+ ${RDEPEND} |
91 |
+" |
92 |
+BDEPEND=" |
93 |
+ doc? ( app-doc/doxygen ) |
94 |
+" |
95 |
+PATCHES=( |
96 |
+ "${FILESDIR}"/${PN}-0.8.0-fno-common.patch |
97 |
+) |
98 |
+ |
99 |
+src_configure() { |
100 |
+ econf \ |
101 |
+ $(use_enable debug) \ |
102 |
+ $(use_with doc doxygen) \ |
103 |
+ $(use_with gsl) \ |
104 |
+ $(use_with pcap) |
105 |
+} |
106 |
+ |
107 |
+src_compile() { |
108 |
+ default |
109 |
+ |
110 |
+ use doc && emake html |
111 |
+} |
112 |
+ |
113 |
+src_install() { |
114 |
+ default |
115 |
+ |
116 |
+ use doc && dodoc -r doc/html |
117 |
+} |