From ccd12ccd577604add511aad4ea4e71c32b3e2f06 Mon Sep 17 00:00:00 2001 From: pav Date: Wed, 31 Jan 2007 14:09:55 +0000 Subject: - Patch net/libnet* to versioned libraries and header files, so they can coexist PR: ports/103861 Submitted by: alepulver Tested by: pointyhat With hat: portmgr --- security/dsniff/Makefile | 49 +++++++++++--- security/dsniff/files/patch-aa | 11 --- security/dsniff/files/patch-pcaputil.c | 14 ++++ security/fiked/Makefile | 11 ++- security/firewalk/Makefile | 12 +++- security/ipguard/Makefile | 13 +++- security/labrea/Makefile | 12 +++- security/sasp/Makefile | 5 +- security/sasp/files/patch-Makefile | 11 +++ security/snort/Makefile | 25 +++++-- security/unicornscan/Makefile | 13 ++-- security/unicornscan/files/patch-libs::Makefile | 6 +- security/unicornscan/files/patch-src::Makefile | 10 +-- security/unicornscan/files/patch-src::Makefile.inc | 16 +++-- security/vida/Makefile | 12 ++-- security/yersinia/Makefile | 11 ++- security/yersinia/files/patch-configure | 78 +++++++++++++++++++++- security/zombiezapper/Makefile | 8 +-- 18 files changed, 251 insertions(+), 66 deletions(-) delete mode 100644 security/dsniff/files/patch-aa create mode 100644 security/dsniff/files/patch-pcaputil.c create mode 100644 security/sasp/files/patch-Makefile (limited to 'security') diff --git a/security/dsniff/Makefile b/security/dsniff/Makefile index f1aec32..4ad97b3 100644 --- a/security/dsniff/Makefile +++ b/security/dsniff/Makefile @@ -7,31 +7,60 @@ PORTNAME= dsniff PORTVERSION= 2.3 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= security MASTER_SITES= http://naughty.monkey.org/~dugsong/dsniff/ MAINTAINER= ports@FreeBSD.org COMMENT= Various sniffing utilities for penetration testing -BUILD_DEPENDS= libnet*<=1.1.0,1:${PORTSDIR}/net/libnet10 \ +BUILD_DEPENDS= ${LIBNET_CONFIG}:${PORTSDIR}/net/libnet10 \ ${LOCALBASE}/lib/libnids.a:${PORTSDIR}/net/libnids -BROKEN= Depends on incompatible versions of libnet - GNU_CONFIGURE= yes +WANT_GNOME= yes + +OPTIONS= X11 "Enable X11 support" on + +MAN8= arpspoof.8 dsniff.8 macof.8 mailsnarf.8 tcpkill.8 \ + tcpnice.8 urlsnarf.8 filesnarf.8 dnsspoof.8 msgsnarf.8 \ + sshmitm.8 webmitm.8 -MAN8= arpspoof.8 dsniff.8 macof.8 mailsnarf.8 tcpkill.8 \ - tcpnice.8 urlsnarf.8 filesnarf.8 dnsspoof.8 msgsnarf.8 \ - sshmitm.8 webmitm.8 +LIBNET_CONFIG?= ${LOCALBASE}/bin/libnet10-config + +.include + +# If net/libnids has been compiled with the GLIB2 option then this port needs +# the corresponding library and additional linker flags. +.if exists(${LOCALBASE}/lib/libnids.a) +LIBNIDS_GLIB2!= nm -u ${LOCALBASE}/lib/libnids.a | ${GREP} g_thread_init +.endif + +.if !empty(LIBNIDS_GLIB2) +USE_GNOME+= glib20 +.endif .if !defined(WITHOUT_X11) USE_XLIB= yes PLIST_SUB+= X11='' -MAN8+= webspy.8 +MAN8+= webspy.8 .else -CONFIGURE_ARGS+= --without-x +CONFIGURE_ARGS+=--without-x PLIST_SUB+= X11='@comment ' .endif -.include +post-patch: + @${REINPLACE_CMD} -Ee \ + 's|libnet-config|${LIBNET_CONFIG:T}|; \ + s|test -f \$${prefix}/include/libnet.h|${TRUE}|; \ + s|(LNETINC=).*|\1"`${LIBNET_CONFIG} --cflags`"|; \ + s|(LNETLIB=).*|\1"`${LIBNET_CONFIG} --libs`"|' \ + ${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT} + +.if !empty(LIBNIDS_GLIB2) +pre-configure: + @${REINPLACE_CMD} -e 's|@NIDSLIB@|& `pkg-config --libs gthread-2.0`|' \ + ${WRKSRC}/Makefile.in +.endif + +.include diff --git a/security/dsniff/files/patch-aa b/security/dsniff/files/patch-aa deleted file mode 100644 index a992259..0000000 --- a/security/dsniff/files/patch-aa +++ /dev/null @@ -1,11 +0,0 @@ ---- Makefile.in.orig Fri Dec 22 16:30:32 2000 -+++ Makefile.in Fri Dec 22 16:30:50 2000 -@@ -37,7 +37,7 @@ - X11INC = @X_CFLAGS@ - X11LIB = @X_LIBS@ @X_PRE_LIBS@ -lXmu -lX11 @X_EXTRA_LIBS@ - --INCS = -I. $(NIDSINC) $(PCAPINC) $(LNETINC) $(DBINC) $(SSLINC) $(X11INC) \ -+INCS = -I. -I/usr/include $(NIDSINC) $(PCAPINC) $(LNETINC) $(DBINC) $(SSLINC) $(X11INC) \ - -I$(srcdir)/missing - LIBS = @LIBS@ -L$(srcdir) -lmissing - diff --git a/security/dsniff/files/patch-pcaputil.c b/security/dsniff/files/patch-pcaputil.c new file mode 100644 index 0000000..c8cc520 --- /dev/null +++ b/security/dsniff/files/patch-pcaputil.c @@ -0,0 +1,14 @@ +--- ./pcaputil.c.orig Tue Nov 14 12:51:08 2000 ++++ ./pcaputil.c Mon Sep 25 16:26:13 2006 +@@ -13,9 +13,9 @@ + #include + #include + #include +-#include ++#include + #ifdef BSD +-#include ++#include + #endif + #include "pcaputil.h" + diff --git a/security/fiked/Makefile b/security/fiked/Makefile index 7e992db..fb6c8b8 100644 --- a/security/fiked/Makefile +++ b/security/fiked/Makefile @@ -7,6 +7,7 @@ PORTNAME= fiked PORTVERSION= 0.0.4 +PORTREVISION= 1 CATEGORIES= security MASTER_SITES= http://dragon.roe.ch/bitsnpieces/fiked/ \ http://home.tiscalinet.ch/roe/fiked/ @@ -16,7 +17,7 @@ COMMENT= A fake IKE PSK+XAUTH daemon based on VPNC LIB_DEPENDS= gcrypt.13:${PORTSDIR}/security/libgcrypt .if !defined(WITHOUT_LIBNET) -BUILD_DEPENDS= libnet*>=1.1.2,1:${PORTSDIR}/net/libnet +BUILD_DEPENDS= ${LIBNET_CONFIG}:${PORTSDIR}/net/libnet .endif USE_BZIP2= yes @@ -29,8 +30,14 @@ PLIST_FILES= bin/fiked MAN1= fiked.1 PORTDOCS= README NEWS +LIBNET_CONFIG?= ${LOCALBASE}/bin/libnet11-config + post-patch: - @${REINPLACE_CMD} -e 's|=-g|=|' ${WRKSRC}/${MAKEFILE} + @${REINPLACE_CMD} -e \ + 's|=-g|=|; \ + s|-lnet|`${LIBNET_CONFIG} --libs`|; \ + s|-DWITH_LIBNET|& `${LIBNET_CONFIG} --cflags`|' \ + ${WRKSRC}/${MAKEFILE} do-install: ${INSTALL_PROGRAM} ${WRKSRC}/fiked ${PREFIX}/bin diff --git a/security/firewalk/Makefile b/security/firewalk/Makefile index dd8e730..b94440e 100644 --- a/security/firewalk/Makefile +++ b/security/firewalk/Makefile @@ -7,7 +7,7 @@ PORTNAME= firewalk PORTVERSION= 5.0 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= security MASTER_SITES= http://www.packetfactory.net/firewalk/dist/ EXTRACT_SUFX= .tgz @@ -16,16 +16,22 @@ MAINTAINER= onatan@gmail.com COMMENT= A remote firewall auditing tool BUILD_DEPENDS= ${LOCALBASE}/lib/libdnet.a:${PORTSDIR}/net/libdnet \ - libnet*>=1.1.2,1:${PORTSDIR}/net/libnet + ${LIBNET_CONFIG}:${PORTSDIR}/net/libnet RUN_DEPENDS= ${BUILD_DEPENDS} WRKSRC= ${WRKDIR}/Firewalk GNU_CONFIGURE= yes -CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \ +CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include `${LIBNET_CONFIG} --cflags`" \ LDFLAGS="-L${LOCALBASE}/lib" MAN8= firewalk.8 +LIBNET_CONFIG?= ${LOCALBASE}/bin/libnet11-config + +post-patch: + @${REINPLACE_CMD} -e 's|-lnet|`${LIBNET_CONFIG} --libs`|' \ + ${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT} + do-install: ${INSTALL_PROGRAM} ${WRKSRC}/src/firewalk ${PREFIX}/bin/ ${INSTALL_MAN} ${WRKSRC}/man/firewalk.8 ${MANPREFIX}/man/man8/ diff --git a/security/ipguard/Makefile b/security/ipguard/Makefile index a5a20b0..e2651af 100644 --- a/security/ipguard/Makefile +++ b/security/ipguard/Makefile @@ -7,14 +7,14 @@ PORTNAME= ipguard PORTVERSION= 0.04 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= security net MASTER_SITES= http://ipguard.deep.perm.ru/files/ MAINTAINER= ports@FreeBSD.org COMMENT= Tool designed to protect LAN IP adress space by ARP spoofing -BUILD_DEPENDS= libnet*<=1.1.0,1:${PORTSDIR}/net/libnet10 +BUILD_DEPENDS= ${LIBNET_CONFIG}:${PORTSDIR}/net/libnet10 MAN8= ipguard.8 @@ -24,7 +24,14 @@ MAKE_ARGS+= ETHERS=${ETHERS} SUB_FILES= pkg-message SUB_LIST= ETHERS=${ETHERS} -PKGMESSAGE= ${WRKDIR}/pkg-message + +LIBNET_CONFIG?= ${LOCALBASE}/bin/libnet10-config + +post-patch: + @${REINPLACE_CMD} -Ee \ + 's|libnet-config|${LIBNET_CONFIG}|; \ + s|^(INCLUDES=).*|\1`${LIBNET_CONFIG} --cflags`|' \ + ${WRKSRC}/${MAKEFILE} do-install: ${INSTALL_PROGRAM} ${WRKSRC}/ipguard ${PREFIX}/sbin diff --git a/security/labrea/Makefile b/security/labrea/Makefile index 883d3e0..3084e9d 100644 --- a/security/labrea/Makefile +++ b/security/labrea/Makefile @@ -7,7 +7,7 @@ PORTNAME= LaBrea PORTVERSION= 2.4 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= security MASTER_SITES= http://freebsd.rogness.net/ports/labrea/ DISTNAME= ${PORTNAME}${PORTVERSION:S/./_/g} @@ -16,7 +16,15 @@ EXTRACT_SUFX= .tgz MAINTAINER= nick@rogness.net COMMENT= Security tarpit defense tool -BUILD_DEPENDS= libnet*<=1.1.0,1:${PORTSDIR}/net/libnet10 +BUILD_DEPENDS= ${LIBNET_CONFIG}:${PORTSDIR}/net/libnet10 + +LIBNET_CONFIG?= ${LOCALBASE}/bin/libnet10-config + +post-patch: + @${REINPLACE_CMD} -e \ + 's|libnet-config|${LIBNET_CONFIG}|; \ + s|--defines|& --cflags|' \ + ${WRKSRC}/${MAKEFILE} do-install: ${INSTALL_PROGRAM} ${WRKSRC}/LaBrea ${PREFIX}/bin diff --git a/security/sasp/Makefile b/security/sasp/Makefile index ebe373c..09496e5 100644 --- a/security/sasp/Makefile +++ b/security/sasp/Makefile @@ -16,9 +16,12 @@ MASTER_SITE_SUBDIR= ahze MAINTAINER= sviat@OpenGEEKS.it COMMENT= A tool that permits to use a gateway whatever IP we have -BUILD_DEPENDS= libnet*>=1.1.2,1:${PORTSDIR}/net/libnet +BUILD_DEPENDS= ${LIBNET_CONFIG}:${PORTSDIR}/net/libnet NO_WRKSUBDIR= yes +MAKE_ENV= LIBNET_CONFIG="${LIBNET_CONFIG}" PLIST_FILES= sbin/sasp +LIBNET_CONFIG?= ${LOCALBASE}/bin/libnet11-config + .include diff --git a/security/sasp/files/patch-Makefile b/security/sasp/files/patch-Makefile new file mode 100644 index 0000000..7ec25d4 --- /dev/null +++ b/security/sasp/files/patch-Makefile @@ -0,0 +1,11 @@ +--- ./Makefile.orig Thu Apr 7 06:33:45 2005 ++++ ./Makefile Wed Sep 27 22:46:49 2006 +@@ -1,6 +1,6 @@ + all: +- cc -o sasp sasp.c -L/usr/local/lib -I/usr/local/include -lpcap -lnet ++ ${CC} `${LIBNET_CONFIG} --cflags` -o sasp sasp.c -lpcap `${LIBNET_CONFIG} --libs` + install: +- install -o root -m 555 sasp /usr/local/sbin ++ ${BSD_INSTALL_PROGRAM} sasp ${PREFIX}/sbin + clean: + rm -rf *.o diff --git a/security/snort/Makefile b/security/snort/Makefile index d408223..46bd022 100644 --- a/security/snort/Makefile +++ b/security/snort/Makefile @@ -49,6 +49,19 @@ DOCS= RELEASE.NOTES doc/AUTHORS doc/BUGS doc/CREDITS \ EXTRA_PATCHES+= ${FILESDIR}/extra-patch-src-sf_snort_plugin_api.h .endif +.if defined(WITH_FLEXRESP) +LIBNET_CONFIG?= ${LOCALBASE}/bin/libnet10-config +.elif defined(WITH_FLEXRESP2) +LIBNET_CONFIG?= ${LOCALBASE}/bin/libnet11-config +.endif + +.if exists(${LIBNET_CONFIG}) +LIBNET_CFLAGS!= ${LIBNET_CONFIG} --cflags +LIBNET_LIBS!= ${LIBNET_CONFIG} --libs +LIBNET_INCDIR= ${LIBNET_CFLAGS:M-I*:S/-I//} +LIBNET_LIBDIR= ${LIBNET_CFLAGS:M-L*:S/-L//} +.endif + .if !defined(WITHOUT_DYNAMIC) USE_AUTOTOOLS= libtool:15 USE_LDCONFIG= yes @@ -62,21 +75,21 @@ PLIST_SUB+= DYNAMIC="@comment " .if defined(WITH_FLEXRESP2) IGNORE= options FLEXRESP and FLEXRESP2 are mutually exclusive .endif -BUILD_DEPENDS+= libnet*<=1.1.0,1:${PORTSDIR}/net/libnet10 +BUILD_DEPENDS+= ${LIBNET_CONFIG}:${PORTSDIR}/net/libnet10 CONFIGURE_ARGS+= --enable-flexresp \ - --with-libnet-includes=${LOCALBASE}/include \ - --with-libnet-libraries=${LOCALBASE}/lib + --with-libnet-includes=${LIBNET_INCDIR} \ + --with-libnet-libraries=${LIBNET_LIBDIR} .endif .if defined(WITH_FLEXRESP2) BROKEN= FLEXRESP2 patch file does not incorporate cleanly PATCH_SITES+= http://cerberus.sourcefire.com/~jeff/archives/snort/sp_respond2/ PATCHFILES+= sp_respond2.diff.gz -BUILD_DEPENDS+= libnet*>=1.1.2.1,1:${PORTSDIR}/net/libnet \ +BUILD_DEPENDS+= ${LIBNET_CONFIG}:${PORTSDIR}/net/libnet libdnet*>=1.10_1:${PORTSDIR}/net/libdnet CONFIGURE_ARGS+= --enable-flexresp2 \ - --with-libnet-includes=${LOCALBASE}/include \ - --with-libnet-libraries=${LOCALBASE}/lib + --with-libnet-includes=${LIBNET_INCDIR} \ + --with-libnet-libraries=${LIBNET_LIBDIR} .endif .if defined(WITH_MYSQL) diff --git a/security/unicornscan/Makefile b/security/unicornscan/Makefile index f719169..1fb0a26 100644 --- a/security/unicornscan/Makefile +++ b/security/unicornscan/Makefile @@ -7,20 +7,23 @@ PORTNAME= unicornscan PORTVERSION= 0.4.2 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= security MASTER_SITES= http://www.dyadsecurity.com/unicornscan/ MAINTAINER= cykyc@yahoo.com COMMENT= Next-generation of udpscan plus a high-speed TCP scanner -BUILD_DEPENDS= libnet*>=1.1.2,1:${PORTSDIR}/net/libnet +BUILD_DEPENDS= ${LIBNET_CONFIG}:${PORTSDIR}/net/libnet USE_GMAKE= yes +MAKE_ENV= LIBNET_CONFIG="${LIBNET_CONFIG}" MAN1= unicornscan.1 -PKGMESSAGE= ${WRKDIR}/pkg-message +PKGMESSAGE= ${WRKDIR}/pkg-message + +LIBNET_CONFIG?= ${LOCALBASE}/bin/libnet11-config .include @@ -35,7 +38,7 @@ BUILD_DEPENDS+= ${PREFIX}/lib/libpcap.a:${PORTSDIR}/net/libpcap # function .if ${OSVERSION} > 502103 -CFLAGS+= -DWITH_LONGOPTS +CFLAGS+= -DWITH_LONGOPTS .endif post-patch: @@ -43,6 +46,8 @@ post-patch: @${SED} -e 's,%%PREFIX%%,${PREFIX},g' \ ${PKGDIR}/${text} >${WRKDIR}/${text} .endfor + @${REINPLACE_CMD} -e 's|-lnet|`${LIBNET_CONFIG} --libs`|' \ + ${WRKSRC}/src/scan_progs/Makefile ${WRKSRC}/src/tools/Makefile do-install: ${MKDIR} ${PREFIX}/etc/unicornscan diff --git a/security/unicornscan/files/patch-libs::Makefile b/security/unicornscan/files/patch-libs::Makefile index b5afb29..ee72e98 100644 --- a/security/unicornscan/files/patch-libs::Makefile +++ b/security/unicornscan/files/patch-libs::Makefile @@ -1,5 +1,5 @@ ---- libs/Makefile.orig Thu Sep 30 05:29:05 2004 -+++ libs/Makefile Tue Oct 5 13:36:57 2004 +--- libs/Makefile.orig Thu Sep 30 07:29:05 2004 ++++ libs/Makefile Fri Sep 29 14:32:37 2006 @@ -6,30 +6,10 @@ default: pcap_test libnet_test @@ -29,7 +29,7 @@ - -libpcap-$(PCAPVER).tar.gz: - wget http://tcpdump.org/release/libpcap-$(PCAPVER).tar.gz -+ $(CC) $(CFLAGS) -o libnet_test libnet_test.c -lpcap -lnet $(LDADD) ++ $(CC) $(CFLAGS) -o libnet_test libnet_test.c -lpcap `$(LIBNET_CONFIG) --libs` $(LDADD) clean: - rm -rf fake libnet libpcap-$(PCAPVER) pcap_test libnet_test diff --git a/security/unicornscan/files/patch-src::Makefile b/security/unicornscan/files/patch-src::Makefile index 05ebc6d..9ca3375 100644 --- a/security/unicornscan/files/patch-src::Makefile +++ b/security/unicornscan/files/patch-src::Makefile @@ -1,11 +1,13 @@ ---- src/Makefile.orig Mon Dec 13 22:24:21 2004 -+++ src/Makefile Mon Dec 13 22:24:38 2004 -@@ -4,7 +4,7 @@ +--- src/Makefile.orig Thu Sep 30 07:29:05 2004 ++++ src/Makefile Fri Sep 29 14:32:21 2006 +@@ -4,8 +4,8 @@ HDRS=$(SRCS:.c=.h) config.h settings.h OBJS=$(SRCS:.c=.o) -CFLAGS=$(MYCFLAGS) +-LIBS=-lscan -luni -lparse -lpcap -lnet $(LDADD) +CFLAGS+=$(MYCFLAGS) - LIBS=-lscan -luni -lparse -lpcap -lnet $(LDADD) ++LIBS=-lscan -luni -lparse -lpcap `$(LIBNET_CONFIG) --libs` $(LDADD) LIBDIRS=-L./unilib -L./scan_progs -L./parse -L../libs/fake/lib TARGETNAME=unicornscan + diff --git a/security/unicornscan/files/patch-src::Makefile.inc b/security/unicornscan/files/patch-src::Makefile.inc index a8f1455..91e7e62 100644 --- a/security/unicornscan/files/patch-src::Makefile.inc +++ b/security/unicornscan/files/patch-src::Makefile.inc @@ -1,8 +1,9 @@ ---- src/Makefile.inc.orig Thu Sep 30 05:29:05 2004 -+++ src/Makefile.inc Tue Oct 5 11:07:49 2004 -@@ -1,8 +1,7 @@ +--- src/Makefile.inc.orig Thu Sep 30 07:29:05 2004 ++++ src/Makefile.inc Thu Sep 28 14:08:32 2006 +@@ -1,14 +1,13 @@ # gcc only - CC=gcc +-CC=gcc ++CC?=gcc -PREFIX=/usr/local -LOCALSTATEDIR=/var @@ -10,6 +11,13 @@ TARGETNAME=unicornscan SENDERNAME=unisend LISTENERNAME=unilisten + + # its fine to do almost anything here, just dont remove the includes +-MYCFLAGS=-O1 -ggdb -Wall -Wshadow -Wcast-align -Wcast-qual -Wchar-subscripts -Wno-deprecated-declarations -Wformat-security -Wimplicit -Wsign-compare -Wuninitialized -Wunused -Wwrite-strings -I. -rdynamic -I../libs/fake/include -I/usr/local/include -L/usr/local/lib -DPREFIX=\"$(PREFIX)\" -DLOCALSTATEDIR=\"$(LOCALSTATEDIR)\" -DTARGETNAME=\"$(TARGETNAME)\" -DSENDERNAME=\"$(SENDERNAME)\" -DLISTENERNAME=\"$(LISTENERNAME)\" ++MYCFLAGS:=$(CFLAGS) -O1 -ggdb -Wall -Wshadow -Wcast-align -Wcast-qual -Wchar-subscripts -Wno-deprecated-declarations -Wformat-security -Wimplicit -Wsign-compare -Wuninitialized -Wunused -Wwrite-strings -I. -rdynamic -I../libs/fake/include `$(LIBNET_CONFIG) --defines` `$(LIBNET_CONFIG) --cflags` -DPREFIX=\"$(PREFIX)\" -DLOCALSTATEDIR=\"$(LOCALSTATEDIR)\" -DTARGETNAME=\"$(TARGETNAME)\" -DSENDERNAME=\"$(SENDERNAME)\" -DLISTENERNAME=\"$(LISTENERNAME)\" + + # sometimes you dont have a link to gmake, if your make _is_ gmake, you can use make then, but we need GNU make (for now) + MAKE=gmake @@ -23,10 +22,10 @@ #LDADD=-lsocket -lnsl -ldl -lposix4 -lresolv diff --git a/security/vida/Makefile b/security/vida/Makefile index 3e8635c..059fa75 100644 --- a/security/vida/Makefile +++ b/security/vida/Makefile @@ -7,23 +7,25 @@ PORTNAME= vida PORTVERSION= 0.7.1 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= security MASTER_SITES= http://vidatapipe.sourceforge.net/ MAINTAINER= mich@FreeBSD.org COMMENT= Vida is a multi-datapipe handler -BUILD_DEPENDS= libnet*<=1.1.0,1:${PORTSDIR}/net/libnet10 +BUILD_DEPENDS= ${LIBNET_CONFIG}:${PORTSDIR}/net/libnet10 -LDFLAGS+= -pthread -lncurses -lpcap -lnet +LDFLAGS+= ${PTHREAD_LIBS} -lncurses -lpcap `${LIBNET_CONFIG} --libs` WRKSRC= ${WRKDIR}/${PORTNAME} +LIBNET_CONFIG?= ${LOCALBASE}/bin/libnet10-config + do-build: cd ${WRKSRC} && \ - ${CC} -I${LOCALBASE}/include -L${LOCALBASE}/lib ${CFLAGS} vida.c funz.c dnshijacking.c \ - ${LDFLAGS} `libnet-config --defines` -o ${PORTNAME} + ${CC} `${LIBNET_CONFIG} --defines --cflags` ${CFLAGS} \ + vida.c funz.c dnshijacking.c ${LDFLAGS} -o ${PORTNAME} do-install: ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin diff --git a/security/yersinia/Makefile b/security/yersinia/Makefile index 70db830..d053c67 100644 --- a/security/yersinia/Makefile +++ b/security/yersinia/Makefile @@ -7,14 +7,14 @@ PORTNAME= yersinia PORTVERSION= 0.7 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= security MASTER_SITES= http://www.yersinia.net/download/ MAINTAINER= se@FreeBSD.org COMMENT= Layer 2 vulnerability scanner (switches, spanning tree, 802.1q ...) -BUILD_DEPENDS= libnet*>=1.1.2,1:${PORTSDIR}/net/libnet +BUILD_DEPENDS= ${LIBNET_CONFIG}:${PORTSDIR}/net/libnet .if !defined(WITHOUT_GTK) .if exists(${LOCALBASE}/include/gtk-2.0/gtk/gtk.h) @@ -30,6 +30,9 @@ CONFIGURE_ARGS+= --disable-gtk CONFLICTS= yersinia-gtk-[0-9]* .endif GNU_CONFIGURE= yes +CONFIGURE_ENV= LIBNET_CONFIG="${LIBNET_CONFIG}" + +LIBNET_CONFIG?= ${LOCALBASE}/bin/libnet11-config .include @@ -41,6 +44,10 @@ BUILD_DEPENDS+= ${LOCALBASE}/lib/libpcap.a:${PORTSDIR}/net/libpcap MAN8= yersinia.8 PLIST_FILES= sbin/yersinia +post-patch: + @${REINPLACE_CMD} -e 's|-lnet|`${LIBNET_CONFIG} --libs`|' \ + ${WRKSRC}/src/Makefile.in + do-install: ${INSTALL_PROGRAM} ${WRKSRC}/src/yersinia ${PREFIX}/sbin/ ${INSTALL_MAN} ${WRKSRC}/yersinia.8 ${PREFIX}/man/man8/ diff --git a/security/yersinia/files/patch-configure b/security/yersinia/files/patch-configure index 4ac604b..7f22632 100644 --- a/security/yersinia/files/patch-configure +++ b/security/yersinia/files/patch-configure @@ -1,5 +1,5 @@ ---- configure~ Sun Jun 18 17:24:36 2006 -+++ configure Mon Jul 10 17:43:09 2006 +--- ./configure.orig Sun Jun 18 12:24:36 2006 ++++ ./configure Fri Sep 29 15:04:21 2006 @@ -2971,7 +2971,8 @@ @@ -19,3 +19,77 @@ else pcap_dir="$dir" fi +@@ -3997,62 +3998,8 @@ + + + +-echo "$as_me:$LINENO: checking for a complete set of libnet headers" >&5 +-echo $ECHO_N "checking for a complete set of libnet headers... $ECHO_C" >&6 +- +-possible_dirs="`eval echo -n ${includedir}` \ +- /usr/include /usr/include/libnet \ +- /usr/local/include /usr/local/include/libnet \ +- /usr/share/include /usr/share/include/libnet" +- +-possible_libnet_config_dirs="/usr /usr/local /opt" +- +- +-# Check whether --with-libnet-includes or --without-libnet-includes was given. +-if test "${with_libnet_includes+set}" = set; then +- withval="$with_libnet_includes" +- LIBNET_DIR=$withval LIBNET_CONFIG_DIR=$withval +-else +- LIBNET_DIR=$possible_dirs LIBNET_CONFIG_DIR=$possible_libnet_config_dirs +-fi; +- +-libnet_dir="" +-for dir in $LIBNET_DIR ; do +- if test -d $dir -a -r "$dir/libnet.h" ; then +- if test -n "$libnet_dir" -a "$libnet_dir" != "$dir"; then +- echo +- echo; echo more than one set found in: +- echo $libnet_dir +- echo $dir +- echo; echo please wipe out all unused libnet installations +- exit +- else +- libnet_dir="$dir" +- fi +- fi +-done +- +-for dir in $LIBNET_CONFIG_DIR ; do +- if test -d $dir -a -r "$dir/bin/libnet-config" ; then +- libnet_config_dir="$dir/bin" +- fi +-done +- +-if test -z "$libnet_dir" ; then +- echo no; echo !!! couldn\'t find a complete set of libnet headers +- exit +-else +- echo found $libnet_dir +- +- LIBNET_INCLUDE="-I$libnet_dir" +- LIBNET_LINK="-L`dirname $libnet_dir`/lib" +- LIBNET_CONFIG="$libnet_config_dir/libnet-config" +- +- +- +- +- +-fi ++LIBNET_INCLUDE="`$LIBNET_CONFIG --cflags`" ++LIBNET_LINK="" + + if test "$LIBNET_LINK" != "-L/usr/lib" ; then + LIBS="$LIBS $LIBNET_LINK" +@@ -4067,7 +4014,7 @@ + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + ac_check_lib_save_LIBS=$LIBS +-LIBS="-lnet $LIBS" ++LIBS="`$LIBNET_CONFIG --libs` $LIBS" + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF diff --git a/security/zombiezapper/Makefile b/security/zombiezapper/Makefile index f0fac00..d60ef13 100644 --- a/security/zombiezapper/Makefile +++ b/security/zombiezapper/Makefile @@ -7,7 +7,7 @@ PORTNAME= zombiezapper PORTVERSION= 1.2 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= security MASTER_SITES= http://razor.bindview.com/tools/files/ DISTNAME= zombie-${PORTVERSION} @@ -16,13 +16,13 @@ EXTRACT_SUFX= .tgz MAINTAINER= roam@FreeBSD.org COMMENT= Send a terminate command to Trinoo/TFN/Stacheldracht DDoS agents -BUILD_DEPENDS= libnet*<=1.1.0,1:${PORTSDIR}/net/libnet10/ +BUILD_DEPENDS= ${LIBNET_CONFIG}:${PORTSDIR}/net/libnet10 -LIBNETCONF= ${LOCALBASE}/bin/libnet-config +LIBNET_CONFIG?= ${LOCALBASE}/bin/libnet10-config do-build: cd ${WRKSRC} && \ - ${CC} ${CFLAGS} -o zz zz.c `${LIBNETCONF} --cflags` `${LIBNETCONF} --defines` `${LIBNETCONF} --libs` -L${LOCALBASE}/lib -I${LOCALBASE}/include + ${CC} ${CFLAGS} -o zz zz.c `${LIBNET_CONFIG} --cflags` `${LIBNET_CONFIG} --defines` `${LIBNET_CONFIG} --libs` do-install: ${INSTALL_PROGRAM} ${WRKSRC}/zz ${PREFIX}/bin/ -- cgit v1.1