diff options
author | wxs <wxs@FreeBSD.org> | 2009-07-03 23:17:42 +0800 |
---|---|---|
committer | wxs <wxs@FreeBSD.org> | 2009-07-03 23:17:42 +0800 |
commit | 9b11df75cad93a78fdedb772e20188f30bf406ee (patch) | |
tree | 3657e24c22bc388fbb05d860396ab0f8cf214797 /net | |
parent | e0dbc2042ae66933b0658b2601bb1c598c77ac10 (diff) | |
download | freebsd-ports-graphics-9b11df75cad93a78fdedb772e20188f30bf406ee.tar.gz freebsd-ports-graphics-9b11df75cad93a78fdedb772e20188f30bf406ee.tar.zst freebsd-ports-graphics-9b11df75cad93a78fdedb772e20188f30bf406ee.zip |
- Update to 1.1
- Switch to using SF macro
- Pass maintainer to submitter
PR: ports/136283
Submitted by: Sofian Brabez <sbrabez@gmail.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/py-libnet/Makefile | 26 | ||||
-rw-r--r-- | net/py-libnet/distinfo | 6 | ||||
-rw-r--r-- | net/py-libnet/files/patch-libnet.i | 66 | ||||
-rw-r--r-- | net/py-libnet/pkg-plist | 7 |
4 files changed, 25 insertions, 80 deletions
diff --git a/net/py-libnet/Makefile b/net/py-libnet/Makefile index f3767288b72..1c2b76e5289 100644 --- a/net/py-libnet/Makefile +++ b/net/py-libnet/Makefile @@ -7,15 +7,14 @@ # PORTNAME= libnet -PORTVERSION= 1.0 -PORTREVISION= 4 +PORTVERSION= 1.1 CATEGORIES= net python -MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} +MASTER_SITES= SF MASTER_SITE_SUBDIR= pylibnet PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} DISTNAME= pylibnet-${PORTVERSION} -MAINTAINER= ports@FreeBSD.org +MAINTAINER= sbrabez@gmail.com COMMENT= Python module for the libnet packet construction library BUILD_DEPENDS= ${LOCALBASE}/bin/swig1.3:${PORTSDIR}/devel/swig13 \ @@ -23,6 +22,7 @@ BUILD_DEPENDS= ${LOCALBASE}/bin/swig1.3:${PORTSDIR}/devel/swig13 \ USE_PYTHON= yes WRKSRC= ${WRKDIR}/${DISTNAME}/src +WRKEXAMPLE= ${WRKDIR}/${DISTNAME}/samples MAKE_ARGS= SWIG=${LOCALBASE}/bin/swig1.3 \ LIBNET_INCLUDES=-I${LOCALBASE}/include \ @@ -31,11 +31,11 @@ MAKE_ARGS= SWIG=${LOCALBASE}/bin/swig1.3 \ LIBNET_LIB="`${LIBNET_CONFIG} --libs`" \ CC=${CC} -PLIST_FILES= lib/%%PYTHON_VERSION%%/site-packages/libnet.py \ - lib/%%PYTHON_VERSION%%/site-packages/_libnetc.so - LIBNET_CONFIG?= ${LOCALBASE}/bin/libnet10-config +EXAMPLESFILES= test-libnet-icmp-echo-req.py test-libnet-tcp-syn.py test-libnet-arp-req.py +EXAMPLESDIR= ${PREFIX}/share/examples/py-${PORTNAME} + .include <bsd.port.pre.mk> .if ${ARCH} == "amd64" @@ -43,13 +43,17 @@ BROKEN= Does not compile on amd64 (tries to link non-PIC libnet.a into PIC shar .endif post-patch: - ${REINPLACE_CMD} -e 's,libnetcmodule.so,_libnetc.so,g' ${WRKSRC}/Makefile ${REINPLACE_CMD} -e 's,^const ,%constant ,' ${WRKSRC}/constants.i - ${REINPLACE_CMD} -e '/^[^#]/s,libnet,_libnet,' ${WRKSRC}/libnet.py do-install: -.for file in libnet.py _libnetc.so - ${INSTALL_DATA} ${WRKSRC}/${file} ${PYTHON_SITELIBDIR} +.for f in libnet.py _libnet.so + ${INSTALL_DATA} ${WRKSRC}/${f} ${PYTHON_SITELIBDIR} .endfor +.if !defined(NOPORTEXAMPLES) + ${MKDIR} ${EXAMPLESDIR} +.for f in ${EXAMPLESFILES} + ${INSTALL_DATA} ${WRKEXAMPLE}/${f} ${EXAMPLESDIR} +.endfor +.endif .include <bsd.port.post.mk> diff --git a/net/py-libnet/distinfo b/net/py-libnet/distinfo index 47c5ba5f80c..dd25ff395d6 100644 --- a/net/py-libnet/distinfo +++ b/net/py-libnet/distinfo @@ -1,3 +1,3 @@ -MD5 (pylibnet-1.0.tar.gz) = 1c1556a7a9fa5c72edd118c492bac135 -SHA256 (pylibnet-1.0.tar.gz) = 6bdb8b69d957857b55bd5ea4b062698db1a5f5c96b7c57109da54b920f425cd3 -SIZE (pylibnet-1.0.tar.gz) = 16797 +MD5 (pylibnet-1.1.tar.gz) = b64252defa8acd25683cf777d33764a0 +SHA256 (pylibnet-1.1.tar.gz) = 8675e50cd8b3aaf111044e69a1428994d902af619a1770e040caa279ef5b5a77 +SIZE (pylibnet-1.1.tar.gz) = 16957 diff --git a/net/py-libnet/files/patch-libnet.i b/net/py-libnet/files/patch-libnet.i deleted file mode 100644 index f84200981f1..00000000000 --- a/net/py-libnet/files/patch-libnet.i +++ /dev/null @@ -1,66 +0,0 @@ ---- ./libnet.i.orig 2008-05-01 18:08:06.000000000 +0800 -+++ ./libnet.i 2008-05-01 18:08:30.000000000 +0800 -@@ -41,7 +41,7 @@ - - %} - --%except (python) { -+%exception { - int err; - clear_exception(); - PyErr_Clear(); -@@ -58,41 +58,41 @@ - - /* typemaps */ - --%typemap(python, in) u_char *{ -- if (!($target=PyString_AsString($source))) { -+%typemap(in) u_char *{ -+ if (!($1=PyString_AsString($input))) { - PyErr_SetString(PyExc_TypeError,"expected a string"); - return NULL; - } - } - --%typemap(python, out) u_char *{ -- $target=PyString_FromString($source); -+%typemap(out) u_char *{ -+ $result=PyString_FromString($1); - } - --%typemap(python, in) u_long { -- $target=PyLong_AsUnsignedLong($source); -+%typemap(in) u_long { -+ $1=PyLong_AsUnsignedLong($input); - } - --%typemap(python, out) u_long { -- $target=PyLong_FromUnsignedLong($source); -+%typemap(out) u_long { -+ $result=PyLong_FromUnsignedLong($1); - } - - - /* let functions return raw python objects */ --%typemap(python, out) PyObject * { -- $target = $source; -+%typemap(out) PyObject * { -+ $result = $1; - } - - /* let functions take raw python objects */ --%typemap(python, in) PyObject * { -- $target = $source; -+%typemap(in) PyObject * { -+ $1 = $input; - } - - typedef struct { - struct libnet_link_int *link; - int fd; - char *device; -- %addmethods { -+ %extend { - interface(); - ~interface(); - void open_link(char *device); diff --git a/net/py-libnet/pkg-plist b/net/py-libnet/pkg-plist new file mode 100644 index 00000000000..d9fbad2ef0c --- /dev/null +++ b/net/py-libnet/pkg-plist @@ -0,0 +1,7 @@ +@comment $FreeBSD$ +%%PYTHON_SITELIBDIR%%/libnet.py +%%PYTHON_SITELIBDIR%%/_libnet.so +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/test-libnet-arp-req.py +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/test-libnet-icmp-echo-req.py +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/test-libnet-tcp-syn.py +@dirrm %%EXAMPLESDIR%% |