From ed9b52b7ca3321e120491516c115a0acf0718a17 Mon Sep 17 00:00:00 2001 From: Sergei Reznikov Date: Sat, 26 Dec 2020 15:51:52 +0300 Subject: [PATCH] nmap: add recipe for older version --- net-analyzer/nmap/nmap-3.81.recipe | 68 +++++++++++++++++++ .../{nmap-7.40.recipe => nmap-7.90.recipe} | 8 ++- net-analyzer/nmap/patches/nmap-3.81.patchset | 29 ++++++++ 3 files changed, 102 insertions(+), 3 deletions(-) create mode 100644 net-analyzer/nmap/nmap-3.81.recipe rename net-analyzer/nmap/{nmap-7.40.recipe => nmap-7.90.recipe} (91%) create mode 100644 net-analyzer/nmap/patches/nmap-3.81.patchset diff --git a/net-analyzer/nmap/nmap-3.81.recipe b/net-analyzer/nmap/nmap-3.81.recipe new file mode 100644 index 000000000..cef8496a5 --- /dev/null +++ b/net-analyzer/nmap/nmap-3.81.recipe @@ -0,0 +1,68 @@ +SUMMARY="A utility for network discovery and security auditing" +DESCRIPTION="Nmap (\"Network Mapper\") is a free and open source license \ +utility for network discovery and security auditing. Many systems and network \ +administrators also find it useful for tasks such as network inventory, \ +managing service upgrade schedules, and monitoring host or service uptime. \ +Nmap uses raw IP packets in novel ways to determine what hosts are available \ +on the network, what services (application name and version) those hosts are \ +offering, what operating systems (and OS versions) they are running, what \ +type of packet filters/firewalls are in use, and dozens of other \ +characteristics. It was designed to rapidly scan large networks, but works \ +fine against single hosts. Nmap runs on all major computer operating systems, \ +and official binary packages are available for Linux, Windows, and Mac OS X. \ +In addition to the classic command-line Nmap executable, the Nmap suite \ +includes an advanced GUI and results viewer (Zenmap), a flexible data \ +transfer, redirection, and debugging tool (Ncat), a utility for comparing \ +scan results (Ndiff), and a packet generation and response analysis tool \ +(Nping)." +HOMEPAGE="https://nmap.org/" +COPYRIGHT="1996–2005 The Nmap Project" +LICENSE="GNU GPL v2" +REVISION="1" +SOURCE_URI="https://nmap.org/dist-old/nmap-$portVersion.tgz" +CHECKSUM_SHA256="4ab4044b2c8a44466409f668919156b4d8429e0449c6c482ea2063730d727293" +PATCHES="nmap-$portVersion.patchset" + +ARCHITECTURES="x86_gcc2 x86_64" + +PROVIDES=" + nmap = $portVersion + cmd:nmap = $portVersion + " +REQUIRES=" + haiku + lib:libpcap + lib:libpcre + lib:libssl + " + +BUILD_REQUIRES=" + haiku_devel + devel:libpcap + devel:libpcre + devel:libssl + " +BUILD_PREREQUIRES=" + cmd:gcc + cmd:ld + cmd:libtoolize + cmd:make + " + +BUILD() +{ + libtoolize --force --copy --install + pushd nsock/src + libtoolize --force --copy --install + popd + + runConfigure --omit-dirs "dataRootDir docDir" \ + ./configure LDFLAGS=-lnetwork + make $jobArgs +} + +INSTALL() +{ + make $jobArgs install + rm -rf $prefix/share +} diff --git a/net-analyzer/nmap/nmap-7.40.recipe b/net-analyzer/nmap/nmap-7.90.recipe similarity index 91% rename from net-analyzer/nmap/nmap-7.40.recipe rename to net-analyzer/nmap/nmap-7.90.recipe index 74dbd990d..70d663b13 100644 --- a/net-analyzer/nmap/nmap-7.40.recipe +++ b/net-analyzer/nmap/nmap-7.90.recipe @@ -16,11 +16,11 @@ transfer, redirection, and debugging tool (Ncat), a utility for comparing \ scan results (Ndiff), and a packet generation and response analysis tool \ (Nping)." HOMEPAGE="https://nmap.org/" -COPYRIGHT="1996–2016 Insecure.Com LLC (\"The Nmap Project\")." +COPYRIGHT="1996–2020 The Nmap Project" LICENSE="GNU GPL v2" -REVISION="2" +REVISION="1" SOURCE_URI="https://nmap.org/dist/nmap-$portVersion.tar.bz2" -CHECKSUM_SHA256="9e14665fffd054554d129d62c13ad95a7b5c7a046daa2290501909e65f4d3188" +CHECKSUM_SHA256="5557c3458275e8c43e1d0cfa5dad4e71dd39e091e2029a293891ad54098a40e8" ARCHITECTURES="?x86_gcc2 ?x86 ?x86_64" SECONDARY_ARCHITECTURES="?x86_gcc2 ?x86" @@ -34,6 +34,7 @@ REQUIRES=" lib:libpcap$secondaryArchSuffix lib:libpcre$secondaryArchSuffix lib:libssl$secondaryArchSuffix + lib:libz$secondaryArchSuffix " BUILD_REQUIRES=" @@ -41,6 +42,7 @@ BUILD_REQUIRES=" devel:libpcap$secondaryArchSuffix devel:libpcre$secondaryArchSuffix devel:libssl$secondaryArchSuffix + devel:libz$secondaryArchSuffix " BUILD_PREREQUIRES=" cmd:awk diff --git a/net-analyzer/nmap/patches/nmap-3.81.patchset b/net-analyzer/nmap/patches/nmap-3.81.patchset new file mode 100644 index 000000000..b5b5744ad --- /dev/null +++ b/net-analyzer/nmap/patches/nmap-3.81.patchset @@ -0,0 +1,29 @@ +From a583d4143ab81b01295279f0579da3d463dbf611 Mon Sep 17 00:00:00 2001 +From: Sergei Reznikov +Date: Sat, 26 Dec 2020 15:40:21 +0300 +Subject: Fix build on Haiku + + +diff --git a/nmap.h b/nmap.h +index 044b318..02600e0 100644 +--- a/nmap.h ++++ b/nmap.h +@@ -121,6 +121,15 @@ + #include "nmap_amigaos.h" + #endif + ++#ifdef __HAIKU__ ++#define TH_FIN 0x01 ++#define TH_SYN 0x02 ++#define TH_RST 0x04 ++#define TH_PUSH 0x08 ++#define TH_ACK 0x10 ++#define TH_URG 0x20 ++#endif ++ + #include + + #if HAVE_UNISTD_H +-- +2.28.0 +