From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 4D1C1138334 for ; Wed, 19 Dec 2018 07:22:26 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 260A7E0A07; Wed, 19 Dec 2018 07:22:25 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id D62A0E0A07 for ; Wed, 19 Dec 2018 07:22:24 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 71E21335C39 for ; Wed, 19 Dec 2018 07:22:19 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id D734C42F for ; Wed, 19 Dec 2018 07:22:17 +0000 (UTC) From: "Sergei Trofimovich" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sergei Trofimovich" Message-ID: <1545204124.e477d6aca1b5848044ed2f72fe6d78e7f5b966cd.slyfox@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/capstone/, dev-libs/capstone/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-libs/capstone/Manifest dev-libs/capstone/capstone-4.0.ebuild dev-libs/capstone/files/capstone-4.0-FLAGS.patch dev-libs/capstone/files/capstone-4.0-double-DESTDIR.patch dev-libs/capstone/files/capstone-4.0-no-fuzz-tests.patch X-VCS-Directories: dev-libs/capstone/ dev-libs/capstone/files/ X-VCS-Committer: slyfox X-VCS-Committer-Name: Sergei Trofimovich X-VCS-Revision: e477d6aca1b5848044ed2f72fe6d78e7f5b966cd X-VCS-Branch: master Date: Wed, 19 Dec 2018 07:22:17 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: d4c2fd73-d61e-4e08-8414-91b4eb20efe6 X-Archives-Hash: 7d9e12b594476df76747953df5aa7990 commit: e477d6aca1b5848044ed2f72fe6d78e7f5b966cd Author: Sergei Trofimovich gentoo org> AuthorDate: Wed Dec 19 00:37:36 2018 +0000 Commit: Sergei Trofimovich gentoo org> CommitDate: Wed Dec 19 07:22:04 2018 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e477d6ac dev-libs/capstone: bump up to 4.0 Package-Manager: Portage-2.3.52, Repoman-2.3.12 Signed-off-by: Sergei Trofimovich gentoo.org> dev-libs/capstone/Manifest | 1 + dev-libs/capstone/capstone-4.0.ebuild | 85 ++++++++++++++++++++++ dev-libs/capstone/files/capstone-4.0-FLAGS.patch | 20 +++++ .../files/capstone-4.0-double-DESTDIR.patch | 12 +++ .../files/capstone-4.0-no-fuzz-tests.patch | 10 +++ 5 files changed, 128 insertions(+) diff --git a/dev-libs/capstone/Manifest b/dev-libs/capstone/Manifest index 4832b61e74a..f3ffa497b09 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 00000000000..78213838489 --- /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 00000000000..66e855c0c34 --- /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 00000000000..46aca725e40 --- /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 00000000000..ae412e9b233 --- /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_%: