summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Licht <jonas.licht@fem.tu-ilmenau.de>2021-03-21 20:47:16 +0100
committerJoonas Niilola <juippis@gentoo.org>2021-03-22 15:33:47 +0200
commitb3055e30a568592223aef4ec728eda6da806eafe (patch)
tree5c41aaa15b1825f22e2bfa608d1c3a5b6c758ebc /net-analyzer/openvas-scanner
parentdev-util/valgrind: version bump to 3.17.0 (diff)
downloadgentoo-b3055e30a568592223aef4ec728eda6da806eafe.tar.gz
gentoo-b3055e30a568592223aef4ec728eda6da806eafe.tar.bz2
gentoo-b3055e30a568592223aef4ec728eda6da806eafe.zip
net-analyzer/openvas-scanner: add patch to disable cmake automagic dep
Closes: https://bugs.gentoo.org/733894 Package-Manager: Portage-3.0.13, Repoman-3.0.2 Signed-off-by: Jonas Licht <jonas.licht@fem.tu-ilmenau.de> Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'net-analyzer/openvas-scanner')
-rw-r--r--net-analyzer/openvas-scanner/files/openvas-scanner-7.0.1-disable-automagic-dep.patch33
-rw-r--r--net-analyzer/openvas-scanner/metadata.xml1
-rw-r--r--net-analyzer/openvas-scanner/openvas-scanner-7.0.1.ebuild11
3 files changed, 42 insertions, 3 deletions
diff --git a/net-analyzer/openvas-scanner/files/openvas-scanner-7.0.1-disable-automagic-dep.patch b/net-analyzer/openvas-scanner/files/openvas-scanner-7.0.1-disable-automagic-dep.patch
new file mode 100644
index 000000000000..fd3e4610f8a4
--- /dev/null
+++ b/net-analyzer/openvas-scanner/files/openvas-scanner-7.0.1-disable-automagic-dep.patch
@@ -0,0 +1,33 @@
+diff --git a/nasl/CMakeLists.txt b/nasl/CMakeLists.txt
+index b594679c..81c5e4a9 100644
+--- a/nasl/CMakeLists.txt
++++ b/nasl/CMakeLists.txt
+@@ -100,14 +100,20 @@ execute_process (COMMAND gpgme-config --cflags
+ OUTPUT_VARIABLE GPGME_CFLAGS
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+
+-message (STATUS "Looking for netsnmp...")
+-find_library (SNMP netsnmp)
+-message (STATUS "Looking for netsnmp... ${SNMP}")
+-if (SNMP)
+- execute_process (COMMAND net-snmp-config --libs
+- OUTPUT_VARIABLE SNMP_LDFLAGS
+- OUTPUT_STRIP_TRAILING_WHITESPACE)
+-endif (SNMP)
++option(BUILD_WITH_SNMP "Build with SNMP Support" ON)
++if (BUILD_WITH_SNMP)
++ message (STATUS "Looking for netsnmp...")
++ find_library (SNMP netsnmp)
++ message (STATUS "Looking for netsnmp... ${SNMP}")
++ if (SNMP)
++ execute_process (COMMAND net-snmp-config --libs
++ OUTPUT_VARIABLE SNMP_LDFLAGS
++ OUTPUT_STRIP_TRAILING_WHITESPACE)
++ endif (SNMP)
++ if (NOT SNMP)
++ message (SEND_ERROR " netsnmp not found")
++ endif(NOT SNMP)
++endif (BUILD_WITH_SNMP)
+
+ message (STATUS "Looking for libgcrypt...")
+ find_library (GCRYPT gcrypt)
diff --git a/net-analyzer/openvas-scanner/metadata.xml b/net-analyzer/openvas-scanner/metadata.xml
index 7e35c8db9689..35596363964d 100644
--- a/net-analyzer/openvas-scanner/metadata.xml
+++ b/net-analyzer/openvas-scanner/metadata.xml
@@ -12,6 +12,7 @@
<use>
<flag name="cron">Install a cron job to update GVM's feed daily.</flag>
<flag name="extras">Html docs support</flag>
+ <flag name="snmp">Build againts net-analyzer/net-snmp for "improved SNMP support"</flag>
</use>
<longdescription lang="en">
Open Vulnerability Assessment System (OpenVAS) Scanner is the Greenbone Vulnerability Management (GVM) Solution.
diff --git a/net-analyzer/openvas-scanner/openvas-scanner-7.0.1.ebuild b/net-analyzer/openvas-scanner/openvas-scanner-7.0.1.ebuild
index 812b342a1ca3..1fc5a9111794 100644
--- a/net-analyzer/openvas-scanner/openvas-scanner-7.0.1.ebuild
+++ b/net-analyzer/openvas-scanner/openvas-scanner-7.0.1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -16,7 +16,7 @@ SRC_URI="https://github.com/greenbone/openvas-scanner/archive/v${PV}.tar.gz -> $
SLOT="0"
LICENSE="GPL-2 GPL-2+"
KEYWORDS="~amd64 ~x86"
-IUSE="cron extras test"
+IUSE="cron extras snmp test"
RESTRICT="!test? ( test )"
DEPEND="
@@ -27,7 +27,7 @@ DEPEND="
dev-libs/libgcrypt:=
dev-libs/libksba
>=net-analyzer/gvm-libs-11.0.1
- net-analyzer/net-snmp
+ snmp? ( net-analyzer/net-snmp:= )
net-libs/gnutls:=
net-libs/libpcap
net-libs/libssh:="
@@ -48,6 +48,10 @@ BDEPEND="
)
test? ( dev-libs/cgreen )"
+PATCHES=(
+ "${FILESDIR}"/${P}-disable-automagic-dep.patch
+)
+
BUILD_DIR="${WORKDIR}/${MY_PN}-${PV}_build"
S="${WORKDIR}/${MY_PN}-${PV}"
@@ -75,6 +79,7 @@ src_configure() {
"-DLOCALSTATEDIR=${EPREFIX}/var"
"-DSYSCONFDIR=${EPREFIX}/etc"
"-DSBINDIR=${EPREFIX}/usr/bin"
+ "-DBUILD_WITH_SNMP=$(usex snmp)"
)
cmake_src_configure
}