diff options
author | Pierre-Olivier Mercier <nemunaire@nemunai.re> | 2017-09-01 08:30:46 +0200 |
---|---|---|
committer | Patrice Clement <monsieurp@gentoo.org> | 2017-12-13 10:03:15 +0100 |
commit | f3fa2458bc070753209d02466378843385e01cee (patch) | |
tree | 5372f937045ed1016ea422c377b27d80a3c37760 /dev-libs/keystone/keystone-9999.ebuild | |
parent | dev-perl/Nmap-Parser: Bump to version 1.360.0 (diff) | |
download | gentoo-f3fa2458bc070753209d02466378843385e01cee.tar.gz gentoo-f3fa2458bc070753209d02466378843385e01cee.tar.bz2 gentoo-f3fa2458bc070753209d02466378843385e01cee.zip |
dev-libs/keystone: new package.
Keystone is a lightweight multi-platform, multi-architecture assembler
framework.
Package-Manager: Portage-2.3.6, Repoman-2.3.1
Closes: https://github.com/gentoo/gentoo/pull/5577
Diffstat (limited to 'dev-libs/keystone/keystone-9999.ebuild')
-rw-r--r-- | dev-libs/keystone/keystone-9999.ebuild | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/dev-libs/keystone/keystone-9999.ebuild b/dev-libs/keystone/keystone-9999.ebuild new file mode 100644 index 000000000000..f3f700fb6607 --- /dev/null +++ b/dev-libs/keystone/keystone-9999.ebuild @@ -0,0 +1,81 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +DISTUTILS_OPTIONAL=1 +CMAKE_MIN_VERSION=3.8.7 +PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} ) + +inherit cmake-utils distutils-r1 + +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}.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 ARM Hexagon Mips PowerPC Sparc SystemZ X86 ) +ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" ) +LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/?} + +IUSE="python ${ALL_LLVM_TARGETS[*]}" +RDEPEND="sys-devel/llvm:=[${LLVM_TARGET_USEDEPS// /,}] + ${PYTHON_DEPS} +" +DEPEND="${RDEPEND}" +REQUIRED_USE=" + ${PYTHON_REQUIRED_USE} + || ( ${ALL_LLVM_TARGETS[*]} ) +" + +S=${WORKDIR}/${P/_rc/-rc} + +CMAKE_BUILD_TYPE=RelWithDebInfo + +wrap_python() { + if use python; then + pushd bindings/python >/dev/null || die + distutils-r1_${1} "$@" + popd >/dev/null || die + fi +} + +src_prepare() { + default + cmake-utils_src_prepare + wrap_python ${FUNCNAME} +} + +src_configure() { + 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 ${FUNCNAME} +} + +src_compile() { + cmake-utils_src_compile + wrap_python ${FUNCNAME} +} + +src_install() { + cmake-utils_src_install + wrap_python ${FUNCNAME} +} |