commit:     cd63416086421984d4ebccc539706e3ef373fe5d
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Feb  2 14:57:42 2017 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Feb  2 15:07:57 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cd634160

sys-devel/lld: Use python-any-r1

 sys-devel/lld/lld-4.0.0_rc1.ebuild | 12 ++++++++++--
 sys-devel/lld/lld-9999.ebuild      | 12 ++++++++++--
 2 files changed, 20 insertions(+), 4 deletions(-)

diff --git a/sys-devel/lld/lld-4.0.0_rc1.ebuild 
b/sys-devel/lld/lld-4.0.0_rc1.ebuild
index 3e6dfc9..cb62439 100644
--- a/sys-devel/lld/lld-4.0.0_rc1.ebuild
+++ b/sys-devel/lld/lld-4.0.0_rc1.ebuild
@@ -9,7 +9,7 @@ EAPI=6
 CMAKE_MIN_VERSION=3.7.0-r1
 PYTHON_COMPAT=( python2_7 )
 
-inherit cmake-utils
+inherit cmake-utils python-any-r1
 
 DESCRIPTION="The LLVM linker (link editor)"
 HOMEPAGE="http://llvm.org/";
@@ -23,7 +23,7 @@ IUSE="test"
 
 RDEPEND="~sys-devel/llvm-${PV}"
 DEPEND="${RDEPEND}
-       test? ( ~dev-python/lit-${PV} )"
+       test? ( $(python_gen_any_dep 
"~dev-python/lit-${PV}[\${PYTHON_USEDEP}]") )"
 
 S=${WORKDIR}/${P/_/}.src
 
@@ -33,6 +33,14 @@ RESTRICT="test"
 # least intrusive of all
 CMAKE_BUILD_TYPE=RelWithDebInfo
 
+python_check_deps() {
+       has_version "dev-python/lit[${PYTHON_USEDEP}]"
+}
+
+pkg_setup() {
+       use test && python-any-r1_pkg_setup
+}
+
 src_unpack() {
        default
 

diff --git a/sys-devel/lld/lld-9999.ebuild b/sys-devel/lld/lld-9999.ebuild
index 93b234c..6a01839 100644
--- a/sys-devel/lld/lld-9999.ebuild
+++ b/sys-devel/lld/lld-9999.ebuild
@@ -9,7 +9,7 @@ EAPI=6
 CMAKE_MIN_VERSION=3.7.0-r1
 PYTHON_COMPAT=( python2_7 )
 
-inherit cmake-utils git-r3
+inherit cmake-utils git-r3 python-any-r1
 
 DESCRIPTION="The LLVM linker (link editor)"
 HOMEPAGE="http://llvm.org/";
@@ -24,7 +24,7 @@ IUSE="test"
 
 RDEPEND="~sys-devel/llvm-${PV}"
 DEPEND="${RDEPEND}
-       test? ( ~dev-python/lit-${PV} )"
+       test? ( $(python_gen_any_dep 
"~dev-python/lit-${PV}[\${PYTHON_USEDEP}]") )"
 
 # TODO: fix test suite to build stand-alone
 RESTRICT="test"
@@ -32,6 +32,14 @@ RESTRICT="test"
 # least intrusive of all
 CMAKE_BUILD_TYPE=RelWithDebInfo
 
+python_check_deps() {
+       has_version "dev-python/lit[${PYTHON_USEDEP}]"
+}
+
+pkg_setup() {
+       use test && python-any-r1_pkg_setup
+}
+
 src_unpack() {
        if use test; then
                # needed for patched gtest

Reply via email to