commit:     9da6c53f8a5685abca1c718063323d005670ac2e
Author:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 25 10:06:14 2017 +0000
Commit:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Sat Mar 25 10:08:16 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9da6c53f

net-analyzer/nmap: Use a single config.cache to speed up configure.

Package-Manager: Portage-2.3.5, Repoman-2.3.2

 .../nmap/{nmap-9999.ebuild => nmap-7.40-r1.ebuild} | 32 +++++++++++++++-------
 net-analyzer/nmap/nmap-9999.ebuild                 |  9 +++---
 2 files changed, 26 insertions(+), 15 deletions(-)

diff --git a/net-analyzer/nmap/nmap-9999.ebuild 
b/net-analyzer/nmap/nmap-7.40-r1.ebuild
similarity index 86%
copy from net-analyzer/nmap/nmap-9999.ebuild
copy to net-analyzer/nmap/nmap-7.40-r1.ebuild
index 431ae56c880..cfbafe0a31b 100644
--- a/net-analyzer/nmap/nmap-9999.ebuild
+++ b/net-analyzer/nmap/nmap-7.40-r1.ebuild
@@ -5,18 +5,20 @@ EAPI=6
 
 PYTHON_COMPAT=( python2_7 )
 PYTHON_REQ_USE="sqlite,xml"
-inherit autotools flag-o-matic git-r3 python-single-r1 toolchain-funcs user
+inherit autotools flag-o-matic python-single-r1 toolchain-funcs
 
 MY_P=${P/_beta/BETA}
 
 DESCRIPTION="A utility for network discovery and security auditing"
 HOMEPAGE="http://nmap.org/";
-
-EGIT_REPO_URI="https://github.com/nmap/nmap";
-SRC_URI="https://dev.gentoo.org/~jer/nmap-logo-64.png";
+SRC_URI="
+       http://nmap.org/dist/${MY_P}.tar.bz2
+       https://dev.gentoo.org/~jer/nmap-logo-64.png
+"
 
 LICENSE="GPL-2"
 SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh 
~sparc ~x86 ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos 
~x86-macos ~sparc-solaris ~x86-solaris"
 
 IUSE="ipv6 libressl +nse system-lua ncat ndiff nls nmap-update nping ssl 
zenmap"
 NMAP_LINGUAS=( de fr hi hr it ja pl pt_BR ru zh )
@@ -54,11 +56,11 @@ S="${WORKDIR}/${MY_P}"
 PATCHES=(
        "${FILESDIR}"/${PN}-5.10_beta1-string.patch
        "${FILESDIR}"/${PN}-5.21-python.patch
-       "${FILESDIR}"/${PN}-6.25-liblua-ar.patch
        "${FILESDIR}"/${PN}-6.46-uninstaller.patch
+       "${FILESDIR}"/${PN}-6.25-liblua-ar.patch
+       "${FILESDIR}"/${PN}-7.25-no-FORTIFY_SOURCE.patch
        "${FILESDIR}"/${PN}-7.25-CXXFLAGS.patch
        "${FILESDIR}"/${PN}-7.25-libpcre.patch
-       "${FILESDIR}"/${PN}-7.25-no-FORTIFY_SOURCE.patch
        "${FILESDIR}"/${PN}-7.31-libnl.patch
 )
 
@@ -68,6 +70,11 @@ pkg_setup() {
        fi
 }
 
+src_unpack() {
+       # prevent unpacking the logo
+       unpack ${MY_P}.tar.bz2
+}
+
 src_prepare() {
        rm -r libpcap/ || die
 
@@ -95,9 +102,13 @@ src_prepare() {
                -e '/^ALL_LINGUAS =/{s|$| id|g;s|jp|ja|g}' \
                Makefile.in || die
 
+       sed -i \
+               -e '/rm -f $@/d' \
+               $(find . -name Makefile.in) \
+               || die
+
        # Fix desktop files wrt bug #432714
        sed -i \
-               -e '/^Encoding/d' \
                -e 's|^Categories=.*|Categories=Network;System;Security;|g' \
                zenmap/install_scripts/unix/zenmap-root.desktop \
                zenmap/install_scripts/unix/zenmap.desktop || die
@@ -116,17 +127,18 @@ src_configure() {
        econf \
                $(use_enable ipv6) \
                $(use_enable nls) \
-               $(use_with zenmap) \
-               $(usex nse --with-liblua=$(usex system-lua /usr included '' '') 
--without-liblua) \
                $(use_with ncat) \
                $(use_with ndiff) \
                $(use_with nmap-update) \
                $(use_with nping) \
                $(use_with ssl openssl) \
+               $(use_with zenmap) \
+               $(usex nse --with-liblua=$(usex system-lua /usr included '' '') 
--without-liblua) \
+               --cache-file="${S}"/config.cache \
                --with-libdnet=included \
                --with-pcre=/usr
+       #       Commented out because configure does weird things
        #       --with-liblinear=/usr \
-       #       Commented because configure does weird things, while 
autodetection works
 }
 
 src_compile() {

diff --git a/net-analyzer/nmap/nmap-9999.ebuild 
b/net-analyzer/nmap/nmap-9999.ebuild
index 431ae56c880..ef0334de9f3 100644
--- a/net-analyzer/nmap/nmap-9999.ebuild
+++ b/net-analyzer/nmap/nmap-9999.ebuild
@@ -97,11 +97,9 @@ src_prepare() {
 
        # Fix desktop files wrt bug #432714
        sed -i \
-               -e '/^Encoding/d' \
                -e 's|^Categories=.*|Categories=Network;System;Security;|g' \
                zenmap/install_scripts/unix/zenmap-root.desktop \
                zenmap/install_scripts/unix/zenmap.desktop || die
-
        cp libdnet-stripped/include/config.h.in{,.nmap-orig} || die
        eautoreconf
        if [[ ${CHOST} == *-darwin* ]] ; then
@@ -116,17 +114,18 @@ src_configure() {
        econf \
                $(use_enable ipv6) \
                $(use_enable nls) \
-               $(use_with zenmap) \
-               $(usex nse --with-liblua=$(usex system-lua /usr included '' '') 
--without-liblua) \
                $(use_with ncat) \
                $(use_with ndiff) \
                $(use_with nmap-update) \
                $(use_with nping) \
                $(use_with ssl openssl) \
+               $(use_with zenmap) \
+               $(usex nse --with-liblua=$(usex system-lua /usr included '' '') 
--without-liblua) \
+               --cache-file="${S}"/config.cache \
                --with-libdnet=included \
                --with-pcre=/usr
+       #       Commented out because configure does weird things
        #       --with-liblinear=/usr \
-       #       Commented because configure does weird things, while 
autodetection works
 }
 
 src_compile() {

Reply via email to