SecBSD's official ports repository
This commit is contained in:
commit
2c0afcbbf3
64331 changed files with 5339189 additions and 0 deletions
37
net/py-pcapy/Makefile
Normal file
37
net/py-pcapy/Makefile
Normal file
|
@ -0,0 +1,37 @@
|
|||
COMMENT = libpcap module for Python
|
||||
|
||||
# XXX unless development resumes, replace with pcapy-ng; dependent
|
||||
# ports will need syncing. this will fail with py3.10.
|
||||
# https://github.com/stamparm/pcapy-ng
|
||||
|
||||
|
||||
MODPY_EGG_VERSION = 0.11.5.dev0
|
||||
GH_ACCOUNT = helpsystems
|
||||
GH_PROJECT = pcapy
|
||||
GH_TAGNAME = ${MODPY_EGG_VERSION:S/.dev0//}
|
||||
PKGNAME = py-${DISTNAME}
|
||||
REVISION = 3
|
||||
|
||||
CATEGORIES = net devel
|
||||
|
||||
# Apache
|
||||
PERMIT_PACKAGE = Yes
|
||||
|
||||
WANTLIB += ${MODPY_WANTLIB} ${COMPILER_LIBCXX} m pcap
|
||||
|
||||
COMPILER = base-clang ports-gcc
|
||||
|
||||
MODULES = lang/python
|
||||
MODPY_PYBUILD = setuptools
|
||||
|
||||
FLAVORS = python3
|
||||
FLAVOR = python3
|
||||
|
||||
MAKE_ENV += LDSHARED="${CC} -shared -fPIC"
|
||||
MAKE_ENV += LDFLAGS="-L${LOCALBASE}/lib"
|
||||
TEST_DEPENDS = ${BASE_PKGPATH}
|
||||
|
||||
do-test:
|
||||
cd ${WRKSRC}/tests; ${MODPY_BIN} pcapytests.py
|
||||
|
||||
.include <bsd.port.mk>
|
2
net/py-pcapy/distinfo
Normal file
2
net/py-pcapy/distinfo
Normal file
|
@ -0,0 +1,2 @@
|
|||
SHA256 (pcapy-0.11.5.tar.gz) = L/lutlyu6KRaOuPtt41bTY3rys6dwpIa76O+g7sK+cY=
|
||||
SIZE (pcapy-0.11.5.tar.gz) = 37677
|
11
net/py-pcapy/patches/patch-pcap_pkthdr_cc
Normal file
11
net/py-pcapy/patches/patch-pcap_pkthdr_cc
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- pcap_pkthdr.cc.orig Sun Oct 30 14:05:35 2016
|
||||
+++ pcap_pkthdr.cc Sun Oct 30 14:05:35 2016
|
||||
@@ -23,7 +23,7 @@
|
||||
// internal pcapobject
|
||||
typedef struct {
|
||||
PyObject_HEAD
|
||||
- struct timeval ts;
|
||||
+ struct bpf_timeval ts;
|
||||
bpf_u_int32 caplen;
|
||||
bpf_u_int32 len;
|
||||
} pkthdr;
|
34
net/py-pcapy/patches/patch-setup_py
Normal file
34
net/py-pcapy/patches/patch-setup_py
Normal file
|
@ -0,0 +1,34 @@
|
|||
From https://github.com/stamparm/pcapy-ng/commit/84a15d2faefaae410198f5739d6ed3c69daa17ec
|
||||
Don't monkeypatch internal function sysconfig._init_posix
|
||||
Breaks with newer setuptools
|
||||
|
||||
Index: setup.py
|
||||
--- setup.py.orig
|
||||
+++ setup.py
|
||||
@@ -44,26 +44,6 @@ if sys.platform == 'win32':
|
||||
sources.append(os.path.join('win32', 'dllmain.cc'))
|
||||
macros.append(('WIN32', '1'))
|
||||
|
||||
-# HACK replace linker gcc with g++
|
||||
-from distutils import sysconfig
|
||||
-save_init_posix = sysconfig._init_posix
|
||||
-
|
||||
-
|
||||
-def my_init_posix():
|
||||
- save_init_posix()
|
||||
- g = sysconfig._config_vars
|
||||
- compiler = g['LDSHARED'].split()[0]
|
||||
- flags = g['LDSHARED'].split()[1:]
|
||||
- if compiler == 'gcc':
|
||||
- g['LDSHARED'] = ' '.join(['g++'] + flags)
|
||||
- elif compiler == 'clang':
|
||||
- g['LDSHARED'] = ' '.join(['clang++'] + flags)
|
||||
- print('my_init_posix: changing LDSHARED =',
|
||||
- repr(g['LDSHARED']))
|
||||
- print('to', repr(g['LDSHARED']))
|
||||
-sysconfig._init_posix = my_init_posix
|
||||
-
|
||||
-
|
||||
def read(fname):
|
||||
return open(os.path.join(os.path.dirname(__file__), fname)).read()
|
||||
|
6
net/py-pcapy/pkg/DESCR
Normal file
6
net/py-pcapy/pkg/DESCR
Normal file
|
@ -0,0 +1,6 @@
|
|||
Pcapy is a Python extension module that enables software written in Python
|
||||
to access the routines from the pcap packet capture library.
|
||||
|
||||
Pcapy is most useful when used together with a packet handling package such
|
||||
as Impacket, a collection of Python classes for constructing and dissecting
|
||||
network packets.
|
14
net/py-pcapy/pkg/PLIST
Normal file
14
net/py-pcapy/pkg/PLIST
Normal file
|
@ -0,0 +1,14 @@
|
|||
lib/python${MODPY_VERSION}/site-packages/pcapy-${MODPY_EGG_VERSION}.dist-info/
|
||||
lib/python${MODPY_VERSION}/site-packages/pcapy-${MODPY_EGG_VERSION}.dist-info/LICENSE
|
||||
lib/python${MODPY_VERSION}/site-packages/pcapy-${MODPY_EGG_VERSION}.dist-info/METADATA
|
||||
lib/python${MODPY_VERSION}/site-packages/pcapy-${MODPY_EGG_VERSION}.dist-info/RECORD
|
||||
lib/python${MODPY_VERSION}/site-packages/pcapy-${MODPY_EGG_VERSION}.dist-info/WHEEL
|
||||
lib/python${MODPY_VERSION}/site-packages/pcapy-${MODPY_EGG_VERSION}.dist-info/top_level.txt
|
||||
@so lib/python${MODPY_VERSION}/site-packages/pcapy.${MODPY_PYC_MAGIC_TAG}so
|
||||
share/doc/pcapy/
|
||||
share/doc/pcapy/LICENSE
|
||||
share/doc/pcapy/README
|
||||
share/doc/pcapy/pcapy.html
|
||||
@comment share/doc/pcapy/tests/
|
||||
@comment share/doc/pcapy/tests/96pings.pcap
|
||||
@comment share/doc/pcapy/tests/pcapytests.py
|
Loading…
Add table
Add a link
Reference in a new issue