FreeBSD Bugzilla – Attachment 180314 Details for
Bug 217372
net/py-pypcap: Unbreak
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
py-pypcap-github.patch
py-pypcap-github.patch (text/plain), 6.67 KB, created by
Danilo G. Baio
on 2017-02-26 14:19:37 UTC
(
hide
)
Description:
py-pypcap-github.patch
Filename:
MIME Type:
Creator:
Danilo G. Baio
Created:
2017-02-26 14:19:37 UTC
Size:
6.67 KB
patch
obsolete
>Index: Makefile >=================================================================== >--- Makefile (revision 434794) >+++ Makefile (working copy) >@@ -5,16 +5,20 @@ > PORTVERSION= 1.1 > PORTREVISION= 5 > 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) >+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 > >@@ -24,4 +28,7 @@ > pre-build: > (cd ${WRKSRC}; pyrexc pcap.pyx) > >+post-install: >+ @${STRIP_CMD} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/pcap.so >+ > .include <bsd.port.mk> >Index: distinfo >=================================================================== >--- distinfo (revision 434794) >+++ distinfo (working copy) >@@ -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 >Index: files/patch-pcap.pyx >=================================================================== >--- files/patch-pcap.pyx (revision 434794) >+++ files/patch-pcap.pyx (working copy) >@@ -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 > >Index: files/patch-setup.py >=================================================================== >--- files/patch-setup.py (revision 434794) >+++ files/patch-setup.py (working copy) >@@ -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) ] >Index: pkg-descr >=================================================================== >--- pkg-descr (revision 434794) >+++ pkg-descr (working copy) >@@ -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
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 217372
:
180314
|
181252