summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-01-03 10:50:06 +0000
committerSam James <sam@gentoo.org>2022-01-03 11:21:20 +0000
commitfa4c91dd460e1604ec58cc6b3531e8170812da3f (patch)
tree0818bff02428415f1dbfb696d04e5ba0ec8731c8 /net-libs
parentdev-java/ant-ivy: Stabilize 2.5.0 x86, #828134 (diff)
downloadgentoo-fa4c91dd460e1604ec58cc6b3531e8170812da3f.tar.gz
gentoo-fa4c91dd460e1604ec58cc6b3531e8170812da3f.tar.bz2
gentoo-fa4c91dd460e1604ec58cc6b3531e8170812da3f.zip
net-libs/nDPI: add 4.0
Includes a patch which adds an API to allow ntopong to work too. (Working on ar/other build system patches upstream.) Bug: https://bugs.gentoo.org/799782 Bug: https://bugs.gentoo.org/625730 Closes: https://bugs.gentoo.org/830403 Thanks-to: Larry Sexton <sexton.larry048@gmail.com> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-libs')
-rw-r--r--net-libs/nDPI/Manifest2
-rw-r--r--net-libs/nDPI/nDPI-4.0.ebuild59
-rw-r--r--net-libs/nDPI/nDPI-9999.ebuild68
3 files changed, 93 insertions, 36 deletions
diff --git a/net-libs/nDPI/Manifest b/net-libs/nDPI/Manifest
index 505e78a99b99..eae6568123c4 100644
--- a/net-libs/nDPI/Manifest
+++ b/net-libs/nDPI/Manifest
@@ -1 +1,3 @@
DIST nDPI-3.4.tar.gz 37976087 BLAKE2B 49e25586671a91278d90775c3dbc881ce4ca9ae4afd3108b1caff3b0d38251808bcd52ead253f451474195994fbf94658f70241acedb23c35a475df3b15c4a20 SHA512 ed5a22b6ddc14ad707a18a0bd96746c1df489969faaa42016fa9aad8d414fc4ee303b96cac15c3ba86f484a80a0aaa2dd1be5f92be672912e0e0d30da4bdad4c
+DIST nDPI-4.0-patches.tar.bz2 8744 BLAKE2B 48bfb2cf240823b64ab15a3f8a21acece878102ebb4cc807648b264ef091107a05d66fc672cccd1bc721ad3ea0edde786a1f133dfc84c91422604a9929e327ed SHA512 99a780c18c048ceec29c42828c420fe3f9624906eaef70f92af6abdbf7bc29133e048d7f8de85d8b73aa6667066e7ab5843fa293221d5ec8bbe87803dde83db6
+DIST nDPI-4.0.tar.gz 120053617 BLAKE2B ea0f333bd62622c1ab792137f9bbf2e35cb3790aae191c5caeaea36c7ce376bfa84633e99e321c16bcfbe5812d6674b825bdc4197297cee76064ed88f344a577 SHA512 2526041bc02a210e65bad31323a66167d79a37d14697cf4459054cc54715e53f9673b0000cefa6b452bbe3b3e6c25f0bafcf59d24323d210e2ce6782d9153f81
diff --git a/net-libs/nDPI/nDPI-4.0.ebuild b/net-libs/nDPI/nDPI-4.0.ebuild
new file mode 100644
index 000000000000..8516413b47eb
--- /dev/null
+++ b/net-libs/nDPI/nDPI-4.0.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools
+
+DESCRIPTION="Open Source Deep Packet Inspection Software Toolkit"
+HOMEPAGE="https://www.ntop.org/"
+if [[ ${PV} == 9999 ]] ; then
+ EGIT_REPO_URI="https://github.com/ntop/${PN}"
+ inherit git-r3
+else
+ SRC_URI="https://github.com/ntop/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+ SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-patches.tar.bz2"
+
+ KEYWORDS="~amd64 ~x86"
+fi
+
+LICENSE="LGPL-3+"
+SLOT="0/$(ver_cut 1)"
+
+DEPEND="dev-libs/json-c:=
+ dev-libs/libgcrypt:=
+ dev-libs/libgpg-error
+ net-libs/libpcap"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${WORKDIR}"/${P}-patches/
+)
+
+# Also sent a patch upstream https://github.com/ntop/nDPI/pull/1392 for
+# AR/CC etc but doesn't apply cleanly (at all) to 4.0.
+
+src_prepare() {
+ default
+
+ sed -i \
+ -e "s%^libdir\s*=\s*\${prefix}/lib\s*$%libdir = \${prefix}/$(get_libdir)%" \
+ src/lib/Makefile.in || die
+
+ eautoreconf
+}
+
+src_test() {
+ pushd tests || die
+
+ ./do.sh || die "Failed tests"
+ ./do-unit.sh || die "Failed unit tests"
+
+ popd || die
+}
+
+src_install() {
+ default
+
+ rm "${ED}/usr/$(get_libdir)"/lib${PN,,}.a || die
+}
diff --git a/net-libs/nDPI/nDPI-9999.ebuild b/net-libs/nDPI/nDPI-9999.ebuild
index bd4ac3459b84..ea288e57ec66 100644
--- a/net-libs/nDPI/nDPI-9999.ebuild
+++ b/net-libs/nDPI/nDPI-9999.ebuild
@@ -1,58 +1,54 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-inherit autotools git-r3
+inherit autotools
DESCRIPTION="Open Source Deep Packet Inspection Software Toolkit"
HOMEPAGE="https://www.ntop.org/"
-EGIT_REPO_URI="https://github.com/ntop/${PN}"
+if [[ ${PV} == 9999 ]] ; then
+ EGIT_REPO_URI="https://github.com/ntop/${PN}"
+ inherit git-r3
+else
+ SRC_URI="https://github.com/ntop/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
-LICENSE="GPL-3"
-SLOT="0"
-KEYWORDS=""
-IUSE="static-libs"
+ KEYWORDS="~amd64 ~x86"
+fi
-DEPEND="
- dev-libs/json-c:=
- net-libs/libpcap
-"
-RDEPEND="
- ${DEPEND}
-"
+LICENSE="LGPL-3+"
+SLOT="0/$(ver_cut 1)"
+
+DEPEND="dev-libs/json-c:=
+ dev-libs/libgcrypt:=
+ dev-libs/libgpg-error
+ net-libs/libpcap"
+RDEPEND="${DEPEND}"
+
+# Also sent a patch upstream https://github.com/ntop/nDPI/pull/1392 for
+# AR/CC etc but doesn't apply cleanly (at all) to 4.0.
src_prepare() {
- eval $(grep '^NDPI_MAJOR=' autogen.sh)
- eval $(grep '^NDPI_MINOR=' autogen.sh)
- eval $(grep '^NDPI_PATCH=' autogen.sh)
- NDPI_VERSION_SHORT="${NDPI_MAJOR}.${NDPI_MINOR}.${NDPI_PATCH}"
-
- sed \
- -e "s/@NDPI_MAJOR@/${NDPI_MAJOR}/g" \
- -e "s/@NDPI_MINOR@/${NDPI_MINOR}/g" \
- -e "s/@NDPI_PATCH@/${NDPI_PATCH}/g" \
- -e "s/@NDPI_VERSION_SHORT@/${NDPI_VERSION_SHORT}/g" \
- < "${S}/configure.seed" \
- > "${S}/configure.ac" || die
+ default
sed -i \
-e "s%^libdir\s*=\s*\${prefix}/lib\s*$%libdir = \${prefix}/$(get_libdir)%" \
src/lib/Makefile.in || die
- default
eautoreconf
+}
- # Taken from autogen.sh (bug #704074):
- sed -i \
- -e "s/#define PACKAGE/#define NDPI_PACKAGE/g" \
- -e "s/#define VERSION/#define NDPI_VERSION/g" \
- configure || die
+src_test() {
+ pushd tests || die
+
+ ./do.sh || die "Failed tests"
+ ./do-unit.sh || die "Failed unit tests"
+
+ popd || die
}
src_install() {
default
- if ! use static-libs; then
- rm "${D}"/usr/$(get_libdir)/lib${PN,,}.a || die
- fi
+
+ rm "${ED}/usr/$(get_libdir)"/lib${PN,,}.a || die
}