diff options
Diffstat (limited to 'net-analyzer/nmap')
18 files changed, 1186 insertions, 0 deletions
diff --git a/net-analyzer/nmap/Manifest b/net-analyzer/nmap/Manifest new file mode 100644 index 000000000000..a81338c01eaa --- /dev/null +++ b/net-analyzer/nmap/Manifest @@ -0,0 +1,3 @@ +DIST nmap-6.47.tar.bz2 7878122 SHA256 8fa11e9e203ce2d81a207db5ca4f110a525f6c01c1dd0018325a7112a51aa591 SHA512 f98b92a26f4e912fe15c36a21dfff7bfb9f11c2410f4035330100648fbad7f808ef9e069c63704bbb50199272ae65ea81555de6c97eb8ee152114f44ed5a9296 WHIRLPOOL 4f92f0aeaaa03a94dc27080b5f0c2396325f282b7a781d163d1e05a71117896c4581154b58383f136eed1fcf2cce8f1b94e3344f3fc5d4955cf1f4cfc1417573 +DIST nmap-6.49BETA2.tar.bz2 8810504 SHA256 e2f2aaa872fec288b927ceb59500edba198d8767adbe3a83a939e7921b224b79 SHA512 f21f0e6677c5936d49aab0a7de083b1309c49a91289691636d5ad1dfa052426d657b0a1df30519fcda712007abee0a4cd1bf89963b2e6758b11d2c18d96d637e WHIRLPOOL 1fd1b57f6b95526fabfd30cdee3064b6626735b51fcd23b8b3e91609e1b7fc126f0fd97fc2f2d478f8035ae148830afb5ab5c6bc454ac518a3023b566e1c100d +DIST nmap-logo-64.png 3289 SHA256 4c72ff1eeffeeaa1039b251d9f2d675936e65db686fe3b57a35c2183ce67a8aa SHA512 fb102d12aaeebc8a97543ecd653a3606e86996ad679bc26d6e6e274ad05ec3e9f92521289d1a24153c521b699e8c0cfa65d8856bb49af53ee4837268bbc6b5d3 WHIRLPOOL 6093aadcb9880587e17d39d45fcbe57bb62777f220655e6ed5b5f900ce49cb8c5a53e24d7db0de6f8909eb0f8981f7565e6ae9b9bf9283a4ccccb0526eab5313 diff --git a/net-analyzer/nmap/files/nmap-4.75-nolua.patch b/net-analyzer/nmap/files/nmap-4.75-nolua.patch new file mode 100644 index 000000000000..30bb1e0c8669 --- /dev/null +++ b/net-analyzer/nmap/files/nmap-4.75-nolua.patch @@ -0,0 +1,10 @@ +diff -Naur nmap-4.75-orig/Makefile.in nmap-4.75/Makefile.in +--- nmap-4.75-orig/Makefile.in 2008-09-05 07:32:06.000000000 +0200 ++++ nmap-4.75/Makefile.in 2008-09-09 16:34:38.000000000 +0200 +@@ -258,5 +258,5 @@ + ./config.status --recheck + + makefile.dep: +- $(CXX) -MM $(CPPFLAGS) $(SRCS) > $@ ++ $(CXX) -MM $(CPPFLAGS) $(CXXFLAGS) $(SRCS) > $@ + include makefile.dep diff --git a/net-analyzer/nmap/files/nmap-5.10_beta1-string.patch b/net-analyzer/nmap/files/nmap-5.10_beta1-string.patch new file mode 100644 index 000000000000..df29db3782d5 --- /dev/null +++ b/net-analyzer/nmap/files/nmap-5.10_beta1-string.patch @@ -0,0 +1,11 @@ +--- nmap-5.10BETA1/Target.h.org 2009-12-08 08:21:59.000000000 +0100 ++++ nmap-5.10BETA1/Target.h 2009-12-08 08:22:02.000000000 +0100 +@@ -99,6 +99,8 @@ + + #ifndef NOLUA + #include "nse_main.h" ++#else ++#include <string> + #endif + + #include "portreasons.h" diff --git a/net-analyzer/nmap/files/nmap-5.21-python.patch b/net-analyzer/nmap/files/nmap-5.21-python.patch new file mode 100644 index 000000000000..aa0d4f9db953 --- /dev/null +++ b/net-analyzer/nmap/files/nmap-5.21-python.patch @@ -0,0 +1,21 @@ +diff -Naurp nmap-5.21-orig/Makefile.in nmap-5.21/Makefile.in +--- nmap-5.21-orig/Makefile.in 2010-01-31 09:53:53.000000000 +0100 ++++ nmap-5.21/Makefile.in 2010-01-31 09:54:48.000000000 +0100 +@@ -253,7 +253,7 @@ build-zenmap: $(ZENMAPDIR)/setup.py $(ZE + + install-zenmap: $(ZENMAPDIR)/setup.py + $(INSTALL) -d $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)/man1 +- cd $(ZENMAPDIR) && $(PYTHON) setup.py --quiet install --prefix "$(prefix)" --force $(if $(DESTDIR),--root "$(DESTDIR)") ++ cd $(ZENMAPDIR) && $(PYTHON) setup.py --quiet install --prefix "$(prefix)" --force $(if $(DESTDIR),--root "$(DESTDIR)") --no-compile + $(INSTALL) -c -m 644 docs/zenmap.1 $(DESTDIR)$(mandir)/man1/ + # Create a symlink from nmapfe to zenmap if nmapfe doesn't exist or is + # already a link. +@@ -267,7 +267,7 @@ build-ndiff: + cd $(NDIFFDIR) && $(PYTHON) setup.py build $(if $(DESTDIR),--executable "$(DEFAULT_PYTHON_PATH)") + + install-ndiff: +- cd $(NDIFFDIR) && $(PYTHON) setup.py install --prefix "$(prefix)" $(if $(DESTDIR),--root "$(DESTDIR)") ++ cd $(NDIFFDIR) && $(PYTHON) setup.py install --prefix "$(prefix)" $(if $(DESTDIR),--root "$(DESTDIR)") --no-compile + + NSE_FILES = scripts/script.db scripts/*.nse + NSE_LIB_LUA_FILES = nselib/*.lua diff --git a/net-analyzer/nmap/files/nmap-6.01-make.patch b/net-analyzer/nmap/files/nmap-6.01-make.patch new file mode 100644 index 000000000000..2711b3168b2e --- /dev/null +++ b/net-analyzer/nmap/files/nmap-6.01-make.patch @@ -0,0 +1,20 @@ +--- a/Makefile.in ++++ b/Makefile.in +@@ -119,6 +119,8 @@ + rm -f $@ + $(CXX) $(LDFLAGS) -o $@ $(OBJS) $(LIBS) + ++$(NBASEDIR)/libnbase.a: nbase_build ++ + build-%: %/Makefile + cd $* && $(MAKE) + +@@ -152,7 +154,7 @@ + liblinear_build: $(LIBLINEARDIR)/Makefile + @echo Compiling liblinear; cd $(LIBLINEARDIR) && $(MAKE) liblinear.a CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" + +-build-nmap-update: nmap-update/default_channel.h ++build-nmap-update: nbase_build nmap-update/default_channel.h + + #$(LIBPCAPDIR)/Makefile: + # @echo Configuring libpcap; cd $(LIBPCAPDIR); ./configure diff --git a/net-analyzer/nmap/files/nmap-6.25-liblua-ar.patch b/net-analyzer/nmap/files/nmap-6.25-liblua-ar.patch new file mode 100644 index 000000000000..5aa9fa7f631c --- /dev/null +++ b/net-analyzer/nmap/files/nmap-6.25-liblua-ar.patch @@ -0,0 +1,20 @@ +--- a/liblua/Makefile ++++ b/liblua/Makefile +@@ -11,7 +11,7 @@ + LDFLAGS= $(SYSLDFLAGS) $(MYLDFLAGS) + LIBS= -lm $(SYSLIBS) $(MYLIBS) + +-AR= ar rcu ++AR= ar + RANLIB= ranlib + RM= rm -f + +@@ -56,7 +56,7 @@ + a: $(ALL_A) + + $(LUA_A): $(BASE_O) +- $(AR) $@ $(BASE_O) ++ $(AR) rcu $@ $(BASE_O) + $(RANLIB) $@ + + $(LUA_T): $(LUA_O) $(LUA_A) diff --git a/net-analyzer/nmap/files/nmap-6.46-uninstaller.patch b/net-analyzer/nmap/files/nmap-6.46-uninstaller.patch new file mode 100644 index 000000000000..6b43f8f5a069 --- /dev/null +++ b/net-analyzer/nmap/files/nmap-6.46-uninstaller.patch @@ -0,0 +1,19 @@ +--- a/zenmap/setup.py ++++ b/zenmap/setup.py +@@ -245,7 +245,6 @@ + self.set_perms() + self.set_modules_path() + self.fix_paths() +- self.create_uninstaller() + self.write_installed_files() + + def get_installed_files(self): +@@ -263,8 +262,6 @@ + os.path.join(self.install_data, data_dir)): + for dir in dirs: + installed_files.append(os.path.join(dirpath, dir)) +- installed_files.append( +- os.path.join(self.install_scripts, "uninstall_" + APP_NAME)) + return installed_files + + def create_uninstaller(self): diff --git a/net-analyzer/nmap/files/nmap-6.47-ncat-lua.patch b/net-analyzer/nmap/files/nmap-6.47-ncat-lua.patch new file mode 100644 index 000000000000..27df06b9b710 --- /dev/null +++ b/net-analyzer/nmap/files/nmap-6.47-ncat-lua.patch @@ -0,0 +1,11 @@ +--- a/Makefile.in ++++ b/Makefile.in +@@ -145,7 +145,7 @@ + @echo Compiling libnetutil; + cd libnetutil && $(MAKE) + +-ncat_build: $(NCATDIR)/Makefile nbase_build nsock_build $(NCATDIR)/ncat.h @PCAP_BUILD@ ++ncat_build: $(NCATDIR)/Makefile nbase_build nsock_build @LUA_BUILD@ $(NCATDIR)/ncat.h @PCAP_BUILD@ + cd $(NCATDIR) && $(MAKE) + + lua_build: $(LIBLUADIR)/Makefile diff --git a/net-analyzer/nmap/files/nmap-6.47-no-FORTIFY_SOURCE.patch b/net-analyzer/nmap/files/nmap-6.47-no-FORTIFY_SOURCE.patch new file mode 100644 index 000000000000..9b2993f59ea4 --- /dev/null +++ b/net-analyzer/nmap/files/nmap-6.47-no-FORTIFY_SOURCE.patch @@ -0,0 +1,77 @@ +--- a/Makefile.in ++++ b/Makefile.in +@@ -40,7 +40,7 @@ + # http://gcc.gnu.org/ml/gcc-patches/2004-09/msg02055.html + # Level 1 only makes changes that don't affect "conforming" programs, + # while level 2 enforces additional restrictions. +-DEFS += -D_FORTIFY_SOURCE=2 ++#DEFS += -D_FORTIFY_SOURCE=2 + # For mtrace debugging -- see MTRACE define in main.cc for instructions + # Should only be enabled during debugging and not in any real release. + # DEFS += -DMTRACE=1 +--- a/nsock/src/Makefile.in ++++ b/nsock/src/Makefile.in +@@ -13,7 +13,7 @@ + CCOPT = + DEFS = @DEFS@ -DNSOCK_VERSION=\"$(NSOCK_VERSION)\" + # With GCC, add extra security checks to source code. +-DEFS += -D_FORTIFY_SOURCE=2 ++#DEFS += -D_FORTIFY_SOURCE=2 + INCLS = -I../include + CFLAGS = @CFLAGS@ $(CCOPT) + # CFLAGS = -g -Wall $(DEFS) $(INCLS) +--- a/nping/Makefile.in ++++ b/nping/Makefile.in +@@ -37,7 +37,7 @@ + # http://gcc.gnu.org/ml/gcc-patches/2004-09/msg02055.html + # Level 1 only makes changes that don't affect "conforming" programs, + # while level 2 enforces additional restrictions. +-DEFS += -D_FORTIFY_SOURCE=2 ++#DEFS += -D_FORTIFY_SOURCE=2 + # For mtrace debugging -- see MTRACE define in main.cc for instructions + # Should only be enabled during debugging and not in any real release. + # DEFS += -DMTRACE=1 +--- a/libnetutil/Makefile.in ++++ b/libnetutil/Makefile.in +@@ -5,7 +5,7 @@ + CXXFLAGS = @CXXFLAGS@ + CPPFLAGS = @CPPFLAGS@ $(DEFS) + DEFS = @DEFS@ +-DEFS += -D_FORTIFY_SOURCE=2 ++#DEFS += -D_FORTIFY_SOURCE=2 + AR = ar + RANLIB = @RANLIB@ + +--- a/ncat/Makefile.in ++++ b/ncat/Makefile.in +@@ -52,7 +52,7 @@ + LIBS = @LIBS@ + DEFS = @DEFS@ -DNCAT_DATADIR="\"$(pkgdatadir)\"" + # With GCC, add extra security checks to source code. +-DEFS += -D_FORTIFY_SOURCE=2 ++#DEFS += -D_FORTIFY_SOURCE=2 + INCLS = -I. -I.. -I../nsock/include/ -I$(NBASEDIR) + RM = rm -f + STRIP = @STRIP@ +--- a/nbase/Makefile.in ++++ b/nbase/Makefile.in +@@ -11,7 +11,7 @@ + CCOPT = + DEFS = @DEFS@ + # With GCC, add extra security checks to source code. +-DEFS += -D_FORTIFY_SOURCE=2 ++#DEFS += -D_FORTIFY_SOURCE=2 + CPPFLAGS = @CPPFLAGS@ + CFLAGS = @CFLAGS@ $(CCOPT) $(GLIB_CFLAGS) $(DEFS) $(INCLS) + STATIC = +--- a/nmap-update/Makefile.in ++++ b/nmap-update/Makefile.in +@@ -10,7 +10,7 @@ + CPPFLAGS = @CPPFLAGS@ $(DEFS) -I$(NBASEDIR) + LDFLAGS = @LDFLAGS@ + LIBS = @LIBS@ $(NBASELIB) +-DEFS = @DEFS@ -D_FORTIFY_SOURCE=2 ++DEFS = @DEFS@ + + INSTALL = @INSTALL@ + STRIP = @STRIP@ diff --git a/net-analyzer/nmap/files/nmap-6.47-no-libnl.patch b/net-analyzer/nmap/files/nmap-6.47-no-libnl.patch new file mode 100644 index 000000000000..0e0c6b70beff --- /dev/null +++ b/net-analyzer/nmap/files/nmap-6.47-no-libnl.patch @@ -0,0 +1,70 @@ +nping does not call anything nl_* related so it should not link against libnl (bug #529244) +Patching configure.ac would be best but eautoreconf does not handle the subdirs very well. + +--- a/nping/configure ++++ b/nping/configure +@@ -4865,64 +4865,6 @@ + fi + + +-# libpcap can require libnl +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing nl_handle_alloc" >&5 +-$as_echo_n "checking for library containing nl_handle_alloc... " >&6; } +-if ${ac_cv_search_nl_handle_alloc+:} false; then : +- $as_echo_n "(cached) " >&6 +-else +- ac_func_search_save_LIBS=$LIBS +-cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +- +-/* Override any GCC internal prototype to avoid an error. +- Use char because int might match the return type of a GCC +- builtin and then its argument prototype would still apply. */ +-#ifdef __cplusplus +-extern "C" +-#endif +-char nl_handle_alloc (); +-int +-main () +-{ +-return nl_handle_alloc (); +- ; +- return 0; +-} +-_ACEOF +-for ac_lib in '' nl; do +- if test -z "$ac_lib"; then +- ac_res="none required" +- else +- ac_res=-l$ac_lib +- LIBS="-l$ac_lib $ac_func_search_save_LIBS" +- fi +- if ac_fn_c_try_link "$LINENO"; then : +- ac_cv_search_nl_handle_alloc=$ac_res +-fi +-rm -f core conftest.err conftest.$ac_objext \ +- conftest$ac_exeext +- if ${ac_cv_search_nl_handle_alloc+:} false; then : +- break +-fi +-done +-if ${ac_cv_search_nl_handle_alloc+:} false; then : +- +-else +- ac_cv_search_nl_handle_alloc=no +-fi +-rm conftest.$ac_ext +-LIBS=$ac_func_search_save_LIBS +-fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_nl_handle_alloc" >&5 +-$as_echo "$ac_cv_search_nl_handle_alloc" >&6; } +-ac_res=$ac_cv_search_nl_handle_alloc +-if test "$ac_res" != no; then : +- test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" +- +-fi +- +- + # We test whether they specified openssl desires explicitly + use_openssl="yes" + specialssldir="" diff --git a/net-analyzer/nmap/files/nmap-6.49-no-FORTIFY_SOURCE.patch b/net-analyzer/nmap/files/nmap-6.49-no-FORTIFY_SOURCE.patch new file mode 100644 index 000000000000..383975493be9 --- /dev/null +++ b/net-analyzer/nmap/files/nmap-6.49-no-FORTIFY_SOURCE.patch @@ -0,0 +1,71 @@ +--- a/Makefile.in ++++ b/Makefile.in +@@ -41,7 +41,6 @@ + # http://gcc.gnu.org/ml/gcc-patches/2004-09/msg02055.html + # Level 1 only makes changes that don't affect "conforming" programs, + # while level 2 enforces additional restrictions. +-DEFS += -D_FORTIFY_SOURCE=2 + # For mtrace debugging -- see MTRACE define in main.cc for instructions + # Should only be enabled during debugging and not in any real release. + # DEFS += -DMTRACE=1 +--- a/nsock/src/Makefile.in ++++ b/nsock/src/Makefile.in +@@ -13,7 +13,6 @@ + CCOPT = + DEFS = @DEFS@ -DNSOCK_VERSION=\"$(NSOCK_VERSION)\" + # With GCC, add extra security checks to source code. +-DEFS += -D_FORTIFY_SOURCE=2 + INCLS = -I../include + CFLAGS = @CFLAGS@ $(CCOPT) + # CFLAGS = -g -Wall $(DEFS) $(INCLS) +--- a/nping/Makefile.in ++++ b/nping/Makefile.in +@@ -38,7 +38,6 @@ + # http://gcc.gnu.org/ml/gcc-patches/2004-09/msg02055.html + # Level 1 only makes changes that don't affect "conforming" programs, + # while level 2 enforces additional restrictions. +-DEFS += -D_FORTIFY_SOURCE=2 + # For mtrace debugging -- see MTRACE define in main.cc for instructions + # Should only be enabled during debugging and not in any real release. + # DEFS += -DMTRACE=1 +--- a/libnetutil/Makefile.in ++++ b/libnetutil/Makefile.in +@@ -5,7 +5,6 @@ + CXXFLAGS = @CXXFLAGS@ + CPPFLAGS = @CPPFLAGS@ $(DEFS) + DEFS = @DEFS@ +-DEFS += -D_FORTIFY_SOURCE=2 + AR = ar + RANLIB = @RANLIB@ + +--- a/ncat/Makefile.in ++++ b/ncat/Makefile.in +@@ -53,7 +53,6 @@ + LIBS = @LIBS@ + DEFS = @DEFS@ -DNCAT_DATADIR="\"$(pkgdatadir)\"" + # With GCC, add extra security checks to source code. +-DEFS += -D_FORTIFY_SOURCE=2 + INCLS = -I. -I.. -I../nsock/include/ -I$(NBASEDIR) + RM = rm -f + STRIP = @STRIP@ +--- a/nbase/Makefile.in ++++ b/nbase/Makefile.in +@@ -12,7 +12,6 @@ + CCOPT = + DEFS = @DEFS@ + # With GCC, add extra security checks to source code. +-DEFS += -D_FORTIFY_SOURCE=2 + CPPFLAGS = @CPPFLAGS@ + CFLAGS = @CFLAGS@ $(CCOPT) $(GLIB_CFLAGS) $(DEFS) $(INCLS) + STATIC = +--- a/nmap-update/Makefile.in ++++ b/nmap-update/Makefile.in +@@ -11,7 +11,7 @@ + CPPFLAGS = @CPPFLAGS@ $(DEFS) -I$(NBASEDIR) + LDFLAGS = @LDFLAGS@ + LIBS = @LIBS@ $(NBASELIB) +-DEFS = @DEFS@ -D_FORTIFY_SOURCE=2 ++DEFS = @DEFS@ + APR_LIBS = @APR_LIBS@ + SVN_LIBS = @SVN_LIBS@ + diff --git a/net-analyzer/nmap/files/nmap-no-FORTIFY_SOURCE.patch b/net-analyzer/nmap/files/nmap-no-FORTIFY_SOURCE.patch new file mode 100644 index 000000000000..5f79238d19a3 --- /dev/null +++ b/net-analyzer/nmap/files/nmap-no-FORTIFY_SOURCE.patch @@ -0,0 +1,77 @@ +--- a/Makefile.in ++++ b/Makefile.in +@@ -40,7 +40,7 @@ + # http://gcc.gnu.org/ml/gcc-patches/2004-09/msg02055.html + # Level 1 only makes changes that don't affect "conforming" programs, + # while level 2 enforces additional restrictions. +-DEFS += -D_FORTIFY_SOURCE=2 ++#DEFS += -D_FORTIFY_SOURCE=2 + # For mtrace debugging -- see MTRACE define in main.cc for instructions + # Should only be enabled during debugging and not in any real release. + # DEFS += -DMTRACE=1 +--- a/nsock/src/Makefile.in ++++ b/nsock/src/Makefile.in +@@ -13,7 +13,7 @@ + CCOPT = + DEFS = @DEFS@ -DNSOCK_VERSION=\"$(NSOCK_VERSION)\" + # With GCC, add extra security checks to source code. +-DEFS += -D_FORTIFY_SOURCE=2 ++#DEFS += -D_FORTIFY_SOURCE=2 + INCLS = -I../include + CFLAGS = @CFLAGS@ $(CCOPT) + # CFLAGS = -g -Wall $(DEFS) $(INCLS) +--- a/nping/Makefile.in ++++ b/nping/Makefile.in +@@ -37,7 +37,7 @@ + # http://gcc.gnu.org/ml/gcc-patches/2004-09/msg02055.html + # Level 1 only makes changes that don't affect "conforming" programs, + # while level 2 enforces additional restrictions. +-DEFS += -D_FORTIFY_SOURCE=2 ++#DEFS += -D_FORTIFY_SOURCE=2 + # For mtrace debugging -- see MTRACE define in main.cc for instructions + # Should only be enabled during debugging and not in any real release. + # DEFS += -DMTRACE=1 +--- a/libnetutil/Makefile.in ++++ b/libnetutil/Makefile.in +@@ -5,7 +5,7 @@ + CXXFLAGS = @CXXFLAGS@ + CPPFLAGS = @CPPFLAGS@ $(DEFS) + DEFS = @DEFS@ +-DEFS += -D_FORTIFY_SOURCE=2 ++#DEFS += -D_FORTIFY_SOURCE=2 + AR = ar + RANLIB = @RANLIB@ + +--- a/ncat/Makefile.in ++++ b/ncat/Makefile.in +@@ -52,7 +52,7 @@ + LIBS = @LIBS@ + DEFS = @DEFS@ -DNCAT_DATADIR="\"$(pkgdatadir)\"" + # With GCC, add extra security checks to source code. +-DEFS += -D_FORTIFY_SOURCE=2 ++#DEFS += -D_FORTIFY_SOURCE=2 + INCLS = -I. -I.. -I../nsock/include/ -I$(NBASEDIR) + RM = rm -f + STRIP = @STRIP@ +--- a/nbase/Makefile.in ++++ b/nbase/Makefile.in +@@ -11,7 +11,7 @@ + CCOPT = + DEFS = @DEFS@ + # With GCC, add extra security checks to source code. +-DEFS += -D_FORTIFY_SOURCE=2 ++#DEFS += -D_FORTIFY_SOURCE=2 + CPPFLAGS = @CPPFLAGS@ + CFLAGS = @CFLAGS@ $(CCOPT) $(GLIB_CFLAGS) $(DEFS) $(INCLS) + STATIC = +--- a/nmap-update/Makefile.in ++++ b/nmap-update/Makefile.in +@@ -10,7 +10,7 @@ + CPPFLAGS = @CPPFLAGS@ $(DEFS) -I$(NBASEDIR) + LDFLAGS = @LDFLAGS@ + LIBS = @LIBS@ $(NBASELIB) +-DEFS = @DEFS@ -D_FORTIFY_SOURCE=2 ++DEFS = @DEFS@ + APR_LIBS = @APR_LIBS@ + SVN_LIBS = @SVN_LIBS@ + diff --git a/net-analyzer/nmap/metadata.xml b/net-analyzer/nmap/metadata.xml new file mode 100644 index 000000000000..ff34d48df46e --- /dev/null +++ b/net-analyzer/nmap/metadata.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>netmon</herd> +<use> +<flag name="system-lua">Use <pkg>dev-lang/lua</pkg> instead of the bundled liblua</flag> +<flag name="lua">Include support for the Nmap Scripting Engine (NSE)</flag> +<flag name="ncat">Install the ncat utility</flag> +<flag name="ndiff">Install the ndiff utility</flag> +<flag name="nmap-update">Install nmap-update, which uses <pkg>dev-vcs/subversion</pkg> to update nmap scripts in your home directory</flag> +<flag name="nping">Install the nping utility</flag> +<flag name="nse">Include support for the Nmap Scripting Engine (NSE)</flag> +<flag name="zenmap">Install the GTK+ based nmap GUI, zenmap</flag> +</use> +</pkgmetadata> diff --git a/net-analyzer/nmap/nmap-6.47-r1.ebuild b/net-analyzer/nmap/nmap-6.47-r1.ebuild new file mode 100644 index 000000000000..447e5ee930f0 --- /dev/null +++ b/net-analyzer/nmap/nmap-6.47-r1.ebuild @@ -0,0 +1,153 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +PYTHON_COMPAT=( python2_7 ) +PYTHON_REQ_USE="sqlite,xml" +inherit eutils 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/" +SRC_URI=" + http://nmap.org/dist/${MY_P}.tar.bz2 + http://dev.gentoo.org/~jer/nmap-logo-64.png +" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="alpha amd64 arm 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 +lua system-lua ncat ndiff nls nmap-update nping ssl zenmap" +NMAP_LINGUAS=( de es fr hr hu id it ja pl pt_BR pt_PT ro ru sk zh ) +IUSE+=" ${NMAP_LINGUAS[@]/#/linguas_}" + +REQUIRED_USE=" + system-lua? ( lua ) + ndiff? ( ${PYTHON_REQUIRED_USE} ) + zenmap? ( ${PYTHON_REQUIRED_USE} ) +" + +RDEPEND=" + dev-libs/liblinear + dev-libs/libpcre + net-libs/libpcap[ipv6?] + zenmap? ( + dev-python/pygtk:2[${PYTHON_USEDEP}] + ${PYTHON_DEPS} + ) + system-lua? ( >=dev-lang/lua-5.2[deprecated] ) + ndiff? ( ${PYTHON_DEPS} ) + nls? ( virtual/libintl ) + nmap-update? ( dev-libs/apr dev-vcs/subversion ) + ssl? ( dev-libs/openssl:0= ) +" +DEPEND=" + ${RDEPEND} + nls? ( sys-devel/gettext ) +" + +S="${WORKDIR}/${MY_P}" + +pkg_setup() { + if use ndiff || use zenmap; then + python-single-r1_pkg_setup + fi +} + +src_unpack() { + # prevent unpacking the logo + unpack ${MY_P}.tar.bz2 +} + +src_prepare() { + epatch \ + "${FILESDIR}"/${PN}-4.75-nolua.patch \ + "${FILESDIR}"/${PN}-5.10_beta1-string.patch \ + "${FILESDIR}"/${PN}-5.21-python.patch \ + "${FILESDIR}"/${PN}-6.01-make.patch \ + "${FILESDIR}"/${PN}-6.25-liblua-ar.patch \ + "${FILESDIR}"/${PN}-6.46-uninstaller.patch \ + "${FILESDIR}"/${PN}-6.47-no-libnl.patch \ + "${FILESDIR}"/${PN}-6.47-no-FORTIFY_SOURCE.patch + + if use nls; then + local lingua='' + for lingua in ${NMAP_LINGUAS}; do + if ! use linguas_${lingua}; then + rm -rf zenmap/share/zenmap/locale/${lingua} + rm -f zenmap/share/zenmap/locale/${lingua}.po + fi + done + else + # configure/make ignores --disable-nls + for lingua in ${NMAP_LINGUAS}; do + rm -rf zenmap/share/zenmap/locale/${lingua} + rm -f zenmap/share/zenmap/locale/${lingua}.po + done + fi + + sed -i \ + -e '/^ALL_LINGUAS =/{s|$| id|g;s|jp|ja|g}' \ + 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 + + epatch_user +} + +src_configure() { + # The bundled libdnet is incompatible with the version available in the + # tree, so we cannot use the system library here. + econf \ + $(use_enable ipv6) \ + $(use_enable nls) \ + $(use_with zenmap) \ + $(usex lua --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) \ + --with-libdnet=included \ + --with-pcre=/usr + # --with-liblinear=/usr \ + # Commented because configure does weird things, while autodetection works +} + +src_compile() { + emake \ + AR=$(tc-getAR) \ + RANLIB=$(tc-getRANLIB ) +} + +src_install() { + LC_ALL=C emake -j1 \ + DESTDIR="${D}" \ + STRIP=: \ + nmapdatadir="${EPREFIX}"/usr/share/nmap \ + install + if use nmap-update;then + LC_ALL=C emake -j1 \ + -C nmap-update \ + DESTDIR="${D}" \ + STRIP=: \ + nmapdatadir="${EPREFIX}"/usr/share/nmap \ + install + fi + + dodoc CHANGELOG HACKING docs/README docs/*.txt + + if use zenmap; then + doicon "${DISTDIR}/nmap-logo-64.png" + python_optimize + fi +} diff --git a/net-analyzer/nmap/nmap-6.47-r2.ebuild b/net-analyzer/nmap/nmap-6.47-r2.ebuild new file mode 100644 index 000000000000..d20c06ca4bc6 --- /dev/null +++ b/net-analyzer/nmap/nmap-6.47-r2.ebuild @@ -0,0 +1,153 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +PYTHON_COMPAT=( python2_7 ) +PYTHON_REQ_USE="sqlite,xml" +inherit eutils 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/" +SRC_URI=" + http://nmap.org/dist/${MY_P}.tar.bz2 + http://dev.gentoo.org/~jer/nmap-logo-64.png +" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~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 +lua system-lua ncat ndiff nls nmap-update nping ssl zenmap" +NMAP_LINGUAS=( de fr hr it ja pl pt_BR ru ) +IUSE+=" ${NMAP_LINGUAS[@]/#/linguas_}" + +REQUIRED_USE=" + system-lua? ( lua ) + ndiff? ( ${PYTHON_REQUIRED_USE} ) + zenmap? ( ${PYTHON_REQUIRED_USE} ) +" + +RDEPEND=" + dev-libs/liblinear + dev-libs/libpcre + net-libs/libpcap[ipv6?] + zenmap? ( + dev-python/pygtk:2[${PYTHON_USEDEP}] + ${PYTHON_DEPS} + ) + system-lua? ( >=dev-lang/lua-5.2[deprecated] ) + ndiff? ( ${PYTHON_DEPS} ) + nls? ( virtual/libintl ) + nmap-update? ( dev-libs/apr dev-vcs/subversion ) + ssl? ( dev-libs/openssl:0= ) +" +DEPEND=" + ${RDEPEND} + nls? ( sys-devel/gettext ) +" + +S="${WORKDIR}/${MY_P}" + +pkg_setup() { + if use ndiff || use zenmap; then + python-single-r1_pkg_setup + fi +} + +src_unpack() { + # prevent unpacking the logo + unpack ${MY_P}.tar.bz2 +} + +src_prepare() { + epatch \ + "${FILESDIR}"/${PN}-4.75-nolua.patch \ + "${FILESDIR}"/${PN}-5.10_beta1-string.patch \ + "${FILESDIR}"/${PN}-5.21-python.patch \ + "${FILESDIR}"/${PN}-6.01-make.patch \ + "${FILESDIR}"/${PN}-6.25-liblua-ar.patch \ + "${FILESDIR}"/${PN}-6.46-uninstaller.patch \ + "${FILESDIR}"/${PN}-6.47-no-libnl.patch \ + "${FILESDIR}"/${PN}-6.47-no-FORTIFY_SOURCE.patch + + if use nls; then + local lingua='' + for lingua in ${NMAP_LINGUAS[@]}; do + if ! use linguas_${lingua}; then + rm -r zenmap/share/zenmap/locale/${lingua} || die + rm zenmap/share/zenmap/locale/${lingua}.po || die + fi + done + else + # configure/make ignores --disable-nls + for lingua in ${NMAP_LINGUAS[@]}; do + rm -r zenmap/share/zenmap/locale/${lingua} || die + rm zenmap/share/zenmap/locale/${lingua}.po || die + done + fi + + sed -i \ + -e '/^ALL_LINGUAS =/{s|$| id|g;s|jp|ja|g}' \ + 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 + + epatch_user +} + +src_configure() { + # The bundled libdnet is incompatible with the version available in the + # tree, so we cannot use the system library here. + econf \ + $(use_enable ipv6) \ + $(use_enable nls) \ + $(use_with zenmap) \ + $(usex lua --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) \ + --with-libdnet=included \ + --with-pcre=/usr + # --with-liblinear=/usr \ + # Commented because configure does weird things, while autodetection works +} + +src_compile() { + emake \ + AR=$(tc-getAR) \ + RANLIB=$(tc-getRANLIB ) +} + +src_install() { + LC_ALL=C emake -j1 \ + DESTDIR="${D}" \ + STRIP=: \ + nmapdatadir="${EPREFIX}"/usr/share/nmap \ + install + if use nmap-update;then + LC_ALL=C emake -j1 \ + -C nmap-update \ + DESTDIR="${D}" \ + STRIP=: \ + nmapdatadir="${EPREFIX}"/usr/share/nmap \ + install + fi + + dodoc CHANGELOG HACKING docs/README docs/*.txt + + if use zenmap; then + doicon "${DISTDIR}/nmap-logo-64.png" + python_optimize + fi +} diff --git a/net-analyzer/nmap/nmap-6.47-r3.ebuild b/net-analyzer/nmap/nmap-6.47-r3.ebuild new file mode 100644 index 000000000000..71a53b418bd2 --- /dev/null +++ b/net-analyzer/nmap/nmap-6.47-r3.ebuild @@ -0,0 +1,154 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +PYTHON_COMPAT=( python2_7 ) +PYTHON_REQ_USE="sqlite,xml" +inherit eutils 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/" +SRC_URI=" + http://nmap.org/dist/${MY_P}.tar.bz2 + http://dev.gentoo.org/~jer/nmap-logo-64.png +" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~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 +nse system-lua ncat ndiff nls nmap-update nping ssl zenmap" +NMAP_LINGUAS=( de fr hr it ja pl pt_BR ru ) +IUSE+=" ${NMAP_LINGUAS[@]/#/linguas_}" + +REQUIRED_USE=" + system-lua? ( nse ) + ndiff? ( ${PYTHON_REQUIRED_USE} ) + zenmap? ( ${PYTHON_REQUIRED_USE} ) +" + +RDEPEND=" + dev-libs/liblinear + dev-libs/libpcre + net-libs/libpcap[ipv6?] + zenmap? ( + dev-python/pygtk:2[${PYTHON_USEDEP}] + ${PYTHON_DEPS} + ) + system-lua? ( >=dev-lang/lua-5.2[deprecated] ) + ndiff? ( ${PYTHON_DEPS} ) + nls? ( virtual/libintl ) + nmap-update? ( dev-libs/apr dev-vcs/subversion ) + ssl? ( dev-libs/openssl:0= ) +" +DEPEND=" + ${RDEPEND} + nls? ( sys-devel/gettext ) +" + +S="${WORKDIR}/${MY_P}" + +pkg_setup() { + if use ndiff || use zenmap; then + python-single-r1_pkg_setup + fi +} + +src_unpack() { + # prevent unpacking the logo + unpack ${MY_P}.tar.bz2 +} + +src_prepare() { + epatch \ + "${FILESDIR}"/${PN}-4.75-nolua.patch \ + "${FILESDIR}"/${PN}-5.10_beta1-string.patch \ + "${FILESDIR}"/${PN}-5.21-python.patch \ + "${FILESDIR}"/${PN}-6.01-make.patch \ + "${FILESDIR}"/${PN}-6.25-liblua-ar.patch \ + "${FILESDIR}"/${PN}-6.46-uninstaller.patch \ + "${FILESDIR}"/${PN}-6.47-no-libnl.patch \ + "${FILESDIR}"/${PN}-6.47-no-FORTIFY_SOURCE.patch \ + "${FILESDIR}"/${PN}-6.47-ncat-lua.patch + + if use nls; then + local lingua='' + for lingua in ${NMAP_LINGUAS[@]}; do + if ! use linguas_${lingua}; then + rm -r zenmap/share/zenmap/locale/${lingua} || die + rm zenmap/share/zenmap/locale/${lingua}.po || die + fi + done + else + # configure/make ignores --disable-nls + for lingua in ${NMAP_LINGUAS[@]}; do + rm -r zenmap/share/zenmap/locale/${lingua} || die + rm zenmap/share/zenmap/locale/${lingua}.po || die + done + fi + + sed -i \ + -e '/^ALL_LINGUAS =/{s|$| id|g;s|jp|ja|g}' \ + 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 + + epatch_user +} + +src_configure() { + # The bundled libdnet is incompatible with the version available in the + # tree, so we cannot use the system library here. + 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) \ + --with-libdnet=included \ + --with-pcre=/usr + # --with-liblinear=/usr \ + # Commented because configure does weird things, while autodetection works +} + +src_compile() { + emake \ + AR=$(tc-getAR) \ + RANLIB=$(tc-getRANLIB ) +} + +src_install() { + LC_ALL=C emake -j1 \ + DESTDIR="${D}" \ + STRIP=: \ + nmapdatadir="${EPREFIX}"/usr/share/nmap \ + install + if use nmap-update;then + LC_ALL=C emake -j1 \ + -C nmap-update \ + DESTDIR="${D}" \ + STRIP=: \ + nmapdatadir="${EPREFIX}"/usr/share/nmap \ + install + fi + + dodoc CHANGELOG HACKING docs/README docs/*.txt + + if use zenmap; then + doicon "${DISTDIR}/nmap-logo-64.png" + python_optimize + fi +} diff --git a/net-analyzer/nmap/nmap-6.49_beta2.ebuild b/net-analyzer/nmap/nmap-6.49_beta2.ebuild new file mode 100644 index 000000000000..8d37ae4ac1ac --- /dev/null +++ b/net-analyzer/nmap/nmap-6.49_beta2.ebuild @@ -0,0 +1,154 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +PYTHON_COMPAT=( python2_7 ) +PYTHON_REQ_USE="sqlite,xml" +inherit eutils 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/" +SRC_URI=" + http://nmap.org/dist/${MY_P}.tar.bz2 + http://dev.gentoo.org/~jer/nmap-logo-64.png +" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~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 +nse system-lua ncat ndiff nls nmap-update nping ssl zenmap" +NMAP_LINGUAS=( de fr hr it ja pl pt_BR ru ) +IUSE+=" ${NMAP_LINGUAS[@]/#/linguas_}" + +REQUIRED_USE=" + system-lua? ( nse ) + ndiff? ( ${PYTHON_REQUIRED_USE} ) + zenmap? ( ${PYTHON_REQUIRED_USE} ) +" + +RDEPEND=" + dev-libs/liblinear + dev-libs/libpcre + net-libs/libpcap[ipv6?] + zenmap? ( + dev-python/pygtk:2[${PYTHON_USEDEP}] + ${PYTHON_DEPS} + ) + system-lua? ( >=dev-lang/lua-5.2[deprecated] ) + ndiff? ( ${PYTHON_DEPS} ) + nls? ( virtual/libintl ) + nmap-update? ( dev-libs/apr dev-vcs/subversion ) + ssl? ( dev-libs/openssl:0= ) +" +DEPEND=" + ${RDEPEND} + nls? ( sys-devel/gettext ) +" + +S="${WORKDIR}/${MY_P}" + +pkg_setup() { + if use ndiff || use zenmap; then + python-single-r1_pkg_setup + fi +} + +src_unpack() { + # prevent unpacking the logo + unpack ${MY_P}.tar.bz2 +} + +src_prepare() { + epatch \ + "${FILESDIR}"/${PN}-4.75-nolua.patch \ + "${FILESDIR}"/${PN}-5.10_beta1-string.patch \ + "${FILESDIR}"/${PN}-5.21-python.patch \ + "${FILESDIR}"/${PN}-6.01-make.patch \ + "${FILESDIR}"/${PN}-6.25-liblua-ar.patch \ + "${FILESDIR}"/${PN}-6.46-uninstaller.patch \ + "${FILESDIR}"/${PN}-6.47-no-libnl.patch \ + "${FILESDIR}"/${PN}-6.47-ncat-lua.patch \ + "${FILESDIR}"/${PN}-6.49-no-FORTIFY_SOURCE.patch + + if use nls; then + local lingua='' + for lingua in ${NMAP_LINGUAS[@]}; do + if ! use linguas_${lingua}; then + rm -r zenmap/share/zenmap/locale/${lingua} || die + rm zenmap/share/zenmap/locale/${lingua}.po || die + fi + done + else + # configure/make ignores --disable-nls + for lingua in ${NMAP_LINGUAS[@]}; do + rm -r zenmap/share/zenmap/locale/${lingua} || die + rm zenmap/share/zenmap/locale/${lingua}.po || die + done + fi + + sed -i \ + -e '/^ALL_LINGUAS =/{s|$| id|g;s|jp|ja|g}' \ + 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 + + epatch_user +} + +src_configure() { + # The bundled libdnet is incompatible with the version available in the + # tree, so we cannot use the system library here. + 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) \ + --with-libdnet=included \ + --with-pcre=/usr + # --with-liblinear=/usr \ + # Commented because configure does weird things, while autodetection works +} + +src_compile() { + emake \ + AR=$(tc-getAR) \ + RANLIB=$(tc-getRANLIB ) +} + +src_install() { + LC_ALL=C emake -j1 \ + DESTDIR="${D}" \ + STRIP=: \ + nmapdatadir="${EPREFIX}"/usr/share/nmap \ + install + if use nmap-update;then + LC_ALL=C emake -j1 \ + -C nmap-update \ + DESTDIR="${D}" \ + STRIP=: \ + nmapdatadir="${EPREFIX}"/usr/share/nmap \ + install + fi + + dodoc CHANGELOG HACKING docs/README docs/*.txt + + if use zenmap; then + doicon "${DISTDIR}/nmap-logo-64.png" + python_optimize + fi +} diff --git a/net-analyzer/nmap/nmap-9999.ebuild b/net-analyzer/nmap/nmap-9999.ebuild new file mode 100644 index 000000000000..a7503b32b4d7 --- /dev/null +++ b/net-analyzer/nmap/nmap-9999.ebuild @@ -0,0 +1,147 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +PYTHON_COMPAT=( python2_7 ) +PYTHON_REQ_USE="sqlite,xml" +inherit eutils flag-o-matic git-r3 python-single-r1 toolchain-funcs user + +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="http://dev.gentoo.org/~jer/nmap-logo-64.png" + +LICENSE="GPL-2" +SLOT="0" + +IUSE="ipv6 +nse system-lua ncat ndiff nls nmap-update nping ssl zenmap" +NMAP_LINGUAS=( de fr hr it ja pl pt_BR ru zh ) +IUSE+=" ${NMAP_LINGUAS[@]/#/linguas_}" + +REQUIRED_USE=" + system-lua? ( nse ) + ndiff? ( ${PYTHON_REQUIRED_USE} ) + zenmap? ( ${PYTHON_REQUIRED_USE} ) +" + +RDEPEND=" + dev-libs/liblinear + dev-libs/libpcre + net-libs/libpcap[ipv6?] + zenmap? ( + dev-python/pygtk:2[${PYTHON_USEDEP}] + ${PYTHON_DEPS} + ) + system-lua? ( >=dev-lang/lua-5.2[deprecated] ) + ndiff? ( ${PYTHON_DEPS} ) + nls? ( virtual/libintl ) + nmap-update? ( dev-libs/apr dev-vcs/subversion ) + ssl? ( dev-libs/openssl:0= ) +" +DEPEND=" + ${RDEPEND} + nls? ( sys-devel/gettext ) +" + +S="${WORKDIR}/${MY_P}" + +pkg_setup() { + if use ndiff || use zenmap; then + python-single-r1_pkg_setup + fi +} + +src_prepare() { + epatch \ + "${FILESDIR}"/${PN}-4.75-nolua.patch \ + "${FILESDIR}"/${PN}-5.10_beta1-string.patch \ + "${FILESDIR}"/${PN}-5.21-python.patch \ + "${FILESDIR}"/${PN}-6.01-make.patch \ + "${FILESDIR}"/${PN}-6.25-liblua-ar.patch \ + "${FILESDIR}"/${PN}-6.46-uninstaller.patch \ + "${FILESDIR}"/${PN}-6.47-no-libnl.patch \ + "${FILESDIR}"/${PN}-no-FORTIFY_SOURCE.patch \ + "${FILESDIR}"/${PN}-6.47-ncat-lua.patch + + if use nls; then + local lingua='' + for lingua in ${NMAP_LINGUAS[@]}; do + if ! use linguas_${lingua}; then + rm -r zenmap/share/zenmap/locale/${lingua} || die + rm zenmap/share/zenmap/locale/${lingua}.po || die + fi + done + else + # configure/make ignores --disable-nls + for lingua in ${NMAP_LINGUAS[@]}; do + rm -r zenmap/share/zenmap/locale/${lingua} || die + rm zenmap/share/zenmap/locale/${lingua}.po || die + done + fi + + sed -i \ + -e '/^ALL_LINGUAS =/{s|$| id|g;s|jp|ja|g}' \ + 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 + + epatch_user +} + +src_configure() { + # The bundled libdnet is incompatible with the version available in the + # tree, so we cannot use the system library here. + 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) \ + --with-libdnet=included \ + --with-pcre=/usr + # --with-liblinear=/usr \ + # Commented because configure does weird things, while autodetection works +} + +src_compile() { + emake \ + AR=$(tc-getAR) \ + RANLIB=$(tc-getRANLIB ) +} + +src_install() { + LC_ALL=C emake -j1 \ + DESTDIR="${D}" \ + STRIP=: \ + nmapdatadir="${EPREFIX}"/usr/share/nmap \ + install + if use nmap-update;then + LC_ALL=C emake -j1 \ + -C nmap-update \ + DESTDIR="${D}" \ + STRIP=: \ + nmapdatadir="${EPREFIX}"/usr/share/nmap \ + install + fi + + dodoc CHANGELOG HACKING docs/README docs/*.txt + + if use zenmap; then + doicon "${DISTDIR}/nmap-logo-64.png" + python_optimize + fi +} |