net-analyzer/nmap: SUBDIRS: Use a patch instead of a sed script
authorJeroen Roovers <jer@gentoo.org>
Sun, 11 Aug 2019 10:00:52 +0000 (12:00 +0200)
committerJeroen Roovers <jer@gentoo.org>
Sun, 11 Aug 2019 10:06:09 +0000 (12:06 +0200)
Package-Manager: Portage-2.3.71, Repoman-2.3.17
Signed-off-by: Jeroen Roovers <jer@gentoo.org>
net-analyzer/nmap/files/nmap-7.80-ac-config-subdirs.patch [new file with mode: 0644]
net-analyzer/nmap/nmap-7.80.ebuild
net-analyzer/nmap/nmap-9999.ebuild

diff --git a/net-analyzer/nmap/files/nmap-7.80-ac-config-subdirs.patch b/net-analyzer/nmap/files/nmap-7.80-ac-config-subdirs.patch
new file mode 100644 (file)
index 0000000..583f7f1
--- /dev/null
@@ -0,0 +1,26 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -468,7 +468,6 @@
+ fi
+ if test $have_libpcap != yes; then
+-  AC_CONFIG_SUBDIRS(libpcap)
+   if test "${LIBPCAP_INC+set}" = "set"; then
+     CPPFLAGS="$CPPFLAGS -I$LIBPCAP_INC"
+   else
+@@ -611,7 +610,6 @@
+   fi
+   if test $have_libz != yes; then
+-    AC_CONFIG_SUBDIRS(libz)
+     # TODO: This doesn't work because libssh2's configure script is looking for
+     # already-built libs.  Giving up for now: build libz first or install
+     # headers/libs on your own if you want compression support for SSH.
+@@ -697,7 +695,6 @@
+   # If we still don't have it, we use our own
+   if test $have_libssh2 != yes; then
+     have_libssh2=yes
+-    AC_CONFIG_SUBDIRS(libssh2)
+     CPPFLAGS="-I\$(top_srcdir)/$LIBSSH2DIR/include $CPPFLAGS"
+     LIBSSH2_LIBS="$LIBSSH2DIR/lib/libssh2.a"
+     LIBSSH2_BUILD="build-libssh2"
index cf94423c0af1cf98280f41905ef739494020a638..b3ddc62aa35b0bbd220a70947e8e753b291e6b7f 100644 (file)
@@ -67,6 +67,7 @@ PATCHES=(
        "${FILESDIR}"/${PN}-7.25-CXXFLAGS.patch
        "${FILESDIR}"/${PN}-7.25-libpcre.patch
        "${FILESDIR}"/${PN}-7.31-libnl.patch
+       "${FILESDIR}"/${PN}-7.80-ac-config-subdirs.patch
 )
 S="${WORKDIR}/${MY_P}"
 
@@ -108,11 +109,6 @@ src_prepare() {
                zenmap/install_scripts/unix/zenmap-root.desktop \
                zenmap/install_scripts/unix/zenmap.desktop || die
 
-       sed -i \
-               -e '/AC_CONFIG_SUBDIRS(libz)/d' \
-               -e '/AC_CONFIG_SUBDIRS(libssh2)/d' \
-               configure.ac
-
        cp libdnet-stripped/include/config.h.in{,.nmap-orig} || die
 
        eautoreconf
index 6b625c9459bf86443c40a9082e64343f9b7f3a54..4c5cd498f4945df5d95716ef6debcc495e8175fe 100644 (file)
@@ -65,6 +65,7 @@ PATCHES=(
        "${FILESDIR}"/${PN}-7.25-CXXFLAGS.patch
        "${FILESDIR}"/${PN}-7.25-libpcre.patch
        "${FILESDIR}"/${PN}-7.31-libnl.patch
+       "${FILESDIR}"/${PN}-7.80-ac-config-subdirs.patch
 )
 S="${WORKDIR}/${MY_P}"
 
@@ -106,11 +107,6 @@ src_prepare() {
                zenmap/install_scripts/unix/zenmap-root.desktop \
                zenmap/install_scripts/unix/zenmap.desktop || die
 
-       sed -i \
-               -e '/AC_CONFIG_SUBDIRS(libz)/d' \
-               -e '/AC_CONFIG_SUBDIRS(libssh2)/d' \
-               configure.ac
-
        cp libdnet-stripped/include/config.h.in{,.nmap-orig} || die
 
        eautoreconf