diff --git a/app-exploits/ropper/ropper-9999.ebuild b/app-exploits/ropper/ropper-9999.ebuild index 0b62dcefe..cd2258143 100644 --- a/app-exploits/ropper/ropper-9999.ebuild +++ b/app-exploits/ropper/ropper-9999.ebuild @@ -1,9 +1,10 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 -PYTHON_COMPAT=( python3_{5,6} ) +DISTUTILS_USE_SETUPTOOLS=rdepend +PYTHON_COMPAT=( python3_{6,7,8} ) inherit distutils-r1 @@ -22,7 +23,7 @@ else # see more: # * https://github.com/gentoo/gentoo/pull/11828 # * https://bugs.gentoo.org/652440 - #KEYWORDS="~amd64 ~arm64 ~mips ~x86" + KEYWORDS="~amd64 ~arm64 ~mips ~x86" fi LICENSE="BSD" @@ -33,5 +34,4 @@ RDEPEND="${PYTHON_DEPS} !dev-libs/capstone-bindings dev-libs/keystone[python,${PYTHON_USEDEP}] dev-python/filebytes[${PYTHON_USEDEP}]" - DEPEND="${RDEPEND}" diff --git a/dev-libs/keystone/Manifest b/dev-libs/keystone/Manifest new file mode 100644 index 000000000..f661bedc4 --- /dev/null +++ b/dev-libs/keystone/Manifest @@ -0,0 +1 @@ +DIST keystone-0.9.1.tar.gz 4326151 BLAKE2B 2d41388f4beeff3c424386c77cb75eeca613c66f80e807035f709822f241ef74f64085260678772580cb82bcceda83b4b3c31b92393f8d70f24d54f77f7ba224 SHA512 3bd9c3793d5862a0a8628b52da381625e62445f661dbd5ed715723e7d9db01ce3f9586e5ca0a5cc71e8ceb6c912050f5c28e3ccd540e72c8abcfd2f0d1bbae17 diff --git a/dev-libs/keystone/keystone-0.9.1-r1.ebuild b/dev-libs/keystone/keystone-0.9.1-r1.ebuild new file mode 100644 index 000000000..ffd9eddc6 --- /dev/null +++ b/dev-libs/keystone/keystone-0.9.1-r1.ebuild @@ -0,0 +1,88 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +DISTUTILS_OPTIONAL=1 +CMAKE_MIN_VERSION=3.8.7 +PYTHON_COMPAT=( python3_{6,7,8} ) + +inherit cmake-utils distutils-r1 llvm + +DESCRIPTION="assembly/assembler framework + bindings" +HOMEPAGE="http://www.keystone-engine.org/" + +if [[ ${PV} == 9999* ]]; then + EGIT_REPO_URI="https://github.com/keystone-engine/keystone.git" + inherit git-r3 + KEYWORDS="" +else + SRC_URI="https://github.com/keystone-engine/keystone/archive/${PV/_rc/-rc}.tar.gz -> ${P/-rc/_rc}.tar.gz" + KEYWORDS="~amd64 ~arm ~x86" +fi + +LICENSE="GPL-2" +SLOT="0" + +# Keep in sync with llvm/CMakeLists.txt, subset of sys-devel/llvm +ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM BPF Hexagon Lanai Mips MSP430 + NVPTX PowerPC RISCV Sparc SystemZ WebAssembly X86 XCore ) +ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" ) +LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/?} + +IUSE="python ${ALL_LLVM_TARGETS[*]}" +RDEPEND=" + >=sys-devel/llvm-3.8:=[${LLVM_TARGET_USEDEPS// /,}] + ${PYTHON_DEPS} +" +DEPEND="${RDEPEND}" +REQUIRED_USE=" + ${PYTHON_REQUIRED_USE} + || ( ${ALL_LLVM_TARGETS[*]} ) +" + +S=${WORKDIR}/${P/_rc/-rc} + +CMAKE_BUILD_TYPE=RelWithDebInfo + +llvm_check_deps() { + has_version "sys-devel/llvm:${LLVM_SLOT}[${LLVM_TARGET_USEDEPS// /,}]" +} + +wrap_python() { + if use python; then + pushd bindings/python >/dev/null || die + distutils-r1_${EBUILD_PHASE_FUNC} "$@" + popd >/dev/null || die + fi +} + +src_prepare() { + default + cmake-utils_src_prepare + wrap_python +} + +src_configure() { + local libdir="$(get_libdir)" + local mycmakeargs=( + -DLLVM_LIBDIR_SUFFIX=${libdir#lib} + + -DBUILD_SHARED_LIBS=ON + -DLLVM_TARGETS_TO_BUILD="${LLVM_TARGETS// /;}" + -DLLVM_HOST_TRIPLE="${CHOST}" + ) + + cmake-utils_src_configure + wrap_python +} + +src_compile() { + cmake-utils_src_compile + wrap_python +} + +src_install() { + cmake-utils_src_install + wrap_python +} diff --git a/profiles/pentoo/arch/amd64/make.defaults b/profiles/pentoo/arch/amd64/make.defaults index 63d0b78c6..0e4878428 100644 --- a/profiles/pentoo/arch/amd64/make.defaults +++ b/profiles/pentoo/arch/amd64/make.defaults @@ -8,4 +8,7 @@ QEMU_USER_TARGETS="arm aarch64 i386 x86_64" UNICORN_TARGETS="arm aarch64 x86" +#keystone target +LLVM_TARGETS="X86" + VIDEO_CARDS="nvidia amdgpu nouveau fbdev glint intel i965 iris mach64 mga nv radeon radeonsi radeonhd savage sis tdfx vga via vmware voodoo apm chips cirrus cyrix epson i128 i740 imstt nsc rendition s3 s3virge siliconmotion" diff --git a/profiles/pentoo/arch/x86/make.defaults b/profiles/pentoo/arch/x86/make.defaults index dc65926bd..583698b41 100644 --- a/profiles/pentoo/arch/x86/make.defaults +++ b/profiles/pentoo/arch/x86/make.defaults @@ -10,4 +10,7 @@ QEMU_USER_TARGETS="arm i386" UNICORN_TARGETS="arm aarch64 x86" +#keystone target +LLVM_TARGETS="X86" + VIDEO_CARDS="amdgpu nouveau fbdev glint intel i965 iris mach64 mga nv radeon radeonsi radeonhd savage sis tdfx vga via vmware voodoo apm chips cirrus cyrix epson i128 i740 imstt nsc rendition s3 s3virge siliconmotion" diff --git a/profiles/pentoo/base/package.accept_keywords/dev-python b/profiles/pentoo/base/package.accept_keywords/dev-python index 67566d2d4..997139f5f 100644 --- a/profiles/pentoo/base/package.accept_keywords/dev-python +++ b/profiles/pentoo/base/package.accept_keywords/dev-python @@ -1,6 +1,9 @@ #Pentoo packages dev-python/cmake-converter +#required by app-exploits/ropper +dev-python/filebytes + ~dev-python/pyside2-5.14.1 ~dev-python/shiboken2-5.14.1 diff --git a/profiles/pentoo/base/package.accept_keywords/sys-devel b/profiles/pentoo/base/package.accept_keywords/sys-devel index ccc0a1aec..f44aa014d 100644 --- a/profiles/pentoo/base/package.accept_keywords/sys-devel +++ b/profiles/pentoo/base/package.accept_keywords/sys-devel @@ -1,6 +1,7 @@ ### Pentoo ### sys-devel/gdb-dashboard sys-devel/gcc-arm-none-eabi +sys-devel/gef sys-devel/pwndbg ### Gentoo ### diff --git a/profiles/pentoo/base/package.use/dev-libs b/profiles/pentoo/base/package.use/dev-libs index 4f0737779..9cf0bdeb5 100644 --- a/profiles/pentoo/base/package.use/dev-libs +++ b/profiles/pentoo/base/package.use/dev-libs @@ -28,3 +28,6 @@ dev-libs/boehm-gc threads #sys-apps/fwupd dev-libs/libjcat gpg pkcs7 + +#required by sys-devel/gef +dev-libs/keystone python diff --git a/sys-devel/gef/gef-99999999.ebuild b/sys-devel/gef/gef-99999999.ebuild index ea5af11b9..f41318b02 100644 --- a/sys-devel/gef/gef-99999999.ebuild +++ b/sys-devel/gef/gef-99999999.ebuild @@ -3,7 +3,7 @@ EAPI=7 -PYTHON_COMPAT=( python3_6 ) +PYTHON_COMPAT=( python3_{6,7,8} ) inherit eutils python-single-r1 @@ -23,7 +23,7 @@ else # see more: # * https://github.com/gentoo/gentoo/pull/11828 # * https://bugs.gentoo.org/652440 - #KEYWORDS="~amd64 ~x86" + KEYWORDS="~amd64 ~x86" fi LICENSE="MIT"