mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 17:59:20 -04:00
Update to 0.6.1.
Switch to using net/libnet as a dependency. Be explicit about PATCH and BUILD depends.
This commit is contained in:
parent
80d4a2c1b9
commit
6eddcd650e
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=266758
4 changed files with 36 additions and 31 deletions
|
@ -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>
|
||||
|
|
|
@ -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
|
||||
|
|
10
net/pynids/files/patch-libnids-1.24__src__libnids.c
Normal file
10
net/pynids/files/patch-libnids-1.24__src__libnids.c
Normal file
|
@ -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>
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue