unicorn py-unicorn: updated to 2.0.1.post1 Version 2.0.1 Features: - Support building & running on BE hosts. - Fix and support `clang-cl` on Windows. - Fix python `sdist` and add aarch64 Linux wheels. Note `pip` can build Unicorn2 on M1 now! - C# binding is refined and upgraded to .Net 6. Fix/Improvements: - Various bindings improvements. - Improvements for tests. - Fail explicitly when VEX.L is set. - Fix endianness when writing PPC32 CR register. - Fix a bug in `uc_ctl_set_cpu_model` check. - Fix Tricore PC not updating. - Fix the mapping not updated if users modify the mappings in the hooks. - Handle pathological cases consistently. - Fix memory leaks in PPC target. - Fix memory leaks in Tricore target. - Fix MSVC handling in cmake. - Fix PC sync-ing problems for `UC_HOOK_BLOCK` hooks. - Fix PC sync-ed twice when users request a soft restart. - Prevent overflow with pre-allocated RAM blocks. - Add FPCR and FPSR registers - Fix ARM CPU state not deep copied. - Fix PC not sync-ed for memory operation on aarch64. - Exit invalid store operations early to avoid the target registers being overwritten. - Improve the support for ARM BE32. Version 2.0.0 Features: - TriCore Support Fixes/Improvements: - Build both shared library and static archive as unicorn1 does. - Misc bindings improvements. - Make sure setjmp-setjmp-wrapper-win32 participates in the build. - Improve Rust bindings build logic. - Fix wrong python binding for UC_CTL_TB_REMOVE_CACHE - Flush translation blocks when the count hook is removed. - Fix unicorn crash when nested `uc_emu_start` deletes a hook - Fix CPU not fully resumed when writing PC. - Don't quit TB if `uc_mem_protect` doesn't change the protection of current TB memory. - Add type annotations for python bindings. - Add CPUID hook for python bindings. - Don't repeat memory hooks if there is already an unhandled error. - Support reads and writes over all Arm SIMD registers - Fix wrong registers range in python bindings. - Fix uc_mem_protect on mmio regions - Fix a UAF caused by hook cache. - Fix the value collision between UC_MODE_ARMBE8 and UC_MODE_ARM926diff -r1.4 -r1.5 pkgsrc/emulators/py-unicorn/Makefile
(adam)
@@ -1,17 +1,18 @@ | @@ -1,17 +1,18 @@ | |||
1 | # $NetBSD: Makefile,v 1.4 2023/05/10 19:14:51 adam Exp $ | 1 | # $NetBSD: Makefile,v 1.5 2023/05/11 06:47:11 adam Exp $ | |
2 | 2 | |||
3 | .include "../../emulators/unicorn/Makefile.common" | 3 | .include "../../emulators/unicorn/Makefile.common" | |
4 | 4 | |||
5 | PKGNAME= ${PYPKGPREFIX}-${DISTNAME} | 5 | PKGNAME= ${PYPKGPREFIX}-${DISTNAME} | |
6 | CATEGORIES+= python | 6 | CATEGORIES+= python | |
7 | 7 | |||
8 | MAINTAINER= pkgsrc-users@NetBSD.org | 8 | MAINTAINER= pkgsrc-users@NetBSD.org | |
9 | COMMENT= Python bindings for unicorn | 9 | COMMENT= Python bindings for unicorn | |
10 | LICENSE= gnu-gpl-v2 | 10 | LICENSE= gnu-gpl-v2 | |
11 | 11 | |||
12 | USE_LANGUAGES= # none | 12 | USE_LANGUAGES= # none | |
13 | PYSETUPSUBDIR= bindings/python | 13 | PYSETUPSUBDIR= bindings/python | |
14 | MAKE_ENV+= LIBUNICORN_PATH=${BUILDLINK_PREFIX.unicorn}/lib | |||
14 | 15 | |||
15 | .include "../../emulators/unicorn/buildlink3.mk" | 16 | .include "../../emulators/unicorn/buildlink3.mk" | |
16 | .include "../../lang/python/egg.mk" | 17 | .include "../../lang/python/egg.mk" | |
17 | .include "../../mk/bsd.pkg.mk" | 18 | .include "../../mk/bsd.pkg.mk" |
@@ -1,33 +1,45 @@ | @@ -1,33 +1,45 @@ | |||
1 | @comment $NetBSD: PLIST,v 1.3 2021/02/25 19:47:50 leot Exp $ | 1 | @comment $NetBSD: PLIST,v 1.4 2023/05/11 06:47:11 adam Exp $ | |
2 | ${PYSITELIB}/${EGG_INFODIR}/PKG-INFO | 2 | ${PYSITELIB}/${EGG_INFODIR}/PKG-INFO | |
3 | ${PYSITELIB}/${EGG_INFODIR}/SOURCES.txt | 3 | ${PYSITELIB}/${EGG_INFODIR}/SOURCES.txt | |
4 | ${PYSITELIB}/${EGG_INFODIR}/dependency_links.txt | 4 | ${PYSITELIB}/${EGG_INFODIR}/dependency_links.txt | |
5 | ${PYSITELIB}/${EGG_INFODIR}/top_level.txt | |||
6 | ${PYSITELIB}/${EGG_INFODIR}/not-zip-safe | 5 | ${PYSITELIB}/${EGG_INFODIR}/not-zip-safe | |
6 | ${PYSITELIB}/${EGG_INFODIR}/top_level.txt | |||
7 | ${PYSITELIB}/unicorn/__init__.py | 7 | ${PYSITELIB}/unicorn/__init__.py | |
8 | ${PYSITELIB}/unicorn/__init__.pyc | 8 | ${PYSITELIB}/unicorn/__init__.pyc | |
9 | ${PYSITELIB}/unicorn/__init__.pyo | 9 | ${PYSITELIB}/unicorn/__init__.pyo | |
10 | ${PYSITELIB}/unicorn/arm64_const.py | 10 | ${PYSITELIB}/unicorn/arm64_const.py | |
11 | ${PYSITELIB}/unicorn/arm64_const.pyc | 11 | ${PYSITELIB}/unicorn/arm64_const.pyc | |
12 | ${PYSITELIB}/unicorn/arm64_const.pyo | 12 | ${PYSITELIB}/unicorn/arm64_const.pyo | |
13 | ${PYSITELIB}/unicorn/arm_const.py | 13 | ${PYSITELIB}/unicorn/arm_const.py | |
14 | ${PYSITELIB}/unicorn/arm_const.pyc | 14 | ${PYSITELIB}/unicorn/arm_const.pyc | |
15 | ${PYSITELIB}/unicorn/arm_const.pyo | 15 | ${PYSITELIB}/unicorn/arm_const.pyo | |
16 | ${PYSITELIB}/unicorn/m68k_const.py | 16 | ${PYSITELIB}/unicorn/m68k_const.py | |
17 | ${PYSITELIB}/unicorn/m68k_const.pyc | 17 | ${PYSITELIB}/unicorn/m68k_const.pyc | |
18 | ${PYSITELIB}/unicorn/m68k_const.pyo | 18 | ${PYSITELIB}/unicorn/m68k_const.pyo | |
19 | ${PYSITELIB}/unicorn/mips_const.py | 19 | ${PYSITELIB}/unicorn/mips_const.py | |
20 | ${PYSITELIB}/unicorn/mips_const.pyc | 20 | ${PYSITELIB}/unicorn/mips_const.pyc | |
21 | ${PYSITELIB}/unicorn/mips_const.pyo | 21 | ${PYSITELIB}/unicorn/mips_const.pyo | |
22 | ${PYSITELIB}/unicorn/ppc_const.py | |||
23 | ${PYSITELIB}/unicorn/ppc_const.pyc | |||
24 | ${PYSITELIB}/unicorn/ppc_const.pyo | |||
25 | ${PYSITELIB}/unicorn/riscv_const.py | |||
26 | ${PYSITELIB}/unicorn/riscv_const.pyc | |||
27 | ${PYSITELIB}/unicorn/riscv_const.pyo | |||
28 | ${PYSITELIB}/unicorn/s390x_const.py | |||
29 | ${PYSITELIB}/unicorn/s390x_const.pyc | |||
30 | ${PYSITELIB}/unicorn/s390x_const.pyo | |||
22 | ${PYSITELIB}/unicorn/sparc_const.py | 31 | ${PYSITELIB}/unicorn/sparc_const.py | |
23 | ${PYSITELIB}/unicorn/sparc_const.pyc | 32 | ${PYSITELIB}/unicorn/sparc_const.pyc | |
24 | ${PYSITELIB}/unicorn/sparc_const.pyo | 33 | ${PYSITELIB}/unicorn/sparc_const.pyo | |
34 | ${PYSITELIB}/unicorn/tricore_const.py | |||
35 | ${PYSITELIB}/unicorn/tricore_const.pyc | |||
36 | ${PYSITELIB}/unicorn/tricore_const.pyo | |||
25 | ${PYSITELIB}/unicorn/unicorn.py | 37 | ${PYSITELIB}/unicorn/unicorn.py | |
26 | ${PYSITELIB}/unicorn/unicorn.pyc | 38 | ${PYSITELIB}/unicorn/unicorn.pyc | |
27 | ${PYSITELIB}/unicorn/unicorn.pyo | 39 | ${PYSITELIB}/unicorn/unicorn.pyo | |
28 | ${PYSITELIB}/unicorn/unicorn_const.py | 40 | ${PYSITELIB}/unicorn/unicorn_const.py | |
29 | ${PYSITELIB}/unicorn/unicorn_const.pyc | 41 | ${PYSITELIB}/unicorn/unicorn_const.pyc | |
30 | ${PYSITELIB}/unicorn/unicorn_const.pyo | 42 | ${PYSITELIB}/unicorn/unicorn_const.pyo | |
31 | ${PYSITELIB}/unicorn/x86_const.py | 43 | ${PYSITELIB}/unicorn/x86_const.py | |
32 | ${PYSITELIB}/unicorn/x86_const.pyc | 44 | ${PYSITELIB}/unicorn/x86_const.pyc | |
33 | ${PYSITELIB}/unicorn/x86_const.pyo | 45 | ${PYSITELIB}/unicorn/x86_const.pyo |
@@ -1,27 +1,13 @@ | @@ -1,27 +1,13 @@ | |||
1 | # $NetBSD: Makefile,v 1.20 2023/05/10 19:14:50 adam Exp $ | 1 | # $NetBSD: Makefile,v 1.21 2023/05/11 06:47:11 adam Exp $ | |
2 | 2 | |||
3 | .include "Makefile.common" | 3 | .include "Makefile.common" | |
4 | 4 | |||
5 | MAINTAINER= pkgsrc-users@NetBSD.org | 5 | MAINTAINER= pkgsrc-users@NetBSD.org | |
6 | COMMENT= CPU emulator engine framework based on QEMU | 6 | COMMENT= CPU emulator engine framework based on QEMU | |
7 | LICENSE= gnu-gpl-v2 | 7 | LICENSE= gnu-gpl-v2 | |
8 | 8 | |||
9 | USE_TOOLS+= gmake pkg-config | 9 | USE_LANGUAGES= c c++ | |
10 | ||||
11 | .include "../../lang/python/application.mk" | |||
12 | ||||
13 | MAKE_ENV+= UNICORN_QEMU_FLAGS=--python=${PYTHONBIN:Q} | |||
14 | MAKE_ENV+= UNICORN_QEMU_FLAGS=--extra-ldflags=\"${LDFLAGS:Q}\" | |||
15 | MAKE_ENV+= CONFIG_SHELL=${CONFIG_SHELL:Q} | |||
16 | ||||
17 | ALL_ENV+= USE_GENERIC_LIBDATADIR=yes | |||
18 | ||||
19 | .include "../../mk/bsd.prefs.mk" | |||
20 | .if ${OPSYS} == "Darwin" | |||
21 | post-install: | |||
22 | install_name_tool -id ${PREFIX}/lib/libunicorn.1.dylib \ | |||
23 | ${DESTDIR}${PREFIX}/lib/libunicorn.1.dylib | |||
24 | .endif | |||
25 | 10 | |||
11 | .include "../../devel/cmake/build.mk" | |||
26 | .include "../../devel/glib2/buildlink3.mk" | 12 | .include "../../devel/glib2/buildlink3.mk" | |
27 | .include "../../mk/bsd.pkg.mk" | 13 | .include "../../mk/bsd.pkg.mk" |
@@ -1,16 +1,16 @@ | @@ -1,16 +1,16 @@ | |||
1 | # $NetBSD: Makefile.common,v 1.7 2023/05/10 19:14:50 adam Exp $ | 1 | # $NetBSD: Makefile.common,v 1.8 2023/05/11 06:47:11 adam Exp $ | |
2 | # | 2 | # | |
3 | # used by emulators/unicorn/Makefile | 3 | # used by emulators/unicorn/Makefile | |
4 | # used by emulators/py-unicorn/Makefile | 4 | # used by emulators/py-unicorn/Makefile | |
5 | 5 | |||
6 | DISTNAME= unicorn-1.0.3 | 6 | DISTNAME= unicorn-2.0.1.post1 | |
7 | CATEGORIES= emulators | 7 | CATEGORIES= emulators | |
8 | MASTER_SITES= ${MASTER_SITE_GITHUB:=unicorn-engine/} | 8 | MASTER_SITES= ${MASTER_SITE_GITHUB:=unicorn-engine/} | |
9 | GITHUB_PROJECT= unicorn | 9 | GITHUB_PROJECT= unicorn | |
10 | 10 | |||
11 | HOMEPAGE= https://www.unicorn-engine.org/ | 11 | HOMEPAGE= https://www.unicorn-engine.org/ | |
12 | 12 | |||
13 | DISTINFO_FILE= ${.CURDIR}/../../emulators/unicorn/distinfo | 13 | DISTINFO_FILE= ${.CURDIR}/../../emulators/unicorn/distinfo | |
14 | PATCHDIR= ${.CURDIR}/../../emulators/unicorn/patches | 14 | PATCHDIR= ${.CURDIR}/../../emulators/unicorn/patches | |
15 | 15 | |||
16 | CHECK_PORTABILITY_SKIP+= install-cmocka-linux.sh | 16 | CHECK_PORTABILITY_SKIP+= install-cmocka-linux.sh |
@@ -1,13 +1,17 @@ | @@ -1,13 +1,17 @@ | |||
1 | @comment $NetBSD: PLIST,v 1.4 2021/02/25 19:47:50 leot Exp $ | 1 | @comment $NetBSD: PLIST,v 1.5 2023/05/11 06:47:11 adam Exp $ | |
2 | include/unicorn/arm.h | 2 | include/unicorn/arm.h | |
3 | include/unicorn/arm64.h | 3 | include/unicorn/arm64.h | |
4 | include/unicorn/m68k.h | 4 | include/unicorn/m68k.h | |
5 | include/unicorn/mips.h | 5 | include/unicorn/mips.h | |
6 | include/unicorn/platform.h | 6 | include/unicorn/platform.h | |
7 | include/unicorn/ppc.h | |||
8 | include/unicorn/riscv.h | |||
9 | include/unicorn/s390x.h | |||
7 | include/unicorn/sparc.h | 10 | include/unicorn/sparc.h | |
11 | include/unicorn/tricore.h | |||
8 | include/unicorn/unicorn.h | 12 | include/unicorn/unicorn.h | |
9 | include/unicorn/x86.h | 13 | include/unicorn/x86.h | |
10 | lib/libunicorn.a | 14 | lib/libunicorn.a | |
11 | lib/libunicorn.so | 15 | lib/libunicorn.so | |
12 | lib/libunicorn.so.1 | 16 | lib/libunicorn.so.2 | |
13 | lib/pkgconfig/unicorn.pc | 17 | lib/pkgconfig/unicorn.pc |
@@ -1,12 +1,12 @@ | @@ -1,12 +1,12 @@ | |||
1 | # $NetBSD: buildlink3.mk,v 1.2 2019/11/03 19:24:34 rillig Exp $ | 1 | # $NetBSD: buildlink3.mk,v 1.3 2023/05/11 06:47:11 adam Exp $ | |
2 | 2 | |||
3 | BUILDLINK_TREE+= unicorn | 3 | BUILDLINK_TREE+= unicorn | |
4 | 4 | |||
5 | .if !defined(UNICORN_BUILDLINK3_MK) | 5 | .if !defined(UNICORN_BUILDLINK3_MK) | |
6 | UNICORN_BUILDLINK3_MK:= | 6 | UNICORN_BUILDLINK3_MK:= | |
7 | 7 | |||
8 | BUILDLINK_API_DEPENDS.unicorn+= unicorn>=1.0.1 | 8 | BUILDLINK_API_DEPENDS.unicorn+= unicorn>=2.0.0 | |
9 | BUILDLINK_PKGSRCDIR.unicorn?= ../../emulators/unicorn | 9 | BUILDLINK_PKGSRCDIR.unicorn?= ../../emulators/unicorn | |
10 | .endif # UNICORN_BUILDLINK3_MK | 10 | .endif # UNICORN_BUILDLINK3_MK | |
11 | 11 | |||
12 | BUILDLINK_TREE+= -unicorn | 12 | BUILDLINK_TREE+= -unicorn |
@@ -1,8 +1,7 @@ | @@ -1,8 +1,7 @@ | |||
1 | $NetBSD: distinfo,v 1.11 2023/05/10 19:14:50 adam Exp $ | 1 | $NetBSD: distinfo,v 1.12 2023/05/11 06:47:11 adam Exp $ | |
2 | 2 | |||
3 | BLAKE2s (unicorn-1.0.3.tar.gz) = 53a6a919c8e46d14add3be520531eb3d6b8d1686855a6980dfc57ebe8edbd852 | 3 | BLAKE2s (unicorn-2.0.1.post1.tar.gz) = d2a3e24b963448e11d1b46d7fa3edbd6d1dbef1d2f996b6c66aee2e6f7297c4b | |
4 | SHA512 (unicorn-1.0.3.tar.gz) = 10f1b5194358c65bc94723eaafd7b4167fee18f96a4810f46f8c78ed1ef5584546e66e8c910fa4eeadd791fcd73edea68f898e337081409fd188b4090b78a7ca | 4 | SHA512 (unicorn-2.0.1.post1.tar.gz) = 8694d6bc92e3424a8ad050316413d53e56e0f55e7cad7517fb3e98e670a0f1768b060ead8f195da13607cec89a964364f05a8b9d0dc074f4ac5e51026f8343ad | |
5 | Size (unicorn-1.0.3.tar.gz) = 3759365 bytes | 5 | Size (unicorn-2.0.1.post1.tar.gz) = 4071380 bytes | |
6 | SHA1 (patch-Makefile) = a4cee3d8f880515e10dd053a6d2e93ea019f34d7 | |||
7 | SHA1 (patch-bindings_python_setup.py) = 035888ce0599abb8ef4670fffb051cb1510d9a29 | |||
8 | SHA1 (patch-bindings_python_unicorn_unicorn.py) = d7653d205bc999b8c53941c161771b8f72fcfa6e | 6 | SHA1 (patch-bindings_python_unicorn_unicorn.py) = d7653d205bc999b8c53941c161771b8f72fcfa6e | |
7 | SHA1 (patch-bundle__static.cmake) = f6ebe735b2b7e8ef151f15b95a7ee0bb9b9d9ef6 |
$NetBSD: patch-bundle__static.cmake,v 1.1 2023/05/11 06:47:11 adam Exp $
Use proper libtool on Darwin.
--- bundle_static.cmake.orig 2023-05-10 19:31:11.000000000 +0000
+++ bundle_static.cmake
@@ -44,14 +44,12 @@ function(bundle_static_library tgt_name
${CMAKE_BINARY_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}${library_name}${CMAKE_STATIC_LIBRARY_SUFFIX})
if (APPLE)
- find_program(lib_tool libtool REQUIRED)
-
foreach(tgt IN LISTS static_libs)
list(APPEND static_libs_full_names $<TARGET_FILE:${tgt}>)
endforeach()
add_custom_command(
- COMMAND ${lib_tool} -static -o ${bundled_tgt_full_name} ${static_libs_full_names}
+ COMMAND /usr/bin/libtool -static -o ${bundled_tgt_full_name} ${static_libs_full_names}
OUTPUT ${bundled_tgt_full_name}
COMMENT "Bundling ${bundled_tgt_name}"
VERBATIM)
@@ -112,4 +110,4 @@ function(bundle_static_library tgt_name
#IMPORTED_LINK_INTERFACE_LIBRARIES "${dep_libs}") # Deprecated
add_dependencies(${bundled_tgt_name} bundling_target)
-endfunction()
\ No newline at end of file
+endfunction()