From 0508d641f6c6613cf5c4e4a70e564ce7ea44b1dc Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sat, 5 Oct 2013 12:06:12 +0200 Subject: fix nmap compile, update to latest upstream. uclibc++ no longer supported, because of missing dynamic_cast operator --- package/nmap/Makefile | 13 +++---------- package/nmap/patches/patch-Target_cc | 15 --------------- package/nmap/patches/patch-ncat_ncat_posix_c | 12 ++++++++++++ package/nmap/patches/patch-output_cc | 17 ----------------- package/nmap/patches/patch-output_h | 22 ---------------------- package/nmap/patches/patch-portlist_cc | 18 ------------------ package/nmap/patches/patch-service_scan_cc | 11 +++++++++++ 7 files changed, 26 insertions(+), 82 deletions(-) delete mode 100644 package/nmap/patches/patch-Target_cc create mode 100644 package/nmap/patches/patch-ncat_ncat_posix_c delete mode 100644 package/nmap/patches/patch-output_cc delete mode 100644 package/nmap/patches/patch-output_h delete mode 100644 package/nmap/patches/patch-portlist_cc create mode 100644 package/nmap/patches/patch-service_scan_cc (limited to 'package/nmap') diff --git a/package/nmap/Makefile b/package/nmap/Makefile index d259260d9..f1c7d224f 100644 --- a/package/nmap/Makefile +++ b/package/nmap/Makefile @@ -4,17 +4,16 @@ include ${TOPDIR}/rules.mk PKG_NAME:= nmap -PKG_VERSION:= 6.25 +PKG_VERSION:= 6.40 PKG_RELEASE:= 1 -PKG_MD5SUM:= fcc80f94ff3adcb11eedf91092ea6f5e +PKG_MD5SUM:= c0e2f3370e1fb97fb53185b15aa22aff PKG_DESCR:= utility for network exploration or security auditing PKG_SECTION:= net -PKG_DEPENDS:= libdnet libpcap libpcre +PKG_DEPENDS:= libdnet libpcap libpcre libstdcxx PKG_BUILDDEP:= libdnet libpcap pcre PKG_URL:= http://nmap.org/ PKG_SITES:= http://download.insecure.org/nmap/dist/ PKG_NEED_CXX:= 1 -PKG_CXX:= NMAP DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.bz2 @@ -22,17 +21,11 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,NMAP,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -LIBRARIES:=-nodefaultlibs -luClibc++ -lgcc -lm -lc -lgcc_s ifeq ($(ADK_TOOLCHAIN_GCC_USE_SSP),y) LIBRARIES+=-lssp -lssp_nonshared endif TARGET_CPPFLAGS+= -DNOLUA -ifeq ($(ADK_COMPILE_NMAP_WITH_UCLIBCXX),y) -CONFIGURE_ENV+= CXXFLAGS="-fno-threadsafe-statics -fno-builtin -fno-rtti -nostdinc++ \ - -I${STAGING_TARGET_DIR}/usr/include/uClibc++" \ - LIBS="${LIBRARIES}" -endif CONFIGURE_ARGS+= --without-openssl \ --without-zenmap \ --without-ndiff \ diff --git a/package/nmap/patches/patch-Target_cc b/package/nmap/patches/patch-Target_cc deleted file mode 100644 index 4358b4509..000000000 --- a/package/nmap/patches/patch-Target_cc +++ /dev/null @@ -1,15 +0,0 @@ ---- nmap-6.25.orig/Target.cc 2012-08-14 18:36:25.000000000 +0200 -+++ nmap-6.25/Target.cc 2013-07-12 13:59:19.000000000 +0200 -@@ -162,10 +162,12 @@ void Target::Recycle() { - - Target::~Target() { - FreeInternal(); -+#ifndef NOLUA - while (!scriptResults.empty()) { - scriptResults.front().clear(); - scriptResults.pop_front(); - } -+#endif - } - - void Target::FreeInternal() { diff --git a/package/nmap/patches/patch-ncat_ncat_posix_c b/package/nmap/patches/patch-ncat_ncat_posix_c new file mode 100644 index 000000000..da6bb733d --- /dev/null +++ b/package/nmap/patches/patch-ncat_ncat_posix_c @@ -0,0 +1,12 @@ +--- nmap-6.40.orig/ncat/ncat_posix.c 2013-07-29 02:03:01.000000000 +0200 ++++ nmap-6.40/ncat/ncat_posix.c 2013-10-05 11:01:16.000000000 +0200 +@@ -122,7 +122,9 @@ + /* $Id$ */ + + #include "ncat.h" ++#ifdef HAVE_LUA + #include "ncat_lua.h" ++#endif + + char **cmdline_split(const char *cmdexec); + diff --git a/package/nmap/patches/patch-output_cc b/package/nmap/patches/patch-output_cc deleted file mode 100644 index f43036e11..000000000 --- a/package/nmap/patches/patch-output_cc +++ /dev/null @@ -1,17 +0,0 @@ ---- nmap-6.25.orig/output.cc 2012-11-29 04:19:52.000000000 +0100 -+++ nmap-6.25/output.cc 2013-07-12 14:06:38.000000000 +0200 -@@ -2613,6 +2613,7 @@ void printdatafilepaths() { - } - } - -+#ifndef NOLUA - /*This is a helper function to determine the ordering of the script results - based on their id */ - bool comparescriptids(ScriptResult first, ScriptResult second){ -@@ -2625,5 +2626,6 @@ bool comparescriptids(ScriptResult first - else - return false; - } -+#endif - - diff --git a/package/nmap/patches/patch-output_h b/package/nmap/patches/patch-output_h deleted file mode 100644 index 8dd3e4651..000000000 --- a/package/nmap/patches/patch-output_h +++ /dev/null @@ -1,22 +0,0 @@ ---- nmap-6.25.orig/output.h 2012-08-14 18:36:25.000000000 +0200 -+++ nmap-6.25/output.h 2013-07-12 14:06:07.000000000 +0200 -@@ -226,6 +226,10 @@ std::string protect_xml(const std::strin - void printscriptresults(ScriptResults *scriptResults, stype scantype); - - void printhostscriptresults(Target *currenths); -+ -+/*This is a helper function to determine the ordering of the script results -+ based on their id */ -+bool comparescriptids(ScriptResult first, ScriptResult second); - #endif - - /* Print a table with traceroute hops. */ -@@ -253,8 +257,4 @@ void printfinaloutput(); - were found. */ - void printdatafilepaths(); - --/*This is a helper function to determine the ordering of the script results -- based on their id */ --bool comparescriptids(ScriptResult first, ScriptResult second); -- - #endif /* OUTPUT_H */ diff --git a/package/nmap/patches/patch-portlist_cc b/package/nmap/patches/patch-portlist_cc deleted file mode 100644 index a974ca013..000000000 --- a/package/nmap/patches/patch-portlist_cc +++ /dev/null @@ -1,18 +0,0 @@ ---- nmap-6.25.orig/portlist.cc 2012-10-11 06:45:50.000000000 +0200 -+++ nmap-6.25/portlist.cc 2013-07-12 14:10:04.000000000 +0200 -@@ -144,6 +144,7 @@ void Port::freeService(bool del_service) - } - } - -+#ifndef NOLUA - void Port::freeScriptResults(void) - { - while (!scriptResults.empty()) { -@@ -151,6 +152,7 @@ void Port::freeScriptResults(void) - scriptResults.pop_front(); - } - } -+#endif - - /* Fills in namebuf (as long as there is space in buflen) with the - Name nmap normal output will use to describe the port. This takes diff --git a/package/nmap/patches/patch-service_scan_cc b/package/nmap/patches/patch-service_scan_cc new file mode 100644 index 000000000..39a91a8c8 --- /dev/null +++ b/package/nmap/patches/patch-service_scan_cc @@ -0,0 +1,11 @@ +--- nmap-6.40.orig/service_scan.cc 2013-07-29 00:08:48.000000000 +0200 ++++ nmap-6.40/service_scan.cc 2013-10-05 11:24:37.000000000 +0200 +@@ -1202,7 +1202,7 @@ bool ServiceProbe::portIsProbable(enum s + + portv = (tunnel == SERVICE_TUNNEL_SSL)? &probablesslports : &probableports; + +- if (find(portv->begin(), portv->end(), portno) == portv->end()) ++ if (std::find(portv->begin(), portv->end(), portno) == portv->end()) + return false; + return true; + } -- cgit v1.2.3