mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-24 18:58:08 -07:00
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>
This commit is contained in:
@@ -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
|
||||
|
||||
85
dev-libs/capstone/capstone-4.0.ebuild
Normal file
85
dev-libs/capstone/capstone-4.0.ebuild
Normal file
@@ -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}
|
||||
}
|
||||
20
dev-libs/capstone/files/capstone-4.0-FLAGS.patch
Normal file
20
dev-libs/capstone/files/capstone-4.0-FLAGS.patch
Normal file
@@ -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)
|
||||
12
dev-libs/capstone/files/capstone-4.0-double-DESTDIR.patch
Normal file
12
dev-libs/capstone/files/capstone-4.0-double-DESTDIR.patch
Normal file
@@ -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
|
||||
|
||||
10
dev-libs/capstone/files/capstone-4.0-no-fuzz-tests.patch
Normal file
10
dev-libs/capstone/files/capstone-4.0-no-fuzz-tests.patch
Normal file
@@ -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_%:
|
||||
Reference in New Issue
Block a user