commit:     ee08f602190ef809dda2cd38fc422b7611fe186a
Author:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Fri Jul 29 08:12:29 2016 +0000
Commit:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Fri Jul 29 08:12:43 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ee08f602

net-analyzer/nmap: Detect EC support in dev-libs/openssl (bug #589658).

Package-Manager: portage-2.3.0

 net-analyzer/nmap/files/nmap-7.25-EC.patch | 38 ++++++++++++++++++++++++++++++
 net-analyzer/nmap/nmap-7.25_beta1.ebuild   |  7 ++++--
 net-analyzer/nmap/nmap-9999.ebuild         |  7 ++++--
 3 files changed, 48 insertions(+), 4 deletions(-)

diff --git a/net-analyzer/nmap/files/nmap-7.25-EC.patch 
b/net-analyzer/nmap/files/nmap-7.25-EC.patch
new file mode 100644
index 0000000..fff5679
--- /dev/null
+++ b/net-analyzer/nmap/files/nmap-7.25-EC.patch
@@ -0,0 +1,38 @@
+ - Check for EVP_PKEY_get1_EC_KEY
+ - Comment out inappropriate AC_CONFIG_SUBDIRS
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -387,6 +387,12 @@
+     AC_MSG_WARN([Failed to find libssl so OpenSSL will not be used. If it is 
installed you can try the --with-openssl=DIR argument]) ],
+     [ -lcrypto ])
+  fi
++
++ if test "$use_openssl" = "yes"; then
++  AC_CHECK_LIB(crypto, EVP_PKEY_get1_EC_KEY,
++   [AC_DEFINE(HAVE_EVP_PKEY_EC, 1, [Have EVP_PKEY_get1_EC_KEY])],
++   [AC_MSG_WARN([Disabling support for EC crypto])])
++ fi
+ fi
+ 
+ OPENSSL_LIBS=
+@@ -516,7 +522,7 @@
+ 
+ # If we still don't have it, we use our own
+ if test $have_pcre != yes ; then
+-  AC_CONFIG_SUBDIRS( libpcre )
++#  AC_CONFIG_SUBDIRS( libpcre )
+   CPPFLAGS="-I\$(top_srcdir)/$LIBPCREDIR $CPPFLAGS"
+   LIBPCRE_LIBS="$LIBPCREDIR/libpcre.a"
+   PCRE_BUILD="build-pcre"
+--- a/nse_ssl_cert.cc
++++ b/nse_ssl_cert.cc
+@@ -434,7 +434,7 @@
+ }
+ 
+ int lua_push_ecdhparams(lua_State *L, EVP_PKEY *pubkey) {
+-#ifdef EVP_PKEY_EC
++#ifdef HAVE_EVP_PKEY_EC
+   EC_KEY *ec_key = EVP_PKEY_get1_EC_KEY(pubkey);
+   const EC_GROUP *group = EC_KEY_get0_group(ec_key);
+   int nid;

diff --git a/net-analyzer/nmap/nmap-7.25_beta1.ebuild 
b/net-analyzer/nmap/nmap-7.25_beta1.ebuild
index ff216a8..2005f65 100644
--- a/net-analyzer/nmap/nmap-7.25_beta1.ebuild
+++ b/net-analyzer/nmap/nmap-7.25_beta1.ebuild
@@ -6,7 +6,7 @@ EAPI=5
 
 PYTHON_COMPAT=( python2_7 )
 PYTHON_REQ_USE="sqlite,xml"
-inherit eutils flag-o-matic python-single-r1 toolchain-funcs
+inherit autotools eutils flag-o-matic python-single-r1 toolchain-funcs
 
 MY_P=${P/_beta/BETA}
 
@@ -74,7 +74,8 @@ src_prepare() {
                "${FILESDIR}"/${PN}-6.46-uninstaller.patch \
                "${FILESDIR}"/${PN}-6.47-no-libnl.patch \
                "${FILESDIR}"/${PN}-6.25-liblua-ar.patch \
-               "${FILESDIR}"/${PN}-7.25-no-FORTIFY_SOURCE.patch
+               "${FILESDIR}"/${PN}-7.25-no-FORTIFY_SOURCE.patch \
+               "${FILESDIR}"/${PN}-7.25-EC.patch
 
        if use nls; then
                local lingua=''
@@ -109,6 +110,8 @@ src_prepare() {
                zenmap/install_scripts/unix/zenmap.desktop || die
 
        epatch_user
+
+       eautoreconf
 }
 
 src_configure() {

diff --git a/net-analyzer/nmap/nmap-9999.ebuild 
b/net-analyzer/nmap/nmap-9999.ebuild
index 40c25d6..83ebe88 100644
--- a/net-analyzer/nmap/nmap-9999.ebuild
+++ b/net-analyzer/nmap/nmap-9999.ebuild
@@ -6,7 +6,7 @@ EAPI=5
 
 PYTHON_COMPAT=( python2_7 )
 PYTHON_REQ_USE="sqlite,xml"
-inherit eutils flag-o-matic git-r3 python-single-r1 toolchain-funcs user
+inherit autotools eutils flag-o-matic git-r3 python-single-r1 toolchain-funcs 
user
 
 MY_P=${P/_beta/BETA}
 
@@ -67,7 +67,8 @@ src_prepare() {
                "${FILESDIR}"/${PN}-6.25-liblua-ar.patch \
                "${FILESDIR}"/${PN}-6.46-uninstaller.patch \
                "${FILESDIR}"/${PN}-6.47-no-libnl.patch \
-               "${FILESDIR}"/${PN}-7.25-no-FORTIFY_SOURCE.patch
+               "${FILESDIR}"/${PN}-7.25-no-FORTIFY_SOURCE.patch \
+               "${FILESDIR}"/${PN}-7.25-EC.patch
 
        if use nls; then
                local lingua=''
@@ -97,6 +98,8 @@ src_prepare() {
                zenmap/install_scripts/unix/zenmap.desktop || die
 
        epatch_user
+
+       eautoreconf
 }
 
 src_configure() {

Reply via email to