diff options
author | Pav Lucistnik <pav@FreeBSD.org> | 2007-01-31 14:09:55 +0000 |
---|---|---|
committer | Pav Lucistnik <pav@FreeBSD.org> | 2007-01-31 14:09:55 +0000 |
commit | eb81a88093e7d71530eebb2957f8ba4317b26ee6 (patch) | |
tree | 9290c97700f22b8ed6b87a10fda7d195dac09f04 /net/pynids | |
parent | e6b247dce1d9f6355a583ef6269fdbba110eaea8 (diff) | |
download | ports-eb81a88093e7d71530eebb2957f8ba4317b26ee6.tar.gz ports-eb81a88093e7d71530eebb2957f8ba4317b26ee6.zip |
Notes
Diffstat (limited to 'net/pynids')
-rw-r--r-- | net/pynids/Makefile | 30 | ||||
-rw-r--r-- | net/pynids/files/patch-setup.py | 17 |
2 files changed, 39 insertions, 8 deletions
diff --git a/net/pynids/Makefile b/net/pynids/Makefile index 84ff78016213..8d4f8b27060c 100644 --- a/net/pynids/Makefile +++ b/net/pynids/Makefile @@ -7,7 +7,7 @@ PORTNAME= pynids PORTVERSION= 0.5 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= net python MASTER_SITES= http://pilcrow.madison.wi.us/pynids/ PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} @@ -17,7 +17,8 @@ DIST_SUBDIR= python MAINTAINER= corsmith@gmail.com COMMENT= Python interface to libnids -BUILD_DEPENDS= libnet*<=1.1.0,1:${PORTSDIR}/net/libnet10 +PATCH_DEPENDS= ${LIBNET_CONFIG}:${PORTSDIR}/net/libnet10 +BUILD_DEPENDS:= ${PATCH_DEPENDS} USE_PYTHON= yes USE_PYDISTUTILS= yes @@ -27,10 +28,31 @@ CFLAGS+= -fPIC PLIST_FILES= %%PYTHON_SITELIBDIR%%/nidsmodule.so +LIBNET_CONFIG?= ${LOCALBASE}/bin/libnet10-config + +.include <bsd.port.pre.mk> + +.if exists(${LIBNET_CONFIG}) +LIBNET_CFLAGS!= ${LIBNET_CONFIG} --cflags +LIBNET_LIBS!= ${LIBNET_CONFIG} --libs +.endif + +post-extract: + @cd ${WRKSRC} && ${TAR} xf libnids-1.19.tar + 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 - -.include <bsd.port.mk> + @${REINPLACE_CMD} -e \ + 's|/usr/local/include|${LIBNET_CFLAGS:S/-I//}|; \ + s|/usr/local/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|gcc|${CC}|' \ + ${WRKSRC}/libnids-1.19/configure + +.include <bsd.port.post.mk> diff --git a/net/pynids/files/patch-setup.py b/net/pynids/files/patch-setup.py index e8db653b4cce..c72e1e256e8f 100644 --- a/net/pynids/files/patch-setup.py +++ b/net/pynids/files/patch-setup.py @@ -1,5 +1,5 @@ ---- setup.py.orig Tue Feb 1 06:50:11 2005 -+++ setup.py Sun Aug 7 00:08:43 2005 +--- ./setup.py.orig Tue Feb 1 02:50:11 2005 ++++ ./setup.py Sat Sep 30 17:49:08 2006 @@ -9,7 +9,7 @@ from distutils.core import setup, Extension from distutils.command.build import build # nidsMaker @@ -9,10 +9,19 @@ pathjoin = os.path.join -@@ -38,6 +38,8 @@ +@@ -32,12 +32,15 @@ + def buildNids(self): + # extremely crude package builder + try: +- os.stat(self.NIDSDIR) ++ os.stat(self.NIDSDIR + '/.done') + return None # assume already built + except OSError: pass - spawn(['tar', '-xf', self.NIDSTAR], search_path = 1) +- spawn(['tar', '-xf', 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")) os.chdir(self.NIDSDIR) |