diff --git a/capstone-3.0.5-python.patch b/capstone-3.0.5-python.patch deleted file mode 100644 index ca09d66..0000000 --- a/capstone-3.0.5-python.patch +++ /dev/null @@ -1,158 +0,0 @@ -diff -ru capstone-db19431d4bb787019ca94d8f2a558f0ed46341a7.orig/bindings/java/Makefile capstone-db19431d4bb787019ca94d8f2a558f0ed46341a7.new/bindings/java/Makefile ---- capstone-db19431d4bb787019ca94d8f2a558f0ed46341a7.orig/bindings/java/Makefile 2018-07-18 18:17:10.000000000 +0200 -+++ capstone-db19431d4bb787019ca94d8f2a558f0ed46341a7.new/bindings/java/Makefile 2018-08-28 10:58:38.806217484 +0200 -@@ -20,6 +20,8 @@ - endif - endif - -+PYTHON2 = python -+ - CAPSTONE_JAVA = Capstone.java Arm_const.java Arm64_const.java Mips_const.java \ - X86_const.java Xcore_const.java Ppc_const.java Sparc_const.java\ - Sysz_const.java \ -@@ -47,7 +49,7 @@ - TestPpc.java TestSparc.java TestSystemz.java - - gen_const: -- cd ../ && python const_generator.py java -+ cd ../ && $(PYTHON2) const_generator.py java - - jna: - @if [ ! $(JNA) ]; then echo "*** Unable to find JNA ***"; exit 1; fi -diff -ru capstone-db19431d4bb787019ca94d8f2a558f0ed46341a7.orig/bindings/Makefile capstone-db19431d4bb787019ca94d8f2a558f0ed46341a7.new/bindings/Makefile ---- capstone-db19431d4bb787019ca94d8f2a558f0ed46341a7.orig/bindings/Makefile 2018-07-18 18:17:10.000000000 +0200 -+++ capstone-db19431d4bb787019ca94d8f2a558f0ed46341a7.new/bindings/Makefile 2018-08-28 11:01:51.152374258 +0200 -@@ -12,6 +12,8 @@ - TEST_X86 = $(TMPDIR)/test_x86 - TEST_XCORE = $(TMPDIR)/test_xcore - -+PYTHON2 = python -+ - .PHONY: all expected python java ocaml - - all: -@@ -39,15 +41,15 @@ - - python: FORCE - cd python && $(MAKE) -- python python/test.py > $(TEST)_o -- python python/test_arm.py > $(TEST_ARM)_o -- python python/test_arm64.py > $(TEST_ARM64)_o -- python python/test_mips.py > $(TEST_MIPS)_o -- python python/test_ppc.py > $(TEST_PPC)_o -- python python/test_sparc.py > $(TEST_SPARC)_o -- python python/test_systemz.py > $(TEST_SYSZ)_o -- python python/test_x86.py > $(TEST_X86)_o -- python python/test_xcore.py > $(TEST_XCORE)_o -+ $(PYTHON2) python/test.py > $(TEST)_o -+ $(PYTHON2) python/test_arm.py > $(TEST_ARM)_o -+ $(PYTHON2) python/test_arm64.py > $(TEST_ARM64)_o -+ $(PYTHON2) python/test_mips.py > $(TEST_MIPS)_o -+ $(PYTHON2) python/test_ppc.py > $(TEST_PPC)_o -+ $(PYTHON2) python/test_sparc.py > $(TEST_SPARC)_o -+ $(PYTHON2) python/test_systemz.py > $(TEST_SYSZ)_o -+ $(PYTHON2) python/test_x86.py > $(TEST_X86)_o -+ $(PYTHON2) python/test_xcore.py > $(TEST_XCORE)_o - $(MAKE) test_diff - - java: FORCE -diff -ru capstone-db19431d4bb787019ca94d8f2a558f0ed46341a7.orig/bindings/ocaml/Makefile capstone-db19431d4bb787019ca94d8f2a558f0ed46341a7.new/bindings/ocaml/Makefile ---- capstone-db19431d4bb787019ca94d8f2a558f0ed46341a7.orig/bindings/ocaml/Makefile 2018-07-18 18:17:10.000000000 +0200 -+++ capstone-db19431d4bb787019ca94d8f2a558f0ed46341a7.new/bindings/ocaml/Makefile 2018-08-28 10:58:06.166700040 +0200 -@@ -3,6 +3,7 @@ - - LIB = capstone - FLAGS = '-Wall -Wextra -Wwrite-strings' -+PYTHON2 = python - - all: arm_const.cmxa arm64_const.cmxa mips_const.cmxa ppc_const.cmxa sparc_const.cmxa sysz_const.cmxa x86_const.cmxa xcore_const.cmxa arm.cmxa arm64.cmxa mips.cmxa ppc.cmxa x86.cmxa sparc.cmxa systemz.cmxa xcore.cmxa capstone.cmxa test_basic.cmx test_detail.cmx test_x86.cmx test_arm.cmx test_arm64.cmx test_mips.cmx test_ppc.cmx test_sparc.cmx test_systemz.cmx test_xcore.cmx ocaml.o - ocamlopt -o test_basic -ccopt $(FLAGS) ocaml.o capstone.cmx test_basic.cmx -cclib -l$(LIB) -@@ -258,7 +259,7 @@ - rm -f *.[oa] *.so *.cm[ixoa] *.cmxa *.mli test_basic test_detail test_x86 test_arm test_arm64 test_mips test_ppc test_sparc test_systemz test_xcore - - gen_const: -- cd .. && python const_generator.py ocaml -+ cd .. && $(PYTHON2) const_generator.py ocaml - - TESTS = test_basic test_detail test_arm test_arm64 test_mips test_ppc - TESTS += test_sparc test_systemz test_x86 test_xcore -diff -ru capstone-db19431d4bb787019ca94d8f2a558f0ed46341a7.orig/bindings/python/Makefile capstone-db19431d4bb787019ca94d8f2a558f0ed46341a7.new/bindings/python/Makefile ---- capstone-db19431d4bb787019ca94d8f2a558f0ed46341a7.orig/bindings/python/Makefile 2018-07-18 18:17:10.000000000 +0200 -+++ capstone-db19431d4bb787019ca94d8f2a558f0ed46341a7.new/bindings/python/Makefile 2018-08-28 10:56:16.869315933 +0200 -@@ -1,60 +1,63 @@ -+PYTHON2 = python -+PYTHON3 = python3 -+ - .PHONY: gen_const install install3 install_cython sdist sdist3 bdist bdist3 clean check - - gen_const: -- cd .. && python const_generator.py python -+ cd .. && $(PYTHON2) const_generator.py python - - install: - rm -rf src/ - if test -n "${DESTDIR}"; then \ -- python setup.py build install --root="${DESTDIR}"; \ -+ $(PYTHON2) setup.py build install --root="${DESTDIR}"; \ - else \ -- python setup.py build install; \ -+ $(PYTHON2) setup.py build install; \ - fi - - install3: - rm -rf src/ - if test -n "${DESTDIR}"; then \ -- python3 setup.py build install --root="${DESTDIR}"; \ -+ $(PYTHON3) setup.py build install --root="${DESTDIR}"; \ - else \ -- python3 setup.py build install; \ -+ $(PYTHON3) setup.py build install; \ - fi - - # NOTE: Newer cython can be installed by: sudo pip install --upgrade cython - install_cython: - rm -rf src/ - if test -n "${DESTDIR}"; then \ -- python setup_cython.py build install --root="${DESTDIR}"; \ -+ $(PYTHON2) setup_cython.py build install --root="${DESTDIR}"; \ - else \ -- python setup_cython.py build install; \ -+ $(PYTHON2) setup_cython.py build install; \ - fi - - install3_cython: - rm -rf src/ - if test -n "${DESTDIR}"; then \ -- python3 setup_cython.py build install --root="${DESTDIR}"; \ -+ $(PYTHON3) setup_cython.py build install --root="${DESTDIR}"; \ - else \ -- python3 setup_cython.py build install; \ -+ $(PYTHON3) setup_cython.py build install; \ - fi - - # build & upload PyPi package with source code of the core - sdist: - rm -rf src/ dist/ -- python setup.py sdist register upload -+ $(PYTHON2) setup.py sdist register upload - - # build & upload PyPi package with source code of the core - sdist3: - rm -rf src/ dist/ -- python3 setup.py sdist register upload -+ $(PYTHON3) setup.py sdist register upload - - # build & upload PyPi package with prebuilt core - bdist: - rm -rf src/ dist/ -- python setup.py bdist_wheel register upload -+ $(PYTHON2) setup.py bdist_wheel register upload - - # build & upload PyPi package with prebuilt core - bdist3: - rm -rf src/ dist/ -- python3 setup.py bdist_wheel register upload -+ $(PYTHON3) setup.py bdist_wheel register upload - - clean: - rm -rf build/ src/ dist/ *.egg-info diff --git a/capstone-4.0.1-includedir.patch b/capstone-4.0.1-includedir.patch deleted file mode 100644 index 04385d4..0000000 --- a/capstone-4.0.1-includedir.patch +++ /dev/null @@ -1,31 +0,0 @@ -Fixed with 5.0.0 -From d36b7395e69c70a8d98f78f2bcb20a32bf9f3173 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Fri, 11 Jan 2019 13:48:11 +0000 -Subject: [PATCH] Fix include path in pkg-config for Makefile too (#1339). - -Commit 0a39b785d3 fixed the pkg-config include path when using cmake. -However it didn't fix it for the Makefile. This fixes the Makefile -path. - -Signed-off-by: Richard W.M. Jones ---- - Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Makefile b/Makefile -index 378f2fea..4a2c2d35 100644 ---- a/Makefile -+++ b/Makefile -@@ -514,7 +514,7 @@ define generate-pkgcfg - echo 'Description: Capstone disassembly engine' >> $(PKGCFGF) - echo 'Version: $(PKG_VERSION)' >> $(PKGCFGF) - echo 'libdir=$(LIBDIR)' >> $(PKGCFGF) -- echo 'includedir=$(INCDIR)' >> $(PKGCFGF) -+ echo 'includedir=$(INCDIR)/capstone' >> $(PKGCFGF) - echo 'archive=$${libdir}/libcapstone.a' >> $(PKGCFGF) - echo 'Libs: -L$${libdir} -lcapstone' >> $(PKGCFGF) - echo 'Cflags: -I$${includedir}' >> $(PKGCFGF) --- -2.20.1 - diff --git a/capstone-5.0.1-platform.patch b/capstone-5.0.1-platform.patch deleted file mode 100644 index 771f674..0000000 --- a/capstone-5.0.1-platform.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff -uNr capstone-5.0.orig/bindings/python/setup.py capstone-5.0/bindings/python/setup.py ---- capstone-5.0.orig/bindings/python/setup.py 2023-08-07 16:55:34.314825530 -0500 -+++ capstone-5.0/bindings/python/setup.py 2023-08-07 21:06:59.182376477 -0500 -@@ -201,15 +201,9 @@ - idx = sys.argv.index('bdist_wheel') + 1 - sys.argv.insert(idx, '--plat-name') - name = get_platform() -- if 'linux' in name: -- # linux_* platform tags are disallowed because the python ecosystem is fubar -- # linux builds should be built in the centos 5 vm for maximum compatibility -- # see https://github.com/pypa/manylinux -- # see also https://github.com/angr/angr-dev/blob/master/bdist.sh -- sys.argv.insert(idx + 1, 'manylinux1_' + platform.machine()) -- else: -- # https://www.python.org/dev/peps/pep-0425/ -- sys.argv.insert(idx + 1, name.replace('.', '_').replace('-', '_')) -+ pyversion = platform.python_version() -+ major_version, minor_version = map(int, pyversion.split('.')[:2]) -+ sys.argv.insert(idx + 1, name.replace('.', '_').replace('-', '_') + "_" + str(major_version) + str(minor_version)) - - setup( - provides=['capstone'], diff --git a/capstone.spec b/capstone.spec index 2ab3af6..3989a37 100644 --- a/capstone.spec +++ b/capstone.spec @@ -1,6 +1,6 @@ Name: capstone -Version: 5.0.1 -Release: 6%{?dist} +Version: 5.0.3 +Release: 1%{?dist} Summary: A lightweight multi-platform, multi-architecture disassembly framework License: BSD-3-Clause AND BSD-4-Clause AND APSL-2.0 AND NCSA AND MIT URL: http://www.capstone-engine.org/ @@ -28,15 +28,8 @@ Source0: https://github.com/%{gituser}/%{gitname}/archive/%{version}.tar. # Manpage for cstool is missing in the package, add one generated by help2man Source1: cstool.1 -# modified to remove the GH CI modifications from this patch -# Patch: https://patch-diff.githubusercontent.com/raw/capstone-engine/capstone/pull/2099.patch -# Patch0: https://github.com/capstone-engine/capstone/pull/2099.patch#/capstone-5.0.1-cibuildwheel.patch - -Patch0: capstone-5.0.1-platform.patch - # Ocaml binding is not using local path for the includes/links -Patch1: capstone-5.0.1-ocaml.patch - +Patch0: capstone-5.0.1-ocaml.patch # Build with python3 package by default %bcond_without python3 @@ -348,6 +341,9 @@ popd %changelog +* Wed Jan 01 2025 W. Michael Petullo - 5.0.3-1 +- Update to 5.0.3 + * Wed Jul 31 2024 Michal Ambroz - 5.0.1-6 - add static subpackage for static building with capstone