--- /dev/null
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DIST_AUTHOR=SAPER
+DIST_VERSION=0.18
+DIST_EXAMPLES=( "eg/*" )
+inherit perl-module eutils
+
+DESCRIPTION="Interface to the pcap(3) LBL packet capture library"
+
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~ppc ~x86"
+IUSE=""
+
+RDEPEND="net-libs/libpcap
+ dev-perl/IO-Interface"
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-${DIST_VERSION}-test-error.patch"
+)
+
+src_test() {
+ if [[ $EUID != 0 ]]; then
+ elog "Comprehensive testing of this module requires root permissions."
+ elog "For details, see:"
+ elog "https://wiki.gentoo.org/wiki/Project:Perl/maint-notes/${CATEGORY}/${PN}"
+ fi
+ perl_rm_files t/pod{,cover,spell}.t t/distchk.t t/portfs.t
+ perl-module_src_test
+}
--- /dev/null
+From 7c831efcb06d6254e54423cdcd95bebbb7725270 Mon Sep 17 00:00:00 2001
+From: Kent Fredric <kentnl@gentoo.org>
+Date: Fri, 8 Dec 2017 17:52:13 +1300
+Subject: Allow error message to be a suffix
+
+Previously, the error message emitted by the native calls was of the
+form:
+
+ 'syntax error'
+
+However, more recently the error message takes the form:
+
+ 'syntax error in filter expression: syntax error'
+
+This patch pretends the part before the ":" is functionally equivalent
+to a line start, for the purposes of testing.
+
+Bug: https://github.com/maddingue/Net-Pcap/issues/8
+Bug: https://github.com/maddingue/Net-Pcap/pull/9
+---
+ t/09-error.t | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/t/09-error.t b/t/09-error.t
+index 90337b8..eee679d 100644
+--- a/t/09-error.t
++++ b/t/09-error.t
+@@ -22,7 +22,7 @@ is( $@, '', "compile() with an invalid filter string" );
+ is( $res, -1, " - result must not be null: $res" );
+ eval { $err = Net::Pcap::geterr($pcap) };
+ is( $@, '', "geterr()" );
+-like( $err, '/^(?:parse|syntax) error$/', " - \$err must not be null: $err" );
++like( $err, '/(^|: )(?:parse|syntax) error$/', " - \$err must not be null: $err" );
+
+ # Testing compile() with a valid filter
+ eval { $res = Net::Pcap::compile($pcap, \$filter, "tcp", 0, $mask) };
+--
+2.14.3
+