Browse Source

fix nmap compile, update to latest upstream. uclibc++ no longer supported, because of missing dynamic_cast operator

Waldemar Brodkorb 10 years ago
parent
commit
0508d641f6

+ 3 - 10
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 \

+ 0 - 15
package/nmap/patches/patch-Target_cc

@@ -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() {

+ 12 - 0
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);
+ 

+ 0 - 17
package/nmap/patches/patch-output_cc

@@ -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
- 
- 

+ 0 - 22
package/nmap/patches/patch-output_h

@@ -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 */

+ 0 - 18
package/nmap/patches/patch-portlist_cc

@@ -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

+ 11 - 0
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;
+ }