mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 19:50:05 +02:00
nmap: Add recipe for 7.94; disabled as it doesn't fully work.
This commit is contained in:
@@ -16,18 +16,22 @@ 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–2020 The Nmap Project"
|
||||
COPYRIGHT="1996–2023 The Nmap Project"
|
||||
LICENSE="GNU GPL v2"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://nmap.org/dist/nmap-$portVersion.tar.bz2"
|
||||
CHECKSUM_SHA256="5557c3458275e8c43e1d0cfa5dad4e71dd39e091e2029a293891ad54098a40e8"
|
||||
CHECKSUM_SHA256="d71be189eec43d7e099bac8571509d316c4577ca79491832ac3e1217bc8f92cc"
|
||||
PATCHES="nmap-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="?all"
|
||||
# disabled: doesn't really work, needs route code
|
||||
ARCHITECTURES="?all !x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="?x86_gcc2 ?x86"
|
||||
|
||||
PROVIDES="
|
||||
nmap$secondaryArchSuffix = $portVersion
|
||||
cmd:nmap$secondaryArchSuffix = $portVersion
|
||||
cmd:ncat$secondaryArchSuffix = $portVersion
|
||||
cmd:nping$secondaryArchSuffix = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
@@ -45,7 +49,9 @@ BUILD_REQUIRES="
|
||||
devel:libz$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:autoconf
|
||||
cmd:awk
|
||||
cmd:find
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:ld$secondaryArchSuffix
|
||||
cmd:make
|
||||
@@ -55,11 +61,12 @@ BUILD_PREREQUIRES="
|
||||
|
||||
BUILD()
|
||||
{
|
||||
export LDFLAGS=-lnetwork
|
||||
runConfigure ./configure
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
make $jobArgs install
|
||||
make install
|
||||
}
|
||||
89
net-analyzer/nmap/patches/nmap-7.94.patchset
Normal file
89
net-analyzer/nmap/patches/nmap-7.94.patchset
Normal file
@@ -0,0 +1,89 @@
|
||||
From 9226c6b4fd6efaf043563c1ffe37b5a967f4682b Mon Sep 17 00:00:00 2001
|
||||
From: Augustin Cavalier <waddlesplash@gmail.com>
|
||||
Date: Fri, 22 Sep 2023 17:37:28 -0400
|
||||
Subject: Build fixes for Haiku.
|
||||
|
||||
|
||||
diff --git a/libdnet-stripped/include/dnet/route.h b/libdnet-stripped/include/dnet/route.h
|
||||
index b4bd4cc..2095151 100644
|
||||
--- a/libdnet-stripped/include/dnet/route.h
|
||||
+++ b/libdnet-stripped/include/dnet/route.h
|
||||
@@ -14,6 +14,9 @@
|
||||
/*
|
||||
* Routing table entry
|
||||
*/
|
||||
+#ifdef __HAIKU__
|
||||
+#define route_entry dnet_route_entry
|
||||
+#endif
|
||||
struct route_entry {
|
||||
char intf_name[INTF_NAME_LEN]; /* interface name */
|
||||
struct addr route_dst; /* destination address */
|
||||
diff --git a/libdnet-stripped/src/addr.c b/libdnet-stripped/src/addr.c
|
||||
index 7008966..628cc19 100644
|
||||
--- a/libdnet-stripped/src/addr.c
|
||||
+++ b/libdnet-stripped/src/addr.c
|
||||
@@ -319,12 +319,14 @@ addr_ston(const struct sockaddr *sa, struct addr *a)
|
||||
# endif
|
||||
#endif
|
||||
case AF_UNSPEC:
|
||||
+#ifndef __HAIKU__
|
||||
case ARP_HRD_ETH: /* XXX- Linux arp(7) */
|
||||
case ARP_HRD_APPLETALK: /* AppleTalk DDP */
|
||||
case ARP_HRD_INFINIBAND: /* InfiniBand */
|
||||
case ARP_HDR_IEEE80211: /* IEEE 802.11 */
|
||||
case ARP_HRD_IEEE80211_PRISM: /* IEEE 802.11 + prism header */
|
||||
case ARP_HRD_IEEE80211_RADIOTAP: /* IEEE 802.11 + radiotap header */
|
||||
+#endif
|
||||
a->addr_type = ADDR_TYPE_ETH;
|
||||
a->addr_bits = ETH_ADDR_BITS;
|
||||
memcpy(&a->addr_eth, sa->sa_data, ETH_ADDR_LEN);
|
||||
diff --git a/libnetutil/netutil.cc b/libnetutil/netutil.cc
|
||||
index ff7279e..4e05237 100644
|
||||
--- a/libnetutil/netutil.cc
|
||||
+++ b/libnetutil/netutil.cc
|
||||
@@ -130,7 +130,12 @@ typedef unsigned __int8 u_int8_t;
|
||||
#include <netinet/ip.h>
|
||||
#define NETINET_IP_H
|
||||
#endif
|
||||
+
|
||||
+#ifndef __HAIKU__
|
||||
#include <net/if_arp.h>
|
||||
+#else
|
||||
+#define ARPHRD_ETHER 1 /* ethernet hardware format */
|
||||
+#endif
|
||||
|
||||
#if HAVE_SYS_RESOURCE_H
|
||||
#include <sys/resource.h>
|
||||
diff --git a/ncat/sockaddr_u.h b/ncat/sockaddr_u.h
|
||||
index 069e2c2..353b00a 100644
|
||||
--- a/ncat/sockaddr_u.h
|
||||
+++ b/ncat/sockaddr_u.h
|
||||
@@ -74,6 +74,11 @@
|
||||
#endif
|
||||
#if HAVE_SYS_UN_H
|
||||
# include <sys/un.h>
|
||||
+
|
||||
+#ifndef SUN_LEN
|
||||
+#define SUN_LEN(ptr) ((sizeof(*(ptr)) - sizeof((ptr)->sun_path)) \
|
||||
+ + strlen((ptr)->sun_path))
|
||||
+#endif
|
||||
#endif
|
||||
#if HAVE_LINUX_VM_SOCKETS_H
|
||||
#include <linux/vm_sockets.h>
|
||||
diff --git a/struct_ip.h b/struct_ip.h
|
||||
index 34c2602..cd47296 100644
|
||||
--- a/struct_ip.h
|
||||
+++ b/struct_ip.h
|
||||
@@ -50,7 +50,9 @@ typedef unsigned __int8 u_int8_t;
|
||||
#include <netinet/ip.h>
|
||||
#define NETINET_IP_H
|
||||
#endif
|
||||
+#ifndef __HAIKU__
|
||||
#include <net/if_arp.h>
|
||||
+#endif
|
||||
|
||||
#ifndef WIN32
|
||||
#include <netinet/ip_icmp.h>
|
||||
--
|
||||
2.37.3
|
||||
|
||||
Reference in New Issue
Block a user