aboutsummaryrefslogtreecommitdiff
path: root/net/pynids
diff options
context:
space:
mode:
authorWesley Shields <wxs@FreeBSD.org>2010-12-23 01:17:49 +0000
committerWesley Shields <wxs@FreeBSD.org>2010-12-23 01:17:49 +0000
commit6eddcd650e90c924ffe2e871f02c963e82793f17 (patch)
tree3df2a68c4ec56a7dba8c4968aa3bbe5e26ebe44d /net/pynids
parent80d4a2c1b9ee02c88494415d295ea1f0def82991 (diff)
downloadports-6eddcd650e90c924ffe2e871f02c963e82793f17.tar.gz
ports-6eddcd650e90c924ffe2e871f02c963e82793f17.zip
Notes
Diffstat (limited to 'net/pynids')
-rw-r--r--net/pynids/Makefile33
-rw-r--r--net/pynids/distinfo5
-rw-r--r--net/pynids/files/patch-libnids-1.24__src__libnids.c10
-rw-r--r--net/pynids/files/patch-setup.py19
4 files changed, 36 insertions, 31 deletions
diff --git a/net/pynids/Makefile b/net/pynids/Makefile
index 8d4f8b27060c..dcb0da371aa5 100644
--- a/net/pynids/Makefile
+++ b/net/pynids/Makefile
@@ -6,29 +6,26 @@
#
PORTNAME= pynids
-PORTVERSION= 0.5
-PORTREVISION= 2
+PORTVERSION= 0.6.1
CATEGORIES= net python
-MASTER_SITES= http://pilcrow.madison.wi.us/pynids/
+MASTER_SITES= http://jon.oberheide.org/pynids/downloads/
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
-DISTNAME= pynids-${PORTVERSION}
DIST_SUBDIR= python
MAINTAINER= corsmith@gmail.com
COMMENT= Python interface to libnids
-PATCH_DEPENDS= ${LIBNET_CONFIG}:${PORTSDIR}/net/libnet10
-BUILD_DEPENDS:= ${PATCH_DEPENDS}
+PATCH_DEPENDS= ${LIBNET_CONFIG}:${PORTSDIR}/net/libnet
+BUILD_DEPENDS= ${LIBNET_CONFIG}:${PORTSDIR}/net/libnet
+USE_GNOME= pkgconfig glib20
USE_PYTHON= yes
USE_PYDISTUTILS= yes
USE_PYTHON_PREFIX= yes
-CFLAGS+= -fPIC
-
PLIST_FILES= %%PYTHON_SITELIBDIR%%/nidsmodule.so
-LIBNET_CONFIG?= ${LOCALBASE}/bin/libnet10-config
+LIBNET_CONFIG?= ${LOCALBASE}/bin/libnet11-config
.include <bsd.port.pre.mk>
@@ -38,21 +35,21 @@ LIBNET_LIBS!= ${LIBNET_CONFIG} --libs
.endif
post-extract:
- @cd ${WRKSRC} && ${TAR} xf libnids-1.19.tar
+ @cd ${WRKSRC} && ${TAR} xzf libnids-1.24.tar.gz
post-patch:
- ${CP} -f ${TEMPLATES}/config.guess ${WRKSRC}
- ${CHMOD} a+rx ${WRKSRC}/config.guess
- ${CP} -f ${TEMPLATES}/config.sub ${WRKSRC}
- ${CHMOD} a+rx ${WRKSRC}/config.sub
+ @${CP} -f ${TEMPLATES}/config.guess ${WRKSRC}
+ @${CHMOD} a+rx ${WRKSRC}/config.guess
+ @${CP} -f ${TEMPLATES}/config.sub ${WRKSRC}
+ @${CHMOD} a+rx ${WRKSRC}/config.sub
@${REINPLACE_CMD} -e \
- 's|/usr/local/include|${LIBNET_CFLAGS:S/-I//}|; \
- s|/usr/local/lib|${LIBNET_LIBS:N-l*:S/-L//}|' \
+ "s|/usr/local/include|${PREFIX}/include', '${LIBNET_CFLAGS:S/-I//}|; \
+ s|/usr/local/lib|${PREFIX}/lib', '${LIBNET_LIBS:N-l*:S/-L//}|" \
${WRKSRC}/setup.py
@${REINPLACE_CMD} -Ee \
's|(LNET_CFLAGS=).*|\1"`${LIBNET_CONFIG} --defines` ${LIBNET_CFLAGS}"|; \
- s|(LNETLIB=).*|\1"${LIBNET_LIBS}"|; \
+ s|(LNETLIB=).*|\1"${LIBNET_LIBS} -L${LOCALBASE}/lib"|; \
s|gcc|${CC}|' \
- ${WRKSRC}/libnids-1.19/configure
+ ${WRKSRC}/libnids-1.24/configure
.include <bsd.port.post.mk>
diff --git a/net/pynids/distinfo b/net/pynids/distinfo
index 331fac7b870f..5a2d77765491 100644
--- a/net/pynids/distinfo
+++ b/net/pynids/distinfo
@@ -1,3 +1,2 @@
-MD5 (python/pynids-0.5.tar.gz) = ae8fab78881aa60cb2d9e50c9348cf87
-SHA256 (python/pynids-0.5.tar.gz) = a1f97508683e0cc77fc9f70cc1acab8ccdcb28de29625cc2c7f6ca80283252e9
-SIZE (python/pynids-0.5.tar.gz) = 136808
+SHA256 (python/pynids-0.6.1.tar.gz) = fb7fd5ab32b92017c441c405574d8b77955b05220591e4fa946eea55efa1af86
+SIZE (python/pynids-0.6.1.tar.gz) = 174723
diff --git a/net/pynids/files/patch-libnids-1.24__src__libnids.c b/net/pynids/files/patch-libnids-1.24__src__libnids.c
new file mode 100644
index 000000000000..8dd3328a18ae
--- /dev/null
+++ b/net/pynids/files/patch-libnids-1.24__src__libnids.c
@@ -0,0 +1,10 @@
+--- ./libnids-1.24/src/libnids.c.orig 2010-12-21 16:52:15.158921317 -0500
++++ ./libnids-1.24/src/libnids.c 2010-12-21 16:52:24.455916662 -0500
+@@ -14,7 +14,6 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <syslog.h>
+-#include <alloca.h>
+ #include <pcap.h>
+ #include <errno.h>
+ #include <config.h>
diff --git a/net/pynids/files/patch-setup.py b/net/pynids/files/patch-setup.py
index c72e1e256e8f..ee83db49512b 100644
--- a/net/pynids/files/patch-setup.py
+++ b/net/pynids/files/patch-setup.py
@@ -1,6 +1,6 @@
---- ./setup.py.orig Tue Feb 1 02:50:11 2005
-+++ ./setup.py Sat Sep 30 17:49:08 2006
-@@ -9,7 +9,7 @@
+--- ./setup.py.orig 2010-05-09 14:01:38.000000000 -0400
++++ ./setup.py 2010-12-21 17:34:04.929916874 -0500
+@@ -8,7 +8,7 @@
from distutils.core import setup, Extension
from distutils.command.build import build # nidsMaker
from distutils.spawn import spawn # nidsMaker.run()
@@ -9,7 +9,7 @@
pathjoin = os.path.join
-@@ -32,12 +32,15 @@
+@@ -30,12 +30,14 @@
def buildNids(self):
# extremely crude package builder
try:
@@ -19,11 +19,10 @@
except OSError:
pass
-- spawn(['tar', '-xf', self.NIDSTAR], search_path = 1)
+- spawn(['tar', '-zxf', self.NIDSTAR], search_path = 1)
+ spawn(['touch', self.NIDSDIR + '/.done'], search_path = 1)
-+
-+ shutil.copyfile("config.guess",pathjoin(self.NIDSDIR,"config.guess"))
-+ shutil.copyfile("config.sub",pathjoin(self.NIDSDIR,"config.sub"))
++ shutil.copyfile("config.guess",pathjoin(self.NIDSDIR,"config.guess"))
++ shutil.copyfile("config.sub",pathjoin(self.NIDSDIR,"config.sub"))
os.chdir(self.NIDSDIR)
- for p in self.patches:
- spawn(['patch', '-c', '-p1', '-i', pathjoin('..', p)], search_path = 1)
+ spawn([pathjoin('.','configure'), 'CFLAGS=-fPIC'])
+ spawn(['make'], search_path = 1)