Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 30 Apr 2017 20:47:16 +0000 (UTC)
From:      Larry Rosenman <ler@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r439843 - in head/net/py-pypcap: . files
Message-ID:  <201704302047.v3UKlGuF059049@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ler
Date: Sun Apr 30 20:47:16 2017
New Revision: 439843
URL: https://svnweb.freebsd.org/changeset/ports/439843

Log:
  net/py-pypcap: Unbreak, remove expiration.
  
  PR:		217372
  Submitted by:	dbaio@bsd.com.br
  Approved by:	adamw (mentor, implicit), wxs (maintainer timeout)

Modified:
  head/net/py-pypcap/Makefile
  head/net/py-pypcap/distinfo
  head/net/py-pypcap/files/patch-pcap.pyx
  head/net/py-pypcap/files/patch-setup.py
  head/net/py-pypcap/pkg-descr

Modified: head/net/py-pypcap/Makefile
==============================================================================
--- head/net/py-pypcap/Makefile	Sun Apr 30 20:37:56 2017	(r439842)
+++ head/net/py-pypcap/Makefile	Sun Apr 30 20:47:16 2017	(r439843)
@@ -3,20 +3,22 @@
 
 PORTNAME=	pypcap
 PORTVERSION=	1.1
-PORTREVISION=	5
+PORTREVISION=	6
 CATEGORIES=	net python
-MASTER_SITES=	GOOGLE_CODE
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
 
 MAINTAINER=	wxs@FreeBSD.org
 COMMENT=	Simplified object-oriented Python extension module for libpcap
 
-BROKEN=		Unfetchable (google code has gone away)
-DEPRECATED=	Unfetchable for more than six months (google code has gone away)
-EXPIRATION_DATE=	2017-04-30
+LICENSE=	BSD3CLAUSE
+LICENSE_FILE=	${WRKSRC}/LICENSE
 
 BUILD_DEPENDS=	pyrexc:devel/pyrex
 
+USE_GITHUB=	yes
+GH_ACCOUNT=	dugsong
+GH_TAGNAME=	PYPCAP_${PORTVERSION:S/./_/g}
+
 USES=		python
 USE_PYTHON=	distutils autoplist
 
@@ -26,4 +28,7 @@ post-patch:
 pre-build:
 	(cd ${WRKSRC}; pyrexc pcap.pyx)
 
+post-install:
+	@${STRIP_CMD} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/pcap.so
+
 .include <bsd.port.mk>

Modified: head/net/py-pypcap/distinfo
==============================================================================
--- head/net/py-pypcap/distinfo	Sun Apr 30 20:37:56 2017	(r439842)
+++ head/net/py-pypcap/distinfo	Sun Apr 30 20:47:16 2017	(r439843)
@@ -1,2 +1,3 @@
-SHA256 (pypcap-1.1.tar.gz) = 087677295c795f543fad2c286df1807d55876e85d04f7292335cd149f4d8d47f
-SIZE (pypcap-1.1.tar.gz) = 22951
+TIMESTAMP = 1488113926
+SHA256 (dugsong-pypcap-1.1-PYPCAP_1_1_GH0.tar.gz) = a75d165f70a71e6c14c46b77c1b9b7a395fa425d0f90a2e342e641c66c14e634
+SIZE (dugsong-pypcap-1.1-PYPCAP_1_1_GH0.tar.gz) = 22812

Modified: head/net/py-pypcap/files/patch-pcap.pyx
==============================================================================
--- head/net/py-pypcap/files/patch-pcap.pyx	Sun Apr 30 20:37:56 2017	(r439842)
+++ head/net/py-pypcap/files/patch-pcap.pyx	Sun Apr 30 20:47:16 2017	(r439843)
@@ -1,15 +1,6 @@
---- ./pcap.pyx.orig	2011-10-01 22:35:33.141146678 -0400
-+++ ./pcap.pyx	2011-10-01 22:35:39.416147272 -0400
-@@ -1,7 +1,7 @@
- #
- # pcap.pyx
- #
--# $Id: pcap.pyx,v 1.20 2005/10/16 23:00:11 dugsong Exp $
-+# $Id: pcap.pyx 101 2010-07-16 08:20:16Z kosma@kosma.pl $
- 
- """packet capture library
- 
-@@ -17,9 +17,11 @@
+--- pcap.pyx.orig	2005-10-17 00:08:17 UTC
++++ pcap.pyx
+@@ -17,9 +17,11 @@ __url__ = 'http://monkey.org/~dugsong/py
  __version__ = '1.1'
  
  import sys
@@ -21,7 +12,7 @@
      int    PyGILState_Ensure()
      void   PyGILState_Release(int gil)
      void   Py_BEGIN_ALLOW_THREADS()
-@@ -42,6 +44,10 @@
+@@ -42,6 +44,10 @@ cdef extern from "pcap.h":
          unsigned int caplen
      ctypedef struct pcap_t:
          int __xxx
@@ -32,7 +23,7 @@
  
  ctypedef void (*pcap_handler)(void *arg, pcap_pkthdr *hdr, char *pkt)
  
-@@ -62,6 +68,13 @@
+@@ -62,6 +68,13 @@ cdef extern from "pcap.h":
      char   *pcap_geterr(pcap_t *p)
      void    pcap_close(pcap_t *p)
      int     bpf_filter(bpf_insn *insns, char *buf, int len, int caplen)
@@ -46,7 +37,7 @@
  
  cdef extern from "pcap_ex.h":
      # XXX - hrr, sync with libdnet and libevent
-@@ -134,16 +147,18 @@
+@@ -134,16 +147,18 @@ cdef class bpf:
              raise IOError, 'bad filter'
      def filter(self, buf):
          """Return boolean match for buf against our filter."""
@@ -68,7 +59,7 @@
      
      Open a handle to a packet capture descriptor.
      
-@@ -152,6 +167,9 @@
+@@ -152,6 +167,9 @@ cdef class pcap:
                   or None to open the first available up interface
      snaplen   -- maximum number of bytes to capture for each packet
      promisc   -- boolean to specify promiscuous mode sniffing
@@ -78,7 +69,7 @@
      immediate -- disable buffering, if possible
      """
      cdef pcap_t *__pcap
