summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2020-05-08 19:44:05 +0100
committerSergei Trofimovich <slyfox@gentoo.org>2020-05-08 19:44:05 +0100
commite877e3f6b965dc4605c987fc43af13df2642a460 (patch)
treeb2d27a8a207964b3a7883dde361012b5bee0c827 /dev-libs/capstone
parentsys-devel/binutils: 2.34 revbump (unkeyworded) for testing (diff)
downloadgentoo-e877e3f6b965dc4605c987fc43af13df2642a460.tar.gz
gentoo-e877e3f6b965dc4605c987fc43af13df2642a460.tar.bz2
gentoo-e877e3f6b965dc4605c987fc43af13df2642a460.zip
dev-libs/capstone: bump up to 4.0.2
Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Diffstat (limited to 'dev-libs/capstone')
-rw-r--r--dev-libs/capstone/Manifest1
-rw-r--r--dev-libs/capstone/capstone-4.0.2.ebuild92
2 files changed, 93 insertions, 0 deletions
diff --git a/dev-libs/capstone/Manifest b/dev-libs/capstone/Manifest
index 08f5b1652fee..fcbad2d319e2 100644
--- a/dev-libs/capstone/Manifest
+++ b/dev-libs/capstone/Manifest
@@ -1 +1,2 @@
DIST capstone-4.0.1.tar.gz 3434276 BLAKE2B 585e0ee19b76d96116c67b021bbe19fd01d8db600b565094ff71a01d8a87b1123a8c5e2f944f1551c411565d5a25dfbfbb3138ca220b1281044a31004002399e SHA512 43c52024065b41b45eff9423341db3f3d5163fa7aa01b360faa30437786740c8f2c34c36faa04dced5308e09d8bd78df3bad0ab9c06f98612169edb176f83c36
+DIST capstone-4.0.2.tar.gz 3439542 BLAKE2B 435729a8fef2dce6495635352101b3befe563c8404efdbb0dccabecbe2bded332221665bacdbcd9043dda72b652b6f29c0e1a548cefb8c64d5b6b9dc174ed3d9 SHA512 7f93534517307b737422a8825b66b2a1f3e1cca2049465d60ab12595940154aaf843ba40ed348fce58de58b990c19a0caef289060eb72898cb008a88c470970e
diff --git a/dev-libs/capstone/capstone-4.0.2.ebuild b/dev-libs/capstone/capstone-4.0.2.ebuild
new file mode 100644
index 000000000000..3f7e112a1071
--- /dev/null
+++ b/dev-libs/capstone/capstone-4.0.2.ebuild
@@ -0,0 +1,92 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DISTUTILS_OPTIONAL=1
+PYTHON_COMPAT=( python{3_6,3_7} )
+
+inherit distutils-r1 toolchain-funcs
+
+DESCRIPTION="disassembly/disassembler framework + bindings"
+HOMEPAGE="http://www.capstone-engine.org/"
+SRC_URI="https://github.com/aquynh/${PN}/archive/${PV/_rc/-rc}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0/4" # libcapstone.so.4
+KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+
+RESTRICT="!test? ( test )"
+
+IUSE="python test"
+RDEPEND="python? ( ${PYTHON_DEPS} )"
+DEPEND="${RDEPEND}
+ python? ( dev-python/setuptools[${PYTHON_USEDEP}] )
+"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-4.0-FLAGS.patch
+ "${FILESDIR}"/${PN}-4.0-no-fuzz-tests.patch
+)
+
+S=${WORKDIR}/${P/_rc/-rc}
+
+wrap_python() {
+ if use python; then
+ pushd bindings/python >/dev/null || die
+ distutils-r1_${1} "$@"
+ popd >/dev/null
+ fi
+}
+
+src_prepare() {
+ default
+
+ wrap_python ${FUNCNAME}
+}
+
+src_configure() {
+ {
+ cat <<-EOF
+ # Gentoo overrides:
+ # verbose build
+ V = 1
+ # toolchain
+ AR = $(tc-getAR)
+ CC = $(tc-getCC)
+ RANLIB = $(tc-getRANLIB)
+ # toolchain flags
+ CFLAGS = ${CFLAGS}
+ LDFLAGS = ${LDFLAGS}
+ # libs
+ LIBDIRARCH = $(get_libdir)
+ PREFIX = ${EPREFIX}/usr
+ EOF
+ } >> config.mk || die
+
+ if ! use test; then
+ # Don't build tests if not requested: bug #663006
+ sed -i tests/Makefile -e 's@all: $(BINARY)@all:@' || die
+ fi
+
+ wrap_python ${FUNCNAME}
+}
+
+src_compile() {
+ default
+
+ wrap_python ${FUNCNAME}
+}
+
+src_test() {
+ default
+
+ wrap_python ${FUNCNAME}
+}
+
+src_install() {
+ default
+
+ wrap_python ${FUNCNAME}
+}