From cc8ea9d42ac2fc4e82d826ba56e622e91fdc5764 Mon Sep 17 00:00:00 2001 From: khorben Date: Mon, 26 Feb 2018 02:25:28 +0000 Subject: Package the Python bindings for emulators/unicorn No functional change intended for Unicorn itself. Inspired by emulators/keystone and emulators/py-keystone. Tested on NetBSD/amd64. --- emulators/py-unicorn/DESCR | 15 ++++++++++++++ emulators/py-unicorn/Makefile | 16 +++++++++++++++ emulators/py-unicorn/PLIST | 42 +++++++++++++++++++++++++++++++++++++++ emulators/unicorn/Makefile | 7 ++----- emulators/unicorn/Makefile.common | 11 ++++++++++ emulators/unicorn/PLIST | 2 +- emulators/unicorn/buildlink3.mk | 12 +++++++++++ emulators/unicorn/distinfo | 2 +- 8 files changed, 100 insertions(+), 7 deletions(-) create mode 100644 emulators/py-unicorn/DESCR create mode 100644 emulators/py-unicorn/Makefile create mode 100644 emulators/py-unicorn/PLIST create mode 100644 emulators/unicorn/Makefile.common create mode 100644 emulators/unicorn/buildlink3.mk (limited to 'emulators') diff --git a/emulators/py-unicorn/DESCR b/emulators/py-unicorn/DESCR new file mode 100644 index 00000000000..3bf7b29e52e --- /dev/null +++ b/emulators/py-unicorn/DESCR @@ -0,0 +1,15 @@ +Unicorn is a lightweight, multi-platform, multi-architecture CPU emulator +framework based on QEMU. + +Unicorn offers some unparalleled features: + - Multi-architecture: ARM, AMM64 (ARMv8), M68K, MIPS, SPARC, and X86 (16, 32, + 64-bit) + - Clean/simple/lightweight/intuitive architecture-neutral API + - Implemented in pure C language, with bindings for Python, Java, and Go + - Native support for Windows & *nix (with Mac OSX, Linux, *BSD & Solaris + confirmed) + - High performance via Just-In-Time compilation + - Support for fine-grained instrumentation at various levels + - Thread-safety by design + +This package contains the Python bindings for Unicorn. diff --git a/emulators/py-unicorn/Makefile b/emulators/py-unicorn/Makefile new file mode 100644 index 00000000000..406f8eae298 --- /dev/null +++ b/emulators/py-unicorn/Makefile @@ -0,0 +1,16 @@ +# $NetBSD: Makefile,v 1.1 2018/02/26 02:25:28 khorben Exp $ + +.include "../../emulators/unicorn/Makefile.common" + +PKGNAME= ${PYPKGPREFIX}-${DISTNAME} +CATEGORIES+= python + +MAINTAINER= pkgsrc-users@NetBSD.org +COMMENT= Python bindings for unicorn +LICENSE= gnu-gpl-v2 + +PYSETUPSUBDIR= bindings/python + +.include "../../emulators/unicorn/buildlink3.mk" +.include "../../lang/python/distutils.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/emulators/py-unicorn/PLIST b/emulators/py-unicorn/PLIST new file mode 100644 index 00000000000..03576b17be6 --- /dev/null +++ b/emulators/py-unicorn/PLIST @@ -0,0 +1,42 @@ +@comment $NetBSD: PLIST,v 1.1 2018/02/26 02:25:28 khorben Exp $ +${PYSITELIB}/${EGG_FILE}/PKG-INFO +${PYSITELIB}/${EGG_FILE}/SOURCES.txt +${PYSITELIB}/${EGG_FILE}/dependency_links.txt +${PYSITELIB}/${EGG_FILE}/top_level.txt +${PYSITELIB}/${EGG_FILE}/zip-safe +${PYSITELIB}/unicorn/__init__.py +${PYSITELIB}/unicorn/__init__.pyc +${PYSITELIB}/unicorn/__init__.pyo +${PYSITELIB}/unicorn/arm64_const.py +${PYSITELIB}/unicorn/arm64_const.pyc +${PYSITELIB}/unicorn/arm64_const.pyo +${PYSITELIB}/unicorn/arm_const.py +${PYSITELIB}/unicorn/arm_const.pyc +${PYSITELIB}/unicorn/arm_const.pyo +${PYSITELIB}/unicorn/include/unicorn/arm.h +${PYSITELIB}/unicorn/include/unicorn/arm64.h +${PYSITELIB}/unicorn/include/unicorn/m68k.h +${PYSITELIB}/unicorn/include/unicorn/mips.h +${PYSITELIB}/unicorn/include/unicorn/sparc.h +${PYSITELIB}/unicorn/include/unicorn/unicorn.h +${PYSITELIB}/unicorn/include/unicorn/x86.h +${PYSITELIB}/unicorn/lib/libunicorn.a +${PYSITELIB}/unicorn/lib/libunicorn.so +${PYSITELIB}/unicorn/m68k_const.py +${PYSITELIB}/unicorn/m68k_const.pyc +${PYSITELIB}/unicorn/m68k_const.pyo +${PYSITELIB}/unicorn/mips_const.py +${PYSITELIB}/unicorn/mips_const.pyc +${PYSITELIB}/unicorn/mips_const.pyo +${PYSITELIB}/unicorn/sparc_const.py +${PYSITELIB}/unicorn/sparc_const.pyc +${PYSITELIB}/unicorn/sparc_const.pyo +${PYSITELIB}/unicorn/unicorn.py +${PYSITELIB}/unicorn/unicorn.pyc +${PYSITELIB}/unicorn/unicorn.pyo +${PYSITELIB}/unicorn/unicorn_const.py +${PYSITELIB}/unicorn/unicorn_const.pyc +${PYSITELIB}/unicorn/unicorn_const.pyo +${PYSITELIB}/unicorn/x86_const.py +${PYSITELIB}/unicorn/x86_const.pyc +${PYSITELIB}/unicorn/x86_const.pyo diff --git a/emulators/unicorn/Makefile b/emulators/unicorn/Makefile index c578bbda717..3299c17b15a 100644 --- a/emulators/unicorn/Makefile +++ b/emulators/unicorn/Makefile @@ -1,11 +1,8 @@ -# $NetBSD: Makefile,v 1.5 2018/02/19 00:39:52 kamil Exp $ +# $NetBSD: Makefile,v 1.6 2018/02/26 02:25:28 khorben Exp $ -DISTNAME= unicorn-1.0.1 -CATEGORIES= emulators -MASTER_SITES= ${MASTER_SITE_GITHUB:=unicorn-engine/} +.include "Makefile.common" MAINTAINER= pkgsrc-users@NetBSD.org -HOMEPAGE= http://www.unicorn-engine.org/ COMMENT= CPU emulator engine framework based on QEMU LICENSE= gnu-gpl-v2 diff --git a/emulators/unicorn/Makefile.common b/emulators/unicorn/Makefile.common new file mode 100644 index 00000000000..81dffd5c022 --- /dev/null +++ b/emulators/unicorn/Makefile.common @@ -0,0 +1,11 @@ +# $NetBSD: Makefile.common,v 1.1 2018/02/26 02:25:28 khorben Exp $ +# +# used by emulators/py-unicorn/Makefile + +DISTNAME= unicorn-1.0.1 +CATEGORIES= emulators +MASTER_SITES= ${MASTER_SITE_GITHUB:=unicorn-engine/} + +HOMEPAGE= http://www.unicorn-engine.org/ + +DISTINFO_FILE= ${.CURDIR}/../../emulators/unicorn/distinfo diff --git a/emulators/unicorn/PLIST b/emulators/unicorn/PLIST index d77490c0eb4..810591651d3 100644 --- a/emulators/unicorn/PLIST +++ b/emulators/unicorn/PLIST @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST,v 1.2 2018/02/19 00:39:52 kamil Exp $ +@comment $NetBSD: PLIST,v 1.3 2018/02/26 02:25:28 khorben Exp $ include/unicorn/arm.h include/unicorn/arm64.h include/unicorn/m68k.h diff --git a/emulators/unicorn/buildlink3.mk b/emulators/unicorn/buildlink3.mk new file mode 100644 index 00000000000..ab3adf5ef08 --- /dev/null +++ b/emulators/unicorn/buildlink3.mk @@ -0,0 +1,12 @@ +# $NetBSD: buildlink3.mk,v 1.1 2018/02/26 02:25:28 khorben Exp $ + +BUILDLINK_TREE+= unicorn + +.if !defined(UNICORN_BUILDLINK3_MK) +UNICORN_BUILDLINK3_MK:= + +BUILDLINK_API_DEPENDS.unicorn+= unicorn>=1.0.1 +BUILDLINK_PKGSRCDIR.unicorn?= ../../emulators/unicorn +.endif # UNICORN_BUILDLINK3_MK + +BUILDLINK_TREE+= -unicorn diff --git a/emulators/unicorn/distinfo b/emulators/unicorn/distinfo index a4599f4e343..ff4fadd5605 100644 --- a/emulators/unicorn/distinfo +++ b/emulators/unicorn/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.3 2018/02/19 00:39:52 kamil Exp $ +$NetBSD: distinfo,v 1.4 2018/02/26 02:25:28 khorben Exp $ SHA1 (unicorn-1.0.1.tar.gz) = 85c9d7aad2a87b110b729560ed9333b66018ca6a RMD160 (unicorn-1.0.1.tar.gz) = 599b7ce96fe4040a48561bd9474666583265960b -- cgit v1.2.3