summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorgy Yakovlev <gyakovlev@gentoo.org>2020-06-18 17:57:27 -0700
committerGeorgy Yakovlev <gyakovlev@gentoo.org>2020-06-18 18:33:05 -0700
commit702b7bba86ac86a7e90b6c8dfa37d90ae9ae4f16 (patch)
treea03bb351a9246a30e75f870957788cbcac406cc9 /dev-libs/keystone
parentprofiles/arch/{amd64,arm,arm64,powerpc,x86}: force keystone llvm targets (diff)
downloadgentoo-702b7bba86ac86a7e90b6c8dfa37d90ae9ae4f16.tar.gz
gentoo-702b7bba86ac86a7e90b6c8dfa37d90ae9ae4f16.tar.bz2
gentoo-702b7bba86ac86a7e90b6c8dfa37d90ae9ae4f16.zip
dev-libs/keystone: rework live ebuild
bump to EAPI=7 migrate to cmake.eclass honor Gentoo CMAKE_BUILD_TYPE make python truly optional bump python targets use llvm.eclass (limit to llvm10 for now) keyword on ~ppc64 Issue: https://github.com/gentoo/gentoo/pull/11828 Bug: https://bugs.gentoo.org/685000 Bug: https://bugs.gentoo.org/712354 Bug: https://bugs.gentoo.org/718276 Bug: https://bugs.gentoo.org/652440 Package-Manager: Portage-2.3.101, Repoman-2.3.22 Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
Diffstat (limited to 'dev-libs/keystone')
-rw-r--r--dev-libs/keystone/keystone-9999.ebuild41
1 files changed, 26 insertions, 15 deletions
diff --git a/dev-libs/keystone/keystone-9999.ebuild b/dev-libs/keystone/keystone-9999.ebuild
index dba275576bed..a4863b0bced5 100644
--- a/dev-libs/keystone/keystone-9999.ebuild
+++ b/dev-libs/keystone/keystone-9999.ebuild
@@ -1,13 +1,12 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=7
DISTUTILS_OPTIONAL=1
-CMAKE_MIN_VERSION=3.8.7
-PYTHON_COMPAT=( python3_6 )
+PYTHON_COMPAT=( python3_{6,7,8} )
-inherit cmake-utils distutils-r1
+inherit cmake distutils-r1 llvm
DESCRIPTION="assembly/assembler framework + bindings"
HOMEPAGE="http://www.keystone-engine.org/"
@@ -18,7 +17,7 @@ if [[ ${PV} == 9999* ]]; then
KEYWORDS=""
else
SRC_URI="https://github.com/keystone-engine/keystone/archive/${PV/_rc/-rc}.tar.gz -> ${P}.tar.gz"
- KEYWORDS="~amd64 ~arm ~x86"
+ KEYWORDS="~amd64 ~arm ~ppc64 ~x86"
fi
LICENSE="GPL-2"
@@ -30,19 +29,28 @@ 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}
+
+LLVM_MAX_SLOT=10
+
+RDEPEND="
+ <sys-devel/llvm-11:=
+ || (
+ sys-devel/llvm:8[${LLVM_TARGET_USEDEPS// /,}]
+ sys-devel/llvm:9[${LLVM_TARGET_USEDEPS// /,}]
+ sys-devel/llvm:10[${LLVM_TARGET_USEDEPS// /,}]
+ )
+ python? ( ${PYTHON_DEPS} )
"
+
DEPEND="${RDEPEND}"
+
REQUIRED_USE="
- ${PYTHON_REQUIRED_USE}
|| ( ${ALL_LLVM_TARGETS[*]} )
+ python? ( ${PYTHON_REQUIRED_USE} )
"
S=${WORKDIR}/${P/_rc/-rc}
-CMAKE_BUILD_TYPE=RelWithDebInfo
-
wrap_python() {
if use python; then
pushd bindings/python >/dev/null || die
@@ -53,29 +61,32 @@ wrap_python() {
src_prepare() {
default
- cmake-utils_src_prepare
+ 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-utils_src_configure
+ cmake_src_configure
wrap_python ${FUNCNAME}
}
src_compile() {
- cmake-utils_src_compile
+ cmake_src_compile
wrap_python ${FUNCNAME}
}
src_install() {
- cmake-utils_src_install
+ cmake_src_install
wrap_python ${FUNCNAME}
}