commit:     7205aade998ac0640b282a3304381484363f6049
Author:     Rick Farina <zerochaos <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 20 16:30:32 2022 +0000
Commit:     Rick Farina <zerochaos <AT> gentoo <DOT> org>
CommitDate: Thu Jan 20 17:04:42 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7205aade

net-wireless/kismet: fix USE=-pcre

Signed-off-by: Rick Farina <zerochaos <AT> gentoo.org>
Closes: https://bugs.gentoo.org/830743

 .../kismet/files/kismet-2021.08.1-nopcre.patch     | 24 ++++++++++++++++++++++
 net-wireless/kismet/kismet-2021.08.1-r1.ebuild     |  4 +++-
 2 files changed, 27 insertions(+), 1 deletion(-)

diff --git a/net-wireless/kismet/files/kismet-2021.08.1-nopcre.patch 
b/net-wireless/kismet/files/kismet-2021.08.1-nopcre.patch
new file mode 100644
index 000000000000..c3b648464ff5
--- /dev/null
+++ b/net-wireless/kismet/files/kismet-2021.08.1-nopcre.patch
@@ -0,0 +1,24 @@
+From e28c407f612877e750e6e5e1b92a8949275b7df0 Mon Sep 17 00:00:00 2001
+From: Mike Kershaw / Dragorn <[email protected]>
+Date: Thu, 16 Dec 2021 20:35:43 -0500
+Subject: [PATCH] Fix compiling when pcre is not available
+
+Fix compiling when pcre is not available
+---
+ log_tools/kismetdb_to_wiglecsv.cc | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/log_tools/kismetdb_to_wiglecsv.cc 
b/log_tools/kismetdb_to_wiglecsv.cc
+index 8d4a8db68..5c79680c7 100644
+--- a/log_tools/kismetdb_to_wiglecsv.cc
++++ b/log_tools/kismetdb_to_wiglecsv.cc
+@@ -239,6 +239,9 @@ int main(int argc, char *argv[]) {
+ 
+         pcre *re;
+         pcre_extra *study;
++#else
++        pcre_filter(const std::string& in_regex) {}
++        bool match(const std::string& target) {return false;}
+ #endif
+     };
+ 

diff --git a/net-wireless/kismet/kismet-2021.08.1-r1.ebuild 
b/net-wireless/kismet/kismet-2021.08.1-r1.ebuild
index e82c719234ad..9e9ec7789539 100644
--- a/net-wireless/kismet/kismet-2021.08.1-r1.ebuild
+++ b/net-wireless/kismet/kismet-2021.08.1-r1.ebuild
@@ -85,6 +85,8 @@ PDEPEND="
                net-wireless/rtl-sdr
        )"
 
+PATCHES=( "${FILESDIR}"/kismet-2021.08.1-nopcre.patch )
+
 src_prepare() {
        sed -i -e "s:^\(logtemplate\)=\(.*\):\1=/tmp/\2:" \
                conf/kismet_logging.conf || die
@@ -110,7 +112,7 @@ src_prepare() {
        sed -i -e 's| -s||g' \
                -e 's|@mangrp@|root|g' Makefile.in || die
 
-       eapply_user
+       default
 
        #just use set to fix setup.py
        find . -name "Makefile.in" -exec sed -i 's#setup.py install#setup.py 
install --root=$(DESTDIR)#' {} + || die

Reply via email to