aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--security/unicornscan/Makefile18
-rw-r--r--security/unicornscan/files/patch-src::Makefile11
-rw-r--r--security/unicornscan/files/patch-src::config.h15
-rw-r--r--security/unicornscan/pkg-message4
-rw-r--r--security/unicornscan/pkg-plist1
5 files changed, 45 insertions, 4 deletions
diff --git a/security/unicornscan/Makefile b/security/unicornscan/Makefile
index 723fd609f70c..1fcc9e4273ab 100644
--- a/security/unicornscan/Makefile
+++ b/security/unicornscan/Makefile
@@ -22,6 +22,22 @@ MAN1= unicornscan.1
PKGMESSAGE= ${WRKDIR}/pkg-message
+.include <bsd.port.pre.mk>
+
+# Check if where building on a 5.3 or older system. Older
+# system require libpcap 0.8.x to be installed.
+
+.if ${OSVERSION} < 503000
+BUILD_DEPENDS+= libpcap:${PORTSDIR}/net/libpcap
+.endif
+
+# Systems newer then 502103 include the getopt_long
+# function
+
+.if ${OSVERSION} > 502103
+CFLAGS+= -DWITH_LONGOPTS
+.endif
+
post-patch:
.for text in pkg-message
@${SED} -e 's,%%PREFIX%%,${PREFIX},g' \
@@ -61,4 +77,4 @@ do-install:
done
@${CAT} ${PKGMESSAGE}
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/security/unicornscan/files/patch-src::Makefile b/security/unicornscan/files/patch-src::Makefile
new file mode 100644
index 000000000000..05ebc6d7fdce
--- /dev/null
+++ b/security/unicornscan/files/patch-src::Makefile
@@ -0,0 +1,11 @@
+--- src/Makefile.orig Mon Dec 13 22:24:21 2004
++++ src/Makefile Mon Dec 13 22:24:38 2004
+@@ -4,7 +4,7 @@
+ HDRS=$(SRCS:.c=.h) config.h settings.h
+ OBJS=$(SRCS:.c=.o)
+
+-CFLAGS=$(MYCFLAGS)
++CFLAGS+=$(MYCFLAGS)
+ LIBS=-lscan -luni -lparse -lpcap -lnet $(LDADD)
+ LIBDIRS=-L./unilib -L./scan_progs -L./parse -L../libs/fake/lib
+ TARGETNAME=unicornscan
diff --git a/security/unicornscan/files/patch-src::config.h b/security/unicornscan/files/patch-src::config.h
index 4e15c5bb09ef..e9e452f4a8cb 100644
--- a/security/unicornscan/files/patch-src::config.h
+++ b/security/unicornscan/files/patch-src::config.h
@@ -1,5 +1,14 @@
---- src/config.h.orig Mon Oct 4 21:42:19 2004
-+++ src/config.h Mon Oct 4 21:45:12 2004
+--- src/config.h.orig Mon Dec 13 12:26:43 2004
++++ src/config.h Mon Dec 13 12:29:18 2004
+@@ -39,7 +39,7 @@
+ * GNU/Linux and some other (newer) systems might have this, its ok to say no
+ * even if you dont have this, you just wont have the -- options on the command line
+ */
+-#define WITH_LONGOPTS
++//#define WITH_LONGOPTS
+
+ /*
+ * lots of newer bsd'ish systems have this as well as some (newer?) linux systems. youll need this
@@ -47,7 +47,7 @@
* and are not running linux, however it likely will not work arp scanning.
* side note: dont use this on linux, its broken!
@@ -34,7 +43,7 @@
/*
* XXX
* you shouldnt have to play with these, most likely
-@@ -123,8 +123,8 @@
+@@ -128,8 +128,8 @@
#define MODULE_DIR PREFIX "/libexec/" TARGETNAME "/modules"
#define PORT_NUMBERS PREFIX "/share/" TARGETNAME "/port-numbers"
diff --git a/security/unicornscan/pkg-message b/security/unicornscan/pkg-message
index 0889e5aed86e..cc648a5c8d4e 100644
--- a/security/unicornscan/pkg-message
+++ b/security/unicornscan/pkg-message
@@ -5,5 +5,9 @@ unicornscan has been successfully installed!
Check the sample configuration files in
%%PREFIX%%/etc/unicornscan
and rename or copy without the .sample suffix.
+
+Note that the long option parameters, which are
+displayed by this ports man page and help menu,
+are disabled on FreeBSD systems prior to 5.2.
##############################################
diff --git a/security/unicornscan/pkg-plist b/security/unicornscan/pkg-plist
index 85e6dcf056b0..08e471780c13 100644
--- a/security/unicornscan/pkg-plist
+++ b/security/unicornscan/pkg-plist
@@ -20,6 +20,7 @@ share/unicornscan/p0f.fp
share/unicornscan/p0fa.fp
share/unicornscan/p0fr.fp
share/unicornscan/port-numbers
+@exec %D/var/unicornscan/
@unexec rmdir %D/var/unicornscan 2>/dev/null || true
@unexec rmdir %D/var 2>/dev/null || true
@unexec rmdir %D/share/unicornscan 2>/dev/null || true