DIST ngrep-1.45.tar.bz2 463361 BLAKE2B 31f7828fb28197f06a583cd6d250b5d70bfbd2bc5dae657daaed3f7ea286aec4dff9cca449c72a3c27d8e8b30d861304872eaaaa11abc9eb71f2acc94d9fc9f2 SHA512 0feb4080f834449d57ae99897c573d2b8148711cfb550fa4ff415169dedb1f0d23f4b03f625660162ca72f8ad06e19874c1af46da6afd8f8fe8dd553558c14f7
+DIST ngrep-1.47.tar.gz 187067 BLAKE2B 4fa47ed343b88e84fb5a3ab6e4dc8139cb008ffcbea901a67664335ad76d36e975e037620cebb1b204ba22e5b139e822c7cfbc74a061fc6cacae631be3f87a52 SHA512 47ba65878df6b555701c866721a8a935eabdcce636d398284cbfe5f63baf68c62d994a2f373ea4fc8f44fbed3eecee149f2ee48d39c71c04d34e5a088db8c657
--- /dev/null
+--- 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@
--- /dev/null
+# 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
+}