capstone: 4.0 bump and cleanup

This commit is contained in:
blshkv 2018-12-19 08:01:43 +08:00
parent 8c29ebf1bb
commit ae4e1e896f
No known key found for this signature in database
GPG key ID: 273E3E90D1A6294F
8 changed files with 52 additions and 187 deletions

View file

@ -1,4 +1,2 @@
DIST capstone-3.0.4.tar.gz 2800818 BLAKE2B 012624d421ed54088733e9aaca2f5c1bdda7e9777dabe420cbfda1331fe9a9499b692ec3add2f73479d17d7d8fd1c6e463b5153da54eb6215609c97bce00672e SHA512 a5c29e7c559b5391d6a4ec9a7f766699ea6d321aa2f1fc57fdcec893107fa3ef2f5f6323629971c1129f1ca087df4f3ad03d0a8234d2eae368c8ccfec04dbf4d
DIST capstone-3.0.5.tar.gz 2886717 BLAKE2B db748f61bade4b762c91d3b72ef2c843964f81e68594f97a19d0938a5b2699697e29d9f38a4bd2629dd6e409afa365b53d5f066028b854d2d18c071e4d2a59a3 SHA512 4d953dd34866046afd4c8896c307f8fdd514ea1331720cb643a6b7095666dbecf6a16264c15c9883a6ed5e06d1332c1e52c5a23bd9dc3cc6493592bc9636bd33
DIST capstone-4.0_alpha5.tar.gz 3263242 BLAKE2B b25c9699c973acccdcf58f656c720382f71c642c74420af830a74f36fcd5831221ee9dcfdbb94736219142f1d3829fc0c2bdbc55b9e0d24a5f9ec554220d179f SHA512 c218f976ad0d26dc38553267695b9b196156d76f046330446b2ea66161215bb6bd79e086f29c023d01664e8f6371cc4d3a3413c246913381bf3de01a7a3b76c0
DIST capstone-4.0_p20180511.zip 3621059 BLAKE2B 979d6abb89ce58aec11ba6a02ba087d40c3df87f21168265786ad120d8c19c11cf587874e856c86146a178bb52039fdcf685c6d8bc2f12fd28867ee4d0c18854 SHA512 5d73f5d968684e634c009c5e42c35459193b52aa9bef4e938195aede56346f5cf09e496f0eb3cbc93a06d3302116e90ffa4e28476c9212fb330e4f25fbd686e9
DIST capstone-4.0.tar.gz 3411532 BLAKE2B 3e60a946e81f6d6ea88c314ad066e1855e2401cd9e8e61a67d48071b0fe4b705b2276b0d2b52d0979f472895a69cbe7609f6a2c60b79be668730f41ea98bf92e SHA512 5a10c67e88b246ad905364c62c56b4741df242c22f1b62bdea171e4d1d43e484f42f30b33e17324be6cff4c6fb10365528a9c3f4b2a5339ad24b0564fdd40bdb

View file

@ -1,40 +0,0 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
inherit multilib toolchain-funcs
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/3" # libcapstone.so.3
KEYWORDS="~amd64 ~arm ~x86"
IUSE="python"
PDEPEND="python? ( >=dev-python/capstone-python-${PV} )"
RDEPEND=""
DEPEND="${RDEPEND}"
#TODO: add java and ocaml bindings
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
}

View file

@ -0,0 +1,50 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
#inherit multilib toolchain-funcs
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-python/capstone-python-${PV} )"
RDEPEND=""
DEPEND="${RDEPEND}"
#TODO: add java and ocaml bindings
PATCHES=(
# "${FILESDIR}/capstone-calloc.patch"
# "${FILESDIR}/fix-m68k-oob.patch"
# "${FILESDIR}/fix-underflow-tms.patch"
"${FILESDIR}/fix-x86-16.patch"
"${FILESDIR}/sparc-crash.patch"
"${FILESDIR}/sstream-null.patch"
)
#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
#}

View file

@ -1,48 +0,0 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
inherit multilib toolchain-funcs
MY_PV="${PV//_/-}"
DESCRIPTION="disassembly/disassembler framework + bindings"
HOMEPAGE="http://www.capstone-engine.org/"
SRC_URI="https://github.com/aquynh/${PN}/archive/${MY_PV}.tar.gz -> ${P}.tar.gz"
LICENSE="BSD"
SLOT="0/3" # libcapstone.so.3
KEYWORDS="~amd64 ~arm ~x86"
IUSE="python"
PDEPEND="python? ( >=dev-python/capstone-python-${PV} )"
RDEPEND=""
DEPEND="${RDEPEND}"
#TODO: add java and ocaml bindings
S="${WORKDIR}/${PN}-${MY_PV}"
PATCHES=(
"${FILESDIR}/pull939.patch"
)
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
}

