From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 0E9D6158086 for ; Mon, 3 Jan 2022 11:23:18 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1D25AE07A5; Mon, 3 Jan 2022 11:23:11 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 1AAE1E07A5 for ; Mon, 3 Jan 2022 11:23:07 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 9D31A342F07 for ; Mon, 3 Jan 2022 11:23:05 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id BED47219 for ; Mon, 3 Jan 2022 11:23:03 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1641208880.fa4c91dd460e1604ec58cc6b3531e8170812da3f.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-libs/nDPI/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-libs/nDPI/Manifest net-libs/nDPI/nDPI-4.0.ebuild net-libs/nDPI/nDPI-9999.ebuild X-VCS-Directories: net-libs/nDPI/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: fa4c91dd460e1604ec58cc6b3531e8170812da3f X-VCS-Branch: master Date: Mon, 3 Jan 2022 11:23:03 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: e2b54c91-6d2e-48f8-ae69-8ea7e2784bbf X-Archives-Hash: 8039b36d83ef7928a04af56ef60727ca commit: fa4c91dd460e1604ec58cc6b3531e8170812da3f Author: Sam James gentoo org> AuthorDate: Mon Jan 3 10:50:06 2022 +0000 Commit: Sam James gentoo org> CommitDate: Mon Jan 3 11:21:20 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fa4c91dd 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 gmail.com> Signed-off-by: Sam James gentoo.org> net-libs/nDPI/Manifest | 2 ++ net-libs/nDPI/nDPI-4.0.ebuild | 59 ++++++++++++++++++++++++++++++++++++ net-libs/nDPI/nDPI-9999.ebuild | 68 ++++++++++++++++++++---------------------- 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 }