summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHasan ÇALIŞIR <hasan.calisir@psauxit.com>2019-02-07 04:50:12 +0300
committerPatrice Clement <monsieurp@gentoo.org>2019-03-13 15:58:27 +0100
commitbdb9f0c42f339d8752d912f99c145e4d5d7643b9 (patch)
tree206606274c255d03de8b132c26c60850f1fc8c49 /net-analyzer
parentnet-analyzer/openvas: version bump to 9.0.0. (diff)
downloadgentoo-bdb9f0c42f339d8752d912f99c145e4d5d7643b9.tar.gz
gentoo-bdb9f0c42f339d8752d912f99c145e4d5d7643b9.tar.bz2
gentoo-bdb9f0c42f339d8752d912f99c145e4d5d7643b9.zip
net-analyzer/openvas-libraries: version bump to 9.0.3.
Bump to 9.0.3. This also fixes cmake bug 663446 and introduces the new USE flags 'extras' 'ldap' 'radius'. Introduces six new patches which fixes build and QA issues: - gcc8.patch fixes gcc-8 build issue. - netsnmp.patch fixes cmake netsnmp name issue. - cachedir.patch fixes unnecessary directory install QA issue. - rundir.patch fixes unnecessary directory install QA issue. - rpath.patch fixes insecure rpath QA issue. - underlinking.patch fixes linking issue. Because of new dependencies ~arm ~ppc keywords have been dropped. This package is part of net-analyzer/openvas. Reported-by: Toralf Förster <toralf@gentoo.org> Reported-by: NP-Hardass <np-hardass@gentoo.org> Acked-by: Hasan ÇALIŞIR <hasan.calisir@psauxit.com> Closes: https://bugs.gentoo.org/663446 Tested-by: Hasan ÇALIŞIR <hasan.calisir@psauxit.com> Signed-off-by: Hasan ÇALIŞIR <hasan.calisir@psauxit.com> Package-Manager: Portage-2.3.51, Repoman-2.3.11 Signed-off-by: Patrice Clement <monsieurp@gentoo.org>
Diffstat (limited to 'net-analyzer')
-rw-r--r--net-analyzer/openvas-libraries/Manifest1
-rw-r--r--net-analyzer/openvas-libraries/files/OPENVAS.gentoo106
-rw-r--r--net-analyzer/openvas-libraries/files/openvas-libraries-9.0.3-cachedir.patch18
-rw-r--r--net-analyzer/openvas-libraries/files/openvas-libraries-9.0.3-gcc8.patch73
-rw-r--r--net-analyzer/openvas-libraries/files/openvas-libraries-9.0.3-netsnmp.patch11
-rw-r--r--net-analyzer/openvas-libraries/files/openvas-libraries-9.0.3-rpath.patch11
-rw-r--r--net-analyzer/openvas-libraries/files/openvas-libraries-9.0.3-rundir.patch45
-rw-r--r--net-analyzer/openvas-libraries/files/openvas-libraries-9.0.3-underlinking.patch47
-rw-r--r--net-analyzer/openvas-libraries/metadata.xml14
-rw-r--r--net-analyzer/openvas-libraries/openvas-libraries-9.0.3.ebuild93
10 files changed, 418 insertions, 1 deletions
diff --git a/net-analyzer/openvas-libraries/Manifest b/net-analyzer/openvas-libraries/Manifest
index 516be95f4c1c..2f17b77b5a74 100644
--- a/net-analyzer/openvas-libraries/Manifest
+++ b/net-analyzer/openvas-libraries/Manifest
@@ -1 +1,2 @@
DIST openvas-libraries-8.0.5.tar.gz 603947 BLAKE2B 493a6b2f5cea7e78ce69b9fe730a4d6df89601e0c48cfbc3b0ab1480326c32bb479768c4a54d08bfcb67db0b2ad4ca28990ead57554abd9fd877e7f79b339d8f SHA512 3d788f931c55941663187f8038c15d0ff97799048c8ea9e5615ff22de3c5e6b5e4eaa599e41676778fadc50528c086060b6268b5edfbaf7289f0e498dbb1423b
+DIST openvas-libraries-9.0.3.tar.gz 643948 BLAKE2B c05fbcd2a1b9c2292ac2d7ea3c7f4fe2ff4c5a41b0dd5610283712ce136fe4184d46b9fdcfb74bf2a4a6d7c016497df31caff121d9c7b013280164b49f874f4f SHA512 bca213309e06a39d2dcd790cacb01f2a71471622887424e41cc025a2bc25feb6a9b2c1d904f739df6fd87d8ec7af5171b31d1f5d08411c5143e4be1e6723397a
diff --git a/net-analyzer/openvas-libraries/files/OPENVAS.gentoo b/net-analyzer/openvas-libraries/files/OPENVAS.gentoo
new file mode 100644
index 000000000000..ab3f4c8918c7
--- /dev/null
+++ b/net-analyzer/openvas-libraries/files/OPENVAS.gentoo
@@ -0,0 +1,106 @@
+-----------------------------------------------------------------
+--------------------------IMPORTANT------------------------------
+-----------------------------------------------------------------
+You will need to set up your /etc/redis.conf file properly before
+running openvas-scanner for the first time.
+For details, please see the example config file installed to:
+--> /etc/openvas/redis.conf.example
+Please configure /etc/openvas/openvassd.conf properly
+according to redis listening unix socket.
+e.g. /etc/openvas/openvassd.conf --> kb_location = /tmp/redis.sock
+If you use first-start script it will check various issues and
+automatically setup OpenVAS for first time use.
+GSA(Greenbone Security Agent) WebUI listens port
+9392(local) default. If you want to use nginx reverse proxy
+to reach WebUI please see the example config file
+--> /etc/openvas/gsa.nginx.reverse.proxy.example
+otherwise you can change port to 443 or 80.
+
+-----------------------------------------------------------------
+---------------------------SCRIPTS-------------------------------
+-----------------------------------------------------------------
+'first-start'
+--> Automatically setup OpenVAS for first time use
+--> Installed in /etc/openvas/scripts
+
+'openvas-feed-sync'
+--> Updates Feeds | You can add this to cron
+--> Installed in /etc/openvas/scripts
+
+-----------------------------------------------------------------
+----------ENVIRONMENT SETTINGS FOR SYSTEMD & OPEN-RC-------------
+-----------------------------------------------------------------
+'openvas-scanner-daemon.conf'
+--> OpenVAS Scanner systemd daemon settings
+--> Installed in /etc/openvas/sysconfig
+
+'gvmd-daemon.conf'
+--> OpenVAS Manager systemd daemon settings
+--> Installed in /etc/openvas/sysconfig
+
+'gsa-daemon.conf
+--> Greenbone Security Agent systemd daemon settings
+--> Installed in /etc/openvas/sysconfig
+
+'openvas-scanner'
+--> OpenVAS Scanner open-rc daemon settings
+--> Installed in /etc/config.d
+
+'gvmd'
+--> OpenVAS Manager open-rc daemon settings
+--> Installed in /etc/config.d
+
+'gsa'
+--> Greenbone Security Agent systemd daemon settings
+--> Installed in /etc/config.d
+
+-----------------------------------------------------------------
+--------QUICK START COMMANDS (IF YOU DON'T USE SCRIPTS)----------
+-----------------------------------------------------------------
+'env-update && source /etc/profile'
+--> Update PATHS
+
+'openvas-manage-certs -a'
+--> Create certificates automatically first time
+
+'greenbone-nvt-sync'
+--> Update NVT Feed
+
+'greenbone-scapdata-sync'
+--> Update scapdata Feed
+
+'greenbone-certdata-sync'
+--> Update certdata Feed
+
+'openvassd --foreground --only-cache'
+--> Generate initial NVT cache and quit
+
+'rc-service openvas-scanner start or systemctl start openvas-scanner'
+--> Start OpenVAS-Scanner
+
+'openvasmd --rebuild --progress'
+--> Initialize the Database
+
+'openvasmd --create-user=admin --role=Admin'
+--> Create User for WEBUI.Save your password
+
+'rc-service gvmd start or systemctl start gvmd'
+--> Start OpenVAS-Manager
+
+'rc-service gsa start or systemctl start gsa'
+--> Start the Greenbone Security Assistant
+
+-----------------------------------------------------------------
+---------------------PLUGIN KEY AND SIGNING----------------------
+-----------------------------------------------------------------
+'gpg --homedir=/etc/openvas/gnupg --gen-key'
+--> Generate Key
+
+'wget https://www.greenbone.net/GBCommunitySigningKey.asc'
+--> Official OpenVAS Transfer Key
+
+'gpg --homedir=/etc/openvas/gnupg --import GBCommunitySigningKey.asc'
+--> Import OpenVAS Transfer Key
+
+'gpg --homedir=/etc/openvas/gnupg --lsign-key 0ED1E580'
+--> Sign
diff --git a/net-analyzer/openvas-libraries/files/openvas-libraries-9.0.3-cachedir.patch b/net-analyzer/openvas-libraries/files/openvas-libraries-9.0.3-cachedir.patch
new file mode 100644
index 000000000000..34fc9f68f437
--- /dev/null
+++ b/net-analyzer/openvas-libraries/files/openvas-libraries-9.0.3-cachedir.patch
@@ -0,0 +1,18 @@
+--- gvm-libs-9.0.3/CMakeLists.txt 2019-02-04 01:40:41.981031382 +0300
++++ gvm-libs-9.0.3/CMakeLists.txt 2019-02-04 01:44:08.867074208 +0300
+@@ -173,7 +173,6 @@
+ set (OPENVAS_DATA_DIR "${DATADIR}/openvas")
+ set (OPENVAS_STATE_DIR "${LOCALSTATEDIR}/lib/openvas")
+ set (OPENVAS_LOG_DIR "${LOCALSTATEDIR}/log/openvas")
+-set (OPENVAS_CACHE_DIR "${LOCALSTATEDIR}/cache/openvas")
+ set (OPENVAS_SYSCONF_DIR "${SYSCONFDIR}/openvas")
+
+ set (OPENVAS_LIB_INSTALL_DIR "${LIBDIR}")
+@@ -330,7 +329,6 @@
+
+ install (DIRECTORY DESTINATION ${OPENVAS_LOG_DIR})
+ install (DIRECTORY DESTINATION ${OPENVAS_DATA_DIR})
+-install (DIRECTORY DESTINATION ${OPENVAS_CACHE_DIR})
+ install (DIRECTORY DESTINATION ${OPENVAS_PID_DIR})
+ install (DIRECTORY DESTINATION ${OPENVAS_SYSCONF_DIR})
+ install (DIRECTORY
diff --git a/net-analyzer/openvas-libraries/files/openvas-libraries-9.0.3-gcc8.patch b/net-analyzer/openvas-libraries/files/openvas-libraries-9.0.3-gcc8.patch
new file mode 100644
index 000000000000..a2809087f820
--- /dev/null
+++ b/net-analyzer/openvas-libraries/files/openvas-libraries-9.0.3-gcc8.patch
@@ -0,0 +1,73 @@
+--- gvm-libs-9.0.3/nasl/nasl_isotime.c 2018-08-29 19:01:12.000000000 +0300
++++ gvm-libs-9.0.3/nasl/nasl_isotime.c 2019-02-01 21:11:40.460358131 +0300
+@@ -102,9 +102,13 @@
+ struct tm *tp;
+
+ tp = gmtime (&atime);
+- snprintf (timebuf, ISOTIME_SIZE, "%04d%02d%02dT%02d%02d%02d",
++ if (snprintf (timebuf, ISOTIME_SIZE, "%04d%02d%02dT%02d%02d%02d",
+ 1900 + tp->tm_year, tp->tm_mon+1, tp->tm_mday,
+- tp->tm_hour, tp->tm_min, tp->tm_sec);
++ tp->tm_hour, tp->tm_min, tp->tm_sec) < 0)
++ {
++ *timebuf = '\0';
++ return;
++ }
+ }
+ }
+
+@@ -480,8 +484,9 @@
+ || year < 0 || month < 1 || day < 1)
+ return 1;
+
+- snprintf (atime, ISOTIME_SIZE, "%04d%02d%02dT%02d%02d%02d",
+- year, month, day, hour, minute, sec);
++ if (snprintf (atime, ISOTIME_SIZE, "%04d%02d%02dT%02d%02d%02d",
++ year, month, day, hour, minute, sec) < 0)
++ return 1;
+ return 0;
+ }
+
+@@ -519,8 +524,9 @@
+ || year < 0 || month < 1 || day < 1)
+ return 1;
+
+- snprintf (atime, ISOTIME_SIZE, "%04d%02d%02dT%02d%02d%02d",
+- year, month, day, hour, minute, sec);
++ if (snprintf (atime, ISOTIME_SIZE, "%04d%02d%02dT%02d%02d%02d",
++ year, month, day, hour, minute, sec) < 0)
++ return 1;
+ return 0;
+ }
+
+@@ -558,13 +564,14 @@
+ || year < 0 || month < 1 || day < 1)
+ return 1;
+
+- snprintf (atime, ISOTIME_SIZE, "%04d%02d%02dT%02d%02d%02d",
+- year, month, day, hour, minute, sec);
++ if (snprintf (atime, ISOTIME_SIZE, "%04d%02d%02dT%02d%02d%02d",
++ year, month, day, hour, minute, sec) < 0)
++ return 1;
+ return 0;
+ }
+
+
+-
++
+ /**
+ * @brief Return the current time in ISO format
+ * @naslfn{isotime_now}
+@@ -784,9 +791,9 @@
+ memcpy (timebuf, string, ISOTIME_SIZE -1);
+ timebuf[ISOTIME_SIZE - 1] = 0;
+
+- nyears = get_int_local_var_by_name (lexic, "years", 0);
+- ndays = get_int_local_var_by_name (lexic, "days", 0);
+- nseconds = get_int_local_var_by_name (lexic, "seconds", 0);
++ nyears = get_int_var_by_name (lexic, "years", 0);
++ ndays = get_int_var_by_name (lexic, "days", 0);
++ nseconds = get_int_var_by_name (lexic, "seconds", 0);
+
+ if (nyears && add_years_to_isotime (timebuf, nyears))
+ return NULL;
diff --git a/net-analyzer/openvas-libraries/files/openvas-libraries-9.0.3-netsnmp.patch b/net-analyzer/openvas-libraries/files/openvas-libraries-9.0.3-netsnmp.patch
new file mode 100644
index 000000000000..69305576d0d7
--- /dev/null
+++ b/net-analyzer/openvas-libraries/files/openvas-libraries-9.0.3-netsnmp.patch
@@ -0,0 +1,11 @@
+--- gvm-libs-9.0.3/CMakeLists.txt 2018-08-29 19:01:12.000000000 +0300
++++ gvm-libs-9.0.3/CMakeLists.txt 2019-02-01 20:58:45.946113012 +0300
+@@ -238,7 +238,7 @@
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+
+ message (STATUS "Looking for netsnmp...")
+- find_library (SNMP snmp)
++ find_library (SNMP netsnmp)
+ message (STATUS "Looking for netsnmp... ${SNMP}")
+ if (SNMP)
+ execute_process (COMMAND net-snmp-config --libs
diff --git a/net-analyzer/openvas-libraries/files/openvas-libraries-9.0.3-rpath.patch b/net-analyzer/openvas-libraries/files/openvas-libraries-9.0.3-rpath.patch
new file mode 100644
index 000000000000..e14e2965e9fe
--- /dev/null
+++ b/net-analyzer/openvas-libraries/files/openvas-libraries-9.0.3-rpath.patch
@@ -0,0 +1,11 @@
+--- gvm-libs-9.0.3/CMakeLists.txt 2019-02-04 21:42:27.367627369 +0300
++++ gvm-libs-9.0.3/CMakeLists.txt 2019-02-04 21:45:48.961135211 +0300
+@@ -80,7 +80,7 @@
+ # TODO: Check pkg-config (maybe with code like in gsa/CMakeLists.txt).
+
+ ## CPack configuration
+-
++set (CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
+ set (CPACK_CMAKE_GENERATOR "Unix Makefiles")
+ set (CPACK_GENERATOR "TGZ")
+ set (CPACK_INSTALL_CMAKE_PROJECTS ".;openvas-libraries;ALL;/")
diff --git a/net-analyzer/openvas-libraries/files/openvas-libraries-9.0.3-rundir.patch b/net-analyzer/openvas-libraries/files/openvas-libraries-9.0.3-rundir.patch
new file mode 100644
index 000000000000..6ecdc8a64219
--- /dev/null
+++ b/net-analyzer/openvas-libraries/files/openvas-libraries-9.0.3-rundir.patch
@@ -0,0 +1,45 @@
+--- gvm-libs-9.0.3/CMakeLists.txt 2019-02-04 14:50:41.230530261 +0300
++++ gvm-libs-9.0.3/CMakeLists.txt 2019-02-04 14:55:08.649433070 +0300
+@@ -162,9 +162,9 @@
+ set (DATADIR "${CMAKE_INSTALL_PREFIX}/share")
+ endif (NOT DATADIR)
+
+-if (NOT OPENVAS_PID_DIR)
+- set (OPENVAS_PID_DIR "${LOCALSTATEDIR}/run")
+-endif (NOT OPENVAS_PID_DIR)
++#if (NOT OPENVAS_PID_DIR)
++# set (OPENVAS_PID_DIR "${LOCALSTATEDIR}/run")
++#endif (NOT OPENVAS_PID_DIR)
+
+ #if (NOT SYSCONFDIR)
+ # set (SYSCONFDIR "${CMAKE_INSTALL_PREFIX}/etc")
+--- gvm-libs-9.0.3/base/pidfile.c 2018-08-29 19:01:12.000000000 +0300
++++ gvm-libs-9.0.3/base/pidfile.c 2019-02-04 15:08:04.600958560 +0300
+@@ -59,7 +59,7 @@
+ pidfile_create (gchar * daemon_name)
+ {
+ gchar *name_pid = g_strconcat (daemon_name, ".pid", NULL);
+- gchar *pidfile_name = g_build_filename (OPENVAS_PID_DIR, name_pid, NULL);
++ gchar *pidfile_name = g_build_filename (name_pid, NULL);
+ FILE *pidfile = g_fopen (pidfile_name, "w");
+
+ g_free (name_pid);
+@@ -88,7 +88,7 @@
+ pidfile_remove (gchar * daemon_name)
+ {
+ gchar *name_pid = g_strconcat (daemon_name, ".pid", NULL);
+- gchar *pidfile_name = g_build_filename (OPENVAS_PID_DIR, name_pid, NULL);
++ gchar *pidfile_name = g_build_filename (name_pid, NULL);
+ gchar *pidfile_contents;
+
+ g_free (name_pid);
+--- gvm-libs-9.0.3/CMakeLists.txt 2019-02-04 17:39:39.776282496 +0300
++++ gvm-libs-9.0.3/CMakeLists.txt 2019-02-04 17:39:23.160269081 +0300
+@@ -329,7 +329,6 @@
+
+ install (DIRECTORY DESTINATION ${OPENVAS_LOG_DIR})
+ install (DIRECTORY DESTINATION ${OPENVAS_DATA_DIR})
+-install (DIRECTORY DESTINATION ${OPENVAS_PID_DIR})
+ install (DIRECTORY DESTINATION ${OPENVAS_SYSCONF_DIR})
+ install (DIRECTORY
+ DESTINATION ${OPENVAS_SYSCONF_DIR}/gnupg
diff --git a/net-analyzer/openvas-libraries/files/openvas-libraries-9.0.3-underlinking.patch b/net-analyzer/openvas-libraries/files/openvas-libraries-9.0.3-underlinking.patch
new file mode 100644
index 000000000000..e3c25f9b9c41
--- /dev/null
+++ b/net-analyzer/openvas-libraries/files/openvas-libraries-9.0.3-underlinking.patch
@@ -0,0 +1,47 @@
+--- gvm-libs-9.0.3/base/CMakeLists.txt 2019-02-04 15:11:20.848707365 +0300
++++ gvm-libs-9.0.3/base/CMakeLists.txt 2019-02-04 15:40:27.745955904 +0300
+@@ -88,7 +88,7 @@
+ assuan libgpg-error ole32 ws2_32 ffi z shlwapi dnsapi winmm)
+ target_link_libraries (openvas_base_shared ${W32LIBS})
+ else (MINGW)
+- target_link_libraries (openvas_base_shared LINK_PRIVATE ${GLIB_LDFLAGS} ${GIO_LDFLAGS} ${ZLIB_LDFLAGS} ${GPGME_LDFLAGS} ${REDIS_LDFLAGS} ${LINKER_HARDENING_FLAGS})
++ target_link_libraries (openvas_base_shared LINK_PRIVATE ${LIBSSH_LDFLAGS} ${GLIB_LDFLAGS} ${GIO_LDFLAGS} ${ZLIB_LDFLAGS} ${GPGME_LDFLAGS} ${REDIS_LDFLAGS} ${LINKER_HARDENING_FLAGS})
+ endif (MINGW)
+ endif (BUILD_SHARED)
+
+@@ -102,10 +102,10 @@
+
+ # Link the test-hosts executable
+ # TODO: This is currently only built for BUILD_SHARED
+-if (BUILD_SHARED)
+- add_executable (test-hosts test-hosts.c)
+- target_link_libraries (test-hosts openvas_base_shared ${GLIB_LDFLAGS} ${REDIS_LDFLAGS})
+-endif (BUILD_SHARED)
++#if (BUILD_SHARED)
++# add_executable (test-hosts test-hosts.c)
++# target_link_libraries (test-hosts openvas_base_shared ${GLIB_LDFLAGS} ${REDIS_LDFLAGS})
++#endif (BUILD_SHARED)
+
+ ## Install
+ if (BUILD_STATIC)
+@@ -123,3 +123,4 @@
+ endif (BUILD_SHARED)
+
+ ## End
++
+--- gvm-libs-9.0.3/misc/CMakeLists.txt 2019-02-04 15:11:20.847707368 +0300
++++ gvm-libs-9.0.3/misc/CMakeLists.txt 2019-02-04 15:49:34.035071570 +0300
+@@ -146,7 +146,7 @@
+ else (MINGW)
+ target_link_libraries (openvas_misc_shared LINK_PRIVATE ${GNUTLS_LDFLAGS} openvas_base_shared ${UUID_LDFLAGS}
+ ${GLIB_LDFLAGS} ${PCAP_LDFLAGS} ${LIBSSH_LDFLAGS} ${LDAP_LDFLAGS}
+- ${GCRYPT_LDFLAGS} ${RADIUS_LDFLAGS}
++ ${REDIS_LDFLAGS} ${GCRYPT_LDFLAGS} ${RADIUS_LDFLAGS}
+ ${LINKER_HARDENING_FLAGS})
+ endif (MINGW)
+ endif (BUILD_SHARED)
+@@ -198,3 +198,4 @@
+ ARCHIVE DESTINATION ${LIBDIR}
+ PUBLIC_HEADER DESTINATION "${INCLUDEDIR}/openvas/misc")
+ endif (BUILD_SHARED)
++
diff --git a/net-analyzer/openvas-libraries/metadata.xml b/net-analyzer/openvas-libraries/metadata.xml
index 6f49eba8f496..c71bb473eca2 100644
--- a/net-analyzer/openvas-libraries/metadata.xml
+++ b/net-analyzer/openvas-libraries/metadata.xml
@@ -1,5 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
-<!-- maintainer-needed -->
+ <maintainer type="person">
+ <email>hasan.calisir@psauxit.com</email>
+ <name>Hasan ÇALIŞIR</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <use>
+ <flag name="extras">Html docs support</flag>
+ <flag name="ldap">Enable support for ldap</flag>
+ <flag name="radius">Enable support for radius</flag>
+ </use>
</pkgmetadata>
diff --git a/net-analyzer/openvas-libraries/openvas-libraries-9.0.3.ebuild b/net-analyzer/openvas-libraries/openvas-libraries-9.0.3.ebuild
new file mode 100644
index 000000000000..1437868b499d
--- /dev/null
+++ b/net-analyzer/openvas-libraries/openvas-libraries-9.0.3.ebuild
@@ -0,0 +1,93 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+CMAKE_MAKEFILE_GENERATOR="emake"
+inherit cmake-utils
+MY_PN="gvm-libs"
+
+DESCRIPTION="A remote security scanner for Linux (openvas-libraries)"
+HOMEPAGE="http://www.openvas.org/"
+SRC_URI="https://github.com/greenbone/${MY_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86"
+IUSE="extras ldap radius"
+
+DEPEND="
+ dev-libs/hiredis
+ dev-libs/libgcrypt:0=
+ dev-libs/libksba
+ dev-perl/UUID
+ net-analyzer/net-snmp
+ net-libs/gnutls:=[tools]
+ net-libs/libpcap
+ net-libs/libssh:=
+ sys-libs/zlib
+ extras? ( dev-perl/CGI )
+ ldap? ( net-nds/openldap )
+ radius? ( net-dialup/freeradius-client )"
+
+RDEPEND="
+ ${DEPEND}"
+
+BDEPEND="
+ sys-devel/bison
+ sys-devel/flex
+ virtual/pkgconfig
+ extras? ( app-doc/doxygen[dot]
+ app-doc/xmltoman
+ app-text/htmldoc
+ dev-perl/SQL-Translator
+ )"
+
+PATCHES=(
+ "${FILESDIR}/${P}-gcc8.patch"
+ "${FILESDIR}/${P}-netsnmp.patch"
+ "${FILESDIR}/${P}-cachedir.patch"
+ "${FILESDIR}/${P}-rundir.patch"
+ "${FILESDIR}/${P}-underlinking.patch"
+ "${FILESDIR}/${P}-rpath.patch"
+)
+
+BUILD_DIR="${WORKDIR}/${MY_PN}-${PV}_build"
+S="${WORKDIR}/${MY_PN}-${PV}"
+
+src_prepare() {
+ cmake-utils_src_prepare
+ if use extras; then
+ doxygen -u "$S"/doc/Doxyfile_full.in || die
+ fi
+}
+
+src_configure() {
+ local mycmakeargs=(
+ "-DCMAKE_INSTALL_PREFIX=${EPREFIX}/usr"
+ "-DLOCALSTATEDIR=${EPREFIX}/var"
+ "-DSYSCONFDIR=${EPREFIX}/etc"
+ $(usex ldap -DBUILD_WITHOUT_LDAP=0 -DBUILD_WITHOUT_LDAP=1)
+ $(usex radius -DBUILD_WITHOUT_RADIUS=0 -DBUILD_WITHOUT_RADIUS=1)
+ )
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ cmake-utils_src_compile
+ if use extras; then
+ cmake-utils_src_make -C "${BUILD_DIR}" doc
+ cmake-utils_src_make doc-full -C "${BUILD_DIR}" doc
+ HTML_DOCS=( "${BUILD_DIR}"/doc/generated/html/. )
+ fi
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ insinto /usr/share/openvas
+ doins "${FILESDIR}"/OPENVAS.gentoo
+
+ keepdir /var/lib/openvas/gnupg
+ keepdir /var/log/openvas
+}