ports/153371: [PATCH]: Update net/pynids (and add -fPIC to net/libnet)
Wesley Shields
wxs at FreeBSD.org
Wed Dec 22 14:30:10 UTC 2010
>Number: 153371
>Category: ports
>Synopsis: [PATCH]: Update net/pynids (and add -fPIC to net/libnet)
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: update
>Submitter-Id: current-users
>Arrival-Date: Wed Dec 22 14:30:09 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator: Wesley Shields
>Release: FreeBSD 8.1-RELEASE-p2 amd64
>Organization:
>Environment:
System: FreeBSD syn.csh.rit.edu 8.1-RELEASE-p2 FreeBSD 8.1-RELEASE-p2 #2: Mon Nov 29 20:35:37 EST 2010 root at syn.csh.rit.edu:/usr/obj/usr/src/sys/GENERIC amd64
>Description:
net/pynids is out of date. The latest version is at a new MASTER_SITE. In the
process of updating net/pynids I found that it should be using net/libnet
instead of net/libnet10. net/libnet needs to be built with -fPIC in order for
net/pynids to work properly. I've attached a patch which does all of this. I've
also CC'ed both maintainers (dinoex@ for net/libnet and corsmith at gmail.com for
net/pynids).
>How-To-Repeat:
N/A
>Fix:
Index: net/libnet/Makefile
===================================================================
RCS file: /ncvs/ports/net/libnet/Makefile,v
retrieving revision 1.22
diff -u -r1.22 Makefile
--- net/libnet/Makefile 22 Sep 2009 04:32:53 -0000 1.22
+++ net/libnet/Makefile 22 Dec 2010 00:26:28 -0000
@@ -7,7 +7,7 @@
PORTNAME= libnet
PORTVERSION= 1.1.2.1
-PORTREVISION= 2
+PORTREVISION= 3
PORTEPOCH= 1
CATEGORIES= net
MASTER_SITES= http://www.packetfactory.net/libnet/dist/ \
@@ -19,6 +19,7 @@
COMMENT= A C library for creating IP packets
GNU_CONFIGURE= yes
+CFLAGS+= -fPIC
WRKSRC= ${WRKDIR}/${PORTNAME}
DOCSDIR= ${PREFIX}/share/doc/${PORTNAME}${PKGNAMESUFFIX}
Index: net/pynids/Makefile
===================================================================
RCS file: /ncvs/ports/net/pynids/Makefile,v
retrieving revision 1.6
diff -u -r1.6 Makefile
--- net/pynids/Makefile 29 Oct 2007 08:32:10 -0000 1.6
+++ net/pynids/Makefile 21 Dec 2010 23:01:19 -0000
@@ -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 at 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 @@
.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>
Index: net/pynids/distinfo
===================================================================
RCS file: /ncvs/ports/net/pynids/distinfo,v
retrieving revision 1.2
diff -u -r1.2 distinfo
--- net/pynids/distinfo 22 Jan 2006 21:23:43 -0000 1.2
+++ net/pynids/distinfo 21 Dec 2010 16:09:14 -0000
@@ -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
Index: net/pynids/files/patch-libnids-1.24__src__libnids.c
===================================================================
RCS file: net/pynids/files/patch-libnids-1.24__src__libnids.c
diff -N net/pynids/files/patch-libnids-1.24__src__libnids.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ net/pynids/files/patch-libnids-1.24__src__libnids.c 21 Dec 2010 21:52:30 -0000
@@ -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>
Index: net/pynids/files/patch-setup.py
===================================================================
RCS file: /ncvs/ports/net/pynids/files/patch-setup.py,v
retrieving revision 1.2
diff -u -r1.2 patch-setup.py
--- net/pynids/files/patch-setup.py 31 Jan 2007 14:09:50 -0000 1.2
+++ net/pynids/files/patch-setup.py 21 Dec 2010 22:34:13 -0000
@@ -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)
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list