-@@ -161,7 +179,7 @@
+@@ -161,7 +179,7 @@ cdef class pcap:
      cdef int __dloff
      
      def __init__(self, name=None, snaplen=65535, promisc=True,
@@ -87,16 +78,16 @@
          global dltoff
          cdef char *p
          
-@@ -171,7 +189,7 @@
+@@ -171,7 +189,7 @@ cdef class pcap:
                  raise OSError, self.__ebuf
          else:
              p = name
 -        
-+            
++
          self.__pcap = pcap_open_offline(p, self.__ebuf)
          if not self.__pcap:
              self.__pcap = pcap_open_live(pcap_ex_name(p), snaplen, promisc,
-@@ -184,7 +202,7 @@
+@@ -184,7 +202,7 @@ cdef class pcap:
          try: self.__dloff = dltoff[pcap_datalink(self.__pcap)]
          except KeyError: pass
          if immediate and pcap_ex_immediate(self.__pcap) < 0:
@@ -105,7 +96,7 @@
      
      property name:
          """Network interface or dumpfile name."""
-@@ -243,16 +261,6 @@
+@@ -243,16 +261,6 @@ cdef class pcap:
          """Return datalink type (DLT_* values)."""
          return pcap_datalink(self.__pcap)
      
@@ -122,7 +113,7 @@
      def __add_pkts(self, ts, pkt, pkts):
          pkts.append((ts, pkt))
      
-@@ -288,18 +296,24 @@
+@@ -288,18 +296,24 @@ cdef class pcap:
              raise exc[0], exc[1], exc[2]
          return n
  
@@ -150,7 +141,7 @@
          pcap_ex_setup(self.__pcap)
          while 1:
              Py_BEGIN_ALLOW_THREADS
-@@ -308,10 +322,22 @@
+@@ -308,10 +322,22 @@ cdef class pcap:
              if n == 1:
                  callback(hdr.ts.tv_sec + (hdr.ts.tv_usec / 1000000.0),
                           PyBuffer_FromMemory(pkt, hdr.caplen), *args)
@@ -173,7 +164,7 @@
      
      def geterr(self):
          """Return the last error message associated with this handle."""
-@@ -340,6 +366,8 @@
+@@ -340,6 +366,8 @@ cdef class pcap:
              if n == 1:
                  return (hdr.ts.tv_sec + (hdr.ts.tv_usec / 1000000.0),
                          PyBuffer_FromMemory(pkt, hdr.caplen))
@@ -182,7 +173,7 @@
              elif n == -1:
                  raise KeyboardInterrupt
              elif n == -2:
-@@ -364,3 +392,36 @@
+@@ -364,3 +392,36 @@ def lookupdev():
          raise OSError, ebuf
      return p
  

Modified: head/net/py-pypcap/files/patch-setup.py
==============================================================================
--- head/net/py-pypcap/files/patch-setup.py	Sun Apr 30 20:37:56 2017	(r439842)
+++ head/net/py-pypcap/files/patch-setup.py	Sun Apr 30 20:47:16 2017	(r439843)
@@ -1,6 +1,6 @@
---- ./setup.py.orig	2005-10-16 19:07:03.000000000 -0400
-+++ ./setup.py	2011-12-18 14:32:02.170660843 -0500
-@@ -25,7 +25,10 @@
+--- setup.py.orig	2005-10-17 00:08:17 UTC
++++ setup.py
+@@ -25,7 +25,10 @@ class config_pcap(config.config):
          d = {}
          if os.path.exists(os.path.join(cfg['include_dirs'][0], 'pcap-int.h')):
              d['HAVE_PCAP_INT_H'] = 1
@@ -12,7 +12,7 @@
          if buf.find('pcap_file(') != -1:
              d['HAVE_PCAP_FILE'] = 1
          if buf.find('pcap_compile_nopcap(') != -1:
-@@ -46,6 +49,7 @@
+@@ -46,6 +49,7 @@ class config_pcap(config.config):
                  incdirs = [ os.path.join(d, sd) ]
                  if os.path.exists(os.path.join(d, sd, 'pcap.h')):
                      cfg['include_dirs'] = [ os.path.join(d, sd) ]

Modified: head/net/py-pypcap/pkg-descr
==============================================================================
--- head/net/py-pypcap/pkg-descr	Sun Apr 30 20:37:56 2017	(r439842)
+++ head/net/py-pypcap/pkg-descr	Sun Apr 30 20:47:16 2017	(r439843)
@@ -1,3 +1,3 @@
 A simplified object-oriented Python extension module for libpcap
 
-WWW: http://code.google.com/p/pypcap/
+WWW: https://github.com/dugsong/pypcap



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201704302047.v3UKlGuF059049>