commit: ca93e2eb53b395caade4cebcee1196ede7a1dc39 Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Sun Feb 16 12:25:45 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Sun Feb 16 12:25:49 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ca93e2eb
net-analyzer/ngrep: add 1.47_p20241209 Was going to backport the C23 commit from master but the bundled regex is broken yet is built unconditionally because of both: a) a line in the ebuild, b) broken build system. So take a snapshot as Fedora did to fix that and a bunch of other issues. Closes: https://bugs.gentoo.org/943951 Signed-off-by: Sam James <sam <AT> gentoo.org> net-analyzer/ngrep/Manifest | 1 + net-analyzer/ngrep/ngrep-1.47_p20241209.ebuild | 61 ++++++++++++++++++++++++++ 2 files changed, 62 insertions(+) diff --git a/net-analyzer/ngrep/Manifest b/net-analyzer/ngrep/Manifest index 91890d8138fb..bafc32944b7a 100644 --- a/net-analyzer/ngrep/Manifest +++ b/net-analyzer/ngrep/Manifest @@ -1 +1,2 @@ DIST ngrep-1.47.tar.gz 187067 BLAKE2B 4fa47ed343b88e84fb5a3ab6e4dc8139cb008ffcbea901a67664335ad76d36e975e037620cebb1b204ba22e5b139e822c7cfbc74a061fc6cacae631be3f87a52 SHA512 47ba65878df6b555701c866721a8a935eabdcce636d398284cbfe5f63baf68c62d994a2f373ea4fc8f44fbed3eecee149f2ee48d39c71c04d34e5a088db8c657 +DIST ngrep-1.47_p20241209.gh.tar.gz 187290 BLAKE2B 4a58268a75b40ab31014de4bac48a6078090e99afea157e4794893d67d9496bf0e82f3930a7e2e26db9d86fc90eeabccd60356b2b0581f47b12c3cf5f300b567 SHA512 4c555ddb7e5427350f2767f45553565b07b312899139b4d6d9001470ee57ce890072d15ea0523c48b775d5196b498f06a5a3fe9a307eaa3d73416b2a9ab2dc81 diff --git a/net-analyzer/ngrep/ngrep-1.47_p20241209.ebuild b/net-analyzer/ngrep/ngrep-1.47_p20241209.ebuild new file mode 100644 index 000000000000..7e4c82ae6335 --- /dev/null +++ b/net-analyzer/ngrep/ngrep-1.47_p20241209.ebuild @@ -0,0 +1,61 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools + +DESCRIPTION="A grep for network layers" +HOMEPAGE="https://github.com/jpr5/ngrep" +if [[ ${PV} == *_p* ]] ; then + NGREP_COMMIT="b2e3ba3c5a593abf203e65a407c3a9de0f998d4a" + SRC_URI="https://github.com/jpr5/ngrep/archive/${NGREP_COMMIT}.tar.gz -> ${P}.gh.tar.gz" + S="${WORKDIR}"/${PN}-${NGREP_COMMIT} +else + SRC_URI="https://github.com/jpr5/ngrep/archive/V${PV/./_}.tar.gz -> ${P}.tar.gz" + S="${WORKDIR}/${P/./_}" +fi + +LICENSE="ngrep" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos" +IUSE="ipv6" + +DEPEND=" + dev-libs/libpcre + net-libs/libpcap +" +RDEPEND=" + ${DEPEND} + acct-group/ngrep + acct-user/ngrep +" + +PATCHES=( + "${FILESDIR}"/${PN}-1.47-regex.patch + "${FILESDIR}"/${PN}-1.47-clang16.patch +) + +src_prepare() { + default + + sed -i -e "s:configure.in:configure.ac:" regex*/{configure.in,Makefile.in} || die + + eautoreconf +} + +src_configure() { + local myeconfargs=( + $(use_enable ipv6) + --disable-pcap-restart + --enable-pcre + --with-dropprivs-user=ngrep + --with-pcap-includes="${EPREFIX}"/usr/include/pcap + ) + + econf "${myeconfargs[@]}" +} + +src_compile() { + emake STRIPFLAG="${CFLAGS}" +}
