diff options
author | 2022-01-03 10:50:06 +0000 | |
---|---|---|
committer | 2022-01-03 11:21:20 +0000 | |
commit | fa4c91dd460e1604ec58cc6b3531e8170812da3f (patch) | |
tree | 0818bff02428415f1dbfb696d04e5ba0ec8731c8 /net-libs/nDPI/nDPI-9999.ebuild | |
parent | dev-java/ant-ivy: Stabilize 2.5.0 x86, #828134 (diff) | |
download | gentoo-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/nDPI/nDPI-9999.ebuild')
-rw-r--r-- | net-libs/nDPI/nDPI-9999.ebuild | 68 |
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 } |