diff --git a/emulators/Makefile b/emulators/Makefile index f18709fd9a2a..b515063708db 100644 --- a/emulators/Makefile +++ b/emulators/Makefile @@ -116,6 +116,7 @@ SUBDIR += ppsspp-qt5 SUBDIR += py-gns3-converter SUBDIR += py-nova + SUBDIR += py-unicorn SUBDIR += q4wine SUBDIR += qemu SUBDIR += qemu-cheri diff --git a/emulators/py-unicorn/Makefile b/emulators/py-unicorn/Makefile new file mode 100644 index 000000000000..2462a5a44b6b --- /dev/null +++ b/emulators/py-unicorn/Makefile @@ -0,0 +1,27 @@ +# $FreeBSD$ + +PORTNAME= unicorn +PORTVERSION= 0.9 +CATEGORIES= emulators python +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= antoine@FreeBSD.org +COMMENT= Python bindings for Unicorn CPU emulator framework + +LICENSE= BSD3CLAUSE + +LIB_DEPENDS= libunicorn.so:emulators/unicorn + +USE_GITHUB= yes +GH_ACCOUNT= unicorn-engine + +USES= python +USE_PYTHON= distutils autoplist +WRKSRC_SUBDIR= bindings/python + +do-test: + @(cd ${WRKSRC}; for sample in sample_*.py; do \ + ${SETENV} ${TEST_ENV} ${PYTHON_CMD} $${sample}; \ + done) + +.include diff --git a/emulators/py-unicorn/distinfo b/emulators/py-unicorn/distinfo new file mode 100644 index 000000000000..77d344f5d9b6 --- /dev/null +++ b/emulators/py-unicorn/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1481841704 +SHA256 (unicorn-engine-unicorn-0.9_GH0.tar.gz) = 1ca03b1c8f6360335567b528210713461e839d47c4eb7c676ba3aa4f72b8cf10 +SIZE (unicorn-engine-unicorn-0.9_GH0.tar.gz) = 2576109 diff --git a/emulators/py-unicorn/files/patch-setup.py b/emulators/py-unicorn/files/patch-setup.py new file mode 100644 index 000000000000..3b24004f84da --- /dev/null +++ b/emulators/py-unicorn/files/patch-setup.py @@ -0,0 +1,22 @@ +# Do not bundle libunicorn.so + +--- setup.py.orig 2015-10-15 16:22:04 UTC ++++ setup.py +@@ -166,17 +166,4 @@ setup( + 'Programming Language :: Python :: 3', + ], + requires=['ctypes'], +- cmdclass=dict( +- build_clib=custom_build_clib, +- sdist=custom_sdist, +- ), +- +- libraries=[( +- 'unicorn', dict( +- package='unicorn', +- sources=dummy_src() +- ), +- )], +- +- data_files=[(SITE_PACKAGES, SETUP_DATA_FILES)], + ) diff --git a/emulators/py-unicorn/pkg-descr b/emulators/py-unicorn/pkg-descr new file mode 100644 index 000000000000..c0efe63017dc --- /dev/null +++ b/emulators/py-unicorn/pkg-descr @@ -0,0 +1,3 @@ +Python bindings for Unicorn CPU emulator framework. + +WWW: http://www.unicorn-engine.org/