diff options
Diffstat (limited to 'dev-libs/keystone')
-rw-r--r-- | dev-libs/keystone/Manifest | 3 | ||||
-rw-r--r-- | dev-libs/keystone/keystone-0.9.2-r1.ebuild | 84 | ||||
-rw-r--r-- | dev-libs/keystone/keystone-9999.ebuild | 10 |
3 files changed, 91 insertions, 6 deletions
diff --git a/dev-libs/keystone/Manifest b/dev-libs/keystone/Manifest index 6ba03a1449fb..2e4aedc6ba2a 100644 --- a/dev-libs/keystone/Manifest +++ b/dev-libs/keystone/Manifest @@ -1,4 +1,5 @@ DIST keystone-0.9.2.tar.gz 4433222 BLAKE2B 5654ae6a66ccf6832fbdbb8c1083a2318e413bb833a0fadc4e1374f0de601e3dad9f354b1dec92d9a944621923458e432510299c1b55579ac9bb6b6e90a818de SHA512 5d4dd30410410bc7848e75a2e31e8ecef6241ad25e21963aa7a07bbea21d95b75e235c80573129014102684c9647710ace3c0776a8401844d7e4b45cab7bd04b +EBUILD keystone-0.9.2-r1.ebuild 1876 BLAKE2B 7fd92cfbe29c99791a6e48cb44692dc2d950c0497ce2ef68d49563eee9a6f5eaa268d9fd2dc6988e2188546475f7647b1c4633c80b0faf1a916ff333a12580a9 SHA512 83a26421a5a6e87d77015d082c8e81bc9ddc91bd795814415e04e47a3f53c6aa2e25d676c7e1d0bc387899875155114a83110e2b8f608c7a9b40f7875e34fe94 EBUILD keystone-0.9.2.ebuild 1874 BLAKE2B 8442127195f6743206a934710a65490bf59606ce5c1ffcfbe3c556e07c77bdcdd82f552a83add6fc9ba8f2aef51d7853c95959737f710f3e2c0896976c824b9d SHA512 a34b154e207ef7a644f6bd9bfefaec165668fd6d8e092cccd3db05a693884aa1941098db9ed0fe9e0e8d639fa1e2cdb196de56685f5cb8a83957a5cdafdc4d36 -EBUILD keystone-9999.ebuild 1874 BLAKE2B 8442127195f6743206a934710a65490bf59606ce5c1ffcfbe3c556e07c77bdcdd82f552a83add6fc9ba8f2aef51d7853c95959737f710f3e2c0896976c824b9d SHA512 a34b154e207ef7a644f6bd9bfefaec165668fd6d8e092cccd3db05a693884aa1941098db9ed0fe9e0e8d639fa1e2cdb196de56685f5cb8a83957a5cdafdc4d36 +EBUILD keystone-9999.ebuild 1876 BLAKE2B 7fd92cfbe29c99791a6e48cb44692dc2d950c0497ce2ef68d49563eee9a6f5eaa268d9fd2dc6988e2188546475f7647b1c4633c80b0faf1a916ff333a12580a9 SHA512 83a26421a5a6e87d77015d082c8e81bc9ddc91bd795814415e04e47a3f53c6aa2e25d676c7e1d0bc387899875155114a83110e2b8f608c7a9b40f7875e34fe94 MISC metadata.xml 257 BLAKE2B 76fe53d3c6c9b7020dac2713ef1617ad24c1fedd8029d5ba29598d2bde4d992f3e6bbf5055ac58176ccd6b9650f28c2702830ba9bc30d756cfffc35696d9f006 SHA512 73aac59c45a34e5709ce6efb1bf342b6309ffde68d632db53d83fe7da0d05e06fa43d74a6b90e5771aa7262d83531768f0a0da431a4c86d54ec05d5fe2383c4d diff --git a/dev-libs/keystone/keystone-0.9.2-r1.ebuild b/dev-libs/keystone/keystone-0.9.2-r1.ebuild new file mode 100644 index 000000000000..c0221f1ff7a7 --- /dev/null +++ b/dev-libs/keystone/keystone-0.9.2-r1.ebuild @@ -0,0 +1,84 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +LLVM_MAX_SLOT=14 +DISTUTILS_OPTIONAL=1 +PYTHON_COMPAT=( python3_{8,9,10} ) + +inherit cmake distutils-r1 llvm + +DESCRIPTION="assembly/assembler framework + bindings" +HOMEPAGE="https://www.keystone-engine.org/" + +if [[ ${PV} == 9999* ]]; then + EGIT_REPO_URI="https://github.com/keystone-engine/keystone.git" + inherit git-r3 +else + SRC_URI="https://github.com/keystone-engine/keystone/archive/${PV/_rc/-rc}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~arm ~ppc64 ~x86" +fi +S="${WORKDIR}"/${P/_rc/-rc} + +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_MAX_SLOT} + 1)):=[${LLVM_TARGET_USEDEPS// /,}] + python? ( ${PYTHON_DEPS} ) +" +DEPEND="${RDEPEND}" + +REQUIRED_USE=" + || ( ${ALL_LLVM_TARGETS[*]} ) + python? ( ${PYTHON_REQUIRED_USE} ) +" + +wrap_python() { + if use python; then + pushd bindings/python >/dev/null || die + distutils-r1_${1} "$@" + popd >/dev/null || die + fi +} + +src_prepare() { + default + + sed -i '/NOT uppercase_CMAKE_BUILD_TYPE MATCHES/ s/DEBUG/GENTOO|DEBUG/' \ + llvm/CMakeLists.txt || die + cmake_src_prepare + wrap_python ${FUNCNAME} +} + +src_configure() { + local libdir="$(get_libdir)" + local mycmakeargs=( + -DCMAKE_CONFIGURATION_TYPES="Gentoo" + -DLLVM_LIBDIR_SUFFIX=${libdir#lib} + -DBUILD_SHARED_LIBS=ON + -DLLVM_TARGETS_TO_BUILD="${LLVM_TARGETS// /;}" + -DLLVM_HOST_TRIPLE="${CHOST}" + ) + + cmake_src_configure + wrap_python ${FUNCNAME} +} + +src_compile() { + cmake_src_compile + wrap_python ${FUNCNAME} +} + +src_install() { + cmake_src_install + wrap_python ${FUNCNAME} +} diff --git a/dev-libs/keystone/keystone-9999.ebuild b/dev-libs/keystone/keystone-9999.ebuild index 7ef25cfa1b43..c0221f1ff7a7 100644 --- a/dev-libs/keystone/keystone-9999.ebuild +++ b/dev-libs/keystone/keystone-9999.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 -LLVM_MAX_SLOT=12 +LLVM_MAX_SLOT=14 DISTUTILS_OPTIONAL=1 PYTHON_COMPAT=( python3_{8,9,10} ) @@ -19,6 +19,7 @@ else SRC_URI="https://github.com/keystone-engine/keystone/archive/${PV/_rc/-rc}.tar.gz -> ${P}.tar.gz" KEYWORDS="~amd64 ~arm ~ppc64 ~x86" fi +S="${WORKDIR}"/${P/_rc/-rc} LICENSE="GPL-2" SLOT="0" @@ -41,8 +42,6 @@ REQUIRED_USE=" python? ( ${PYTHON_REQUIRED_USE} ) " -S=${WORKDIR}/${P/_rc/-rc} - wrap_python() { if use python; then pushd bindings/python >/dev/null || die @@ -53,6 +52,7 @@ wrap_python() { src_prepare() { default + sed -i '/NOT uppercase_CMAKE_BUILD_TYPE MATCHES/ s/DEBUG/GENTOO|DEBUG/' \ llvm/CMakeLists.txt || die cmake_src_prepare |