git: 89b89ec05894 - main - emulators/py-unicorn: update to 2.1.4

From: Antoine Brodin <antoine_at_FreeBSD.org>
Date: Wed, 02 Sep 2026 21:59:36 UTC
The branch main has been updated by antoine:

URL: https://cgit.FreeBSD.org/ports/commit/?id=89b89ec05894a771a4b9a61e07fe2f1f9c8e6321

commit 89b89ec05894a771a4b9a61e07fe2f1f9c8e6321
Author:     Antoine Brodin <antoine@FreeBSD.org>
AuthorDate: 2026-09-02 21:59:09 +0000
Commit:     Antoine Brodin <antoine@FreeBSD.org>
CommitDate: 2026-09-02 21:59:09 +0000

    emulators/py-unicorn: update to 2.1.4
---
 emulators/py-unicorn/Makefile                   | 22 +++++++++++-----------
 emulators/py-unicorn/distinfo                   |  6 +++---
 emulators/py-unicorn/files/patch-pyproject.toml |  9 +++++++++
 emulators/py-unicorn/files/patch-setup.py       | 16 ----------------
 4 files changed, 23 insertions(+), 30 deletions(-)

diff --git a/emulators/py-unicorn/Makefile b/emulators/py-unicorn/Makefile
index 29c1e79c8965..74eac7e42e0c 100644
--- a/emulators/py-unicorn/Makefile
+++ b/emulators/py-unicorn/Makefile
@@ -1,7 +1,7 @@
 PORTNAME=	unicorn
-PORTVERSION=	2.0.1p1
-PORTREVISION=	1
+PORTVERSION=	2.1.4
 CATEGORIES=	emulators python
+MASTER_SITES=	PYPI
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
 
 MAINTAINER=	antoine@FreeBSD.org
@@ -10,22 +10,22 @@ WWW=		https://www.unicorn-engine.org/
 
 LICENSE=	BSD3CLAUSE
 
-BUILD_DEPENDS=	${LOCALBASE}/lib/libunicorn.so:emulators/unicorn
+BUILD_DEPENDS=	${PY_SETUPTOOLS} \
+		${PYTHON_PKGNAMEPREFIX}setuptools-scm>0:devel/py-setuptools-scm@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR} \
+		${LOCALBASE}/lib/libunicorn.so:emulators/unicorn
 RUN_DEPENDS=	${LOCALBASE}/lib/libunicorn.so:emulators/unicorn
 
-USE_GITHUB=	yes
-GH_ACCOUNT=	unicorn-engine
-GH_TAGNAME=	2.0.1.post1
-
 USES=		python
-USE_PYTHON=	distutils autoplist
+USE_PYTHON=	pep517 autoplist
 
 NO_ARCH=	yes
-WRKSRC_SUBDIR=	bindings/python
+MAKE_ENV=	LIBUNICORN_PATH=${LOCALBASE}/lib/libunicorn.so
+TEST_WRKSRC=	${WRKSRC}/tests
 
 do-test:
-	@(cd ${WRKSRC}; for sample in sample_*.py; do \
-		${SETENV} ${TEST_ENV} ${PYTHON_CMD} $${sample}; \
+	@(cd ${TEST_WRKSRC}; for t in test_*.py; do \
+		${SETENV} ${TEST_ENV} ${PYTHON_CMD} $${t}; \
 	done)
 
 .include <bsd.port.mk>
diff --git a/emulators/py-unicorn/distinfo b/emulators/py-unicorn/distinfo
index b9ef5e0ccdd5..c3242adb4edf 100644
--- a/emulators/py-unicorn/distinfo
+++ b/emulators/py-unicorn/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1712441135
-SHA256 (unicorn-engine-unicorn-2.0.1p1-2.0.1.post1_GH0.tar.gz) = 6b276c857c69ee5ec3e292c3401c8c972bae292e0e4cb306bb9e5466c0f14737
-SIZE (unicorn-engine-unicorn-2.0.1p1-2.0.1.post1_GH0.tar.gz) = 4071380
+TIMESTAMP = 1787605998
+SHA256 (unicorn-2.1.4.tar.gz) = 00567a70e323f749b419cd86bee4f9115beab7ebba32194581c090cbb7c59cff
+SIZE (unicorn-2.1.4.tar.gz) = 2900334
diff --git a/emulators/py-unicorn/files/patch-pyproject.toml b/emulators/py-unicorn/files/patch-pyproject.toml
new file mode 100644
index 000000000000..2327df5c87ac
--- /dev/null
+++ b/emulators/py-unicorn/files/patch-pyproject.toml
@@ -0,0 +1,9 @@
+--- pyproject.toml.orig	2025-09-09 16:38:25 UTC
++++ pyproject.toml
+@@ -1,5 +1,5 @@
+ [build-system]
+-requires = ["setuptools>=64", "build", "setuptools-scm"]
++requires = ["setuptools>=63", "build", "setuptools-scm"]
+ build-backend = "setuptools.build_meta"
+ 
+ [project]
diff --git a/emulators/py-unicorn/files/patch-setup.py b/emulators/py-unicorn/files/patch-setup.py
deleted file mode 100644
index 5c6b2f90e3b6..000000000000
--- a/emulators/py-unicorn/files/patch-setup.py
+++ /dev/null
@@ -1,16 +0,0 @@
-# Do not bundle libunicorn.so
-
---- setup.py.orig	2022-11-16 14:16:49 UTC
-+++ setup.py
-@@ -246,11 +246,4 @@ setup(
-         'Programming Language :: Python :: 3',
-     ],
-     requires=['ctypes'],
--    cmdclass=cmdclass,
--    zip_safe=False,
--    include_package_data=True,
--    is_pure=False,
--    package_data={
--        'unicorn': ['lib/*', 'include/unicorn/*']
--    }
- )