Skip to content

Commit

Permalink
net-analyzer/openvas-scanner: fix build with lld
Browse files Browse the repository at this point in the history
Closes: https://bugs.gentoo.org/740560
Package-Manager: Portage-3.0.13, Repoman-3.0.2
Signed-off-by: Jonas Licht <[email protected]>
Closes: gentoo#20124
Signed-off-by: Joonas Niilola <[email protected]>
  • Loading branch information
j-licht authored and juippis committed Mar 31, 2021
1 parent ace87d4 commit c0c542f
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
diff --git a/nasl/CMakeLists.txt b/nasl/CMakeLists.txt
index b594679c..adf9a221 100644
--- a/nasl/CMakeLists.txt
+++ b/nasl/CMakeLists.txt
@@ -87,6 +87,28 @@ endif (NOT KSBA)
message (STATUS "Looking for pcap...")
find_library (PCAP pcap)

+message (STATUS "Looking for pcap... ${PCAP}")
+if (NOT PCAP)
+ message (SEND_ERROR "The pcap library is required.")
+endif (NOT PCAP)
+
+message (STATUS "Looking for pcap-config...")
+find_program (PCAP_CONFIG pcap-config)
+
+if (PCAP_CONFIG)
+ message (STATUS "Looking for pcap-config... ${PCAP_CONFIG}")
+ execute_process (COMMAND pcap-config --libs
+ OUTPUT_VARIABLE PCAP_LDFLAGS
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ execute_process (COMMAND pcap-config --cflags
+ OUTPUT_VARIABLE PCAP_CFLAGS
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+else (PCAP_CONFIG)
+ message (STATUS "pcap-config not found, using defaults...")
+ set (PCAP_LDFLAGS "-L/usr/lib -lpcap")
+ set (PCAP_CFLAGS "-I/usr/include")
+endif (PCAP_CONFIG)
+
find_library (GPGME gpgme)
message (STATUS "Looking for gpgme... ${GPGME}")
if (NOT GPGME)
1 change: 1 addition & 0 deletions net-analyzer/openvas-scanner/openvas-scanner-20.8.1.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ BDEPEND="

PATCHES=(
"${FILESDIR}"/${PN}-7.0.1-disable-automagic-dep.patch
"${FILESDIR}"/${PN}-7.0.1-fix-linking-with-lld.patch
#qa fix for rpath
"${FILESDIR}"/${P}-rpath-qa-fix.patch
)
Expand Down
1 change: 1 addition & 0 deletions net-analyzer/openvas-scanner/openvas-scanner-7.0.1.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ BDEPEND="

PATCHES=(
"${FILESDIR}"/${P}-disable-automagic-dep.patch
"${FILESDIR}"/${P}-fix-linking-with-lld.patch
)

BUILD_DIR="${WORKDIR}/${MY_PN}-${PV}_build"
Expand Down

0 comments on commit c0c542f

Please sign in to comment.