From owner-freebsd-ports-bugs@FreeBSD.ORG Fri Jul 3 13:50:07 2009 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 38A151065710 for ; Fri, 3 Jul 2009 13:50:07 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 121FE8FC24 for ; Fri, 3 Jul 2009 13:50:07 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n63Do6ZO060680 for ; Fri, 3 Jul 2009 13:50:06 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n63Do6ks060679; Fri, 3 Jul 2009 13:50:06 GMT (envelope-from gnats) Resent-Date: Fri, 3 Jul 2009 13:50:06 GMT Resent-Message-Id: <200907031350.n63Do6ks060679@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Sofian Brabez Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 14209106564A for ; Fri, 3 Jul 2009 13:46:37 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 01C7E8FC0C for ; Fri, 3 Jul 2009 13:46:37 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n63Dka9r047740 for ; Fri, 3 Jul 2009 13:46:36 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id n63DkaUD047739; Fri, 3 Jul 2009 13:46:36 GMT (envelope-from nobody) Message-Id: <200907031346.n63DkaUD047739@www.freebsd.org> Date: Fri, 3 Jul 2009 13:46:36 GMT From: Sofian Brabez To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/136283: [update] net/py-libnet : Update to 1.1 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Jul 2009 13:50:08 -0000 >Number: 136283 >Category: ports >Synopsis: [update] net/py-libnet : Update to 1.1 >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: Fri Jul 03 13:50:06 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Sofian Brabez >Release: FreeBSD 7.2-STABLE i386 >Organization: >Environment: FreeBSD freebsd.ifr.lan 7.2-STABLE FreeBSD 7.2-STABLE #0: Thu Jul 2 23:42:18 CEST 2009 root@freebsd.ifr.lan:/usr/obj/usr/src/sys/FREEBSD i386 >Description: - Update to 1.1 - Add pkg-plist - Add NOPORTEXAMPLES knob - Take over maintainership >How-To-Repeat: >Fix: Patch attached with submission follows: diff -urN py-libnet.orig/Makefile py-libnet/Makefile --- py-libnet.orig/Makefile 2009-07-03 14:25:56.000000000 +0200 +++ py-libnet/Makefile 2009-07-03 15:15:15.000000000 +0200 @@ -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 @@ 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 @@ 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 .if ${ARCH} == "amd64" @@ -43,13 +43,17 @@ .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 diff -urN py-libnet.orig/distinfo py-libnet/distinfo --- py-libnet.orig/distinfo 2009-07-03 14:25:56.000000000 +0200 +++ py-libnet/distinfo 2009-07-03 12:08:54.000000000 +0200 @@ -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 -urN py-libnet.orig/files/patch-libnet.i py-libnet/files/patch-libnet.i --- py-libnet.orig/files/patch-libnet.i 2009-07-03 14:25:56.000000000 +0200 +++ py-libnet/files/patch-libnet.i 1970-01-01 01:00:00.000000000 +0100 @@ -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 -urN py-libnet.orig/pkg-plist py-libnet/pkg-plist --- py-libnet.orig/pkg-plist 1970-01-01 01:00:00.000000000 +0100 +++ py-libnet/pkg-plist 2009-07-03 15:21:20.000000000 +0200 @@ -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%% >Release-Note: >Audit-Trail: >Unformatted: