commit:     c002b02664b99fc197091567e9cc2529f9abdf05
Author:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Thu Aug  8 20:21:38 2019 +0000
Commit:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Thu Aug  8 20:22:09 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c002b026

net-analyzer/ngrep: Version 1.47

Package-Manager: Portage-2.3.71, Repoman-2.3.17
Fixes: https://bugs.gentoo.org/674926
Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org>

 net-analyzer/ngrep/Manifest                     |  1 +
 net-analyzer/ngrep/files/ngrep-1.47-regex.patch | 29 +++++++++++++
 net-analyzer/ngrep/ngrep-1.47.ebuild            | 55 +++++++++++++++++++++++++
 3 files changed, 85 insertions(+)

diff --git a/net-analyzer/ngrep/Manifest b/net-analyzer/ngrep/Manifest
index 2e33e7c1c6b..2e78bb72703 100644
--- a/net-analyzer/ngrep/Manifest
+++ b/net-analyzer/ngrep/Manifest
@@ -1 +1,2 @@
 DIST ngrep-1.45.tar.bz2 463361 BLAKE2B 
31f7828fb28197f06a583cd6d250b5d70bfbd2bc5dae657daaed3f7ea286aec4dff9cca449c72a3c27d8e8b30d861304872eaaaa11abc9eb71f2acc94d9fc9f2
 SHA512 
0feb4080f834449d57ae99897c573d2b8148711cfb550fa4ff415169dedb1f0d23f4b03f625660162ca72f8ad06e19874c1af46da6afd8f8fe8dd553558c14f7
+DIST ngrep-1.47.tar.gz 187067 BLAKE2B 
4fa47ed343b88e84fb5a3ab6e4dc8139cb008ffcbea901a67664335ad76d36e975e037620cebb1b204ba22e5b139e822c7cfbc74a061fc6cacae631be3f87a52
 SHA512 
47ba65878df6b555701c866721a8a935eabdcce636d398284cbfe5f63baf68c62d994a2f373ea4fc8f44fbed3eecee149f2ee48d39c71c04d34e5a088db8c657

diff --git a/net-analyzer/ngrep/files/ngrep-1.47-regex.patch 
b/net-analyzer/ngrep/files/ngrep-1.47-regex.patch
new file mode 100644
index 00000000000..613643cf0e6
--- /dev/null
+++ b/net-analyzer/ngrep/files/ngrep-1.47-regex.patch
@@ -0,0 +1,29 @@
+--- a/configure.in
++++ b/configure.in
+@@ -6,6 +6,7 @@
+ dnl NOTE: configure.in requires autoconf 2.57 or more recent.
+ 
+ AC_INIT(ngrep.c)
++AC_CONFIG_SUBDIRS([regex-0.12])
+ 
+ AC_MSG_RESULT
+ AC_MSG_RESULT(Configuring System ...)
+--- a/regex-0.12/Makefile.in
++++ b/regex-0.12/Makefile.in
+@@ -26,13 +26,13 @@
+ #   -DEXTRACT_MACROS to use the macros EXTRACT_* (as opposed to
+ #           the corresponding C procedures).  If not -DDEBUG, the macros
+ #           are used.
+-CPPFLAGS = 
++CPPFLAGS ?= 
+ 
+ # Likewise, you can override CFLAGS to optimize, use -Wall, etc.
+-CFLAGS = -g
++CFLAGS ?= -g
+ 
+ # Ditto for LDFLAGS and LOADLIBES.
+-LDFLAGS =
++LDFLAGS ?=
+ LOADLIBES =
+ 
+ srcdir = @srcdir@

diff --git a/net-analyzer/ngrep/ngrep-1.47.ebuild 
b/net-analyzer/ngrep/ngrep-1.47.ebuild
new file mode 100644
index 00000000000..1816037305b
--- /dev/null
+++ b/net-analyzer/ngrep/ngrep-1.47.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit autotools user
+
+DESCRIPTION="A grep for network layers"
+HOMEPAGE="https://github.com/jpr5/ngrep";
+SRC_URI="${HOMEPAGE}/archive/V${PV/./_}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="ngrep"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 
~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE="ipv6"
+
+DEPEND="
+       dev-libs/libpcre
+       net-libs/libpcap
+"
+RDEPEND="
+       ${DEPEND}
+"
+DOCS=(
+       CHANGES
+       CREDITS
+       README.md
+)
+S=${WORKDIR}/${P/./_}
+PATCHES=(
+       "${FILESDIR}"/${PN}-1.47-regex.patch
+)
+
+src_prepare() {
+       default
+       eautoreconf
+}
+
+src_configure() {
+       econf \
+               $(use_enable ipv6) \
+               --disable-pcap-restart \
+               --enable-pcre \
+               --with-dropprivs-user=ngrep \
+               --with-pcap-includes="${EPREFIX}"/usr/include/pcap
+}
+
+src_compile() {
+       emake -C regex-0.12
+       emake STRIPFLAG="${CFLAGS}"
+}
+
+pkg_preinst() {
+       enewgroup ngrep
+       enewuser ngrep -1 -1 -1 ngrep
+}

Reply via email to