commit:     79a480978db4efd2ea36d2e4cad65e0eb34e04ac
Author:     Mario Haustein <mario.haustein <AT> hrz <DOT> tu-chemnitz <DOT> de>
AuthorDate: Fri Oct  4 13:40:41 2024 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Sat Nov  2 12:45:59 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=79a48097

dev-libs/capstone: sync live

Signed-off-by: Mario Haustein <mario.haustein <AT> hrz.tu-chemnitz.de>
Closes: https://github.com/gentoo/gentoo/pull/38877
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 dev-libs/capstone/capstone-9999.ebuild | 25 ++++++++++++++-----------
 1 file changed, 14 insertions(+), 11 deletions(-)

diff --git a/dev-libs/capstone/capstone-9999.ebuild 
b/dev-libs/capstone/capstone-9999.ebuild
index ce469dd82485..8d6006b4688e 100644
--- a/dev-libs/capstone/capstone-9999.ebuild
+++ b/dev-libs/capstone/capstone-9999.ebuild
@@ -18,14 +18,19 @@ if [[ ${PV} == 9999 ]]; then
        EGIT_REPO_URI="https://github.com/capstone-engine/capstone.git";
        EGIT_REPO_BRANCH="next"
 else
-       MY_PV="${PV/_rc/-rc}"
+       MY_PV="${PV}"
+       MY_PV="${MY_PV/_alpha/-Alpha}"
+       MY_PV="${MY_PV/_beta/-Beta}"
+       MY_PV="${MY_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"
+       if [[ ${PV} != *_alpha* && ${PV} != *_beta* && ${PV} != *_rc* ]] ; then
+               KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv 
~x86"
+       fi
 fi
 
 LICENSE="BSD"
-SLOT="0/5" # libcapstone.so.5
+SLOT="0/6" # libcapstone.so.6
 
 IUSE="python static-libs test"
 RDEPEND="python? ( ${PYTHON_DEPS} )"
@@ -41,7 +46,7 @@ PATCHES=(
        # Currently "-Werror" is only added in the `next`-development branch, 
but
        # not merged into 5.* releases. Eventually this patch may be needed in 
the
        # version 5 release line. See bug #911481.
-       "${FILESDIR}/${P}-werror.patch"
+       "${FILESDIR}/${PN}-werror.patch"
 )
 
 if [[ ${PV} == *_rc* ]]; then
@@ -54,7 +59,7 @@ wrap_python() {
        shift
 
        if use python; then
-               pushd bindings/python >/dev/null || die
+               pushd "${S}/bindings/python" >/dev/null || die
                distutils-r1_${phase} "$@"
                popd >/dev/null || die
        fi
@@ -69,7 +74,8 @@ src_prepare() {
 
 src_configure() {
        local mycmakeargs=(
-               -DCAPSTONE_BUILD_TESTS="$(usex test)"
+               -DBUILD_SHARED_LIBS=true
+               -DCAPSTONE_BUILD_STATIC_RUNTIME=false
        )
        cmake_src_configure
 
@@ -92,12 +98,9 @@ src_install() {
        cmake_src_install
 
        wrap_python ${FUNCNAME}
-
-       if ! use static-libs ; then
-               find "${ED}" -name '*.a' -delete || die
-       fi
 }
 
 python_test() {
-       emake check
+       ./tests/test_all.py || die
+       ./tests/test_iter.py || die
 }

Reply via email to