diff --git a/.gitignore b/.gitignore index 751f477..2454555 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/zydis-4.0.0.tar.gz +/zydis-*.tar* diff --git a/README.packit b/README.packit new file mode 100644 index 0000000..7017e6c --- /dev/null +++ b/README.packit @@ -0,0 +1,3 @@ +This repository is maintained by packit. +https://packit.dev/ +The file was generated using packit 1.1.0.post1.dev2+gf7b527d0. diff --git a/a56a39f15efe64a41013ec142c028e6f72476232.patch b/a56a39f15efe64a41013ec142c028e6f72476232.patch deleted file mode 100644 index cbb3c07..0000000 --- a/a56a39f15efe64a41013ec142c028e6f72476232.patch +++ /dev/null @@ -1,62 +0,0 @@ -From a56a39f15efe64a41013ec142c028e6f72476232 Mon Sep 17 00:00:00 2001 -From: Felix Wang <77263945+topazus@users.noreply.github.com> -Date: Sun, 30 Apr 2023 14:51:50 +0800 -Subject: [PATCH] Add ZYDIS_BUILD_TESTS option and include tests in - CMakeLists.txt - ---- - CMakeLists.txt | 37 +++++++++++++++++++++++++++++++++++++ - 1 file changed, 37 insertions(+) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index f9786010..fa0488ba 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -53,6 +53,9 @@ option(ZYDIS_BUILD_MAN - option(ZYDIS_BUILD_DOXYGEN - "Build doxygen documentation (requires Doxygen)" - ON) -+option(ZYDIS_BUILD_TESTS -+ "Build tests" -+ OFF) - option(ZYDIS_FUZZ_AFL_FAST - "Enables AFL persistent mode and reduces prints in ZydisFuzzIn" - OFF) -@@ -491,3 +494,37 @@ if (ZYDIS_BUILD_MAN) - endforeach() - add_custom_target(man ALL DEPENDS ${MAN_NAMES}) - endif () -+ -+# =============================================================================================== # -+# Tests # -+# =============================================================================================== # -+ -+if (ZYDIS_BUILD_TESTS) -+ enable_testing() -+ find_package(Python 3 REQUIRED) -+ -+ if (TARGET ZydisInfo) -+ add_test( -+ NAME "ZydisRegression" -+ COMMAND -+ "${Python_EXECUTABLE}" -+ regression.py -+ test -+ $ -+ WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}/tests" -+ ) -+ endif () -+ -+ if (TARGET ZydisFuzzReEncoding AND TARGET ZydisFuzzEncoder AND TARGET ZydisTestEncoderAbsolute) -+ add_test( -+ NAME "ZydisRegressionEncoder" -+ COMMAND -+ "${Python_EXECUTABLE}" -+ regression_encoder.py -+ $ -+ $ -+ $ -+ WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}/tests" -+ ) -+ endif () -+endif () diff --git a/c683b1273104b19300a830889e7d827e727c43e9.patch b/c683b1273104b19300a830889e7d827e727c43e9.patch deleted file mode 100644 index b28c509..0000000 --- a/c683b1273104b19300a830889e7d827e727c43e9.patch +++ /dev/null @@ -1,22 +0,0 @@ -From c683b1273104b19300a830889e7d827e727c43e9 Mon Sep 17 00:00:00 2001 -From: topazus -Date: Sat, 20 May 2023 21:13:50 -0400 -Subject: [PATCH] Fix the installation location of manpages - ---- - CMakeLists.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index fa0488ba..104be96f 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -490,7 +490,7 @@ if (ZYDIS_BUILD_MAN) - "--output-dir=${CMAKE_CURRENT_BINARY_DIR}" - "${CMAKE_CURRENT_SOURCE_DIR}/man/${MAN_NAME}.ronn" - ) -- install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${MAN_NAME}" TYPE MAN) -+ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${MAN_NAME}" DESTINATION "${CMAKE_INSTALL_MANDIR}/man1") - endforeach() - add_custom_target(man ALL DEPENDS ${MAN_NAMES}) - endif () diff --git a/packit.yaml b/packit.yaml index fe27113..0687387 100644 --- a/packit.yaml +++ b/packit.yaml @@ -10,16 +10,16 @@ jobs: - job: pull_from_upstream trigger: release dist_git_branches: - - fedora-all + - fedora-rawhide - job: koji_build trigger: commit allowed_pr_authors: ["packit", "topazus"] allowed_committers: ["packit", "topazus"] dist_git_branches: - - fedora-all + - fedora-rawhide - job: bodhi_update trigger: commit dist_git_branches: - - fedora-all \ No newline at end of file + - fedora-rawhide diff --git a/sources b/sources index 6544ef9..ec75936 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (zydis-4.0.0.tar.gz) = 334284bccfb6ce61cc530fd479d6278db3e4df1fb52b311acd7d21558843c9bf14e74a199cd937041d434260b65c506c07ae1a37243d2240eb9443ae5e56e000 +SHA512 (zydis-5091440c2a1f963e00c6e6aceec7c4346e656fa4.tar.gz) = 8ee8a5c53828d3652be4a2b7ce7a25e557248828b053a371844faab5cf74ae7a34f5f432c768d593defcfc051333d5d24e742c3083051f711873d2ba39af4e21 diff --git a/zydis.spec b/zydis.spec index 58bbd3c..03ec8e1 100644 --- a/zydis.spec +++ b/zydis.spec @@ -1,26 +1,27 @@ Name: zydis -Version: 4.0.0 +Version: 5.0.0 + +%global forgeurl https://github.com/zyantific/zydis +%global commit 5091440c2a1f963e00c6e6aceec7c4346e656fa4 +%forgemeta + Release: %autorelease Summary: Fast and lightweight x86/x86-64 disassembler and code generation library License: MIT -URL: https://github.com/zyantific/zydis -Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz - -# fix the installation location of man pages -Patch0: https://github.com/zyantific/zydis/commit/c683b1273104b19300a830889e7d827e727c43e9.patch -# Add ZYDIS_BUILD_TESTS option and include tests in CMakeLists.txt -Patch1: https://github.com/zyantific/zydis/commit/a56a39f15efe64a41013ec142c028e6f72476232.patch +URL: %forgeurl +Source0: %forgesource ExcludeArch: s390x -BuildRequires: gcc-c++ -BuildRequires: cmake -BuildRequires: ninja-build -BuildRequires: zycore-c-devel +BuildRequires: gcc +BuildRequires: meson >= 1.3 +BuildRequires: pkgconfig(zycore) BuildRequires: doxygen # build man pages BuildRequires: rubygem-ronn-ng +# tests +BuildRequires: python3 %description Zydis is fast and lightweight x86/x86-64 disassembler and code generation @@ -59,34 +60,33 @@ Requires: %{name}%{?_isa} = %{version}-%{release} The %{name}-tools package contains tools about %{name}. %prep -%autosetup -p1 +%forgesetup %build -%cmake \ - -GNinja \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - -DZYAN_SYSTEM_ZYCORE=ON \ - -DZYDIS_BUILD_SHARED_LIB=ON \ - -DZYDIS_BUILD_MAN=ON \ - -DZYDIS_BUILD_TESTS=ON \ +%meson \ + -Dtools=enabled \ + -Dman=enabled \ + -Ddoc=enabled \ + -Dtests=enabled \ -%cmake_build +%meson_build %install -%cmake_install +%meson_install %check -%ctest +%ifnarch %{ix86} +%meson_test +%endif %files %license LICENSE -%{_libdir}/libZydis.so.4.0* +%{_libdir}/libZydis.so.5* %files devel %doc README.md %{_includedir}/Zydis/ -%dir %{_libdir}/cmake/zydis -%{_libdir}/cmake/zydis/*.cmake +%{_libdir}/pkgconfig/zydis.pc %{_libdir}/libZydis.so %files doc