mirror of
https://github.com/pentoo/pentoo-overlay
synced 2026-04-17 20:30:58 +02:00
capstone: sync with Gentoo
This commit is contained in:
parent
06f2a25572
commit
7dc2dc27da
6 changed files with 65 additions and 26 deletions
|
|
@ -6,6 +6,7 @@ EAPI=7
|
|||
MY_PV="${PV//_/-}"
|
||||
MY_P=capstone-"${MY_PV}"
|
||||
|
||||
DISTUTILS_OPTIONAL=1
|
||||
PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
|
||||
inherit eutils multilib distutils-r1
|
||||
|
||||
|
|
@ -15,7 +16,7 @@ SRC_URI="https://github.com/aquynh/capstone/archive/${MY_PV}.tar.gz -> ${MY_P}.t
|
|||
LICENSE="BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm ~x86"
|
||||
#TODO: add java and ocaml bindings, make python optional
|
||||
#TODO: add java, ocaml, PowerShell, VB6, C#, Go, Ruby, NodeJS, C++ & Vala
|
||||
IUSE="+python cython"
|
||||
|
||||
RDEPEND="python? ( ${PYTHON_DEPS} )
|
||||
|
|
|
|||
|
|
@ -1,25 +0,0 @@
|
|||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit cmake-utils
|
||||
|
||||
DESCRIPTION="disassembly/disassembler framework + bindings"
|
||||
HOMEPAGE="http://www.capstone-engine.org/"
|
||||
SRC_URI="https://github.com/aquynh/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0/4" # libcapstone.so.4
|
||||
KEYWORDS="~amd64 ~arm ~x86"
|
||||
IUSE="python"
|
||||
|
||||
PDEPEND="python? ( >=dev-libs/capstone-bindings-${PV} )"
|
||||
RDEPEND=""
|
||||
DEPEND="${RDEPEND}"
|
||||
#TODO: add java and ocaml bindings
|
||||
|
||||
src_prepare() {
|
||||
eapply ${FILESDIR}/capstone-cmake.patch
|
||||
cmake-utils_src_prepare
|
||||
}
|
||||
33
dev-libs/capstone/capstone-4.0.1-r2.ebuild
Normal file
33
dev-libs/capstone/capstone-4.0.1-r2.ebuild
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit cmake-utils
|
||||
|
||||
DESCRIPTION="disassembly/disassembler framework + bindings"
|
||||
HOMEPAGE="http://www.capstone-engine.org/"
|
||||
SRC_URI="https://github.com/aquynh/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0/4" # libcapstone.so.4
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~x86"
|
||||
#keep python flag for compatibility with Gentoo
|
||||
IUSE="python test"
|
||||
|
||||
PDEPEND=">=dev-libs/capstone-bindings-${PV}[python?]"
|
||||
RDEPEND=""
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-4.0-cmake.patch
|
||||
"${FILESDIR}"/${PN}-4.0-FLAGS.patch
|
||||
"${FILESDIR}"/${PN}-4.0-no-fuzz-tests.patch
|
||||
)
|
||||
|
||||
src_configure() {
|
||||
if ! use test; then
|
||||
# Don't build tests if not requested: bug #663006
|
||||
sed -i tests/Makefile -e 's@all: $(BINARY)@all:@' || die
|
||||
fi
|
||||
}
|
||||
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)
|
||||
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_%:
|
||||
Loading…
Reference in a new issue