aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorJason E. Hale <jhale@FreeBSD.org>2016-12-02 12:33:41 +0800
committerJason E. Hale <jhale@FreeBSD.org>2016-12-02 12:33:41 +0800
commit6fceff0fb431c99f9ebd62c72c5b866e895df9d0 (patch)
tree4e9cbfc4ac29fb1e87809ba214577df0697e1269 /net
parent679e5d9841341a9a2d155d325290d7f5feb16894 (diff)
downloadfreebsd-ports-gnome-6fceff0fb431c99f9ebd62c72c5b866e895df9d0.tar.gz
freebsd-ports-gnome-6fceff0fb431c99f9ebd62c72c5b866e895df9d0.tar.zst
freebsd-ports-gnome-6fceff0fb431c99f9ebd62c72c5b866e895df9d0.zip
Add LIBPCAP option to allow building with libpcap from ports
Pass maintainership to submitter While here: Remove build dependency on devel/swig13; source comes pre-swig'd PR: 214939 (based on) Submitted by: Craig Leres <leres@ee.lbl.gov>
Diffstat (limited to 'net')
-rw-r--r--net/py-pcap/Makefile14
1 files changed, 11 insertions, 3 deletions
diff --git a/net/py-pcap/Makefile b/net/py-pcap/Makefile
index 81cbb8d7653b..60238ece8c2d 100644
--- a/net/py-pcap/Makefile
+++ b/net/py-pcap/Makefile
@@ -3,22 +3,30 @@
PORTNAME= pcap
PORTVERSION= 0.6.4
+PORTREVISION= 1
CATEGORIES= net python
MASTER_SITES= SF/pylib${PORTNAME}/pylib${PORTNAME}/${PORTVERSION}
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
DISTNAME= pylib${PORTNAME}-${PORTVERSION}
-MAINTAINER= ports@FreeBSD.org
+MAINTAINER= leres@ee.lbl.gov
COMMENT= Python interface to LBL Packet Capture library (libpcap)
LICENSE= BSD3CLAUSE
LICENSE_FILE= ${WRKSRC}/COPYING
-BUILD_DEPENDS= swig:devel/swig13
-
USES= python
USE_PYTHON= distutils autoplist
+OPTIONS_DEFINE= LIBPCAP
+
+LIBPCAP_DESC= Use the ports version of libpcap
+LIBPCAP_LIB_DEPENDS= libpcap.so.1:net/libpcap
+
+post-patch-LIBPCAP-on:
+ @${REINPLACE_CMD} -E -e 's|^(libpcap_dir[[:blank:]]*=).*$$|\1 "${LOCALBASE}/lib"|' \
+ ${WRKSRC}/setup.py
+
post-install:
${STRIP_CMD} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/_pcapmodule.so