Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev-libs/capstone: drop 4.0.2-r2, various maintenance #36470

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion dev-libs/capstone/Manifest
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
DIST capstone-4.0.2.tar.gz 3439542 BLAKE2B 435729a8fef2dce6495635352101b3befe563c8404efdbb0dccabecbe2bded332221665bacdbcd9043dda72b652b6f29c0e1a548cefb8c64d5b6b9dc174ed3d9 SHA512 7f93534517307b737422a8825b66b2a1f3e1cca2049465d60ab12595940154aaf843ba40ed348fce58de58b990c19a0caef289060eb72898cb008a88c470970e
DIST capstone-5.0.1.tar.gz 7654195 BLAKE2B 83f6681d4c9c748df00daf59f7b33637ab72eee661261c22acae40a6db2def70bb6b5339d731244fdbae6f1e1b0b5b22bb6f60c1390a1bebceb97b3f810aedb0 SHA512 350aba77ce2d96b5c25764913591ba80e4497177ae0a8b2c820c6755ee8310848fbfc54e7ccac27fafc2dbc6778118ad92c53d1b5cb601d4fa146dec7d7e11e5
84 changes: 0 additions & 84 deletions dev-libs/capstone/capstone-4.0.2-r2.ebuild

This file was deleted.

6 changes: 5 additions & 1 deletion dev-libs/capstone/capstone-5.0.1.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ DEPEND="${RDEPEND}
BDEPEND="${DISTUTILS_DEPS}"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"

distutils_enable_tests setup.py
RESTRICT="!test? ( test )"

if [[ ${PV} == *_rc* ]]; then
# Upstream doesn't flag release candidates (bug 858350)
Expand Down Expand Up @@ -90,3 +90,7 @@ src_install() {
find "${ED}" -name '*.a' -delete || die
fi
}

python_test() {
emake check
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at the Makefile, this isn't going to work, as this target doesn't fail if tests fail.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't confuse Makefile with bindings/python/Makefile. The check target in the former one indeed discards all errors (but luckily the checks are executed through CMake as well):

check: $(TESTS)

test_%:
        ./tests/$@ > /dev/null && echo OK || echo FAILED

python_test is executed in bindings/python so the check target of the latter Makefile applies:

check:
        @for t in $(TESTS); do \
                echo Check $$t ... ; \
                ./$$t > /dev/null; \
                if [ $$? -eq 0 ]; then echo OK; else echo FAILED; exit 1; fi \
        done

This target fails if the first check fails.

}
14 changes: 9 additions & 5 deletions dev-libs/capstone/capstone-9999.ebuild
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 1999-2023 Gentoo Authors
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8
Expand Down Expand Up @@ -35,15 +35,15 @@ DEPEND="${RDEPEND}
BDEPEND="${DISTUTILS_DEPS}"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"

RESTRICT="!test? ( test )"

PATCHES=(
# Currently "-Werror" is only added in the `next`-development branch, but
# not merged into 5.* releases. Eventually this patch may be needed in
# version 5 releas line. See bug #911481.
# not merged into 5.* releases. Eventually this patch may be needed in the
# version 5 release line. See bug #911481.
"${FILESDIR}/${P}-werror.patch"
)

distutils_enable_tests setup.py

if [[ ${PV} == *_rc* ]]; then
# Upstream doesn't flag release candidates (bug 858350)
QA_PKGCONFIG_VERSION=""
Expand Down Expand Up @@ -97,3 +97,7 @@ src_install() {
find "${ED}" -name '*.a' -delete || die
fi
}

python_test() {
emake check
}
12 changes: 0 additions & 12 deletions dev-libs/capstone/files/capstone-4.0.2-libsuffix.patch

This file was deleted.

14 changes: 7 additions & 7 deletions dev-libs/capstone/files/capstone-9999-werror.patch
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ Bug: https://bugs.gentoo.org/911481
Upstream: https://github.com/capstone-engine/capstone/pull/2114
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -28,7 +28,7 @@ project(capstone
if (MSVC)
add_compile_options(/W1 /w14189)
else()
- add_compile_options(-Werror -Wformat -Wmissing-braces -Wunused-function -Warray-bounds -Wunused-variable -Wparentheses -Wint-in-bool-context)
+ add_compile_options(-Wformat -Wmissing-braces -Wunused-function -Warray-bounds -Wunused-variable -Wparentheses -Wint-in-bool-context)
endif()
@@ -25,7 +25,7 @@ project(capstone
VERSION 5.0
)

-set(UNIX_COMPILER_OPTIONS -Werror -Wall -Warray-bounds -Wshift-negative-value -Wreturn-type -Wformat -Wmissing-braces -Wunused-function -Warray-bounds -Wunused-variable -Wparentheses -Wint-in-bool-context -Wmisleading-indentation)
+set(UNIX_COMPILER_OPTIONS -Wall -Warray-bounds -Wshift-negative-value -Wreturn-type -Wformat -Wmissing-braces -Wunused-function -Warray-bounds -Wunused-variable -Wparentheses -Wint-in-bool-context -Wmisleading-indentation)

# maybe-unitialzied is only supported by newer versions of GCC.
# Unfortunately, it is pretty unreliable and reports wrong results.