From 1836c456489232c13a1c58738f33ee9e77d40f21 Mon Sep 17 00:00:00 2001 From: brad Date: Tue, 27 Jul 1999 04:05:48 +0000 Subject: [PATCH] - strip nmap binary on installation - make nmap use the systems libpcap - make nmap work with datalink types of DLT_LOOP and DLT_ENC --- net/nmap/Makefile | 8 +++++++- net/nmap/patches/patch-aa | 26 ++++++++++++++++++++++++++ net/nmap/patches/patch-ab | 18 ++++++++++++++++++ 3 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 net/nmap/patches/patch-aa create mode 100644 net/nmap/patches/patch-ab diff --git a/net/nmap/Makefile b/net/nmap/Makefile index d89cf9a9c10..909fe79cc7e 100644 --- a/net/nmap/Makefile +++ b/net/nmap/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.6 1999/06/18 00:17:47 brad Exp $ +# $OpenBSD: Makefile,v 1.7 1999/07/27 04:05:48 brad Exp $ DISTNAME= nmap-2.12 CATEGORIES= net @@ -10,4 +10,10 @@ MAINTAINER= angelos@openbsd.org GNU_CONFIGURE= yes +post-extract: + @${RM} -rf ${WRKSRC}/libpcap* + +post-install: + @strip ${PREFIX}/bin/nmap + .include diff --git a/net/nmap/patches/patch-aa b/net/nmap/patches/patch-aa new file mode 100644 index 00000000000..321fb7c2544 --- /dev/null +++ b/net/nmap/patches/patch-aa @@ -0,0 +1,26 @@ +--- Makefile.in.orig Mon Jul 26 22:28:22 1999 ++++ Makefile.in Mon Jul 26 22:29:17 1999 +@@ -5,12 +5,12 @@ + sbindir = @sbindir@ + mandir = @mandir@ + srcdir = @srcdir@ +-libdir = @libdir@/nmap ++libdir = @libdir@ + + CC = @CC@ + CCOPT = + LIBPCAPDIR = @libpcapdir@ +-INCLS = -I. -I$(LIBPCAPDIR) ++INCLS = -I. # -I$(LIBPCAPDIR) + DEFS = @DEFS@ -DVERSION=\"$(VERSION)\" -DLIBDIR=\"$(libdir)\" + CFLAGS = @CFLAGS@ $(CCOPT) $(DEFS) $(INCLS) + # CFLAGS = -g -Wall $(DEFS) $(INCLS) +@@ -32,7 +32,7 @@ + + all: $(TARGET) + +-$(TARGET): $(DEPS) @PCAP_DEPENDS@ $(OBJS) ++$(TARGET): $(DEPS) $(OBJS) # @PCAP_DEPENDS@ + @echo Compiling nmap + rm -f $@ + $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS) diff --git a/net/nmap/patches/patch-ab b/net/nmap/patches/patch-ab new file mode 100644 index 00000000000..16d97de40bf --- /dev/null +++ b/net/nmap/patches/patch-ab @@ -0,0 +1,18 @@ +--- tcpip.c.orig Mon Jul 26 23:42:08 1999 ++++ tcpip.c Mon Jul 26 23:44:55 1999 +@@ -774,6 +774,7 @@ + switch(datalink) { + case DLT_EN10MB: offset = 14; break; + case DLT_IEEE802: offset = 22; break; ++ case DLT_LOOP: + case DLT_NULL: offset = 4; break; + case DLT_SLIP: + #if (FREEBSD || OPENBSD || NETBSD || BSDI) +@@ -794,6 +795,7 @@ + #endif /* if freebsd || openbsd || netbsd || bsdi */ + break; + case DLT_RAW: offset = 0; break; ++ case DLT_ENC: offset = 12; break; + default: fatal("Unknown datalink type (%d)", datalink); + } + }