diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /net-analyzer/nmap |
reinit the tree, so we can have metadata
Diffstat (limited to 'net-analyzer/nmap')
-rw-r--r-- | net-analyzer/nmap/Manifest | 20 | ||||
-rw-r--r-- | net-analyzer/nmap/files/nls.m4 | 32 | ||||
-rw-r--r-- | net-analyzer/nmap/files/nmap-5.10_beta1-string.patch | 11 | ||||
-rw-r--r-- | net-analyzer/nmap/files/nmap-5.21-python.patch | 21 | ||||
-rw-r--r-- | net-analyzer/nmap/files/nmap-6.25-liblua-ar.patch | 20 | ||||
-rw-r--r-- | net-analyzer/nmap/files/nmap-6.46-uninstaller.patch | 19 | ||||
-rw-r--r-- | net-analyzer/nmap/files/nmap-7.25-CXXFLAGS.patch | 11 | ||||
-rw-r--r-- | net-analyzer/nmap/files/nmap-7.25-libpcre.patch | 10 | ||||
-rw-r--r-- | net-analyzer/nmap/files/nmap-7.25-no-FORTIFY_SOURCE.patch | 77 | ||||
-rw-r--r-- | net-analyzer/nmap/files/nmap-7.31-libnl.patch | 15 | ||||
-rw-r--r-- | net-analyzer/nmap/metadata.xml | 18 | ||||
-rw-r--r-- | net-analyzer/nmap/nmap-7.40.ebuild | 180 | ||||
-rw-r--r-- | net-analyzer/nmap/nmap-7.50.ebuild | 180 | ||||
-rw-r--r-- | net-analyzer/nmap/nmap-7.60.ebuild | 195 | ||||
-rw-r--r-- | net-analyzer/nmap/nmap-9999.ebuild | 182 |
15 files changed, 991 insertions, 0 deletions
diff --git a/net-analyzer/nmap/Manifest b/net-analyzer/nmap/Manifest new file mode 100644 index 000000000000..59b1dda63cee --- /dev/null +++ b/net-analyzer/nmap/Manifest @@ -0,0 +1,20 @@ +AUX nls.m4 1217 SHA256 c144b117a81498190f16e96ae54aa6c5d4c9f9da0cc62f27539393c9380f79a9 SHA512 2278c46eff2af70549fe3e3a56670e18fa177b0fb5d09addc5c936df9b4fb07a2b91e379fd9bc6d2477d2ea7e35e24dc4235890cd818e3cabab2955c8e0822a1 WHIRLPOOL 03807e25a60ac6bac82cf578e312aa8f23de8aa06d1001a7b08e5f9f9b88b3226e67b321e6dbae245d81399ea3da81258629e6641d67927cf70975b035f7ab99 +AUX nmap-5.10_beta1-string.patch 252 SHA256 6012685deb53985c73fa038d27b2f1472344fd6641c40103143fa15676454506 SHA512 d1c6a446400fa86700c5ce690c3498894a9796b17bb70a29b933797eb2abb38285ebc21a236d8f1f4fa837c45a1abc49555aee13266a31089b219f9b4ef07be2 WHIRLPOOL 3e7ba87ef26d7462b82e3986c37f7a2f1074dc2db7ba6a357ade3869089657a5200afacac6490a60ff43700b6e7812c1c95ac18efac381037590d851513dbf9e +AUX nmap-5.21-python.patch 1219 SHA256 2d133db8f31d048de810fa3a3b8234f856bdfa9b830c6346d71cdc2357a16b74 SHA512 d670b382d183a55d0a744d4055aafffdaf64b071ae169e94e7d627ca8b74df38d02ef7858b0976b7079828c14705d0f1998a9640445f3cd4f5f4d4c5b2ce0bf3 WHIRLPOOL 1d84ccf26fb0affff5a05f6fd00ea5aff1bbb3a9d3320e7a90a9feeba68aa7fa38e8be527eea93824616003a61321f21fa8fb5ce662e4b43ef8581679f40bd3a +AUX nmap-6.25-liblua-ar.patch 328 SHA256 3bce55abe4cf17d7c7bb56731151c4d4f1c5aef04e8294bf79a9712fa015fce2 SHA512 6bb15078e79ef281b026e25199fc76bcd1b7242da0d6513ac9b078f130e521e6db506c1c36d33ef72a2198c3054111d95d6ac0654f7d6bb7549d6308ce864291 WHIRLPOOL d6f29209ee4a92e2f5b564d5aeaa8814355df2a9142665ba1ce980693c830214a1d89dc66c3f0573237273d0fc502c7ff8b39be53f6afcca29dd94fe6f081b7b +AUX nmap-6.46-uninstaller.patch 619 SHA256 e5f649e95a7a87a9c2a5ab89657a56468036726146441cee34bad6184aeb8349 SHA512 da89808d23ed14b0f748a57d3238667adf65eb5278bcbe5a599d06fd4bc5ad2c3492d824639f97d50be9a973fd53bb395fccd855a712bd11d3e963dc4bb11833 WHIRLPOOL 223f448f3edd34945b5a4f79c9740159df40d65bdda1cadada241a0b00ae8893ea84874ad4c000629d305c221ad687b521fd9fb2d1d6786b8489d94746d9eb08 +AUX nmap-7.25-CXXFLAGS.patch 302 SHA256 33132cef48902d5bc241eb61f918b966e7b8171bafe73c17faf06b97cddce2c5 SHA512 80bd2578a7062a71a8ac57e161561d654c41310bdf4bd837990f64452d37f2e10cc7a52a22ee132fde2013978748c37a9ebea045fe7cbc538d486c74934bdb0a WHIRLPOOL deabf4448ce6dd74dea1ae86415f064686e2967501410a24791ec5a6d8675c24fa290f246126247c43e629e5b259b2f77f85ec95331d1c3bdc520eee1b87bfaa +AUX nmap-7.25-libpcre.patch 291 SHA256 78ea0907c6a7f1e93b80539baa211e53e86fc8b36396aae4353f5086e5ed8efe SHA512 75963ed6eb156475a8e928f6fd6ad18cdc61ed658a3e0a82a7719bbc4998b186981fa93c2b39b8bc92e10cc0ad19f5097224a9a68bc4b35e1b771d4a27532b1d WHIRLPOOL 6145155ee667764da67ef46e760ac0135cb0e1c19900c70bdb5d08dcff2f30c6c294543b3cb7cf6860ac6a4999ff708e4c1332d0924c07bf031c5f945932c542 +AUX nmap-7.25-no-FORTIFY_SOURCE.patch 2258 SHA256 33c0c0591791ecee3ef0e7a1b69f01fac6ffe5999bd62b67435735640d981210 SHA512 29b19e8cedc5e9edf66e728d89b71c4c0ada29fdbb9c167bec84b5aad2c9d52fe111a902c32b247106ace0154734f2a3b4eeae119887dc7203ad2271c8c240a3 WHIRLPOOL 664aee863b7b20ef27b0e8c43e2985b03bd0c2a1460683c2bda9bdbc028917533927b38a721990379a810351012070a2676e27983050d85c992a5115e768e7ef +AUX nmap-7.31-libnl.patch 498 SHA256 5c5e740eb64b0a06d1bef9754f73b72fa3ddea38c3aabee35f5d7763cfe4a05f SHA512 e7047faaac2bec6c8e0aaae04cbc6e97a8da7999fbb1a8ff015a78ffafe3ce645b71746fd6da826e3ad9baa8d8a917d3791836e67a346dc9c1ca6678cd04e7c8 WHIRLPOOL 92f6d423d1fc2ee3ce99031c0179b93c61251f1c69561b9640398f647ec2fbaf7106c8b0c63485384cfe951ad9e5839406c037ffb423cf01f288bc9ef291e296 +DIST nmap-7.40.tar.bz2 9043221 SHA256 9e14665fffd054554d129d62c13ad95a7b5c7a046daa2290501909e65f4d3188 SHA512 98e37bf1c29789ea19ee4542d719ed6970c8bcc1bf92af4948a52a75273c2403329149f6b5df6368c23840d1bb3f47af9e5ce543f7a36596a33896609574f02d WHIRLPOOL 735133455aec227149478cb273e41d33b7dbd77a6998682b6d80bdc72c77555cd745895adfcde1c194281c258131e7fce49254e79349fe112a5f146768fd1c51 +DIST nmap-7.50.tar.bz2 9309616 SHA256 e9a96a8e02bfc9e80c617932acc61112c23089521ee7d6b1502ecf8e3b1674b2 SHA512 b74c5711f03bae363164cdb7e62923ab938c81c7bbcd080eaa2d1acc89f09eb0a7e0f5deb9628b81057c7a35ecd487a2d09dfe3b58b0db6c84cf0b39f526e5f2 WHIRLPOOL 9fd0a9fb8de6e4e169cf7a9ce8b06b3e245f66aa3643cb6be4b1933d824091d4211d3207893f5bff5621c7746434db92a5745c3500e3ce8de1bb0c6e2820d365 +DIST nmap-7.60.tar.bz2 10394925 SHA256 a8796ecc4fa6c38aad6139d9515dc8113023a82e9d787e5a5fb5fa1b05516f21 SHA512 74ba8f6de026ade9ee6bb2252bee18a57210f8207977df7f1c04556629dcdc1e6127f33febc8a52ef88a1dac876116d590564dee4f1c23798c3ac37529991aa4 WHIRLPOOL ca5a10ca5a685c53fa37a72857c009333287c6559409fb1dfcc5edc5e48034b3d280f76e555e159156b5befc0167b9198673e07ccd2e6a0a80c2d3dc2395fff0 +DIST nmap-logo-64.png 3289 SHA256 4c72ff1eeffeeaa1039b251d9f2d675936e65db686fe3b57a35c2183ce67a8aa SHA512 fb102d12aaeebc8a97543ecd653a3606e86996ad679bc26d6e6e274ad05ec3e9f92521289d1a24153c521b699e8c0cfa65d8856bb49af53ee4837268bbc6b5d3 WHIRLPOOL 6093aadcb9880587e17d39d45fcbe57bb62777f220655e6ed5b5f900ce49cb8c5a53e24d7db0de6f8909eb0f8981f7565e6ae9b9bf9283a4ccccb0526eab5313 +EBUILD nmap-7.40.ebuild 4352 SHA256 ca57620e3f11cc066f64d9ab9368b691a12535dd5ce11e2666ec68144f02e93d SHA512 e7f602c98215e2583a88360493e24c4ade72994154bd24b524426edb64aa5a3c688aa5e841fb1bfedf73566f8e494108636c2d7f29201e7fe179a7aa13117f90 WHIRLPOOL fcea595f8eadf6f3da399af6f7a2fcf5023e62e9f93247f3f912f85b0931187a8d81f8d5532f278839b2b5665e7958178b669fa94b96461f86fead12d2591a13 +EBUILD nmap-7.50.ebuild 4353 SHA256 d4575223ddf8a3a7b315c3b3bd312d3bf5b08f05e31738f0d62eeb28068590c3 SHA512 f061ce79bc7c48fc30be3105c70e24621fcf0d0cfbfbe8416e67d10b497998117e4a782e073e14a52490d668916a180e2dab266ccdc2524733caff03d4aff482 WHIRLPOOL f2cdcf5218631273b69767d176f83b175d28a8ffb43607e140a6f5da29bffb75d77ca4ed76e3710dcd3a7af8aa3675514d95cae1650d5a3054bacc0ba6532057 +EBUILD nmap-7.60.ebuild 4567 SHA256 94d8a52179d43e8d93b3f139ba3efafd87b8f150f165baf4d7ff72279cc71afb SHA512 8648fbb304949199b84d4e74faf281dd2893fcd3eca75ed07d3424ef4c97b00f8bfac795d08bd3fa72620122f71eb8c4054366c029ba82b4f76bc2d1d44f50b1 WHIRLPOOL c190449eea7a1d5a3d75645d38df6e05845210a79bfaf322df90370569a10d7306d117692a89b8fb96b769fbbd1e4bc1b4a6383a34f37fb836892ac6e2eebbc5 +EBUILD nmap-9999.ebuild 4242 SHA256 802b6b00877bbc3bbd685c41b86eae12aeaedc1e2b52054ab1683c8a34794c33 SHA512 d8418a66dfff647f9a560981f63918370839a5e624c6435ebc73e4867117a0414c9b45978e14ba9bebb2539bd9f356339c328de4a2a75e03e0a88c6674bf2a8d WHIRLPOOL dc0b890eb00b1887dd72fe2c5efc47297457e728f2807974d82c5f71d965584a70f82fb9643525a97af027f6723352fd042a23b99a59c0da1c2bd967eaf9a73a +MISC ChangeLog 10254 SHA256 3365bab3624dfa11a549abeb9f5e39b56c5852688426950f8a1249699584c92c SHA512 e7eeb7818966a07001d0bef7585e0e23f6e206ea3546d731b26bd9ccbde3d16bc8718c6e2671f0e8569378225f86d48881655fba63cda15cf99ecc08d1bdb9eb WHIRLPOOL 49caea6a3ee438e0891c3a9144ab21b7b08343e806953924437a8160febfc8fe429634c616e4175d6bcb985356efe902c1a815f8de75ebfb12a0b44ad1117a60 +MISC ChangeLog-2015 43855 SHA256 2d0433ddb0eecf16df05f1cc0e283681a88020690caaf3fd4d6bd03d9e39fcc4 SHA512 16cfb6bc28cccd58800f7b66fb3465378abb4df2459595180a7956deef8e7e6761c80dd98f38c73883cffac72edd8ee7684f031c73e28cf13c2e6b039d2431a4 WHIRLPOOL 10ba3498a09130fa31e1a230254ec7c20fd6b3ff88a2840120a7e784a641037b5b430649b809f02dd4172b0f01848ed70d4203c4c4f0984dfa90d88742a0849f +MISC metadata.xml 920 SHA256 a367e189b1a012a1b489b55664114d2d2c3fcef020f5c87a71be239adef02046 SHA512 56d44c71139e48b75a89140bedd2c4a1bc20c8fe99e16ee8b71fb490cb606997571de95d6ac93147bdee81bbcbb736588c87c43b9cd4f9fac71280416a499185 WHIRLPOOL a391aceab50e0f218616dcf891f701efdf4884ae7ff29c6a6a0deefbf0264847db7694bd7641d3ec238ac59be205d664aa16c491330a3ce04752528ca5bd5979 diff --git a/net-analyzer/nmap/files/nls.m4 b/net-analyzer/nmap/files/nls.m4 new file mode 100644 index 000000000000..93df8d3b3f06 --- /dev/null +++ b/net-analyzer/nmap/files/nls.m4 @@ -0,0 +1,32 @@ +# nls.m4 serial 5 (gettext-0.18) +dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014 Free Software Foundation, +dnl Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. +dnl +dnl This file can be used in projects which are not available under +dnl the GNU General Public License or the GNU Library General Public +dnl License but which still want to provide support for the GNU gettext +dnl functionality. +dnl Please note that the actual code of the GNU gettext library is covered +dnl by the GNU Library General Public License, and the rest of the GNU +dnl gettext package is covered by the GNU General Public License. +dnl They are *not* in the public domain. + +dnl Authors: +dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000. +dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003. + +AC_PREREQ([2.50]) + +AC_DEFUN([AM_NLS], +[ + AC_MSG_CHECKING([whether NLS is requested]) + dnl Default is enabled NLS + AC_ARG_ENABLE([nls], + [ --disable-nls do not use Native Language Support], + USE_NLS=$enableval, USE_NLS=yes) + AC_MSG_RESULT([$USE_NLS]) + AC_SUBST([USE_NLS]) +]) 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.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-7.25-CXXFLAGS.patch b/net-analyzer/nmap/files/nmap-7.25-CXXFLAGS.patch new file mode 100644 index 000000000000..91caad1a6734 --- /dev/null +++ b/net-analyzer/nmap/files/nmap-7.25-CXXFLAGS.patch @@ -0,0 +1,11 @@ +--- a/Makefile.in ++++ b/Makefile.in +@@ -477,7 +477,7 @@ + ./docs/style/lua-format -i scripts/*.nse + + makefile.dep: +- $(CXX) -MM $(CPPFLAGS) $(SRCS) > $@ ++ $(CXX) -MM $(CPPFLAGS) $(CXXFLAGS) $(SRCS) > $@ + -include makefile.dep + + # These the old names of scripts that have been renamed or deleted. Any diff --git a/net-analyzer/nmap/files/nmap-7.25-libpcre.patch b/net-analyzer/nmap/files/nmap-7.25-libpcre.patch new file mode 100644 index 000000000000..9296dab7da7b --- /dev/null +++ b/net-analyzer/nmap/files/nmap-7.25-libpcre.patch @@ -0,0 +1,10 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -522,7 +522,6 @@ + + # If we still don't have it, we use our own + if test $have_pcre != yes ; then +- AC_CONFIG_SUBDIRS( libpcre ) + CPPFLAGS="-I\$(top_srcdir)/$LIBPCREDIR $CPPFLAGS" + LIBPCRE_LIBS="$LIBPCREDIR/libpcre.a" + PCRE_BUILD="build-pcre" diff --git a/net-analyzer/nmap/files/nmap-7.25-no-FORTIFY_SOURCE.patch b/net-analyzer/nmap/files/nmap-7.25-no-FORTIFY_SOURCE.patch new file mode 100644 index 000000000000..85594038bf6f --- /dev/null +++ b/net-analyzer/nmap/files/nmap-7.25-no-FORTIFY_SOURCE.patch @@ -0,0 +1,77 @@ +--- a/nbase/Makefile.in ++++ b/nbase/Makefile.in +@@ -12,7 +12,7 @@ + CCOPT = + DEFS = @DEFS@ + # With GCC, add extra security checks to source code. +-DEFS += -D_FORTIFY_SOURCE=2 ++DEFS += + CPPFLAGS = @CPPFLAGS@ + CFLAGS = @CFLAGS@ $(CCOPT) $(GLIB_CFLAGS) $(DEFS) $(INCLS) + STATIC = +--- a/ncat/Makefile.in ++++ b/ncat/Makefile.in +@@ -53,7 +53,7 @@ + LIBS = @LIBS@ + DEFS = @DEFS@ -DNCAT_DATADIR="\"$(pkgdatadir)\"" + # With GCC, add extra security checks to source code. +-DEFS += -D_FORTIFY_SOURCE=2 ++DEFS += + INCLS = -I. -I.. -I../nsock/include/ -I$(NBASEDIR) + RM = rm -f + STRIP = @STRIP@ +--- 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 += + INCLS = -I../include + CFLAGS = @CFLAGS@ $(CCOPT) + # CFLAGS = -g -Wall $(DEFS) $(INCLS) +--- 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 += + AR = ar + RANLIB = @RANLIB@ + +--- a/Makefile.in ++++ b/Makefile.in +@@ -41,7 +41,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 += + # 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/nping/Makefile.in ++++ b/nping/Makefile.in +@@ -38,7 +38,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 += + # 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/nmap-update/Makefile.in ++++ b/nmap-update/Makefile.in +@@ -12,7 +12,7 @@ + LDFLAGS = @LDFLAGS@ + MAC_FLAGS = + LIBS = @LIBS@ $(NBASELIB) $(MAC_FLAGS) +-DEFS = @DEFS@ -D_FORTIFY_SOURCE=2 ++DEFS = @DEFS@ + APR_LIBS = @APR_LIBS@ + SVN_LIBS = @SVN_LIBS@ + diff --git a/net-analyzer/nmap/files/nmap-7.31-libnl.patch b/net-analyzer/nmap/files/nmap-7.31-libnl.patch new file mode 100644 index 000000000000..c16d8291ea3b --- /dev/null +++ b/net-analyzer/nmap/files/nmap-7.31-libnl.patch @@ -0,0 +1,15 @@ +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.ac ++++ b/nping/configure.ac +@@ -114,9 +114,6 @@ + # OpenSSL and NSE C modules can require dlopen + AC_SEARCH_LIBS(dlopen, dl) + +-# libpcap can require libnl +-AC_SEARCH_LIBS(nl_handle_alloc, nl) +- + # We test whether they specified openssl desires explicitly + use_openssl="yes" + specialssldir="" diff --git a/net-analyzer/nmap/metadata.xml b/net-analyzer/nmap/metadata.xml new file mode 100644 index 000000000000..37088b5933c3 --- /dev/null +++ b/net-analyzer/nmap/metadata.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <use> + <flag name="libssh2">Enable SSH support through <pkg>net-libs/libssh2</pkg></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="system-lua">Use <pkg>dev-lang/lua</pkg> instead of the bundled liblua</flag> + <flag name="zenmap">Install the GTK+ based nmap GUI, zenmap</flag> + </use> +</pkgmetadata> diff --git a/net-analyzer/nmap/nmap-7.40.ebuild b/net-analyzer/nmap/nmap-7.40.ebuild new file mode 100644 index 000000000000..1582792f3e64 --- /dev/null +++ b/net-analyzer/nmap/nmap-7.40.ebuild @@ -0,0 +1,180 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python2_7 ) +PYTHON_REQ_USE="sqlite,xml" +inherit autotools 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 + https://dev.gentoo.org/~jer/nmap-logo-64.png +" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="alpha amd64 arm ~arm64 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 libressl +nse system-lua ncat ndiff nls nmap-update nping ssl zenmap" +NMAP_LINGUAS=( de fr hi 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 + 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? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:= ) + ) +" +DEPEND=" + ${RDEPEND} + nls? ( sys-devel/gettext ) +" + +S="${WORKDIR}/${MY_P}" +PATCHES=( + "${FILESDIR}"/${PN}-5.10_beta1-string.patch + "${FILESDIR}"/${PN}-5.21-python.patch + "${FILESDIR}"/${PN}-6.46-uninstaller.patch + "${FILESDIR}"/${PN}-6.25-liblua-ar.patch + "${FILESDIR}"/${PN}-7.25-no-FORTIFY_SOURCE.patch + "${FILESDIR}"/${PN}-7.25-CXXFLAGS.patch + "${FILESDIR}"/${PN}-7.25-libpcre.patch + "${FILESDIR}"/${PN}-7.31-libnl.patch +) + +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() { + rm -r libpcap/ || die + + cat "${FILESDIR}"/nls.m4 >> "${S}"/acinclude.m4 || die + + default + + 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 + + sed -i \ + -e '/rm -f $@/d' \ + $(find . -name 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 + + cp libdnet-stripped/include/config.h.in{,.nmap-orig} || die + eautoreconf + if [[ ${CHOST} == *-darwin* ]] ; then + # we need the original for a Darwin-specific fix, bug #604432 + mv libdnet-stripped/include/config.h.in{.nmap-orig,} || die + fi +} + +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() { + local directory + for directory in . libnetutil nsock/src \ + $(usex ncat ncat '') \ + $(usex nmap-update nmap-update '') \ + $(usex nping nping '') + do + emake -C "${directory}" makefile.dep + done + + 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-7.50.ebuild b/net-analyzer/nmap/nmap-7.50.ebuild new file mode 100644 index 000000000000..cfbafe0a31bf --- /dev/null +++ b/net-analyzer/nmap/nmap-7.50.ebuild @@ -0,0 +1,180 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python2_7 ) +PYTHON_REQ_USE="sqlite,xml" +inherit autotools 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 + https://dev.gentoo.org/~jer/nmap-logo-64.png +" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~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 libressl +nse system-lua ncat ndiff nls nmap-update nping ssl zenmap" +NMAP_LINGUAS=( de fr hi 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 + 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? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:= ) + ) +" +DEPEND=" + ${RDEPEND} + nls? ( sys-devel/gettext ) +" + +S="${WORKDIR}/${MY_P}" +PATCHES=( + "${FILESDIR}"/${PN}-5.10_beta1-string.patch + "${FILESDIR}"/${PN}-5.21-python.patch + "${FILESDIR}"/${PN}-6.46-uninstaller.patch + "${FILESDIR}"/${PN}-6.25-liblua-ar.patch + "${FILESDIR}"/${PN}-7.25-no-FORTIFY_SOURCE.patch + "${FILESDIR}"/${PN}-7.25-CXXFLAGS.patch + "${FILESDIR}"/${PN}-7.25-libpcre.patch + "${FILESDIR}"/${PN}-7.31-libnl.patch +) + +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() { + rm -r libpcap/ || die + + cat "${FILESDIR}"/nls.m4 >> "${S}"/acinclude.m4 || die + + default + + 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 + + sed -i \ + -e '/rm -f $@/d' \ + $(find . -name Makefile.in) \ + || die + + # Fix desktop files wrt bug #432714 + sed -i \ + -e 's|^Categories=.*|Categories=Network;System;Security;|g' \ + zenmap/install_scripts/unix/zenmap-root.desktop \ + zenmap/install_scripts/unix/zenmap.desktop || die + + cp libdnet-stripped/include/config.h.in{,.nmap-orig} || die + eautoreconf + if [[ ${CHOST} == *-darwin* ]] ; then + # we need the original for a Darwin-specific fix, bug #604432 + mv libdnet-stripped/include/config.h.in{.nmap-orig,} || die + fi +} + +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 ncat) \ + $(use_with ndiff) \ + $(use_with nmap-update) \ + $(use_with nping) \ + $(use_with ssl openssl) \ + $(use_with zenmap) \ + $(usex nse --with-liblua=$(usex system-lua /usr included '' '') --without-liblua) \ + --cache-file="${S}"/config.cache \ + --with-libdnet=included \ + --with-pcre=/usr + # Commented out because configure does weird things + # --with-liblinear=/usr \ +} + +src_compile() { + local directory + for directory in . libnetutil nsock/src \ + $(usex ncat ncat '') \ + $(usex nmap-update nmap-update '') \ + $(usex nping nping '') + do + emake -C "${directory}" makefile.dep + done + + 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-7.60.ebuild b/net-analyzer/nmap/nmap-7.60.ebuild new file mode 100644 index 000000000000..e925ad725d85 --- /dev/null +++ b/net-analyzer/nmap/nmap-7.60.ebuild @@ -0,0 +1,195 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python2_7 ) +PYTHON_REQ_USE="sqlite,xml" +inherit autotools flag-o-matic python-single-r1 toolchain-funcs + +MY_P=${P/_beta/BETA} + +DESCRIPTION="A utility for network discovery and security auditing" +HOMEPAGE="https://nmap.org/" +SRC_URI=" + https://nmap.org/dist/${MY_P}.tar.bz2 + https://dev.gentoo.org/~jer/nmap-logo-64.png +" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~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 libressl libssh2 ncat ndiff nls nmap-update nping +nse ssl system-lua + zenmap +" +NMAP_LINGUAS=( de fr hi 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 + libssh2? ( net-libs/libssh2[zlib] ) + ndiff? ( ${PYTHON_DEPS} ) + nls? ( virtual/libintl ) + nmap-update? ( + dev-libs/apr + dev-vcs/subversion + ) + ssl? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:= ) + ) + system-lua? ( >=dev-lang/lua-5.2:*[deprecated] ) + zenmap? ( + dev-python/pygtk:2[${PYTHON_USEDEP}] + ${PYTHON_DEPS} + ) +" +DEPEND=" + ${RDEPEND} + nls? ( sys-devel/gettext ) +" +PATCHES=( + "${FILESDIR}"/${PN}-5.10_beta1-string.patch + "${FILESDIR}"/${PN}-5.21-python.patch + "${FILESDIR}"/${PN}-6.46-uninstaller.patch + "${FILESDIR}"/${PN}-6.25-liblua-ar.patch + "${FILESDIR}"/${PN}-7.25-no-FORTIFY_SOURCE.patch + "${FILESDIR}"/${PN}-7.25-CXXFLAGS.patch + "${FILESDIR}"/${PN}-7.25-libpcre.patch + "${FILESDIR}"/${PN}-7.31-libnl.patch +) +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() { + rm -r libpcap/ || die + + cat "${FILESDIR}"/nls.m4 >> "${S}"/acinclude.m4 || die + + default + + 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 + + sed -i \ + -e '/rm -f $@/d' \ + $(find . -name Makefile.in) \ + || die + + # Fix desktop files wrt bug #432714 + sed -i \ + -e 's|^Categories=.*|Categories=Network;System;Security;|g' \ + 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 + + if [[ ${CHOST} == *-darwin* ]] ; then + # we need the original for a Darwin-specific fix, bug #604432 + mv libdnet-stripped/include/config.h.in{.nmap-orig,} || die + fi +} + +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 libssh2) \ + $(use_with ncat) \ + $(use_with ndiff) \ + $(use_with nmap-update) \ + $(use_with nping) \ + $(use_with ssl openssl) \ + $(use_with zenmap) \ + $(usex libssh2 --with-zlib) \ + $(usex nse --with-liblua=$(usex system-lua /usr included '' '') --without-liblua) \ + --cache-file="${S}"/config.cache \ + --with-libdnet=included \ + --with-pcre=/usr + # Commented out because configure does weird things + # --with-liblinear=/usr \ +} + +src_compile() { + local directory + for directory in . libnetutil nsock/src \ + $(usex ncat ncat '') \ + $(usex nmap-update nmap-update '') \ + $(usex nping nping '') + do + emake -C "${directory}" makefile.dep + done + + 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..d78311ad1c1b --- /dev/null +++ b/net-analyzer/nmap/nmap-9999.ebuild @@ -0,0 +1,182 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python2_7 ) +PYTHON_REQ_USE="sqlite,xml" +inherit autotools 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="https://nmap.org/" + +EGIT_REPO_URI="https://github.com/nmap/nmap" +SRC_URI="https://dev.gentoo.org/~jer/nmap-logo-64.png" + +LICENSE="GPL-2" +SLOT="0" + +IUSE=" + ipv6 libressl libssh2 ncat ndiff nls nmap-update nping +nse ssl system-lua + zenmap +" +NMAP_LINGUAS=( de fr hi 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 + libssh2? ( net-libs/libssh2[zlib] ) + ndiff? ( ${PYTHON_DEPS} ) + nls? ( virtual/libintl ) + nmap-update? ( + dev-libs/apr + dev-vcs/subversion + ) + ssl? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:= ) + ) + system-lua? ( >=dev-lang/lua-5.2:*[deprecated] ) + zenmap? ( + dev-python/pygtk:2[${PYTHON_USEDEP}] + ${PYTHON_DEPS} + ) +" +DEPEND=" + ${RDEPEND} + nls? ( sys-devel/gettext ) +" +PATCHES=( + "${FILESDIR}"/${PN}-5.10_beta1-string.patch + "${FILESDIR}"/${PN}-5.21-python.patch + "${FILESDIR}"/${PN}-6.46-uninstaller.patch + "${FILESDIR}"/${PN}-6.25-liblua-ar.patch + "${FILESDIR}"/${PN}-7.25-no-FORTIFY_SOURCE.patch + "${FILESDIR}"/${PN}-7.25-CXXFLAGS.patch + "${FILESDIR}"/${PN}-7.25-libpcre.patch + "${FILESDIR}"/${PN}-7.31-libnl.patch +) +S="${WORKDIR}/${MY_P}" + +pkg_setup() { + if use ndiff || use zenmap; then + python-single-r1_pkg_setup + fi +} + +src_prepare() { + rm -r libpcap/ || die + + cat "${FILESDIR}"/nls.m4 >> "${S}"/acinclude.m4 || die + + default + + 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 's|^Categories=.*|Categories=Network;System;Security;|g' \ + 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 + + if [[ ${CHOST} == *-darwin* ]] ; then + # we need the original for a Darwin-specific fix, bug #604432 + mv libdnet-stripped/include/config.h.in{.nmap-orig,} || die + fi +} + +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 libssh2) \ + $(use_with ncat) \ + $(use_with ndiff) \ + $(use_with nmap-update) \ + $(use_with nping) \ + $(use_with ssl openssl) \ + $(use_with zenmap) \ + $(usex libssh2 --with-zlib) \ + $(usex nse --with-liblua=$(usex system-lua /usr included '' '') --without-liblua) \ + --cache-file="${S}"/config.cache \ + --with-libdnet=included \ + --with-pcre=/usr + # Commented out because configure does weird things + # --with-liblinear=/usr \ +} + +src_compile() { + local directory + for directory in . libnetutil nsock/src \ + $(usex ncat ncat '') \ + $(usex nmap-update nmap-update '') \ + $(usex nping nping '') + do + emake -C "${directory}" makefile.dep + done + + 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 +} |