net/py-pyshark: Convert REINPLACE_CMD to patch file

This commit is contained in:
Po-Chuan Hsieh 2021-05-03 03:45:24 +08:00
parent 48d46f1ec2
commit 0ee088869d
No known key found for this signature in database
GPG key ID: 9A4BD10F002DD04B
2 changed files with 13 additions and 1 deletions

View file

@ -23,6 +23,6 @@ USE_PYTHON= autoplist concurrent distutils
NO_ARCH= yes
post-patch:
@${REINPLACE_CMD} -e 's|C:\\Program Files\\Wireshark\\\(.*\).exe|${LOCALBASE}/bin/\1|' ${WRKSRC}/pyshark/config.ini
@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|' ${WRKSRC}/pyshark/config.ini
.include <bsd.port.mk>

View file

@ -0,0 +1,12 @@
--- pyshark/config.ini.orig 2020-05-27 13:39:51 UTC
+++ pyshark/config.ini
@@ -7,7 +7,7 @@
# (Linux): /usr/local/bin/tshark
# (Windows): %ProgramFiles%\Wireshark\tshark.exe
# (Windows): %ProgramFiles(x86)%\Wireshark\tshark.exe
-tshark_path = C:\Program Files\Wireshark\tshark.exe
+tshark_path = %%LOCALBASE%%/bin/tshark
[dumpcap]
-dumpcap_path = C:\Program Files\Wireshark\dumpcap.exe
+dumpcap_path = /usr/local/bin/dumpcap