aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorler <ler@FreeBSD.org>2017-05-01 04:47:16 +0800
committerler <ler@FreeBSD.org>2017-05-01 04:47:16 +0800
commitb55efe8e963e0d48655f429941d8c00c36c99466 (patch)
treebf0bb3dc256d87329c4282d7f85aef890137a889 /net
parent86a017087bcb4a1156b93faf8be550828d939615 (diff)
downloadfreebsd-ports-gnome-b55efe8e963e0d48655f429941d8c00c36c99466.tar.gz
freebsd-ports-gnome-b55efe8e963e0d48655f429941d8c00c36c99466.tar.zst
freebsd-ports-gnome-b55efe8e963e0d48655f429941d8c00c36c99466.zip
net/py-pypcap: Unbreak, remove expiration.
PR: 217372 Submitted by: dbaio@bsd.com.br Approved by: adamw (mentor, implicit), wxs (maintainer timeout)
Diffstat (limited to 'net')
-rw-r--r--net/py-pypcap/Makefile15
-rw-r--r--net/py-pypcap/distinfo5
-rw-r--r--net/py-pypcap/files/patch-pcap.pyx41
-rw-r--r--net/py-pypcap/files/patch-setup.py8
-rw-r--r--net/py-pypcap/pkg-descr2
5 files changed, 34 insertions, 37 deletions
diff --git a/net/py-pypcap/Makefile b/net/py-pypcap/Makefile
index 78dca5340348..dbcae7df45cd 100644
--- a/net/py-pypcap/Makefile
+++ b/net/py-pypcap/Makefile
@@ -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>
diff --git a/net/py-pypcap/distinfo b/net/py-pypcap/distinfo
index 110b3958599d..be5bc4efff3f 100644
--- a/net/py-pypcap/distinfo
+++ b/net/py-pypcap/distinfo
@@ -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
diff --git a/net/py-pypcap/files/patch-pcap.pyx b/net/py-pypcap/files/patch-pcap.pyx
index 763ad1d97b3b..f0aa06856fc7 100644
--- a/net/py-pypcap/files/patch-pcap.pyx
+++ b/net/py-pypcap/files/patch-pcap.pyx
@@ -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
diff --git a/net/py-pypcap/files/patch-setup.py b/net/py-pypcap/files/patch-setup.py
index aa9988d44b81..ebfc9cc94c64 100644
--- a/net/py-pypcap/files/patch-setup.py
+++ b/net/py-pypcap/files/patch-setup.py
@@ -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) ]
diff --git a/net/py-pypcap/pkg-descr b/net/py-pypcap/pkg-descr
index 99b2e7df38d4..1f22afd7bbcb 100644
--- a/net/py-pypcap/pkg-descr
+++ b/net/py-pypcap/pkg-descr
@@ -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