net-analyzer/nmap: Establish sys-libs/zlib dependency by Daniel M. Weeks (bug #637514).
authorJeroen Roovers <jer@gentoo.org>
Sat, 18 Nov 2017 12:44:12 +0000 (13:44 +0100)
committerJeroen Roovers <jer@gentoo.org>
Sat, 18 Nov 2017 12:44:37 +0000 (13:44 +0100)
Package-Manager: Portage-2.3.14, Repoman-2.3.6

net-analyzer/nmap/files/nmap-9999-zlib.patch [new file with mode: 0644]
net-analyzer/nmap/nmap-9999.ebuild

diff --git a/net-analyzer/nmap/files/nmap-9999-zlib.patch b/net-analyzer/nmap/files/nmap-9999-zlib.patch
new file mode 100644 (file)
index 0000000..3f260ae
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -105,7 +105,7 @@
+ NSE_HDRS+=nse_libssh2.h
+ NSE_OBJS+=nse_libssh2.o
+ endif
+-ifneq (@LIBZLIB_LIBS@,)
++ifneq (@ZLIB_LIBS@,)
+ NSE_SRC+=nse_zlib.cc
+ NSE_HDRS+=nse_zlib.h
+ NSE_OBJS+=nse_zlib.o
index d78311ad1c1bfde8033717a4521b96196a08fe0b..f92eba2649f12b9db4b2cd8e7fcbfde7e2e5f88f 100644 (file)
@@ -2,7 +2,6 @@
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
-
 PYTHON_COMPAT=( python2_7 )
 PYTHON_REQ_USE="sqlite,xml"
 inherit autotools flag-o-matic git-r3 python-single-r1 toolchain-funcs user
@@ -24,24 +23,26 @@ IUSE="
 "
 NMAP_LINGUAS=( de fr hi hr it ja pl pt_BR ru zh )
 IUSE+=" ${NMAP_LINGUAS[@]/#/linguas_}"
-
 REQUIRED_USE="
        system-lua? ( nse )
        ndiff? ( ${PYTHON_REQUIRED_USE} )
        zenmap? ( ${PYTHON_REQUIRED_USE} )
 "
-
 RDEPEND="
        dev-libs/liblinear:=
        dev-libs/libpcre
        net-libs/libpcap
-       libssh2? ( net-libs/libssh2[zlib] )
+       libssh2? (
+               net-libs/libssh2[zlib]
+               sys-libs/zlib
+       )
        ndiff? ( ${PYTHON_DEPS} )
        nls? ( virtual/libintl )
        nmap-update? (
                dev-libs/apr
                dev-vcs/subversion
        )
+       nse? ( sys-libs/zlib )
        ssl? (
                !libressl? ( dev-libs/openssl:0= )
                libressl? ( dev-libs/libressl:= )
@@ -65,6 +66,7 @@ PATCHES=(
        "${FILESDIR}"/${PN}-7.25-CXXFLAGS.patch
        "${FILESDIR}"/${PN}-7.25-libpcre.patch
        "${FILESDIR}"/${PN}-7.31-libnl.patch
+       "${FILESDIR}"/${PN}-9999-zlib.patch
 )
 S="${WORKDIR}/${MY_P}"
 
@@ -75,7 +77,7 @@ pkg_setup() {
 }
 
 src_prepare() {
-       rm -r libpcap/ || die
+       rm -r liblinear/ libpcap/ libpcre/ libssh2/ libz/ || die
 
        cat "${FILESDIR}"/nls.m4 >> "${S}"/acinclude.m4 || die
 
@@ -135,6 +137,7 @@ src_configure() {
                $(use_with ssl openssl) \
                $(use_with zenmap) \
                $(usex libssh2 --with-zlib) \
+               $(usex nse --with-zlib) \
                $(usex nse --with-liblua=$(usex system-lua /usr included '' '') --without-liblua) \
                --cache-file="${S}"/config.cache \
                --with-libdnet=included \