aboutsummaryrefslogtreecommitdiff
path: root/security/yersinia
diff options
context:
space:
mode:
authorPav Lucistnik <pav@FreeBSD.org>2007-01-31 14:09:55 +0000
committerPav Lucistnik <pav@FreeBSD.org>2007-01-31 14:09:55 +0000
commiteb81a88093e7d71530eebb2957f8ba4317b26ee6 (patch)
tree9290c97700f22b8ed6b87a10fda7d195dac09f04 /security/yersinia
parente6b247dce1d9f6355a583ef6269fdbba110eaea8 (diff)
downloadports-eb81a88093e7d71530eebb2957f8ba4317b26ee6.tar.gz
ports-eb81a88093e7d71530eebb2957f8ba4317b26ee6.zip
Notes
Diffstat (limited to 'security/yersinia')
-rw-r--r--security/yersinia/Makefile11
-rw-r--r--security/yersinia/files/patch-configure78
2 files changed, 85 insertions, 4 deletions
diff --git a/security/yersinia/Makefile b/security/yersinia/Makefile
index 70db8301fe6f..d053c67a531e 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 <bsd.port.pre.mk>
@@ -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 4ac604b2c151..7f22632cd561 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