summaryrefslogtreecommitdiff
path: root/dev-libs/capstone
diff options
context:
space:
mode:
Diffstat (limited to 'dev-libs/capstone')
-rw-r--r--dev-libs/capstone/Manifest7
-rw-r--r--dev-libs/capstone/capstone-5.0.1.ebuild2
-rw-r--r--dev-libs/capstone/capstone-5.0.3.ebuild100
-rw-r--r--dev-libs/capstone/capstone-9999.ebuild4
-rw-r--r--dev-libs/capstone/files/capstone-5.0.2-tests.patch17
5 files changed, 125 insertions, 5 deletions
diff --git a/dev-libs/capstone/Manifest b/dev-libs/capstone/Manifest
index 20103e307b04..97e2fc5f6875 100644
--- a/dev-libs/capstone/Manifest
+++ b/dev-libs/capstone/Manifest
@@ -1,5 +1,8 @@
+AUX capstone-5.0.2-tests.patch 625 BLAKE2B 0e5b839d2beef6f9f971a5dbb08071e8398d3d406908a1570d193668637d349675ae80fd7d36e3fb26a802c5029896e2130fc553714159be1576d946d3ad02a3 SHA512 bdd42ff8764303b20acdd8a0d34e6f00d3f06aca6afa2aa3c48246934897aa5ab3a4bfee7a543c04594142075da00197ceec54de14bfdd22a45d9d672a8d5e27
AUX capstone-9999-werror.patch 791 BLAKE2B f8456764a5af797eb0c5ad9460a44c7621e96d0a673450ed7c529b9ba73d90ebd3221aefaee95f210e65c900471aebdc82e6224f9b0ed24d4b855e28b4042ece SHA512 708908bd93f6fad559075414ccd6449fa285afe18d92c377fffaddf475755249fda9cd66e5504379976f350beaf934e5cdd37e8697ff00cc24532372caed15f9
DIST capstone-5.0.1.tar.gz 7654195 BLAKE2B 83f6681d4c9c748df00daf59f7b33637ab72eee661261c22acae40a6db2def70bb6b5339d731244fdbae6f1e1b0b5b22bb6f60c1390a1bebceb97b3f810aedb0 SHA512 350aba77ce2d96b5c25764913591ba80e4497177ae0a8b2c820c6755ee8310848fbfc54e7ccac27fafc2dbc6778118ad92c53d1b5cb601d4fa146dec7d7e11e5
-EBUILD capstone-5.0.1.ebuild 1806 BLAKE2B 5209783a4f8c6a15d74fc4d2e5a4f94b34da343fd9a7c91dcb20d029bb8229f1029a6e6996c376b7c61697963af7a5e6e72ec02232a29672a1b47424249bc34c SHA512 88d37e7f2351856ebd90c94e7a4b10d61f10963d0ff8559dc8c9d0cd56208e8f14e4d9f1e69652f410d86689524c12f3ed0c757062e0fc8c8e2472232df1ce6b
-EBUILD capstone-9999.ebuild 2043 BLAKE2B 1f3402a4ec5367ee7a345a67bbf904dbe90caee87c9a877f52ac736844ee182c9af81c0d4eb80c94f3f17cb45a43bb92988d662a34ea313a57f0159d6fc14f64 SHA512 b74f47af67c46a46bc2aae10bc64049e7875f81205cdf8f5b4d3a962fefd8823d76841e25df2ff93be3001448db3606385a59daf1efa97179767fc4d34504e3c
+DIST capstone-5.0.3.tar.gz 7650875 BLAKE2B 3750964a95cbaba685dfb5cf511f12d18f2c157fb622a15c4615734987b8a49ffacf021457f36302606ccf9055e45a7fc56af000b8f09df467922896b431537c SHA512 2fd3194dd37065e6091d208c7670b12c0ca6872931eef794bd6b2dd624601c843e8ee6c5714eae0372e394e91a9bc1e4de7dfea6b1087542dd461226569101de
+EBUILD capstone-5.0.1.ebuild 1806 BLAKE2B 8a3acac99fc3ef1675a9ade8eba6c6500ad8170ee2ca33705cd7b7121a8570f9a431367d3a5f22074c7ea59849f009625ea83db88e359d0590445f69b544d449 SHA512 88b195ce9e437ac5b4941f8bfd4260dca875823adc6b9c17a4680272013d0a88611c49b5f3cb641bebda4091819aed5d8cf508987fc97fbfcda52ad4ebd1a528
+EBUILD capstone-5.0.3.ebuild 1861 BLAKE2B 1217e3c28e490fe791ec85f54f180a27f86054f4d365637c474aac8ccd3c27cbdde9541c85d84a8b27242cc62bc542502e6f5e4ffd78038bfbf69d9e755d5533 SHA512 642648297dc7c83a1fd8b9287f47cac98cf3d896141ba2a625994b9b35cd5650a88b8967222dd6eb0feb0eceaf640c5c9064876694559c1e98190185a3b67342
+EBUILD capstone-9999.ebuild 2050 BLAKE2B 33a900e65d33839aaf226499676938e39eb0976ac78f7d5e9d3ef7ebfdc9c9a51e69bb12b5ab11172d49cab61c7f4e0d2bf1885d499d224ad8b8f4bd56f15243 SHA512 70920575466f4aa4fca8b0df7a1630dc33a5f8fdeca9386ac25185ccfbe9b674e36ad15c8f7e03d8d61f959d38803264b3bd15a6c03474875edf647ab4e41ad9
MISC metadata.xml 484 BLAKE2B 32c39bf06443ce4ca18191a4c9626cf517d5bd4f837c179e6186a68a0053217bf41d61d2c4d46c9792b1974879d22b36e4a02fa461a1b085acf5c4406bde4891 SHA512 f06dcd3133982f72cf21c5bb3d9a34207d7083233b5e70856f6a1dab60ef361cf1432659af30ea6b90fcb38cfdaec49f0792623ef841e136bc33cb5e1c40d1cf
diff --git a/dev-libs/capstone/capstone-5.0.1.ebuild b/dev-libs/capstone/capstone-5.0.1.ebuild
index b16146234667..0f09dd8b9584 100644
--- a/dev-libs/capstone/capstone-5.0.1.ebuild
+++ b/dev-libs/capstone/capstone-5.0.1.ebuild
@@ -3,7 +3,7 @@
EAPI=8
-PYTHON_COMPAT=( python3_{10..12} )
+PYTHON_COMPAT=( python3_{10..13} )
DISTUTILS_EXT=1
DISTUTILS_OPTIONAL=1
DISTUTILS_USE_PEP517=setuptools
diff --git a/dev-libs/capstone/capstone-5.0.3.ebuild b/dev-libs/capstone/capstone-5.0.3.ebuild
new file mode 100644
index 000000000000..010a1343b07a
--- /dev/null
+++ b/dev-libs/capstone/capstone-5.0.3.ebuild
@@ -0,0 +1,100 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..13} )
+DISTUTILS_EXT=1
+DISTUTILS_OPTIONAL=1
+DISTUTILS_USE_PEP517=setuptools
+
+inherit cmake distutils-r1 toolchain-funcs
+
+DESCRIPTION="disassembly/disassembler framework + bindings"
+HOMEPAGE="https://www.capstone-engine.org/"
+
+if [[ ${PV} == 9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/capstone-engine/capstone.git"
+ EGIT_REPO_BRANCH="next"
+else
+ MY_PV="${PV/_rc/-rc}"
+ SRC_URI="https://github.com/capstone-engine/capstone/archive/${MY_PV}.tar.gz -> ${P}.tar.gz"
+ S="${WORKDIR}/${PN}-${MY_PV}"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~x86"
+fi
+
+LICENSE="BSD"
+SLOT="0/5" # libcapstone.so.5
+
+IUSE="python static-libs test"
+RDEPEND="python? ( ${PYTHON_DEPS} )"
+DEPEND="${RDEPEND}
+ python? ( dev-python/setuptools[${PYTHON_USEDEP}] )
+"
+BDEPEND="${DISTUTILS_DEPS}"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+RESTRICT="!test? ( test )"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-5.0.2-tests.patch"
+)
+
+if [[ ${PV} == *_rc* ]]; then
+ # Upstream doesn't flag release candidates (bug 858350)
+ QA_PKGCONFIG_VERSION=""
+fi
+
+wrap_python() {
+ local phase=$1
+ shift
+
+ if use python; then
+ pushd bindings/python >/dev/null || die
+ distutils-r1_${phase} "$@"
+ popd >/dev/null || die
+ fi
+}
+
+src_prepare() {
+ tc-export RANLIB
+ cmake_src_prepare
+
+ wrap_python ${FUNCNAME}
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DCAPSTONE_BUILD_TESTS="$(usex test)"
+ )
+ cmake_src_configure
+
+ wrap_python ${FUNCNAME}
+}
+
+src_compile() {
+ cmake_src_compile
+
+ wrap_python ${FUNCNAME}
+}
+
+src_test() {
+ cmake_src_test
+
+ wrap_python ${FUNCNAME}
+}
+
+src_install() {
+ cmake_src_install
+
+ wrap_python ${FUNCNAME}
+
+ if ! use static-libs ; then
+ find "${ED}" -name '*.a' -delete || die
+ fi
+}
+
+python_test() {
+ emake check
+}
diff --git a/dev-libs/capstone/capstone-9999.ebuild b/dev-libs/capstone/capstone-9999.ebuild
index ae151ecdb8fb..ce469dd82485 100644
--- a/dev-libs/capstone/capstone-9999.ebuild
+++ b/dev-libs/capstone/capstone-9999.ebuild
@@ -3,7 +3,7 @@
EAPI=8
-PYTHON_COMPAT=( python3_{10..12} )
+PYTHON_COMPAT=( python3_{10..13} )
DISTUTILS_EXT=1
DISTUTILS_OPTIONAL=1
DISTUTILS_USE_PEP517=setuptools
@@ -21,7 +21,7 @@ else
MY_PV="${PV/_rc/-rc}"
SRC_URI="https://github.com/capstone-engine/capstone/archive/${MY_PV}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}/${PN}-${MY_PV}"
- KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~x86"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~x86"
fi
LICENSE="BSD"
diff --git a/dev-libs/capstone/files/capstone-5.0.2-tests.patch b/dev-libs/capstone/files/capstone-5.0.2-tests.patch
new file mode 100644
index 000000000000..37ec431fb70b
--- /dev/null
+++ b/dev-libs/capstone/files/capstone-5.0.2-tests.patch
@@ -0,0 +1,17 @@
+From b77714b446e93a0ab997b125ef1fb3ad9bc4bb9b Mon Sep 17 00:00:00 2001
+From: Mario Haustein <mario.haustein@hrz.tu-chemnitz.de>
+Date: Wed, 14 Aug 2024 23:28:45 +0200
+Subject: [PATCH] Fix 'make check' for python tests
+Upstream: https://github.com/capstone-engine/capstone/pull/2439
+
+--- a/bindings/python/Makefile
++++ b/bindings/python/Makefile
+@@ -41,7 +41,7 @@ TESTS += test_lite.py test_iter.py test_customized_mnem.py test_alpha.py
+ check:
+ @for t in $(TESTS); do \
+ echo Check $$t ... ; \
+- ./$$t > /dev/null; \
++ ./tests/$$t > /dev/null; \
+ if [ $$? -eq 0 ]; then echo OK; else echo FAILED; exit 1; fi \
+ done
+