1 |
commit: 279adbeeec72611d631ceb9d24de1675c93bcef4 |
2 |
Author: Jeroen Roovers <jer <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Dec 28 11:34:26 2019 +0000 |
4 |
Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Dec 28 11:45:38 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=279adbee |
7 |
|
8 |
net-analyzer/pmacct: Fix building against >=nDPI-3.0 |
9 |
|
10 |
Package-Manager: Portage-2.3.84, Repoman-2.3.20 |
11 |
Closes: https://bugs.gentoo.org/704072 |
12 |
Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org> |
13 |
|
14 |
.../pmacct/files/pmacct-1.7.3-nDPI-3.0.patch | 28 ++++++++++++++++++++++ |
15 |
...{pmacct-1.7.3.ebuild => pmacct-1.7.3-r1.ebuild} | 12 ++++++++-- |
16 |
2 files changed, 38 insertions(+), 2 deletions(-) |
17 |
|
18 |
diff --git a/net-analyzer/pmacct/files/pmacct-1.7.3-nDPI-3.0.patch b/net-analyzer/pmacct/files/pmacct-1.7.3-nDPI-3.0.patch |
19 |
new file mode 100644 |
20 |
index 00000000000..3cffef25862 |
21 |
--- /dev/null |
22 |
+++ b/net-analyzer/pmacct/files/pmacct-1.7.3-nDPI-3.0.patch |
23 |
@@ -0,0 +1,28 @@ |
24 |
+--- a/./configure.ac |
25 |
++++ b/./configure.ac |
26 |
+@@ -955,6 +955,7 @@ |
27 |
+ CFLAGS="$_save_CFLAGS" |
28 |
+ ]) |
29 |
+ PKG_CHECK_MODULES([NDPI26], [libndpi >= 2.6], [AC_DEFINE(WITH_NDPI26, 1)], [AC_DEFINE(WITH_NDPI, 1)]) |
30 |
++ PKG_CHECK_MODULES([NDPI30], [libndpi >= 3.0], [AC_DEFINE(WITH_NDPI30, 1)], [AC_DEFINE(WITH_NDPI, 1)]) |
31 |
+ ;; |
32 |
+ no) |
33 |
+ AC_MSG_RESULT(no) |
34 |
+--- a/./src/ndpi/ndpi.c |
35 |
++++ b/./src/ndpi/ndpi.c |
36 |
+@@ -374,10 +374,14 @@ |
37 |
+ if (flow->detection_completed || flow->tcp_finished) { |
38 |
+ if (flow->detected_protocol.app_protocol == NDPI_PROTOCOL_UNKNOWN) |
39 |
+ #ifdef WITH_NDPI26 |
40 |
++#ifdef WITH_NDPI30 |
41 |
++ flow->detected_protocol = ndpi_detection_giveup(workflow->ndpi_struct, flow->ndpi_flow, 1, workflow->prefs.protocol_guess); |
42 |
++#else |
43 |
+ flow->detected_protocol = ndpi_detection_giveup(workflow->ndpi_struct, flow->ndpi_flow, workflow->prefs.protocol_guess); |
44 |
++#endif /* WITH_NDPI30 */ |
45 |
+ #else |
46 |
+ flow->detected_protocol = ndpi_detection_giveup(workflow->ndpi_struct, flow->ndpi_flow); |
47 |
+-#endif |
48 |
++#endif /* WITH_NDPI26 */ |
49 |
+ |
50 |
+ if (workflow->prefs.protocol_guess) { |
51 |
+ if (flow->detected_protocol.app_protocol == NDPI_PROTOCOL_UNKNOWN && !flow->guess_completed) { |
52 |
|
53 |
diff --git a/net-analyzer/pmacct/pmacct-1.7.3.ebuild b/net-analyzer/pmacct/pmacct-1.7.3-r1.ebuild |
54 |
similarity index 92% |
55 |
rename from net-analyzer/pmacct/pmacct-1.7.3.ebuild |
56 |
rename to net-analyzer/pmacct/pmacct-1.7.3-r1.ebuild |
57 |
index 5887b587804..33e50e3e831 100644 |
58 |
--- a/net-analyzer/pmacct/pmacct-1.7.3.ebuild |
59 |
+++ b/net-analyzer/pmacct/pmacct-1.7.3-r1.ebuild |
60 |
@@ -2,7 +2,7 @@ |
61 |
# Distributed under the terms of the GNU General Public License v2 |
62 |
|
63 |
EAPI=7 |
64 |
-inherit flag-o-matic toolchain-funcs |
65 |
+inherit autotools flag-o-matic toolchain-funcs |
66 |
|
67 |
DESCRIPTION="A network tool to gather IP traffic information" |
68 |
HOMEPAGE="http://www.pmacct.net/" |
69 |
@@ -32,7 +32,7 @@ RDEPEND=" |
70 |
<dev-libs/mongo-c-driver-0.98 |
71 |
) |
72 |
mysql? ( dev-db/mysql-connector-c:0= ) |
73 |
- ndpi? ( net-libs/nDPI ) |
74 |
+ ndpi? ( net-libs/nDPI:= ) |
75 |
nflog? ( net-libs/libnetfilter_log ) |
76 |
postgres? ( dev-db/postgresql:* ) |
77 |
rabbitmq? ( net-libs/rabbitmq-c ) |
78 |
@@ -43,12 +43,20 @@ DEPEND=" |
79 |
${RDEPEND} |
80 |
virtual/pkgconfig |
81 |
" |
82 |
+PATCHES=( |
83 |
+ "${FILESDIR}"/${PN}-1.7.3-nDPI-3.0.patch |
84 |
+) |
85 |
|
86 |
DOCS=( |
87 |
CONFIG-KEYS ChangeLog FAQS QUICKSTART UPGRADE |
88 |
docs/INTERNALS docs/PLUGINS docs/SIGNALS |
89 |
) |
90 |
|
91 |
+src_prepare() { |
92 |
+ default |
93 |
+ eautoreconf |
94 |
+} |
95 |
+ |
96 |
src_configure() { |
97 |
tc-export CC AR RANLIB |
98 |
append-cppflags -DMYSQL_SERVER_VERSION=99999999 |