summaryrefslogtreecommitdiff
path: root/net-libs/nDPI/nDPI-9999.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-01-04 01:27:12 +0000
committerV3n3RiX <venerix@koprulu.sector>2022-01-04 01:27:12 +0000
commit3517852e3b8a68d1e997770fc0650c5053bafc6c (patch)
tree44068672445b1418489aed82de58df3c470289e7 /net-libs/nDPI/nDPI-9999.ebuild
parent0f15659d48c193027158492acb726297501202c5 (diff)
gentoo resync : 04.01.2022
Diffstat (limited to 'net-libs/nDPI/nDPI-9999.ebuild')
-rw-r--r--net-libs/nDPI/nDPI-9999.ebuild68
1 files changed, 32 insertions, 36 deletions
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
}