nmap: added lua (off) and ssl (on) pkg options; disable building nmapfe in cross builds.
This commit is contained in:
		
							
								
								
									
										58
									
								
								srcpkgs/nmap/patches/nolua.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										58
									
								
								srcpkgs/nmap/patches/nolua.patch
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,58 @@ | ||||
| --- output.h.orig	2013-06-12 15:19:09.516990135 +0200 | ||||
| +++ output.h	2013-06-12 15:19:21.020928401 +0200 | ||||
| @@ -255,6 +255,8 @@ void printdatafilepaths(); | ||||
|   | ||||
|  /*This is a helper function to determine the ordering of the script results | ||||
|    based on their id */ | ||||
| +#ifndef NOLUA | ||||
|  bool comparescriptids(ScriptResult first, ScriptResult second); | ||||
| +#endif | ||||
|   | ||||
|  #endif /* OUTPUT_H */ | ||||
| --- output.cc.orig	2013-06-12 15:19:48.660779884 +0200 | ||||
| +++ output.cc	2013-06-12 15:20:03.436700386 +0200 | ||||
| @@ -2615,6 +2615,7 @@ void printdatafilepaths() { | ||||
|   | ||||
|  /*This is a helper function to determine the ordering of the script results | ||||
|    based on their id */ | ||||
| +#ifndef NOLUA | ||||
|  bool comparescriptids(ScriptResult first, ScriptResult second){ | ||||
|      //Pull the two id fields out for comparison | ||||
|      std::string firstid(first.get_id()); | ||||
| @@ -2625,5 +2626,5 @@ bool comparescriptids(ScriptResult first | ||||
|      else | ||||
|          return false; | ||||
|  } | ||||
| - | ||||
| +#endif | ||||
|   | ||||
| --- Target.cc.orig	2013-06-12 15:21:41.517183480 +0200 | ||||
| +++ Target.cc	2013-06-12 15:21:56.925107771 +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() { | ||||
| --- portlist.cc.orig	2013-06-12 15:22:14.637019645 +0200 | ||||
| +++ portlist.cc	2013-06-12 15:22:27.268956160 +0200 | ||||
| @@ -146,10 +146,12 @@ void Port::freeService(bool del_service) | ||||
|   | ||||
|  void Port::freeScriptResults(void) | ||||
|  { | ||||
| +#ifndef NOLUA | ||||
|      while (!scriptResults.empty()) { | ||||
|          scriptResults.front().clear(); | ||||
|          scriptResults.pop_front(); | ||||
|      } | ||||
| +#endif | ||||
|  } | ||||
|   | ||||
|  /* Fills in namebuf (as long as there is space in buflen) with the | ||||
| @@ -1,9 +1,10 @@ | ||||
| # Template file for 'nmap' | ||||
| pkgname=nmap | ||||
| version=6.25 | ||||
| revision=1 | ||||
| revision=2 | ||||
| build_style=gnu-configure | ||||
| makedepends="libpcap-devel openssl-devel pcre-devel>=8.30 lua-devel pygtk-devel" | ||||
| configure_args="--without-ndiff" | ||||
| makedepends="libpcap-devel pcre-devel>=8.30" | ||||
| short_desc="Utility for network discovery and security auditing" | ||||
| maintainer="Juan RP <xtraeme@gmail.com>" | ||||
| license="GPL-2" | ||||
| @@ -21,6 +22,36 @@ long_desc=" | ||||
|  dozens of other characteristics. It was designed to rapidly scan large networks, | ||||
|  but works fine against single hosts." | ||||
|  | ||||
| # Package build options | ||||
| build_options="lua ssl" | ||||
| desc_option_lua="Enable support for Lua scripting" | ||||
| desc_option_ssl="Enable support for SSL" | ||||
|  | ||||
| # Enable ssl option by default. | ||||
| build_options_default="ssl" | ||||
|  | ||||
| if [ "$build_option_lua" ]; then | ||||
| 	configure_args+=" --with-liblua" | ||||
| 	makedepends+=" lua-devel" | ||||
| else | ||||
| 	configure_args+=" --without-liblua" | ||||
| fi | ||||
|  | ||||
| if [ "$build_option_ssl" ]; then | ||||
| 	configure_args+=" --with-openssl=$XBPS_CROSS_BASE/usr" | ||||
| 	makedepends+=" openssl-devel" | ||||
| else | ||||
| 	configure_args+=" --without-openssl" | ||||
| fi | ||||
|  | ||||
| if [ "$CROSS_BUILD" ]; then | ||||
| 	configure_args+=" --without-zenmap" | ||||
| fi | ||||
|  | ||||
| # XXX disable nmapfe in cross builds. | ||||
| if [ -z "$CROSS_BUILD" ]; then | ||||
| 	makedepends+=" pygtk-devel" | ||||
|  | ||||
| nmapfe_package() { | ||||
| 	noarch=yes | ||||
| 	depends="nmap>=$version desktop-file-utils pygtk" | ||||
| @@ -38,6 +69,8 @@ nmapfe_package() { | ||||
| 	} | ||||
| } | ||||
|  | ||||
| fi #!CROSS_BUILD | ||||
|  | ||||
| nmap_package() { | ||||
| 	pkg_install() { | ||||
| 		vmove usr | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Juan RP
					Juan RP