summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2020-11-05 13:45:03 +0000
committerSam James <sam@gentoo.org>2020-11-05 14:08:01 +0000
commit4b863caa2a14604924729dbb227a1949e32dbdfe (patch)
treead83372caf629a562c8b2166622f82999bb27d0f /net-libs/nDPI
parentnet-libs/nDPI: drop 2.x (QA fixes) (diff)
downloadgentoo-4b863caa2a14604924729dbb227a1949e32dbdfe.tar.gz
gentoo-4b863caa2a14604924729dbb227a1949e32dbdfe.tar.bz2
gentoo-4b863caa2a14604924729dbb227a1949e32dbdfe.zip
net-libs/nDPI: fail when libpcap can't be found
Package-Manager: Portage-3.0.8, Repoman-3.0.2 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-libs/nDPI')
-rw-r--r--net-libs/nDPI/files/nDPI-3.4-configure-fail-libcap.patch19
-rw-r--r--net-libs/nDPI/nDPI-3.4.ebuild4
2 files changed, 22 insertions, 1 deletions
diff --git a/net-libs/nDPI/files/nDPI-3.4-configure-fail-libcap.patch b/net-libs/nDPI/files/nDPI-3.4-configure-fail-libcap.patch
new file mode 100644
index 000000000000..7ae5a04d4e8c
--- /dev/null
+++ b/net-libs/nDPI/files/nDPI-3.4-configure-fail-libcap.patch
@@ -0,0 +1,19 @@
+Ensure that we fail if libpcap can't be detected, rather than exiting with a success return code.
+--- a/configure.seed
++++ b/configure.seed
+@@ -126,12 +126,9 @@ case "$host" in
+ AC_CHECK_LIB([dl], [dlopen, dlsym], [DL_LIB="-ldl"],[AC_CHECK_LIB([c], [dlopen, dlsym], [DL_LIB="-lc"],[AC_MSG_ERROR([unable to find the dlopen(), dlsym() functions]) ]) ])
+ else
+ AC_CHECK_LIB([pcap], [pcap_open_live], [PCAP_LIB="-lpcap"])
+- if test $ac_cv_lib_pcap_pcap_open_live = "no"; then :
+- echo ""
+- echo "ERROR: Missing libpcap(-dev) library required to compile the example application"
+- echo "ERROR: Please install it and try again"
+- exit
+- fi
++ if test $ac_cv_lib_pcap_pcap_open_live = "no"; then :
++ AC_MSG_ERROR([Cannot find libpcap which is required to compile the example application])
++ fi
+ fi
+ ;;
+ esac
diff --git a/net-libs/nDPI/nDPI-3.4.ebuild b/net-libs/nDPI/nDPI-3.4.ebuild
index 39a1a4c8a57d..cb053734cf39 100644
--- a/net-libs/nDPI/nDPI-3.4.ebuild
+++ b/net-libs/nDPI/nDPI-3.4.ebuild
@@ -19,6 +19,7 @@ RDEPEND="${DEPEND}"
PATCHES=(
"${FILESDIR}/${PN}-3.4-fix-oob-in-kerberos-dissector.patch"
+ "${FILESDIR}/${PN}-3.4-configure-fail-libcap.patch"
)
src_prepare() {
@@ -27,6 +28,8 @@ src_prepare() {
eval $(grep '^NDPI_PATCH=' autogen.sh)
NDPI_VERSION_SHORT="${NDPI_MAJOR}.${NDPI_MINOR}.${NDPI_PATCH}"
+ default
+
sed \
-e "s/@NDPI_MAJOR@/${NDPI_MAJOR}/g" \
-e "s/@NDPI_MINOR@/${NDPI_MINOR}/g" \
@@ -40,7 +43,6 @@ src_prepare() {
-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):