git: 365b75d161d4 - main - devel/py-capstone: Fix libcapstone.so detection
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 19 Sep 2026 14:47:15 UTC
The branch main has been updated by 0mp:
URL: https://cgit.FreeBSD.org/ports/commit/?id=365b75d161d48a57b889b11dc6d17e6c1340190b
commit 365b75d161d48a57b889b11dc6d17e6c1340190b
Author: Mateusz Piotrowski <0mp@FreeBSD.org>
AuthorDate: 2026-09-18 18:09:22 +0000
Commit: Mateusz Piotrowski <0mp@FreeBSD.org>
CommitDate: 2026-09-19 14:45:30 +0000
devel/py-capstone: Fix libcapstone.so detection
During the `make -C security/py-ropper` I noticed that TEST_ENV was
missing LIBCAPSTONE_PATH. I turns out that devel/py-capstone can
actually detect the correct path on its own if told where to look.
Fixes: f17e4f2e04ee devel/py-capstone: Update version 5.0.1=>5.0.2
Reviewed by: bofh
Approved by: maintainer (bofh)
Differential Revision: https://reviews.freebsd.org/D59817
---
devel/py-capstone/Makefile | 1 +
devel/py-capstone/files/patch-capstone_____init____.py | 13 +++++++++++++
2 files changed, 14 insertions(+)
diff --git a/devel/py-capstone/Makefile b/devel/py-capstone/Makefile
index c90ae5ea8453..927df06ba415 100644
--- a/devel/py-capstone/Makefile
+++ b/devel/py-capstone/Makefile
@@ -1,5 +1,6 @@
PORTNAME= capstone
DISTVERSION= 5.0.9
+PORTREVISION= 1
CATEGORIES= devel python
MASTER_SITES= PYPI
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
diff --git a/devel/py-capstone/files/patch-capstone_____init____.py b/devel/py-capstone/files/patch-capstone_____init____.py
new file mode 100644
index 000000000000..6a905c16a08c
--- /dev/null
+++ b/devel/py-capstone/files/patch-capstone_____init____.py
@@ -0,0 +1,13 @@
+--- capstone/__init__.py.orig 2026-09-18 17:56:39 UTC
++++ capstone/__init__.py
+@@ -401,7 +401,9 @@ _path_list = [os.getenv('LIBCAPSTONE_PATH', None),
+ join(split(__file__)[0], 'lib'),
+ '',
+ sysconfig.get_path('platlib'),
+- "/usr/local/lib/" if sys.platform == 'darwin' else '/usr/lib64']
++ "%%LOCALBASE%%/lib/" if sys.platform == 'darwin'
++ or sys.platform.startswith('freebsd')
++ else '/usr/lib64']
+
+ for _path in _path_list:
+ if _path is None: continue