diff options
author | Sergei Trofimovich <slyfox@gentoo.org> | 2018-12-19 00:37:36 +0000 |
---|---|---|
committer | Sergei Trofimovich <slyfox@gentoo.org> | 2018-12-19 07:22:04 +0000 |
commit | e477d6aca1b5848044ed2f72fe6d78e7f5b966cd (patch) | |
tree | 2fda8479de185839b588998f2958adcacc956450 /dev-libs/capstone | |
parent | dev-ada/gps-bin: Maintainer ada@gentoo.org (diff) | |
download | gentoo-e477d6aca1b5848044ed2f72fe6d78e7f5b966cd.tar.gz gentoo-e477d6aca1b5848044ed2f72fe6d78e7f5b966cd.tar.bz2 gentoo-e477d6aca1b5848044ed2f72fe6d78e7f5b966cd.zip |
dev-libs/capstone: bump up to 4.0
Package-Manager: Portage-2.3.52, Repoman-2.3.12
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Diffstat (limited to 'dev-libs/capstone')
-rw-r--r-- | dev-libs/capstone/Manifest | 1 | ||||
-rw-r--r-- | dev-libs/capstone/capstone-4.0.ebuild | 85 | ||||
-rw-r--r-- | dev-libs/capstone/files/capstone-4.0-FLAGS.patch | 20 | ||||
-rw-r--r-- | dev-libs/capstone/files/capstone-4.0-double-DESTDIR.patch | 12 | ||||
-rw-r--r-- | dev-libs/capstone/files/capstone-4.0-no-fuzz-tests.patch | 10 |
5 files changed, 128 insertions, 0 deletions
diff --git a/dev-libs/capstone/Manifest b/dev-libs/capstone/Manifest index 4832b61e74a0..f3ffa497b093 100644 --- a/dev-libs/capstone/Manifest +++ b/dev-libs/capstone/Manifest @@ -1 +1,2 @@ DIST capstone-3.0.5_rc2.tar.gz 2829338 BLAKE2B dd35fc6c31ec008f78840410ea0d20de56ea8f01c3af1d28488beaceee7fa06ce03c8cd0f56d834eb738d23f528d240693586122b9c1e353365f7348fb6f8362 SHA512 31bafdb0b3183d0c054a4244cc135db9a3c3dc5cb2e2af706bfede0d53cca8cba81d74b74ef9a4adbfd6c79cc408864dd80b8203791e17bd6c98bb69ea4f6894 +DIST capstone-4.0.tar.gz 3411532 BLAKE2B 3e60a946e81f6d6ea88c314ad066e1855e2401cd9e8e61a67d48071b0fe4b705b2276b0d2b52d0979f472895a69cbe7609f6a2c60b79be668730f41ea98bf92e SHA512 5a10c67e88b246ad905364c62c56b4741df242c22f1b62bdea171e4d1d43e484f42f30b33e17324be6cff4c6fb10365528a9c3f4b2a5339ad24b0564fdd40bdb diff --git a/dev-libs/capstone/capstone-4.0.ebuild b/dev-libs/capstone/capstone-4.0.ebuild new file mode 100644 index 000000000000..78213838489a --- /dev/null +++ b/dev-libs/capstone/capstone-4.0.ebuild @@ -0,0 +1,85 @@ +# Copyright 1999-2018 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DISTUTILS_OPTIONAL=1 +PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} ) + +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" + +IUSE="python" +RDEPEND="python? ( ${PYTHON_DEPS} )" +DEPEND="${RDEPEND} + python? ( dev-python/setuptools[${PYTHON_USEDEP}] ) +" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +PATCHES=( + "${FILESDIR}"/${P}-FLAGS.patch + "${FILESDIR}"/${P}-no-fuzz-tests.patch + "${FILESDIR}"/${P}-double-DESTDIR.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) + EOF + } >> config.mk || die + + wrap_python ${FUNCNAME} +} + +src_compile() { + default + + wrap_python ${FUNCNAME} +} + +src_test() { + default + + wrap_python ${FUNCNAME} +} + +src_install() { + default + + wrap_python ${FUNCNAME} +} diff --git a/dev-libs/capstone/files/capstone-4.0-FLAGS.patch b/dev-libs/capstone/files/capstone-4.0-FLAGS.patch new file mode 100644 index 000000000000..66e855c0c34d --- /dev/null +++ b/dev-libs/capstone/files/capstone-4.0-FLAGS.patch @@ -0,0 +1,20 @@ +Drop -O3 and allow user to specify their optimizations. + +--- a/cstool/Makefile ++++ b/cstool/Makefile +@@ -1,13 +1,14 @@ + # Makefile for Cstool of Capstone Disassembly Engine + + include ../functions.mk ++include ../config.mk + + .PHONY: clean all + + LIBNAME = capstone + + CFLAGS += -I../include -I. +-LDFLAGS += -O3 -Wall -L.. -l$(LIBNAME) ++LDFLAGS += -Wall -L.. -l$(LIBNAME) + + TARGET = cstool + SOURCES := $(wildcard *.c) diff --git a/dev-libs/capstone/files/capstone-4.0-double-DESTDIR.patch b/dev-libs/capstone/files/capstone-4.0-double-DESTDIR.patch new file mode 100644 index 000000000000..46aca725e40c --- /dev/null +++ b/dev-libs/capstone/files/capstone-4.0-double-DESTDIR.patch @@ -0,0 +1,12 @@ +https://github.com/aquynh/capstone/issues/1311 + +Avoid double DESTDIR in install. +--- a/Makefile ++++ b/Makefile +@@ -75,4 +75,4 @@ LIBDIRARCH ?= lib + #LIBDIRARCH ?= lib64 +-LIBDIR = $(DESTDIR)$(PREFIX)/$(LIBDIRARCH) +-BINDIR = $(DESTDIR)$(PREFIX)/bin ++LIBDIR = $(PREFIX)/$(LIBDIRARCH) ++BINDIR = $(PREFIX)/bin + diff --git a/dev-libs/capstone/files/capstone-4.0-no-fuzz-tests.patch b/dev-libs/capstone/files/capstone-4.0-no-fuzz-tests.patch new file mode 100644 index 000000000000..ae412e9b233c --- /dev/null +++ b/dev-libs/capstone/files/capstone-4.0-no-fuzz-tests.patch @@ -0,0 +1,10 @@ +https://github.com/aquynh/capstone/issues/1310 + +fuzz tests are missing +--- a/Makefile ++++ b/Makefile +@@ -463,3 +463,3 @@ TESTS += test_systemz.static test_x86.static test_xcore.static test_m680x.static + TESTS += test_skipdata test_skipdata.static test_iter.static test_evm.static +-check: $(TESTS) fuzztest fuzzallcorp ++check: $(TESTS) fuzztest # fuzzallcorp + test_%: |