summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Roovers <jer@gentoo.org>2019-12-28 12:34:26 +0100
committerJeroen Roovers <jer@gentoo.org>2019-12-28 12:45:38 +0100
commit279adbeeec72611d631ceb9d24de1675c93bcef4 (patch)
treefa21ee645c3591170eaf625c255726b6f8d91cfe /net-analyzer/pmacct
parentapp-doc/doxygen: Fixed HOMEPAGE (diff)
downloadgentoo-279adbeeec72611d631ceb9d24de1675c93bcef4.tar.gz
gentoo-279adbeeec72611d631ceb9d24de1675c93bcef4.tar.bz2
gentoo-279adbeeec72611d631ceb9d24de1675c93bcef4.zip
net-analyzer/pmacct: Fix building against >=nDPI-3.0
Package-Manager: Portage-2.3.84, Repoman-2.3.20 Closes: https://bugs.gentoo.org/704072 Signed-off-by: Jeroen Roovers <jer@gentoo.org>
Diffstat (limited to 'net-analyzer/pmacct')
-rw-r--r--net-analyzer/pmacct/files/pmacct-1.7.3-nDPI-3.0.patch28
-rw-r--r--net-analyzer/pmacct/pmacct-1.7.3-r1.ebuild (renamed from net-analyzer/pmacct/pmacct-1.7.3.ebuild)12
2 files changed, 38 insertions, 2 deletions
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
new file mode 100644
index 000000000000..3cffef25862f
--- /dev/null
+++ b/net-analyzer/pmacct/files/pmacct-1.7.3-nDPI-3.0.patch
@@ -0,0 +1,28 @@
+--- a/./configure.ac
++++ b/./configure.ac
+@@ -955,6 +955,7 @@
+ CFLAGS="$_save_CFLAGS"
+ ])
+ PKG_CHECK_MODULES([NDPI26], [libndpi >= 2.6], [AC_DEFINE(WITH_NDPI26, 1)], [AC_DEFINE(WITH_NDPI, 1)])
++ PKG_CHECK_MODULES([NDPI30], [libndpi >= 3.0], [AC_DEFINE(WITH_NDPI30, 1)], [AC_DEFINE(WITH_NDPI, 1)])
+ ;;
+ no)
+ AC_MSG_RESULT(no)
+--- a/./src/ndpi/ndpi.c
++++ b/./src/ndpi/ndpi.c
+@@ -374,10 +374,14 @@
+ if (flow->detection_completed || flow->tcp_finished) {
+ if (flow->detected_protocol.app_protocol == NDPI_PROTOCOL_UNKNOWN)
+ #ifdef WITH_NDPI26
++#ifdef WITH_NDPI30
++ flow->detected_protocol = ndpi_detection_giveup(workflow->ndpi_struct, flow->ndpi_flow, 1, workflow->prefs.protocol_guess);
++#else
+ flow->detected_protocol = ndpi_detection_giveup(workflow->ndpi_struct, flow->ndpi_flow, workflow->prefs.protocol_guess);
++#endif /* WITH_NDPI30 */
+ #else
+ flow->detected_protocol = ndpi_detection_giveup(workflow->ndpi_struct, flow->ndpi_flow);
+-#endif
++#endif /* WITH_NDPI26 */
+
+ if (workflow->prefs.protocol_guess) {
+ if (flow->detected_protocol.app_protocol == NDPI_PROTOCOL_UNKNOWN && !flow->guess_completed) {
diff --git a/net-analyzer/pmacct/pmacct-1.7.3.ebuild b/net-analyzer/pmacct/pmacct-1.7.3-r1.ebuild
index 5887b587804d..33e50e3e8313 100644
--- a/net-analyzer/pmacct/pmacct-1.7.3.ebuild
+++ b/net-analyzer/pmacct/pmacct-1.7.3-r1.ebuild
@@ -2,7 +2,7 @@
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-inherit flag-o-matic toolchain-funcs
+inherit autotools flag-o-matic toolchain-funcs
DESCRIPTION="A network tool to gather IP traffic information"
HOMEPAGE="http://www.pmacct.net/"
@@ -32,7 +32,7 @@ RDEPEND="
<dev-libs/mongo-c-driver-0.98
)
mysql? ( dev-db/mysql-connector-c:0= )
- ndpi? ( net-libs/nDPI )
+ ndpi? ( net-libs/nDPI:= )
nflog? ( net-libs/libnetfilter_log )
postgres? ( dev-db/postgresql:* )
rabbitmq? ( net-libs/rabbitmq-c )
@@ -43,12 +43,20 @@ DEPEND="
${RDEPEND}
virtual/pkgconfig
"
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.7.3-nDPI-3.0.patch
+)
DOCS=(
CONFIG-KEYS ChangeLog FAQS QUICKSTART UPGRADE
docs/INTERNALS docs/PLUGINS docs/SIGNALS
)
+src_prepare() {
+ default
+ eautoreconf
+}
+
src_configure() {
tc-export CC AR RANLIB
append-cppflags -DMYSQL_SERVER_VERSION=99999999