View file

@ -1,53 +0,0 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
inherit multilib toolchain-funcs
DESCRIPTION="disassembly/disassembler framework + bindings"
HOMEPAGE="http://www.capstone-engine.org/"
MY_COMMIT="37569a6874c8547b349a80823adda9284499fe80"
SRC_URI="https://github.com/aquynh/${PN}/archive/${MY_COMMIT}.zip -> ${P}.zip"
LICENSE="BSD"
SLOT="0/3" # libcapstone.so.3
KEYWORDS="~amd64 ~arm ~x86"
IUSE="python"
PDEPEND="python? ( =dev-python/capstone-python-4.0* )"
RDEPEND=""
DEPEND="${RDEPEND}"
#TODO: add java and ocaml bindings
PATCHES=(
"${FILESDIR}/capstone-calloc.patch"
"${FILESDIR}/fix-m68k-oob.patch"
"${FILESDIR}/fix-underflow-tms.patch"
"${FILESDIR}/fix-x86-16.patch"
"${FILESDIR}/sparc-crash.patch"
"${FILESDIR}/sstream-null.patch"
)
S="${WORKDIR}/${PN}-${MY_COMMIT}"
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
}

View file

@ -1,2 +1,2 @@
DIST capstone-4.0-alpha5.tar.gz 3263242 BLAKE2B b25c9699c973acccdcf58f656c720382f71c642c74420af830a74f36fcd5831221ee9dcfdbb94736219142f1d3829fc0c2bdbc55b9e0d24a5f9ec554220d179f SHA512 c218f976ad0d26dc38553267695b9b196156d76f046330446b2ea66161215bb6bd79e086f29c023d01664e8f6371cc4d3a3413c246913381bf3de01a7a3b76c0
DIST capstone-4.0.tar.gz 3411532 BLAKE2B 3e60a946e81f6d6ea88c314ad066e1855e2401cd9e8e61a67d48071b0fe4b705b2276b0d2b52d0979f472895a69cbe7609f6a2c60b79be668730f41ea98bf92e SHA512 5a10c67e88b246ad905364c62c56b4741df242c22f1b62bdea171e4d1d43e484f42f30b33e17324be6cff4c6fb10365528a9c3f4b2a5339ad24b0564fdd40bdb
DIST capstone-python-3.0.4.tar.gz 2800818 BLAKE2B 012624d421ed54088733e9aaca2f5c1bdda7e9777dabe420cbfda1331fe9a9499b692ec3add2f73479d17d7d8fd1c6e463b5153da54eb6215609c97bce00672e SHA512 a5c29e7c559b5391d6a4ec9a7f766699ea6d321aa2f1fc57fdcec893107fa3ef2f5f6323629971c1129f1ca087df4f3ad03d0a8234d2eae368c8ccfec04dbf4d

View file

@ -1,42 +0,0 @@
diff -urN capstone-2.1.2.orig/bindings/python/setup.py capstone-2.1.2/bindings/python/setup.py
--- capstone-2.1.2.orig/bindings/python/setup.py 2014-04-01 10:22:54.000000000 +0800
+++ capstone-2.1.2/bindings/python/setup.py 2014-04-10 09:07:21.023071179 +0800
@@ -4,17 +4,6 @@
VERSION = '2.1'
-# clean package directory first
-import os.path, shutil, sys
-for f in sys.path:
- if f.endswith('packages'):
- pkgdir = os.path.join(f, 'capstone')
- #print(pkgdir)
- try:
- shutil.rmtree(pkgdir)
- except:
- pass
-
setup(
provides = ['capstone'],
packages = ['capstone'],
diff -urN capstone-2.1.2.orig/bindings/python/setup_cython.py capstone-2.1.2/bindings/python/setup_cython.py
--- capstone-2.1.2.orig/bindings/python/setup_cython.py 2014-04-01 10:22:54.000000000 +0800
+++ capstone-2.1.2/bindings/python/setup_cython.py 2014-04-10 09:10:03.838082455 +0800
@@ -21,17 +21,6 @@
Extension("capstone.x86_const", ["pyx/x86_const.pyx"], extra_compile_args=compile_args)
]
-# clean package directory first
-import os.path, shutil, sys
-for f in sys.path:
- if f.endswith('packages'):
- pkgdir = os.path.join(f, 'capstone')
- #print(pkgdir)
- try:
- shutil.rmtree(pkgdir)
- except:
- pass
-
setup(
provides = ['capstone'],
package_dir = {'capstone' : 'pyx'},