net-wireless/kismet: correct fix for bug #662726
authorRick Farina <zerochaos@gentoo.org>
Tue, 4 Dec 2018 16:41:44 +0000 (11:41 -0500)
committerRick Farina <zerochaos@gentoo.org>
Tue, 4 Dec 2018 16:42:01 +0000 (11:42 -0500)
use newly added configure flags

Package-Manager: Portage-2.3.52, Repoman-2.3.12
Signed-off-by: Rick Farina <zerochaos@gentoo.org>
net-wireless/kismet/kismet-2018.08_beta1-r4.ebuild [moved from net-wireless/kismet/kismet-2018.08_beta1-r3.ebuild with 93% similarity]
net-wireless/kismet/kismet-9999.ebuild
net-wireless/kismet/metadata.xml

similarity index 93%
rename from net-wireless/kismet/kismet-2018.08_beta1-r3.ebuild
rename to net-wireless/kismet/kismet-2018.08_beta1-r4.ebuild
index 9f06e02bc4de0db0d9ceae721a39e123d63ac404..69055f3a8ae82eef4559dcdb3c076dfdf790b1c1 100644 (file)
@@ -74,22 +74,20 @@ src_prepare() {
        fi
 
        if ! use lm_sensors; then
-               sed -i "s#HAVE_LMSENSORS_H=1#HAVE_LMSENSORS_H=0#" configure
+               sed -i "s#sensors.h#totally-not-sensors.h#" configure
        fi
-       #fix for bug #662726
-       sed -i "s#HAVE_SENSORS_SENSORS_H#HAVE_LMSENSORS_H#" system_monitor.cc || die
 
        if use networkmanager; then
                sed -i "s#havelibnm\=no#havelibnm\=yes#" configure
        else
                sed -i "s#havelibnm\=yes#havelibnm\=no#" configure
        fi
-       sed -i 's#-O3##' configure
 }
 
 src_configure() {
        econf \
-               $(use_enable pcre)
+               $(use_enable pcre) \
+               --disable-optimization
 }
 
 src_install() {
index 9bd91454798a24ab3bb20c4ff55ccff65146df7a..9eecff37a2f85f47b0062aaab3feb81a310eb233 100644 (file)
@@ -28,7 +28,7 @@ HOMEPAGE="https://www.kismetwireless.net"
 
 LICENSE="GPL-2"
 SLOT="0/${PV}"
-IUSE="lm_sensors networkmanager +pcre selinux +suid"
+IUSE="lm_sensors mousejack networkmanager +pcre selinux +suid"
 
 CDEPEND="
        ${PYTHON_DEPS}
@@ -42,7 +42,7 @@ CDEPEND="
                        dev-libs/libnl:3
                        net-libs/libpcap
                        )
-       dev-libs/libusb:=
+       mousejack? ( dev-libs/libusb:= )
        dev-libs/protobuf-c:=
        dev-libs/protobuf:=
        sys-libs/ncurses:=
@@ -67,32 +67,21 @@ src_prepare() {
        sed -i -e 's| -s||g' \
                -e 's|@mangrp@|root|g' Makefile.in
 
-       epatch "${FILESDIR}"/fix-setuptools3.patch
+       eapply "${FILESDIR}"/fix-setuptools3.patch
        eapply_user
 
-       if use lm_sensors; then
-               sed -i "s#HAVE_LMSENSORS_H=0#HAVE_LMSENSORS_H=1#" configure.ac || die
-               sed -i "s#HAVE_LIBLMSENSORS=0#HAVE_LMSENSORS=1#" configure.ac || die
-       else
-               sed -i "s#HAVE_LMSENSORS_H=1#HAVE_LMSENSORS_H=0#" configure.ac || die
-               sed -i "s#HAVE_LIBLMSENSORS=1#HAVE_LMSENSORS=0#" configure.ac || die
+       if [ "${PV}" = "9999" ]; then
+               eautoreconf
        fi
-       #fix for bug #662726
-       sed -i "s#HAVE_SENSORS_SENSORS_H#HAVE_LMSENSORS_H#" system_monitor.cc || die
-
-       if use networkmanager; then
-               sed -i "s#havelibnm\=no#havelibnm\=yes#" configure.ac || die
-       else
-               sed -i "s#havelibnm\=yes#havelibnm\=no#" configure.ac || die
-       fi
-       sed -i 's#-O3##' configure.ac || die
-
-       eautoreconf
 }
 
 src_configure() {
        econf \
-               $(use_enable pcre)
+               $(use_enable pcre) \
+               $(use_enable lm_sensors lmsensors) \
+               $(use_enable mousejack libusb) \
+               $(use_enable networkmanager libnm) \
+               --disable-optimization
 }
 
 src_install() {
index 3e3c9a3551a7c5222d73bb45a8acfe0ceaffc1eb..e5158f5c107be78c422851d65cc654fef4c6b84f 100644 (file)
@@ -12,6 +12,7 @@
                        this allows running kismet as a normal user, significantly
                        reducing security risks
                </flag>
+               <flag name="mousejack">Add support for mousejack hardware using <pkg>dev-libs/libusb</pkg></flag>
                <flag name="pcre">Build with pcre support</flag>
                <flag name="speech">Audio support using <pkg>app-accessibility/flite</pkg></flag>
                <flag name="plugin-autowep">Build the autowep plugin</flag>