From owner-svn-ports-all@FreeBSD.ORG Fri May 30 14:08:45 2014 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4238CFCF; Fri, 30 May 2014 14:08:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2F06C29AE; Fri, 30 May 2014 14:08:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4UE8jG5081557; Fri, 30 May 2014 14:08:45 GMT (envelope-from sbz@svn.freebsd.org) Received: (from sbz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4UE8ifa081552; Fri, 30 May 2014 14:08:44 GMT (envelope-from sbz@svn.freebsd.org) Message-Id: <201405301408.s4UE8ifa081552@svn.freebsd.org> From: Sofian Brabez Date: Fri, 30 May 2014 14:08:44 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r355842 - in head/net/py-libnet: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 May 2014 14:08:45 -0000 Author: sbz Date: Fri May 30 14:08:43 2014 New Revision: 355842 URL: http://svnweb.freebsd.org/changeset/ports/355842 QAT: https://qat.redports.org/buildarchive/r355842/ Log: - Support STAGEDIR - Add LICENSE - Fix build for amd64 Added: head/net/py-libnet/files/ head/net/py-libnet/files/patch-setup.py (contents, props changed) head/net/py-libnet/files/patch-src__builders.c (contents, props changed) Modified: head/net/py-libnet/Makefile head/net/py-libnet/distinfo head/net/py-libnet/pkg-plist Modified: head/net/py-libnet/Makefile ============================================================================== --- head/net/py-libnet/Makefile Fri May 30 14:06:38 2014 (r355841) +++ head/net/py-libnet/Makefile Fri May 30 14:08:43 2014 (r355842) @@ -5,55 +5,40 @@ PORTNAME= libnet PORTVERSION= 1.1 PORTREVISION= 1 CATEGORIES= net python -MASTER_SITES= SF/py${PORTNAME}/py${PORTNAME}/py${PORTNAME}-${PORTVERSION} PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} -DISTNAME= pylibnet-${PORTVERSION} MAINTAINER= sbz@FreeBSD.org COMMENT= Python module for the libnet packet construction library -BUILD_DEPENDS= ${LOCALBASE}/bin/swig1.3:${PORTSDIR}/devel/swig13 \ - ${LIBNET_CONFIG}:${PORTSDIR}/net/libnet10 +LICENSE= GPLv3 -USE_PYTHON= yes -WRKSRC= ${WRKDIR}/${DISTNAME}/src -WRKEXAMPLE= ${WRKDIR}/${DISTNAME}/samples +LIB_DEPENDS= libnet.so:${PORTSDIR}/net/libnet -MAKE_ARGS= SWIG=${LOCALBASE}/bin/swig1.3 \ - LIBNET_INCLUDES=-I${LOCALBASE}/include \ - PYTHON_INCLUDES=-I${PYTHON_INCLUDEDIR} \ - CFLAGS="${CFLAGS} `${LIBNET_CONFIG} --defines` `${LIBNET_CONFIG} --cflags` -fPIC" \ - LIBNET_LIB="`${LIBNET_CONFIG} --libs`" \ - CC=${CC} +USE_PYTHON= yes +USE_PYTHON_PREFIX= yes +USE_PYDISTUTILS= yes -LIBNET_CONFIG?= ${LOCALBASE}/bin/libnet10-config +USE_GITHUB= yes +GH_ACCOUNT= allfro +GH_PROJECT= pylibnet +GH_TAGNAME= ${GH_COMMIT} +GH_COMMIT= b2fa552 -EXAMPLESFILES= test-libnet-icmp-echo-req.py test-libnet-tcp-syn.py test-libnet-arp-req.py EXAMPLESDIR= ${PREFIX}/share/examples/py-${PORTNAME} -NO_STAGE= yes -.include - -.if ${ARCH} == "amd64" -BROKEN= Does not compile on amd64 (tries to link non-PIC libnet.a into PIC shared library) -.endif - -post-patch: - ${REINPLACE_CMD} -e 's,^const ,%constant ,' ${WRKSRC}/constants.i +OPTIONS_DEFINE= EXAMPLES +OSVER= uname -r -post-build: - ${PYTHON_CMD} -m compileall ${WRKSRC} - ${PYTHON_CMD} -O -m compileall ${WRKSRC} +.include do-install: -.for f in libnet.py libnet.pyc libnet.pyo _libnet.so - ${INSTALL_DATA} ${WRKSRC}/${f} ${PYTHON_SITELIBDIR} -.endfor -.if !defined(NOPORTEXAMPLES) - ${MKDIR} ${EXAMPLESDIR} -.for f in ${EXAMPLESFILES} - ${INSTALL_DATA} ${WRKEXAMPLE}/${f} ${EXAMPLESDIR} -.endfor + ${MKDIR} ${STAGEDIR}${PYTHON_SITELIBDIR} + ${INSTALL_DATA} \ + ${WRKSRC}/build/lib.${OPSYS:tl}-$$(${OSVER})-${ARCH}-${PYTHON_VER}/${PORTNAME}.so \ + ${STAGEDIR}${PYTHON_SITELIBDIR} +.if ${PORT_OPTIONS:MEXAMPLES} + ${MKDIR} ${STAGEDIR}${EXAMPLESDIR} + (cd ${WRKSRC}/examples && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR}) .endif -.include +.include Modified: head/net/py-libnet/distinfo ============================================================================== --- head/net/py-libnet/distinfo Fri May 30 14:06:38 2014 (r355841) +++ head/net/py-libnet/distinfo Fri May 30 14:08:43 2014 (r355842) @@ -1,2 +1,2 @@ -SHA256 (pylibnet-1.1.tar.gz) = 8675e50cd8b3aaf111044e69a1428994d902af619a1770e040caa279ef5b5a77 -SIZE (pylibnet-1.1.tar.gz) = 16957 +SHA256 (libnet-1.1.tar.gz) = c15d52f3782b92e799b6cc24d4999a0ee276afe5f9e8d596f08c59debdabc1d2 +SIZE (libnet-1.1.tar.gz) = 73785 Added: head/net/py-libnet/files/patch-setup.py ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/py-libnet/files/patch-setup.py Fri May 30 14:08:43 2014 (r355842) @@ -0,0 +1,13 @@ +--- ./setup.py.orig 2011-08-02 17:53:25.000000000 +0200 ++++ ./setup.py 2014-05-30 12:55:01.000000000 +0200 +@@ -5,8 +5,8 @@ + import os + import sys + +-include_dir = None +-lib_dir = None ++include_dir = '/usr/local/include/libnet11/' ++lib_dir = '/usr/local/lib/libnet11' + + + package_version = '3.0-beta-rc1' Added: head/net/py-libnet/files/patch-src__builders.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/py-libnet/files/patch-src__builders.c Fri May 30 14:08:43 2014 (r355842) @@ -0,0 +1,15 @@ +--- ./src/builders.c.orig 2014-05-30 12:55:10.000000000 +0200 ++++ ./src/builders.c 2014-05-30 13:00:15.000000000 +0200 +@@ -722,9 +722,9 @@ + u_int16_t sum = 0; + u_int16_t id = PYLIBNET_RANDOM_U16; + u_int16_t seq = PYLIBNET_RANDOM_U16; +- n_time otime = PYLIBNET_RANDOM_U32; +- n_time rtime = PYLIBNET_RANDOM_U32; +- n_time ttime = PYLIBNET_RANDOM_U32; ++ u_int32_t otime = PYLIBNET_RANDOM_U32; ++ u_int32_t rtime = PYLIBNET_RANDOM_U32; ++ u_int32_t ttime = PYLIBNET_RANDOM_U32; + u_int8_t *payload = NULL; + u_int32_t payload_s = 0; + libnet_ptag_t ptag = 0; Modified: head/net/py-libnet/pkg-plist ============================================================================== --- head/net/py-libnet/pkg-plist Fri May 30 14:06:38 2014 (r355841) +++ head/net/py-libnet/pkg-plist Fri May 30 14:08:43 2014 (r355842) @@ -1,8 +1,9 @@ -%%PYTHON_SITELIBDIR%%/_libnet.so -%%PYTHON_SITELIBDIR%%/libnet.py -%%PYTHON_SITELIBDIR%%/libnet.pyc -%%PYTHON_SITELIBDIR%%/libnet.pyo -%%PORTEXAMPLES%%%%EXAMPLESDIR%%/test-libnet-arp-req.py -%%PORTEXAMPLES%%%%EXAMPLESDIR%%/test-libnet-icmp-echo-req.py -%%PORTEXAMPLES%%%%EXAMPLESDIR%%/test-libnet-tcp-syn.py -%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%% +%%PYTHON_SITELIBDIR%%/libnet.so +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/README +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/dnsv4.py +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/icmp4echo.py +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/lnsh/dnsv4.libnet +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/lnsh/tcpsyn.libnet +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/lnsh/tcpxmas.libnet +%%PORTEXAMPLES%%@dirrmtry %%EXAMPLESDIR%%/lnsh +%%PORTEXAMPLES%%@dirrmtry %%EXAMPLESDIR%%